@ithinkdt/ui 4.0.0-801 → 4.0.0-802

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.
@@ -1188,15 +1188,7 @@ const DataLocaleInput = /* @__PURE__ */ defineComponent({
1188
1188
  type: Boolean,
1189
1189
  default: !0
1190
1190
  },
1191
- pageSizes: {
1192
- type: Array,
1193
- default: () => [
1194
- 10,
1195
- 20,
1196
- 30,
1197
- 50
1198
- ]
1199
- }
1191
+ pageSizes: { type: Array }
1200
1192
  },
1201
1193
  emits: { change: () => !0 },
1202
1194
  setup(t, { emit: n }) {
@@ -1206,14 +1198,19 @@ const DataLocaleInput = /* @__PURE__ */ defineComponent({
1206
1198
  }), a = (e) => n("change", {
1207
1199
  pageSize: e,
1208
1200
  currentPage: t.resetPageOnSizeChange ? 1 : t.currentPage ?? t.page?.currentPage ?? 1
1209
- });
1201
+ }), o = inject(DataPagination.DEFAULT_PAGE_SIZES_INJECTION_KEY, () => [
1202
+ 10,
1203
+ 20,
1204
+ 30,
1205
+ 50
1206
+ ], !0);
1210
1207
  return () => createVNode(NPagination, {
1211
1208
  page: t.currentPage ?? t.page?.currentPage,
1212
1209
  itemCount: t.total,
1213
1210
  pageSize: t.pageSize ?? t.page?.pageSize,
1214
1211
  onUpdatePage: i,
1215
1212
  onUpdatePageSize: a,
1216
- pageSizes: t.pageSizes,
1213
+ pageSizes: t.pageSizes || o,
1217
1214
  showQuickJumper: !0,
1218
1215
  showSizePicker: !0,
1219
1216
  style: "justify-content: flex-end"
@@ -1223,6 +1220,7 @@ const DataLocaleInput = /* @__PURE__ */ defineComponent({
1223
1220
  });
1224
1221
  }
1225
1222
  });
1223
+ DataPagination.DEFAULT_PAGE_SIZES_INJECTION_KEY = Symbol();
1226
1224
  function _isSlot$3(e) {
1227
1225
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !isVNode(e);
1228
1226
  }
@@ -1,2 +1,2 @@
1
- import { _ as dataFormActionsProps, a as DtUserRender, b as DataActions, c as DataTable, d as DataPagination, f as DataLocaleInput, g as DataFormActions, h as DataForm, i as DtUserDept, l as useDataTableDrag, m as DataFilter, n as StateButtonProps, o as renderUsers, p as useLocaleEdit, r as DtDeptRender, s as NRadios, t as NStateButton, u as DataSelection, v as DataDescriptions, x as NCheckboxes, y as DataCustom } from "./components-BqDuqv2P.js";
1
+ import { _ as dataFormActionsProps, a as DtUserRender, b as DataActions, c as DataTable, d as DataPagination, f as DataLocaleInput, g as DataFormActions, h as DataForm, i as DtUserDept, l as useDataTableDrag, m as DataFilter, n as StateButtonProps, o as renderUsers, p as useLocaleEdit, r as DtDeptRender, s as NRadios, t as NStateButton, u as DataSelection, v as DataDescriptions, x as NCheckboxes, y as DataCustom } from "./components-BXQ9l7S9.js";
2
2
  export { DataActions, DataCustom, DataDescriptions, DataFilter, DataForm, DataFormActions, DataLocaleInput, DataPagination, DataSelection, DataTable, DtDeptRender, DtUserDept, DtUserRender, NCheckboxes, NRadios, NStateButton, StateButtonProps, dataFormActionsProps, renderUsers, useDataTableDrag, useLocaleEdit };
package/dist/page.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { n as useI18n } from "./use-i18n-D-AJ8KbA.js";
2
- import { a as DtUserRender, h as DataForm, i as DtUserDept, r as DtDeptRender, s as NRadios, x as NCheckboxes } from "./components-BqDuqv2P.js";
2
+ import { a as DtUserRender, h as DataForm, i as DtUserDept, r as DtDeptRender, s as NRadios, x as NCheckboxes } from "./components-BXQ9l7S9.js";
3
3
  import { computed, createVNode, defineComponent, h, isVNode, mergeProps, nextTick, ref, shallowRef, toValue, unref } from "vue";
