@fangzhongya/fang-ui 0.1.12 → 0.1.14

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.
@@ -2,6 +2,6 @@
2
2
  * @config cover=true
3
3
  */
4
4
  @use 'element-plus/theme-chalk/src/base.scss' as *;
5
- // @use '../../date-picker-panel/style/index2.scss' as *;
5
+ @use '../../date-picker-panel/style/index2.scss' as *;
6
6
  @use 'element-plus/theme-chalk/src/popper.scss' as *;
7
7
  @use 'element-plus/theme-chalk/src/date-picker.scss' as *;
@@ -20,6 +20,7 @@ const _sfc_main = vue.defineComponent({
20
20
  const prs = index$1.usePropsDefault(data.name, p, data.dataProps);
21
21
  index$1.viewProps(prs, data.name);
22
22
  const props = prs.listobj;
23
+ console.log("props", props);
23
24
  const compons = vue.inject(data$1.provides.compons, {});
24
25
  const formvalue = vue.computed(() => {
25
26
  const o = {};
@@ -49,15 +50,24 @@ const _sfc_main = vue.defineComponent({
49
50
  v = prs.valueobj ?? {};
50
51
  }
51
52
  const prop = props.prop;
53
+ let r = v;
52
54
  if (prop) {
53
55
  let z = v[prop];
54
56
  if (props.pars) {
55
57
  z = objValue.getObjValue(prop, v);
56
58
  }
57
- return z;
58
- } else {
59
- return v;
59
+ r = z;
60
+ }
61
+ if (props.computed) {
62
+ if (props.computed instanceof Array) {
63
+ r = props.computed.map((k) => {
64
+ return v[k];
65
+ });
66
+ } else if (props.computed.get) {
67
+ r = props.computed.get(r, v, props);
68
+ }
60
69
  }
70
+ return r;
61
71
  },
62
72
  set(value2) {
63
73
  let v = prs.modelValue ?? {};
@@ -72,6 +82,19 @@ const _sfc_main = vue.defineComponent({
72
82
  v[prop] = value2;
73
83
  }
74
84
  }
85
+ if (props.computed) {
86
+ if (props.computed instanceof Array) {
87
+ props.computed.forEach((k, i) => {
88
+ if (value2 instanceof Array) {
89
+ v[k] = value2[i];
90
+ } else {
91
+ v[k] = value2 ? value2[k] : void 0;
92
+ }
93
+ });
94
+ } else if (props.computed.set) {
95
+ props.computed.set(value2, v, props);
96
+ }
97
+ }
75
98
  if (!props.orig) {
76
99
  emit("update:modelValue", v);
77
100
  }
@@ -18,6 +18,7 @@ const _sfc_main = defineComponent({
18
18
  const prs = usePropsDefault(name, p, dataProps);
19
19
  viewProps(prs, name);
20
20
  const props = prs.listobj;
21
+ console.log("props", props);
21
22
  const compons = inject(provides.compons, {});
22
23
  const formvalue = computed(() => {
23
24
  const o = {};
@@ -47,15 +48,24 @@ const _sfc_main = defineComponent({
47
48
  v = prs.valueobj ?? {};
48
49
  }
49
50
  const prop = props.prop;
51
+ let r = v;
50
52
  if (prop) {
51
53
  let z = v[prop];
52
54
  if (props.pars) {
53
55
  z = getObjValue(prop, v);
54
56
  }
55
- return z;
56
- } else {
57
- return v;
57
+ r = z;
58
+ }
59
+ if (props.computed) {
60
+ if (props.computed instanceof Array) {
61
+ r = props.computed.map((k) => {
62
+ return v[k];
63
+ });
64
+ } else if (props.computed.get) {
65
+ r = props.computed.get(r, v, props);
66
+ }
58
67
  }
68
+ return r;
59
69
  },
60
70
  set(value2) {
61
71
  let v = prs.modelValue ?? {};
@@ -70,6 +80,19 @@ const _sfc_main = defineComponent({
70
80
  v[prop] = value2;
71
81
  }
72
82
  }
83
+ if (props.computed) {
84
+ if (props.computed instanceof Array) {
85
+ props.computed.forEach((k, i) => {
86
+ if (value2 instanceof Array) {
87
+ v[k] = value2[i];
88
+ } else {
89
+ v[k] = value2 ? value2[k] : void 0;
90
+ }
91
+ });
92
+ } else if (props.computed.set) {
93
+ props.computed.set(value2, v, props);
94
+ }
95
+ }
73
96
  if (!props.orig) {
74
97
  emit("update:modelValue", v);
75
98
  }
@@ -117,5 +117,4 @@
117
117
  @use './tables/index.scss' as *;
118
118
  @use './tablesp/index.scss' as *;
119
119
  @use './tabless/index.scss' as *;
120
- @use './tablesv/index.scss' as *;
121
- @use './tablesvp/index.scss' as *;
120
+ @use './tablesv/index.scss' as *;
@@ -1772,26 +1772,4 @@
1772
1772
  left: 0;
1773
1773
  z-index: 1;
1774
1774
  opacity: 0;
1775
- }
1776
-
1777
- .tablesvp {
1778
- width: 100%;
1779
- height: var(--tablesvp-height);
1780
- display: flex;
1781
- flex-direction: column;
1782
- }
1783
- .tablesvp-main {
1784
- display: flex;
1785
- flex-direction: column;
1786
- flex: 1;
1787
- width: 100%;
1788
- }
1789
- .tablesvp-main.is-radio .el-table__header .el-table-column--selection .el-checkbox {
1790
- display: none;
1791
- }
1792
- .tablesvp-paginat {
1793
- overflow: hidden;
1794
- }
1795
- .tablesvp-paginat .el-pagination {
1796
- justify-content: flex-end;
1797
1775
  }
@@ -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
- const keys = Object.keys(keyObj);
24
- if (keys.length > 0) {
24
+ if (Object.keys(keyObj).length > 0) {
25
25
  return new Proxy(props, {
26
26
  get(_target, k) {
27
- if (typeof k === "string" && keys.includes(k)) {
28
- const v = _target[k];
29
- if (v === void 0) {
30
- return keyObj[k]();
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[k]) {
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[k]) {
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
- const keys = Object.keys(keyObj);
22
- if (keys.length > 0) {
22
+ if (Object.keys(keyObj).length > 0) {
23
23
  return new Proxy(props, {
24
24
  get(_target, k) {
25
- if (typeof k === "string" && keys.includes(k)) {
26
- const v = _target[k];
27
- if (v === void 0) {
28
- return keyObj[k]();
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[k]) {
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[k]) {
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") {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "prefix": "fang-ui",
3
3
  "info": {},
4
- "lastModified": 1762702455773,
4
+ "lastModified": 1762743988142,
5
5
  "icons": {
6
6
  "bar": {
7
7
  "body": " <path fill=\"currentColor\" d=\"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64z\" ></path> "
package/dist/index.css CHANGED
@@ -1772,26 +1772,4 @@
1772
1772
  left: 0;
1773
1773
  z-index: 1;
1774
1774
  opacity: 0;
1775
- }
1776
-
1777
- .tablesvp {
1778
- width: 100%;
1779
- height: var(--tablesvp-height);
1780
- display: flex;
1781
- flex-direction: column;
1782
- }
1783
- .tablesvp-main {
1784
- display: flex;
1785
- flex-direction: column;
1786
- flex: 1;
1787
- width: 100%;
1788
- }
1789
- .tablesvp-main.is-radio .el-table__header .el-table-column--selection .el-checkbox {
1790
- display: none;
1791
- }
1792
- .tablesvp-paginat {
1793
- overflow: hidden;
1794
- }
1795
- .tablesvp-paginat .el-pagination {
1796
- justify-content: flex-end;
1797
1775
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fangzhongya/fang-ui",
3
3
  "private": false,
4
- "version": "0.1.12",
4
+ "version": "0.1.14",
5
5
  "type": "module",
6
6
  "description ": "fang-ui",
7
7
  "keywords": [
@@ -24,7 +24,7 @@
24
24
  "fangui": "bin/fang-ui.js"
25
25
  },
26
26
  "dependencies": {
27
- "@fangzhongya/utils": "0.0.44"
27
+ "@fangzhongya/utils": "0.0.45"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@fangzhongya/create": "0.2.41",
@@ -49,12 +49,12 @@
49
49
  "vue-tsc": "^3.1.3",
50
50
  "vuedraggable": "4.1.0",
51
51
  "vxe-table": "4.17.12",
52
- "@fang-ui/icons": "0.0.1-0",
53
52
  "@fang-ui/components": "0.0.1-0",
53
+ "@fang-ui/directives": "0.0.1-0",
54
+ "@fang-ui/theme": "0.0.1-0",
54
55
  "@fang-ui/hooks": "0.0.1-0",
55
56
  "@fang-ui/locale": "0.0.1-0",
56
- "@fang-ui/theme": "0.0.1-0",
57
- "@fang-ui/directives": "0.0.1-0",
57
+ "@fang-ui/icons": "0.0.1-0",
58
58
  "@fang-ui/types": "0.0.1-0",
59
59
  "@fang-ui/utils": "0.0.1-0"
60
60
  },
File without changes