feat: 同步规则优化

This commit is contained in:
GaoHao
2025-04-11 17:25:02 +08:00
parent 85eba13919
commit 688f30635b
8 changed files with 59 additions and 43 deletions

View File

@@ -200,21 +200,16 @@ let datas = reactive({
remark: "",
images: []
});
console.log(isSyncStatus())
console.log(contentConfig.toolbar)
if (isSyncStatus()) {
if (JSON.stringify(contentConfig.toolbar)?.indexOf("add") != -1) {
// contentConfig.toolbar?.splice(0, 1)
}
if (JSON.stringify(contentConfig.cols[contentConfig.cols.length - 1].operat)?.indexOf("delete") != -1) {
contentConfig.cols[contentConfig.cols.length - 1].operat?.splice(2, 1)
}
contentConfig.toolbar[0].hidden = true
contentConfig.toolbar[1].hidden = false
contentConfig.cols[contentConfig.cols.length - 1].operat[2].hidden = true
} else {
if (JSON.stringify(contentConfig.toolbar)?.indexOf("sync") != -1) {
// contentConfig.toolbar?.splice(1, 1)
}
contentConfig.toolbar[0].hidden = false
contentConfig.toolbar[1].hidden = true
contentConfig.cols[contentConfig.cols.length - 1].operat[2].hidden = false
}
console.log(contentConfig.toolbar)
onMounted(() => {
console.log(route.query);

View File

@@ -120,7 +120,7 @@ const contentConfig: IContentConfig<UserPageQuery> = {
fixed: "right",
width: 280,
templet: "tool",
operat: [{ text: "报损" }, "edit", "delete"],
operat: [{ text: "报损", name: ''}, { text: "编辑", icon: 'edit', name: "edit"}, { text: "删除", icon: 'delete', type: 'danger', name: "delete"}],
},
],
};