Commit 55b1153e authored by nature's avatar nature

组建优化

parent 0527a398
...@@ -101,18 +101,18 @@ export default { ...@@ -101,18 +101,18 @@ export default {
width: 0px; width: 0px;
} }
} }
&.disable { /* &.disable {
color: rgba(0, 0, 0, .3) !important; color: rgba(0, 0, 0, .3);
background-color: #e6e6e6 !important; background-color: #e6e6e6;
box-shadow: none !important; box-shadow: none;
cursor: not-allowed !important; cursor: not-allowed;
div { div {
color: rgba(0, 0, 0, .3) !important; color: rgba(0, 0, 0, .3);
background-color: #e6e6e6 !important; background-color: #e6e6e6;
box-shadow: none !important; box-shadow: none;
cursor: not-allowed !important; cursor: not-allowed;
} }
} }*/
} }
} }
......
...@@ -84,7 +84,7 @@ export default { ...@@ -84,7 +84,7 @@ export default {
watch: { watch: {
value (value) { value (value) {
if (value > this.count - 1) { if (value > this.count - 1) {
throw 'tab index out of bound exception' throw Error('tab index out of bound exception')
} else { } else {
this.defaultActive === value this.defaultActive === value
// this.setTabActive(value) // this.setTabActive(value)
...@@ -94,7 +94,7 @@ export default { ...@@ -94,7 +94,7 @@ export default {
mounted () { mounted () {
let vm = this let vm = this
if (vm.value > vm.count - 1) { if (vm.value > vm.count - 1) {
throw 'tab index out of bound exception' throw Error('tab index out of bound exception')
} else { } else {
vm.setTabActive(vm.value) vm.setTabActive(vm.value)
} }
......
...@@ -12,7 +12,7 @@ export default { ...@@ -12,7 +12,7 @@ export default {
}, },
data () { data () {
return { return {
width: 50, width: 40,
height: 60, height: 60,
} }
}, },
...@@ -33,15 +33,15 @@ export default { ...@@ -33,15 +33,15 @@ export default {
this.ratio = 1 this.ratio = 1
this.width *= this.ratio this.width *= this.ratio
this.height *= this.ratio this.height *= this.ratio
this.initRadius = 11 * this.ratio // 外面阴影 this.initRadius = 10 * this.ratio // 外面阴影
this.minHeadRadius = 12 * this.ratio this.minHeadRadius = 10 * this.ratio
this.minTailRadius = 5 * this.ratio this.minTailRadius = 4 * this.ratio
this.initArrowRadius = 6 * this.ratio // 里面的刷新 this.initArrowRadius = 6 * this.ratio // 里面的刷新
this.minArrowRadius = 6 * this.ratio this.minArrowRadius = 6 * this.ratio
this.arrowWidth = 3 * this.ratio this.arrowWidth = 3 * this.ratio
this.maxDistance = 40 * this.ratio this.maxDistance = 30 * this.ratio
this.initCenterX = 25 * this.ratio this.initCenterX = 20 * this.ratio
this.initCenterY = 25 * this.ratio this.initCenterY = 20 * this.ratio
this.headCenter = { this.headCenter = {
x: this.initCenterX, x: this.initCenterX,
y: this.initCenterY, y: this.initCenterY,
......
...@@ -114,8 +114,8 @@ export default { ...@@ -114,8 +114,8 @@ export default {
// 下拉刷新配置 // 下拉刷新配置
type: Object, type: Object,
default: () => ({ default: () => ({
threshold: 40, // 触发 pullingDown 的距离 threshold: 45, // 触发 pullingDown 的距离
stop: 20, // pullingDown 正在刷新 hold 时的距离 stop: 30, // pullingDown 正在刷新 hold 时的距离
txt: '刷新成功', txt: '刷新成功',
}), }),
}, },
...@@ -341,12 +341,18 @@ export default { ...@@ -341,12 +341,18 @@ export default {
_initPullDown () { _initPullDown () {
let vm = this let vm = this
this.scroll.on('pullingDown', () => { this.scroll.on('pullingDown', () => {
// if (this.pullUpFinally) {
// this.pullDownBefore = false
// vm.scroll.closePullDown()
// this.pullDownNow = false
// } else {
this.pullDownBefore = false this.pullDownBefore = false
this.pullDownNow = true this.pullDownNow = true
setTimeout(function () { setTimeout(function () {
vm.$emit('pullingDown') vm.$emit('pullingDown')
vm.scroll.closePullDown() // 防止在 bounce 前二次触发 vm.scroll.closePullDown() // 防止在 bounce 前二次触发
}, 100) }, 150)
// }
}) })
this.scroll.on('scroll', pos => { this.scroll.on('scroll', pos => {
...@@ -529,6 +535,11 @@ export default { ...@@ -529,6 +535,11 @@ export default {
} }
} }
.platform-ios{ .platform-ios{
.vue-better-scroll{
&__pulldown {
padding-top:4px
}
}
.has-footer { .has-footer {
.vue-better-scroll__wrapper { .vue-better-scroll__wrapper {
padding-bottom: 1rem; padding-bottom: 1rem;
...@@ -538,6 +549,11 @@ export default { ...@@ -538,6 +549,11 @@ export default {
// iPhoneX适配 // iPhoneX适配
@media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) { @media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) {
.platform-ios { .platform-ios {
.vue-better-scroll{
&__pulldown {
padding-top:24px
}
}
.has-footer { .has-footer {
.vue-better-scroll__wrapper { .vue-better-scroll__wrapper {
padding-bottom: 1.8rem; padding-bottom: 1.8rem;
...@@ -549,6 +565,11 @@ export default { ...@@ -549,6 +565,11 @@ export default {
// iPhoneX Max适配 // iPhoneX Max适配
@media (device-width: 414px) and (device-height: 896px) { @media (device-width: 414px) and (device-height: 896px) {
.platform-ios { .platform-ios {
.vue-better-scroll{
&__pulldown {
padding-top:24px
}
}
.has-footer { .has-footer {
.vue-better-scroll__wrapper { .vue-better-scroll__wrapper {
padding-bottom: 1.8rem; padding-bottom: 1.8rem;
......
...@@ -5,14 +5,19 @@ ...@@ -5,14 +5,19 @@
<template> <template>
<div class="h-header-btn"> <div class="h-header-btn">
<i class="ion-ios-arrow-back"/> <slot :back="back" :$index="1" name="back">
<i class="ion-ios-arrow-back"/>
</slot>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data () { data () {
return { return {
back: {
data: '返回',
index: 3,
},
} }
}, },
methods: { methods: {
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
<div slot="center">BottomTab</div> <div slot="center">BottomTab</div>
</h-header> </h-header>
<bottom-tab :showDivider="true"> <bottom-tab :showDivider="true">
<tab-button>返回</tab-button> <tab-button disable>返回</tab-button>
<tab-button>退出<img src="@/assets/image/warning@2x.png"></tab-button> <tab-button disable>退出<img src="@/assets/image/warning@2x.png"></tab-button>
</bottom-tab> </bottom-tab>
</h-view> </h-view>
</template> </template>
......
<template> <template>
<h-view class="public-style hls-popup" style="height: 100%" title="封装测试"> <h-view class="public-style hls-popup" style="height: 100%" title="封装测试">
<h-header class="bar-custom"> <h-header class="bar-custom">
<h-return slot="left" @click.native="$routeGo()"/> <h-return slot="left" @click.native="$routeGo()">
<template slot="back" slot-scope="{back,$index}">
<p>{{ back.index }}</p>
<p>{{ $index }}</p>
</template>
</h-return>
<div slot="center">封装测试</div> <div slot="center">封装测试</div>
<div slot="right" class="h-header-btn"> <div slot="right" class="h-header-btn">
操作 操作
...@@ -257,8 +262,12 @@ ...@@ -257,8 +262,12 @@
<h-modal ref="modal" v-model="showModalValue" position="bottom" class="sign-modal"> <h-modal ref="modal" v-model="showModalValue" position="bottom" class="sign-modal">
<h-view> <h-view>
<h-header style="height: 43px !important;padding-top:0px"> <h-header style="height: 43px !important;padding-top:0px">
<div slot="left" class="h-header-btn">确定</div> <template #left>
<div slot="right" class="h-header-btn">清除</div> <div class="h-header-btn">确定</div>
</template>
<template #right>
<div class="h-header-btn">清除</div>
</template>
</h-header> </h-header>
<h-content :cal-content="false"> <h-content :cal-content="false">
<div id="draw" class="draw"/> <div id="draw" class="draw"/>
...@@ -298,16 +307,16 @@ export default { ...@@ -298,16 +307,16 @@ export default {
imgList: [ imgList: [
{imgUrl: 'http://hlsapp.hand-china.com/hls_file/2018/05/F1B6D85E409A4714A8540504B2D133AD', {imgUrl: 'http://hlsapp.hand-china.com/hls_file/2018/05/F1B6D85E409A4714A8540504B2D133AD',
imgOriginalUrl: 'http://hlsapp.hand-china.com/file/orign.png', imgOriginalUrl: 'http://hlsapp.hand-china.com/file/orign.png',
imgSize: 2982604, imgSize: 2982604,
}, },
{imgUrl: 'http://hlsapp.hand-china.com/hls_file/2018/05/F1B6D85E409A4714A8540504B2D133AD', {imgUrl: 'http://hlsapp.hand-china.com/hls_file/2018/05/F1B6D85E409A4714A8540504B2D133AD',
imgOriginalUrl: 'http://hlsapp.hand-china.com/file/orign.png', imgOriginalUrl: 'http://hlsapp.hand-china.com/file/orign.png',
imgSize: 228260487, imgSize: 228260487,
}, },
{imgUrl: 'http://hlsapp.hand-china.com/hls_file/2018/05/F1B6D85E409A4714A8540504B2D133AD', {imgUrl: 'http://hlsapp.hand-china.com/hls_file/2018/05/F1B6D85E409A4714A8540504B2D133AD',
imgOriginalUrl: 'http://hlsapp.hand-china.com/file/orign.png', imgOriginalUrl: 'http://hlsapp.hand-china.com/file/orign.png',
imgSize: 328260412341, imgSize: 328260412341,
}, },
], ],
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment