@fangzhongya/fang-ui 0.1.71 → 0.1.73
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/menus/src/index2.cjs +7 -21
- package/dist/components/menus/src/index2.js +7 -21
- package/dist/components/menus/src/menu-ll2.cjs +2 -1
- package/dist/components/menus/src/menu-ll2.js +2 -1
- package/dist/icons/index.json +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/only.cjs +6 -0
- package/dist/utils/only.d.ts +1 -0
- package/dist/utils/only.js +6 -0
- package/package.json +3 -3
- /package/dist/components/{box-fun → box}/index.css +0 -0
- /package/dist/components/{edit-data → edit-data-add}/index.css +0 -0
- /package/dist/components/{draggable → global-config}/index.css +0 -0
- /package/dist/css/{box-fun.css → box.css} +0 -0
- /package/dist/css/{edit-data.css → edit-data-add.css} +0 -0
- /package/dist/css/{draggable.css → global-config.css} +0 -0
|
@@ -7,6 +7,7 @@ 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 getTreeObj = require("@fangzhongya/utils/tree/getTreeObj");
|
|
10
11
|
const index$3 = require("../../../hooks/model/index.cjs");
|
|
11
12
|
const menuLl_vue_vue_type_script_lang = require("./menu-ll2.cjs");
|
|
12
13
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -31,28 +32,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
31
32
|
...props.config
|
|
32
33
|
};
|
|
33
34
|
});
|
|
34
|
-
function getChildrenValue(list, value2, config2) {
|
|
35
|
-
for (const element of list) {
|
|
36
|
-
const p = config2.prop;
|
|
37
|
-
if (p && element[p] == value2) {
|
|
38
|
-
return element;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
35
|
function getChildren(list, arr, config2) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const c = config2.children;
|
|
50
|
-
if (c) {
|
|
51
|
-
listarr = v[c];
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return arrObj;
|
|
36
|
+
const obj = getTreeObj.treeToArray(list, {
|
|
37
|
+
id: config2.prop,
|
|
38
|
+
children: config2.children,
|
|
39
|
+
fid: config2.prop
|
|
40
|
+
}).obj;
|
|
41
|
+
return arr.map((o) => obj[o]);
|
|
56
42
|
}
|
|
57
43
|
function onSelect(id, arr) {
|
|
58
44
|
let arrObj = getChildren(props.list, arr, 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 { treeToArray } from "@fangzhongya/utils/tree/getTreeObj";
|
|
8
9
|
import { useModel } from "../../../hooks/model/index.js";
|
|
9
10
|
import _sfc_main$1 from "./menu-ll2.js";
|
|
10
11
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -29,28 +30,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
29
30
|
...props.config
|
|
30
31
|
};
|
|
31
32
|
});
|
|
32
|
-
function getChildrenValue(list, value2, config2) {
|
|
33
|
-
for (const element of list) {
|
|
34
|
-
const p = config2.prop;
|
|
35
|
-
if (p && element[p] == value2) {
|
|
36
|
-
return element;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
33
|
function getChildren(list, arr, config2) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const c = config2.children;
|
|
48
|
-
if (c) {
|
|
49
|
-
listarr = v[c];
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return arrObj;
|
|
34
|
+
const obj = treeToArray(list, {
|
|
35
|
+
id: config2.prop,
|
|
36
|
+
children: config2.children,
|
|
37
|
+
fid: config2.prop
|
|
38
|
+
}).obj;
|
|
39
|
+
return arr.map((o) => obj[o]);
|
|
54
40
|
}
|
|
55
41
|
function onSelect(id, arr) {
|
|
56
42
|
let arrObj = getChildren(props.list, arr, config.value);
|
|
@@ -8,6 +8,7 @@ const use = require("../../common/use.cjs");
|
|
|
8
8
|
const index$1 = require("../../../hooks/cssname/index.cjs");
|
|
9
9
|
const util = require("./util.cjs");
|
|
10
10
|
const util$1 = require("../../../utils/util.cjs");
|
|
11
|
+
const only = require("../../../utils/only.cjs");
|
|
11
12
|
const index = require("../../../hooks/props-default/index.cjs");
|
|
12
13
|
const name = "menu-li";
|
|
13
14
|
const dataProps = {
|
|
@@ -101,7 +102,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
101
102
|
if (!use.useHide(obj, props.value)) {
|
|
102
103
|
const v = obj[config.prop];
|
|
103
104
|
const c = obj[config.children];
|
|
104
|
-
const i = setIndexValue(v, obj, props.config);
|
|
105
|
+
const i = setIndexValue(v, obj, props.config) || only.getOnly();
|
|
105
106
|
if (c && c.length > 0) {
|
|
106
107
|
arr.push(
|
|
107
108
|
vue.h(
|
|
@@ -6,6 +6,7 @@ import { useHide } from "../../common/use.js";
|
|
|
6
6
|
import { useCssName } from "../../../hooks/cssname/index.js";
|
|
7
7
|
import { setLabel } from "./util.js";
|
|
8
8
|
import { getFathers } from "../../../utils/util.js";
|
|
9
|
+
import { getOnly } from "../../../utils/only.js";
|
|
9
10
|
import { usePropsDefault, getProps } from "../../../hooks/props-default/index.js";
|
|
10
11
|
const name = "menu-li";
|
|
11
12
|
const dataProps = {
|
|
@@ -99,7 +100,7 @@ const _sfc_main = defineComponent({
|
|
|
99
100
|
if (!useHide(obj, props.value)) {
|
|
100
101
|
const v = obj[config.prop];
|
|
101
102
|
const c = obj[config.children];
|
|
102
|
-
const i = setIndexValue(v, obj, props.config);
|
|
103
|
+
const i = setIndexValue(v, obj, props.config) || getOnly();
|
|
103
104
|
if (c && c.length > 0) {
|
|
104
105
|
arr.push(
|
|
105
106
|
h(
|
package/dist/icons/index.json
CHANGED
package/dist/utils/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getOnly(): string;
|
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.73",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description ": "fang-ui",
|
|
7
7
|
"keywords": [
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
"vue-tsc": "^3.2.2",
|
|
53
53
|
"vxe-table": "4.6.20",
|
|
54
54
|
"@fang-ui/components": "0.0.1-0",
|
|
55
|
-
"@fang-ui/icons": "0.0.1-0",
|
|
56
55
|
"@fang-ui/hooks": "0.0.1-0",
|
|
56
|
+
"@fang-ui/icons": "0.0.1-0",
|
|
57
57
|
"@fang-ui/locale": "0.0.1-0",
|
|
58
58
|
"@fang-ui/directives": "0.0.1-0",
|
|
59
|
-
"@fang-ui/types": "0.0.1-0",
|
|
60
59
|
"@fang-ui/theme": "0.0.1-0",
|
|
60
|
+
"@fang-ui/types": "0.0.1-0",
|
|
61
61
|
"@fang-ui/utils": "0.0.1-0"
|
|
62
62
|
},
|
|
63
63
|
"main": "./dist/index.cjs",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|