Browse Source
Merge branch 'devlop' of http://git.qniao.cn/qniao/paper-shopkeeper-H5 into devlop
devlop
Merge branch 'devlop' of http://git.qniao.cn/qniao/paper-shopkeeper-H5 into devlop
devlop
23 changed files with 1625 additions and 1430 deletions
Unified View
Diff Options
-
9apis/commonApi.js
-
2components/qn-form-item/qn-form-item.vue
-
2components/qn-header/qn-header.vue
-
149components/qn-input-number/qn-input-number.vue
-
62components/scroll-list/scroll-list.vue
-
4pages.json
-
499pages/add-account/index.vue
-
499pages/add-address-manage/index.vue
-
481pages/address-manage/index.vue
-
1090pages/cart/index.vue
-
8pages/enquiry-list/index.vue
-
6pages/enterprise-info/index.vue
-
10pages/for-comparison/index.vue
-
9pages/mine/index.vue
-
2pages/notification-page/index.vue
-
2pages/order-detail/index.vue
-
2pages/order-list/index.vue
-
11pages/order-make/index.vue
-
105pages/paper-details/index.vue
-
62pages/store/index.vue
-
2utils/hook.js
-
2utils/http/index.js
-
37utils/index.js
@ -1,79 +1,92 @@ |
|||||
<template> |
<template> |
||||
<view class="warpper"> |
|
||||
<view class="minus-box" @tap="minusTap"> |
|
||||
<uni-icons size="16" custom-prefix="iconfont" type="icon-Less" color="#007AFF"></uni-icons> |
|
||||
<!-- <uni-icons size="16" type="minus" color="#007AFF"></uni-icons> --> |
|
||||
</view> |
|
||||
<view class="" style="padding: 0rpx 4rpx;"> |
|
||||
<uni-easyinput :inputBorder="false" class="quantity-input" type="number" :value="value" placeholder="请输入" @blur="blur" @confirm="confirm"></uni-easyinput> |
|
||||
</view> |
|
||||
<view class="minus-box" @tap="addTap"><uni-icons size="16" type="plusempty" color="#007AFF"></uni-icons></view> |
|
||||
</view> |
|
||||
|
<view class="warpper"> |
||||
|
<view class="minus-box" @tap="minusTap"> |
||||
|
<uni-icons size="16" custom-prefix="iconfont" type="icon-Less" color="#007AFF"></uni-icons> |
||||
|
<!-- <uni-icons size="16" type="minus" color="#007AFF"></uni-icons> --> |
||||
|
</view> |
||||
|
<view class="" style="padding: 0rpx 4rpx"> |
||||
|
<qn-easyinput |
||||
|
:inputBorder="false" |
||||
|
class="quantity-input" |
||||
|
style="height: 64rpx" |
||||
|
:clearable="false" |
||||
|
type="number" |
||||
|
:value="value" |
||||
|
placeholder="请输入" |
||||
|
@blur="blur" |
||||
|
@confirm="confirm" |
||||
|
></qn-easyinput> |
||||
|
</view> |
||||
|
<view class="minus-box" @tap="addTap"><uni-icons size="16" type="plusempty" color="#007AFF"></uni-icons></view> |
||||
|
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
export default { |
export default { |
||||
props: { |
|
||||
quantity: { |
|
||||
type: [Number, String], |
|
||||
default: 0 |
|
||||
} |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
value: 0 |
|
||||
} |
|
||||
}, |
|
||||
watch: { |
|
||||
quantity: { |
|
||||
handler(nv, ov) { |
|
||||
this.value = nv |
|
||||
}, |
|
||||
immediate: true, |
|
||||
} |
|
||||
}, |
|
||||
methods: { |
|
||||
blur(e) { |
|
||||
this.$emit('change', e.detail.value) |
|
||||
}, |
|
||||
confirm(value) { |
|
||||
if (value.trim()) { |
|
||||
this.$emit('change', value) |
|
||||
} |
|
||||
}, |
|
||||
minusTap() { |
|
||||
if (this.value == 0) { |
|
||||
return |
|
||||
} |
|
||||
this.value-- |
|
||||
this.$emit('change', this.value) |
|
||||
}, |
|
||||
addTap() { |
|
||||
this.value++ |
|
||||
this.$emit('change', this.value) |
|
||||
} |
|
||||
} |
|
||||
|
props: { |
||||
|
quantity: { |
||||
|
type: [Number, String], |
||||
|
default: 0 |
||||
|
} |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
value: 0 |
||||
|
} |
||||
|
}, |
||||
|
watch: { |
||||
|
quantity: { |
||||
|
handler(nv, ov) { |
||||
|
this.value = nv |
||||
|
}, |
||||
|
immediate: true |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
blur(e) { |
||||
|
this.$emit('change', e.detail.value) |
||||
|
}, |
||||
|
confirm(value) { |
||||
|
if (value.trim()) { |
||||
|
this.$emit('change', value) |
||||
|
} |
||||
|
}, |
||||
|
minusTap() { |
||||
|
if (this.value == 0) { |
||||
|
return |
||||
|
} |
||||
|
this.value-- |
||||
|
this.$emit('change', this.value) |
||||
|
}, |
||||
|
addTap() { |
||||
|
this.value++ |
||||
|
this.$emit('change', this.value) |
||||
|
} |
||||
|
} |
||||
} |
} |
||||
</script> |
</script> |
||||
|
|
||||
<style lang="scss"> |
|
||||
|
<style lang="scss" scoped> |
||||
.warpper { |
.warpper { |
||||
display: flex; |
|
||||
flex-direction: row; |
|
||||
align-items: center; |
|
||||
.minus-box { |
|
||||
width: 64rpx; |
|
||||
height: 64rpx; |
|
||||
line-height: 64rpx; |
|
||||
text-align: center; |
|
||||
background: #f2f3f5; |
|
||||
border-radius: 8rpx; |
|
||||
color: #007aff; |
|
||||
} |
|
||||
.quantity-input { |
|
||||
width: 120rpx; |
|
||||
height: 64rpx; |
|
||||
background: #f2f3f5; |
|
||||
} |
|
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
align-items: center; |
||||
|
.minus-box { |
||||
|
width: 64rpx; |
||||
|
height: 64rpx; |
||||
|
line-height: 64rpx; |
||||
|
text-align: center; |
||||
|
background: #f2f3f5; |
||||
|
border-radius: 8rpx; |
||||
|
color: #007aff; |
||||
|
} |
||||
|
.quantity-input { |
||||
|
width: 120rpx; |
||||
|
height: 64rpx; |
||||
|
background: #f2f3f5; |
||||
|
/deep/ .uni-easyinput__content { |
||||
|
min-height: 64rpx; |
||||
|
} |
||||
|
} |
||||
} |
} |
||||
</style> |
</style> |
||||
1090
pages/cart/index.vue
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
Write
Preview
Loading…
Cancel
Save