@fangzhongya/fang-ui 0.1.67 → 0.1.69
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/forms/src/setup.cjs +1 -1
- package/dist/components/forms/src/setup.js +1 -1
- package/dist/components/list/src/index2.cjs +1 -1
- package/dist/components/list/src/index2.js +1 -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/menu-ll2.cjs +1 -1
- package/dist/components/menus/src/menu-ll2.js +1 -1
- package/dist/components/menus/src/util.cjs +17 -7
- package/dist/components/menus/src/util.js +17 -7
- package/dist/components/page/src/index2.cjs +1 -1
- package/dist/components/page/src/index2.js +1 -1
- package/dist/components/tables/src/columns3.cjs +1 -1
- package/dist/components/tables/src/columns3.js +1 -1
- package/dist/components/tableset/common/pagin.d.ts +2 -2
- package/dist/components/tablesv/src/columns3.cjs +1 -1
- package/dist/components/tablesv/src/columns3.js +1 -1
- package/dist/icons/index.json +1 -1
- package/dist/type.d.ts +1 -1
- package/dist/utils/util.cjs +4 -4
- package/dist/utils/util.js +4 -4
- package/package.json +1 -1
- /package/dist/components/{draggable → menu-item}/index.css +0 -0
- /package/dist/css/{draggable.css → menu-item.css} +0 -0
|
@@ -85,7 +85,7 @@ function setUp(props, emit, cs, refForm, getLocale) {
|
|
|
85
85
|
const setListValue = (arr, listobj, callback) => {
|
|
86
86
|
arr == null ? void 0 : arr.forEach((obj) => {
|
|
87
87
|
if (listobj) {
|
|
88
|
-
obj.
|
|
88
|
+
obj.__father = obj.__father ?? listobj;
|
|
89
89
|
}
|
|
90
90
|
if (obj.children) {
|
|
91
91
|
setListValue(obj.children, obj, callback);
|
|
@@ -83,7 +83,7 @@ function setUp(props, emit, cs, refForm, getLocale) {
|
|
|
83
83
|
const setListValue = (arr, listobj, callback) => {
|
|
84
84
|
arr == null ? void 0 : arr.forEach((obj) => {
|
|
85
85
|
if (listobj) {
|
|
86
|
-
obj.
|
|
86
|
+
obj.__father = obj.__father ?? listobj;
|
|
87
87
|
}
|
|
88
88
|
if (obj.children) {
|
|
89
89
|
setListValue(obj.children, obj, callback);
|
|
@@ -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
|
|
@@ -96,7 +96,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
96
96
|
let arr = [];
|
|
97
97
|
arrs == null ? void 0 : arrs.forEach((obj, index2) => {
|
|
98
98
|
if (listobj) {
|
|
99
|
-
obj.
|
|
99
|
+
obj.__father = obj.__father ?? listobj;
|
|
100
100
|
}
|
|
101
101
|
if (!use.useHide(obj, props.value)) {
|
|
102
102
|
const v = obj[config.prop];
|
|
@@ -94,7 +94,7 @@ const _sfc_main = defineComponent({
|
|
|
94
94
|
let arr = [];
|
|
95
95
|
arrs == null ? void 0 : arrs.forEach((obj, index) => {
|
|
96
96
|
if (listobj) {
|
|
97
|
-
obj.
|
|
97
|
+
obj.__father = obj.__father ?? listobj;
|
|
98
98
|
}
|
|
99
99
|
if (!useHide(obj, props.value)) {
|
|
100
100
|
const v = obj[config.prop];
|
|
@@ -5,13 +5,23 @@ 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
|
+
__father: void 0
|
|
13
|
+
},
|
|
14
|
+
obj,
|
|
15
|
+
slots,
|
|
16
|
+
emit,
|
|
17
|
+
{
|
|
18
|
+
// options: {},
|
|
19
|
+
compons,
|
|
20
|
+
index,
|
|
21
|
+
scope: {
|
|
22
|
+
config: props
|
|
23
|
+
}
|
|
14
24
|
}
|
|
15
|
-
|
|
25
|
+
);
|
|
16
26
|
}
|
|
17
27
|
exports.setLabel = setLabel;
|
|
@@ -3,14 +3,24 @@ 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
|
+
__father: void 0
|
|
11
|
+
},
|
|
12
|
+
obj,
|
|
13
|
+
slots,
|
|
14
|
+
emit,
|
|
15
|
+
{
|
|
16
|
+
// options: {},
|
|
17
|
+
compons,
|
|
18
|
+
index,
|
|
19
|
+
scope: {
|
|
20
|
+
config: props
|
|
21
|
+
}
|
|
12
22
|
}
|
|
13
|
-
|
|
23
|
+
);
|
|
14
24
|
}
|
|
15
25
|
export {
|
|
16
26
|
setLabel
|
|
@@ -33,7 +33,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
33
33
|
const filtration = (arr, listobj) => {
|
|
34
34
|
for (const obj of arr) {
|
|
35
35
|
if (listobj) {
|
|
36
|
-
obj.
|
|
36
|
+
obj.__father = obj.__father ?? listobj;
|
|
37
37
|
}
|
|
38
38
|
if (obj.prop) {
|
|
39
39
|
value[obj.prop] = obj;
|
|
@@ -31,7 +31,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
31
31
|
const filtration = (arr, listobj) => {
|
|
32
32
|
for (const obj of arr) {
|
|
33
33
|
if (listobj) {
|
|
34
|
-
obj.
|
|
34
|
+
obj.__father = obj.__father ?? listobj;
|
|
35
35
|
}
|
|
36
36
|
if (obj.prop) {
|
|
37
37
|
value[obj.prop] = obj;
|
|
@@ -6,7 +6,7 @@ function getLists(arrs, emit, props, slots, listobj) {
|
|
|
6
6
|
let arr = [];
|
|
7
7
|
arrs == null ? void 0 : arrs.forEach((obj, index) => {
|
|
8
8
|
if (listobj) {
|
|
9
|
-
obj.
|
|
9
|
+
obj.__father = obj.__father ?? listobj;
|
|
10
10
|
}
|
|
11
11
|
if (!use.useHide(obj, props.value)) {
|
|
12
12
|
if (obj.children && obj.children.length > 0) {
|
|
@@ -4,7 +4,7 @@ function getLists(arrs, emit, props, slots, listobj) {
|
|
|
4
4
|
let arr = [];
|
|
5
5
|
arrs == null ? void 0 : arrs.forEach((obj, index) => {
|
|
6
6
|
if (listobj) {
|
|
7
|
-
obj.
|
|
7
|
+
obj.__father = obj.__father ?? listobj;
|
|
8
8
|
}
|
|
9
9
|
if (!useHide(obj, props.value)) {
|
|
10
10
|
if (obj.children && obj.children.length > 0) {
|
|
@@ -263,7 +263,7 @@ export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit:
|
|
|
263
263
|
config?: ObjAny | undefined;
|
|
264
264
|
events?: ObjAny | undefined;
|
|
265
265
|
children?: /*elided*/ any[] | undefined;
|
|
266
|
-
|
|
266
|
+
__father?: /*elided*/ any | undefined;
|
|
267
267
|
minWidth?: string | number | undefined;
|
|
268
268
|
whole?: boolean | undefined;
|
|
269
269
|
type?: string | undefined;
|
|
@@ -304,7 +304,7 @@ export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit:
|
|
|
304
304
|
config?: ObjAny | undefined;
|
|
305
305
|
events?: ObjAny | undefined;
|
|
306
306
|
children?: /*elided*/ any[] | undefined;
|
|
307
|
-
|
|
307
|
+
__father?: /*elided*/ any | undefined;
|
|
308
308
|
minWidth?: string | number | undefined;
|
|
309
309
|
whole?: boolean | undefined;
|
|
310
310
|
type?: string | undefined;
|
package/dist/icons/index.json
CHANGED
package/dist/type.d.ts
CHANGED
package/dist/utils/util.cjs
CHANGED
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const objValue = require("@fangzhongya/utils/basic/object/objValue");
|
|
4
4
|
const getContent = require("@fangzhongya/utils/basic/string/getContent");
|
|
5
5
|
function getFathers(obj, arr) {
|
|
6
|
-
if (obj.
|
|
7
|
-
arr.unshift(obj.
|
|
8
|
-
getFathers(obj.
|
|
6
|
+
if (obj.__father) {
|
|
7
|
+
arr.unshift(obj.__father);
|
|
8
|
+
getFathers(obj.__father, arr);
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
function getChildrenData(obj, row, is) {
|
|
@@ -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
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { setObjValue, getObjValue } from "@fangzhongya/utils/basic/object/objValue";
|
|
2
2
|
import { getContents } from "@fangzhongya/utils/basic/string/getContent";
|
|
3
3
|
function getFathers(obj, arr) {
|
|
4
|
-
if (obj.
|
|
5
|
-
arr.unshift(obj.
|
|
6
|
-
getFathers(obj.
|
|
4
|
+
if (obj.__father) {
|
|
5
|
+
arr.unshift(obj.__father);
|
|
6
|
+
getFathers(obj.__father, arr);
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
function getChildrenData(obj, row, is) {
|
|
@@ -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
|
File without changes
|
|
File without changes
|