Commit 28eed243 authored by Damon's avatar Damon

下拉组件修改

parent 4daae323
......@@ -3,7 +3,7 @@
<view class="xh-select">
<u-input :value="text" readOnly @click="show=true" :placeholder="placeholder" :placeholder-style="placeholderStyle"
:custom-style="customStyle" :clearable="false"></u-input>
<u-action-sheet :list="settings" v-model="show" @click="actionSheetCallback" safe-area-inset-bottom></u-action-sheet>
<u-select :list="settings" v-model="show" @confirm="actionSheetCallback" safe-area-inset-bottom></u-select>
<u-icon class="input-icon" :name="show ? 'arrow-up' : 'arrow-down'"></u-icon>
</view>
......@@ -43,8 +43,8 @@
let settings = this.item.fieldsOptions || []
result = settings.map(item => {
return {
text: item.label,
id: item.key,
label: item.label,
value: item.key,
color: '#333333',
fontSize: 26
}
......@@ -74,8 +74,8 @@
watch: {},
mounted() {},
methods: {
actionSheetCallback(index) {
let id = this.settings[index].id;
actionSheetCallback(event) {
const id = event[0].value
this.dataValue = id
this.valueChange(id)
}
......
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