cosey 0.6.27 → 0.6.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/horizontal-tree/horizontal-tree.api.d.ts +1 -0
- package/components/horizontal-tree/horizontal-tree.style.js +1 -1
- package/components/horizontal-tree/horizontal-tree.vue.d.ts +4 -1
- package/components/horizontal-tree/horizontal-tree.vue.js +14 -5
- package/components/horizontal-tree/index.d.ts +12 -3
- package/package.json +1 -1
- package/store/layout.js +0 -3
|
@@ -7,6 +7,7 @@ export interface HorizontalTreeProps<INode extends Record<PropertyKey, any> = an
|
|
|
7
7
|
class?: string | ((data: INode[], node: INode) => string);
|
|
8
8
|
};
|
|
9
9
|
nodeKey?: string;
|
|
10
|
+
nodeWidth?: string;
|
|
10
11
|
mergeLast?: boolean;
|
|
11
12
|
showCheckbox?: boolean;
|
|
12
13
|
checkStrictly?: boolean;
|
|
@@ -14,7 +14,10 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
|
|
|
14
14
|
"check-change": (node: any, checked: boolean) => any;
|
|
15
15
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
16
|
"onCheck-change"?: ((node: any, checked: boolean) => any) | undefined;
|
|
17
|
-
}>, {
|
|
17
|
+
}>, {
|
|
18
|
+
mergeLast: boolean;
|
|
19
|
+
nodeWidth: string;
|
|
20
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
21
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
19
22
|
export default _default;
|
|
20
23
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, watch, resolveComponent, createElementBlock, openBlock, normalizeClass, unref, toDisplayString, createCommentVNode, createElementVNode, createVNode, withCtx, createTextVNode, Fragment, renderList, createBlock, renderSlot } from 'vue';
|
|
1
|
+
import { defineComponent, computed, watch, resolveComponent, createElementBlock, openBlock, normalizeStyle, normalizeClass, unref, toDisplayString, createCommentVNode, createElementVNode, createVNode, withCtx, createTextVNode, Fragment, renderList, createBlock, renderSlot } from 'vue';
|
|
2
2
|
import stdin_default$1 from './horizontal-tree.style.js';
|
|
3
3
|
import { useTreeCheck } from '../../hooks/useTreeCheck.js';
|
|
4
4
|
import { mapTree, extraTreeToTable, walkTree } from '../../utils/tree.js';
|
|
@@ -35,9 +35,15 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
35
35
|
type: String,
|
|
36
36
|
required: false
|
|
37
37
|
},
|
|
38
|
+
nodeWidth: {
|
|
39
|
+
type: String,
|
|
40
|
+
required: false,
|
|
41
|
+
default: "120px"
|
|
42
|
+
},
|
|
38
43
|
mergeLast: {
|
|
39
44
|
type: Boolean,
|
|
40
|
-
required: false
|
|
45
|
+
required: false,
|
|
46
|
+
default: true
|
|
41
47
|
},
|
|
42
48
|
showCheckbox: {
|
|
43
49
|
type: Boolean,
|
|
@@ -187,7 +193,10 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
187
193
|
return (_ctx, _cache) => {
|
|
188
194
|
const _component_el_checkbox = resolveComponent("el-checkbox");
|
|
189
195
|
return openBlock(), createElementBlock("div", {
|
|
190
|
-
class: normalizeClass([unref(hashId), unref(prefixCls)])
|
|
196
|
+
class: normalizeClass([unref(hashId), unref(prefixCls)]),
|
|
197
|
+
style: normalizeStyle({
|
|
198
|
+
"--node-width": _ctx.nodeWidth
|
|
199
|
+
})
|
|
191
200
|
}, [tableTree.value.length === 0 ? (openBlock(), createElementBlock("div", {
|
|
192
201
|
key: 0,
|
|
193
202
|
class: normalizeClass(`${unref(prefixCls)}-empty`)
|
|
@@ -266,8 +275,8 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
266
275
|
}), 128
|
|
267
276
|
/* KEYED_FRAGMENT */))]);
|
|
268
277
|
}), 128
|
|
269
|
-
/* KEYED_FRAGMENT */))])]))],
|
|
270
|
-
/* CLASS */);
|
|
278
|
+
/* KEYED_FRAGMENT */))])]))], 6
|
|
279
|
+
/* CLASS, STYLE */);
|
|
271
280
|
};
|
|
272
281
|
}
|
|
273
282
|
});
|
|
@@ -13,7 +13,10 @@ declare const _HorizontalTree: {
|
|
|
13
13
|
getNode: (key: string | number) => any;
|
|
14
14
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
15
15
|
"check-change": (node: any, checked: boolean) => any;
|
|
16
|
-
}, import("vue").PublicProps, {
|
|
16
|
+
}, import("vue").PublicProps, {
|
|
17
|
+
mergeLast: boolean;
|
|
18
|
+
nodeWidth: string;
|
|
19
|
+
}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
17
20
|
P: {};
|
|
18
21
|
B: {};
|
|
19
22
|
D: {};
|
|
@@ -31,7 +34,10 @@ declare const _HorizontalTree: {
|
|
|
31
34
|
getHalfCheckedNodes: () => any[];
|
|
32
35
|
getHalfCheckedKeys: () => (string | number)[];
|
|
33
36
|
getNode: (key: string | number) => any;
|
|
34
|
-
}, {}, {}, {}, {
|
|
37
|
+
}, {}, {}, {}, {
|
|
38
|
+
mergeLast: boolean;
|
|
39
|
+
nodeWidth: string;
|
|
40
|
+
}>;
|
|
35
41
|
__isFragment?: never;
|
|
36
42
|
__isTeleport?: never;
|
|
37
43
|
__isSuspense?: never;
|
|
@@ -48,7 +54,10 @@ declare const _HorizontalTree: {
|
|
|
48
54
|
getNode: (key: string | number) => any;
|
|
49
55
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
50
56
|
"check-change": (node: any, checked: boolean) => any;
|
|
51
|
-
}, string, {
|
|
57
|
+
}, string, {
|
|
58
|
+
mergeLast: boolean;
|
|
59
|
+
nodeWidth: string;
|
|
60
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
52
61
|
$slots: import("./horizontal-tree.api").HorizontalTreeSlots<any>;
|
|
53
62
|
}) & import("vue").Plugin;
|
|
54
63
|
export { _HorizontalTree as HorizontalTree };
|
package/package.json
CHANGED
package/store/layout.js
CHANGED
|
@@ -42,9 +42,6 @@ const useLayoutStore = defineStore(
|
|
|
42
42
|
const menus = computed(() => {
|
|
43
43
|
return getMenus([...getAllStaticRoutes(), ...userStore.dynamicRoutes]);
|
|
44
44
|
});
|
|
45
|
-
watch(menus, () => {
|
|
46
|
-
console.log("watch menus", menus.value);
|
|
47
|
-
});
|
|
48
45
|
const menusMap = computed(() => getMenusMap(menus.value));
|
|
49
46
|
const firstLevelMenus = menus;
|
|
50
47
|
const firstLevelActive = ref("");
|