提交 714a5712 编写于 作者: KK's avatar KK

数据选择下拉试图调整

上级 d5ea64a2
<template> <template>
<div class="app-mobile-select-drop-down"> <div class="app-mobile-select-drop-down">
<div class="cancel-icon" v-if="curvalue"><ion-icon name="close-circle-outline" @click="clear"></ion-icon></div> <div class="cancel-icon" v-if="curvalue"><ion-icon name="close-circle-outline" @click="onClear"></ion-icon></div>
<div v-if="curvalue== null || curvalue==''" class="ion-select-icon"></div> <div v-if="curvalue== null || curvalue==''" class="ion-select-icon"></div>
<div class="select_text" style="height: 40px;" @click="openSelect">{{curvalue}}</div> <div class="select_text" style="height: 40px;" @click="openSelect">{{curvalue}}</div>
<ion-select :value="selectValue" :ref="name+'select'" v-show="false" :disabled="disabled " @ionChange="change" interface="action-sheet" :cancel-text="$t('app.button.cancel')"> <ion-select :selected-text="selectValue" :ref="name+'select'" v-show="false" :disabled="disabled " @ionChange="change" interface="action-sheet" :cancel-text="$t('app.button.cancel')">
<ion-select-option v-for="option of items" :key="option.value" :value="option.value">{{option.text}}</ion-select-option> <ion-select-option v-for="option of items" :key="option.value" :value="option.value">{{option.text}}</ion-select-option>
</ion-select> </ion-select>
</div> </div>
...@@ -199,7 +199,7 @@ export default class AppSelectDropDown extends Vue { ...@@ -199,7 +199,7 @@ export default class AppSelectDropDown extends Vue {
* @type {string} * @type {string}
* @memberof AppSelectDropDown * @memberof AppSelectDropDown
*/ */
public selectValue = ""; public selectValue :any= "";
/** /**
...@@ -382,6 +382,7 @@ export default class AppSelectDropDown extends Vue { ...@@ -382,6 +382,7 @@ export default class AppSelectDropDown extends Vue {
if (this.name) { if (this.name) {
this.$emit('formitemvaluechange', { name: this.name, value: '' }); this.$emit('formitemvaluechange', { name: this.name, value: '' });
} }
this.selectValue = null;
this.$forceUpdate(); this.$forceUpdate();
} }
...@@ -772,7 +773,9 @@ export default class AppSelectDropDown extends Vue { ...@@ -772,7 +773,9 @@ export default class AppSelectDropDown extends Vue {
this.onSearch(null); this.onSearch(null);
let select :any= this.$refs[this.name+'select']; let select :any= this.$refs[this.name+'select'];
if(select){ if(select){
select.open(); setTimeout(() => {
select.open();
}, 1);
} }
} }
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册