@ithinkdt/ui 4.0.2 → 4.0.4

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.
@@ -4,9 +4,8 @@ import {
4
4
  PopoverProps, RadioGroupProps, TransferProps,
5
5
  } from 'ithinkdt-ui'
6
6
  import { TableBaseColumn } from 'ithinkdt-ui/es/data-table/src/interface'
7
- import Sortable from 'sortablejs'
8
7
  import { AllowedComponentProps, MaybeRef, MaybeRefOrGetter, VNodeChild } from 'vue'
9
- import type { CSSProperties, ComponentPublicInstance, HTMLAttributes, InjectionKey, TemplateRef } from 'vue'
8
+ import type { CSSProperties, ComponentPublicInstance, HTMLAttributes, InjectionKey } from 'vue'
10
9
 
11
10
  import { GenericCtx, GenericExposed, GenericReturn, MaybeArray, MaybePromise, PublicProps } from '@ithinkdt/common'
12
11
  import { DictItem } from '@ithinkdt/common/dict'
@@ -259,14 +258,6 @@ export declare function DataTable<Data extends {}, KeyField extends keyof Data>(
259
258
  setup?: GenericCtx<DataTableProps<Data, KeyField>, DataTableEmits<Data, KeyField>, {}, DataTableInst<Data, KeyField>>,
260
259
  ): GenericReturn<DataTableProps<Data, KeyField>, DataTableEmits<Data, KeyField>, {}, DataTableInst<Data, KeyField>>
261
260
 
262
- export declare function useDataTableDrag<T>(
263
- tableRef: TemplateRef<HTMLElement>,
264
- { data, onSort, ...options }: {
265
- data: MaybeRef<T[]>
266
- onSort: (info: { from: number, to: number }) => void
267
- } & Omit<Sortable.Options, 'onSort'>,
268
- ): void
269
-
270
261
  export type DataPaginationProps = (PageParams | { page: PageParams }) & {
271
262
  simple?: boolean | undefined
272
263
  total: number
@@ -0,0 +1,10 @@
1
+ import Sortable from 'sortablejs'
2
+ import { MaybeRef, TemplateRef } from 'vue'
3
+
4
+ export declare function useDataTableDrag<T>(
5
+ tableRef: TemplateRef<HTMLElement>,
6
+ { data, onSort, ...options }: {
7
+ data: MaybeRef<T[]>
8
+ onSort: (info: { from: number, to: number }) => void
9
+ } & Omit<Sortable.Options, 'onSort'>,
10
+ ): void
@@ -0,0 +1 @@
1
+ export * from '../dist/composables.js'
package/esm/page.d.ts CHANGED
@@ -105,7 +105,7 @@ declare module '@ithinkdt/page' {
105
105
  user: {
106
106
  userProps?: ShallowMaybeRef<Omit<UserDeptProps<boolean>, 'modelValue' | 'onUpdate:modelValue' | 'disabled'
107
107
  | 'users' | 'groups' | 'depts' | 'getUsersByGroup' | 'getUsersByDept' | 'renderUserInfo'> & {
108
- renderInfo: UserRenderProps['renderInfo']
108
+ renderInfo?: UserRenderProps['renderInfo']
109
109
  }> & PublicProps
110
110
  userSlots?: {}
111
111
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ithinkdt/ui",
3
- "version": "4.0.2",
3
+ "version": "4.0.4",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "iThinkDT UI",
@@ -32,6 +32,10 @@
32
32
  "types": "./esm/components.d.ts",
33
33
  "default": "./esm/components.js"
34
34
  },
35
+ "./composables": {
36
+ "types": "./esm/composables.d.ts",
37
+ "default": "./esm/composables.js"
38
+ },
35
39
  "./use-style": {
36
40
  "types": "./esm/use-style.d.ts",
37
41
  "default": "./esm/use-style.js"
@@ -64,7 +68,7 @@
64
68
  "sortablejs": "^1.15.7",
65
69
  "@types/sortablejs": "^1.15.9",
66
70
  "nanoid": "^5.1.6",
67
- "@ithinkdt/common": "^4.0.2"
71
+ "@ithinkdt/common": "^4.0.3"
68
72
  },
69
73
  "peerDependencies": {
70
74
  "@ithinkdt/page": ">=4.0",
@@ -85,11 +89,11 @@
85
89
  "@vitejs/plugin-vue-jsx": "^5.1.4",
86
90
  "ithinkdt-ui": "^1.8.5",
87
91
  "typescript": "~5.9.3",
88
- "unocss": ">=66.6.0",
89
- "vite": "^8.0.0-beta.15",
92
+ "unocss": ">=66.6.2",
93
+ "vite": "^8.0.0-beta.16",
90
94
  "vue": "^3.5.29",
91
95
  "vue-router": "^5.0.3",
92
- "@ithinkdt/page": "^4.0.3"
96
+ "@ithinkdt/page": "^4.0.5"
93
97
  },
94
98
  "scripts": {
95
99
  "dev": "vite build --watch",