fix: bug#10945 修复菜单管理部分bug
This commit is contained in:
parent
478fac0cac
commit
5f5b3e5b41
|
@ -406,12 +406,7 @@ type assetType = {
|
|||
value: string;
|
||||
};
|
||||
|
||||
watch(
|
||||
() => form.data.icon,
|
||||
() => {
|
||||
basicFormRef.value?.validate();
|
||||
},
|
||||
);
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
|
|
@ -95,13 +95,15 @@ const confirm = () => {
|
|||
loading.value = true;
|
||||
formRef.value &&
|
||||
formRef.value.validate().then(() => {
|
||||
const buttons = toRaw(props.menuInfo?.buttons);
|
||||
const buttons = toRaw(props.menuInfo?.buttons) || [];
|
||||
const button = buttons?.find((item) => item.id === form.data.id);
|
||||
if (button) {
|
||||
Object.entries(form.data).forEach(([key, value]) => {
|
||||
button[key] = value;
|
||||
});
|
||||
} else buttons.push({ ...form.data });
|
||||
} else {
|
||||
buttons.push({ ...form.data });
|
||||
}
|
||||
const params = {
|
||||
...props.menuInfo,
|
||||
buttons,
|
||||
|
|
Loading…
Reference in New Issue