|
@@ -1,6 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<view>
|
|
<view>
|
|
- <picker @change="bindPickerChange" :value="multiIndex" :range="multiArray" range-key='label'
|
|
|
|
|
|
+ <picker class="pickerClass" ref='picker' :disabled="disabled" @change="bindPickerChange" :value="multiIndex" :range="multiArray" range-key='label'
|
|
mode="multiSelector" @columnchange='columnchange'>
|
|
mode="multiSelector" @columnchange='columnchange'>
|
|
<view class="text" :style="textStyleEmpty" v-if="place=='选择地区'">
|
|
<view class="text" :style="textStyleEmpty" v-if="place=='选择地区'">
|
|
{{place}}
|
|
{{place}}
|
|
@@ -35,9 +35,29 @@
|
|
},
|
|
},
|
|
textStyle: {
|
|
textStyle: {
|
|
type: Object,
|
|
type: Object,
|
|
|
|
+ },
|
|
|
|
+ disabled:{
|
|
|
|
+ value: Boolean,
|
|
|
|
+ default: false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
|
|
+ disabled(oldValue, newValue) {
|
|
|
|
+ console.log(123)
|
|
|
|
+ console.log(oldValue, newValue)
|
|
|
|
+ if(newValue){
|
|
|
|
+
|
|
|
|
+ }else{
|
|
|
|
+ // this.$refs.picker.change()
|
|
|
|
+ // console.log(this.$refs.picker)
|
|
|
|
+ this.bindPickerChange(this.$refs.picker.value)
|
|
|
|
+
|
|
|
|
+ // this.bindPickerChange()
|
|
|
|
+ }
|
|
|
|
+ // if (val != '') {
|
|
|
|
+ // this.place = val
|
|
|
|
+ // }
|
|
|
|
+ }
|
|
// searchPlace(oldValue, newValue) {
|
|
// searchPlace(oldValue, newValue) {
|
|
// console.log(123)
|
|
// console.log(123)
|
|
// console.log(oldValue, newValue)
|
|
// console.log(oldValue, newValue)
|
|
@@ -63,6 +83,7 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
|
|
+ console.log(this.disabled)
|
|
this.place = this.searchPlace
|
|
this.place = this.searchPlace
|
|
console.log("this.series", this.series)
|
|
console.log("this.series", this.series)
|
|
for (let i = 0; i < address.length; i++) {
|
|
for (let i = 0; i < address.length; i++) {
|
|
@@ -74,7 +95,7 @@
|
|
methods: {
|
|
methods: {
|
|
columnchange(e) {
|
|
columnchange(e) {
|
|
console.log('picker发送选择改变', e.detail)
|
|
console.log('picker发送选择改变', e.detail)
|
|
- this.multiIndex[e.detail.column] = e.detail.value
|
|
|
|
|
|
+ this.multiIndex[e.detail.column] =e.detail.value
|
|
console.log("this.multiIndex", this.multiIndex)
|
|
console.log("this.multiIndex", this.multiIndex)
|
|
switch (e.detail.column) {
|
|
switch (e.detail.column) {
|
|
case 0: //拖动第1列
|
|
case 0: //拖动第1列
|
|
@@ -142,29 +163,13 @@
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
<style lang="scss">
|
|
- .list-cell {
|
|
|
|
- display: flex;
|
|
|
|
- box-sizing: border-box;
|
|
|
|
- width: 100%;
|
|
|
|
- padding: 10px 24rpx;
|
|
|
|
- overflow: hidden;
|
|
|
|
- color: #323233;
|
|
|
|
- font-size: 28rpx;
|
|
|
|
- font-weight: 800;
|
|
|
|
- line-height: 48rpx;
|
|
|
|
- background-color: #fff;
|
|
|
|
- border-bottom: solid 3rpx #eeeeee;
|
|
|
|
- align-items: center;
|
|
|
|
-
|
|
|
|
- image {
|
|
|
|
- width: 76rpx;
|
|
|
|
- height: 76rpx;
|
|
|
|
- border-radius: 12rpx;
|
|
|
|
- flex: 0 0 76rpx;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- &-name {
|
|
|
|
- padding-left: 20rpx;
|
|
|
|
- }
|
|
|
|
|
|
+ .pickerClass{
|
|
|
|
+ width: 80%;
|
|
|
|
+ position: absolute;
|
|
|
|
+ right:11px;
|
|
|
|
+ padding:0 20px;
|
|
|
|
+ top:50%;
|
|
|
|
+ transform: translateY(-50%);
|
|
|
|
+ z-index:2
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|