@fangzhongya/fang-ui 0.1.11 → 0.1.13
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-div/src/index2.cjs +21 -3
- package/dist/components/forms-div/src/index2.js +21 -3
- package/dist/components/index.scss +1 -0
- package/dist/components/index2.scss +1 -0
- package/dist/hooks/props-default/index.cjs +12 -8
- package/dist/hooks/props-default/index.js +12 -8
- package/dist/icons/index.json +1 -1
- package/package.json +7 -7
- /package/dist/components/{forms-item → forms-items}/index.css +0 -0
- /package/dist/components/{keep-com → global-config}/index.css +0 -0
- /package/dist/css/{forms-item.css → forms-items.css} +0 -0
- /package/dist/css/{keep-com.css → global-config.css} +0 -0
|
@@ -49,15 +49,24 @@ const _sfc_main = vue.defineComponent({
|
|
|
49
49
|
v = prs.valueobj ?? {};
|
|
50
50
|
}
|
|
51
51
|
const prop = props.prop;
|
|
52
|
+
let r = v;
|
|
52
53
|
if (prop) {
|
|
53
54
|
let z = v[prop];
|
|
54
55
|
if (props.pars) {
|
|
55
56
|
z = objValue.getObjValue(prop, v);
|
|
56
57
|
}
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
|
|
58
|
+
r = z;
|
|
59
|
+
}
|
|
60
|
+
if (props.computed) {
|
|
61
|
+
if (props.computed instanceof Array) {
|
|
62
|
+
r = props.computed.map((k) => {
|
|
63
|
+
return v[k];
|
|
64
|
+
});
|
|
65
|
+
} else if (props.computed.get) {
|
|
66
|
+
r = props.computed.get(r, v, props);
|
|
67
|
+
}
|
|
60
68
|
}
|
|
69
|
+
return r;
|
|
61
70
|
},
|
|
62
71
|
set(value2) {
|
|
63
72
|
let v = prs.modelValue ?? {};
|
|
@@ -72,6 +81,15 @@ const _sfc_main = vue.defineComponent({
|
|
|
72
81
|
v[prop] = value2;
|
|
73
82
|
}
|
|
74
83
|
}
|
|
84
|
+
if (props.computed) {
|
|
85
|
+
if (props.computed instanceof Array) {
|
|
86
|
+
props.computed.forEach((k) => {
|
|
87
|
+
v[k] = value2 ? value2[k] : "";
|
|
88
|
+
});
|
|
89
|
+
} else if (props.computed.set) {
|
|
90
|
+
props.computed.set(value2, v, props);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
75
93
|
if (!props.orig) {
|
|
76
94
|
emit("update:modelValue", v);
|
|
77
95
|
}
|
|
@@ -47,15 +47,24 @@ const _sfc_main = defineComponent({
|
|
|
47
47
|
v = prs.valueobj ?? {};
|
|
48
48
|
}
|
|
49
49
|
const prop = props.prop;
|
|
50
|
+
let r = v;
|
|
50
51
|
if (prop) {
|
|
51
52
|
let z = v[prop];
|
|
52
53
|
if (props.pars) {
|
|
53
54
|
z = getObjValue(prop, v);
|
|
54
55
|
}
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
56
|
+
r = z;
|
|
57
|
+
}
|
|
58
|
+
if (props.computed) {
|
|
59
|
+
if (props.computed instanceof Array) {
|
|
60
|
+
r = props.computed.map((k) => {
|
|
61
|
+
return v[k];
|
|
62
|
+
});
|
|
63
|
+
} else if (props.computed.get) {
|
|
64
|
+
r = props.computed.get(r, v, props);
|
|
65
|
+
}
|
|
58
66
|
}
|
|
67
|
+
return r;
|
|
59
68
|
},
|
|
60
69
|
set(value2) {
|
|
61
70
|
let v = prs.modelValue ?? {};
|
|
@@ -70,6 +79,15 @@ const _sfc_main = defineComponent({
|
|
|
70
79
|
v[prop] = value2;
|
|
71
80
|
}
|
|
72
81
|
}
|
|
82
|
+
if (props.computed) {
|
|
83
|
+
if (props.computed instanceof Array) {
|
|
84
|
+
props.computed.forEach((k) => {
|
|
85
|
+
v[k] = value2 ? value2[k] : "";
|
|
86
|
+
});
|
|
87
|
+
} else if (props.computed.set) {
|
|
88
|
+
props.computed.set(value2, v, props);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
73
91
|
if (!props.orig) {
|
|
74
92
|
emit("update:modelValue", v);
|
|
75
93
|
}
|
|
@@ -104,6 +104,7 @@
|
|
|
104
104
|
@use './inputs/index.scss' as *;
|
|
105
105
|
@use './labels/index.scss' as *;
|
|
106
106
|
@use './select-scroll/index.scss' as *;
|
|
107
|
+
@use './selector/index.scss' as *;
|
|
107
108
|
@use './selects/index.scss' as *;
|
|
108
109
|
@use './sliders/index.scss' as *;
|
|
109
110
|
@use './switchs/index.scss' as *;
|
|
@@ -104,6 +104,7 @@
|
|
|
104
104
|
@use './inputs/style/index2.scss' as *;
|
|
105
105
|
@use './labels/style/index2.scss' as *;
|
|
106
106
|
@use './select-scroll/style/index2.scss' as *;
|
|
107
|
+
@use './selector/style/index2.scss' as *;
|
|
107
108
|
@use './selects/style/index2.scss' as *;
|
|
108
109
|
@use './sliders/style/index2.scss' as *;
|
|
109
110
|
@use './switchs/style/index2.scss' as *;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const index = require("../global-config/index.cjs");
|
|
4
|
+
const hasOwn = require("@fangzhongya/utils/basic/object/hasOwn");
|
|
4
5
|
function getProps(props) {
|
|
5
6
|
if (!index.useGlobalConfig("isPropsConfig").value) {
|
|
6
7
|
return props;
|
|
@@ -20,14 +21,17 @@ function getProps(props) {
|
|
|
20
21
|
function usePropsDefault(key, props, dataProps = {}, keyObj) {
|
|
21
22
|
if (!index.useGlobalConfig("isPropsConfig").value) {
|
|
22
23
|
if (keyObj) {
|
|
23
|
-
|
|
24
|
-
if (keys.length > 0) {
|
|
24
|
+
if (Object.keys(keyObj).length > 0) {
|
|
25
25
|
return new Proxy(props, {
|
|
26
26
|
get(_target, k) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
if (
|
|
30
|
-
|
|
27
|
+
const v = _target[k];
|
|
28
|
+
if (v === void 0) {
|
|
29
|
+
if (typeof k === "string" && hasOwn.hasOwn(keyObj, k)) {
|
|
30
|
+
if (typeof keyObj[k] === "function") {
|
|
31
|
+
return keyObj[k]();
|
|
32
|
+
} else {
|
|
33
|
+
return keyObj[k];
|
|
34
|
+
}
|
|
31
35
|
}
|
|
32
36
|
return v;
|
|
33
37
|
}
|
|
@@ -44,14 +48,14 @@ function usePropsDefault(key, props, dataProps = {}, keyObj) {
|
|
|
44
48
|
var _a;
|
|
45
49
|
const v = value[k] ?? index.useGlobalConfig(k).value;
|
|
46
50
|
if (v === void 0) {
|
|
47
|
-
if (keyObj && keyObj
|
|
51
|
+
if (keyObj && hasOwn.hasOwn(keyObj, k)) {
|
|
48
52
|
if (typeof keyObj[k] === "function") {
|
|
49
53
|
return keyObj[k]();
|
|
50
54
|
} else {
|
|
51
55
|
return keyObj[k];
|
|
52
56
|
}
|
|
53
57
|
}
|
|
54
|
-
if (dataProps
|
|
58
|
+
if (hasOwn.hasOwn(dataProps, k)) {
|
|
55
59
|
const d = dataProps[k]["default"];
|
|
56
60
|
if (d !== void 0) {
|
|
57
61
|
if (typeof ((_a = dataProps[k]) == null ? void 0 : _a.type()) === "function") {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useGlobalConfig } from "../global-config/index.js";
|
|
2
|
+
import { hasOwn } from "@fangzhongya/utils/basic/object/hasOwn";
|
|
2
3
|
function getProps(props) {
|
|
3
4
|
if (!useGlobalConfig("isPropsConfig").value) {
|
|
4
5
|
return props;
|
|
@@ -18,14 +19,17 @@ function getProps(props) {
|
|
|
18
19
|
function usePropsDefault(key, props, dataProps = {}, keyObj) {
|
|
19
20
|
if (!useGlobalConfig("isPropsConfig").value) {
|
|
20
21
|
if (keyObj) {
|
|
21
|
-
|
|
22
|
-
if (keys.length > 0) {
|
|
22
|
+
if (Object.keys(keyObj).length > 0) {
|
|
23
23
|
return new Proxy(props, {
|
|
24
24
|
get(_target, k) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
if (
|
|
28
|
-
|
|
25
|
+
const v = _target[k];
|
|
26
|
+
if (v === void 0) {
|
|
27
|
+
if (typeof k === "string" && hasOwn(keyObj, k)) {
|
|
28
|
+
if (typeof keyObj[k] === "function") {
|
|
29
|
+
return keyObj[k]();
|
|
30
|
+
} else {
|
|
31
|
+
return keyObj[k];
|
|
32
|
+
}
|
|
29
33
|
}
|
|
30
34
|
return v;
|
|
31
35
|
}
|
|
@@ -42,14 +46,14 @@ function usePropsDefault(key, props, dataProps = {}, keyObj) {
|
|
|
42
46
|
var _a;
|
|
43
47
|
const v = value[k] ?? useGlobalConfig(k).value;
|
|
44
48
|
if (v === void 0) {
|
|
45
|
-
if (keyObj && keyObj
|
|
49
|
+
if (keyObj && hasOwn(keyObj, k)) {
|
|
46
50
|
if (typeof keyObj[k] === "function") {
|
|
47
51
|
return keyObj[k]();
|
|
48
52
|
} else {
|
|
49
53
|
return keyObj[k];
|
|
50
54
|
}
|
|
51
55
|
}
|
|
52
|
-
if (dataProps
|
|
56
|
+
if (hasOwn(dataProps, k)) {
|
|
53
57
|
const d = dataProps[k]["default"];
|
|
54
58
|
if (d !== void 0) {
|
|
55
59
|
if (typeof ((_a = dataProps[k]) == null ? void 0 : _a.type()) === "function") {
|
package/dist/icons/index.json
CHANGED
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.13",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description ": "fang-ui",
|
|
7
7
|
"keywords": [
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"fangui": "bin/fang-ui.js"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@fangzhongya/utils": "0.0.
|
|
27
|
+
"@fangzhongya/utils": "0.0.44"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@fangzhongya/create": "0.2.
|
|
30
|
+
"@fangzhongya/create": "0.2.41",
|
|
31
31
|
"@types/node": "^24.10.0",
|
|
32
32
|
"@vitejs/plugin-vue": "^6.0.1",
|
|
33
33
|
"@vue/shared": "3.5.24",
|
|
@@ -49,14 +49,14 @@
|
|
|
49
49
|
"vue-tsc": "^3.1.3",
|
|
50
50
|
"vuedraggable": "4.1.0",
|
|
51
51
|
"vxe-table": "4.17.12",
|
|
52
|
-
"@fang-ui/hooks": "0.0.1-0",
|
|
53
52
|
"@fang-ui/components": "0.0.1-0",
|
|
54
53
|
"@fang-ui/directives": "0.0.1-0",
|
|
55
|
-
"@fang-ui/locale": "0.0.1-0",
|
|
56
54
|
"@fang-ui/icons": "0.0.1-0",
|
|
55
|
+
"@fang-ui/locale": "0.0.1-0",
|
|
56
|
+
"@fang-ui/hooks": "0.0.1-0",
|
|
57
57
|
"@fang-ui/theme": "0.0.1-0",
|
|
58
|
-
"@fang-ui/
|
|
59
|
-
"@fang-ui/
|
|
58
|
+
"@fang-ui/types": "0.0.1-0",
|
|
59
|
+
"@fang-ui/utils": "0.0.1-0"
|
|
60
60
|
},
|
|
61
61
|
"main": "./dist/index.cjs",
|
|
62
62
|
"module": "./dist/index.js",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|