@fangzhongya/fang-ui 0.0.28 → 0.0.30
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/index.cjs +6 -9
- package/dist/components/array/src/index.js +6 -9
- package/dist/components/box/index.css +12 -12
- package/dist/components/box/index.scss +1 -6
- package/dist/components/box-local/index.css +12 -12
- package/dist/components/cascader/index.d.ts +1 -1
- package/dist/components/cascader/src/index.d.ts +2 -2
- package/dist/components/checks/src/index.cjs +4 -4
- package/dist/components/checks/src/index.js +4 -4
- package/dist/components/common/list.cjs +2 -3
- package/dist/components/common/list.js +2 -3
- package/dist/components/common/use.cjs +11 -11
- package/dist/components/common/use.js +11 -11
- package/dist/components/cs-slot/src/index.cjs +6 -6
- package/dist/components/cs-slot/src/index.js +6 -6
- package/dist/components/dialog/src/index.cjs +7 -7
- package/dist/components/dialog/src/index.js +4 -4
- package/dist/components/dialog/style/index2.scss +1 -1
- package/dist/components/edit-float/src/index2.cjs +2 -2
- package/dist/components/edit-float/src/index2.js +2 -2
- package/dist/components/forms/index.d.ts +52 -149
- package/dist/components/forms/src/index.cjs +10 -9
- package/dist/components/forms/src/index.d.ts +102 -297
- package/dist/components/forms/src/index.js +4 -3
- package/dist/components/forms/src/setup.cjs +5 -8
- package/dist/components/forms/src/setup.js +5 -8
- package/dist/components/forms/src/util.cjs +1 -2
- package/dist/components/forms/src/util.js +1 -2
- package/dist/components/forms/style/index2.scss +6 -0
- package/dist/components/forms-div/style/index2.scss +1 -0
- package/dist/components/forms-drag/src/index.cjs +2 -2
- package/dist/components/forms-drag/src/index.js +2 -2
- package/dist/components/forms-item/src/index.cjs +7 -7
- package/dist/components/forms-item/src/index.js +2 -2
- package/dist/components/forms-item/style/index2.scss +4 -0
- package/dist/components/forms-items/src/index.cjs +2 -2
- package/dist/components/forms-items/src/index.js +2 -2
- package/dist/components/forms-items/style/index2.scss +2 -0
- package/dist/components/global-config/src/index.cjs +1 -1
- package/dist/components/global-config/src/index.js +1 -1
- package/dist/components/icon-picker/src/index.cjs +4 -6
- package/dist/components/icon-picker/src/index.js +4 -6
- package/dist/components/index.cjs +16 -14
- package/dist/components/index.d.ts +5 -4
- package/dist/components/index.js +10 -8
- package/dist/components/index.scss +6 -4
- package/dist/components/input/index.d.ts +1 -1
- package/dist/components/input/src/index.d.ts +2 -2
- package/dist/components/input-number/index.d.ts +1 -1
- package/dist/components/input-number/src/index.d.ts +2 -2
- package/dist/components/input-select/index.d.ts +1 -1
- package/dist/components/input-select/src/index.d.ts +2 -2
- package/dist/components/input-select/src/index2.cjs +1 -1
- package/dist/components/input-select/src/index2.js +1 -1
- package/dist/components/labels/src/index2.cjs +1 -2
- package/dist/components/labels/src/index2.js +1 -2
- package/dist/components/lists/common/img.cjs +1 -1
- package/dist/components/lists/common/img.d.ts +2 -0
- package/dist/components/lists/common/img.js +1 -1
- package/dist/components/lists/common/img2.cjs +5 -8
- package/dist/components/lists/common/img2.js +6 -9
- package/dist/components/menus/src/index.cjs +2 -2
- package/dist/components/menus/src/index.js +1 -1
- package/dist/components/menus/src/menu-ll.cjs +7 -7
- package/dist/components/menus/src/menu-ll.js +2 -2
- package/dist/components/menus/style/index2.scss +5 -0
- package/dist/components/page/index.css +245 -0
- package/dist/components/page/index.d.ts +3073 -0
- package/dist/components/page/index.scss +4 -0
- package/dist/components/page/src/index.cjs +81 -99
- package/dist/components/page/src/index.d.ts +5111 -0
- package/dist/components/page/src/index.js +70 -88
- package/dist/components/page/src/set-column2.cjs +2 -2
- package/dist/components/page/src/set-column2.js +2 -2
- package/dist/components/page/style/index2.scss +9 -0
- package/dist/components/{pagin → paging}/index.cjs +3 -3
- package/dist/components/{pagin → paging}/index.css +4 -3
- package/dist/components/{pagin → paging}/index.d.ts +2 -2
- package/dist/components/{pagin → paging}/index.js +3 -3
- package/dist/components/{pagin → paging}/index.scss +3 -2
- package/dist/components/{pagin → paging}/src/index.cjs +3 -3
- package/dist/components/{pagin → paging}/src/index.js +2 -2
- package/dist/components/paging/style/index2.scss +3 -0
- package/dist/components/right-key/index.d.ts +15 -0
- package/dist/components/right-key/src/data.cjs +4 -0
- package/dist/components/right-key/src/data.d.ts +4 -0
- package/dist/components/right-key/src/data.js +4 -0
- package/dist/components/right-key/src/index.cjs +5 -1
- package/dist/components/right-key/src/index.d.ts +9 -0
- package/dist/components/right-key/src/index.js +5 -1
- package/dist/components/role-select/src/index.cjs +1 -1
- package/dist/components/role-select/src/index.js +1 -1
- package/dist/components/selector/src/index2.cjs +2 -2
- package/dist/components/selector/src/index2.js +2 -2
- package/dist/components/selects/src/index.cjs +1 -1
- package/dist/components/selects/src/index.js +1 -1
- package/dist/components/stick-window/src/index.cjs +1 -1
- package/dist/components/stick-window/src/index.js +1 -1
- package/dist/components/switchs/src/index.cjs +4 -4
- package/dist/components/switchs/src/index.js +4 -4
- package/dist/components/table-list/src/table-list.cjs +10 -15
- package/dist/components/table-list/src/table-list.js +10 -15
- package/dist/components/tables/common/pagin.cjs +40 -57
- package/dist/components/tables/common/pagin.js +40 -57
- package/dist/components/tables/common/table-but.cjs +1 -2
- package/dist/components/tables/common/table-but.js +1 -2
- package/dist/components/tables/common/table-color.cjs +4 -5
- package/dist/components/tables/common/table-color.js +4 -5
- package/dist/components/tables/common/table-list.cjs +1 -2
- package/dist/components/tables/common/table-list.js +1 -2
- package/dist/components/tables/common/util.cjs +2 -3
- package/dist/components/tables/common/util.js +2 -3
- package/dist/components/tables/index.css +12 -15
- package/dist/components/tables/index.d.ts +1730 -0
- package/dist/components/tables/index.scss +17 -23
- package/dist/components/{el-tables → tables}/src/column.cjs +3 -3
- package/dist/components/{el-tables → tables}/src/column.js +2 -2
- package/dist/components/{el-tables → tables}/src/columns.cjs +3 -3
- package/dist/components/{el-tables → tables}/src/columns.js +3 -3
- package/dist/components/{el-tables → tables}/src/columns3.cjs +6 -6
- package/dist/components/{el-tables → tables}/src/columns3.js +3 -3
- package/dist/components/tables/src/index.cjs +158 -98
- package/dist/components/tables/src/index.d.ts +3103 -0
- package/dist/components/tables/src/index.js +158 -98
- package/dist/components/tables/style/index2.scss +5 -0
- package/dist/components/tables-form/index.cjs +1 -0
- package/dist/components/tables-form/index.js +1 -0
- package/dist/components/tables-form/index.scss +0 -0
- package/dist/components/tables-form/src/columns3.cjs +1 -1
- package/dist/components/tables-form/src/columns3.js +1 -1
- package/dist/components/tables-form/src/index.cjs +4 -7
- package/dist/components/tables-form/src/index.js +4 -7
- package/dist/components/tables-form/style/index.scss.cjs +1 -0
- package/dist/components/tables-form/style/index.scss.js +1 -0
- package/dist/components/tables-form/style/index2.scss +0 -0
- package/dist/components/{el-tables → tablesp}/index.cjs +3 -3
- package/dist/components/{tables-pagin → tablesp}/index.css +10 -9
- package/dist/components/tablesp/index.d.ts +1939 -0
- package/dist/components/{el-tables → tablesp}/index.js +3 -3
- package/dist/components/{tables-pagin → tablesp}/index.scss +5 -5
- package/dist/components/{tables-pagin → tablesp}/src/index.cjs +7 -8
- package/dist/components/tablesp/src/index.d.ts +3540 -0
- package/dist/components/{tables-pagin → tablesp}/src/index.js +7 -8
- package/dist/components/tablesp/style/index2.scss +4 -0
- package/dist/components/{vxe-tables → tabless}/index.cjs +3 -3
- package/dist/components/{el-tables → tabless}/index.css +15 -12
- package/dist/components/tabless/index.d.ts +1939 -0
- package/dist/components/{vxe-tables → tabless}/index.js +3 -3
- package/dist/components/tabless/index.scss +32 -0
- package/dist/components/tabless/src/index.cjs +118 -0
- package/dist/components/tabless/src/index.d.ts +3540 -0
- package/dist/components/tabless/src/index.js +118 -0
- package/dist/components/tabless/style/index2.scss +5 -0
- package/dist/components/{tables-pagin → tablesv}/index.cjs +3 -3
- package/dist/components/{vxe-tables → tablesv}/index.css +17 -17
- package/dist/components/{vxe-tables → tablesv}/index.d.ts +2 -2
- package/dist/components/{tables-pagin → tablesv}/index.js +3 -3
- package/dist/components/{vxe-tables → tablesv}/index.scss +2 -2
- package/dist/components/{vxe-tables → tablesv}/src/columns3.cjs +1 -1
- package/dist/components/{vxe-tables → tablesv}/src/columns3.js +1 -1
- package/dist/components/{vxe-tables → tablesv}/src/index.cjs +3 -4
- package/dist/components/{vxe-tables → tablesv}/src/index.js +3 -4
- package/dist/components/tablesv/style/index2.scss +1 -0
- package/dist/components/tablesvp/index.cjs +8 -0
- package/dist/components/tablesvp/index.css +130 -0
- package/dist/components/tablesvp/index.d.ts +480 -0
- package/dist/components/tablesvp/index.js +8 -0
- package/dist/components/tablesvp/index.scss +33 -0
- package/dist/components/tablesvp/src/data.d.ts +14 -0
- package/dist/components/tablesvp/src/index.cjs +86 -0
- package/dist/components/tablesvp/src/index.d.ts +630 -0
- package/dist/components/tablesvp/src/index.js +86 -0
- package/dist/components/tablesvp/src/index2.cjs +4 -0
- package/dist/components/tablesvp/src/index2.js +4 -0
- package/dist/components/tablesvp/style/index2.scss +4 -0
- package/dist/directives/adjust/index.cjs +1 -2
- package/dist/directives/adjust/index.js +1 -2
- package/dist/expand/{chunk-B6EXENNS.cjs → chunk-P5447R3I.cjs} +5 -4
- package/dist/expand/{chunk-Y7QESZWG.js → chunk-VZAQ2FM7.js} +5 -4
- package/dist/expand/components.cjs +5 -5
- package/dist/expand/components.js +1 -1
- package/dist/expand/config.cjs +2 -2
- package/dist/expand/config.js +1 -1
- package/dist/hooks/global-config/index.cjs +2 -5
- package/dist/hooks/global-config/index.js +2 -5
- package/dist/index.cjs +34 -32
- package/dist/index.css +130 -50
- package/dist/index.js +10 -8
- package/dist/index2.css +1 -1
- package/package.json +9 -9
- package/dist/components/el-tables/index.scss +0 -26
- package/dist/components/el-tables/src/index.cjs +0 -175
- package/dist/components/el-tables/src/index.js +0 -175
- /package/dist/components/{forms-items → forms-item}/index.css +0 -0
- /package/dist/components/{pagin → paging}/src/index.d.ts +0 -0
- /package/dist/components/{el-tables → paging}/src/index2.cjs +0 -0
- /package/dist/components/{el-tables → paging}/src/index2.js +0 -0
- /package/dist/components/{el-tables → tables}/src/column.d.ts +0 -0
- /package/dist/components/{el-tables → tables}/src/columns.d.ts +0 -0
- /package/dist/components/{el-tables → tables}/src/columns2.cjs +0 -0
- /package/dist/components/{el-tables → tables}/src/columns2.js +0 -0
- /package/dist/components/{el-tables → tables}/src/data.cjs +0 -0
- /package/dist/components/{el-tables → tables}/src/data.d.ts +0 -0
- /package/dist/components/{el-tables → tables}/src/data.js +0 -0
- /package/dist/components/{tables-pagin → tablesp}/src/data.d.ts +0 -0
- /package/dist/components/{pagin → tablesp}/src/index2.cjs +0 -0
- /package/dist/components/{pagin → tablesp}/src/index2.js +0 -0
- /package/dist/components/{tables-pagin → tabless}/src/index2.cjs +0 -0
- /package/dist/components/{tables-pagin → tabless}/src/index2.js +0 -0
- /package/dist/components/{vxe-tables → tablesv}/src/column.cjs +0 -0
- /package/dist/components/{vxe-tables → tablesv}/src/column.d.ts +0 -0
- /package/dist/components/{vxe-tables → tablesv}/src/column.js +0 -0
- /package/dist/components/{vxe-tables → tablesv}/src/columns.cjs +0 -0
- /package/dist/components/{vxe-tables → tablesv}/src/columns.d.ts +0 -0
- /package/dist/components/{vxe-tables → tablesv}/src/columns.js +0 -0
- /package/dist/components/{vxe-tables → tablesv}/src/columns2.cjs +0 -0
- /package/dist/components/{vxe-tables → tablesv}/src/columns2.js +0 -0
- /package/dist/components/{vxe-tables → tablesv}/src/data.cjs +0 -0
- /package/dist/components/{vxe-tables → tablesv}/src/data.d.ts +0 -0
- /package/dist/components/{vxe-tables → tablesv}/src/data.js +0 -0
- /package/dist/components/{vxe-tables → tablesv}/src/index.d.ts +0 -0
- /package/dist/components/{vxe-tables → tablesv}/src/index2.cjs +0 -0
- /package/dist/components/{vxe-tables → tablesv}/src/index2.js +0 -0
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { defineComponent, useSlots, ref, computed, reactive, watch, createElementBlock, openBlock, normalizeClass, unref, createVNode, createElementVNode, withCtx, createBlock, createCommentVNode, mergeProps, createSlots, renderList, renderSlot, normalizeProps, Fragment, withModifiers, createTextVNode, toDisplayString } from "vue";
|
|
2
2
|
import { useCssName } from "../../../hooks/cssname/index.js";
|
|
3
3
|
import { Forms } from "../../forms/index.js";
|
|
4
|
-
import {
|
|
4
|
+
import { Tablesp } from "../../tablesp/index.js";
|
|
5
5
|
import { Lists } from "../../lists/index.js";
|
|
6
6
|
import { Dialog } from "../../dialog/index.js";
|
|
7
|
-
import { ElButton
|
|
7
|
+
import { ElButton } from "element-plus/es/components/button/index";
|
|
8
|
+
import { ElMessage } from "element-plus/es/components/message/index";
|
|
9
|
+
import { ElMessageBox } from "element-plus/es/components/message-box/index";
|
|
8
10
|
import SetColumn from "./set-column.js";
|
|
9
11
|
import { comHandle } from "../../common/urls.js";
|
|
10
12
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -107,8 +109,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
107
109
|
const query = ref(props.value);
|
|
108
110
|
const isSenior = ref(false);
|
|
109
111
|
const getListQuery = () => {
|
|
110
|
-
|
|
111
|
-
const v = (_a = props.config.query) == null ? void 0 : _a.list;
|
|
112
|
+
const v = props.config.query?.list;
|
|
112
113
|
if (v && Array.isArray(v) && v.length > 0) {
|
|
113
114
|
return getColumnList(v);
|
|
114
115
|
} else {
|
|
@@ -121,9 +122,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
121
122
|
};
|
|
122
123
|
const listQuery = ref([]);
|
|
123
124
|
const setListQuery = () => {
|
|
124
|
-
var _a;
|
|
125
125
|
const list2 = getListQuery();
|
|
126
|
-
if (
|
|
126
|
+
if (props.config.query?.senior) {
|
|
127
127
|
let i = 0;
|
|
128
128
|
list2.forEach((obj) => {
|
|
129
129
|
if (obj.querybasis) {
|
|
@@ -141,8 +141,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
141
141
|
listQuery.value = list2;
|
|
142
142
|
};
|
|
143
143
|
const onRefresh = () => {
|
|
144
|
-
|
|
145
|
-
(_a = tableRef.value) == null ? void 0 : _a.getList();
|
|
144
|
+
tableRef.value?.getList();
|
|
146
145
|
};
|
|
147
146
|
const onQuery = (data) => {
|
|
148
147
|
console.log("onQuery", data);
|
|
@@ -150,9 +149,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
150
149
|
onRefresh();
|
|
151
150
|
};
|
|
152
151
|
const onReset = (data) => {
|
|
153
|
-
var _a;
|
|
154
152
|
console.log("onReset", data);
|
|
155
|
-
if (
|
|
153
|
+
if (props.config.query?.reset) {
|
|
156
154
|
query.value = data;
|
|
157
155
|
onRefresh();
|
|
158
156
|
}
|
|
@@ -168,7 +166,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
168
166
|
};
|
|
169
167
|
const butQuery = ref([]);
|
|
170
168
|
const getButQuery = () => {
|
|
171
|
-
var _a;
|
|
172
169
|
const arr = [
|
|
173
170
|
{
|
|
174
171
|
_id: "1",
|
|
@@ -181,7 +178,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
181
178
|
type: "default"
|
|
182
179
|
}
|
|
183
180
|
];
|
|
184
|
-
if (
|
|
181
|
+
if (props.config.query?.senior) {
|
|
185
182
|
const obj = {
|
|
186
183
|
_id: "3",
|
|
187
184
|
label: "高级",
|
|
@@ -217,9 +214,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
217
214
|
setList.value = getList();
|
|
218
215
|
};
|
|
219
216
|
const tableList = computed(() => {
|
|
220
|
-
var _a;
|
|
221
217
|
const arr = [];
|
|
222
|
-
if (
|
|
218
|
+
if (props.config.table?.operation !== false) {
|
|
223
219
|
arr.push({
|
|
224
220
|
prop: "operation",
|
|
225
221
|
label: "操作",
|
|
@@ -232,9 +228,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
232
228
|
});
|
|
233
229
|
let operationColumn = [];
|
|
234
230
|
const getOperationColumn = () => {
|
|
235
|
-
var _a, _b, _c;
|
|
236
231
|
const array = [];
|
|
237
|
-
if (
|
|
232
|
+
if (props.config.edit?.is !== false) {
|
|
238
233
|
array.push({
|
|
239
234
|
prop: 2,
|
|
240
235
|
label: "编辑",
|
|
@@ -242,7 +237,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
242
237
|
text: true
|
|
243
238
|
});
|
|
244
239
|
}
|
|
245
|
-
if (
|
|
240
|
+
if (props.config.delete?.is !== false) {
|
|
246
241
|
array.push({
|
|
247
242
|
prop: 4,
|
|
248
243
|
label: "删除",
|
|
@@ -250,7 +245,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
250
245
|
text: true
|
|
251
246
|
});
|
|
252
247
|
}
|
|
253
|
-
if (
|
|
248
|
+
if (props.config.details?.is !== false) {
|
|
254
249
|
array.push({
|
|
255
250
|
prop: 9,
|
|
256
251
|
label: "详情",
|
|
@@ -262,16 +257,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
262
257
|
};
|
|
263
258
|
let operationTop = [];
|
|
264
259
|
const getOperationTop = () => {
|
|
265
|
-
var _a, _b, _c;
|
|
266
260
|
const array = [];
|
|
267
|
-
if (
|
|
261
|
+
if (props.config.add?.is !== false) {
|
|
268
262
|
array.push({
|
|
269
263
|
prop: 1,
|
|
270
264
|
label: "添加",
|
|
271
265
|
type: "primary"
|
|
272
266
|
});
|
|
273
267
|
}
|
|
274
|
-
if (
|
|
268
|
+
if (props.config.delete?.is !== false && tableConfig.value.config?.ischecked) {
|
|
275
269
|
array.push({
|
|
276
270
|
prop: 8,
|
|
277
271
|
label: "批量删除",
|
|
@@ -281,11 +275,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
281
275
|
return array;
|
|
282
276
|
};
|
|
283
277
|
const onDelete = (array) => {
|
|
284
|
-
var _a, _b, _c;
|
|
285
278
|
const ts = ["是否删除所选" + props.config.name + "?"];
|
|
286
|
-
const label =
|
|
287
|
-
const prop =
|
|
288
|
-
const name =
|
|
279
|
+
const label = props.config.delete?.label || "name";
|
|
280
|
+
const prop = props.config.delete?.prop || "id";
|
|
281
|
+
const name = listObj[label]?.label || "内容";
|
|
289
282
|
array.forEach((obj) => {
|
|
290
283
|
ts.push(name + ":" + (obj[label] ?? ""));
|
|
291
284
|
});
|
|
@@ -295,20 +288,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
295
288
|
type: "warning",
|
|
296
289
|
dangerouslyUseHTMLString: true
|
|
297
290
|
}).then(() => {
|
|
298
|
-
|
|
299
|
-
const name2 = ((_a2 = props.config.delete) == null ? void 0 : _a2.name) || "ids";
|
|
291
|
+
const name2 = props.config.delete?.name || "ids";
|
|
300
292
|
const value = { [name2]: array.map((o) => o[prop]) };
|
|
301
293
|
console.log("onDelete", value);
|
|
302
|
-
const ajax =
|
|
294
|
+
const ajax = props.config.delete?.ajax;
|
|
303
295
|
if (ajax) {
|
|
304
296
|
const param = {
|
|
305
297
|
param: props.value
|
|
306
298
|
};
|
|
307
299
|
if (typeof ajax === "object") {
|
|
308
|
-
param.onRequestBefore = ajax
|
|
309
|
-
param.onRequestAfter = ajax
|
|
310
|
-
param.ajax = ajax
|
|
311
|
-
param.ajaxConfig = ajax
|
|
300
|
+
param.onRequestBefore = ajax?.onRequestBefore;
|
|
301
|
+
param.onRequestAfter = ajax?.onRequestAfter;
|
|
302
|
+
param.ajax = ajax?.url;
|
|
303
|
+
param.ajaxConfig = ajax?.config;
|
|
312
304
|
} else {
|
|
313
305
|
param.ajax = ajax;
|
|
314
306
|
}
|
|
@@ -331,10 +323,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
331
323
|
});
|
|
332
324
|
};
|
|
333
325
|
const onOperation = (item, row = {}) => {
|
|
334
|
-
var _a, _b;
|
|
335
326
|
if (item.prop === 1) {
|
|
336
327
|
dialog.value = {
|
|
337
|
-
...
|
|
328
|
+
...props.config.add?.value
|
|
338
329
|
};
|
|
339
330
|
dialog.type = "add";
|
|
340
331
|
dialog.visible = true;
|
|
@@ -355,16 +346,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
355
346
|
} else if (item.prop === 9) {
|
|
356
347
|
details.value = row;
|
|
357
348
|
details.visible = true;
|
|
358
|
-
const ajax =
|
|
349
|
+
const ajax = props.config.details?.ajax;
|
|
359
350
|
if (ajax) {
|
|
360
351
|
const param = {
|
|
361
352
|
param: props.value
|
|
362
353
|
};
|
|
363
354
|
if (typeof ajax === "object") {
|
|
364
|
-
param.onRequestBefore = ajax
|
|
365
|
-
param.onRequestAfter = ajax
|
|
366
|
-
param.ajax = ajax
|
|
367
|
-
param.ajaxConfig = ajax
|
|
355
|
+
param.onRequestBefore = ajax?.onRequestBefore;
|
|
356
|
+
param.onRequestAfter = ajax?.onRequestAfter;
|
|
357
|
+
param.ajax = ajax?.url;
|
|
358
|
+
param.ajaxConfig = ajax?.config;
|
|
368
359
|
} else {
|
|
369
360
|
param.ajax = ajax;
|
|
370
361
|
}
|
|
@@ -431,19 +422,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
431
422
|
const onConfirm = () => {
|
|
432
423
|
if (formRef.value) {
|
|
433
424
|
formRef.value.validate().then((data) => {
|
|
434
|
-
var _a, _b;
|
|
435
425
|
if (dialog.type === "add") {
|
|
436
426
|
console.log("添加", data);
|
|
437
|
-
const ajax =
|
|
427
|
+
const ajax = props.config.add?.ajax;
|
|
438
428
|
if (ajax) {
|
|
439
429
|
const param = {
|
|
440
430
|
param: props.value
|
|
441
431
|
};
|
|
442
432
|
if (typeof ajax === "object") {
|
|
443
|
-
param.onRequestBefore = ajax
|
|
444
|
-
param.onRequestAfter = ajax
|
|
445
|
-
param.ajax = ajax
|
|
446
|
-
param.ajaxConfig = ajax
|
|
433
|
+
param.onRequestBefore = ajax?.onRequestBefore;
|
|
434
|
+
param.onRequestAfter = ajax?.onRequestAfter;
|
|
435
|
+
param.ajax = ajax?.url;
|
|
436
|
+
param.ajaxConfig = ajax?.config;
|
|
447
437
|
} else {
|
|
448
438
|
param.ajax = ajax;
|
|
449
439
|
}
|
|
@@ -468,16 +458,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
468
458
|
}
|
|
469
459
|
} else if (dialog.type === "edit") {
|
|
470
460
|
console.log("编辑", data);
|
|
471
|
-
const ajax =
|
|
461
|
+
const ajax = props.config.edit?.ajax;
|
|
472
462
|
if (ajax) {
|
|
473
463
|
const param = {
|
|
474
464
|
param: props.value
|
|
475
465
|
};
|
|
476
466
|
if (typeof ajax === "object") {
|
|
477
|
-
param.onRequestBefore = ajax
|
|
478
|
-
param.onRequestAfter = ajax
|
|
479
|
-
param.ajax = ajax
|
|
480
|
-
param.ajaxConfig = ajax
|
|
467
|
+
param.onRequestBefore = ajax?.onRequestBefore;
|
|
468
|
+
param.onRequestAfter = ajax?.onRequestAfter;
|
|
469
|
+
param.ajax = ajax?.url;
|
|
470
|
+
param.ajaxConfig = ajax?.config;
|
|
481
471
|
} else {
|
|
482
472
|
param.ajax = ajax;
|
|
483
473
|
}
|
|
@@ -507,9 +497,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
507
497
|
}
|
|
508
498
|
};
|
|
509
499
|
const getListForm = () => {
|
|
510
|
-
var _a, _b;
|
|
511
500
|
if (dialog.type === "edit") {
|
|
512
|
-
const v =
|
|
501
|
+
const v = props.config.edit?.list;
|
|
513
502
|
if (v && Array.isArray(v) && v.length > 0) {
|
|
514
503
|
return getColumnList(v);
|
|
515
504
|
} else {
|
|
@@ -518,7 +507,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
518
507
|
});
|
|
519
508
|
}
|
|
520
509
|
} else {
|
|
521
|
-
const v =
|
|
510
|
+
const v = props.config.add?.list;
|
|
522
511
|
if (v && Array.isArray(v) && v.length > 0) {
|
|
523
512
|
return getColumnList(v);
|
|
524
513
|
} else {
|
|
@@ -537,8 +526,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
537
526
|
value: {}
|
|
538
527
|
});
|
|
539
528
|
const getListDetails = () => {
|
|
540
|
-
|
|
541
|
-
const v = (_a = props.config.details) == null ? void 0 : _a.list;
|
|
529
|
+
const v = props.config.details?.list;
|
|
542
530
|
if (v && Array.isArray(v) && v.length > 0) {
|
|
543
531
|
return getColumnList(v);
|
|
544
532
|
} else {
|
|
@@ -552,19 +540,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
552
540
|
watch(
|
|
553
541
|
() => props.config,
|
|
554
542
|
(newValue) => {
|
|
555
|
-
var _a, _b, _c, _d;
|
|
556
543
|
if (newValue) {
|
|
557
544
|
if (props.config.table) {
|
|
558
545
|
tableConfig.value = getTableConfig();
|
|
559
546
|
}
|
|
560
|
-
if (
|
|
547
|
+
if (props.config.query?.is !== false) {
|
|
561
548
|
setListQuery();
|
|
562
549
|
butQuery.value = getButQuery();
|
|
563
550
|
}
|
|
564
|
-
if (
|
|
551
|
+
if (props.config.details?.is !== false) {
|
|
565
552
|
setListDetails();
|
|
566
553
|
}
|
|
567
|
-
if (
|
|
554
|
+
if (props.config.add?.is !== false || props.config.edit?.is !== false) {
|
|
568
555
|
setListForm();
|
|
569
556
|
}
|
|
570
557
|
operationColumn = getOperationColumn();
|
|
@@ -579,16 +566,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
579
566
|
watch(
|
|
580
567
|
() => props.list,
|
|
581
568
|
() => {
|
|
582
|
-
var _a, _b, _c, _d;
|
|
583
569
|
listObj = getListObj();
|
|
584
570
|
setSetList();
|
|
585
|
-
if (
|
|
571
|
+
if (props.config.query?.is !== false) {
|
|
586
572
|
setListQuery();
|
|
587
573
|
}
|
|
588
|
-
if (
|
|
574
|
+
if (props.config.details?.is !== false) {
|
|
589
575
|
setListDetails();
|
|
590
576
|
}
|
|
591
|
-
if (
|
|
577
|
+
if (props.config.add?.is !== false || props.config.edit?.is !== false) {
|
|
592
578
|
setListForm();
|
|
593
579
|
}
|
|
594
580
|
},
|
|
@@ -598,7 +584,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
598
584
|
}
|
|
599
585
|
);
|
|
600
586
|
return (_ctx, _cache) => {
|
|
601
|
-
var _a, _b, _c;
|
|
602
587
|
return openBlock(), createElementBlock("div", {
|
|
603
588
|
class: normalizeClass(unref(cs).z())
|
|
604
589
|
}, [
|
|
@@ -637,37 +622,34 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
637
622
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => details.visible = $event),
|
|
638
623
|
"no-footer": ""
|
|
639
624
|
}, {
|
|
640
|
-
default: withCtx(() =>
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
]), 1040, ["value", "options", "compons", "list"])
|
|
658
|
-
];
|
|
659
|
-
}),
|
|
625
|
+
default: withCtx(() => [
|
|
626
|
+
createVNode(unref(Lists), mergeProps(props.config.details?.config, {
|
|
627
|
+
value: details.value,
|
|
628
|
+
options: props.options,
|
|
629
|
+
compons: props.compons,
|
|
630
|
+
list: list.value
|
|
631
|
+
}), createSlots({ _: 2 }, [
|
|
632
|
+
renderList(listSlots, (k) => {
|
|
633
|
+
return {
|
|
634
|
+
name: k,
|
|
635
|
+
fn: withCtx((scope) => [
|
|
636
|
+
unref(slots)["list-" + k] ? renderSlot(_ctx.$slots, "list-" + k, normalizeProps(mergeProps({ key: 0 }, scope))) : renderSlot(_ctx.$slots, k, normalizeProps(mergeProps({ key: 1 }, scope)))
|
|
637
|
+
])
|
|
638
|
+
};
|
|
639
|
+
})
|
|
640
|
+
]), 1040, ["value", "options", "compons", "list"])
|
|
641
|
+
]),
|
|
660
642
|
_: 3
|
|
661
643
|
}, 8, ["title", "modelValue"]),
|
|
662
644
|
createElementVNode("div", {
|
|
663
645
|
class: normalizeClass(unref(cs).z("header"))
|
|
664
646
|
}, [
|
|
665
647
|
renderSlot(_ctx.$slots, dataSlot.header),
|
|
666
|
-
|
|
648
|
+
props.config.query?.is !== false ? (openBlock(), createElementBlock("div", {
|
|
667
649
|
key: 0,
|
|
668
650
|
class: normalizeClass(unref(cs).z("query"))
|
|
669
651
|
}, [
|
|
670
|
-
createVNode(unref(Forms), mergeProps(
|
|
652
|
+
createVNode(unref(Forms), mergeProps(props.config.query?.config, {
|
|
671
653
|
query: "",
|
|
672
654
|
"label-position": "auto",
|
|
673
655
|
"model-value": props.value,
|
|
@@ -723,10 +705,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
723
705
|
list: props.list
|
|
724
706
|
}, null, 8, ["modelValue", "list"])) : createCommentVNode("", true)
|
|
725
707
|
], 2),
|
|
726
|
-
createVNode(unref(
|
|
708
|
+
createVNode(unref(Tablesp), {
|
|
727
709
|
ref_key: "tableRef",
|
|
728
710
|
ref: tableRef,
|
|
729
|
-
load:
|
|
711
|
+
load: props.config.query?.is === false,
|
|
730
712
|
config: tableConfig.value,
|
|
731
713
|
param: query.value,
|
|
732
714
|
options: props.options,
|
|
@@ -74,7 +74,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
74
74
|
}, [
|
|
75
75
|
vue.createVNode(vue.unref(elementPlus.ElButton), { onClick: onOpen }, {
|
|
76
76
|
default: vue.withCtx(() => _cache[4] || (_cache[4] = [
|
|
77
|
-
vue.createTextVNode("列设置")
|
|
77
|
+
vue.createTextVNode("列设置", -1)
|
|
78
78
|
])),
|
|
79
79
|
_: 1,
|
|
80
80
|
__: [4]
|
|
@@ -143,7 +143,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
143
143
|
onClick: vue.withModifiers(($event) => onDelete(element, index2), ["stop"])
|
|
144
144
|
}, {
|
|
145
145
|
default: vue.withCtx(() => _cache[5] || (_cache[5] = [
|
|
146
|
-
vue.createTextVNode(" 删除 ")
|
|
146
|
+
vue.createTextVNode(" 删除 ", -1)
|
|
147
147
|
])),
|
|
148
148
|
_: 2,
|
|
149
149
|
__: [5]
|
|
@@ -72,7 +72,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
72
72
|
}, [
|
|
73
73
|
createVNode(unref(ElButton), { onClick: onOpen }, {
|
|
74
74
|
default: withCtx(() => _cache[4] || (_cache[4] = [
|
|
75
|
-
createTextVNode("列设置")
|
|
75
|
+
createTextVNode("列设置", -1)
|
|
76
76
|
])),
|
|
77
77
|
_: 1,
|
|
78
78
|
__: [4]
|
|
@@ -141,7 +141,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
141
141
|
onClick: withModifiers(($event) => onDelete(element, index), ["stop"])
|
|
142
142
|
}, {
|
|
143
143
|
default: withCtx(() => _cache[5] || (_cache[5] = [
|
|
144
|
-
createTextVNode(" 删除 ")
|
|
144
|
+
createTextVNode(" 删除 ", -1)
|
|
145
145
|
])),
|
|
146
146
|
_: 2,
|
|
147
147
|
__: [5]
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
@use 'element-plus/theme-chalk/src/button.scss' as *;
|
|
2
|
+
@use 'element-plus/theme-chalk/src/message.scss' as *;
|
|
3
|
+
@use 'element-plus/theme-chalk/src/message-box.scss' as *;
|
|
4
|
+
|
|
5
|
+
@use '../../forms/style/index2.scss' as *;
|
|
6
|
+
@use '../../lists/style/index2.scss' as *;
|
|
7
|
+
@use '../../dialog/style/index2.scss' as *;
|
|
8
|
+
@use '../../tablesp/style/index2.scss' as *;
|
|
9
|
+
@use '../index.scss' as *;
|
|
@@ -3,6 +3,6 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
3
3
|
;/* empty css */
|
|
4
4
|
const withInstall = require("../../utils/vues/withInstall.cjs");
|
|
5
5
|
const index_vue_vue_type_script_setup_true_lang = require("./src/index.cjs");
|
|
6
|
-
const
|
|
7
|
-
exports.
|
|
8
|
-
exports.default =
|
|
6
|
+
const Paging = withInstall.withInstall(index_vue_vue_type_script_setup_true_lang.default, "Paging");
|
|
7
|
+
exports.Paging = Paging;
|
|
8
|
+
exports.default = Paging;
|
|
@@ -12,16 +12,17 @@
|
|
|
12
12
|
--g-main-bg: var(--bg-color-page);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
.
|
|
15
|
+
.paging {
|
|
16
16
|
padding: 10px;
|
|
17
17
|
}
|
|
18
|
-
.
|
|
18
|
+
.paging-slot {
|
|
19
19
|
padding-left: 10px;
|
|
20
20
|
font-size: 14px;
|
|
21
21
|
font-weight: 400;
|
|
22
22
|
color: #9b9b9b;
|
|
23
|
+
white-space: pre-wrap;
|
|
23
24
|
}
|
|
24
|
-
.
|
|
25
|
+
.paging .el-pagination__total {
|
|
25
26
|
font-size: 14px;
|
|
26
27
|
font-weight: 400;
|
|
27
28
|
color: #9b9b9b;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CreateComponentPublicInstanceWithMixins, ExtractPropTypes, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps, Plugin } from 'vue';
|
|
2
|
-
declare const
|
|
2
|
+
declare const Paging: {
|
|
3
3
|
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
|
|
4
4
|
ispag: BooleanConstructor;
|
|
5
5
|
total: NumberConstructor;
|
|
@@ -57,4 +57,4 @@ declare const Pagin: {
|
|
|
57
57
|
}, string, {
|
|
58
58
|
ispag: boolean;
|
|
59
59
|
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & Plugin;
|
|
60
|
-
export {
|
|
60
|
+
export { Paging, Paging as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
import { withInstall } from "../../utils/vues/withInstall.js";
|
|
3
3
|
import _sfc_main from "./src/index.js";
|
|
4
|
-
const
|
|
4
|
+
const Paging = withInstall(_sfc_main, "Paging");
|
|
5
5
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
Paging,
|
|
7
|
+
Paging as default
|
|
8
8
|
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
@use '../css/common.scss' as *;
|
|
2
2
|
|
|
3
|
-
$
|
|
4
|
-
@include b($
|
|
3
|
+
$paging: 'paging';
|
|
4
|
+
@include b($paging) {
|
|
5
5
|
padding: 10px;
|
|
6
6
|
&-slot {
|
|
7
7
|
padding-left: 10px;
|
|
8
8
|
font-size: 14px;
|
|
9
9
|
font-weight: 400;
|
|
10
10
|
color: #9b9b9b;
|
|
11
|
+
white-space: pre-wrap;
|
|
11
12
|
}
|
|
12
13
|
.#{e()}pagination__total {
|
|
13
14
|
font-size: 14px;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
|
-
const
|
|
4
|
+
const index$2 = require("element-plus/es/components/pagination/index");
|
|
5
5
|
const index = require("../../../hooks/cssname/index.cjs");
|
|
6
6
|
require("@fangzhongya/utils/basic/string/splitUpper");
|
|
7
7
|
require("@fangzhongya/utils/basic/array/isArray");
|
|
@@ -27,7 +27,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
27
27
|
},
|
|
28
28
|
emits: ["size-change", "current-change"],
|
|
29
29
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
30
|
-
const cs = index.useCssName("
|
|
30
|
+
const cs = index.useCssName("paging");
|
|
31
31
|
const attrs = index$1.useInherit(vue.useAttrs());
|
|
32
32
|
const props = __props;
|
|
33
33
|
const emit = __emit;
|
|
@@ -53,7 +53,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
53
53
|
};
|
|
54
54
|
__expose({});
|
|
55
55
|
return (_ctx, _cache) => {
|
|
56
|
-
return vue.openBlock(), vue.createBlock(vue.unref(
|
|
56
|
+
return vue.openBlock(), vue.createBlock(vue.unref(index$2.ElPagination), vue.mergeProps(vue.unref(attrs).assem, {
|
|
57
57
|
class: vue.unref(cs).z(),
|
|
58
58
|
"current-page": props.paginat.current,
|
|
59
59
|
"onUpdate:currentPage": _cache[0] || (_cache[0] = ($event) => props.paginat.current = $event),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, useAttrs, computed, createBlock, openBlock, unref, mergeProps, withCtx, createElementVNode, normalizeClass, toDisplayString } from "vue";
|
|
2
|
-
import { ElPagination } from "element-plus";
|
|
2
|
+
import { ElPagination } from "element-plus/es/components/pagination/index";
|
|
3
3
|
import { useCssName } from "../../../hooks/cssname/index.js";
|
|
4
4
|
import "@fangzhongya/utils/basic/string/splitUpper";
|
|
5
5
|
import "@fangzhongya/utils/basic/array/isArray";
|
|
@@ -25,7 +25,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
25
25
|
},
|
|
26
26
|
emits: ["size-change", "current-change"],
|
|
27
27
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
28
|
-
const cs = useCssName("
|
|
28
|
+
const cs = useCssName("paging");
|
|
29
29
|
const attrs = useInherit(useAttrs());
|
|
30
30
|
const props = __props;
|
|
31
31
|
const emit = __emit;
|
|
@@ -25,6 +25,10 @@ declare const RightKey: {
|
|
|
25
25
|
type: StringConstructor[];
|
|
26
26
|
default: string;
|
|
27
27
|
};
|
|
28
|
+
level: {
|
|
29
|
+
type: NumberConstructor;
|
|
30
|
+
default: number;
|
|
31
|
+
};
|
|
28
32
|
label: {
|
|
29
33
|
type: (FunctionConstructor | StringConstructor)[];
|
|
30
34
|
default: string;
|
|
@@ -43,6 +47,7 @@ declare const RightKey: {
|
|
|
43
47
|
disabled: boolean;
|
|
44
48
|
options: ObjAny[];
|
|
45
49
|
domClass: string;
|
|
50
|
+
level: number;
|
|
46
51
|
}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {
|
|
47
52
|
refRightKey: HTMLDivElement;
|
|
48
53
|
refRightKeyBox: HTMLDivElement;
|
|
@@ -77,6 +82,10 @@ declare const RightKey: {
|
|
|
77
82
|
type: StringConstructor[];
|
|
78
83
|
default: string;
|
|
79
84
|
};
|
|
85
|
+
level: {
|
|
86
|
+
type: NumberConstructor;
|
|
87
|
+
default: number;
|
|
88
|
+
};
|
|
80
89
|
label: {
|
|
81
90
|
type: (FunctionConstructor | StringConstructor)[];
|
|
82
91
|
default: string;
|
|
@@ -95,6 +104,7 @@ declare const RightKey: {
|
|
|
95
104
|
disabled: boolean;
|
|
96
105
|
options: ObjAny[];
|
|
97
106
|
domClass: string;
|
|
107
|
+
level: number;
|
|
98
108
|
}>;
|
|
99
109
|
__isFragment?: never;
|
|
100
110
|
__isTeleport?: never;
|
|
@@ -123,6 +133,10 @@ declare const RightKey: {
|
|
|
123
133
|
type: StringConstructor[];
|
|
124
134
|
default: string;
|
|
125
135
|
};
|
|
136
|
+
level: {
|
|
137
|
+
type: NumberConstructor;
|
|
138
|
+
default: number;
|
|
139
|
+
};
|
|
126
140
|
label: {
|
|
127
141
|
type: (FunctionConstructor | StringConstructor)[];
|
|
128
142
|
default: string;
|
|
@@ -141,6 +155,7 @@ declare const RightKey: {
|
|
|
141
155
|
disabled: boolean;
|
|
142
156
|
options: ObjAny[];
|
|
143
157
|
domClass: string;
|
|
158
|
+
level: number;
|
|
144
159
|
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
145
160
|
$slots: Partial<Record<string, (_: {}) => any>>;
|
|
146
161
|
}) & Plugin;
|