@oiij/naive-ui 0.0.63 → 0.0.65
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/_virtual/_/plugin-vue/export-helper.js +9 -0
- package/dist/components/_utils/cssr-bem.js +7 -0
- package/dist/components/_utils/prismjs.js +16 -0
- package/dist/components/bubble/Bubble.js +67 -0
- package/dist/components/bubble/Bubble.vue.d.ts +51 -46
- package/dist/components/bubble/bubble.cssr.js +23 -0
- package/dist/components/bubble/index.d.ts +19 -15
- package/dist/components/config-providers/ConfigProviders.js +78 -0
- package/dist/components/config-providers/ConfigProviders.vue.d.ts +37 -33
- package/dist/components/config-providers/index.d.ts +28 -24
- package/dist/components/copy-button/CopyButton.js +50 -0
- package/dist/components/copy-button/CopyButton.vue.d.ts +36 -30
- package/dist/components/copy-button/index.d.ts +13 -9
- package/dist/components/data-table-plus/DataTablePlus.js +374 -0
- package/dist/components/data-table-plus/DataTablePlus.vue.d.ts +365 -260
- package/dist/components/data-table-plus/index.d.ts +54 -48
- package/dist/components/full-loading/FullLoading.js +70 -0
- package/dist/components/full-loading/FullLoading.vue.d.ts +36 -32
- package/dist/components/full-loading/full-loading.cssr.js +22 -0
- package/dist/components/full-loading/index.d.ts +16 -12
- package/dist/components/icons/MageArrowUp.js +29 -0
- package/dist/components/icons/MageCopyFill.js +21 -0
- package/dist/components/icons/MageMultiplyCircleFill.js +21 -0
- package/dist/components/icons/MageSearch.js +25 -0
- package/dist/components/index.d.ts +31 -15
- package/dist/components/preset-form/PresetForm.js +176 -0
- package/dist/components/preset-form/PresetForm.vue.d.ts +82 -74
- package/dist/components/preset-form/_utils.js +16 -0
- package/dist/components/preset-form/index.d.ts +34 -29
- package/dist/components/preset-input/PresetInput.js +87 -0
- package/dist/components/preset-input/PresetInput.vue.d.ts +20 -15
- package/dist/components/preset-input/index.d.ts +147 -145
- package/dist/components/preset-picker/PresetPicker.js +209 -0
- package/dist/components/preset-picker/PresetPicker.vue.d.ts +62 -49
- package/dist/components/preset-picker/index.d.ts +55 -49
- package/dist/components/preset-select/PresetSelect.js +274 -0
- package/dist/components/preset-select/PresetSelect.vue.d.ts +190 -180
- package/dist/components/preset-select/index.d.ts +44 -38
- package/dist/components/remote-request/RemoteRequest.js +90 -0
- package/dist/components/remote-request/RemoteRequest.vue.d.ts +55 -49
- package/dist/components/remote-request/index.d.ts +23 -17
- package/dist/components/search-input/SearchInput.js +85 -0
- package/dist/components/search-input/SearchInput.vue.d.ts +48 -2332
- package/dist/components/search-input/index.d.ts +16 -12
- package/dist/components/toggle-editor/ToggleEditor.js +44 -0
- package/dist/components/toggle-editor/ToggleEditor.vue.d.ts +18 -1157
- package/dist/components/toggle-editor/index.d.ts +1 -1
- package/dist/components/tooltip-button/TooltipButton.js +31 -0
- package/dist/components/tooltip-button/TooltipButton.vue.d.ts +33 -28
- package/dist/components/tooltip-button/index.d.ts +11 -7
- package/dist/components/transition/BaseTransition.js +30 -0
- package/dist/components/transition/BaseTransition.vue.d.ts +23 -21
- package/dist/components/transition/index.d.ts +10 -6
- package/dist/components/transition/transition.cssr.js +20 -0
- package/dist/components/type-writer/TypeWriter.js +72 -0
- package/dist/components/type-writer/TypeWriter.vue.d.ts +34 -29
- package/dist/components/type-writer/index.d.ts +12 -8
- package/dist/components/type-writer/type-writer.cssr.js +27 -0
- package/dist/components.d.ts +33 -1
- package/dist/components.js +18 -7910
- package/dist/composables/useDataRequest.d.ts +1 -1
- package/dist/composables/useNaiveForm.d.ts +3 -4
- package/dist/composables/useNaiveForm.js +1 -3
- package/dist/composables/useNaiveTheme.js +1 -1
- package/package.json +20 -22
- package/dist/_virtual/rolldown_runtime.cjs +0 -25
- package/dist/components/_utils/cssr-bem.d.ts +0 -1
- package/dist/components/_utils/index.d.ts +0 -2
- package/dist/components/_utils/prismjs.d.ts +0 -1
- package/dist/components/bubble/bubble.cssr.d.ts +0 -2
- package/dist/components/full-loading/full-loading.cssr.d.ts +0 -2
- package/dist/components/icons/MageArrowUp.vue.d.ts +0 -2
- package/dist/components/icons/MageCopyFill.vue.d.ts +0 -2
- package/dist/components/icons/MageMultiplyCircleFill.vue.d.ts +0 -2
- package/dist/components/icons/MageSearch.vue.d.ts +0 -2
- package/dist/components/preset-form/_utils.d.ts +0 -8
- package/dist/components/transition/transition.cssr.d.ts +0 -13
- package/dist/components/type-writer/type-writer.cssr.d.ts +0 -2
- package/dist/components.cjs +0 -42
- package/dist/components.umd.cjs +0 -42
- package/dist/composables/_helper.cjs +0 -29
- package/dist/composables/_helper.d.cts +0 -10
- package/dist/composables/useDataRequest.cjs +0 -105
- package/dist/composables/useDataRequest.d.cts +0 -61
- package/dist/composables/useNaiveForm.cjs +0 -92
- package/dist/composables/useNaiveForm.d.cts +0 -40
- package/dist/composables/useNaiveTheme.cjs +0 -89
- package/dist/composables/useNaiveTheme.d.cts +0 -171
- package/dist/index.cjs +0 -7
- package/dist/index.d.cts +0 -4
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
import { useDataRequest } from "../../composables/useDataRequest.js";
|
|
2
|
+
import MageArrowUp_default from "../icons/MageArrowUp.js";
|
|
3
|
+
import SearchInput_default from "../search-input/SearchInput.js";
|
|
4
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, reactive, ref, renderSlot, toDisplayString, toRaw, toValue, unref, useTemplateRef, withCtx } from "vue";
|
|
5
|
+
import { NButton, NDataTable, NFlex, NPagination } from "naive-ui";
|
|
6
|
+
|
|
7
|
+
//#region src/components/data-table-plus/DataTablePlus.vue
|
|
8
|
+
const _hoisted_1 = { style: {
|
|
9
|
+
height: "100%",
|
|
10
|
+
display: "flex",
|
|
11
|
+
alignItems: "center"
|
|
12
|
+
} };
|
|
13
|
+
const _hoisted_2 = {
|
|
14
|
+
key: 0,
|
|
15
|
+
style: { fontSize: "16px" }
|
|
16
|
+
};
|
|
17
|
+
const _hoisted_3 = { style: {
|
|
18
|
+
flex: 1,
|
|
19
|
+
position: "relative"
|
|
20
|
+
} };
|
|
21
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
22
|
+
__name: "DataTablePlus",
|
|
23
|
+
props: {
|
|
24
|
+
api: { type: Function },
|
|
25
|
+
defaultParams: {},
|
|
26
|
+
manual: { type: Boolean },
|
|
27
|
+
fields: {},
|
|
28
|
+
requestOptions: {},
|
|
29
|
+
requestPlugins: {},
|
|
30
|
+
title: {},
|
|
31
|
+
scrollTop: { type: [
|
|
32
|
+
Number,
|
|
33
|
+
Boolean,
|
|
34
|
+
Object
|
|
35
|
+
] },
|
|
36
|
+
columns: {},
|
|
37
|
+
search: { type: [Object, Boolean] },
|
|
38
|
+
pagination: { type: [Object, Boolean] },
|
|
39
|
+
columnsFilterOptions: { type: Function },
|
|
40
|
+
columnsSorterOptions: { type: Function },
|
|
41
|
+
dataTableProps: {}
|
|
42
|
+
},
|
|
43
|
+
emits: [
|
|
44
|
+
"before",
|
|
45
|
+
"success",
|
|
46
|
+
"error",
|
|
47
|
+
"finally",
|
|
48
|
+
"clickRow",
|
|
49
|
+
"contextMenuRow",
|
|
50
|
+
"load",
|
|
51
|
+
"scroll",
|
|
52
|
+
"scrollBottom",
|
|
53
|
+
"update:checkedRowKeys",
|
|
54
|
+
"update:expandedRowKeys",
|
|
55
|
+
"update:filters",
|
|
56
|
+
"update:sorter",
|
|
57
|
+
"update:page",
|
|
58
|
+
"update:pageSize"
|
|
59
|
+
],
|
|
60
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
61
|
+
const emit = __emit;
|
|
62
|
+
const columnsReactive = reactive(__props.columns ?? []);
|
|
63
|
+
const dataTableRef = useTemplateRef("data-table-ref");
|
|
64
|
+
const _fields = {
|
|
65
|
+
page: "page",
|
|
66
|
+
pageSize: "pageSize",
|
|
67
|
+
filter: "filter",
|
|
68
|
+
sorter: "sorter",
|
|
69
|
+
list: "list",
|
|
70
|
+
count: "count",
|
|
71
|
+
rowKey: "id",
|
|
72
|
+
search: "search",
|
|
73
|
+
children: "children",
|
|
74
|
+
...__props.fields
|
|
75
|
+
};
|
|
76
|
+
const searchProps = { ...__props.search && typeof __props.search === "boolean" ? {} : __props.search };
|
|
77
|
+
const paginationProps = reactive({
|
|
78
|
+
showSizePicker: true,
|
|
79
|
+
pageSizes: [
|
|
80
|
+
10,
|
|
81
|
+
20,
|
|
82
|
+
30
|
|
83
|
+
],
|
|
84
|
+
pageSlot: 5,
|
|
85
|
+
prefix: (info) => {
|
|
86
|
+
return `共${info.itemCount}条数据`;
|
|
87
|
+
},
|
|
88
|
+
...__props.pagination && typeof __props.pagination === "boolean" ? {} : __props.pagination
|
|
89
|
+
});
|
|
90
|
+
const scrollTopProps = { ...typeof __props.scrollTop === "boolean" ? {
|
|
91
|
+
top: 180,
|
|
92
|
+
buttonProps: void 0
|
|
93
|
+
} : typeof __props.scrollTop === "number" ? {
|
|
94
|
+
top: __props.scrollTop,
|
|
95
|
+
buttonProps: void 0
|
|
96
|
+
} : typeof __props.scrollTop === "object" ? {
|
|
97
|
+
top: __props.scrollTop.top ?? 180,
|
|
98
|
+
buttonProps: __props.scrollTop.buttonProps ?? {}
|
|
99
|
+
} : {
|
|
100
|
+
top: 180,
|
|
101
|
+
buttonProps: void 0
|
|
102
|
+
} };
|
|
103
|
+
const filtersRef = ref();
|
|
104
|
+
const sortersRef = ref();
|
|
105
|
+
const _dataCache = [];
|
|
106
|
+
const { loading, data, error, params, list, pagination: paginationRef, run, runAsync, refresh, refreshAsync, cancel, mutate, setParams, runParams, runParamsAsync, onBefore, onSuccess, onError, onFinally } = useDataRequest(__props.api, {
|
|
107
|
+
defaultParams: {
|
|
108
|
+
[_fields.search]: null,
|
|
109
|
+
...__props.defaultParams
|
|
110
|
+
},
|
|
111
|
+
manual: __props.manual,
|
|
112
|
+
fields: _fields,
|
|
113
|
+
requestOptions: __props.requestOptions,
|
|
114
|
+
requestPlugins: __props.requestPlugins
|
|
115
|
+
});
|
|
116
|
+
onBefore((params$1) => {
|
|
117
|
+
emit("before", params$1);
|
|
118
|
+
});
|
|
119
|
+
onSuccess((data$1, params$1) => {
|
|
120
|
+
emit("success", data$1, params$1);
|
|
121
|
+
onSuccessEffect(data$1, params$1);
|
|
122
|
+
});
|
|
123
|
+
onError((err, params$1) => {
|
|
124
|
+
emit("error", err, params$1);
|
|
125
|
+
});
|
|
126
|
+
onFinally((params$1, data$1, err) => {
|
|
127
|
+
emit("finally", params$1, data$1, err);
|
|
128
|
+
});
|
|
129
|
+
const scrollX = computed(() => {
|
|
130
|
+
return __props.columns?.reduce((pre, cur) => {
|
|
131
|
+
return pre + Number(cur.width ?? 100);
|
|
132
|
+
}, 0);
|
|
133
|
+
});
|
|
134
|
+
function onSuccessEffect(data$1, _params) {
|
|
135
|
+
data$1[_fields.list]?.forEach((f) => {
|
|
136
|
+
if (!_dataCache.some((s) => s?.[_fields.rowKey] === f?.[_fields.rowKey])) _dataCache.push(f);
|
|
137
|
+
});
|
|
138
|
+
if (columnsReactive) {
|
|
139
|
+
for (const item of columnsReactive) if ("key" in item) {
|
|
140
|
+
if (filtersRef.value && item.key in filtersRef.value) {
|
|
141
|
+
const filterValues = filtersRef.value[item.key];
|
|
142
|
+
if (filterValues && "filter" in item && item.filter) if (item.filterMultiple) if (Array.isArray(filterValues)) item.filterOptionValues = filterValues;
|
|
143
|
+
else item.filterOptionValues = [filterValues];
|
|
144
|
+
else if (Array.isArray(filterValues)) item.filterOptionValue = filterValues[0];
|
|
145
|
+
else item.filterOptionValue = filterValues;
|
|
146
|
+
}
|
|
147
|
+
if ("sorter" in item) {
|
|
148
|
+
if (typeof item.sorter === "boolean") item.sortOrder = false;
|
|
149
|
+
}
|
|
150
|
+
if (sortersRef.value && item.key in sortersRef.value) {
|
|
151
|
+
const sorterValue = sortersRef.value[item.key];
|
|
152
|
+
if (sorterValue && "sorter" in item && item.sorter) item.sortOrder = sorterValue.order;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
const _scrollTop = ref(0);
|
|
158
|
+
const vOn = {
|
|
159
|
+
onUpdatePage: (page) => {
|
|
160
|
+
emit("update:page", page);
|
|
161
|
+
if (loading.value) return;
|
|
162
|
+
runParams({ [_fields.page]: page });
|
|
163
|
+
},
|
|
164
|
+
onUpdatePageSize: (pageSize) => {
|
|
165
|
+
emit("update:pageSize", pageSize);
|
|
166
|
+
if (loading.value) return;
|
|
167
|
+
runParams({ [_fields.pageSize]: pageSize });
|
|
168
|
+
},
|
|
169
|
+
onUpdateFilters: (filters, initiatorColumn) => {
|
|
170
|
+
emit("update:filters", filters, initiatorColumn);
|
|
171
|
+
filtersRef.value = filters;
|
|
172
|
+
runParams({
|
|
173
|
+
[_fields.page]: 1,
|
|
174
|
+
...__props.columnsFilterOptions ? __props.columnsFilterOptions(filters) : { [_fields.filter]: filters }
|
|
175
|
+
});
|
|
176
|
+
},
|
|
177
|
+
onUpdateSorter: (options) => {
|
|
178
|
+
emit("update:sorter", options);
|
|
179
|
+
const sorter = {};
|
|
180
|
+
if (Array.isArray(options)) for (const item of options) sorter[item.columnKey] = item;
|
|
181
|
+
else if (options) sorter[options.columnKey] = options;
|
|
182
|
+
sortersRef.value = sorter;
|
|
183
|
+
runParams({
|
|
184
|
+
[_fields.page]: 1,
|
|
185
|
+
...__props.columnsSorterOptions ? __props.columnsSorterOptions(sorter) : { [_fields.sorter]: sorter }
|
|
186
|
+
});
|
|
187
|
+
},
|
|
188
|
+
onLoad: (row) => {
|
|
189
|
+
return emit("load", row);
|
|
190
|
+
},
|
|
191
|
+
onScroll: (ev) => {
|
|
192
|
+
if (__props.scrollTop && ev.target && "scrollTop" in ev.target && typeof ev.target.scrollTop === "number") _scrollTop.value = ev.target.scrollTop;
|
|
193
|
+
emit("scroll", ev);
|
|
194
|
+
},
|
|
195
|
+
onUpdateCheckedRowKeys: (keys, _rows, meta) => {
|
|
196
|
+
emit("update:checkedRowKeys", keys, keys.map((m) => _dataCache.find((f) => f?.[_fields.rowKey] === m)), {
|
|
197
|
+
row: toRaw(meta.row),
|
|
198
|
+
action: meta.action
|
|
199
|
+
}, toRaw(list.value));
|
|
200
|
+
},
|
|
201
|
+
onUpdateExpandedRowKeys: (keys) => {
|
|
202
|
+
emit("update:expandedRowKeys", keys, toRaw(list.value));
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
function rowProps(row, index) {
|
|
206
|
+
return {
|
|
207
|
+
onClick: (event) => {
|
|
208
|
+
emit("clickRow", toRaw(row), index, event, toRaw(list.value));
|
|
209
|
+
},
|
|
210
|
+
onContextmenu: (event) => {
|
|
211
|
+
emit("contextMenuRow", toRaw(row), index, event, toRaw(list.value));
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
function onSearch(val) {
|
|
216
|
+
if (loading.value) return;
|
|
217
|
+
runParams({
|
|
218
|
+
[_fields.page]: 1,
|
|
219
|
+
[_fields.search]: val
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
function handleScrollTop() {
|
|
223
|
+
dataTableRef.value?.scrollTo({
|
|
224
|
+
left: 0,
|
|
225
|
+
top: 0,
|
|
226
|
+
behavior: "smooth"
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
const expose = {
|
|
230
|
+
loading,
|
|
231
|
+
data,
|
|
232
|
+
error,
|
|
233
|
+
params,
|
|
234
|
+
list,
|
|
235
|
+
pagination: paginationRef,
|
|
236
|
+
run,
|
|
237
|
+
runAsync,
|
|
238
|
+
refresh,
|
|
239
|
+
refreshAsync,
|
|
240
|
+
cancel,
|
|
241
|
+
mutate,
|
|
242
|
+
setParams,
|
|
243
|
+
runParams,
|
|
244
|
+
runParamsAsync,
|
|
245
|
+
onBefore,
|
|
246
|
+
onSuccess,
|
|
247
|
+
onError,
|
|
248
|
+
onFinally,
|
|
249
|
+
filters: filtersRef,
|
|
250
|
+
sorters: sortersRef,
|
|
251
|
+
dataTableRef
|
|
252
|
+
};
|
|
253
|
+
const templateBind = computed(() => {
|
|
254
|
+
return {
|
|
255
|
+
...expose,
|
|
256
|
+
loading: toValue(loading),
|
|
257
|
+
data: toValue(data),
|
|
258
|
+
error: toValue(error),
|
|
259
|
+
params: toValue(params),
|
|
260
|
+
list: toValue(list),
|
|
261
|
+
paginationRef: toValue(paginationRef),
|
|
262
|
+
filters: toValue(filtersRef),
|
|
263
|
+
sorters: toValue(sortersRef),
|
|
264
|
+
dataTableRef: toValue(dataTableRef)
|
|
265
|
+
};
|
|
266
|
+
});
|
|
267
|
+
__expose(expose);
|
|
268
|
+
return (_ctx, _cache) => {
|
|
269
|
+
return openBlock(), createBlock(unref(NFlex), {
|
|
270
|
+
style: {
|
|
271
|
+
width: "100%",
|
|
272
|
+
height: "100%"
|
|
273
|
+
},
|
|
274
|
+
vertical: ""
|
|
275
|
+
}, {
|
|
276
|
+
default: withCtx(() => [
|
|
277
|
+
renderSlot(_ctx.$slots, "header", normalizeProps(guardReactiveProps(templateBind.value)), () => [createVNode(unref(NFlex), null, {
|
|
278
|
+
default: withCtx(() => [
|
|
279
|
+
renderSlot(_ctx.$slots, "title", {}, () => [createElementVNode("div", _hoisted_1, [__props.title ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(__props.title), 1)) : createCommentVNode("v-if", true)])]),
|
|
280
|
+
__props.search ? (openBlock(), createBlock(unref(SearchInput_default), mergeProps({
|
|
281
|
+
key: 0,
|
|
282
|
+
style: {
|
|
283
|
+
marginLeft: "auto",
|
|
284
|
+
width: "280px"
|
|
285
|
+
},
|
|
286
|
+
value: unref(params)?.[0]?.[_fields.search],
|
|
287
|
+
loading: unref(loading)
|
|
288
|
+
}, searchProps, { "onUpdate:value": _cache[0] || (_cache[0] = (val) => onSearch(val)) }), null, 16, ["value", "loading"])) : createCommentVNode("v-if", true),
|
|
289
|
+
renderSlot(_ctx.$slots, "header-extra", normalizeProps(guardReactiveProps(templateBind.value)))
|
|
290
|
+
]),
|
|
291
|
+
_: 3
|
|
292
|
+
})]),
|
|
293
|
+
renderSlot(_ctx.$slots, "filter", normalizeProps(guardReactiveProps(templateBind.value))),
|
|
294
|
+
createElementVNode("div", _hoisted_3, [createVNode(unref(NDataTable), mergeProps({
|
|
295
|
+
ref: "data-table-ref",
|
|
296
|
+
remote: "",
|
|
297
|
+
"flex-height": "",
|
|
298
|
+
"single-line": false,
|
|
299
|
+
"scroll-x": scrollX.value,
|
|
300
|
+
style: {
|
|
301
|
+
width: "100%",
|
|
302
|
+
height: "100%"
|
|
303
|
+
},
|
|
304
|
+
"row-key": (row) => row?.[_fields.rowKey],
|
|
305
|
+
"children-key": _fields.children,
|
|
306
|
+
loading: unref(loading),
|
|
307
|
+
columns: columnsReactive,
|
|
308
|
+
data: unref(list),
|
|
309
|
+
"row-props": rowProps
|
|
310
|
+
}, __props.dataTableProps, {
|
|
311
|
+
"onUpdate:filters": vOn.onUpdateFilters,
|
|
312
|
+
"onUpdate:sorter": vOn.onUpdateSorter,
|
|
313
|
+
onLoad: vOn.onLoad,
|
|
314
|
+
onScroll: vOn.onScroll,
|
|
315
|
+
"onUpdate:checkedRowKeys": vOn.onUpdateCheckedRowKeys,
|
|
316
|
+
"onUpdate:expandedRowKeys": vOn.onUpdateExpandedRowKeys
|
|
317
|
+
}), {
|
|
318
|
+
empty: withCtx(() => [renderSlot(_ctx.$slots, "empty", normalizeProps(guardReactiveProps(templateBind.value)))]),
|
|
319
|
+
loading: withCtx(() => [renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(templateBind.value)))]),
|
|
320
|
+
_: 3
|
|
321
|
+
}, 16, [
|
|
322
|
+
"scroll-x",
|
|
323
|
+
"row-key",
|
|
324
|
+
"children-key",
|
|
325
|
+
"loading",
|
|
326
|
+
"columns",
|
|
327
|
+
"data",
|
|
328
|
+
"onUpdate:filters",
|
|
329
|
+
"onUpdate:sorter",
|
|
330
|
+
"onLoad",
|
|
331
|
+
"onScroll",
|
|
332
|
+
"onUpdate:checkedRowKeys",
|
|
333
|
+
"onUpdate:expandedRowKeys"
|
|
334
|
+
]), __props.scrollTop && _scrollTop.value > scrollTopProps.top ? (openBlock(), createBlock(unref(NButton), mergeProps({
|
|
335
|
+
key: 0,
|
|
336
|
+
secondary: "",
|
|
337
|
+
circle: "",
|
|
338
|
+
style: {
|
|
339
|
+
position: "absolute",
|
|
340
|
+
right: "20px",
|
|
341
|
+
bottom: "20px"
|
|
342
|
+
}
|
|
343
|
+
}, scrollTopProps.buttonProps, { onClick: handleScrollTop }), {
|
|
344
|
+
icon: withCtx(() => [createVNode(MageArrowUp_default)]),
|
|
345
|
+
_: 1
|
|
346
|
+
}, 16)) : createCommentVNode("v-if", true)]),
|
|
347
|
+
renderSlot(_ctx.$slots, "footer", normalizeProps(guardReactiveProps(templateBind.value)), () => [createVNode(unref(NFlex), null, {
|
|
348
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "footer-extra", normalizeProps(guardReactiveProps(templateBind.value))), __props.pagination ? (openBlock(), createBlock(unref(NPagination), mergeProps({
|
|
349
|
+
key: 0,
|
|
350
|
+
style: { marginLeft: "auto" },
|
|
351
|
+
disabled: unref(loading)
|
|
352
|
+
}, {
|
|
353
|
+
...paginationProps,
|
|
354
|
+
...unref(paginationRef)
|
|
355
|
+
}, {
|
|
356
|
+
"onUpdate:page": vOn.onUpdatePage,
|
|
357
|
+
"onUpdate:pageSize": vOn.onUpdatePageSize
|
|
358
|
+
}), null, 16, [
|
|
359
|
+
"disabled",
|
|
360
|
+
"onUpdate:page",
|
|
361
|
+
"onUpdate:pageSize"
|
|
362
|
+
])) : createCommentVNode("v-if", true)]),
|
|
363
|
+
_: 3
|
|
364
|
+
})])
|
|
365
|
+
]),
|
|
366
|
+
_: 3
|
|
367
|
+
});
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
});
|
|
371
|
+
var DataTablePlus_default = _sfc_main;
|
|
372
|
+
|
|
373
|
+
//#endregion
|
|
374
|
+
export { DataTablePlus_default as default };
|