@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,25 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
|
-
const index = require("../../../hooks/cssname/index.cjs");
|
|
5
|
-
const index$
|
|
6
|
-
const index$
|
|
7
|
-
const index$
|
|
8
|
-
const index$
|
|
9
|
-
const index$
|
|
10
|
-
const index$
|
|
11
|
-
const index$
|
|
4
|
+
const index$1 = require("../../../hooks/cssname/index.cjs");
|
|
5
|
+
const index$5 = require("../../forms/index.cjs");
|
|
6
|
+
const index$8 = require("../../tablesp/index.cjs");
|
|
7
|
+
const index$6 = require("../../list/index.cjs");
|
|
8
|
+
const index$4 = require("../../dialogs/index.cjs");
|
|
9
|
+
const index$7 = require("element-plus/es/components/button/index");
|
|
10
|
+
const index$3 = require("element-plus/es/components/message/index");
|
|
11
|
+
const index$2 = require("element-plus/es/components/message-box/index");
|
|
12
12
|
const data = require("./data.cjs");
|
|
13
13
|
const setColumn = require("./set-column.cjs");
|
|
14
14
|
const urls = require("../../common/urls.cjs");
|
|
15
|
+
const index = require("../../../hooks/locale/index.cjs");
|
|
15
16
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
16
17
|
__name: "index",
|
|
17
18
|
props: data.dataProps,
|
|
18
19
|
emits: data.dataEmits,
|
|
19
20
|
setup(__props, { emit: __emit }) {
|
|
21
|
+
const { getLocale, getLocaleAdd } = index.useLocale();
|
|
20
22
|
const props = __props;
|
|
21
23
|
const emit = __emit;
|
|
22
|
-
const cs = index.useCssName("page");
|
|
24
|
+
const cs = index$1.useCssName("page");
|
|
23
25
|
const slots = vue.useSlots();
|
|
24
26
|
const tableRef = vue.ref();
|
|
25
27
|
let listObj = {};
|
|
@@ -128,9 +130,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
128
130
|
const onSenior = (obj) => {
|
|
129
131
|
isSenior.value = !isSenior.value;
|
|
130
132
|
if (isSenior.value) {
|
|
131
|
-
obj.label = "
|
|
133
|
+
obj.label = getLocale("page.put");
|
|
132
134
|
} else {
|
|
133
|
-
obj.label = "
|
|
135
|
+
obj.label = getLocale("page.senior");
|
|
134
136
|
}
|
|
135
137
|
setListQuery();
|
|
136
138
|
};
|
|
@@ -140,19 +142,19 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
140
142
|
const arr = [
|
|
141
143
|
{
|
|
142
144
|
_id: "1",
|
|
143
|
-
label: "
|
|
145
|
+
label: getLocale("page.query"),
|
|
144
146
|
type: "primary"
|
|
145
147
|
},
|
|
146
148
|
{
|
|
147
149
|
_id: "2",
|
|
148
|
-
label: "
|
|
150
|
+
label: getLocale("page.reset"),
|
|
149
151
|
type: "default"
|
|
150
152
|
}
|
|
151
153
|
];
|
|
152
154
|
if ((_a = props.config.query) == null ? void 0 : _a.senior) {
|
|
153
155
|
const obj = {
|
|
154
156
|
_id: "3",
|
|
155
|
-
label: "
|
|
157
|
+
label: getLocale("page.senior"),
|
|
156
158
|
type: "primary",
|
|
157
159
|
click: onSenior
|
|
158
160
|
};
|
|
@@ -190,7 +192,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
190
192
|
if (((_a = props.config.table) == null ? void 0 : _a.operation) !== false) {
|
|
191
193
|
arr.push({
|
|
192
194
|
prop: "operation",
|
|
193
|
-
label: "
|
|
195
|
+
label: getLocale("page.operation"),
|
|
194
196
|
width: 156,
|
|
195
197
|
fixed: true
|
|
196
198
|
});
|
|
@@ -205,7 +207,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
205
207
|
if (((_a = props.config.edit) == null ? void 0 : _a.is) !== false) {
|
|
206
208
|
array.push({
|
|
207
209
|
prop: 2,
|
|
208
|
-
label: "
|
|
210
|
+
label: getLocale("page.edit"),
|
|
209
211
|
type: "primary",
|
|
210
212
|
text: true
|
|
211
213
|
});
|
|
@@ -213,7 +215,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
213
215
|
if (((_b = props.config.delete) == null ? void 0 : _b.is) !== false) {
|
|
214
216
|
array.push({
|
|
215
217
|
prop: 4,
|
|
216
|
-
label: "
|
|
218
|
+
label: getLocale("page.delete"),
|
|
217
219
|
type: "danger",
|
|
218
220
|
text: true
|
|
219
221
|
});
|
|
@@ -221,7 +223,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
221
223
|
if (((_c = props.config.details) == null ? void 0 : _c.is) !== false) {
|
|
222
224
|
array.push({
|
|
223
225
|
prop: 9,
|
|
224
|
-
label: "
|
|
226
|
+
label: getLocale("page.details"),
|
|
225
227
|
type: "info",
|
|
226
228
|
text: true
|
|
227
229
|
});
|
|
@@ -235,14 +237,14 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
235
237
|
if (((_a = props.config.add) == null ? void 0 : _a.is) !== false) {
|
|
236
238
|
array.push({
|
|
237
239
|
prop: 1,
|
|
238
|
-
label: "
|
|
240
|
+
label: getLocale("page.add"),
|
|
239
241
|
type: "primary"
|
|
240
242
|
});
|
|
241
243
|
}
|
|
242
244
|
if (((_b = props.config.delete) == null ? void 0 : _b.is) !== false && ((_c = tableConfig.value.config) == null ? void 0 : _c.ischecked)) {
|
|
243
245
|
array.push({
|
|
244
246
|
prop: 8,
|
|
245
|
-
label: "
|
|
247
|
+
label: getLocaleAdd("page.batch", "page.delete"),
|
|
246
248
|
type: "danger"
|
|
247
249
|
});
|
|
248
250
|
}
|
|
@@ -257,7 +259,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
257
259
|
array.forEach((obj) => {
|
|
258
260
|
ts.push(name + ":" + (obj[label] ?? ""));
|
|
259
261
|
});
|
|
260
|
-
index$
|
|
262
|
+
index$2.ElMessageBox.confirm(ts.join("<br>"), "提示", {
|
|
261
263
|
confirmButtonText: "确认",
|
|
262
264
|
cancelButtonText: "取消",
|
|
263
265
|
type: "warning",
|
|
@@ -282,10 +284,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
282
284
|
}
|
|
283
285
|
urls.comHandle(param, value).then((res) => {
|
|
284
286
|
if (res.result) {
|
|
285
|
-
index$
|
|
287
|
+
index$3.ElMessage.success(res.info || "删除成功");
|
|
286
288
|
onRefresh();
|
|
287
289
|
} else {
|
|
288
|
-
index$
|
|
290
|
+
index$3.ElMessage.error(res.info || "删除失败");
|
|
289
291
|
}
|
|
290
292
|
}).catch((err) => {
|
|
291
293
|
console.error("删除失败", err);
|
|
@@ -316,7 +318,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
316
318
|
} else if (item.prop === 8) {
|
|
317
319
|
console.log("批量删除", selection.value);
|
|
318
320
|
if (selection.value.length === 0) {
|
|
319
|
-
index$
|
|
321
|
+
index$3.ElMessage.warning("请至少选择一条记录");
|
|
320
322
|
return;
|
|
321
323
|
}
|
|
322
324
|
onDelete(selection.value);
|
|
@@ -341,7 +343,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
341
343
|
details.value = res.data || row;
|
|
342
344
|
details.visible = true;
|
|
343
345
|
} else {
|
|
344
|
-
index$
|
|
346
|
+
index$3.ElMessage.error(res.info || "查询详情失败");
|
|
345
347
|
}
|
|
346
348
|
}).catch((err) => {
|
|
347
349
|
console.error("查询详情失败", err);
|
|
@@ -417,13 +419,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
417
419
|
}
|
|
418
420
|
urls.comHandle(param, data2).then((res) => {
|
|
419
421
|
if (res.result) {
|
|
420
|
-
index$
|
|
422
|
+
index$3.ElMessage.success(
|
|
421
423
|
res.info || "添加成功"
|
|
422
424
|
);
|
|
423
425
|
dialog.visible = false;
|
|
424
426
|
onRefresh();
|
|
425
427
|
} else {
|
|
426
|
-
index$
|
|
428
|
+
index$3.ElMessage.error(res.info || "添加失败");
|
|
427
429
|
}
|
|
428
430
|
}).catch((err) => {
|
|
429
431
|
console.error("添加失败", err);
|
|
@@ -451,13 +453,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
451
453
|
}
|
|
452
454
|
urls.comHandle(param, data2).then((res) => {
|
|
453
455
|
if (res.result) {
|
|
454
|
-
index$
|
|
456
|
+
index$3.ElMessage.success(
|
|
455
457
|
res.info || "编辑成功"
|
|
456
458
|
);
|
|
457
459
|
dialog.visible = false;
|
|
458
460
|
onRefresh();
|
|
459
461
|
} else {
|
|
460
|
-
index$
|
|
462
|
+
index$3.ElMessage.error(res.info || "编辑失败");
|
|
461
463
|
}
|
|
462
464
|
}).catch((err) => {
|
|
463
465
|
console.error("编辑失败", err);
|
|
@@ -570,14 +572,14 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
570
572
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
571
573
|
class: vue.normalizeClass(vue.unref(cs).z())
|
|
572
574
|
}, [
|
|
573
|
-
vue.createVNode(vue.unref(index$
|
|
574
|
-
title: (dialog.type == "add" ? "
|
|
575
|
+
vue.createVNode(vue.unref(index$4.Dialogs), {
|
|
576
|
+
title: (dialog.type == "add" ? vue.unref(getLocale)("page.add") : vue.unref(getLocale)("page.edit")) + props.config.name,
|
|
575
577
|
modelValue: dialog.visible,
|
|
576
578
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => dialog.visible = $event),
|
|
577
579
|
onConfirm
|
|
578
580
|
}, {
|
|
579
581
|
default: vue.withCtx(() => [
|
|
580
|
-
dialog.visible ? (vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
582
|
+
dialog.visible ? (vue.openBlock(), vue.createBlock(vue.unref(index$5.Forms), vue.mergeProps({ key: 0 }, props.config.form, {
|
|
581
583
|
ref_key: "formRef",
|
|
582
584
|
ref: formRef,
|
|
583
585
|
modelValue: dialog.value,
|
|
@@ -599,8 +601,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
599
601
|
]),
|
|
600
602
|
_: 3
|
|
601
603
|
}, 8, ["title", "modelValue"]),
|
|
602
|
-
vue.createVNode(vue.unref(index$
|
|
603
|
-
title: props.config.name + "
|
|
604
|
+
vue.createVNode(vue.unref(index$4.Dialogs), {
|
|
605
|
+
title: props.config.name + vue.unref(getLocale)("page.details"),
|
|
604
606
|
modelValue: details.visible,
|
|
605
607
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => details.visible = $event),
|
|
606
608
|
"no-footer": ""
|
|
@@ -608,7 +610,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
608
610
|
default: vue.withCtx(() => {
|
|
609
611
|
var _a2;
|
|
610
612
|
return [
|
|
611
|
-
vue.createVNode(vue.unref(index$
|
|
613
|
+
vue.createVNode(vue.unref(index$6.List), vue.mergeProps((_a2 = props.config.details) == null ? void 0 : _a2.config, {
|
|
612
614
|
value: details.value,
|
|
613
615
|
options: props.options,
|
|
614
616
|
compons: props.compons,
|
|
@@ -635,7 +637,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
635
637
|
key: 0,
|
|
636
638
|
class: vue.normalizeClass(vue.unref(cs).z("query"))
|
|
637
639
|
}, [
|
|
638
|
-
vue.createVNode(vue.unref(index$
|
|
640
|
+
vue.createVNode(vue.unref(index$5.Forms), vue.mergeProps((_b = props.config.query) == null ? void 0 : _b.config, {
|
|
639
641
|
query: "",
|
|
640
642
|
"label-position": "auto",
|
|
641
643
|
"model-value": props.value,
|
|
@@ -671,7 +673,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
671
673
|
class: vue.normalizeClass(vue.unref(cs).z("top-operation"))
|
|
672
674
|
}, [
|
|
673
675
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(operationTop), (item, index2) => {
|
|
674
|
-
return vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
676
|
+
return vue.openBlock(), vue.createBlock(vue.unref(index$7.ElButton), {
|
|
675
677
|
key: index2,
|
|
676
678
|
type: item.type,
|
|
677
679
|
onClick: vue.withModifiers(($event) => onOperation(item), ["stop"])
|
|
@@ -691,7 +693,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
691
693
|
list: props.list
|
|
692
694
|
}, null, 8, ["modelValue", "list"])) : vue.createCommentVNode("", true)
|
|
693
695
|
], 2),
|
|
694
|
-
vue.createVNode(vue.unref(index$
|
|
696
|
+
vue.createVNode(vue.unref(index$8.Tablesp), {
|
|
695
697
|
ref_key: "tableRef",
|
|
696
698
|
ref: tableRef,
|
|
697
699
|
load: ((_c = props.config.query) == null ? void 0 : _c.is) === false,
|
|
@@ -709,7 +711,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
709
711
|
class: vue.normalizeClass(vue.unref(cs).z("operations"))
|
|
710
712
|
}, [
|
|
711
713
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(operationColumn), (item, index2) => {
|
|
712
|
-
return vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
714
|
+
return vue.openBlock(), vue.createBlock(vue.unref(index$7.ElButton), {
|
|
713
715
|
key: index2,
|
|
714
716
|
type: item.type,
|
|
715
717
|
text: item.text,
|
|
@@ -10,11 +10,13 @@ import { ElMessageBox } from "element-plus/es/components/message-box/index";
|
|
|
10
10
|
import { dataEmits, dataProps } from "./data.js";
|
|
11
11
|
import SetColumn from "./set-column.js";
|
|
12
12
|
import { comHandle } from "../../common/urls.js";
|
|
13
|
+
import { useLocale } from "../../../hooks/locale/index.js";
|
|
13
14
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
14
15
|
__name: "index",
|
|
15
16
|
props: dataProps,
|
|
16
17
|
emits: dataEmits,
|
|
17
18
|
setup(__props, { emit: __emit }) {
|
|
19
|
+
const { getLocale, getLocaleAdd } = useLocale();
|
|
18
20
|
const props = __props;
|
|
19
21
|
const emit = __emit;
|
|
20
22
|
const cs = useCssName("page");
|
|
@@ -126,9 +128,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
126
128
|
const onSenior = (obj) => {
|
|
127
129
|
isSenior.value = !isSenior.value;
|
|
128
130
|
if (isSenior.value) {
|
|
129
|
-
obj.label = "
|
|
131
|
+
obj.label = getLocale("page.put");
|
|
130
132
|
} else {
|
|
131
|
-
obj.label = "
|
|
133
|
+
obj.label = getLocale("page.senior");
|
|
132
134
|
}
|
|
133
135
|
setListQuery();
|
|
134
136
|
};
|
|
@@ -138,19 +140,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
138
140
|
const arr = [
|
|
139
141
|
{
|
|
140
142
|
_id: "1",
|
|
141
|
-
label: "
|
|
143
|
+
label: getLocale("page.query"),
|
|
142
144
|
type: "primary"
|
|
143
145
|
},
|
|
144
146
|
{
|
|
145
147
|
_id: "2",
|
|
146
|
-
label: "
|
|
148
|
+
label: getLocale("page.reset"),
|
|
147
149
|
type: "default"
|
|
148
150
|
}
|
|
149
151
|
];
|
|
150
152
|
if ((_a = props.config.query) == null ? void 0 : _a.senior) {
|
|
151
153
|
const obj = {
|
|
152
154
|
_id: "3",
|
|
153
|
-
label: "
|
|
155
|
+
label: getLocale("page.senior"),
|
|
154
156
|
type: "primary",
|
|
155
157
|
click: onSenior
|
|
156
158
|
};
|
|
@@ -188,7 +190,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
188
190
|
if (((_a = props.config.table) == null ? void 0 : _a.operation) !== false) {
|
|
189
191
|
arr.push({
|
|
190
192
|
prop: "operation",
|
|
191
|
-
label: "
|
|
193
|
+
label: getLocale("page.operation"),
|
|
192
194
|
width: 156,
|
|
193
195
|
fixed: true
|
|
194
196
|
});
|
|
@@ -203,7 +205,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
203
205
|
if (((_a = props.config.edit) == null ? void 0 : _a.is) !== false) {
|
|
204
206
|
array.push({
|
|
205
207
|
prop: 2,
|
|
206
|
-
label: "
|
|
208
|
+
label: getLocale("page.edit"),
|
|
207
209
|
type: "primary",
|
|
208
210
|
text: true
|
|
209
211
|
});
|
|
@@ -211,7 +213,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
211
213
|
if (((_b = props.config.delete) == null ? void 0 : _b.is) !== false) {
|
|
212
214
|
array.push({
|
|
213
215
|
prop: 4,
|
|
214
|
-
label: "
|
|
216
|
+
label: getLocale("page.delete"),
|
|
215
217
|
type: "danger",
|
|
216
218
|
text: true
|
|
217
219
|
});
|
|
@@ -219,7 +221,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
219
221
|
if (((_c = props.config.details) == null ? void 0 : _c.is) !== false) {
|
|
220
222
|
array.push({
|
|
221
223
|
prop: 9,
|
|
222
|
-
label: "
|
|
224
|
+
label: getLocale("page.details"),
|
|
223
225
|
type: "info",
|
|
224
226
|
text: true
|
|
225
227
|
});
|
|
@@ -233,14 +235,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
233
235
|
if (((_a = props.config.add) == null ? void 0 : _a.is) !== false) {
|
|
234
236
|
array.push({
|
|
235
237
|
prop: 1,
|
|
236
|
-
label: "
|
|
238
|
+
label: getLocale("page.add"),
|
|
237
239
|
type: "primary"
|
|
238
240
|
});
|
|
239
241
|
}
|
|
240
242
|
if (((_b = props.config.delete) == null ? void 0 : _b.is) !== false && ((_c = tableConfig.value.config) == null ? void 0 : _c.ischecked)) {
|
|
241
243
|
array.push({
|
|
242
244
|
prop: 8,
|
|
243
|
-
label: "
|
|
245
|
+
label: getLocaleAdd("page.batch", "page.delete"),
|
|
244
246
|
type: "danger"
|
|
245
247
|
});
|
|
246
248
|
}
|
|
@@ -569,7 +571,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
569
571
|
class: normalizeClass(unref(cs).z())
|
|
570
572
|
}, [
|
|
571
573
|
createVNode(unref(Dialogs), {
|
|
572
|
-
title: (dialog.type == "add" ? "
|
|
574
|
+
title: (dialog.type == "add" ? unref(getLocale)("page.add") : unref(getLocale)("page.edit")) + props.config.name,
|
|
573
575
|
modelValue: dialog.visible,
|
|
574
576
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => dialog.visible = $event),
|
|
575
577
|
onConfirm
|
|
@@ -598,7 +600,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
598
600
|
_: 3
|
|
599
601
|
}, 8, ["title", "modelValue"]),
|
|
600
602
|
createVNode(unref(Dialogs), {
|
|
601
|
-
title: props.config.name + "
|
|
603
|
+
title: props.config.name + unref(getLocale)("page.details"),
|
|
602
604
|
modelValue: details.visible,
|
|
603
605
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => details.visible = $event),
|
|
604
606
|
"no-footer": ""
|
|
@@ -1,22 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
|
-
const index$
|
|
4
|
+
const index$3 = require("element-plus/es/components/pagination/index");
|
|
5
5
|
require("../../../hooks/index.cjs");
|
|
6
|
-
const index = require("../../../hooks/
|
|
7
|
-
const index$1 = require("../../../hooks/
|
|
6
|
+
const index = require("../../../hooks/locale/index.cjs");
|
|
7
|
+
const index$1 = require("../../../hooks/cssname/index.cjs");
|
|
8
|
+
const index$2 = require("../../../hooks/inherit/index.cjs");
|
|
8
9
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
9
10
|
__name: "index",
|
|
10
11
|
props: {
|
|
11
12
|
ispag: Boolean,
|
|
12
13
|
total: Number,
|
|
13
14
|
layout: String,
|
|
14
|
-
paginat: {
|
|
15
|
+
paginat: {
|
|
16
|
+
type: Object,
|
|
17
|
+
default() {
|
|
18
|
+
return {};
|
|
19
|
+
},
|
|
20
|
+
required: true
|
|
21
|
+
}
|
|
15
22
|
},
|
|
16
23
|
emits: ["size-change", "current-change"],
|
|
17
24
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
18
|
-
const
|
|
19
|
-
const
|
|
25
|
+
const { getLocale } = index.useLocale();
|
|
26
|
+
const cs = index$1.useCssName("paging");
|
|
27
|
+
const attrs = index$2.useInherit(vue.useAttrs());
|
|
20
28
|
const props = __props;
|
|
21
29
|
const emit = __emit;
|
|
22
30
|
const layout = vue.computed(() => {
|
|
@@ -40,7 +48,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
40
48
|
};
|
|
41
49
|
__expose({});
|
|
42
50
|
return (_ctx, _cache) => {
|
|
43
|
-
return vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
51
|
+
return vue.openBlock(), vue.createBlock(vue.unref(index$3.ElPagination), vue.mergeProps(vue.unref(attrs).assem, {
|
|
44
52
|
class: vue.unref(cs).z(),
|
|
45
53
|
"current-page": props.paginat.current,
|
|
46
54
|
"onUpdate:currentPage": _cache[0] || (_cache[0] = ($event) => props.paginat.current = $event),
|
|
@@ -55,9 +63,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
55
63
|
vue.createElementVNode("span", {
|
|
56
64
|
class: vue.normalizeClass(vue.unref(cs).z("slot"))
|
|
57
65
|
}, [
|
|
58
|
-
vue.createElementVNode("span", null,
|
|
59
|
-
vue.createElementVNode("span", null,
|
|
60
|
-
vue.createElementVNode("span", null,
|
|
66
|
+
vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(getLocale)("pag.total", props.paginat.current)), 1),
|
|
67
|
+
vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(getLocale)("pag.cur", ysalue.value)), 1),
|
|
68
|
+
vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(getLocale)("pag.per", props.paginat.pageSize)), 1)
|
|
61
69
|
], 2)
|
|
62
70
|
]),
|
|
63
71
|
_: 1
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineComponent, useAttrs, computed, createBlock, openBlock, unref, mergeProps, withCtx, createElementVNode, normalizeClass, toDisplayString } from "vue";
|
|
2
2
|
import { ElPagination } from "element-plus/es/components/pagination/index";
|
|
3
3
|
import "../../../hooks/index.js";
|
|
4
|
+
import { useLocale } from "../../../hooks/locale/index.js";
|
|
4
5
|
import { useCssName } from "../../../hooks/cssname/index.js";
|
|
5
6
|
import { useInherit } from "../../../hooks/inherit/index.js";
|
|
6
7
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -9,10 +10,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
9
10
|
ispag: Boolean,
|
|
10
11
|
total: Number,
|
|
11
12
|
layout: String,
|
|
12
|
-
paginat: {
|
|
13
|
+
paginat: {
|
|
14
|
+
type: Object,
|
|
15
|
+
default() {
|
|
16
|
+
return {};
|
|
17
|
+
},
|
|
18
|
+
required: true
|
|
19
|
+
}
|
|
13
20
|
},
|
|
14
21
|
emits: ["size-change", "current-change"],
|
|
15
22
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
23
|
+
const { getLocale } = useLocale();
|
|
16
24
|
const cs = useCssName("paging");
|
|
17
25
|
const attrs = useInherit(useAttrs());
|
|
18
26
|
const props = __props;
|
|
@@ -53,9 +61,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
53
61
|
createElementVNode("span", {
|
|
54
62
|
class: normalizeClass(unref(cs).z("slot"))
|
|
55
63
|
}, [
|
|
56
|
-
createElementVNode("span", null, "
|
|
57
|
-
createElementVNode("span", null, "
|
|
58
|
-
createElementVNode("span", null, "
|
|
64
|
+
createElementVNode("span", null, toDisplayString(unref(getLocale)("pag.total", props.paginat.current)), 1),
|
|
65
|
+
createElementVNode("span", null, toDisplayString(unref(getLocale)("pag.cur", ysalue.value)), 1),
|
|
66
|
+
createElementVNode("span", null, toDisplayString(unref(getLocale)("pag.per", props.paginat.pageSize)), 1)
|
|
59
67
|
], 2)
|
|
60
68
|
]),
|
|
61
69
|
_: 1
|
|
@@ -4,16 +4,18 @@ const vue = require("vue");
|
|
|
4
4
|
const elementPlus = require("element-plus");
|
|
5
5
|
const use = require("../../common/use.cjs");
|
|
6
6
|
const data = require("./data.cjs");
|
|
7
|
-
const index = require("../../../hooks/cssname/index.cjs");
|
|
8
|
-
const index$
|
|
9
|
-
const index$
|
|
10
|
-
const index$
|
|
7
|
+
const index$1 = require("../../../hooks/cssname/index.cjs");
|
|
8
|
+
const index$2 = require("../../select-scroll/index.cjs");
|
|
9
|
+
const index$3 = require("../../array/index.cjs");
|
|
10
|
+
const index$4 = require("../../inputs/index.cjs");
|
|
11
|
+
const index = require("../../../hooks/locale/index.cjs");
|
|
11
12
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
12
13
|
__name: "index",
|
|
13
14
|
props: data.dataProps,
|
|
14
15
|
emits: data.dataEmits,
|
|
15
16
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
16
|
-
const
|
|
17
|
+
const { getLocale } = index.useLocale();
|
|
18
|
+
const cs = index$1.useCssName("selector");
|
|
17
19
|
const props = __props;
|
|
18
20
|
const emit = __emit;
|
|
19
21
|
const data$1 = vue.reactive({
|
|
@@ -121,7 +123,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
121
123
|
visible: data$1.timeShow
|
|
122
124
|
}, {
|
|
123
125
|
reference: vue.withCtx(() => [
|
|
124
|
-
vue.createVNode(vue.unref(index$
|
|
126
|
+
vue.createVNode(vue.unref(index$3.Array), {
|
|
125
127
|
rangeSeparator: props.rangeSeparator,
|
|
126
128
|
startPlaceholder: props.startPlaceholder,
|
|
127
129
|
endPlaceholder: props.endPlaceholder,
|
|
@@ -130,7 +132,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
130
132
|
modelValue: [data$1.sname, data$1.ename],
|
|
131
133
|
onFocus: _cache[0] || (_cache[0] = ($event) => data$1.timeShow = true),
|
|
132
134
|
onClear: onCancel,
|
|
133
|
-
compon: vue.unref(index$
|
|
135
|
+
compon: vue.unref(index$4.Inputs)
|
|
134
136
|
}, null, 8, ["rangeSeparator", "startPlaceholder", "endPlaceholder", "clearable", "modelValue", "compon"])
|
|
135
137
|
]),
|
|
136
138
|
default: vue.withCtx(() => [
|
|
@@ -146,7 +148,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
146
148
|
vue.createElementVNode("div", {
|
|
147
149
|
class: vue.normalizeClass(vue.unref(cs).z("select-list-title"))
|
|
148
150
|
}, vue.toDisplayString(props.startPlaceholder), 3),
|
|
149
|
-
vue.createVNode(vue.unref(index$
|
|
151
|
+
vue.createVNode(vue.unref(index$2.SelectScroll), {
|
|
150
152
|
modelValue: zindex.value,
|
|
151
153
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => zindex.value = $event),
|
|
152
154
|
max: yindex.value,
|
|
@@ -160,7 +162,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
160
162
|
vue.createElementVNode("div", {
|
|
161
163
|
class: vue.normalizeClass(vue.unref(cs).z("select-list-title"))
|
|
162
164
|
}, vue.toDisplayString(props.endPlaceholder), 3),
|
|
163
|
-
vue.createVNode(vue.unref(index$
|
|
165
|
+
vue.createVNode(vue.unref(index$2.SelectScroll), {
|
|
164
166
|
min: zindex.value,
|
|
165
167
|
modelValue: yindex.value,
|
|
166
168
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => yindex.value = $event),
|
|
@@ -176,18 +178,18 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
176
178
|
text: "",
|
|
177
179
|
onClick: vue.withModifiers(onCancel, ["stop"])
|
|
178
180
|
}, {
|
|
179
|
-
default: vue.withCtx(() => [
|
|
180
|
-
vue.createTextVNode(vue.toDisplayString("
|
|
181
|
-
])
|
|
181
|
+
default: vue.withCtx(() => [
|
|
182
|
+
vue.createTextVNode(vue.toDisplayString(vue.unref(getLocale)("close")), 1)
|
|
183
|
+
]),
|
|
182
184
|
_: 1
|
|
183
185
|
}),
|
|
184
186
|
vue.createVNode(vue.unref(elementPlus.ElButton), {
|
|
185
187
|
type: "primary",
|
|
186
188
|
onClick: vue.withModifiers(onDetermine, ["stop"])
|
|
187
189
|
}, {
|
|
188
|
-
default: vue.withCtx(() => [
|
|
189
|
-
vue.createTextVNode(vue.toDisplayString("
|
|
190
|
-
])
|
|
190
|
+
default: vue.withCtx(() => [
|
|
191
|
+
vue.createTextVNode(vue.toDisplayString(vue.unref(getLocale)("form.confirm")), 1)
|
|
192
|
+
]),
|
|
191
193
|
_: 1
|
|
192
194
|
})
|
|
193
195
|
], 2)
|
|
@@ -6,11 +6,13 @@ import { useCssName } from "../../../hooks/cssname/index.js";
|
|
|
6
6
|
import { SelectScroll } from "../../select-scroll/index.js";
|
|
7
7
|
import { Array } from "../../array/index.js";
|
|
8
8
|
import { Inputs } from "../../inputs/index.js";
|
|
9
|
+
import { useLocale } from "../../../hooks/locale/index.js";
|
|
9
10
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
11
|
__name: "index",
|
|
11
12
|
props: dataProps,
|
|
12
13
|
emits: dataEmits,
|
|
13
14
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
15
|
+
const { getLocale } = useLocale();
|
|
14
16
|
const cs = useCssName("selector");
|
|
15
17
|
const props = __props;
|
|
16
18
|
const emit = __emit;
|
|
@@ -174,18 +176,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
174
176
|
text: "",
|
|
175
177
|
onClick: withModifiers(onCancel, ["stop"])
|
|
176
178
|
}, {
|
|
177
|
-
default: withCtx(() => [
|
|
178
|
-
createTextVNode(toDisplayString("
|
|
179
|
-
])
|
|
179
|
+
default: withCtx(() => [
|
|
180
|
+
createTextVNode(toDisplayString(unref(getLocale)("close")), 1)
|
|
181
|
+
]),
|
|
180
182
|
_: 1
|
|
181
183
|
}),
|
|
182
184
|
createVNode(unref(ElButton), {
|
|
183
185
|
type: "primary",
|
|
184
186
|
onClick: withModifiers(onDetermine, ["stop"])
|
|
185
187
|
}, {
|
|
186
|
-
default: withCtx(() => [
|
|
187
|
-
createTextVNode(toDisplayString("
|
|
188
|
-
])
|
|
188
|
+
default: withCtx(() => [
|
|
189
|
+
createTextVNode(toDisplayString(unref(getLocale)("form.confirm")), 1)
|
|
190
|
+
]),
|
|
189
191
|
_: 1
|
|
190
192
|
})
|
|
191
193
|
], 2)
|
|
@@ -50,7 +50,7 @@ const dataProps = {
|
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
const dataEmit = ["list-events", "selection"];
|
|
53
|
-
const useInit = (props2, emit, refTable, isEl) => {
|
|
53
|
+
const useInit = (props2, emit, refTable, getLocale, isEl) => {
|
|
54
54
|
var _a, _b;
|
|
55
55
|
const loading = vue.ref(false);
|
|
56
56
|
const mpagconfig = {
|
|
@@ -141,14 +141,14 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
141
141
|
list.splice(i + 1, 0, {
|
|
142
142
|
type: "index",
|
|
143
143
|
width: width.index,
|
|
144
|
-
label: "
|
|
144
|
+
label: getLocale("serial"),
|
|
145
145
|
fixed: true
|
|
146
146
|
});
|
|
147
147
|
} else {
|
|
148
148
|
list.unshift({
|
|
149
149
|
type: "index",
|
|
150
150
|
width: width.index,
|
|
151
|
-
label: "
|
|
151
|
+
label: getLocale("serial"),
|
|
152
152
|
fixed: true
|
|
153
153
|
});
|
|
154
154
|
}
|