mirror of
https://gitee.com/orangeform/orange-admin.git
synced 2026-01-17 02:26:28 +08:00
commit:修复bug
This commit is contained in:
@@ -170,6 +170,13 @@ const uploadWidgetImpl = reactive(
|
||||
|
||||
const getDisabledStatus = () => {
|
||||
if (form().isEdit) return true;
|
||||
let formWidgetAuth: ANY_OBJECT | null = null;
|
||||
if (form().formAuth) {
|
||||
formWidgetAuth = form().formAuth();
|
||||
if (formWidgetAuth != null) {
|
||||
formWidgetAuth = formWidgetAuth.pc[pps.widget.variableName];
|
||||
}
|
||||
}
|
||||
return props.widget.props.disabled;
|
||||
};
|
||||
|
||||
|
||||
@@ -355,9 +355,13 @@ const getWidgetProps = computed(() => {
|
||||
});
|
||||
|
||||
const getDisabledStatus = () => {
|
||||
const formWidgetAuth: ANY_OBJECT | null = form().formAuth
|
||||
? form().formAuth().pc[pps.widget.variableName]
|
||||
: null;
|
||||
let formWidgetAuth: ANY_OBJECT | null = null;
|
||||
if (form().formAuth) {
|
||||
formWidgetAuth = form().formAuth();
|
||||
if (formWidgetAuth != null) {
|
||||
formWidgetAuth = formWidgetAuth.pc[pps.widget.variableName];
|
||||
}
|
||||
}
|
||||
if (formWidgetAuth && formWidgetAuth.disabled) return true;
|
||||
return pps.widget.props.disabled;
|
||||
};
|
||||
|
||||
@@ -143,9 +143,8 @@ export const useForm = (props: ANY_OBJECT, formRef: Ref<FormInstance> | null = n
|
||||
}
|
||||
};
|
||||
const getWidgetVisible = widget => {
|
||||
const formWidgetAuth: ANY_OBJECT | null = formAuth.value
|
||||
? formAuth.value.pc[widget.variableName]
|
||||
: null;
|
||||
const formWidgetAuth: ANY_OBJECT | null =
|
||||
formAuth.value && formAuth.value.pc ? formAuth.value.pc[widget.variableName] : null;
|
||||
if (formWidgetAuth && formWidgetAuth.hide) return false;
|
||||
return true;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user