|
@@ -31,7 +31,7 @@ import {
|
|
showTaggingsStack,
|
|
showTaggingsStack,
|
|
} from "@/env";
|
|
} from "@/env";
|
|
import { DownOutlined } from "@ant-design/icons-vue";
|
|
import { DownOutlined } from "@ant-design/icons-vue";
|
|
-import { computed, watchEffect } from "vue";
|
|
|
|
|
|
+import { computed, watch, watchEffect } from "vue";
|
|
import { selectPaths } from "@/store";
|
|
import { selectPaths } from "@/store";
|
|
|
|
|
|
const props = defineProps<{ value?: Record<string, boolean> }>();
|
|
const props = defineProps<{ value?: Record<string, boolean> }>();
|
|
@@ -44,17 +44,25 @@ const showOptions = [
|
|
key: "showPath",
|
|
key: "showPath",
|
|
text: "路径",
|
|
text: "路径",
|
|
stack: computed({
|
|
stack: computed({
|
|
- get: () => selectPaths.all.value || selectPaths.selects.value.length > 0,
|
|
|
|
- set: (val: boolean) => (selectPaths.all.value = val),
|
|
|
|
|
|
+ get: () => {
|
|
|
|
+ return selectPaths.all.value || selectPaths.selects.value.length > 0;
|
|
|
|
+ },
|
|
|
|
+ set: (val: boolean) => {
|
|
|
|
+ selectPaths.all.value = val;
|
|
|
|
+ console.log(selectPaths.selects.value);
|
|
|
|
+ },
|
|
}),
|
|
}),
|
|
},
|
|
},
|
|
];
|
|
];
|
|
-watchEffect(() => {
|
|
|
|
- if (!props.value) return;
|
|
|
|
- showOptions.forEach((item) => {
|
|
|
|
- item.stack.value = props.value![item.key];
|
|
|
|
- });
|
|
|
|
-});
|
|
|
|
|
|
+watch(
|
|
|
|
+ () => props.value,
|
|
|
|
+ () => {
|
|
|
|
+ if (!props.value) return;
|
|
|
|
+ showOptions.forEach((item) => {
|
|
|
|
+ item.stack.value = props.value![item.key];
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+);
|
|
|
|
|
|
watchEffect(() => {
|
|
watchEffect(() => {
|
|
emit(
|
|
emit(
|