@fangzhongya/fang-ui 0.0.60 → 0.0.61

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.
Files changed (77) hide show
  1. package/dist/components/array/src/index2.cjs +10 -12
  2. package/dist/components/array/src/index2.js +10 -12
  3. package/dist/components/box/index.css +2 -1
  4. package/dist/components/box-adjust/index.css +2 -1
  5. package/dist/components/box-adjust/src/data.cjs +2 -3
  6. package/dist/components/box-adjust/src/data.d.ts +1 -2
  7. package/dist/components/box-adjust/src/data.js +2 -3
  8. package/dist/components/box-adjust/src/index2.cjs +27 -22
  9. package/dist/components/box-adjust/src/index2.js +15 -10
  10. package/dist/components/box-local/index.css +2 -1
  11. package/dist/components/box-title/index.css +2 -1
  12. package/dist/components/box-title/index.scss +2 -1
  13. package/dist/components/box-title/src/data.cjs +2 -1
  14. package/dist/components/box-title/src/data.d.ts +1 -0
  15. package/dist/components/box-title/src/data.js +2 -1
  16. package/dist/components/box-title/src/index2.cjs +13 -12
  17. package/dist/components/box-title/src/index2.js +14 -13
  18. package/dist/components/common/use.cjs +16 -0
  19. package/dist/components/common/use.d.ts +3 -0
  20. package/dist/components/common/use.js +16 -0
  21. package/dist/components/dialogs/src/index2.cjs +8 -9
  22. package/dist/components/dialogs/src/index2.js +8 -9
  23. package/dist/components/edit/src/data.cjs +1 -0
  24. package/dist/components/edit/src/data.d.ts +1 -0
  25. package/dist/components/edit/src/data.js +1 -0
  26. package/dist/components/edit/src/index2.cjs +10 -3
  27. package/dist/components/edit/src/index2.js +10 -3
  28. package/dist/components/edit-float/index.css +1 -2
  29. package/dist/components/edit-float/index.scss +1 -2
  30. package/dist/components/edit-float/src/data.cjs +1 -0
  31. package/dist/components/edit-float/src/data.d.ts +1 -0
  32. package/dist/components/edit-float/src/data.js +1 -0
  33. package/dist/components/edit-float/src/index2.cjs +21 -19
  34. package/dist/components/edit-float/src/index2.js +16 -14
  35. package/dist/components/index.scss +1 -1
  36. package/dist/components/index2.scss +1 -1
  37. package/dist/components/no-data/src/index2.cjs +6 -6
  38. package/dist/components/no-data/src/index2.js +6 -6
  39. package/dist/components/popup/index.css +2 -1
  40. package/dist/components/popup/src/data.cjs +2 -3
  41. package/dist/components/popup/src/data.d.ts +1 -2
  42. package/dist/components/popup/src/data.js +2 -3
  43. package/dist/components/popup/src/index2.cjs +15 -9
  44. package/dist/components/popup/src/index2.js +16 -10
  45. package/dist/components/window/index.css +2 -1
  46. package/dist/components/window/src/data.cjs +2 -3
  47. package/dist/components/window/src/data.d.ts +1 -2
  48. package/dist/components/window/src/data.js +2 -3
  49. package/dist/components/window/src/index2.cjs +15 -9
  50. package/dist/components/window/src/index2.js +15 -9
  51. package/dist/css/box-adjust.css +2 -1
  52. package/dist/css/box-local.css +2 -1
  53. package/dist/css/box-title.css +2 -1
  54. package/dist/css/box.css +2 -1
  55. package/dist/css/edit-float.css +1 -2
  56. package/dist/css/index.css +3 -25
  57. package/dist/css/popup.css +2 -1
  58. package/dist/css/window.css +2 -1
  59. package/dist/directives/drag/index.cjs +3 -2
  60. package/dist/directives/drag/index.js +3 -2
  61. package/dist/hooks/index.cjs +0 -1
  62. package/dist/hooks/index.js +1 -2
  63. package/dist/hooks/locale/index.cjs +5 -45
  64. package/dist/hooks/locale/index.d.ts +0 -9
  65. package/dist/hooks/locale/index.js +5 -45
  66. package/dist/icons/index.css +33 -33
  67. package/dist/icons/index.json +11 -11
  68. package/dist/index.css +3 -25
  69. package/dist/locale/en.cjs +1 -0
  70. package/dist/locale/en.d.ts +1 -0
  71. package/dist/locale/en.js +1 -0
  72. package/dist/locale/zh-cn.cjs +1 -0
  73. package/dist/locale/zh-cn.d.ts +1 -0
  74. package/dist/locale/zh-cn.js +1 -0
  75. package/package.json +7 -7
  76. /package/dist/components/{keep-com → transfer}/index.css +0 -0
  77. /package/dist/css/{keep-com.css → transfer.css} +0 -0
