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