@oiij/naive-ui 0.0.74 → 0.0.76
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/README.md +132 -4
- package/dist/components/config-providers/ConfigProviders.vue.d.ts +2 -2
- package/dist/components/copy-button/CopyButton.vue.d.ts +4 -4
- package/dist/components/data-table-plus/DataTablePlus.vue.d.ts +44 -44
- package/dist/components/loading-provider/LoadingProvider.vue.d.ts +2 -2
- package/dist/components/preset-form/PresetForm.vue.d.ts +14 -14
- package/dist/components/preset-input/PresetInput.vue.d.ts +3 -3
- package/dist/components/preset-picker/PresetPicker.vue.d.ts +5 -5
- package/dist/components/preset-select/PresetSelect.vue.d.ts +27 -27
- package/dist/components/remote-request/RemoteRequest.vue.d.ts +10 -10
- package/dist/components/search-input/SearchInput.vue.d.ts +4 -4
- package/dist/components/toggle-input/ToggleInput.vue.d.ts +5 -5
- package/dist/components/tooltip-button/TooltipButton.vue.d.ts +4 -4
- package/dist/components/transition/BaseTransition.vue.d.ts +2 -2
- package/dist/components/type-writer/TypeWriter.vue.d.ts +4 -4
- package/dist/composables/index.d.ts +1 -0
- package/dist/composables/use-data-request.d.ts +58 -28
- package/dist/composables/use-data-request.js +23 -0
- package/dist/composables/use-loading.d.ts +4 -0
- package/dist/composables/use-loading.js +8 -0
- package/dist/composables/use-naive-form.d.ts +40 -17
- package/dist/composables/use-naive-form.js +45 -1
- package/dist/composables/use-naive-menu.d.ts +103 -0
- package/dist/composables/use-naive-menu.js +181 -0
- package/dist/composables/use-naive-theme.d.ts +32 -15
- package/dist/composables/use-naive-theme.js +13 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -1,12 +1,140 @@
|
|
|
1
|
-
# Naive-UI
|
|
1
|
+
# Naive-UI 🎨
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@oiij/naive-ui)
|
|
4
|
-
[](https://github.com/
|
|
4
|
+
[](https://github.com/oiij/use/blob/main/packages/naive-ui/LICENSE)
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## 项目简介 📦
|
|
7
|
+
|
|
8
|
+
Use NaiveUI 是基于 Naive UI 的 Vue 3 组件库封装,提供了一套丰富的 UI 组件和组合式 API,帮助开发者快速构建现代化的 Web 应用。
|
|
9
|
+
|
|
10
|
+
## 功能特点 ✨
|
|
11
|
+
|
|
12
|
+
### 模块化设计 🧩
|
|
13
|
+
|
|
14
|
+
- 📁 采用模块化架构,每个组件独立封装
|
|
15
|
+
- 📦 支持按需导入,减小打包体积
|
|
16
|
+
- 🔧 清晰的文件结构,易于维护和扩展
|
|
17
|
+
|
|
18
|
+
### 类型安全 🔒
|
|
19
|
+
|
|
20
|
+
- 📝 完整的 TypeScript 类型定义
|
|
21
|
+
- 💡 提供准确的类型推断和代码提示
|
|
22
|
+
- 🎯 支持 Vue 3 的 Composition API 类型系统
|
|
23
|
+
|
|
24
|
+
### 轻量高效 ⚡
|
|
25
|
+
|
|
26
|
+
- 🚀 核心代码精简,基于 Naive UI 构建
|
|
27
|
+
- 🏃 优化的性能表现,最小化运行时开销
|
|
28
|
+
- 📦 支持 Tree Shaking,进一步减小打包体积
|
|
29
|
+
|
|
30
|
+
### 功能丰富 🎨
|
|
31
|
+
|
|
32
|
+
- 🧩 丰富的 UI 组件和组合式 API
|
|
33
|
+
- 🛠️ 提供开箱即用的解决方案
|
|
34
|
+
- 🔄 与 Vue 3 生态系统无缝集成
|
|
35
|
+
|
|
36
|
+
## 安装 📥
|
|
37
|
+
|
|
38
|
+
### 使用 pnpm 🐱
|
|
7
39
|
|
|
8
40
|
```bash
|
|
9
41
|
pnpm add @oiij/naive-ui
|
|
10
42
|
```
|
|
11
43
|
|
|
12
|
-
|
|
44
|
+
### 使用 npm 📦
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npm install @oiij/naive-ui
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### 使用 yarn 🧶
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
yarn add @oiij/naive-ui
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## 快速开始 🌟
|
|
57
|
+
|
|
58
|
+
### 基础使用
|
|
59
|
+
|
|
60
|
+
```vue
|
|
61
|
+
<script setup>
|
|
62
|
+
import type { RouteRecordRaw } from 'vue-router'
|
|
63
|
+
import { useNaiveMenu } from '@oiij/naive-ui'
|
|
64
|
+
|
|
65
|
+
// 模拟路由配置
|
|
66
|
+
const routes: RouteRecordRaw[] = [
|
|
67
|
+
{
|
|
68
|
+
path: '/',
|
|
69
|
+
name: 'Home',
|
|
70
|
+
meta: {
|
|
71
|
+
title: '首页'
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
path: '/about',
|
|
76
|
+
name: 'About',
|
|
77
|
+
meta: {
|
|
78
|
+
title: '关于我们'
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
|
|
83
|
+
const { menuOptions } = useNaiveMenu(routes)
|
|
84
|
+
</script>
|
|
85
|
+
|
|
86
|
+
<template>
|
|
87
|
+
<div>
|
|
88
|
+
<n-menu :options="menuOptions" />
|
|
89
|
+
</div>
|
|
90
|
+
</template>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## 功能模块 📋
|
|
94
|
+
|
|
95
|
+
### 组合式 API
|
|
96
|
+
|
|
97
|
+
- **use-naive-menu** 📋: 自动菜单生成
|
|
98
|
+
- **use-data-request** 📡: 数据请求管理
|
|
99
|
+
- **use-loading** ⏳: 加载状态管理
|
|
100
|
+
- **use-naive-form** 📝: 表单管理
|
|
101
|
+
- **use-naive-theme** 🎨: 主题管理
|
|
102
|
+
|
|
103
|
+
### 组件
|
|
104
|
+
|
|
105
|
+
- **config-providers** ⚙️: 全局配置
|
|
106
|
+
- **copy-button** 📋: 复制按钮
|
|
107
|
+
- **data-table-plus** 📊: 增强数据表格
|
|
108
|
+
- **loading-provider** ⏳: 加载状态提供者
|
|
109
|
+
- **preset-form** 📝: 预设表单
|
|
110
|
+
- **preset-input** 📱: 预设输入框
|
|
111
|
+
- **preset-picker** 📅: 预设选择器
|
|
112
|
+
- **preset-select** 🔽: 预设选择器
|
|
113
|
+
- **remote-request** 📡: 远程请求组件
|
|
114
|
+
- **search-input** 🔍: 搜索输入框
|
|
115
|
+
- **toggle-input** 🔄: 切换输入框
|
|
116
|
+
- **tooltip-button** 💬: 提示按钮
|
|
117
|
+
- **transition** 🔄: 过渡动画
|
|
118
|
+
- **type-writer** ⌨️: 打字机效果
|
|
119
|
+
|
|
120
|
+
## 在线文档 📚
|
|
121
|
+
|
|
122
|
+
[在线文档](https://oiij-use.vercel.app/naive-ui/naive-ui) 📖
|
|
123
|
+
|
|
124
|
+
## 贡献指南 🤝
|
|
125
|
+
|
|
126
|
+
欢迎贡献代码、报告问题或提出新功能建议!
|
|
127
|
+
|
|
128
|
+
1. Fork 本仓库 🍴
|
|
129
|
+
2. 创建您的特性分支 (`git checkout -b feature/amazing-feature`) 🌿
|
|
130
|
+
3. 提交您的更改 (`git commit -m 'Add some amazing feature'`) 💾
|
|
131
|
+
4. 推送到分支 (`git push origin feature/amazing-feature`) 🚀
|
|
132
|
+
5. 打开一个 Pull Request 📥
|
|
133
|
+
|
|
134
|
+
## 许可证 📄
|
|
135
|
+
|
|
136
|
+
本项目采用 MIT 许可证 - 查看 [LICENSE](LICENSE) 文件了解详情 📑
|
|
137
|
+
|
|
138
|
+
## 联系方式 📞
|
|
139
|
+
|
|
140
|
+
- GitHub: [https://github.com/oiij/use](https://github.com/oiij/use) 🌟
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ConfigProvidersProps } from "./index.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue20 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/config-providers/ConfigProviders.vue.d.ts
|
|
5
5
|
declare var __VLS_44: {};
|
|
6
6
|
type __VLS_Slots = {} & {
|
|
7
7
|
default?: (props: typeof __VLS_44) => any;
|
|
8
8
|
};
|
|
9
|
-
declare const __VLS_base:
|
|
9
|
+
declare const __VLS_base: vue20.DefineComponent<ConfigProvidersProps, {}, {}, {}, {}, vue20.ComponentOptionsMixin, vue20.ComponentOptionsMixin, {}, string, vue20.PublicProps, Readonly<ConfigProvidersProps> & Readonly<{}>, {}, {}, {}, {}, string, vue20.ComponentProvideOptions, false, {}, any>;
|
|
10
10
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
11
|
declare const _default: typeof __VLS_export;
|
|
12
12
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CopyButtonProps } from "./index.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue54 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/copy-button/CopyButton.vue.d.ts
|
|
5
5
|
declare var __VLS_9: {}, __VLS_18: {}, __VLS_25: {};
|
|
@@ -10,11 +10,11 @@ type __VLS_Slots = {} & {
|
|
|
10
10
|
} & {
|
|
11
11
|
tooltip?: (props: typeof __VLS_25) => any;
|
|
12
12
|
};
|
|
13
|
-
declare const __VLS_base:
|
|
13
|
+
declare const __VLS_base: vue54.DefineComponent<CopyButtonProps, {}, {}, {}, {}, vue54.ComponentOptionsMixin, vue54.ComponentOptionsMixin, {} & {
|
|
14
14
|
copied: (v: string | undefined) => any;
|
|
15
|
-
}, string,
|
|
15
|
+
}, string, vue54.PublicProps, Readonly<CopyButtonProps> & Readonly<{
|
|
16
16
|
onCopied?: ((v: string | undefined) => any) | undefined;
|
|
17
|
-
}>, {}, {}, {}, {}, string,
|
|
17
|
+
}>, {}, {}, {}, {}, string, vue54.ComponentProvideOptions, false, {}, any>;
|
|
18
18
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
19
19
|
declare const _default: typeof __VLS_export;
|
|
20
20
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
import { DataObject, UseDataRequestPagination } from "../../composables/use-data-request.js";
|
|
2
2
|
import { DataTablePlusEmits, DataTablePlusExpose, DataTablePlusProps } from "./index.js";
|
|
3
3
|
import "../../composables/index.js";
|
|
4
|
-
import * as
|
|
5
|
-
import * as
|
|
4
|
+
import * as _vueuse_core31 from "@vueuse/core";
|
|
5
|
+
import * as vue70 from "vue";
|
|
6
6
|
import { DataTableBaseColumn, DataTableFilterState, DataTableInst, DataTableSortState } from "naive-ui";
|
|
7
7
|
|
|
8
8
|
//#region src/components/data-table-plus/DataTablePlus.vue.d.ts
|
|
9
9
|
declare const __VLS_export: <P extends DataObject, D extends DataObject, R extends DataObject>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
10
|
-
props:
|
|
10
|
+
props: vue70.PublicProps & __VLS_PrettifyLocal<DataTablePlusProps<P, D, R> & {
|
|
11
11
|
onError?: ((err: Error, params: P[]) => any) | undefined;
|
|
12
12
|
onSuccess?: ((data: D, params: P[]) => any) | undefined;
|
|
13
13
|
onLoad?: ((row: R) => any) | undefined;
|
|
14
14
|
onScroll?: ((ev: Event) => any) | undefined;
|
|
15
|
+
onFinally?: ((params: P[], data?: D | undefined, err?: Error | undefined) => any) | undefined;
|
|
16
|
+
onBefore?: ((params: P[]) => any) | undefined;
|
|
17
|
+
"onUpdate:page"?: ((page: number) => any) | undefined;
|
|
18
|
+
"onUpdate:pageSize"?: ((pageSize: number) => any) | undefined;
|
|
15
19
|
onClickRow?: ((row: R, index: number, event: MouseEvent, currentData: R[]) => any) | undefined;
|
|
16
20
|
onContextMenuRow?: ((row: R, index: number, event: MouseEvent, currentData: R[]) => any) | undefined;
|
|
17
|
-
onBefore?: ((params: P[]) => any) | undefined;
|
|
18
21
|
onScrollBottom?: ((ev: Event) => any) | undefined;
|
|
19
22
|
"onUpdate:checkedRowKeys"?: ((keys: (string | number)[], rows: (R | undefined)[], meta: {
|
|
20
23
|
row: R | undefined;
|
|
@@ -23,13 +26,10 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
23
26
|
"onUpdate:expandedRowKeys"?: ((keys: (string | number)[], currentData: R[]) => any) | undefined;
|
|
24
27
|
"onUpdate:filters"?: ((filterState: DataTableFilterState, sourceColumn: DataTableBaseColumn) => any) | undefined;
|
|
25
28
|
"onUpdate:sorter"?: ((options: DataTableSortState | DataTableSortState[] | null) => any) | undefined;
|
|
26
|
-
"onUpdate:page"?: ((page: number) => any) | undefined;
|
|
27
|
-
"onUpdate:pageSize"?: ((pageSize: number) => any) | undefined;
|
|
28
|
-
onFinally?: ((params: P[], data?: D | undefined, err?: Error | undefined) => any) | undefined;
|
|
29
29
|
}> & (typeof globalThis extends {
|
|
30
30
|
__VLS_PROPS_FALLBACK: infer P_1;
|
|
31
31
|
} ? P_1 : {});
|
|
32
|
-
expose: (exposed:
|
|
32
|
+
expose: (exposed: vue70.ShallowUnwrapRef<DataTablePlusExpose<P, D, R>>) => void;
|
|
33
33
|
attrs: any;
|
|
34
34
|
slots: {
|
|
35
35
|
header?: (props: {
|
|
@@ -46,7 +46,7 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
46
46
|
filters: DataTableFilterState | undefined;
|
|
47
47
|
sorters: Record<string, DataTableSortState> | undefined;
|
|
48
48
|
dataTableInst: DataTableInst | null;
|
|
49
|
-
pagination:
|
|
49
|
+
pagination: vue70.Ref<{
|
|
50
50
|
page: number;
|
|
51
51
|
pageSize: number;
|
|
52
52
|
itemCount: number;
|
|
@@ -64,10 +64,10 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
64
64
|
setParams: (_params: Partial<P>) => void;
|
|
65
65
|
runParams: (_params: Partial<P>) => void;
|
|
66
66
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
67
|
-
onBefore:
|
|
68
|
-
onSuccess:
|
|
69
|
-
onError:
|
|
70
|
-
onFinally:
|
|
67
|
+
onBefore: _vueuse_core31.EventHookOn<[P[]]>;
|
|
68
|
+
onSuccess: _vueuse_core31.EventHookOn<[D, P[]]>;
|
|
69
|
+
onError: _vueuse_core31.EventHookOn<[Error, P[]]>;
|
|
70
|
+
onFinally: _vueuse_core31.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
71
71
|
}) => any;
|
|
72
72
|
} & {
|
|
73
73
|
title?: (props: {}) => any;
|
|
@@ -86,7 +86,7 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
86
86
|
filters: DataTableFilterState | undefined;
|
|
87
87
|
sorters: Record<string, DataTableSortState> | undefined;
|
|
88
88
|
dataTableInst: DataTableInst | null;
|
|
89
|
-
pagination:
|
|
89
|
+
pagination: vue70.Ref<{
|
|
90
90
|
page: number;
|
|
91
91
|
pageSize: number;
|
|
92
92
|
itemCount: number;
|
|
@@ -104,10 +104,10 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
104
104
|
setParams: (_params: Partial<P>) => void;
|
|
105
105
|
runParams: (_params: Partial<P>) => void;
|
|
106
106
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
107
|
-
onBefore:
|
|
108
|
-
onSuccess:
|
|
109
|
-
onError:
|
|
110
|
-
onFinally:
|
|
107
|
+
onBefore: _vueuse_core31.EventHookOn<[P[]]>;
|
|
108
|
+
onSuccess: _vueuse_core31.EventHookOn<[D, P[]]>;
|
|
109
|
+
onError: _vueuse_core31.EventHookOn<[Error, P[]]>;
|
|
110
|
+
onFinally: _vueuse_core31.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
111
111
|
}) => any;
|
|
112
112
|
} & {
|
|
113
113
|
filter?: (props: {
|
|
@@ -124,7 +124,7 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
124
124
|
filters: DataTableFilterState | undefined;
|
|
125
125
|
sorters: Record<string, DataTableSortState> | undefined;
|
|
126
126
|
dataTableInst: DataTableInst | null;
|
|
127
|
-
pagination:
|
|
127
|
+
pagination: vue70.Ref<{
|
|
128
128
|
page: number;
|
|
129
129
|
pageSize: number;
|
|
130
130
|
itemCount: number;
|
|
@@ -142,10 +142,10 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
142
142
|
setParams: (_params: Partial<P>) => void;
|
|
143
143
|
runParams: (_params: Partial<P>) => void;
|
|
144
144
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
145
|
-
onBefore:
|
|
146
|
-
onSuccess:
|
|
147
|
-
onError:
|
|
148
|
-
onFinally:
|
|
145
|
+
onBefore: _vueuse_core31.EventHookOn<[P[]]>;
|
|
146
|
+
onSuccess: _vueuse_core31.EventHookOn<[D, P[]]>;
|
|
147
|
+
onError: _vueuse_core31.EventHookOn<[Error, P[]]>;
|
|
148
|
+
onFinally: _vueuse_core31.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
149
149
|
}) => any;
|
|
150
150
|
} & {
|
|
151
151
|
empty?: (props: {
|
|
@@ -162,7 +162,7 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
162
162
|
filters: DataTableFilterState | undefined;
|
|
163
163
|
sorters: Record<string, DataTableSortState> | undefined;
|
|
164
164
|
dataTableInst: DataTableInst | null;
|
|
165
|
-
pagination:
|
|
165
|
+
pagination: vue70.Ref<{
|
|
166
166
|
page: number;
|
|
167
167
|
pageSize: number;
|
|
168
168
|
itemCount: number;
|
|
@@ -180,10 +180,10 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
180
180
|
setParams: (_params: Partial<P>) => void;
|
|
181
181
|
runParams: (_params: Partial<P>) => void;
|
|
182
182
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
183
|
-
onBefore:
|
|
184
|
-
onSuccess:
|
|
185
|
-
onError:
|
|
186
|
-
onFinally:
|
|
183
|
+
onBefore: _vueuse_core31.EventHookOn<[P[]]>;
|
|
184
|
+
onSuccess: _vueuse_core31.EventHookOn<[D, P[]]>;
|
|
185
|
+
onError: _vueuse_core31.EventHookOn<[Error, P[]]>;
|
|
186
|
+
onFinally: _vueuse_core31.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
187
187
|
}) => any;
|
|
188
188
|
} & {
|
|
189
189
|
loading?: (props: {
|
|
@@ -200,7 +200,7 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
200
200
|
filters: DataTableFilterState | undefined;
|
|
201
201
|
sorters: Record<string, DataTableSortState> | undefined;
|
|
202
202
|
dataTableInst: DataTableInst | null;
|
|
203
|
-
pagination:
|
|
203
|
+
pagination: vue70.Ref<{
|
|
204
204
|
page: number;
|
|
205
205
|
pageSize: number;
|
|
206
206
|
itemCount: number;
|
|
@@ -218,10 +218,10 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
218
218
|
setParams: (_params: Partial<P>) => void;
|
|
219
219
|
runParams: (_params: Partial<P>) => void;
|
|
220
220
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
221
|
-
onBefore:
|
|
222
|
-
onSuccess:
|
|
223
|
-
onError:
|
|
224
|
-
onFinally:
|
|
221
|
+
onBefore: _vueuse_core31.EventHookOn<[P[]]>;
|
|
222
|
+
onSuccess: _vueuse_core31.EventHookOn<[D, P[]]>;
|
|
223
|
+
onError: _vueuse_core31.EventHookOn<[Error, P[]]>;
|
|
224
|
+
onFinally: _vueuse_core31.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
225
225
|
}) => any;
|
|
226
226
|
} & {
|
|
227
227
|
footer?: (props: {
|
|
@@ -238,7 +238,7 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
238
238
|
filters: DataTableFilterState | undefined;
|
|
239
239
|
sorters: Record<string, DataTableSortState> | undefined;
|
|
240
240
|
dataTableInst: DataTableInst | null;
|
|
241
|
-
pagination:
|
|
241
|
+
pagination: vue70.Ref<{
|
|
242
242
|
page: number;
|
|
243
243
|
pageSize: number;
|
|
244
244
|
itemCount: number;
|
|
@@ -256,10 +256,10 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
256
256
|
setParams: (_params: Partial<P>) => void;
|
|
257
257
|
runParams: (_params: Partial<P>) => void;
|
|
258
258
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
259
|
-
onBefore:
|
|
260
|
-
onSuccess:
|
|
261
|
-
onError:
|
|
262
|
-
onFinally:
|
|
259
|
+
onBefore: _vueuse_core31.EventHookOn<[P[]]>;
|
|
260
|
+
onSuccess: _vueuse_core31.EventHookOn<[D, P[]]>;
|
|
261
|
+
onError: _vueuse_core31.EventHookOn<[Error, P[]]>;
|
|
262
|
+
onFinally: _vueuse_core31.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
263
263
|
}) => any;
|
|
264
264
|
} & {
|
|
265
265
|
'footer-extra'?: (props: {
|
|
@@ -276,7 +276,7 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
276
276
|
filters: DataTableFilterState | undefined;
|
|
277
277
|
sorters: Record<string, DataTableSortState> | undefined;
|
|
278
278
|
dataTableInst: DataTableInst | null;
|
|
279
|
-
pagination:
|
|
279
|
+
pagination: vue70.Ref<{
|
|
280
280
|
page: number;
|
|
281
281
|
pageSize: number;
|
|
282
282
|
itemCount: number;
|
|
@@ -294,14 +294,14 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
294
294
|
setParams: (_params: Partial<P>) => void;
|
|
295
295
|
runParams: (_params: Partial<P>) => void;
|
|
296
296
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
297
|
-
onBefore:
|
|
298
|
-
onSuccess:
|
|
299
|
-
onError:
|
|
300
|
-
onFinally:
|
|
297
|
+
onBefore: _vueuse_core31.EventHookOn<[P[]]>;
|
|
298
|
+
onSuccess: _vueuse_core31.EventHookOn<[D, P[]]>;
|
|
299
|
+
onError: _vueuse_core31.EventHookOn<[Error, P[]]>;
|
|
300
|
+
onFinally: _vueuse_core31.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
301
301
|
}) => any;
|
|
302
302
|
};
|
|
303
303
|
emit: DataTablePlusEmits<P, D, R>;
|
|
304
|
-
}>) =>
|
|
304
|
+
}>) => vue70.VNode & {
|
|
305
305
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
306
306
|
};
|
|
307
307
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LoadingProviderProps } from "./index.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue35 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/loading-provider/LoadingProvider.vue.d.ts
|
|
5
5
|
declare var __VLS_26: {}, __VLS_29: {}, __VLS_31: {};
|
|
@@ -10,7 +10,7 @@ type __VLS_Slots = {} & {
|
|
|
10
10
|
} & {
|
|
11
11
|
default?: (props: typeof __VLS_31) => any;
|
|
12
12
|
};
|
|
13
|
-
declare const __VLS_base:
|
|
13
|
+
declare const __VLS_base: vue35.DefineComponent<LoadingProviderProps, {}, {}, {}, {}, vue35.ComponentOptionsMixin, vue35.ComponentOptionsMixin, {}, string, vue35.PublicProps, Readonly<LoadingProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, vue35.ComponentProvideOptions, false, {}, any>;
|
|
14
14
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
15
15
|
declare const _default: typeof __VLS_export;
|
|
16
16
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { DataObject } from "../../composables/use-data-request.js";
|
|
2
2
|
import { PresetFormExpose, PresetFormProps } from "./index.js";
|
|
3
|
-
import * as
|
|
4
|
-
import * as
|
|
3
|
+
import * as _vueuse_core8 from "@vueuse/core";
|
|
4
|
+
import * as vue40 from "vue";
|
|
5
5
|
import * as naive_ui0 from "naive-ui";
|
|
6
6
|
import { FormInst, FormRules } from "naive-ui";
|
|
7
7
|
import * as async_validator0 from "async-validator";
|
|
8
8
|
|
|
9
9
|
//#region src/components/preset-form/PresetForm.vue.d.ts
|
|
10
10
|
declare const __VLS_export: <V extends DataObject>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
11
|
-
props:
|
|
11
|
+
props: vue40.PublicProps & __VLS_PrettifyLocal<PresetFormProps<V> & {
|
|
12
12
|
onValidated?: ((val: V) => any) | undefined;
|
|
13
13
|
}> & (typeof globalThis extends {
|
|
14
14
|
__VLS_PROPS_FALLBACK: infer P;
|
|
15
15
|
} ? P : {});
|
|
16
|
-
expose: (exposed:
|
|
16
|
+
expose: (exposed: vue40.ShallowUnwrapRef<PresetFormExpose<V>>) => void;
|
|
17
17
|
attrs: any;
|
|
18
18
|
slots: {
|
|
19
19
|
header?: (props: {
|
|
@@ -21,8 +21,8 @@ declare const __VLS_export: <V extends DataObject>(__VLS_props: NonNullable<Awai
|
|
|
21
21
|
formValue: V;
|
|
22
22
|
formRules: Partial<Record<keyof V, FormRules | naive_ui0.FormItemRule | naive_ui0.FormItemRule[]>>;
|
|
23
23
|
formProps: {
|
|
24
|
-
model:
|
|
25
|
-
rules:
|
|
24
|
+
model: vue40.Reactive<V>;
|
|
25
|
+
rules: vue40.Reactive<Partial<Record<keyof V, FormRules | naive_ui0.FormItemRule | naive_ui0.FormItemRule[]>>>;
|
|
26
26
|
};
|
|
27
27
|
setValue: (_value: Partial<V>) => void;
|
|
28
28
|
validate: () => Promise<{
|
|
@@ -32,7 +32,7 @@ declare const __VLS_export: <V extends DataObject>(__VLS_props: NonNullable<Awai
|
|
|
32
32
|
resetForm: () => void;
|
|
33
33
|
reset: () => void;
|
|
34
34
|
clear: () => void;
|
|
35
|
-
onValidated:
|
|
35
|
+
onValidated: _vueuse_core8.EventHookOn<[V]>;
|
|
36
36
|
}) => any;
|
|
37
37
|
} & {
|
|
38
38
|
default?: (props: {
|
|
@@ -40,8 +40,8 @@ declare const __VLS_export: <V extends DataObject>(__VLS_props: NonNullable<Awai
|
|
|
40
40
|
formValue: V;
|
|
41
41
|
formRules: Partial<Record<keyof V, FormRules | naive_ui0.FormItemRule | naive_ui0.FormItemRule[]>>;
|
|
42
42
|
formProps: {
|
|
43
|
-
model:
|
|
44
|
-
rules:
|
|
43
|
+
model: vue40.Reactive<V>;
|
|
44
|
+
rules: vue40.Reactive<Partial<Record<keyof V, FormRules | naive_ui0.FormItemRule | naive_ui0.FormItemRule[]>>>;
|
|
45
45
|
};
|
|
46
46
|
setValue: (_value: Partial<V>) => void;
|
|
47
47
|
validate: () => Promise<{
|
|
@@ -51,7 +51,7 @@ declare const __VLS_export: <V extends DataObject>(__VLS_props: NonNullable<Awai
|
|
|
51
51
|
resetForm: () => void;
|
|
52
52
|
reset: () => void;
|
|
53
53
|
clear: () => void;
|
|
54
|
-
onValidated:
|
|
54
|
+
onValidated: _vueuse_core8.EventHookOn<[V]>;
|
|
55
55
|
}) => any;
|
|
56
56
|
} & {
|
|
57
57
|
footer?: (props: {
|
|
@@ -59,8 +59,8 @@ declare const __VLS_export: <V extends DataObject>(__VLS_props: NonNullable<Awai
|
|
|
59
59
|
formValue: V;
|
|
60
60
|
formRules: Partial<Record<keyof V, FormRules | naive_ui0.FormItemRule | naive_ui0.FormItemRule[]>>;
|
|
61
61
|
formProps: {
|
|
62
|
-
model:
|
|
63
|
-
rules:
|
|
62
|
+
model: vue40.Reactive<V>;
|
|
63
|
+
rules: vue40.Reactive<Partial<Record<keyof V, FormRules | naive_ui0.FormItemRule | naive_ui0.FormItemRule[]>>>;
|
|
64
64
|
};
|
|
65
65
|
setValue: (_value: Partial<V>) => void;
|
|
66
66
|
validate: () => Promise<{
|
|
@@ -70,11 +70,11 @@ declare const __VLS_export: <V extends DataObject>(__VLS_props: NonNullable<Awai
|
|
|
70
70
|
resetForm: () => void;
|
|
71
71
|
reset: () => void;
|
|
72
72
|
clear: () => void;
|
|
73
|
-
onValidated:
|
|
73
|
+
onValidated: _vueuse_core8.EventHookOn<[V]>;
|
|
74
74
|
}) => any;
|
|
75
75
|
};
|
|
76
76
|
emit: (e: "validated", val: V) => void;
|
|
77
|
-
}>) =>
|
|
77
|
+
}>) => vue40.VNode & {
|
|
78
78
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
79
79
|
};
|
|
80
80
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { PresetInputProps } from "./index.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue25 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/preset-input/PresetInput.vue.d.ts
|
|
5
5
|
declare const __VLS_export: <V>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
6
|
-
props:
|
|
6
|
+
props: vue25.PublicProps & __VLS_PrettifyLocal<PresetInputProps<V> & {
|
|
7
7
|
"onUpdate:value"?: ((val?: V | undefined) => any) | undefined;
|
|
8
8
|
}> & (typeof globalThis extends {
|
|
9
9
|
__VLS_PROPS_FALLBACK: infer P;
|
|
@@ -12,7 +12,7 @@ declare const __VLS_export: <V>(__VLS_props: NonNullable<Awaited<typeof __VLS_se
|
|
|
12
12
|
attrs: any;
|
|
13
13
|
slots: {};
|
|
14
14
|
emit: (e: "update:value", val?: V) => void;
|
|
15
|
-
}>) =>
|
|
15
|
+
}>) => vue25.VNode & {
|
|
16
16
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
17
17
|
};
|
|
18
18
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { DataObject } from "../../composables/use-data-request.js";
|
|
2
2
|
import { PresetPickerEmits, PresetPickerExpose, PresetPickerProps, PresetPickerValue } from "./index.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as vue59 from "vue";
|
|
4
4
|
import { DataTableColumns } from "naive-ui";
|
|
5
5
|
|
|
6
6
|
//#region src/components/preset-picker/PresetPicker.vue.d.ts
|
|
7
7
|
declare const __VLS_export: <V extends PresetPickerValue, R extends DataObject>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
8
|
-
props:
|
|
8
|
+
props: vue59.PublicProps & __VLS_PrettifyLocal<PresetPickerProps<V, R> & {
|
|
9
9
|
onClose?: (() => any) | undefined;
|
|
10
|
+
"onUpdate:value"?: ((val: V | null, raw: R | R[] | null) => any) | undefined;
|
|
10
11
|
onAfterEnter?: (() => any) | undefined;
|
|
11
12
|
onAfterLeave?: (() => any) | undefined;
|
|
12
13
|
onEsc?: (() => any) | undefined;
|
|
@@ -14,11 +15,10 @@ declare const __VLS_export: <V extends PresetPickerValue, R extends DataObject>(
|
|
|
14
15
|
onNegativeClick?: (() => any) | undefined;
|
|
15
16
|
onPositiveClick?: (() => any) | undefined;
|
|
16
17
|
"onUpdate:show"?: ((value: boolean) => any) | undefined;
|
|
17
|
-
"onUpdate:value"?: ((val: V | null, raw: R | R[] | null) => any) | undefined;
|
|
18
18
|
}> & (typeof globalThis extends {
|
|
19
19
|
__VLS_PROPS_FALLBACK: infer P;
|
|
20
20
|
} ? P : {});
|
|
21
|
-
expose: (exposed:
|
|
21
|
+
expose: (exposed: vue59.ShallowUnwrapRef<PresetPickerExpose<R>>) => void;
|
|
22
22
|
attrs: any;
|
|
23
23
|
slots: {
|
|
24
24
|
'button-icon'?: (props: {}) => any;
|
|
@@ -54,7 +54,7 @@ declare const __VLS_export: <V extends PresetPickerValue, R extends DataObject>(
|
|
|
54
54
|
'modal-close'?: (props: {}) => any;
|
|
55
55
|
};
|
|
56
56
|
emit: PresetPickerEmits<V, R>;
|
|
57
|
-
}>) =>
|
|
57
|
+
}>) => vue59.VNode & {
|
|
58
58
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
59
59
|
};
|
|
60
60
|
declare const _default: typeof __VLS_export;
|