...
|
...
|
@@ -2,11 +2,11 @@ |
|
|
|
|
|
<template>
|
|
|
|
|
|
<div class="customSelectWrapper">
|
|
|
<div class="customSelectTextWrapper" @click="showPicker">
|
|
|
<div class="customSelectWrapper" @click="showPicker">
|
|
|
<div class="customSelectTextWrapper" >
|
|
|
<span class="leftText">求购期限:</span>
|
|
|
<div class="rightWrapper">
|
|
|
<span class="rightText">{{value}}</span>
|
|
|
<span class="rightText">{{currentOption || '7天'}}</span>
|
|
|
<i class="cubeic-arrow" ></i>
|
|
|
</div>
|
|
|
</div>
|
...
|
...
|
@@ -25,9 +25,9 @@ export default { |
|
|
type: Array,
|
|
|
default: [],
|
|
|
},
|
|
|
value: {
|
|
|
chooseDay: {
|
|
|
type: String,
|
|
|
default: '',
|
|
|
default: '7天',
|
|
|
},
|
|
|
choose: {
|
|
|
type: Function,
|
...
|
...
|
@@ -37,33 +37,35 @@ export default { |
|
|
components: {Select},
|
|
|
|
|
|
computed: {
|
|
|
chooseday: {
|
|
|
|
|
|
currentOption: {
|
|
|
get() {
|
|
|
return this.value;
|
|
|
return this.current || this.chooseDay;
|
|
|
},
|
|
|
set(val) {
|
|
|
|
|
|
set(val) {
|
|
|
this.current = val;
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
return {
|
|
|
// options: ['1天', '3天', '7天', '15天', '30天'],
|
|
|
// value: '7天',
|
|
|
title: '选择求购时限',
|
|
|
|
|
|
current: '',
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
change(value, index, text) {
|
|
|
console.log('change', value, index, text);
|
|
|
// console.log('change', value, index, text);
|
|
|
this.choose && this.choose(value[0]);
|
|
|
this.current = value[0];
|
|
|
},
|
|
|
|
|
|
showPicker() {
|
|
|
|
|
|
console.log(this.options)
|
|
|
console.log(this.options);
|
|
|
this.$createPicker({
|
|
|
title: '选择求购时限',
|
|
|
data: [this.options],
|
...
|
...
|
|