4
4
  import { until, useClipboard } from "@vueuse/core";
5
5
  import { NButton, NCheckbox, NColorPicker, NDatePicker, NDrawer, NDrawerContent, NFlex, NIcon, NInput, NInputNumber, NModal, NScrollbar, NSelect, NText, NUpload, useMessage } from "ithinkdt-ui";
@@ -6,7 +6,7 @@ import {
6
6
  import { TableBaseColumn } from 'ithinkdt-ui/es/data-table/src/interface'
7
7
  import Sortable from 'sortablejs'
8
8
  import { AllowedComponentProps, MaybeRef, MaybeRefOrGetter, VNodeChild } from 'vue'
9
- import type { CSSProperties, ComponentPublicInstance, HTMLAttributes, TemplateRef } from 'vue'
9
+ import type { CSSProperties, ComponentPublicInstance, HTMLAttributes, InjectionKey, TemplateRef } from 'vue'
10
10
 
11
11
  import { GenericCtx, GenericExposed, GenericReturn, MaybeArray, MaybePromise, PublicProps } from '@ithinkdt/common'
12
12
  import { DictItem } from '@ithinkdt/common/dict'
@@ -279,12 +279,18 @@ export type DataPaginationEmits = {
279
279
  (e: 'change', value: PageParams): void
280
280
  }
281
281
 
282
- export declare function DataPagination(
283
- props: DataPaginationProps & PublicProps,
284
- ctx?: Pick<GenericCtx<DataPaginationProps, DataPaginationEmits, {}, {}>, 'attrs' | 'emit' | 'slots'>,
285
- expose?: (exposed?: GenericExposed<{}>) => void,
286
- setup?: GenericCtx<DataPaginationProps, DataPaginationEmits, {}, {}>,
287
- ): GenericReturn<DataPaginationProps, DataPaginationEmits, {}, {}>
282
+ export declare interface IDataPagination {
283
+ /** 注入默认的分页大小数组 */
284
+ DEFAULT_PAGE_SIZES_INJECTION_KEY: InjectionKey<number[] | { value: number, label: string }[]>
285
+ (
286
+ props: DataPaginationProps & PublicProps,
287
+ ctx?: Pick<GenericCtx<DataPaginationProps, DataPaginationEmits, {}, {}>, 'attrs' | 'emit' | 'slots'>,
288
+ expose?: (exposed?: GenericExposed<{}>) => void,
289
+ setup?: GenericCtx<DataPaginationProps, DataPaginationEmits, {}, {}>,
290
+ ): GenericReturn<DataPaginationProps, DataPaginationEmits, {}, {}>
291
+ }
292
+
293
+ declare const DataPagination: IDataPagination
288
294
 
289
295
  export type DataSelectionProps = {
290
296
  'count': number
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ithinkdt/ui",
3
- "version": "4.0.0-801",
3
+ "version": "4.0.0-802",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "iThinkDT UI",
@@ -58,7 +58,7 @@
58
58
  },
59
59
  "sideEffects": false,
60
60
  "dependencies": {
61
- "@vueuse/core": "^14.1.0",
61
+ "@vueuse/core": "^14.2.0",
62
62
  "date-fns": "^4.1.0",
63
63
  "vueuc": "^0.4.65",
64
64
  "sortablejs": "^1.15.6",
@@ -86,9 +86,9 @@
86
86
  "ithinkdt-ui": "^1.8.3",
87
87
  "typescript": "~5.9.3",
88
88
  "unocss": ">=66.6.0",
89
- "vite": "^8.0.0-beta.10",
89
+ "vite": "^8.0.0-beta.11",
90
90
  "vue": "^3.5.27",
91
- "vue-router": "^5.0.0-beta.2",
91
+ "vue-router": "^5.0.1",
92
92
  "@ithinkdt/page": "^4.0.0-801"
93
93
  },
94
94
  "scripts": {