jky-component-lib 0.0.99 → 0.0.100
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/es/amap/style.css +6 -2
- package/dist/es/amap/style2.css +12 -5
- package/dist/es/amap/style3.css +2 -13
- package/dist/es/components.js +2 -1
- package/dist/es/form/Form.vue.d.ts +2 -100
- package/dist/es/form/Form.vue.js +3 -1
- package/dist/es/index.js +2 -1
- package/dist/es/package.json.js +1 -1
- package/dist/es/page-table/PageTable.vue.d.ts +32 -423
- package/dist/es/page-table/PageTable.vue.js +78 -69
- package/dist/es/page-table/PageTableColumn.vue.d.ts +36 -0
- package/dist/es/page-table/PageTableColumn.vue.js +121 -0
- package/dist/es/page-table/PageTableColumn.vue3.js +5 -0
- package/dist/es/page-table/Toolbar.vue.d.ts +1 -1
- package/dist/es/page-table/Toolbar.vue.js +2 -2
- package/dist/es/page-table/index.d.ts +3 -1
- package/dist/es/page-table/index.js +4 -0
- package/dist/es/style.css +56 -0
- package/dist/lib/amap/style.css +6 -2
- package/dist/lib/amap/style2.css +12 -5
- package/dist/lib/amap/style3.css +2 -13
- package/dist/lib/components.js +1 -0
- package/dist/lib/form/Form.vue.d.ts +2 -100
- package/dist/lib/form/Form.vue.js +3 -1
- package/dist/lib/index.js +1 -0
- package/dist/lib/package.json.js +1 -1
- package/dist/lib/page-table/PageTable.vue.d.ts +32 -423
- package/dist/lib/page-table/PageTable.vue.js +75 -66
- package/dist/lib/page-table/PageTableColumn.vue.d.ts +36 -0
- package/dist/lib/page-table/PageTableColumn.vue.js +121 -0
- package/dist/lib/page-table/PageTableColumn.vue3.js +5 -0
- package/dist/lib/page-table/Toolbar.vue.d.ts +1 -1
- package/dist/lib/page-table/Toolbar.vue.js +2 -2
- package/dist/lib/page-table/index.d.ts +3 -1
- package/dist/lib/page-table/index.js +4 -0
- package/dist/lib/style.css +56 -0
- package/package.json +1 -1
|
@@ -37,12 +37,14 @@ var __async = (__this, __arguments, generator) => {
|
|
|
37
37
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
38
38
|
});
|
|
39
39
|
};
|
|
40
|
-
import { defineComponent,
|
|
40
|
+
import { defineComponent, useModel, computed, ref, watch, onMounted, resolveDirective, openBlock, createElementBlock, normalizeClass, createBlock, unref, withCtx, createVNode, mergeProps, createCommentVNode, resolveDynamicComponent, withDirectives, Fragment, renderList, renderSlot, normalizeStyle, mergeModels, nextTick } from "vue";
|
|
41
41
|
import { useFullscreen } from "@vueuse/core";
|
|
42
42
|
import { ElCard, ElTable, ElTableColumn, ElScrollbar, ElPagination } from "element-plus";
|
|
43
43
|
import { JkyForm } from "../form/index.js";
|
|
44
|
-
import _sfc_main$
|
|
44
|
+
import _sfc_main$3 from "./ActionColumn.vue.js";
|
|
45
45
|
/* empty css */
|
|
46
|
+
import _sfc_main$2 from "./PageTableColumn.vue.js";
|
|
47
|
+
/* empty css */
|
|
46
48
|
import _sfc_main$1 from "./Toolbar.vue.js";
|
|
47
49
|
/* empty css */
|
|
48
50
|
const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
|
|
@@ -60,6 +62,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
60
62
|
searchText: { default: "查询" },
|
|
61
63
|
resetText: { default: "重置" },
|
|
62
64
|
selection: { type: Boolean, default: false },
|
|
65
|
+
selectionColumn: { default: () => ({}) },
|
|
66
|
+
selectable: {},
|
|
63
67
|
selectedRows: { default: () => [] },
|
|
64
68
|
pagination: {},
|
|
65
69
|
border: { type: Boolean, default: true },
|
|
@@ -77,20 +81,40 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
77
81
|
autoSearchDelay: { default: 500 },
|
|
78
82
|
actionColumn: { type: [Object, Boolean] }
|
|
79
83
|
}, {
|
|
80
|
-
"
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
})
|
|
87
|
-
},
|
|
88
|
-
"paginationModifiers": {}
|
|
84
|
+
"pageNo": { default: 1 },
|
|
85
|
+
"pageNoModifiers": {},
|
|
86
|
+
"pageSize": { default: 10 },
|
|
87
|
+
"pageSizeModifiers": {},
|
|
88
|
+
"total": { default: 0 },
|
|
89
|
+
"totalModifiers": {}
|
|
89
90
|
}),
|
|
90
|
-
emits: /* @__PURE__ */ mergeModels(["search", "reset", "refresh", "update:form", "rowClick", "rowDblclick", "selectionChange", "pageChange", "sortChange"], ["update:
|
|
91
|
+
emits: /* @__PURE__ */ mergeModels(["search", "reset", "refresh", "update:form", "rowClick", "rowDblclick", "selectionChange", "pageChange", "sortChange"], ["update:pageNo", "update:pageSize", "update:total"]),
|
|
91
92
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
92
93
|
const props = __props;
|
|
93
94
|
const emit = __emit;
|
|
95
|
+
const defaults = {
|
|
96
|
+
pageNo: 1,
|
|
97
|
+
pageSize: 10,
|
|
98
|
+
total: 0
|
|
99
|
+
};
|
|
100
|
+
const pageNoModel = useModel(__props, "pageNo");
|
|
101
|
+
const pageSizeModel = useModel(__props, "pageSize");
|
|
102
|
+
const totalModel = useModel(__props, "total");
|
|
103
|
+
const pagination = computed({
|
|
104
|
+
get: () => __spreadValues({
|
|
105
|
+
pageNo: pageNoModel.value,
|
|
106
|
+
pageSize: pageSizeModel.value,
|
|
107
|
+
total: totalModel.value
|
|
108
|
+
}, props.pagination),
|
|
109
|
+
set: (newValue) => {
|
|
110
|
+
if (newValue.pageNo !== void 0)
|
|
111
|
+
pageNoModel.value = newValue.pageNo;
|
|
112
|
+
if (newValue.pageSize !== void 0)
|
|
113
|
+
pageSizeModel.value = newValue.pageSize;
|
|
114
|
+
if (newValue.total !== void 0)
|
|
115
|
+
totalModel.value = newValue.total;
|
|
116
|
+
}
|
|
117
|
+
});
|
|
94
118
|
const form = ref(props.form || {});
|
|
95
119
|
watch(() => props.form, (newVal) => {
|
|
96
120
|
if (newVal) {
|
|
@@ -104,7 +128,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
104
128
|
},
|
|
105
129
|
{ deep: true }
|
|
106
130
|
);
|
|
107
|
-
const pagination = useModel(__props, "pagination");
|
|
108
131
|
const internalData = ref([]);
|
|
109
132
|
const tableRef = ref(null);
|
|
110
133
|
const formRef = ref(null);
|
|
@@ -148,9 +171,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
148
171
|
var _a, _b;
|
|
149
172
|
return !!((_a = props.dataSource) == null ? void 0 : _a.api) || (((_b = pagination.value) == null ? void 0 : _b.total) || 0) > 0;
|
|
150
173
|
});
|
|
151
|
-
function getColumnProps(column) {
|
|
152
|
-
return __spreadValues({}, column);
|
|
153
|
-
}
|
|
154
174
|
const _showActionColumn = computed(() => {
|
|
155
175
|
if (props.actionColumn === false)
|
|
156
176
|
return false;
|
|
@@ -169,23 +189,28 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
169
189
|
function _handleActionColumnClick(_button, _row, _index) {
|
|
170
190
|
}
|
|
171
191
|
function buildApiParams() {
|
|
172
|
-
var _a, _b;
|
|
192
|
+
var _a, _b, _c, _d;
|
|
193
|
+
const pageNo = (_a = pageNoModel.value) != null ? _a : defaults.pageNo;
|
|
194
|
+
const pageSize = pageSizeModel.value || defaults.pageSize;
|
|
195
|
+
const responseProps = ((_b = props.dataSource) == null ? void 0 : _b.responseProps) || {};
|
|
196
|
+
const pageNoField = responseProps.pageNoField || "pageNo";
|
|
197
|
+
const pageSizeField = responseProps.pageSizeField || "pageSize";
|
|
173
198
|
const baseParams = {
|
|
174
|
-
|
|
175
|
-
|
|
199
|
+
[pageNoField]: pageNo,
|
|
200
|
+
[pageSizeField]: pageSize
|
|
176
201
|
};
|
|
177
|
-
if ((
|
|
202
|
+
if ((_c = props.dataSource) == null ? void 0 : _c.getApiParams) {
|
|
178
203
|
const dynamicParams = props.dataSource.getApiParams(form.value);
|
|
179
204
|
return __spreadValues(__spreadValues(__spreadValues({}, baseParams), form.value), dynamicParams);
|
|
180
205
|
}
|
|
181
|
-
if ((
|
|
206
|
+
if ((_d = props.dataSource) == null ? void 0 : _d.apiParams) {
|
|
182
207
|
return __spreadValues(__spreadValues(__spreadValues({}, baseParams), form.value), props.dataSource.apiParams);
|
|
183
208
|
}
|
|
184
209
|
return __spreadValues(__spreadValues({}, baseParams), form.value);
|
|
185
210
|
}
|
|
186
211
|
function loadData() {
|
|
187
212
|
return __async(this, null, function* () {
|
|
188
|
-
var _a;
|
|
213
|
+
var _a, _b, _c, _d;
|
|
189
214
|
if (!((_a = props.dataSource) == null ? void 0 : _a.api)) {
|
|
190
215
|
console.warn("PageTable: 没有配置 dataSource.api");
|
|
191
216
|
return;
|
|
@@ -197,12 +222,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
197
222
|
const responseProps = props.dataSource.responseProps || {};
|
|
198
223
|
const recordsField = responseProps.recordsField || "records";
|
|
199
224
|
const totalField = responseProps.totalField || "total";
|
|
225
|
+
const pageNoField = responseProps.pageNoField || "pageNo";
|
|
226
|
+
const pageSizeField = responseProps.pageSizeField || "pageSize";
|
|
200
227
|
internalData.value = result[recordsField] || [];
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
pageSize: pagination.value.pageSize
|
|
205
|
-
});
|
|
228
|
+
totalModel.value = (_b = result[totalField]) != null ? _b : defaults.total;
|
|
229
|
+
pageNoModel.value = (_c = result[pageNoField]) != null ? _c : defaults.pageNo;
|
|
230
|
+
pageSizeModel.value = (_d = result[pageSizeField]) != null ? _d : defaults.pageSize;
|
|
206
231
|
if (props.selectedRows && props.selectedRows.length > 0) {
|
|
207
232
|
setTimeout(() => {
|
|
208
233
|
if (tableRef.value) {
|
|
@@ -223,7 +248,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
223
248
|
} catch (error) {
|
|
224
249
|
console.error("PageTable: 加载数据失败:", error);
|
|
225
250
|
internalData.value = [];
|
|
226
|
-
|
|
251
|
+
totalModel.value = 0;
|
|
227
252
|
} finally {
|
|
228
253
|
isLoading.value = false;
|
|
229
254
|
refreshTableLayout();
|
|
@@ -234,47 +259,47 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
234
259
|
var _a;
|
|
235
260
|
emit("search", __spreadValues({}, form.value));
|
|
236
261
|
if ((_a = props.dataSource) == null ? void 0 : _a.api) {
|
|
237
|
-
|
|
262
|
+
pageNoModel.value = defaults.pageNo;
|
|
238
263
|
loadData();
|
|
239
264
|
}
|
|
240
265
|
}
|
|
241
266
|
function handleReset() {
|
|
242
|
-
var _a;
|
|
267
|
+
var _a, _b, _c;
|
|
243
268
|
emit("reset");
|
|
244
269
|
form.value = {};
|
|
245
270
|
if (formRef.value) {
|
|
246
|
-
formRef.value.resetFields();
|
|
271
|
+
(_b = (_a = formRef.value) == null ? void 0 : _a.form) == null ? void 0 : _b.resetFields();
|
|
247
272
|
}
|
|
248
|
-
if ((
|
|
249
|
-
|
|
273
|
+
if ((_c = props.dataSource) == null ? void 0 : _c.api) {
|
|
274
|
+
pageNoModel.value = defaults.pageNo;
|
|
250
275
|
loadData();
|
|
251
276
|
}
|
|
252
277
|
}
|
|
253
278
|
function handlePageChange(page) {
|
|
254
279
|
var _a;
|
|
255
|
-
|
|
280
|
+
pageNoModel.value = page;
|
|
256
281
|
if ((_a = props.dataSource) == null ? void 0 : _a.api) {
|
|
257
282
|
loadData();
|
|
258
283
|
} else if (pagination.value.onPageChange) {
|
|
259
284
|
pagination.value.onPageChange(page);
|
|
260
285
|
}
|
|
261
286
|
emit("pageChange", {
|
|
262
|
-
|
|
263
|
-
pageSize:
|
|
287
|
+
pageNo: pageNoModel.value || 1,
|
|
288
|
+
pageSize: pageSizeModel.value || 10
|
|
264
289
|
});
|
|
265
290
|
}
|
|
266
291
|
function handlePageSizeChange(size) {
|
|
267
292
|
var _a;
|
|
268
|
-
|
|
269
|
-
|
|
293
|
+
pageSizeModel.value = size;
|
|
294
|
+
pageNoModel.value = 1;
|
|
270
295
|
if ((_a = props.dataSource) == null ? void 0 : _a.api) {
|
|
271
296
|
loadData();
|
|
272
297
|
} else if (pagination.value.onPageSizeChange) {
|
|
273
298
|
pagination.value.onPageSizeChange(size);
|
|
274
299
|
}
|
|
275
300
|
emit("pageChange", {
|
|
276
|
-
|
|
277
|
-
pageSize:
|
|
301
|
+
pageNo: pageNoModel.value || 1,
|
|
302
|
+
pageSize: pageSizeModel.value || 10
|
|
278
303
|
});
|
|
279
304
|
}
|
|
280
305
|
const selectedCount = ref(0);
|
|
@@ -381,7 +406,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
381
406
|
"selected-count": selectedCount.value,
|
|
382
407
|
"toolbar-button-limit": __props.toolbarButtonLimit,
|
|
383
408
|
payload: {
|
|
384
|
-
|
|
409
|
+
pageNo: ((_d = pagination.value) == null ? void 0 : _d.pageNo) || 1,
|
|
385
410
|
pageSize: ((_e = pagination.value) == null ? void 0 : _e.pageSize) || 10,
|
|
386
411
|
total: ((_f = pagination.value) == null ? void 0 : _f.total) || 0,
|
|
387
412
|
tableData: internalData.value,
|
|
@@ -407,32 +432,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
407
432
|
default: withCtx(() => {
|
|
408
433
|
var _a3, _b3, _c3, _d2;
|
|
409
434
|
return [
|
|
410
|
-
__props.selection ? (openBlock(), createBlock(unref(ElTableColumn), {
|
|
435
|
+
__props.selection ? (openBlock(), createBlock(unref(ElTableColumn), mergeProps({
|
|
411
436
|
key: 0,
|
|
412
|
-
type: "selection",
|
|
413
437
|
width: "55",
|
|
414
438
|
align: "center"
|
|
415
|
-
})) : createCommentVNode("", true),
|
|
439
|
+
}, __props.selectionColumn, { type: "selection" }), null, 16)) : createCommentVNode("", true),
|
|
416
440
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, (column) => {
|
|
417
|
-
return openBlock(), createBlock(
|
|
418
|
-
key: column.prop
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
renderSlot(_ctx.$slots, `column-${column.prop}`, {
|
|
422
|
-
row: scope.row,
|
|
423
|
-
column: scope.column,
|
|
424
|
-
index: scope.$index
|
|
425
|
-
}, () => {
|
|
426
|
-
var _a4;
|
|
427
|
-
return [
|
|
428
|
-
column.render ? (openBlock(), createBlock(resolveDynamicComponent((_a4 = column.render) == null ? void 0 : _a4.call(column, scope)), { key: 0 })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
429
|
-
createTextVNode(toDisplayString(column.formatter ? column.formatter(scope.row, scope.column, scope.row[column.prop], scope.$index) : scope.row[column.prop]), 1)
|
|
430
|
-
], 64))
|
|
431
|
-
];
|
|
432
|
-
})
|
|
433
|
-
]),
|
|
434
|
-
_: 2
|
|
435
|
-
}, 1040);
|
|
441
|
+
return openBlock(), createBlock(_sfc_main$2, mergeProps({
|
|
442
|
+
key: column.prop || column.label,
|
|
443
|
+
ref_for: true
|
|
444
|
+
}, column), null, 16);
|
|
436
445
|
}), 128)),
|
|
437
446
|
_showActionColumn.value ? (openBlock(), createBlock(unref(ElTableColumn), {
|
|
438
447
|
key: 1,
|
|
@@ -444,7 +453,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
444
453
|
default: withCtx((scope) => {
|
|
445
454
|
var _a4, _b4, _c4;
|
|
446
455
|
return [
|
|
447
|
-
((_a4 = _actionColumnConfig.value) == null ? void 0 : _a4.render) ? (openBlock(), createBlock(resolveDynamicComponent((_c4 = (_b4 = _actionColumnConfig.value) == null ? void 0 : _b4.render) == null ? void 0 : _c4.call(_b4, scope)), { key: 0 })) : (openBlock(), createBlock(_sfc_main$
|
|
456
|
+
((_a4 = _actionColumnConfig.value) == null ? void 0 : _a4.render) ? (openBlock(), createBlock(resolveDynamicComponent((_c4 = (_b4 = _actionColumnConfig.value) == null ? void 0 : _b4.render) == null ? void 0 : _c4.call(_b4, scope)), { key: 0 })) : (openBlock(), createBlock(_sfc_main$3, {
|
|
448
457
|
key: 1,
|
|
449
458
|
row: scope.row,
|
|
450
459
|
index: scope.$index,
|
|
@@ -479,11 +488,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
479
488
|
var _a2, _b2, _c2, _d, _e, _f, _g, _h;
|
|
480
489
|
return [
|
|
481
490
|
createVNode(unref(ElPagination), mergeProps({
|
|
482
|
-
"current-page":
|
|
483
|
-
"onUpdate:currentPage": _cache[1] || (_cache[1] = ($event) =>
|
|
484
|
-
"page-size":
|
|
485
|
-
"onUpdate:pageSize": _cache[2] || (_cache[2] = ($event) =>
|
|
486
|
-
total:
|
|
491
|
+
"current-page": pageNoModel.value,
|
|
492
|
+
"onUpdate:currentPage": _cache[1] || (_cache[1] = ($event) => pageNoModel.value = $event),
|
|
493
|
+
"page-size": pageSizeModel.value,
|
|
494
|
+
"onUpdate:pageSize": _cache[2] || (_cache[2] = ($event) => pageSizeModel.value = $event),
|
|
495
|
+
total: totalModel.value,
|
|
487
496
|
"page-sizes": ((_a2 = pagination.value) == null ? void 0 : _a2.pageSizes) || [10, 20, 50, 100],
|
|
488
497
|
layout: ((_b2 = pagination.value) == null ? void 0 : _b2.layout) || "total, sizes, prev, pager, next, jumper",
|
|
489
498
|
"show-size-picker": (_d = (_c2 = pagination.value) == null ? void 0 : _c2.showSizePicker) != null ? _d : true,
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { PageTableColumnProps } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: Partial<Record<`column-${string}`, (_: {
|
|
5
|
+
row: any;
|
|
6
|
+
column: any;
|
|
7
|
+
index: any;
|
|
8
|
+
}) => any>>;
|
|
9
|
+
refs: {};
|
|
10
|
+
rootEl: any;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
13
|
+
declare const __VLS_component: import('vue').DefineComponent<PageTableColumnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<PageTableColumnProps> & Readonly<{}>, {
|
|
14
|
+
width: string | number;
|
|
15
|
+
label: string;
|
|
16
|
+
fixed: boolean | string;
|
|
17
|
+
formatter: (row: any, column: import('element-plus').TableColumnCtx<any>, cellValue: any, index: number) => VNode | string;
|
|
18
|
+
children: PageTableColumnProps[];
|
|
19
|
+
render: (scope: {
|
|
20
|
+
row: any;
|
|
21
|
+
column: import('element-plus').TableColumnCtx<any>;
|
|
22
|
+
index: number;
|
|
23
|
+
}) => any;
|
|
24
|
+
prop: string;
|
|
25
|
+
minWidth: string | number;
|
|
26
|
+
sortable: boolean | string;
|
|
27
|
+
align: string;
|
|
28
|
+
headerAlign: string;
|
|
29
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
30
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
31
|
+
export default _default;
|
|
32
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
33
|
+
new (): {
|
|
34
|
+
$slots: S;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import { defineComponent, computed, resolveComponent, openBlock, createBlock, unref, normalizeProps, guardReactiveProps, createSlots, withCtx, createElementBlock, Fragment, renderList, mergeProps, renderSlot, resolveDynamicComponent, createTextVNode, toDisplayString, createCommentVNode } from "vue";
|
|
21
|
+
import { ElTableColumn } from "element-plus";
|
|
22
|
+
import { omit } from "lodash-es";
|
|
23
|
+
const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
|
|
24
|
+
name: "JkyPageTableColumn"
|
|
25
|
+
}), {
|
|
26
|
+
__name: "PageTableColumn",
|
|
27
|
+
props: {
|
|
28
|
+
children: { default: () => [] },
|
|
29
|
+
render: { type: Function, default: void 0 },
|
|
30
|
+
id: {},
|
|
31
|
+
realWidth: {},
|
|
32
|
+
type: {},
|
|
33
|
+
label: { default: "" },
|
|
34
|
+
className: {},
|
|
35
|
+
labelClassName: {},
|
|
36
|
+
property: {},
|
|
37
|
+
prop: { default: "" },
|
|
38
|
+
width: { default: void 0 },
|
|
39
|
+
minWidth: { default: void 0 },
|
|
40
|
+
renderHeader: {},
|
|
41
|
+
sortable: { type: [Boolean, String], default: false },
|
|
42
|
+
sortMethod: {},
|
|
43
|
+
sortBy: {},
|
|
44
|
+
resizable: { type: Boolean },
|
|
45
|
+
columnKey: {},
|
|
46
|
+
rawColumnKey: {},
|
|
47
|
+
align: { default: "center" },
|
|
48
|
+
headerAlign: { default: "center" },
|
|
49
|
+
showOverflowTooltip: { type: [Boolean, Object] },
|
|
50
|
+
tooltipFormatter: {},
|
|
51
|
+
fixed: { type: [Boolean, String], default: void 0 },
|
|
52
|
+
formatter: { type: Function, default: void 0 },
|
|
53
|
+
selectable: {},
|
|
54
|
+
reserveSelection: { type: Boolean },
|
|
55
|
+
filterMethod: {},
|
|
56
|
+
filteredValue: {},
|
|
57
|
+
filters: {},
|
|
58
|
+
filterPlacement: {},
|
|
59
|
+
filterMultiple: { type: Boolean },
|
|
60
|
+
filterClassName: {},
|
|
61
|
+
index: {},
|
|
62
|
+
sortOrders: {},
|
|
63
|
+
renderCell: {},
|
|
64
|
+
colSpan: {},
|
|
65
|
+
rowSpan: {},
|
|
66
|
+
level: {},
|
|
67
|
+
filterable: { type: [Boolean, Function, Array] },
|
|
68
|
+
order: {},
|
|
69
|
+
isColumnGroup: { type: Boolean },
|
|
70
|
+
isSubColumn: { type: Boolean },
|
|
71
|
+
columns: {},
|
|
72
|
+
getColumnIndex: {},
|
|
73
|
+
no: {},
|
|
74
|
+
filterOpened: { type: Boolean },
|
|
75
|
+
renderFilterIcon: {},
|
|
76
|
+
renderExpand: {}
|
|
77
|
+
},
|
|
78
|
+
setup(__props) {
|
|
79
|
+
const props = __props;
|
|
80
|
+
const hasChildren = computed(() => {
|
|
81
|
+
return props.children && props.children.length > 0;
|
|
82
|
+
});
|
|
83
|
+
return (_ctx, _cache) => {
|
|
84
|
+
const _component_JkyPageTableColumn = resolveComponent("JkyPageTableColumn");
|
|
85
|
+
return openBlock(), createBlock(unref(ElTableColumn), normalizeProps(guardReactiveProps(unref(omit)(props, ["children"]))), createSlots({ _: 2 }, [
|
|
86
|
+
hasChildren.value ? {
|
|
87
|
+
name: "default",
|
|
88
|
+
fn: withCtx(() => [
|
|
89
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(props.children, (child) => {
|
|
90
|
+
return openBlock(), createBlock(_component_JkyPageTableColumn, mergeProps({
|
|
91
|
+
key: child.prop || child.label,
|
|
92
|
+
ref_for: true
|
|
93
|
+
}, unref(omit)(child, ["children"])), null, 16);
|
|
94
|
+
}), 128))
|
|
95
|
+
]),
|
|
96
|
+
key: "0"
|
|
97
|
+
} : {
|
|
98
|
+
name: "default",
|
|
99
|
+
fn: withCtx((scope) => [
|
|
100
|
+
renderSlot(_ctx.$slots, `column-${props.prop}`, {
|
|
101
|
+
row: scope.row,
|
|
102
|
+
column: scope.column,
|
|
103
|
+
index: scope.$index
|
|
104
|
+
}, () => {
|
|
105
|
+
var _a;
|
|
106
|
+
return [
|
|
107
|
+
props.render ? (openBlock(), createBlock(resolveDynamicComponent((_a = props.render) == null ? void 0 : _a.call(props, scope)), { key: 0 })) : props.prop ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
108
|
+
createTextVNode(toDisplayString(props.formatter ? props.formatter(scope.row, scope.column, scope.row[props.prop], scope.$index) : scope.row[props.prop]), 1)
|
|
109
|
+
], 64)) : createCommentVNode("", true)
|
|
110
|
+
];
|
|
111
|
+
})
|
|
112
|
+
]),
|
|
113
|
+
key: "1"
|
|
114
|
+
}
|
|
115
|
+
]), 1040);
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
}));
|
|
119
|
+
export {
|
|
120
|
+
_sfc_main as default
|
|
121
|
+
};
|
|
@@ -38,7 +38,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
38
38
|
selectedCount: { default: 0 },
|
|
39
39
|
toolbarButtonLimit: { default: 0 },
|
|
40
40
|
payload: { default: () => ({
|
|
41
|
-
|
|
41
|
+
pageNo: 1,
|
|
42
42
|
pageSize: 10,
|
|
43
43
|
total: 0,
|
|
44
44
|
tableData: [],
|
|
@@ -66,7 +66,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
66
66
|
});
|
|
67
67
|
function getButtonPayload() {
|
|
68
68
|
return props.payload || {
|
|
69
|
-
|
|
69
|
+
pageNo: 1,
|
|
70
70
|
pageSize: 10,
|
|
71
71
|
total: 0,
|
|
72
72
|
tableData: [],
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { InstallWithSFC } from '../utils/types';
|
|
2
2
|
import { default as ActionColumn } from './ActionColumn.vue';
|
|
3
3
|
import { default as PageTable } from './PageTable.vue';
|
|
4
|
-
|
|
4
|
+
import { default as PageTableColumn } from './PageTableColumn.vue';
|
|
5
|
+
export type { ActionColumnButtonConfig, ActionColumnConfig, ActionColumnEmits, ActionColumnProps, ApiParamsGetter, FilterItemConfig, PageTableColumnProps, PageTableEmits, PageTableExpose, PageTableProps, PaginationConfig, TableApiFunction, TableApiResponse, TableColumnConfig, TableDataSource, TableResponseProps, ToolbarButtonConfig, ToolbarEmits, ToolbarProps, } from './types';
|
|
5
6
|
export declare const JkyPageTable: InstallWithSFC<typeof PageTable>;
|
|
6
7
|
export declare const JkyActionColumn: InstallWithSFC<typeof ActionColumn>;
|
|
8
|
+
export declare const JkyPageTableColumn: InstallWithSFC<typeof PageTableColumn>;
|
|
7
9
|
export default JkyPageTable;
|
|
@@ -3,10 +3,14 @@ import _sfc_main$1 from "./ActionColumn.vue.js";
|
|
|
3
3
|
/* empty css */
|
|
4
4
|
import _sfc_main from "./PageTable.vue.js";
|
|
5
5
|
/* empty css */
|
|
6
|
+
import _sfc_main$2 from "./PageTableColumn.vue.js";
|
|
7
|
+
/* empty css */
|
|
6
8
|
const JkyPageTable = installWithSFC(_sfc_main);
|
|
7
9
|
const JkyActionColumn = installWithSFC(_sfc_main$1);
|
|
10
|
+
const JkyPageTableColumn = installWithSFC(_sfc_main$2);
|
|
8
11
|
export {
|
|
9
12
|
JkyActionColumn,
|
|
10
13
|
JkyPageTable,
|
|
14
|
+
JkyPageTableColumn,
|
|
11
15
|
JkyPageTable as default
|
|
12
16
|
};
|
package/dist/es/style.css
CHANGED
|
@@ -558,6 +558,10 @@
|
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
560
|
|
|
561
|
+
.m-0 {
|
|
562
|
+
margin: calc(var(--spacing) * 0);
|
|
563
|
+
}
|
|
564
|
+
|
|
561
565
|
.mx-auto {
|
|
562
566
|
margin-inline: auto;
|
|
563
567
|
}
|
|
@@ -1414,6 +1418,22 @@
|
|
|
1414
1418
|
mask-repeat: no-repeat;
|
|
1415
1419
|
}
|
|
1416
1420
|
|
|
1421
|
+
.icon-\[mdi--file-excel\] {
|
|
1422
|
+
width: 1em;
|
|
1423
|
+
height: 1em;
|
|
1424
|
+
-webkit-mask-image: var(--svg);
|
|
1425
|
+
-webkit-mask-image: var(--svg);
|
|
1426
|
+
-webkit-mask-image: var(--svg);
|
|
1427
|
+
mask-image: var(--svg);
|
|
1428
|
+
--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='black' d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8zm1.8 18H14l-2-3.4l-2 3.4H8.2l2.9-4.5L8.2 11H10l2 3.4l2-3.4h1.8l-2.9 4.5zM13 9V3.5L18.5 9z'/%3E%3C/svg%3E");
|
|
1429
|
+
background-color: currentColor;
|
|
1430
|
+
display: inline-block;
|
|
1431
|
+
-webkit-mask-size: 100% 100%;
|
|
1432
|
+
mask-size: 100% 100%;
|
|
1433
|
+
-webkit-mask-repeat: no-repeat;
|
|
1434
|
+
mask-repeat: no-repeat;
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1417
1437
|
.icon-\[mdi--format-list-bulleted\] {
|
|
1418
1438
|
width: 1em;
|
|
1419
1439
|
height: 1em;
|
|
@@ -1478,6 +1498,22 @@
|
|
|
1478
1498
|
mask-repeat: no-repeat;
|
|
1479
1499
|
}
|
|
1480
1500
|
|
|
1501
|
+
.icon-\[mdi--plus\] {
|
|
1502
|
+
width: 1em;
|
|
1503
|
+
height: 1em;
|
|
1504
|
+
-webkit-mask-image: var(--svg);
|
|
1505
|
+
-webkit-mask-image: var(--svg);
|
|
1506
|
+
-webkit-mask-image: var(--svg);
|
|
1507
|
+
mask-image: var(--svg);
|
|
1508
|
+
--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='black' d='M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z'/%3E%3C/svg%3E");
|
|
1509
|
+
background-color: currentColor;
|
|
1510
|
+
display: inline-block;
|
|
1511
|
+
-webkit-mask-size: 100% 100%;
|
|
1512
|
+
mask-size: 100% 100%;
|
|
1513
|
+
-webkit-mask-repeat: no-repeat;
|
|
1514
|
+
mask-repeat: no-repeat;
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1481
1517
|
.icon-\[mdi--refresh\] {
|
|
1482
1518
|
width: 1em;
|
|
1483
1519
|
height: 1em;
|
|
@@ -1494,6 +1530,22 @@
|
|
|
1494
1530
|
mask-repeat: no-repeat;
|
|
1495
1531
|
}
|
|
1496
1532
|
|
|
1533
|
+
.icon-\[mdi--upload\] {
|
|
1534
|
+
width: 1em;
|
|
1535
|
+
height: 1em;
|
|
1536
|
+
-webkit-mask-image: var(--svg);
|
|
1537
|
+
-webkit-mask-image: var(--svg);
|
|
1538
|
+
-webkit-mask-image: var(--svg);
|
|
1539
|
+
mask-image: var(--svg);
|
|
1540
|
+
--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='black' d='M9 16v-6H5l7-7l7 7h-4v6zm-4 4v-2h14v2z'/%3E%3C/svg%3E");
|
|
1541
|
+
background-color: currentColor;
|
|
1542
|
+
display: inline-block;
|
|
1543
|
+
-webkit-mask-size: 100% 100%;
|
|
1544
|
+
mask-size: 100% 100%;
|
|
1545
|
+
-webkit-mask-repeat: no-repeat;
|
|
1546
|
+
mask-repeat: no-repeat;
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1497
1549
|
.icon-\[mi--switch\] {
|
|
1498
1550
|
width: 1em;
|
|
1499
1551
|
height: 1em;
|
|
@@ -2377,6 +2429,10 @@
|
|
|
2377
2429
|
padding: calc(var(--spacing) * 8);
|
|
2378
2430
|
}
|
|
2379
2431
|
|
|
2432
|
+
.px-1 {
|
|
2433
|
+
padding-inline: calc(var(--spacing) * 1);
|
|
2434
|
+
}
|
|
2435
|
+
|
|
2380
2436
|
.px-2 {
|
|
2381
2437
|
padding-inline: calc(var(--spacing) * 2);
|
|
2382
2438
|
}
|
package/dist/lib/amap/style.css
CHANGED
package/dist/lib/amap/style2.css
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
|
+
/* AMap 高德地图组件样式 */
|
|
2
|
+
.jky-amap-container {
|
|
3
|
+
/* 地图容器样式 */
|
|
4
|
+
position: relative;
|
|
5
|
+
overflow: hidden;
|
|
1
6
|
|
|
2
|
-
/*
|
|
3
|
-
.amap-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
/* 隐藏高德地图的 logo 和版权信息(注意:商业使用请遵守高德地图条款) */
|
|
8
|
+
.amap-logo {
|
|
9
|
+
display: none !important;
|
|
10
|
+
}
|
|
11
|
+
.amap-copyright {
|
|
12
|
+
display: none !important;
|
|
13
|
+
}
|
|
7
14
|
}
|
package/dist/lib/amap/style3.css
CHANGED
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
/* AMap 高德地图组件样式 */
|
|
2
|
-
.jky-amap-container {
|
|
3
|
-
/* 地图容器样式 */
|
|
4
|
-
position: relative;
|
|
5
|
-
overflow: hidden;
|
|
6
1
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
display: none !important;
|
|
10
|
-
}
|
|
11
|
-
.amap-copyright {
|
|
12
|
-
display: none !important;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
2
|
+
/* 轨迹回放组件不需要额外样式 */
|
|
3
|
+
/* 所有样式通过 TailwindCSS 工具类或外部组件控制 */
|
package/dist/lib/components.js
CHANGED
|
@@ -44,6 +44,7 @@ exports.JkyPageHeader = index$9.JkyPageHeader;
|
|
|
44
44
|
exports.JkyPageLayout = index$a.JkyPageLayout;
|
|
45
45
|
exports.JkyActionColumn = index$1.JkyActionColumn;
|
|
46
46
|
exports.JkyPageTable = index$1.JkyPageTable;
|
|
47
|
+
exports.JkyPageTableColumn = index$1.JkyPageTableColumn;
|
|
47
48
|
exports.JkyRichEditor = index$b.JkyRichEditor;
|
|
48
49
|
exports.JkySayHello = index$c.JkySayHello;
|
|
49
50
|
exports.JkyTabs = index$d.JkyTabs;
|