更新页面
This commit is contained in:
@ -4,10 +4,11 @@
|
||||
:model="listQuery"
|
||||
:label-width="props.labelWidth"
|
||||
:rules="props.rules"
|
||||
:inline="true"
|
||||
:inline="props.inline"
|
||||
label-position="right"
|
||||
>
|
||||
<el-form-item
|
||||
:class="myClass"
|
||||
v-for="item in props.formList"
|
||||
:style="item.width && { width: item.width }"
|
||||
:prop="item.prop"
|
||||
@ -63,7 +64,7 @@
|
||||
/>
|
||||
<!-- 部门department -->
|
||||
<template v-else-if="item.type === 'department'">
|
||||
<MOSTY.Department clearable v-model="listQuery[item.prop]" />
|
||||
<MOSTY.Department style="width: 100%;" clearable v-model="listQuery[item.prop]" />
|
||||
</template>
|
||||
|
||||
<!-- 上传 upload -->
|
||||
@ -183,6 +184,10 @@ const props = defineProps({
|
||||
modelValue: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
inline:{
|
||||
type:Boolean,
|
||||
default:true
|
||||
}
|
||||
});
|
||||
const elform = ref();
|
||||
@ -196,6 +201,10 @@ const submit = (resfun) => {
|
||||
});
|
||||
};
|
||||
|
||||
const reset = () =>{
|
||||
elform.value.resetFields()
|
||||
}
|
||||
|
||||
watch(
|
||||
() => listQuery.value,
|
||||
(newVal) => {
|
||||
@ -215,5 +224,5 @@ watch(
|
||||
{ immediate: true, deep: true }
|
||||
);
|
||||
|
||||
defineExpose({ submit });
|
||||
defineExpose({ submit,reset });
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user