提交 6abf383b 编写于 作者: KK's avatar KK

解显示问题--fix

上级 ce23cf04
<template>
<div class="app-mobile-select">
<div v-if="overload" class="app-mobile-select">
<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')">
<template v-if="codeListType == 'DYNAMIC'">
......@@ -45,6 +45,9 @@ export default class AppSelect extends Vue {
return this.value
}
set curValue(value:any){
this.$emit("change", value.detail.value);
}
/**
* change事件
......@@ -133,7 +136,7 @@ export default class AppSelect extends Vue {
* 视图参数
*
* @type {*}
* @memberof AppMobMpicker
* @memberof AppSelect
*/
@Prop() public viewparams!: any;
......@@ -145,6 +148,14 @@ export default class AppSelect extends Vue {
*/
public isCached: boolean = false;
/**
* 加载完成
*
* @type {*}
* @memberof AppSelect
*/
public overload: boolean = false;
/**
* 监听表单数据
*
......@@ -160,25 +171,17 @@ export default class AppSelect extends Vue {
}
/**
* vue 生命周期
*
* @memberof AppSelect
* mounted
*/
public created() {
public mounted() {
if (Object.is(this.codeListType, "STATIC")) {
this.overload = true;
this.options = this.$store.getters.getCodeListItems(this.tag);
} else {
this.load();
}
}
/**
* mounted
*/
public mounted() {
this.load();
}
/**
* 加载
*
......@@ -203,11 +206,13 @@ export default class AppSelect extends Vue {
Loading.hidden();
}
if (response && response.status === 200) {
this.overload = true;
this.options = response.data;
if (this.isCache) {
this.isCached = true;
}
} else {
this.overload = true;
this.options = [];
}
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册