@fangzhongya/fang-ui 0.0.58 → 0.0.60

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 (132) hide show
  1. package/dist/components/array/src/data.cjs +3 -3
  2. package/dist/components/array/src/data.d.ts +0 -3
  3. package/dist/components/array/src/data.js +3 -3
  4. package/dist/components/array/src/index2.cjs +27 -11
  5. package/dist/components/array/src/index2.js +23 -7
  6. package/dist/components/common/use.cjs +1 -1
  7. package/dist/components/common/use.js +1 -1
  8. package/dist/components/dialogs/src/data.cjs +2 -4
  9. package/dist/components/dialogs/src/data.d.ts +0 -2
  10. package/dist/components/dialogs/src/data.js +2 -4
  11. package/dist/components/dialogs/src/index2.cjs +24 -12
  12. package/dist/components/dialogs/src/index2.js +17 -5
  13. package/dist/components/forms/index.css +3 -0
  14. package/dist/components/forms/index.scss +3 -0
  15. package/dist/components/forms/src/index2.cjs +16 -14
  16. package/dist/components/forms/src/index2.js +3 -1
  17. package/dist/components/forms/src/setup.cjs +11 -5
  18. package/dist/components/forms/src/setup.d.ts +1 -1
  19. package/dist/components/forms/src/setup.js +11 -5
  20. package/dist/components/forms/src/util.cjs +5 -4
  21. package/dist/components/forms/src/util.d.ts +1 -1
  22. package/dist/components/forms/src/util.js +5 -4
  23. package/dist/components/forms-drag/src/index2.cjs +96 -45
  24. package/dist/components/forms-drag/src/index2.js +91 -40
  25. package/dist/components/icon-picker/index.css +1 -0
  26. package/dist/components/icon-picker/index.scss +1 -0
  27. package/dist/components/iframe/index.css +4 -0
  28. package/dist/components/iframe/index.scss +4 -0
  29. package/dist/components/iframe/src/index2.cjs +19 -7
  30. package/dist/components/iframe/src/index2.js +20 -8
  31. package/dist/components/iframe/style/index2.scss +3 -0
  32. package/dist/components/index.cjs +110 -108
  33. package/dist/components/index.d.ts +1 -0
  34. package/dist/components/index.js +2 -0
  35. package/dist/components/index.scss +2 -1
  36. package/dist/components/index2.scss +3 -2
  37. package/dist/components/input-history/index.css +7 -17
  38. package/dist/components/input-history/index.scss +34 -42
  39. package/dist/components/input-history/src/index2.cjs +3 -12
  40. package/dist/components/input-history/src/index2.js +3 -12
  41. package/dist/components/inputs/src/index2.cjs +11 -9
  42. package/dist/components/inputs/src/index2.js +3 -1
  43. package/dist/components/keep-com/src/data.d.ts +3 -0
  44. package/dist/components/lists/index.css +0 -5
  45. package/dist/components/lists/index.scss +0 -5
  46. package/dist/components/lists/src/index2.cjs +2 -5
  47. package/dist/components/lists/src/index2.js +3 -6
  48. package/dist/components/listsp/index.css +1 -5
  49. package/dist/components/listsp/src/index2.cjs +11 -9
  50. package/dist/components/listsp/src/index2.js +3 -1
  51. package/dist/components/no-data/index.cjs +9 -0
  52. package/dist/components/no-data/index.css +19 -0
  53. package/dist/components/no-data/index.d.ts +4 -0
  54. package/dist/components/no-data/index.js +9 -0
  55. package/dist/components/no-data/index.scss +8 -0
  56. package/dist/components/no-data/src/data.cjs +24 -0
  57. package/dist/components/no-data/src/data.d.ts +26 -0
  58. package/dist/components/no-data/src/data.js +24 -0
  59. package/dist/components/no-data/src/index.cjs +4 -0
  60. package/dist/components/no-data/src/index.js +4 -0
  61. package/dist/components/no-data/src/index2.cjs +34 -0
  62. package/dist/components/no-data/src/index2.js +34 -0
  63. package/dist/components/page/index.css +4 -0
  64. package/dist/components/page/set-column.css +8 -8
  65. package/dist/components/page/src/index2.cjs +41 -39
  66. package/dist/components/page/src/index2.js +15 -13
  67. package/dist/components/page/src/set-column.cjs +1 -1
  68. package/dist/components/page/src/set-column.js +1 -1
  69. package/dist/components/page/src/set-column2.cjs +3 -6
  70. package/dist/components/page/src/set-column2.js +4 -7
  71. package/dist/components/paging/index.css +1 -0
  72. package/dist/components/paging/index.scss +1 -0
  73. package/dist/components/paging/src/index2.cjs +18 -10
  74. package/dist/components/paging/src/index2.js +12 -4
  75. package/dist/components/selector/src/index2.cjs +17 -15
  76. package/dist/components/selector/src/index2.js +8 -6
  77. package/dist/components/tables/common/pagin.cjs +3 -3
  78. package/dist/components/tables/common/pagin.d.ts +1 -1
  79. package/dist/components/tables/common/pagin.js +3 -3
  80. package/dist/components/tables/src/index2.cjs +4 -7
  81. package/dist/components/tables/src/index2.js +3 -6
  82. package/dist/components/tablesp/index.css +1 -0
  83. package/dist/components/tablesp/src/index2.cjs +11 -9
  84. package/dist/components/tablesp/src/index2.js +3 -1
  85. package/dist/components/tabless/src/index2.cjs +11 -9
  86. package/dist/components/tabless/src/index2.js +3 -1
  87. package/dist/components/tablesv/src/index2.cjs +2 -5
  88. package/dist/components/tablesv/src/index2.js +3 -6
  89. package/dist/components/tablesvp/index.css +1 -0
  90. package/dist/components/tablesvp/src/index2.cjs +9 -7
  91. package/dist/components/tablesvp/src/index2.js +3 -1
  92. package/dist/css/forms.css +3 -0
  93. package/dist/css/icon-picker.css +1 -0
  94. package/dist/css/iframe.css +4 -0
  95. package/dist/css/index.css +44 -22
  96. package/dist/css/input-history.css +7 -17
  97. package/dist/css/lists.css +0 -5
  98. package/dist/css/listsp.css +1 -5
  99. package/dist/css/no-data.css +19 -0
  100. package/dist/css/page/set-column.css +8 -8
  101. package/dist/css/page.css +4 -0
  102. package/dist/css/paging.css +1 -0
  103. package/dist/css/tablesp.css +1 -0
  104. package/dist/css/tablesvp.css +1 -0
  105. package/dist/expand/{chunk-ID2WVA6N.js → chunk-3HYUAX6P.js} +2 -0
  106. package/dist/expand/{chunk-NEHCZ3EJ.cjs → chunk-IPHLXLMM.cjs} +2 -0
  107. package/dist/expand/components.cjs +5 -5
  108. package/dist/expand/components.js +1 -1
  109. package/dist/expand/config.cjs +2 -2
  110. package/dist/expand/config.js +1 -1
  111. package/dist/hooks/index.cjs +2 -0
  112. package/dist/hooks/index.js +3 -1
  113. package/dist/hooks/locale/index.cjs +51 -2
  114. package/dist/hooks/locale/index.d.ts +64 -3
  115. package/dist/hooks/locale/index.js +51 -2
  116. package/dist/icons/index.css +31 -31
  117. package/dist/icons/index.json +7 -7
  118. package/dist/index.cjs +128 -126
  119. package/dist/index.css +44 -22
  120. package/dist/index.js +2 -0
  121. package/dist/locale/en.cjs +38 -15
  122. package/dist/locale/en.d.ts +27 -4
  123. package/dist/locale/en.js +38 -15
  124. package/dist/locale/zh-cn.cjs +24 -3
  125. package/dist/locale/zh-cn.d.ts +23 -2
  126. package/dist/locale/zh-cn.js +24 -3
  127. package/dist/types/locale.d.ts +1 -1
  128. package/package.json +11 -11
  129. /package/dist/components/{forms-item → forms-items}/index.css +0 -0
  130. /package/dist/components/{option → keep-com}/index.css +0 -0
  131. /package/dist/css/{forms-item.css → forms-items.css} +0 -0
  132. /package/dist/css/{option.css → keep-com.css} +0 -0
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const dataProps = {
4
- rangeSeparator: { type: String, default: "至" },
5
- startPlaceholder: { type: String, default: "开始" },
6
- endPlaceholder: { type: String, default: "结束" },
4
+ rangeSeparator: { type: String },
5
+ startPlaceholder: { type: String },
6
+ endPlaceholder: { type: String },
7
7
  multiple: {
8
8
  type: [String, Boolean]
9
9
  },
@@ -2,15 +2,12 @@ import { ExtractPropTypes } from 'vue';
2
2
  export declare const dataProps: {
3
3
  rangeSeparator: {
4
4
  type: StringConstructor;
5
- default: string;
6
5
  };
7
6
  startPlaceholder: {
8
7
  type: StringConstructor;
9
- default: string;
10
8
  };
11
9
  endPlaceholder: {
12
10
  type: StringConstructor;
13
- default: string;
14
11
  };
15
12
  multiple: {
16
13
  type: (BooleanConstructor | StringConstructor)[];
@@ -1,7 +1,7 @@
1
1
  const dataProps = {
2
- rangeSeparator: { type: String, default: "至" },
3
- startPlaceholder: { type: String, default: "开始" },
4
- endPlaceholder: { type: String, default: "结束" },
2
+ rangeSeparator: { type: String },
3
+ startPlaceholder: { type: String },
4
+ endPlaceholder: { type: String },
5
5
  multiple: {
6
6
  type: [String, Boolean]
7
7
  },
@@ -2,16 +2,32 @@
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 = require("../../../hooks/cssname/index.cjs");
6
- const index$1 = require("../../icon/index.cjs");
5
+ const index$1 = require("../../../hooks/cssname/index.cjs");
6
+ const index$2 = require("../../icon/index.cjs");
7
7
  const clear = require("../../../icons/vue/clear.cjs");
8
+ const index = require("../../../hooks/locale/index.cjs");
8
9
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
9
10
  __name: "index",
10
11
  props: data.dataProps,
11
12
  emits: data.dataEmits,
12
13
  setup(__props, { expose: __expose, emit: __emit }) {
13
- const cs = index.useCssName("array");
14
- const props = __props;
14
+ const { getLocale, getPropsDefault } = index.useLocale();
15
+ const cs = index$1.useCssName("array");
16
+ const prs = __props;
17
+ const props = getPropsDefault(prs, [
18
+ {
19
+ prop: "rangeSeparator",
20
+ locale: "to"
21
+ },
22
+ {
23
+ prop: "startPlaceholder",
24
+ locale: "began"
25
+ },
26
+ {
27
+ prop: "endPlaceholder",
28
+ locale: "end"
29
+ }
30
+ ]);
15
31
  const emit = __emit;
16
32
  const refInput = vue.ref();
17
33
  const isfocus = vue.ref(false);
@@ -109,7 +125,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
109
125
  if (start.value > end.value) {
110
126
  callback(
111
127
  new Error(
112
- props.endPlaceholder + (((_a = props.config) == null ? void 0 : _a.placeholder) ?? "") + "不能大于" + props.startPlaceholder + (((_b = props.config) == null ? void 0 : _b.placeholder) ?? "")
128
+ props.endPlaceholder + (((_a = props.config) == null ? void 0 : _a.placeholder) ?? "") + getLocale("cannot") + props.startPlaceholder + (((_b = props.config) == null ? void 0 : _b.placeholder) ?? "")
113
129
  )
114
130
  );
115
131
  return false;
@@ -177,7 +193,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
177
193
  onClick: vue.withModifiers(onClick, ["stop"])
178
194
  }, [
179
195
  vue.renderSlot(_ctx.$slots, vue.unref(data.dataSlot).prefix),
180
- (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(props.compon), vue.mergeProps(props.config, {
196
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(props).compon), vue.mergeProps(vue.unref(props).config, {
181
197
  multiple: multiple.value,
182
198
  class: [vue.unref(cs).z("value"), vue.unref(cs).z("start")],
183
199
  modelValue: start.value,
@@ -185,14 +201,14 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
185
201
  _cache[0] || (_cache[0] = ($event) => start.value = $event),
186
202
  _cache[1] || (_cache[1] = ($event) => onInput(0))
187
203
  ],
188
- placeholder: props.startPlaceholder + (((_a = props.config) == null ? void 0 : _a.placeholder) ?? ""),
204
+ placeholder: vue.unref(props).startPlaceholder + (((_a = vue.unref(props).config) == null ? void 0 : _a.placeholder) ?? ""),
189
205
  onClick: vue.withModifiers(onFocus, ["stop"]),
190
206
  onBlur
191
207
  }), null, 16, ["multiple", "class", "modelValue", "placeholder"])),
192
208
  vue.createElementVNode("span", {
193
209
  class: vue.normalizeClass([vue.unref(cs).z("range")])
194
- }, vue.toDisplayString(props.rangeSeparator), 3),
195
- (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(props.compon), vue.mergeProps(props.config, {
210
+ }, vue.toDisplayString(vue.unref(props).rangeSeparator), 3),
211
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(props).compon), vue.mergeProps(vue.unref(props).config, {
196
212
  multiple: multiple.value,
197
213
  class: [vue.unref(cs).z("value"), vue.unref(cs).z("end")],
198
214
  modelValue: end.value,
@@ -200,7 +216,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
200
216
  _cache[2] || (_cache[2] = ($event) => end.value = $event),
201
217
  _cache[3] || (_cache[3] = ($event) => onInput(1))
202
218
  ],
203
- placeholder: props.endPlaceholder + (((_b = props.config) == null ? void 0 : _b.placeholder) ?? ""),
219
+ placeholder: vue.unref(props).endPlaceholder + (((_b = vue.unref(props).config) == null ? void 0 : _b.placeholder) ?? ""),
204
220
  onClick: vue.withModifiers(onFocus, ["stop"]),
205
221
  onBlur
206
222
  }), null, 16, ["multiple", "class", "modelValue", "placeholder"])),
@@ -223,7 +239,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
223
239
  class: vue.normalizeClass([vue.unref(cs).z("icon"), vue.unref(cs).z("clear")]),
224
240
  onClick: vue.withModifiers(onClear, ["stop"])
225
241
  }, [
226
- vue.createVNode(vue.unref(index$1.Icon), null, {
242
+ vue.createVNode(vue.unref(index$2.Icon), null, {
227
243
  default: vue.withCtx(() => [
228
244
  vue.createVNode(clear.default)
229
245
  ]),
@@ -3,13 +3,29 @@ 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 { useLocale } from "../../../hooks/locale/index.js";
6
7
  const _sfc_main = /* @__PURE__ */ defineComponent({
7
8
  __name: "index",
8
9
  props: dataProps,
9
10
  emits: dataEmits,
10
11
  setup(__props, { expose: __expose, emit: __emit }) {
12
+ const { getLocale, getPropsDefault } = useLocale();
11
13
  const cs = useCssName("array");
12
- const props = __props;
14
+ const prs = __props;
15
+ const props = getPropsDefault(prs, [
16
+ {
17
+ prop: "rangeSeparator",
18
+ locale: "to"
19
+ },
20
+ {
21
+ prop: "startPlaceholder",
22
+ locale: "began"
23
+ },
24
+ {
25
+ prop: "endPlaceholder",
26
+ locale: "end"
27
+ }
28
+ ]);
13
29
  const emit = __emit;
14
30
  const refInput = ref();
15
31
  const isfocus = ref(false);
@@ -107,7 +123,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
107
123
  if (start.value > end.value) {
108
124
  callback(
109
125
  new Error(
110
- props.endPlaceholder + (((_a = props.config) == null ? void 0 : _a.placeholder) ?? "") + "不能大于" + props.startPlaceholder + (((_b = props.config) == null ? void 0 : _b.placeholder) ?? "")
126
+ props.endPlaceholder + (((_a = props.config) == null ? void 0 : _a.placeholder) ?? "") + getLocale("cannot") + props.startPlaceholder + (((_b = props.config) == null ? void 0 : _b.placeholder) ?? "")
111
127
  )
112
128
  );
113
129
  return false;
@@ -175,7 +191,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
175
191
  onClick: withModifiers(onClick, ["stop"])
176
192
  }, [
177
193
  renderSlot(_ctx.$slots, unref(dataSlot).prefix),
178
- (openBlock(), createBlock(resolveDynamicComponent(props.compon), mergeProps(props.config, {
194
+ (openBlock(), createBlock(resolveDynamicComponent(unref(props).compon), mergeProps(unref(props).config, {
179
195
  multiple: multiple.value,
180
196
  class: [unref(cs).z("value"), unref(cs).z("start")],
181
197
  modelValue: start.value,
@@ -183,14 +199,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
183
199
  _cache[0] || (_cache[0] = ($event) => start.value = $event),
184
200
  _cache[1] || (_cache[1] = ($event) => onInput(0))
185
201
  ],
186
- placeholder: props.startPlaceholder + (((_a = props.config) == null ? void 0 : _a.placeholder) ?? ""),
202
+ placeholder: unref(props).startPlaceholder + (((_a = unref(props).config) == null ? void 0 : _a.placeholder) ?? ""),
187
203
  onClick: withModifiers(onFocus, ["stop"]),
188
204
  onBlur
189
205
  }), null, 16, ["multiple", "class", "modelValue", "placeholder"])),
190
206
  createElementVNode("span", {
191
207
  class: normalizeClass([unref(cs).z("range")])
192
- }, toDisplayString(props.rangeSeparator), 3),
193
- (openBlock(), createBlock(resolveDynamicComponent(props.compon), mergeProps(props.config, {
208
+ }, toDisplayString(unref(props).rangeSeparator), 3),
209
+ (openBlock(), createBlock(resolveDynamicComponent(unref(props).compon), mergeProps(unref(props).config, {
194
210
  multiple: multiple.value,
195
211
  class: [unref(cs).z("value"), unref(cs).z("end")],
196
212
  modelValue: end.value,
@@ -198,7 +214,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
198
214
  _cache[2] || (_cache[2] = ($event) => end.value = $event),
199
215
  _cache[3] || (_cache[3] = ($event) => onInput(1))
200
216
  ],
201
- placeholder: props.endPlaceholder + (((_b = props.config) == null ? void 0 : _b.placeholder) ?? ""),
217
+ placeholder: unref(props).endPlaceholder + (((_b = unref(props).config) == null ? void 0 : _b.placeholder) ?? ""),
202
218
  onClick: withModifiers(onFocus, ["stop"]),
203
219
  onBlur
204
220
  }), null, 16, ["multiple", "class", "modelValue", "placeholder"])),
@@ -58,7 +58,7 @@ function setFormDefaultValue(obj, value) {
58
58
  }
59
59
  }
60
60
  function useHide(v, form) {
61
- if (v.hide) {
61
+ if (v && v.hide) {
62
62
  if (typeof v.hide == "function") {
63
63
  return v.hide(form, v);
64
64
  } else {
@@ -56,7 +56,7 @@ function setFormDefaultValue(obj, value) {
56
56
  }
57
57
  }
58
58
  function useHide(v, form) {
59
- if (v.hide) {
59
+ if (v && v.hide) {
60
60
  if (typeof v.hide == "function") {
61
61
  return v.hide(form, v);
62
62
  } else {
@@ -26,16 +26,14 @@ const dataProps = {
26
26
  * 关闭按钮名称
27
27
  */
28
28
  closeName: {
29
- type: String,
30
- default: "关闭"
29
+ type: String
31
30
  },
32
31
  /**
33
32
  * @props { String } submitName='确认' ( )
34
33
  * 确认按钮名称
35
34
  */
36
35
  submitName: {
37
- type: String,
38
- default: "确认"
36
+ type: String
39
37
  }
40
38
  };
41
39
  const dataEmits = ["update:modelValue", "close", "confirm"];
@@ -26,7 +26,6 @@ export declare const dataProps: {
26
26
  */
27
27
  closeName: {
28
28
  type: StringConstructor;
29
- default: string;
30
29
  };
31
30
  /**
32
31
  * @props { String } submitName='确认' ( )
@@ -34,7 +33,6 @@ export declare const dataProps: {
34
33
  */
35
34
  submitName: {
36
35
  type: StringConstructor;
37
- default: string;
38
36
  };
39
37
  };
40
38
  export type DataProps = ExtractPropTypes<typeof dataProps>;
@@ -24,16 +24,14 @@ const dataProps = {
24
24
  * 关闭按钮名称
25
25
  */
26
26
  closeName: {
27
- type: String,
28
- default: "关闭"
27
+ type: String
29
28
  },
30
29
  /**
31
30
  * @props { String } submitName='确认' ( )
32
31
  * 确认按钮名称
33
32
  */
34
33
  submitName: {
35
- type: String,
36
- default: "确认"
34
+ type: String
37
35
  }
38
36
  };
39
37
  const dataEmits = ["update:modelValue", "close", "confirm"];
@@ -2,16 +2,28 @@
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("element-plus/es/components/dialog/index");
6
- const index$2 = require("element-plus/es/components/button/index");
7
- const index = require("../../../hooks/cssname/index.cjs");
5
+ const index$2 = require("element-plus/es/components/dialog/index");
6
+ const index$3 = require("element-plus/es/components/button/index");
7
+ const index$1 = require("../../../hooks/cssname/index.cjs");
8
+ const index = require("../../../hooks/locale/index.cjs");
8
9
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
9
10
  __name: "index",
10
11
  props: data.dataProps,
11
12
  emits: data.dataEmits,
12
13
  setup(__props, { expose: __expose, emit: __emit }) {
13
- const cs = index.useCssName("dialogs");
14
- const props = __props;
14
+ const { getPropsDefault } = index.useLocale();
15
+ const cs = index$1.useCssName("dialogs");
16
+ const prs = __props;
17
+ const props = getPropsDefault(prs, [
18
+ {
19
+ prop: "closeName",
20
+ locale: "close"
21
+ },
22
+ {
23
+ prop: "submitName",
24
+ locale: "form.confirm"
25
+ }
26
+ ]);
15
27
  const attrs = vue.useAttrs();
16
28
  const slots = vue.useSlots();
17
29
  const emit = __emit;
@@ -32,11 +44,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
32
44
  };
33
45
  __expose({});
34
46
  return (_ctx, _cache) => {
35
- return vue.openBlock(), vue.createBlock(vue.unref(index$1.ElDialog), vue.mergeProps(vue.unref(attrs), {
47
+ return vue.openBlock(), vue.createBlock(vue.unref(index$2.ElDialog), vue.mergeProps(vue.unref(attrs), {
36
48
  class: vue.unref(cs).z(),
37
49
  modelValue: value.value,
38
50
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
39
- width: props.width
51
+ width: vue.unref(props).width
40
52
  }), vue.createSlots({ _: 2 }, [
41
53
  vue.renderList(Object.keys(vue.unref(slots)).filter(
42
54
  (v) => !["footer"].includes(v)
@@ -48,25 +60,25 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
48
60
  ])
49
61
  };
50
62
  }),
51
- !props.noFooter ? {
63
+ !vue.unref(props).noFooter ? {
52
64
  name: "footer",
53
65
  fn: vue.withCtx(() => [
54
66
  vue.renderSlot(_ctx.$slots, "footer", {}, () => [
55
67
  vue.createElementVNode("div", {
56
68
  class: vue.normalizeClass(vue.unref(cs).z("footer"))
57
69
  }, [
58
- vue.createVNode(vue.unref(index$2.ElButton), { onClick: onClose }, {
70
+ vue.createVNode(vue.unref(index$3.ElButton), { onClick: onClose }, {
59
71
  default: vue.withCtx(() => [
60
- vue.createTextVNode(vue.toDisplayString(props.closeName), 1)
72
+ vue.createTextVNode(vue.toDisplayString(vue.unref(props).closeName), 1)
61
73
  ]),
62
74
  _: 1
63
75
  }),
64
- vue.createVNode(vue.unref(index$2.ElButton), {
76
+ vue.createVNode(vue.unref(index$3.ElButton), {
65
77
  type: "primary",
66
78
  onClick: onSubmit
67
79
  }, {
68
80
  default: vue.withCtx(() => [
69
- vue.createTextVNode(vue.toDisplayString(props.submitName), 1)
81
+ vue.createTextVNode(vue.toDisplayString(vue.unref(props).submitName), 1)
70
82
  ]),
71
83
  _: 1
72
84
  })
@@ -3,13 +3,25 @@ import { dataEmits, dataProps } from "./data.js";
3
3
  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
+ import { useLocale } from "../../../hooks/locale/index.js";
6
7
  const _sfc_main = /* @__PURE__ */ defineComponent({
7
8
  __name: "index",
8
9
  props: dataProps,
9
10
  emits: dataEmits,
10
11
  setup(__props, { expose: __expose, emit: __emit }) {
12
+ const { getPropsDefault } = useLocale();
11
13
  const cs = useCssName("dialogs");
12
- const props = __props;
14
+ const prs = __props;
15
+ const props = getPropsDefault(prs, [
16
+ {
17
+ prop: "closeName",
18
+ locale: "close"
19
+ },
20
+ {
21
+ prop: "submitName",
22
+ locale: "form.confirm"
23
+ }
24
+ ]);
13
25
  const attrs = useAttrs();
14
26
  const slots = useSlots();
15
27
  const emit = __emit;
@@ -34,7 +46,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
34
46
  class: unref(cs).z(),
35
47
  modelValue: value.value,
36
48
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
37
- width: props.width
49
+ width: unref(props).width
38
50
  }), createSlots({ _: 2 }, [
39
51
  renderList(Object.keys(unref(slots)).filter(
40
52
  (v) => !["footer"].includes(v)
@@ -46,7 +58,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
46
58
  ])
47
59
  };
48
60
  }),
49
- !props.noFooter ? {
61
+ !unref(props).noFooter ? {
50
62
  name: "footer",
51
63
  fn: withCtx(() => [
52
64
  renderSlot(_ctx.$slots, "footer", {}, () => [
@@ -55,7 +67,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
55
67
  }, [
56
68
  createVNode(unref(ElButton), { onClick: onClose }, {
57
69
  default: withCtx(() => [
58
- createTextVNode(toDisplayString(props.closeName), 1)
70
+ createTextVNode(toDisplayString(unref(props).closeName), 1)
59
71
  ]),
60
72
  _: 1
61
73
  }),
@@ -64,7 +76,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
64
76
  onClick: onSubmit
65
77
  }, {
66
78
  default: withCtx(() => [
67
- createTextVNode(toDisplayString(props.submitName), 1)
79
+ createTextVNode(toDisplayString(unref(props).submitName), 1)
68
80
  ]),
69
81
  _: 1
70
82
  })
@@ -99,6 +99,9 @@
99
99
  .forms-elf.center .el-form-item__label {
100
100
  justify-content: center;
101
101
  }
102
+ .forms .forms-li.forms-buts {
103
+ margin-right: 0;
104
+ }
102
105
  .forms-buts-div .el-button {
103
106
  height: inherit;
104
107
  }
@@ -91,6 +91,9 @@ $forms: 'forms';
91
91
  }
92
92
  }
93
93
  }
94
+ .#{z($forms, 'li')}.#{z($forms, 'buts')} {
95
+ margin-right: 0;
96
+ }
94
97
  &-buts-div {
95
98
  .#{e()}button {
96
99
  height: inherit;
@@ -2,25 +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$3 = require("../../forms-div/index.cjs");
6
- const index$4 = require("../../forms-item/index.cjs");
7
- const index$2 = require("element-plus/es/components/form/index");
8
- const index$5 = require("element-plus/es/components/button/index");
9
- const index$1 = require("../../../hooks/cssname/index.cjs");
10
- const index = require("../../../hooks/inherit/index.cjs");
5
+ const index$4 = require("../../forms-div/index.cjs");
6
+ const index$5 = require("../../forms-item/index.cjs");
7
+ const index$3 = require("element-plus/es/components/form/index");
8
+ const index$6 = require("element-plus/es/components/button/index");
9
+ const index$2 = require("../../../hooks/cssname/index.cjs");
10
+ const index$1 = require("../../../hooks/inherit/index.cjs");
11
11
  const use = require("../../common/use.cjs");
12
12
  const setup = require("./setup.cjs");
13
+ const index = require("../../../hooks/locale/index.cjs");
13
14
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
14
15
  ...{ inheritAttrs: false },
15
16
  __name: "index",
16
17
  props: data.dataProps,
17
18
  emits: data.dataEmits,
18
19
  setup(__props, { expose: __expose, emit: __emit }) {
20
+ const { getLocale } = index.useLocale();
19
21
  const slots = vue.useSlots();
20
- const attrs = index.useInherit(vue.useAttrs());
22
+ const attrs = index$1.useInherit(vue.useAttrs());
21
23
  const props = __props;
22
24
  const emit = __emit;
23
- const cs = index$1.useCssName("forms");
25
+ const cs = index$2.useCssName("forms");
24
26
  const refForm = vue.ref();
25
27
  const refEl = vue.ref();
26
28
  const {
@@ -35,7 +37,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
35
37
  closeForm,
36
38
  dataForm,
37
39
  validate
38
- } = setup.setUp(props, emit, cs, refForm);
40
+ } = setup.setUp(props, emit, cs, refForm, getLocale);
39
41
  function setKey(value, index2) {
40
42
  return [index2, value.label, value.prop, value.compon].join(",");
41
43
  }
@@ -89,7 +91,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
89
91
  ]),
90
92
  style: vue.normalizeStyle(vue.unref(styles))
91
93
  }, [
92
- (vue.openBlock(), vue.createBlock(vue.unref(index$2.ElForm), vue.mergeProps(vue.unref(attrs).assem, {
94
+ (vue.openBlock(), vue.createBlock(vue.unref(index$3.ElForm), vue.mergeProps(vue.unref(attrs).assem, {
93
95
  key: props.list.length,
94
96
  class: [vue.unref(cs).z("elf"), props.labelPosition],
95
97
  model: vue.unref(dataForm),
@@ -114,7 +116,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
114
116
  ]),
115
117
  style: vue.normalizeStyle(vue.unref(setStyles)(item))
116
118
  }, [
117
- (item == null ? void 0 : item.isdiv) ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.FormsDiv), {
119
+ (item == null ? void 0 : item.isdiv) ? (vue.openBlock(), vue.createBlock(vue.unref(index$4.FormsDiv), {
118
120
  key: 0,
119
121
  listobj: item,
120
122
  optionss: props.options,
@@ -130,7 +132,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
130
132
  ])
131
133
  };
132
134
  })
133
- ]), 1032, ["listobj", "optionss", "valueobj", "modelValue"])) : (vue.openBlock(), vue.createBlock(vue.unref(index$4.FormsItem), {
135
+ ]), 1032, ["listobj", "optionss", "valueobj", "modelValue"])) : (vue.openBlock(), vue.createBlock(vue.unref(index$5.FormsItem), {
134
136
  key: 1,
135
137
  listobj: item,
136
138
  optionss: props.options,
@@ -157,7 +159,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
157
159
  class: vue.normalizeClass([vue.unref(cs).z("li"), vue.unref(cs).z("buts")]),
158
160
  style: vue.normalizeStyle(vue.unref(setStyles)({}))
159
161
  }, [
160
- vue.createVNode(vue.unref(index$2.ElFormItem), {
162
+ vue.createVNode(vue.unref(index$3.ElFormItem), {
161
163
  "label-width": props.butLeft
162
164
  }, {
163
165
  default: vue.withCtx(() => [
@@ -169,7 +171,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
169
171
  }, [
170
172
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(buts), (item, index2) => {
171
173
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: index2 }, [
172
- !vue.unref(use.useHide)(item, vue.unref(dataForm)) ? (vue.openBlock(), vue.createBlock(vue.unref(index$5.ElButton), vue.mergeProps({
174
+ !vue.unref(use.useHide)(item, vue.unref(dataForm)) ? (vue.openBlock(), vue.createBlock(vue.unref(index$6.ElButton), vue.mergeProps({
173
175
  key: 0,
174
176
  ref_for: true
175
177
  }, item, {
@@ -8,12 +8,14 @@ import { useCssName } from "../../../hooks/cssname/index.js";
8
8
  import { useInherit } from "../../../hooks/inherit/index.js";
9
9
  import { useHide } from "../../common/use.js";
10
10
  import { setUp } from "./setup.js";
11
+ import { useLocale } from "../../../hooks/locale/index.js";
11
12
  const _sfc_main = /* @__PURE__ */ defineComponent({
12
13
  ...{ inheritAttrs: false },
13
14
  __name: "index",
14
15
  props: dataProps,
15
16
  emits: dataEmits,
16
17
  setup(__props, { expose: __expose, emit: __emit }) {
18
+ const { getLocale } = useLocale();
17
19
  const slots = useSlots();
18
20
  const attrs = useInherit(useAttrs());
19
21
  const props = __props;
@@ -33,7 +35,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
33
35
  closeForm,
34
36
  dataForm,
35
37
  validate
36
- } = setUp(props, emit, cs, refForm);
38
+ } = setUp(props, emit, cs, refForm, getLocale);
37
39
  function setKey(value, index) {
38
40
  return [index, value.label, value.prop, value.compon].join(",");
39
41
  }
@@ -22,18 +22,18 @@ const Changes = [
22
22
  "Switch",
23
23
  "Cascader"
24
24
  ];
25
- function setUp(props, emit, cs, refForm) {
25
+ function setUp(props, emit, cs, refForm, getLocale) {
26
26
  const buts = vue.computed(() => {
27
27
  if (typeof props.buts == "undefined") {
28
28
  return [
29
29
  {
30
30
  _id: "2",
31
- label: "关闭"
31
+ label: getLocale("close")
32
32
  },
33
33
  {
34
34
  _id: "1",
35
35
  type: "primary",
36
- label: "确认"
36
+ label: getLocale("form.confirm")
37
37
  }
38
38
  ];
39
39
  } else {
@@ -118,7 +118,7 @@ function setUp(props, emit, cs, refForm) {
118
118
  }
119
119
  obj.config = obj.config ?? {};
120
120
  if (((_a = obj.config) == null ? void 0 : _a.placeholder) === void 0) {
121
- obj.config.placeholder = (trigger == 1 ? "请输入" : "请选择") + obj.label;
121
+ obj.config.placeholder = (trigger == 1 ? getLocale("form.import") : getLocale("form.select")) + obj.label;
122
122
  }
123
123
  if (((_b = obj.config) == null ? void 0 : _b.clearable) === void 0) {
124
124
  obj.config.clearable = true;
@@ -129,7 +129,13 @@ function setUp(props, emit, cs, refForm) {
129
129
  if (obj.rules) {
130
130
  rules[p] = obj.rules;
131
131
  } else if (obj.rule) {
132
- rules[p] = util.getRule(trigger, obj, dataForm, refForm);
132
+ rules[p] = util.getRule(
133
+ trigger,
134
+ obj,
135
+ dataForm,
136
+ refForm,
137
+ getLocale
138
+ );
133
139
  } else {
134
140
  rules[p] = [];
135
141
  }
@@ -2,7 +2,7 @@ import { DataProps } from './data';
2
2
  import { UseCssNameReturn } from '../../../hooks/cssname';
3
3
  import { Ref, CSSProperties, WritableComputedRef, ComputedRef } from 'vue';
4
4
  type Emit = (...args: any[]) => void;
5
- export declare function setUp(props: DataProps, emit: Emit, cs: UseCssNameReturn, refForm: any): {
5
+ export declare function setUp(props: DataProps, emit: Emit, cs: UseCssNameReturn, refForm: any, getLocale: Function): {
6
6
  dataRules: Ref<ObjAny, ObjAny>;
7
7
  dataForm: WritableComputedRef<Record<string, any> | undefined, Record<string, any> | undefined> | Ref<Record<string, any>, Record<string, any>>;
8
8
  buts: ComputedRef<ObjAny[]>;