@@ -5,29 +5,27 @@ const data = require("./data.cjs");
5
5
  const index$1 = require("../../../hooks/cssname/index.cjs");
6
6
  const index$2 = require("../../icon/index.cjs");
7
7
  const clear = require("../../../icons/vue/clear.cjs");
8
+ const use = require("../../common/use.cjs");
8
9
  const index = require("../../../hooks/locale/index.cjs");
9
10
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
10
11
  __name: "index",
11
12
  props: data.dataProps,
12
13
  emits: data.dataEmits,
13
14
  setup(__props, { expose: __expose, emit: __emit }) {
14
- const { getLocale, getPropsDefault } = index.useLocale();
15
+ const { getLocale } = index.useLocale();
15
16
  const cs = index$1.useCssName("array");
16
17
  const prs = __props;
17
- const props = getPropsDefault(prs, [
18
- {
19
- prop: "rangeSeparator",
20
- locale: "to"
18
+ const props = use.uesPropsDefault(prs, {
19
+ rangeSeparator() {
20
+ return getLocale("to");
21
21
  },
22
- {
23
- prop: "startPlaceholder",
24
- locale: "began"
22
+ startPlaceholder() {
23
+ return getLocale("began");
25
24
  },
26
- {
27
- prop: "endPlaceholder",
28
- locale: "end"
25
+ endPlaceholder() {
26
+ return getLocale("end");
29
27
  }
30
- ]);
28
+ });
31
29
  const emit = __emit;
32
30
  const refInput = vue.ref();
33
31
  const isfocus = vue.ref(false);
@@ -3,29 +3,27 @@ import { dataExpose, dataSlot, dataEmits, dataProps } from "./data.js";
3
3
  import { useCssName } from "../../../hooks/cssname/index.js";
4
4
  import { Icon } from "../../icon/index.js";
5
5
  import Clear from "../../../icons/vue/clear.js";
6
+ import { uesPropsDefault } from "../../common/use.js";
6
7
  import { useLocale } from "../../../hooks/locale/index.js";
7
8
  const _sfc_main = /* @__PURE__ */ defineComponent({
8
9
  __name: "index",
9
10
  props: dataProps,
10
11
  emits: dataEmits,
11
12
  setup(__props, { expose: __expose, emit: __emit }) {
12
- const { getLocale, getPropsDefault } = useLocale();
13
+ const { getLocale } = useLocale();
13
14
  const cs = useCssName("array");
14
15
  const prs = __props;
15
- const props = getPropsDefault(prs, [
16
- {
17
- prop: "rangeSeparator",
18
- locale: "to"
16
+ const props = uesPropsDefault(prs, {
17
+ rangeSeparator() {
18
+ return getLocale("to");
19
19
  },
20
- {
21
- prop: "startPlaceholder",
22
- locale: "began"
20
+ startPlaceholder() {
21
+ return getLocale("began");
23
22
  },
24
- {
25
- prop: "endPlaceholder",
26
- locale: "end"
23
+ endPlaceholder() {
24
+ return getLocale("end");
27
25
  }
28
- ]);
26
+ });
29
27
  const emit = __emit;
30
28
  const refInput = ref();
31
29
  const isfocus = ref(false);
@@ -38,14 +38,15 @@
38
38
  .box-title-close {
39
39
  right: 10px;
40
40
  font-size: 18px;
41
+ height: 100%;
41
42
  display: flex;
42
43
  align-items: center;
44
+ cursor: pointer;
43
45
  }
44
46
  .box-title-close-icon {
45
47
  width: 20px;
46
48
  height: 20px;
47
49
  margin: 0 4px;
48
- cursor: pointer;
49
50
  }
50
51
 
51
52
  .box {
@@ -38,14 +38,15 @@
38
38
  .box-title-close {
39
39
  right: 10px;
40
40
  font-size: 18px;
41
+ height: 100%;
41
42
  display: flex;
42
43
  align-items: center;
44
+ cursor: pointer;
43
45
  }
44
46
  .box-title-close-icon {
45
47
  width: 20px;
46
48
  height: 20px;
47
49
  margin: 0 4px;
48
- cursor: pointer;
49
50
  }
50
51
 
51
52
  .box-adjust {
@@ -5,12 +5,11 @@ const data = require("../../box/src/data.cjs");
5
5
  const dataProps = buildProps.buildProps({
6
6
  ...data.dataProps,
7
7
  /**
8
- * @props { String, Boolean } drag='.com-title-name' ( )
8
+ * @props { String, Boolean } drag='.box-title-name' ( )
9
9
  * 可拖拽的元素样式
10
10
  */
11
11
  drag: {
12
- type: [String, Boolean],
13
- default: ".com-title-name"
12
+ type: [String, Boolean]
14
13
  },
15
14
  /**
16
15
  * @props { Boolean } often= ( )
@@ -2,12 +2,11 @@ import { ExtractPublicPropTypes } from 'vue';
2
2
  import { FunctConfig } from '../../../utils/enums';
3
3
  export declare const dataProps: {
4
4
  /**
5
- * @props { String, Boolean } drag='.com-title-name' ( )
5
+ * @props { String, Boolean } drag='.box-title-name' ( )
6
6
  * 可拖拽的元素样式
7
7
  */
8
8
  drag: {
9
9
  type: (BooleanConstructor | StringConstructor)[];
10
- default: string;
11
10
  };
12
11
  /**
13
12
  * @props { Boolean } often= ( )
@@ -3,12 +3,11 @@ import { dataProps as dataProps$1, dataEmits as dataEmits$1, dataSlot as dataSlo
3
3
  const dataProps = buildProps({
4
4
  ...dataProps$1,
5
5
  /**
6
- * @props { String, Boolean } drag='.com-title-name' ( )
6
+ * @props { String, Boolean } drag='.box-title-name' ( )
7
7
  * 可拖拽的元素样式
8
8
  */
9
9
  drag: {
10
- type: [String, Boolean],
11
- default: ".com-title-name"
10
+ type: [String, Boolean]
12
11
  },
13
12
  /**
14
13
  * @props { Boolean } often= ( )
@@ -2,22 +2,27 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
4
  const data = require("./data.cjs");
5
- const index$1 = require("../../../hooks/cssname/index.cjs");
6
- const index = require("../../../hooks/locale/index.cjs");
7
- const index$4 = require("../../box-title/index.cjs");
8
- const index$3 = require("../../box-mask/index.cjs");
9
- const index$2 = require("../../box-teleport/index.cjs");
10
- const index$6 = require("../../../directives/adjust/index.cjs");
11
- const index$5 = require("../../../directives/drag/index.cjs");
5
+ const index = require("../../../hooks/cssname/index.cjs");
6
+ require("../../../hooks/locale/index.cjs");
7
+ const index$3 = require("../../box-title/index.cjs");
8
+ const index$2 = require("../../box-mask/index.cjs");
9
+ const index$1 = require("../../box-teleport/index.cjs");
10
+ const index$5 = require("../../../directives/adjust/index.cjs");
11
+ const index$4 = require("../../../directives/drag/index.cjs");
12
+ const use = require("../../common/use.cjs");
12
13
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
13
14
  __name: "index",
14
15
  props: data.dataProps,
15
16
  emits: data.dataEmits,
16
17
  setup(__props, { expose: __expose, emit: __emit }) {
17
18
  const isInit = vue.shallowRef(false);
18
- const { getLocale } = index.useLocale();
19
- const cs = index$1.useCssName("box-adjust");
20
- const props = __props;
19
+ const cs = index.useCssName("box-adjust");
20
+ const prs = __props;
21
+ const props = use.uesPropsDefault(prs, {
22
+ drag() {
23
+ return "." + cs.name + "box-title-name";
24
+ }
25
+ });
21
26
  const emit = __emit;
22
27
  vue.watch(
23
28
  () => props.modelValue,
@@ -36,26 +41,26 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
36
41
  ...data.dataExpose
37
42
  });
38
43
  return (_ctx, _cache) => {
39
- return vue.openBlock(), vue.createBlock(vue.unref(index$2.BoxTeleport), {
40
- disabled: props.disabled,
41
- to: props.to
44
+ return vue.openBlock(), vue.createBlock(vue.unref(index$1.BoxTeleport), {
45
+ disabled: vue.unref(props).disabled,
46
+ to: vue.unref(props).to
42
47
  }, {
43
48
  default: vue.withCtx(() => [
44
49
  isInit.value ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
45
50
  key: 0,
46
51
  class: vue.normalizeClass(vue.unref(cs).z())
47
52
  }, [
48
- vue.createVNode(vue.unref(index$3.BoxMask), {
53
+ vue.createVNode(vue.unref(index$2.BoxMask), {
49
54
  onClick: onClose,
50
- cssprefix: props.cssprefix || vue.unref(cs).z()
55
+ cssprefix: vue.unref(props).cssprefix || vue.unref(cs).z()
51
56
  }, null, 8, ["cssprefix"]),
52
57
  vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
53
58
  class: vue.normalizeClass(vue.unref(cs).z("body"))
54
59
  }, [
55
60
  vue.renderSlot(_ctx.$slots, vue.unref(data.dataSlot).title, {}, () => [
56
- vue.createVNode(vue.unref(index$4.BoxTitle), {
61
+ vue.createVNode(vue.unref(index$3.BoxTitle), {
57
62
  onClose,
58
- title: props.title
63
+ title: vue.unref(props).title
59
64
  }, null, 8, ["title"])
60
65
  ]),
61
66
  vue.createElementVNode("div", {
@@ -65,16 +70,16 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
65
70
  ], 2),
66
71
  vue.renderSlot(_ctx.$slots, vue.unref(data.dataSlot).footer)
67
72
  ], 2)), [
68
- [vue.unref(index$5.default), {
69
- dom: props.drag
73
+ [vue.unref(index$4.default), {
74
+ dom: vue.unref(props).drag
70
75
  }],
71
- [vue.unref(index$6.default), {
72
- often: props.often,
76
+ [vue.unref(index$5.default), {
77
+ often: vue.unref(props).often,
73
78
  all: { position: true }
74
79
  }]
75
80
  ])
76
81
  ], 2)), [
77
- [vue.vShow, props.modelValue]
82
+ [vue.vShow, vue.unref(props).modelValue]
78
83
  ]) : vue.createCommentVNode("", true)
79
84
  ]),
80
85
  _: 3
@@ -1,21 +1,26 @@
1
1
  import { defineComponent, shallowRef, watch, createBlock, openBlock, unref, withCtx, withDirectives, createCommentVNode, createElementBlock, normalizeClass, createVNode, renderSlot, createElementVNode, vShow } from "vue";
2
2
  import { dataExpose, dataSlot, dataEmits, dataProps } from "./data.js";
3
3
  import { useCssName } from "../../../hooks/cssname/index.js";
4
- import { useLocale } from "../../../hooks/locale/index.js";
4
+ import "../../../hooks/locale/index.js";
5
5
  import { BoxTitle } from "../../box-title/index.js";
6
6
  import { BoxMask } from "../../box-mask/index.js";
7
7
  import { BoxTeleport } from "../../box-teleport/index.js";
8
8
  import vAdjust from "../../../directives/adjust/index.js";
9
9
  import vDrag from "../../../directives/drag/index.js";
10
+ import { uesPropsDefault } from "../../common/use.js";
10
11
  const _sfc_main = /* @__PURE__ */ defineComponent({
11
12
  __name: "index",
12
13
  props: dataProps,
13
14
  emits: dataEmits,
14
15
  setup(__props, { expose: __expose, emit: __emit }) {
15
16
  const isInit = shallowRef(false);
16
- const { getLocale } = useLocale();
17
17
  const cs = useCssName("box-adjust");
18
- const props = __props;
18
+ const prs = __props;
19
+ const props = uesPropsDefault(prs, {
20
+ drag() {
21
+ return "." + cs.name + "box-title-name";
22
+ }
23
+ });
19
24
  const emit = __emit;
20
25
  watch(
21
26
  () => props.modelValue,
@@ -35,8 +40,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
35
40
  });
36
41
  return (_ctx, _cache) => {
37
42
  return openBlock(), createBlock(unref(BoxTeleport), {
38
- disabled: props.disabled,
39
- to: props.to
43
+ disabled: unref(props).disabled,
44
+ to: unref(props).to
40
45
  }, {
41
46
  default: withCtx(() => [
42
47
  isInit.value ? withDirectives((openBlock(), createElementBlock("div", {
@@ -45,7 +50,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
45
50
  }, [
46
51
  createVNode(unref(BoxMask), {
47
52
  onClick: onClose,
48
- cssprefix: props.cssprefix || unref(cs).z()
53
+ cssprefix: unref(props).cssprefix || unref(cs).z()
49
54
  }, null, 8, ["cssprefix"]),
50
55
  withDirectives((openBlock(), createElementBlock("div", {
51
56
  class: normalizeClass(unref(cs).z("body"))
@@ -53,7 +58,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
53
58
  renderSlot(_ctx.$slots, unref(dataSlot).title, {}, () => [
54
59
  createVNode(unref(BoxTitle), {
55
60
  onClose,
56
- title: props.title
61
+ title: unref(props).title
57
62
  }, null, 8, ["title"])
58
63
  ]),
59
64
  createElementVNode("div", {
@@ -64,15 +69,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
64
69
  renderSlot(_ctx.$slots, unref(dataSlot).footer)
65
70
  ], 2)), [
66
71
  [unref(vDrag), {
67
- dom: props.drag
72
+ dom: unref(props).drag
68
73
  }],
69
74
  [unref(vAdjust), {
70
- often: props.often,
75
+ often: unref(props).often,
71
76
  all: { position: true }
72
77
  }]
73
78
  ])
74
79
  ], 2)), [
75
- [vShow, props.modelValue]
80
+ [vShow, unref(props).modelValue]
76
81
  ]) : createCommentVNode("", true)
77
82
  ]),
78
83
  _: 3
@@ -38,14 +38,15 @@
38
38
  .box-title-close {
39
39
  right: 10px;
40
40
  font-size: 18px;
41
+ height: 100%;
41
42
  display: flex;
42
43
  align-items: center;
44
+ cursor: pointer;
43
45
  }
44
46
  .box-title-close-icon {
45
47
  width: 20px;
46
48
  height: 20px;
47
49
  margin: 0 4px;
48
- cursor: pointer;
49
50
  }
50
51
 
51
52
  .box {
@@ -26,12 +26,13 @@
26
26
  .box-title-close {
27
27
  right: 10px;
28
28
  font-size: 18px;
29
+ height: 100%;
29
30
  display: flex;
30
31
  align-items: center;
32
+ cursor: pointer;
31
33
  }
32
34
  .box-title-close-icon {
33
35
  width: 20px;
34
36
  height: 20px;
35
37
  margin: 0 4px;
36
- cursor: pointer;
37
38
  }
@@ -15,13 +15,14 @@ $box-title: 'box-title';
15
15
  &-close {
16
16
  right: 10px;
17
17
  font-size: 18px;
18
+ height: 100%;
18
19
  display: flex;
19
20
  align-items: center;
21
+ cursor: pointer;
20
22
  &-icon {
21
23
  width: 20px;
22
24
  height: 20px;
23
25
  margin: 0 4px;
24
- cursor: pointer;
25
26
  }
26
27
  }
27
28
  }
@@ -12,7 +12,8 @@ const dataProps = buildProps.buildProps({
12
12
  });
13
13
  const dataEmits = ["close"];
14
14
  const dataSlot = {
15
- default: "default"
15
+ default: "default",
16
+ icon: "icon"
16
17
  };
17
18
  const dataExpose = {};
18
19
  exports.dataEmits = dataEmits;
@@ -20,6 +20,7 @@ export type DataEmits = typeof dataEmits;
20
20
  */
21
21
  export declare const dataSlot: {
22
22
  default: string;
23
+ icon: string;
23
24
  };
24
25
  /**
25
26
  */
@@ -10,7 +10,8 @@ const dataProps = buildProps({
10
10
  });
11
11
  const dataEmits = ["close"];
12
12
  const dataSlot = {
13
- default: "default"
13
+ default: "default",
14
+ icon: "icon"
14
15
  };
15
16
  const dataExpose = {};
16
17
  export {
@@ -29,19 +29,20 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
29
29
  class: vue.normalizeClass(vue.unref(cs).z("name"))
30
30
  }, vue.toDisplayString(props.title), 3),
31
31
  vue.createElementVNode("span", {
32
- class: vue.normalizeClass(vue.unref(cs).z("close"))
32
+ class: vue.normalizeClass(vue.unref(cs).z("close")),
33
+ onClick: onClose
33
34
  }, [
34
- vue.renderSlot(_ctx.$slots, "icon"),
35
- vue.createVNode(vue.unref(index$2.Icon), {
36
- onClick: onClose,
37
- class: vue.normalizeClass(vue.unref(cs).z("close-icon")),
38
- title: vue.unref(getLocale)("close")
39
- }, {
40
- default: vue.withCtx(() => [
41
- vue.createVNode(close.default)
42
- ]),
43
- _: 1
44
- }, 8, ["class", "title"])
35
+ vue.renderSlot(_ctx.$slots, vue.unref(data.dataSlot).icon, {}, () => [
36
+ vue.createVNode(vue.unref(index$2.Icon), {
37
+ class: vue.normalizeClass(vue.unref(cs).z("close-icon")),
38
+ title: vue.unref(getLocale)("close")
39
+ }, {
40
+ default: vue.withCtx(() => [
41
+ vue.createVNode(close.default)
42
+ ]),
43
+ _: 1
44
+ }, 8, ["class", "title"])
45
+ ])
45
46
  ], 2)
46
47
  ], 2);
47
48
  };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, createElementBlock, openBlock, normalizeClass, unref, createElementVNode, toDisplayString, renderSlot, createVNode, withCtx } from "vue";
2
- import { dataExpose, dataEmits, dataProps } from "./data.js";
2
+ import { dataExpose, dataSlot, dataEmits, dataProps } from "./data.js";
3
3
  import { Icon } from "../../icon/index.js";
4
4
  import Close from "../../../icons/vue/close.js";
5
5
  import { useCssName } from "../../../hooks/cssname/index.js";
@@ -27,19 +27,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
27
27
  class: normalizeClass(unref(cs).z("name"))
28
28
  }, toDisplayString(props.title), 3),
29
29
  createElementVNode("span", {
30
- class: normalizeClass(unref(cs).z("close"))
30
+ class: normalizeClass(unref(cs).z("close")),
31
+ onClick: onClose
31
32
  }, [
32
- renderSlot(_ctx.$slots, "icon"),
33
- createVNode(unref(Icon), {
34
- onClick: onClose,
35
- class: normalizeClass(unref(cs).z("close-icon")),
36
- title: unref(getLocale)("close")
37
- }, {
38
- default: withCtx(() => [
39
- createVNode(Close)
40
- ]),
41
- _: 1
42
- }, 8, ["class", "title"])
33
+ renderSlot(_ctx.$slots, unref(dataSlot).icon, {}, () => [
34
+ createVNode(unref(Icon), {
35
+ class: normalizeClass(unref(cs).z("close-icon")),
36
+ title: unref(getLocale)("close")
37
+ }, {
38
+ default: withCtx(() => [
39
+ createVNode(Close)
40
+ ]),
41
+ _: 1
42
+ }, 8, ["class", "title"])
43
+ ])
43
44
  ], 2)
44
45
  ], 2);
45
46
  };
@@ -297,10 +297,26 @@ function uesObjComponSelected(obj, props) {
297
297
  });
298
298
  return componSelected;
299
299
  }
300
+ function uesPropsDefault(props, keyObj) {
301
+ const keys = Object.keys(keyObj);
302
+ return new Proxy(props, {
303
+ get(_target, k) {
304
+ if (typeof k === "string" && keys.includes(k)) {
305
+ const v = _target[k];
306
+ if (v === void 0) {
307
+ return keyObj[k]();
308
+ }
309
+ return v;
310
+ }
311
+ return _target[k];
312
+ }
313
+ });
314
+ }
300
315
  exports.getFormRule = getFormRule;
301
316
  exports.getOnObjs = getOnObjs;
302
317
  exports.setFormDefaultValue = setFormDefaultValue;
303
318
  exports.uesObjComponSelected = uesObjComponSelected;
319
+ exports.uesPropsDefault = uesPropsDefault;
304
320
  exports.useGetDomLabel = useGetDomLabel;
305
321
  exports.useGetDomValue = useGetDomValue;
306
322
  exports.useHide = useHide;
@@ -16,4 +16,7 @@ export declare function useSetCompon(obj: ListObj, data: ObjAny, optionss: ObjAn
16
16
  export declare const useGetDomValue: (obj: ListObj, data: ObjAny, options: ObjAny, index?: number) => any;
17
17
  export declare const useGetDomLabel: (label: string | ListObj | undefined, obj: ListObj, data: ObjAny, slots: ObjAny, optionss: ObjAny, compons: Compons, emit: Function, index: number) => any;
18
18
  export declare function uesObjComponSelected(obj: ListObj, props: ObjAny): any;
19
+ export declare function uesPropsDefault(props: any, keyObj: {
20
+ [key: string]: () => any;
21
+ }): any;
19
22
  export {};
@@ -295,11 +295,27 @@ function uesObjComponSelected(obj, props) {
295
295
  });
296
296
  return componSelected;
297
297
  }
298
+ function uesPropsDefault(props, keyObj) {
299
+ const keys = Object.keys(keyObj);
300
+ return new Proxy(props, {
301
+ get(_target, k) {
302
+ if (typeof k === "string" && keys.includes(k)) {
303
+ const v = _target[k];
304
+ if (v === void 0) {
305
+ return keyObj[k]();
306
+ }
307
+ return v;
308
+ }
309
+ return _target[k];
310
+ }
311
+ });
312
+ }
298
313
  export {
299
314
  getFormRule,
300
315
  getOnObjs,
301
316
  setFormDefaultValue,
302
317
  uesObjComponSelected,
318
+ uesPropsDefault,
303
319
  useGetDomLabel,
304
320
  useGetDomValue,
305
321
  useHide,
@@ -6,24 +6,23 @@ const index$2 = require("element-plus/es/components/dialog/index");
6
6
  const index$3 = require("element-plus/es/components/button/index");
7
7
  const index$1 = require("../../../hooks/cssname/index.cjs");
8
8
  const index = require("../../../hooks/locale/index.cjs");
9
+ const use = require("../../common/use.cjs");
9
10
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
10
11
  __name: "index",
11
12
  props: data.dataProps,
12
13
  emits: data.dataEmits,
13
14
  setup(__props, { expose: __expose, emit: __emit }) {
14
- const { getPropsDefault } = index.useLocale();
15
+ const { getLocale } = index.useLocale();
15
16
  const cs = index$1.useCssName("dialogs");
16
17
  const prs = __props;
17
- const props = getPropsDefault(prs, [
18
- {
19
- prop: "closeName",
20
- locale: "close"
18
+ const props = use.uesPropsDefault(prs, {
19
+ closeName() {
20
+ return getLocale("close");
21
21
  },
22
- {
23
- prop: "submitName",
24
- locale: "form.confirm"
22
+ submitName() {
23
+ return getLocale("form.confirm");
25
24
  }
26
- ]);
25
+ });
27
26
  const attrs = vue.useAttrs();
28
27
  const slots = vue.useSlots();
29
28
  const emit = __emit;
@@ -4,24 +4,23 @@ import { ElDialog } from "element-plus/es/components/dialog/index";
4
4
  import { ElButton } from "element-plus/es/components/button/index";
5
5
  import { useCssName } from "../../../hooks/cssname/index.js";
6
6
  import { useLocale } from "../../../hooks/locale/index.js";
7
+ import { uesPropsDefault } from "../../common/use.js";
7
8
  const _sfc_main = /* @__PURE__ */ defineComponent({
8
9
  __name: "index",
9
10
  props: dataProps,
10
11
  emits: dataEmits,
11
12
  setup(__props, { expose: __expose, emit: __emit }) {
12
- const { getPropsDefault } = useLocale();
13
+ const { getLocale } = useLocale();
13
14
  const cs = useCssName("dialogs");
14
15
  const prs = __props;
15
- const props = getPropsDefault(prs, [
16
- {
17
- prop: "closeName",
18
- locale: "close"
16
+ const props = uesPropsDefault(prs, {
17
+ closeName() {
18
+ return getLocale("close");
19
19
  },
20
- {
21
- prop: "submitName",
22
- locale: "form.confirm"
20
+ submitName() {
21
+ return getLocale("form.confirm");
23
22
  }
24
- ]);
23
+ });
25
24
  const attrs = useAttrs();
26
25
  const slots = useSlots();
27
26
  const emit = __emit;
@@ -12,6 +12,7 @@ const dataProps = {
12
12
  type: Boolean,
13
13
  default: true
14
14
  },
15
+ textarea: Boolean,
15
16
  /**
16
17
  * @props { Boolean } noEmpty= ( )
17
18
  * 不能为空
@@ -11,6 +11,7 @@ export declare const dataProps: {
11
11
  type: BooleanConstructor;
12
12
  default: boolean;
13
13
  };
14
+ textarea: BooleanConstructor;
14
15
  /**
15
16
  * @props { Boolean } noEmpty= ( )
16
17
  * 不能为空
@@ -10,6 +10,7 @@ const dataProps = {
10
10
  type: Boolean,
11
11
  default: true
12
12
  },
13
+ textarea: Boolean,
13
14
  /**
14
15
  * @props { Boolean } noEmpty= ( )
15
16
  * 不能为空