@fangzhongya/fang-ui 0.1.66 → 0.1.68
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/dist/components/box/src/data.cjs +1 -0
- package/dist/components/box/src/data.d.ts +1 -0
- package/dist/components/box/src/data.js +1 -0
- package/dist/components/box-fun/src/data.cjs +1 -1
- package/dist/components/box-fun/src/data.d.ts +1 -1
- package/dist/components/box-fun/src/data.js +1 -1
- package/dist/components/common/list.cjs +2 -1
- package/dist/components/common/list.d.ts +2 -1
- package/dist/components/common/list.js +2 -1
- package/dist/components/dates/src/data.cjs +2 -1
- package/dist/components/dates/src/data.d.ts +2 -1
- package/dist/components/dates/src/data.js +2 -1
- package/dist/components/dates-divide/src/data.cjs +1 -0
- package/dist/components/dates-divide/src/data.d.ts +1 -0
- package/dist/components/dates-divide/src/data.js +1 -0
- package/dist/components/dates-picker/src/data.cjs +2 -1
- package/dist/components/dates-picker/src/data.d.ts +4 -2
- package/dist/components/dates-picker/src/data.js +2 -1
- package/dist/components/dates2/src/data.cjs +1 -0
- package/dist/components/dates2/src/data.d.ts +1 -0
- package/dist/components/dates2/src/data.js +1 -0
- package/dist/components/dialogs/src/data.cjs +2 -2
- package/dist/components/dialogs/src/data.d.ts +2 -2
- package/dist/components/dialogs/src/data.js +2 -2
- package/dist/components/edit/src/data.cjs +1 -0
- package/dist/components/edit/src/data.d.ts +1 -0
- package/dist/components/edit/src/data.js +1 -0
- package/dist/components/edit-data/src/area/editor2.cjs +13 -1
- package/dist/components/edit-data/src/area/editor2.js +13 -1
- package/dist/components/edit-data/src/data.cjs +8 -0
- package/dist/components/edit-data/src/data.d.ts +16 -0
- package/dist/components/edit-data/src/data.js +8 -0
- package/dist/components/edit-float/src/data.cjs +1 -0
- package/dist/components/edit-float/src/data.d.ts +1 -0
- package/dist/components/edit-float/src/data.js +1 -0
- package/dist/components/forms/src/data.cjs +2 -1
- package/dist/components/forms/src/data.d.ts +2 -1
- package/dist/components/forms/src/data.js +2 -1
- package/dist/components/forms-div/src/data.cjs +1 -0
- package/dist/components/forms-div/src/data.d.ts +1 -0
- package/dist/components/forms-div/src/data.js +1 -0
- package/dist/components/forms-item/src/data.cjs +1 -0
- package/dist/components/forms-item/src/data.d.ts +1 -0
- package/dist/components/forms-item/src/data.js +1 -0
- package/dist/components/forms-items/src/data.cjs +1 -0
- package/dist/components/forms-items/src/data.d.ts +1 -0
- package/dist/components/forms-items/src/data.js +1 -0
- package/dist/components/history/src/data.cjs +1 -0
- package/dist/components/history/src/data.d.ts +1 -0
- package/dist/components/history/src/data.js +1 -0
- package/dist/components/iframe/src/data.cjs +2 -2
- package/dist/components/iframe/src/data.d.ts +2 -2
- package/dist/components/iframe/src/data.js +2 -2
- package/dist/components/input-history/src/data.cjs +1 -0
- package/dist/components/input-history/src/data.d.ts +1 -0
- package/dist/components/input-history/src/data.js +1 -0
- package/dist/components/input-num/src/data.cjs +1 -0
- package/dist/components/input-num/src/data.d.ts +1 -0
- package/dist/components/input-num/src/data.js +1 -0
- package/dist/components/input-select/src/data.cjs +1 -0
- package/dist/components/input-select/src/data.d.ts +1 -0
- package/dist/components/input-select/src/data.js +1 -0
- package/dist/components/inputs/src/data.cjs +2 -1
- package/dist/components/inputs/src/data.d.ts +2 -1
- package/dist/components/inputs/src/data.js +2 -1
- package/dist/components/menus/src/data.cjs +2 -2
- package/dist/components/menus/src/data.d.ts +1 -1
- package/dist/components/menus/src/data.js +2 -2
- package/dist/components/menus/src/index2.cjs +11 -8
- package/dist/components/menus/src/index2.js +9 -6
- package/dist/components/menus/src/util.cjs +16 -7
- package/dist/components/menus/src/util.js +16 -7
- package/dist/components/sliders/src/data.cjs +1 -0
- package/dist/components/sliders/src/data.d.ts +1 -0
- package/dist/components/sliders/src/data.js +1 -0
- package/dist/icons/index.json +1 -1
- package/dist/utils/util.cjs +1 -1
- package/dist/utils/util.js +1 -1
- package/package.json +2 -2
- /package/dist/components/{edit-data → edit-data-add}/index.css +0 -0
- /package/dist/components/{checkbox-button → global-config}/index.css +0 -0
- /package/dist/css/{edit-data.css → edit-data-add.css} +0 -0
- /package/dist/css/{checkbox-button.css → global-config.css} +0 -0
|
@@ -28,6 +28,7 @@ const props = {
|
|
|
28
28
|
},
|
|
29
29
|
/**
|
|
30
30
|
* @props { } modelValue 选择值v-model
|
|
31
|
+
* @model
|
|
31
32
|
*/
|
|
32
33
|
modelValue: {
|
|
33
34
|
type: null
|
|
@@ -57,7 +58,7 @@ const props = {
|
|
|
57
58
|
type: Boolean
|
|
58
59
|
},
|
|
59
60
|
/**
|
|
60
|
-
* @props { } default 值为是undefined时使用默认值据
|
|
61
|
+
* @props { } default 默认值据 值为是undefined时使用默认值据
|
|
61
62
|
*/
|
|
62
63
|
default: {
|
|
63
64
|
type: null
|
|
@@ -42,6 +42,7 @@ export declare const props: {
|
|
|
42
42
|
};
|
|
43
43
|
/**
|
|
44
44
|
* @props { } modelValue 选择值v-model
|
|
45
|
+
* @model
|
|
45
46
|
*/
|
|
46
47
|
modelValue: {
|
|
47
48
|
type: null;
|
|
@@ -71,7 +72,7 @@ export declare const props: {
|
|
|
71
72
|
type: BooleanConstructor;
|
|
72
73
|
};
|
|
73
74
|
/**
|
|
74
|
-
* @props { } default 值为是undefined时使用默认值据
|
|
75
|
+
* @props { } default 默认值据 值为是undefined时使用默认值据
|
|
75
76
|
*/
|
|
76
77
|
default: {
|
|
77
78
|
type: null;
|
|
@@ -26,6 +26,7 @@ const props = {
|
|
|
26
26
|
},
|
|
27
27
|
/**
|
|
28
28
|
* @props { } modelValue 选择值v-model
|
|
29
|
+
* @model
|
|
29
30
|
*/
|
|
30
31
|
modelValue: {
|
|
31
32
|
type: null
|
|
@@ -55,7 +56,7 @@ const props = {
|
|
|
55
56
|
type: Boolean
|
|
56
57
|
},
|
|
57
58
|
/**
|
|
58
|
-
* @props { } default 值为是undefined时使用默认值据
|
|
59
|
+
* @props { } default 默认值据 值为是undefined时使用默认值据
|
|
59
60
|
*/
|
|
60
61
|
default: {
|
|
61
62
|
type: null
|
|
@@ -6,7 +6,8 @@ import { comHandle, Options } from '../../common/list';
|
|
|
6
6
|
export declare const name = "dates";
|
|
7
7
|
export declare const dataProps: {
|
|
8
8
|
/**
|
|
9
|
-
* @props {String, Number, Date, Array} modelValue
|
|
9
|
+
* @props {String, Number, Date, Array} modelValue 时间数据
|
|
10
|
+
* @model
|
|
10
11
|
*/
|
|
11
12
|
modelValue: {
|
|
12
13
|
type: (DateConstructor | StringConstructor | NumberConstructor | ArrayConstructor)[];
|
|
@@ -19,7 +19,8 @@ export declare const props: {
|
|
|
19
19
|
type: (BooleanConstructor | NumberConstructor)[];
|
|
20
20
|
};
|
|
21
21
|
/**
|
|
22
|
-
* @props {String, Number, Date, Array} modelValue
|
|
22
|
+
* @props {String, Number, Date, Array} modelValue 时间数据
|
|
23
|
+
* @model
|
|
23
24
|
*/
|
|
24
25
|
modelValue: {
|
|
25
26
|
type: (DateConstructor | StringConstructor | NumberConstructor)[];
|
|
@@ -54,7 +55,8 @@ export declare const dataProps: {
|
|
|
54
55
|
type: (BooleanConstructor | NumberConstructor)[];
|
|
55
56
|
};
|
|
56
57
|
/**
|
|
57
|
-
* @props {String, Number, Date, Array} modelValue
|
|
58
|
+
* @props {String, Number, Date, Array} modelValue 时间数据
|
|
59
|
+
* @model
|
|
58
60
|
*/
|
|
59
61
|
modelValue: {
|
|
60
62
|
type: (DateConstructor | StringConstructor | NumberConstructor)[];
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const name = "dialogs";
|
|
4
4
|
const dataProps = {
|
|
5
5
|
/**
|
|
6
|
-
* @props {
|
|
7
|
-
*
|
|
6
|
+
* @props {Boolean} modelValue=false 是否显示
|
|
7
|
+
* @model
|
|
8
8
|
*/
|
|
9
9
|
modelValue: {
|
|
10
10
|
type: Boolean
|
|
@@ -5,8 +5,8 @@ import { ExtractPropTypes } from 'vue';
|
|
|
5
5
|
export declare const name = "dialogs";
|
|
6
6
|
export declare const dataProps: {
|
|
7
7
|
/**
|
|
8
|
-
* @props {
|
|
9
|
-
*
|
|
8
|
+
* @props {Boolean} modelValue=false 是否显示
|
|
9
|
+
* @model
|
|
10
10
|
*/
|
|
11
11
|
modelValue: {
|
|
12
12
|
type: BooleanConstructor;
|
|
@@ -67,7 +67,19 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
67
67
|
} else if (key == 1) {
|
|
68
68
|
submit();
|
|
69
69
|
} else {
|
|
70
|
-
|
|
70
|
+
if (props.isModify) {
|
|
71
|
+
code.value = void 0;
|
|
72
|
+
} else {
|
|
73
|
+
if (props.type == "object") {
|
|
74
|
+
Object.keys(code.value).forEach(
|
|
75
|
+
(key2) => delete code.value[key2]
|
|
76
|
+
);
|
|
77
|
+
} else if (props.type == "array") {
|
|
78
|
+
code.value.length = 0;
|
|
79
|
+
} else {
|
|
80
|
+
code.value = void 0;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
71
83
|
}
|
|
72
84
|
}
|
|
73
85
|
function submit() {
|
|
@@ -65,7 +65,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
65
65
|
} else if (key == 1) {
|
|
66
66
|
submit();
|
|
67
67
|
} else {
|
|
68
|
-
|
|
68
|
+
if (props.isModify) {
|
|
69
|
+
code.value = void 0;
|
|
70
|
+
} else {
|
|
71
|
+
if (props.type == "object") {
|
|
72
|
+
Object.keys(code.value).forEach(
|
|
73
|
+
(key2) => delete code.value[key2]
|
|
74
|
+
);
|
|
75
|
+
} else if (props.type == "array") {
|
|
76
|
+
code.value.length = 0;
|
|
77
|
+
} else {
|
|
78
|
+
code.value = void 0;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
69
81
|
}
|
|
70
82
|
}
|
|
71
83
|
function submit() {
|
|
@@ -11,6 +11,10 @@ const dataProps = buildProps.buildProps({
|
|
|
11
11
|
type: String
|
|
12
12
|
},
|
|
13
13
|
typeObj: { type: [Array, String] },
|
|
14
|
+
/**
|
|
15
|
+
* @props { } modelValue 值
|
|
16
|
+
* @model
|
|
17
|
+
*/
|
|
14
18
|
modelValue: {
|
|
15
19
|
type: null
|
|
16
20
|
},
|
|
@@ -35,6 +39,10 @@ const dataProps = buildProps.buildProps({
|
|
|
35
39
|
type: Boolean,
|
|
36
40
|
default: false
|
|
37
41
|
},
|
|
42
|
+
isModify: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: true
|
|
45
|
+
},
|
|
38
46
|
addable: {
|
|
39
47
|
type: Boolean,
|
|
40
48
|
default: true
|
|
@@ -30,6 +30,10 @@ export declare const dataProps: {
|
|
|
30
30
|
readonly [Symbol.species]: ArrayConstructor;
|
|
31
31
|
})[];
|
|
32
32
|
};
|
|
33
|
+
/**
|
|
34
|
+
* @props { } modelValue 值
|
|
35
|
+
* @model
|
|
36
|
+
*/
|
|
33
37
|
modelValue: {
|
|
34
38
|
type: null;
|
|
35
39
|
};
|
|
@@ -54,6 +58,10 @@ export declare const dataProps: {
|
|
|
54
58
|
type: BooleanConstructor;
|
|
55
59
|
default: boolean;
|
|
56
60
|
};
|
|
61
|
+
isModify: {
|
|
62
|
+
type: BooleanConstructor;
|
|
63
|
+
default: boolean;
|
|
64
|
+
};
|
|
57
65
|
addable: {
|
|
58
66
|
type: BooleanConstructor;
|
|
59
67
|
default: boolean;
|
|
@@ -112,6 +120,10 @@ export declare const dataDataProps: {
|
|
|
112
120
|
readonly [Symbol.species]: ArrayConstructor;
|
|
113
121
|
})[];
|
|
114
122
|
};
|
|
123
|
+
/**
|
|
124
|
+
* @props { } modelValue 值
|
|
125
|
+
* @model
|
|
126
|
+
*/
|
|
115
127
|
modelValue: {
|
|
116
128
|
type: null;
|
|
117
129
|
};
|
|
@@ -136,6 +148,10 @@ export declare const dataDataProps: {
|
|
|
136
148
|
type: BooleanConstructor;
|
|
137
149
|
default: boolean;
|
|
138
150
|
};
|
|
151
|
+
isModify: {
|
|
152
|
+
type: BooleanConstructor;
|
|
153
|
+
default: boolean;
|
|
154
|
+
};
|
|
139
155
|
addable: {
|
|
140
156
|
type: BooleanConstructor;
|
|
141
157
|
default: boolean;
|
|
@@ -9,6 +9,10 @@ const dataProps = buildProps({
|
|
|
9
9
|
type: String
|
|
10
10
|
},
|
|
11
11
|
typeObj: { type: [Array, String] },
|
|
12
|
+
/**
|
|
13
|
+
* @props { } modelValue 值
|
|
14
|
+
* @model
|
|
15
|
+
*/
|
|
12
16
|
modelValue: {
|
|
13
17
|
type: null
|
|
14
18
|
},
|
|
@@ -33,6 +37,10 @@ const dataProps = buildProps({
|
|
|
33
37
|
type: Boolean,
|
|
34
38
|
default: false
|
|
35
39
|
},
|
|
40
|
+
isModify: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: true
|
|
43
|
+
},
|
|
36
44
|
addable: {
|
|
37
45
|
type: Boolean,
|
|
38
46
|
default: true
|
|
@@ -35,8 +35,8 @@ export declare const dataProps: {
|
|
|
35
35
|
type: StringConstructor;
|
|
36
36
|
};
|
|
37
37
|
/**
|
|
38
|
-
* @props { Number } frameborder=0
|
|
39
|
-
*
|
|
38
|
+
* @props { Number } frameborder=0
|
|
39
|
+
* 否显示框架周围的边框 0: 不显示
|
|
40
40
|
*/
|
|
41
41
|
frameborder: {
|
|
42
42
|
type: NumberConstructor;
|
|
@@ -15,8 +15,9 @@ export declare const dataProps: {
|
|
|
15
15
|
type: StringConstructor;
|
|
16
16
|
};
|
|
17
17
|
/**
|
|
18
|
-
* @props { String } modelValue= ( )
|
|
18
|
+
* @props { String, Number } modelValue= ( )
|
|
19
19
|
* 输入框展示数据
|
|
20
|
+
* @model
|
|
20
21
|
*/
|
|
21
22
|
modelValue: {
|
|
22
23
|
type: (StringConstructor | NumberConstructor)[];
|
|
@@ -42,7 +42,7 @@ const dataProps = buildProps.buildProps({
|
|
|
42
42
|
* @props { String } value
|
|
43
43
|
* 当前选中的
|
|
44
44
|
*/
|
|
45
|
-
|
|
45
|
+
modelValue: {
|
|
46
46
|
type: String
|
|
47
47
|
},
|
|
48
48
|
/**
|
|
@@ -56,7 +56,7 @@ const dataProps = buildProps.buildProps({
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
});
|
|
59
|
-
const dataEmits = ["select"];
|
|
59
|
+
const dataEmits = ["select", "update:modelValue"];
|
|
60
60
|
const dataSlot = {
|
|
61
61
|
default: "default"
|
|
62
62
|
};
|
|
@@ -40,7 +40,7 @@ const dataProps = buildProps({
|
|
|
40
40
|
* @props { String } value
|
|
41
41
|
* 当前选中的
|
|
42
42
|
*/
|
|
43
|
-
|
|
43
|
+
modelValue: {
|
|
44
44
|
type: String
|
|
45
45
|
},
|
|
46
46
|
/**
|
|
@@ -54,7 +54,7 @@ const dataProps = buildProps({
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
|
-
const dataEmits = ["select"];
|
|
57
|
+
const dataEmits = ["select", "update:modelValue"];
|
|
58
58
|
const dataSlot = {
|
|
59
59
|
default: "default"
|
|
60
60
|
};
|
|
@@ -3,10 +3,11 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
require("./menu-ll.cjs");
|
|
5
5
|
const data = require("./data.cjs");
|
|
6
|
-
const index$
|
|
6
|
+
const index$4 = require("../../menu/index.cjs");
|
|
7
7
|
const index$2 = require("../../../hooks/cssname/index.cjs");
|
|
8
8
|
const index$1 = require("../../../hooks/inherit/index.cjs");
|
|
9
9
|
const index = require("../../../hooks/props-default/index.cjs");
|
|
10
|
+
const index$3 = require("../../../hooks/model/index.cjs");
|
|
10
11
|
const menuLl_vue_vue_type_script_lang = require("./menu-ll2.cjs");
|
|
11
12
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
12
13
|
__name: "index",
|
|
@@ -18,6 +19,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
18
19
|
const attrs = index$1.useInherit(vue.useAttrs(), data.name);
|
|
19
20
|
const cs = index$2.useCssName(data.name);
|
|
20
21
|
const emit = __emit;
|
|
22
|
+
const value = index$3.useModel(props, emit);
|
|
21
23
|
const slots = vue.useSlots();
|
|
22
24
|
const config = vue.computed(() => {
|
|
23
25
|
return {
|
|
@@ -29,10 +31,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
29
31
|
...props.config
|
|
30
32
|
};
|
|
31
33
|
});
|
|
32
|
-
function getChildrenValue(list,
|
|
34
|
+
function getChildrenValue(list, value2, config2) {
|
|
33
35
|
for (const element of list) {
|
|
34
36
|
const p = config2.prop;
|
|
35
|
-
if (p && element[p] ==
|
|
37
|
+
if (p && element[p] == value2) {
|
|
36
38
|
return element;
|
|
37
39
|
}
|
|
38
40
|
}
|
|
@@ -40,8 +42,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
40
42
|
function getChildren(list, arr, config2) {
|
|
41
43
|
let arrObj = [];
|
|
42
44
|
let listarr = list;
|
|
43
|
-
for (const
|
|
44
|
-
let v = getChildrenValue(listarr,
|
|
45
|
+
for (const value2 of arr) {
|
|
46
|
+
let v = getChildrenValue(listarr, value2, config2);
|
|
45
47
|
if (v) {
|
|
46
48
|
arrObj.push({ ...v });
|
|
47
49
|
const c = config2.children;
|
|
@@ -54,21 +56,22 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
54
56
|
}
|
|
55
57
|
function onSelect(id, arr) {
|
|
56
58
|
let arrObj = getChildren(props.list, arr, config.value);
|
|
59
|
+
value.value = id;
|
|
57
60
|
emit("select", id, arr, arrObj);
|
|
58
61
|
}
|
|
59
62
|
return (_ctx, _cache) => {
|
|
60
63
|
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
61
64
|
class: vue.unref(cs).z()
|
|
62
65
|
}, vue.unref(attrs).root), [
|
|
63
|
-
vue.createVNode(vue.unref(index$
|
|
66
|
+
vue.createVNode(vue.unref(index$4.Menu), vue.mergeProps(vue.unref(attrs).assem, {
|
|
64
67
|
class: vue.unref(cs).z("menu"),
|
|
65
68
|
onSelect,
|
|
66
|
-
"default-active": vue.unref(
|
|
69
|
+
"default-active": vue.unref(value)
|
|
67
70
|
}), {
|
|
68
71
|
default: vue.withCtx(() => [
|
|
69
72
|
vue.createVNode(menuLl_vue_vue_type_script_lang.default, {
|
|
70
73
|
compons: vue.unref(props).compons,
|
|
71
|
-
value: vue.unref(
|
|
74
|
+
value: vue.unref(value),
|
|
72
75
|
list: vue.unref(props).list,
|
|
73
76
|
level: vue.unref(props).level,
|
|
74
77
|
config: config.value
|
|
@@ -5,6 +5,7 @@ import { Menu } from "../../menu/index.js";
|
|
|
5
5
|
import { useCssName } from "../../../hooks/cssname/index.js";
|
|
6
6
|
import { useInherit } from "../../../hooks/inherit/index.js";
|
|
7
7
|
import { usePropsDefault, getProps } from "../../../hooks/props-default/index.js";
|
|
8
|
+
import { useModel } from "../../../hooks/model/index.js";
|
|
8
9
|
import _sfc_main$1 from "./menu-ll2.js";
|
|
9
10
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
11
|
__name: "index",
|
|
@@ -16,6 +17,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
16
17
|
const attrs = useInherit(useAttrs(), name);
|
|
17
18
|
const cs = useCssName(name);
|
|
18
19
|
const emit = __emit;
|
|
20
|
+
const value = useModel(props, emit);
|
|
19
21
|
const slots = useSlots();
|
|
20
22
|
const config = computed(() => {
|
|
21
23
|
return {
|
|
@@ -27,10 +29,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27
29
|
...props.config
|
|
28
30
|
};
|
|
29
31
|
});
|
|
30
|
-
function getChildrenValue(list,
|
|
32
|
+
function getChildrenValue(list, value2, config2) {
|
|
31
33
|
for (const element of list) {
|
|
32
34
|
const p = config2.prop;
|
|
33
|
-
if (p && element[p] ==
|
|
35
|
+
if (p && element[p] == value2) {
|
|
34
36
|
return element;
|
|
35
37
|
}
|
|
36
38
|
}
|
|
@@ -38,8 +40,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
38
40
|
function getChildren(list, arr, config2) {
|
|
39
41
|
let arrObj = [];
|
|
40
42
|
let listarr = list;
|
|
41
|
-
for (const
|
|
42
|
-
let v = getChildrenValue(listarr,
|
|
43
|
+
for (const value2 of arr) {
|
|
44
|
+
let v = getChildrenValue(listarr, value2, config2);
|
|
43
45
|
if (v) {
|
|
44
46
|
arrObj.push({ ...v });
|
|
45
47
|
const c = config2.children;
|
|
@@ -52,6 +54,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
52
54
|
}
|
|
53
55
|
function onSelect(id, arr) {
|
|
54
56
|
let arrObj = getChildren(props.list, arr, config.value);
|
|
57
|
+
value.value = id;
|
|
55
58
|
emit("select", id, arr, arrObj);
|
|
56
59
|
}
|
|
57
60
|
return (_ctx, _cache) => {
|
|
@@ -61,12 +64,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
61
64
|
createVNode(unref(Menu), mergeProps(unref(attrs).assem, {
|
|
62
65
|
class: unref(cs).z("menu"),
|
|
63
66
|
onSelect,
|
|
64
|
-
"default-active": unref(
|
|
67
|
+
"default-active": unref(value)
|
|
65
68
|
}), {
|
|
66
69
|
default: withCtx(() => [
|
|
67
70
|
createVNode(_sfc_main$1, {
|
|
68
71
|
compons: unref(props).compons,
|
|
69
|
-
value: unref(
|
|
72
|
+
value: unref(value),
|
|
70
73
|
list: unref(props).list,
|
|
71
74
|
level: unref(props).level,
|
|
72
75
|
config: config.value
|
|
@@ -5,13 +5,22 @@ const use = require("../../common/use.cjs");
|
|
|
5
5
|
function setLabel(value, obj, props, compons, emit, slots, index) {
|
|
6
6
|
let label = value ?? obj.label ?? "";
|
|
7
7
|
obj.label = label;
|
|
8
|
-
return use.useVNodeComponDom(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
return use.useVNodeComponDom(
|
|
9
|
+
{
|
|
10
|
+
...obj,
|
|
11
|
+
prop: "label"
|
|
12
|
+
},
|
|
13
|
+
obj,
|
|
14
|
+
slots,
|
|
15
|
+
emit,
|
|
16
|
+
{
|
|
17
|
+
// options: {},
|
|
18
|
+
compons,
|
|
19
|
+
index,
|
|
20
|
+
scope: {
|
|
21
|
+
config: props
|
|
22
|
+
}
|
|
14
23
|
}
|
|
15
|
-
|
|
24
|
+
);
|
|
16
25
|
}
|
|
17
26
|
exports.setLabel = setLabel;
|
|
@@ -3,14 +3,23 @@ import { useVNodeComponDom } from "../../common/use.js";
|
|
|
3
3
|
function setLabel(value, obj, props, compons, emit, slots, index) {
|
|
4
4
|
let label = value ?? obj.label ?? "";
|
|
5
5
|
obj.label = label;
|
|
6
|
-
return useVNodeComponDom(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
return useVNodeComponDom(
|
|
7
|
+
{
|
|
8
|
+
...obj,
|
|
9
|
+
prop: "label"
|
|
10
|
+
},
|
|
11
|
+
obj,
|
|
12
|
+
slots,
|
|
13
|
+
emit,
|
|
14
|
+
{
|
|
15
|
+
// options: {},
|
|
16
|
+
compons,
|
|
17
|
+
index,
|
|
18
|
+
scope: {
|
|
19
|
+
config: props
|
|
20
|
+
}
|
|
12
21
|
}
|
|
13
|
-
|
|
22
|
+
);
|
|
14
23
|
}
|
|
15
24
|
export {
|
|
16
25
|
setLabel
|
package/dist/icons/index.json
CHANGED
package/dist/utils/util.cjs
CHANGED
|
@@ -46,7 +46,7 @@ function getNextValue(obj, currentValue) {
|
|
|
46
46
|
if (obj.pars) {
|
|
47
47
|
return objValue.getObjValue(obj.prop, currentValue) ?? obj.default;
|
|
48
48
|
}
|
|
49
|
-
return currentValue[obj.prop] ?? obj.default;
|
|
49
|
+
return (currentValue == null ? void 0 : currentValue[obj.prop]) ?? obj.default;
|
|
50
50
|
}
|
|
51
51
|
function executionMethod(fun, ...arr) {
|
|
52
52
|
var _a;
|
package/dist/utils/util.js
CHANGED
|
@@ -44,7 +44,7 @@ function getNextValue(obj, currentValue) {
|
|
|
44
44
|
if (obj.pars) {
|
|
45
45
|
return getObjValue(obj.prop, currentValue) ?? obj.default;
|
|
46
46
|
}
|
|
47
|
-
return currentValue[obj.prop] ?? obj.default;
|
|
47
|
+
return (currentValue == null ? void 0 : currentValue[obj.prop]) ?? obj.default;
|
|
48
48
|
}
|
|
49
49
|
function executionMethod(fun, ...arr) {
|
|
50
50
|
var _a;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fangzhongya/fang-ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.68",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description ": "fang-ui",
|
|
7
7
|
"keywords": [
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"vue": "^3.5.26",
|
|
51
51
|
"vue-tsc": "^3.2.2",
|
|
52
52
|
"vxe-table": "4.6.20",
|
|
53
|
-
"@fang-ui/hooks": "0.0.1-0",
|
|
54
53
|
"@fang-ui/components": "0.0.1-0",
|
|
55
54
|
"@fang-ui/directives": "0.0.1-0",
|
|
55
|
+
"@fang-ui/hooks": "0.0.1-0",
|
|
56
56
|
"@fang-ui/icons": "0.0.1-0",
|
|
57
57
|
"@fang-ui/locale": "0.0.1-0",
|
|
58
58
|
"@fang-ui/theme": "0.0.1-0",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|