提交 91d9fc10 编写于 作者: KK's avatar KK

调整下拉样式,以及加载值未回填的bug

上级 b7efc68f
...@@ -3,11 +3,15 @@ ...@@ -3,11 +3,15 @@
ion-icon{ ion-icon{
position: absolute; position: absolute;
right: 32px; right: 32px;
bottom: 16px; bottom: 12px;
z-index:2; z-index: 2;
} }
ion-select{ ion-select{
width: 100%; width: 100%;
max-width: 100%; max-width: 100%;
} }
} ion-select::part(text) {
text-align: right;
padding-right: 17px;
}
}
\ No newline at end of file
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
<ion-icon v-if="curValue" name="close-circle-outline" @click="clear"></ion-icon> <ion-icon v-if="curValue" name="close-circle-outline" @click="clear"></ion-icon>
<ion-select :value="curValue" :disabled="disabled ? disabled : false" @ionChange="change" interface="action-sheet" @click="load" :cancel-text="$t('app.button.cancel')"> <ion-select :value="curValue" :disabled="disabled ? disabled : false" @ionChange="change" interface="action-sheet" @click="load" :cancel-text="$t('app.button.cancel')">
<template v-if="codeListType == 'DYNAMIC'"> <template v-if="codeListType == 'DYNAMIC'">
<ion-select-option v-for="option of options" :key="option.value" :value="option.value">{{($t('userCustom.'+tag+'.'+option.value)!== ('userCustom.'+tag+'.'+option.value))?$t('userCustom.'+tag+'.'+option.value) : option.text}}</ion-select-option> <ion-select-option v-for="option of options" :key="option.value" :value="option.value" class="mob-select-text">{{($t('userCustom.'+tag+'.'+option.value)!== ('userCustom.'+tag+'.'+option.value))?$t('userCustom.'+tag+'.'+option.value) : option.text}}</ion-select-option>
</template> </template>
<template v-else> <template v-else>
<ion-select-option v-for="option of options" :key="option.value" :value="option.value">{{($t('codelist.'+tag+'.'+option.value)!== ('codelist.'+tag+'.'+option.value))?$t('codelist.'+tag+'.'+option.value) : option.text}}</ion-select-option> <ion-select-option v-for="option of options" :key="option.value" :value="option.value" class="mob-select-text">{{($t('codelist.'+tag+'.'+option.value)!== ('codelist.'+tag+'.'+option.value))?$t('codelist.'+tag+'.'+option.value) : option.text}}</ion-select-option>
</template> </template>
</ion-select> </ion-select>
</div> </div>
...@@ -41,7 +41,10 @@ export default class AppSelect extends Vue { ...@@ -41,7 +41,10 @@ export default class AppSelect extends Vue {
* 当前选中值 * 当前选中值
* @memberof AppSelect * @memberof AppSelect
*/ */
public curValue: any = this.value; get curValue(){
return this.value
}
/** /**
* change事件 * change事件
...@@ -49,7 +52,6 @@ export default class AppSelect extends Vue { ...@@ -49,7 +52,6 @@ export default class AppSelect extends Vue {
* @memberof AppSelect * @memberof AppSelect
*/ */
public change(value: any) { public change(value: any) {
this.curValue = value.detail.value;
this.$emit("change", value.detail.value); this.$emit("change", value.detail.value);
} }
...@@ -170,6 +172,13 @@ export default class AppSelect extends Vue { ...@@ -170,6 +172,13 @@ export default class AppSelect extends Vue {
} }
} }
/**
* mounted
*/
public mounted() {
this.load();
}
/** /**
* 加载 * 加载
* *
...@@ -207,7 +216,6 @@ export default class AppSelect extends Vue { ...@@ -207,7 +216,6 @@ export default class AppSelect extends Vue {
* @memberof AppSelect * @memberof AppSelect
*/ */
public clear() { public clear() {
this.curValue = "";
this.$emit("change", ""); this.$emit("change", "");
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册