@fangzhongya/fang-ui 0.0.58 → 0.0.59
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/array/src/data.cjs +3 -3
- package/dist/components/array/src/data.d.ts +0 -3
- package/dist/components/array/src/data.js +3 -3
- package/dist/components/array/src/index2.cjs +27 -11
- package/dist/components/array/src/index2.js +23 -7
- package/dist/components/common/use.cjs +1 -1
- package/dist/components/common/use.js +1 -1
- package/dist/components/dialogs/src/data.cjs +2 -4
- package/dist/components/dialogs/src/data.d.ts +0 -2
- package/dist/components/dialogs/src/data.js +2 -4
- package/dist/components/dialogs/src/index2.cjs +24 -12
- package/dist/components/dialogs/src/index2.js +17 -5
- package/dist/components/forms/index.css +3 -0
- package/dist/components/forms/index.scss +3 -0
- package/dist/components/forms/src/index2.cjs +16 -14
- package/dist/components/forms/src/index2.js +3 -1
- package/dist/components/forms/src/setup.cjs +11 -5
- package/dist/components/forms/src/setup.d.ts +1 -1
- package/dist/components/forms/src/setup.js +11 -5
- package/dist/components/forms/src/util.cjs +5 -4
- package/dist/components/forms/src/util.d.ts +1 -1
- package/dist/components/forms/src/util.js +5 -4
- package/dist/components/forms-drag/src/index2.cjs +96 -45
- package/dist/components/forms-drag/src/index2.js +91 -40
- package/dist/components/icon-picker/index.css +1 -0
- package/dist/components/icon-picker/index.scss +1 -0
- package/dist/components/iframe/index.css +4 -0
- package/dist/components/iframe/index.scss +4 -0
- package/dist/components/iframe/src/index2.cjs +19 -7
- package/dist/components/iframe/src/index2.js +20 -8
- package/dist/components/iframe/style/index2.scss +3 -0
- package/dist/components/index2.scss +1 -1
- package/dist/components/input-history/index.css +7 -17
- package/dist/components/input-history/index.scss +34 -42
- package/dist/components/input-history/src/index2.cjs +3 -12
- package/dist/components/input-history/src/index2.js +3 -12
- package/dist/components/inputs/src/index2.cjs +11 -9
- package/dist/components/inputs/src/index2.js +3 -1
- package/dist/components/keep-com/src/data.d.ts +3 -0
- package/dist/components/listsp/index.css +1 -0
- package/dist/components/listsp/src/index2.cjs +11 -9
- package/dist/components/listsp/src/index2.js +3 -1
- package/dist/components/page/index.css +4 -0
- package/dist/components/page/src/index2.cjs +41 -39
- package/dist/components/page/src/index2.js +15 -13
- package/dist/components/paging/index.css +1 -0
- package/dist/components/paging/index.scss +1 -0
- package/dist/components/paging/src/index2.cjs +18 -10
- package/dist/components/paging/src/index2.js +12 -4
- package/dist/components/selector/src/index2.cjs +17 -15
- package/dist/components/selector/src/index2.js +8 -6
- package/dist/components/tables/common/pagin.cjs +3 -3
- package/dist/components/tables/common/pagin.d.ts +1 -1
- package/dist/components/tables/common/pagin.js +3 -3
- package/dist/components/tablesp/index.css +1 -0
- package/dist/components/tablesp/src/index2.cjs +11 -9
- package/dist/components/tablesp/src/index2.js +3 -1
- package/dist/components/tabless/src/index2.cjs +11 -9
- package/dist/components/tabless/src/index2.js +3 -1
- package/dist/components/tablesvp/index.css +1 -0
- package/dist/components/tablesvp/src/index2.cjs +9 -7
- package/dist/components/tablesvp/src/index2.js +3 -1
- package/dist/css/forms.css +3 -0
- package/dist/css/icon-picker.css +1 -0
- package/dist/css/iframe.css +4 -0
- package/dist/css/index.css +16 -17
- package/dist/css/input-history.css +7 -17
- package/dist/css/listsp.css +1 -0
- package/dist/css/page.css +4 -0
- package/dist/css/paging.css +1 -0
- package/dist/css/tablesp.css +1 -0
- package/dist/css/tablesvp.css +1 -0
- package/dist/hooks/index.cjs +2 -0
- package/dist/hooks/index.js +3 -1
- package/dist/hooks/locale/index.cjs +51 -2
- package/dist/hooks/locale/index.d.ts +64 -3
- package/dist/hooks/locale/index.js +51 -2
- package/dist/icons/index.css +37 -37
- package/dist/icons/index.json +10 -10
- package/dist/index.css +16 -17
- package/dist/locale/en.cjs +27 -3
- package/dist/locale/en.d.ts +26 -2
- package/dist/locale/en.js +27 -3
- package/dist/locale/zh-cn.cjs +23 -1
- package/dist/locale/zh-cn.d.ts +22 -0
- package/dist/locale/zh-cn.js +23 -1
- package/dist/types/locale.d.ts +1 -1
- package/package.json +10 -10
- /package/dist/components/{forms-item → forms-items}/index.css +0 -0
- /package/dist/components/{option → keep-com}/index.css +0 -0
- /package/dist/css/{forms-item.css → forms-items.css} +0 -0
- /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
|
|
5
|
-
startPlaceholder: { type: String
|
|
6
|
-
endPlaceholder: { type: String
|
|
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
|
|
3
|
-
startPlaceholder: { type: String
|
|
4
|
-
endPlaceholder: { type: String
|
|
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$
|
|
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
|
|
14
|
-
const
|
|
14
|
+
const { getLocale, getPropsDefault } = index.useLocale();
|
|
15
|
+
const cs = index$1.useCssName("array");
|
|
16
|
+
const prs = __props;
|
|
17
|
+
const props = getPropsDefault(prs, [
|
|
18
|
+
{
|
|
19
|
+
name: "rangeSeparator",
|
|
20
|
+
locale: "to"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: "startPlaceholder",
|
|
24
|
+
locale: "began"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "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) ?? "") + "
|
|
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$
|
|
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
|
|
14
|
+
const prs = __props;
|
|
15
|
+
const props = getPropsDefault(prs, [
|
|
16
|
+
{
|
|
17
|
+
name: "rangeSeparator",
|
|
18
|
+
locale: "to"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: "startPlaceholder",
|
|
22
|
+
locale: "began"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: "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) ?? "") + "
|
|
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"])),
|
|
@@ -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$
|
|
6
|
-
const 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
|
|
14
|
-
const
|
|
14
|
+
const { getPropsDefault } = index.useLocale();
|
|
15
|
+
const cs = index$1.useCssName("dialogs");
|
|
16
|
+
const prs = __props;
|
|
17
|
+
const props = getPropsDefault(prs, [
|
|
18
|
+
{
|
|
19
|
+
name: "closeName",
|
|
20
|
+
locale: "close"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: "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$
|
|
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$
|
|
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$
|
|
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
|
|
14
|
+
const prs = __props;
|
|
15
|
+
const props = getPropsDefault(prs, [
|
|
16
|
+
{
|
|
17
|
+
name: "closeName",
|
|
18
|
+
locale: "close"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: "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
|
})
|
|
@@ -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$
|
|
6
|
-
const index$
|
|
7
|
-
const index$
|
|
8
|
-
const index$
|
|
9
|
-
const index$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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 ? "
|
|
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(
|
|
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[]>;
|