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

组件调整

上级 034f99df
......@@ -2,7 +2,7 @@
<div v-if="overload" 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 v-if="curvalue== null || curvalue==''" class="ion-select-icon"></div>
<ion-select :value="curvalue" :disabled="disabled " @ionChange="change" interface="action-sheet" :cancel-text="$t('app.button.cancel')">
<ion-select :value="curvalue" :disabled="disabled " @click="onSearch" @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>
</div>
......@@ -153,6 +153,23 @@ export default class AppSelectDropDown extends Vue {
*/
@Prop({ default: {} }) protected navigateContext?: any;
/**
* 表单请求完成
*
* @type {*}
* @memberof AppSelectDropDown
*/
@Prop() public dataOverLoad?: any;
/**
* 监听表单请求完成
* @memberof AppSelectDropDown
*/
@Watch("dataOverLoad")
onDataOverLoadChange(newVal: any, oldVal: any){
this.onSearch();
}
/**
* 当前值
*
......@@ -254,31 +271,13 @@ export default class AppSelectDropDown extends Vue {
*/
public overload: boolean = false;
/**
* vue 生命周期
*
* @memberof AppSelectDropDown
*/
public created() {
if (Object.is(this.editortype, 'dropdown')) {
this.onSearch(null, true);
}
}
/**
* vue 生命周期
*
* @memberof AppSelectDropDown
*/
public mounted() {
}
/**
* 组件销毁
*
* @memberof AppSelectDropDown
*/
public destroyed(): void {
this.onSearch(null, true);
}
/**
......@@ -296,7 +295,7 @@ export default class AppSelectDropDown extends Vue {
* @param query
* @param callback
*/
public async onSearch(query: any, other: boolean): Promise<any> {
public async onSearch(query: any = {}, other: boolean = false): Promise<any> {
// 公共参数处理
let data: any = {};
const bcancel: boolean = this.handlePublicParams(data);
......@@ -331,10 +330,6 @@ export default class AppSelectDropDown extends Vue {
}
/**
* 处理返回数据格式
*/
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册