@a2simcode/ui 0.0.3 → 0.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.
- package/LICENSE +53 -53
- package/README.md +130 -129
- package/dist/components/autocomplete/index.d.ts +118 -0
- package/dist/components/autocomplete/src/autocomplete.vue.d.ts +109 -0
- package/dist/components/barcode/index.d.ts +114 -0
- package/dist/components/barcode/src/barcode.vue.d.ts +101 -0
- package/dist/components/button/index.d.ts +278 -0
- package/dist/components/button/src/button.vue.d.ts +268 -0
- package/dist/components/buttons/index.d.ts +81 -0
- package/dist/components/buttons/src/index.vue.d.ts +76 -0
- package/dist/components/buttons/src/interface.d.ts +128 -0
- package/dist/components/buttons/src/useButtons.d.ts +4 -0
- package/dist/components/cascader-select/index.d.ts +142 -0
- package/dist/components/cascader-select/src/cascader-select.vue.d.ts +128 -0
- package/dist/components/checkbox/index.d.ts +73 -0
- package/dist/components/checkbox/src/checkbox.vue.d.ts +55 -0
- package/dist/components/code-mirror/index.d.ts +74 -0
- package/dist/components/code-mirror/src/code-mirror.vue.d.ts +45 -0
- package/dist/components/comp/index.d.ts +157 -0
- package/dist/components/comp/src/comp.vue.d.ts +164 -0
- package/dist/components/dialog/index.d.ts +416 -0
- package/dist/components/dialog/src/index.vue.d.ts +404 -0
- package/dist/components/dialog-full/index.d.ts +311 -0
- package/dist/components/dialog-full/src/index.vue.d.ts +287 -0
- package/dist/components/drawer/index.d.ts +335 -0
- package/dist/components/drawer/src/drawer.vue.d.ts +337 -0
- package/dist/components/dynamic-layer/index.d.ts +25 -0
- package/dist/components/dynamic-layer/src/dynamic-layer.vue.d.ts +8 -0
- package/dist/components/dynamic-layer/src/interface.d.ts +66 -0
- package/dist/components/echarts/index.d.ts +177 -0
- package/dist/components/echarts/src/echarts.vue.d.ts +118 -0
- package/dist/components/form/index.d.ts +194 -0
- package/dist/components/form/src/form.vue.d.ts +106 -0
- package/dist/components/form/src/interface.d.ts +138 -0
- package/dist/components/form/src/useForm/index.d.ts +9 -0
- package/dist/components/form/src/useForm/interface.d.ts +170 -0
- package/dist/components/form/src/useForm/validateUtil.d.ts +5 -0
- package/dist/components/form-item/index.d.ts +112 -0
- package/dist/components/form-item/src/form-item.vue.d.ts +97 -0
- package/dist/components/icon/index.d.ts +31 -0
- package/dist/components/icon/src/icon.vue.d.ts +33 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/input/index.d.ts +111 -0
- package/dist/components/input/src/input.vue.d.ts +110 -0
- package/dist/components/input-tag/index.d.ts +75 -0
- package/dist/components/input-tag/src/input-tag.vue.d.ts +40 -0
- package/dist/components/layer/index.d.ts +284 -0
- package/dist/components/layer/src/layer.vue.d.ts +263 -0
- package/dist/components/layout/__tests__/layout.test.d.ts +1 -0
- package/dist/components/layout/index.d.ts +173 -0
- package/dist/components/layout/src/layout.vue.d.ts +187 -0
- package/dist/components/number/index.d.ts +85 -0
- package/dist/components/number/src/number.vue.d.ts +78 -0
- package/dist/components/page/index.d.ts +67 -0
- package/dist/components/page/src/interface.d.ts +22 -0
- package/dist/components/page/src/page.vue.d.ts +52 -0
- package/dist/components/radio/index.d.ts +152 -0
- package/dist/components/radio/src/radio.vue.d.ts +123 -0
- package/dist/components/rate/index.d.ts +71 -0
- package/dist/components/rate/src/rate.vue.d.ts +42 -0
- package/dist/components/select/index.d.ts +88 -0
- package/dist/components/select/src/select.vue.d.ts +75 -0
- package/dist/components/slider/index.d.ts +89 -0
- package/dist/components/slider/src/slider.vue.d.ts +76 -0
- package/dist/components/table/index.d.ts +160 -0
- package/dist/components/table/src/table.vue.d.ts +143 -0
- package/dist/components/upload/index.d.ts +405 -0
- package/dist/components/upload/src/list.vue.d.ts +103 -0
- package/dist/components/upload/src/upload.vue.d.ts +367 -0
- package/dist/components/upload/src/utils.d.ts +2 -0
- package/dist/{utils → components/utils}/index.d.ts +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/utils/cipher.d.ts +21 -0
- package/dist/core/utils/common.d.ts +41 -0
- package/dist/core/utils/comp.d.ts +9 -0
- package/dist/core/utils/date.d.ts +3 -0
- package/dist/core/utils/dom.d.ts +4 -0
- package/dist/core/utils/index.d.ts +6 -0
- package/dist/core/utils/is.d.ts +2 -0
- package/dist/index.d.ts +6 -8
- package/dist/simcode-ui.es.js +5027 -87
- package/dist/simcode-ui.umd.js +1 -1
- package/dist/stats.html +4949 -0
- package/dist/ui.css +1 -0
- package/package.json +49 -35
- package/dist/button/index.d.ts +0 -192
- package/dist/button/src/button.vue.d.ts +0 -76
- package/dist/input/index.d.ts +0 -167
- package/dist/input/src/input.vue.d.ts +0 -64
- package/dist/style.css +0 -1
package/LICENSE
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
专有软件许可协议
|
|
2
|
-
|
|
3
|
-
版权所有 © 2024 苏州极简搭信息技术有限公司。保留所有权利。
|
|
4
|
-
|
|
5
|
-
本软件及其相关文档("软件")为专有软件,受版权法和国际条约保护。
|
|
6
|
-
|
|
7
|
-
许可限制:
|
|
8
|
-
|
|
9
|
-
1. 本软件仅授权给获得明确书面许可的用户使用。
|
|
10
|
-
|
|
11
|
-
2. 未经版权所有者事先书面同意,您不得:
|
|
12
|
-
- 复制、修改、改编或翻译本软件
|
|
13
|
-
- 对本软件进行反向工程、反编译或反汇编
|
|
14
|
-
- 出租、出借、分发、转让或再许可本软件
|
|
15
|
-
- 删除或修改本软件中的任何版权声明或其他所有权标记
|
|
16
|
-
|
|
17
|
-
3. 本软件按"现状"提供,不提供任何明示或暗示的保证,包括但不限于适销性、特定用途适用性和非侵权性的保证。
|
|
18
|
-
|
|
19
|
-
4. 在任何情况下,版权所有者均不对因使用或无法使用本软件而产生的任何索赔、损害或其他责任负责。
|
|
20
|
-
|
|
21
|
-
5. 本许可协议受中华人民共和国法律管辖。
|
|
22
|
-
|
|
23
|
-
如需获得使用许可,请联系版权所有者。
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
PROPRIETARY SOFTWARE LICENSE
|
|
28
|
-
|
|
29
|
-
Copyright © 2024 Suzhou Jijian-da Information Technology Co., Ltd. All rights reserved.
|
|
30
|
-
|
|
31
|
-
This software and associated documentation files (the "Software") is proprietary
|
|
32
|
-
software protected by copyright laws and international treaties.
|
|
33
|
-
|
|
34
|
-
License Restrictions:
|
|
35
|
-
|
|
36
|
-
1. This Software is licensed only to users who have obtained explicit written permission.
|
|
37
|
-
|
|
38
|
-
2. Without prior written consent from the copyright holder, you may not:
|
|
39
|
-
- Copy, modify, adapt, or translate the Software
|
|
40
|
-
- Reverse engineer, decompile, or disassemble the Software
|
|
41
|
-
- Rent, lease, distribute, transfer, or sublicense the Software
|
|
42
|
-
- Remove or modify any copyright notices or other proprietary markings in the Software
|
|
43
|
-
|
|
44
|
-
3. The Software is provided "as is" without warranty of any kind, express or implied,
|
|
45
|
-
including but not limited to warranties of merchantability, fitness for a particular
|
|
46
|
-
purpose, and non-infringement.
|
|
47
|
-
|
|
48
|
-
4. In no event shall the copyright holder be liable for any claims, damages, or other
|
|
49
|
-
liability arising from the use or inability to use the Software.
|
|
50
|
-
|
|
51
|
-
5. This license agreement is governed by the laws of the People's Republic of China.
|
|
52
|
-
|
|
53
|
-
For licensing inquiries, please contact the copyright holder.
|
|
1
|
+
专有软件许可协议
|
|
2
|
+
|
|
3
|
+
版权所有 © 2024 苏州极简搭信息技术有限公司。保留所有权利。
|
|
4
|
+
|
|
5
|
+
本软件及其相关文档("软件")为专有软件,受版权法和国际条约保护。
|
|
6
|
+
|
|
7
|
+
许可限制:
|
|
8
|
+
|
|
9
|
+
1. 本软件仅授权给获得明确书面许可的用户使用。
|
|
10
|
+
|
|
11
|
+
2. 未经版权所有者事先书面同意,您不得:
|
|
12
|
+
- 复制、修改、改编或翻译本软件
|
|
13
|
+
- 对本软件进行反向工程、反编译或反汇编
|
|
14
|
+
- 出租、出借、分发、转让或再许可本软件
|
|
15
|
+
- 删除或修改本软件中的任何版权声明或其他所有权标记
|
|
16
|
+
|
|
17
|
+
3. 本软件按"现状"提供,不提供任何明示或暗示的保证,包括但不限于适销性、特定用途适用性和非侵权性的保证。
|
|
18
|
+
|
|
19
|
+
4. 在任何情况下,版权所有者均不对因使用或无法使用本软件而产生的任何索赔、损害或其他责任负责。
|
|
20
|
+
|
|
21
|
+
5. 本许可协议受中华人民共和国法律管辖。
|
|
22
|
+
|
|
23
|
+
如需获得使用许可,请联系版权所有者。
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
PROPRIETARY SOFTWARE LICENSE
|
|
28
|
+
|
|
29
|
+
Copyright © 2024 Suzhou Jijian-da Information Technology Co., Ltd. All rights reserved.
|
|
30
|
+
|
|
31
|
+
This software and associated documentation files (the "Software") is proprietary
|
|
32
|
+
software protected by copyright laws and international treaties.
|
|
33
|
+
|
|
34
|
+
License Restrictions:
|
|
35
|
+
|
|
36
|
+
1. This Software is licensed only to users who have obtained explicit written permission.
|
|
37
|
+
|
|
38
|
+
2. Without prior written consent from the copyright holder, you may not:
|
|
39
|
+
- Copy, modify, adapt, or translate the Software
|
|
40
|
+
- Reverse engineer, decompile, or disassemble the Software
|
|
41
|
+
- Rent, lease, distribute, transfer, or sublicense the Software
|
|
42
|
+
- Remove or modify any copyright notices or other proprietary markings in the Software
|
|
43
|
+
|
|
44
|
+
3. The Software is provided "as is" without warranty of any kind, express or implied,
|
|
45
|
+
including but not limited to warranties of merchantability, fitness for a particular
|
|
46
|
+
purpose, and non-infringement.
|
|
47
|
+
|
|
48
|
+
4. In no event shall the copyright holder be liable for any claims, damages, or other
|
|
49
|
+
liability arising from the use or inability to use the Software.
|
|
50
|
+
|
|
51
|
+
5. This license agreement is governed by the laws of the People's Republic of China.
|
|
52
|
+
|
|
53
|
+
For licensing inquiries, please contact the copyright holder.
|
package/README.md
CHANGED
|
@@ -1,129 +1,130 @@
|
|
|
1
|
-
# SimCode UI
|
|
2
|
-
|
|
3
|
-
<div align="center">
|
|
4
|
-
<h1>SimCode UI</h1>
|
|
5
|
-
<p>基于 Vue 3 + TypeScript 的现代化 UI 组件库</p>
|
|
6
|
-
</div>
|
|
7
|
-
|
|
8
|
-
## ✨ 特性
|
|
9
|
-
|
|
10
|
-
- 🚀 **现代化技术栈**: 基于 Vue 3 + TypeScript + Vite
|
|
11
|
-
- 📦 **开箱即用**: 提供完善的类型定义和文档
|
|
12
|
-
- 🎨 **精美设计**: 现代化的设计风格
|
|
13
|
-
- 🔧 **易于定制**: 支持主题定制
|
|
14
|
-
- ⚡️ **按需加载**: 支持 Tree Shaking
|
|
15
|
-
- 🧪 **完善测试**: 单元测试覆盖
|
|
16
|
-
|
|
17
|
-
## 📦 安装
|
|
18
|
-
|
|
19
|
-
使用 pnpm:
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
pnpm add @a2simcode/ui
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
使用 npm:
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
npm install @a2simcode/ui
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
使用 yarn:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
yarn add @a2simcode/ui
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## 🔨 快速开始
|
|
38
|
-
|
|
39
|
-
### 完整引入
|
|
40
|
-
|
|
41
|
-
```typescript
|
|
42
|
-
import { createApp } from 'vue'
|
|
43
|
-
import App from './App.vue'
|
|
44
|
-
import SimCodeUI from '@a2simcode/ui'
|
|
45
|
-
import '@a2simcode/ui/dist/style.css'
|
|
46
|
-
|
|
47
|
-
const app = createApp(App)
|
|
48
|
-
app.use(SimCodeUI)
|
|
49
|
-
app.mount('#app')
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### 按需引入
|
|
53
|
-
|
|
54
|
-
```vue
|
|
55
|
-
<template>
|
|
56
|
-
<j-button type="primary">按钮</j-button>
|
|
57
|
-
</template>
|
|
58
|
-
|
|
59
|
-
<script setup lang="ts">
|
|
60
|
-
import { JButton } from '@a2simcode/ui'
|
|
61
|
-
import '@a2simcode/ui/dist/style.css'
|
|
62
|
-
</script>
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
## 🎯 组件列表
|
|
66
|
-
|
|
67
|
-
- ✅ Button 按钮
|
|
68
|
-
- ✅ Input 输入框
|
|
69
|
-
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
│
|
|
100
|
-
│ │ ├──
|
|
101
|
-
│ │
|
|
102
|
-
│ └──
|
|
103
|
-
│
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
│
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
│ ├──
|
|
110
|
-
│
|
|
111
|
-
|
|
112
|
-
├──
|
|
113
|
-
├──
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
1
|
+
# SimCode UI
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
<h1>SimCode UI</h1>
|
|
5
|
+
<p>基于 Vue 3 + TypeScript 的现代化 UI 组件库</p>
|
|
6
|
+
</div>
|
|
7
|
+
|
|
8
|
+
## ✨ 特性
|
|
9
|
+
|
|
10
|
+
- 🚀 **现代化技术栈**: 基于 Vue 3 + TypeScript + Vite
|
|
11
|
+
- 📦 **开箱即用**: 提供完善的类型定义和文档
|
|
12
|
+
- 🎨 **精美设计**: 现代化的设计风格
|
|
13
|
+
- 🔧 **易于定制**: 支持主题定制
|
|
14
|
+
- ⚡️ **按需加载**: 支持 Tree Shaking
|
|
15
|
+
- 🧪 **完善测试**: 单元测试覆盖
|
|
16
|
+
|
|
17
|
+
## 📦 安装
|
|
18
|
+
|
|
19
|
+
使用 pnpm:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pnpm add @a2simcode/ui
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
使用 npm:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm install @a2simcode/ui
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
使用 yarn:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
yarn add @a2simcode/ui
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## 🔨 快速开始
|
|
38
|
+
|
|
39
|
+
### 完整引入
|
|
40
|
+
|
|
41
|
+
```typescript
|
|
42
|
+
import { createApp } from 'vue'
|
|
43
|
+
import App from './App.vue'
|
|
44
|
+
import SimCodeUI from '@a2simcode/ui'
|
|
45
|
+
import '@a2simcode/ui/dist/style.css'
|
|
46
|
+
|
|
47
|
+
const app = createApp(App)
|
|
48
|
+
app.use(SimCodeUI)
|
|
49
|
+
app.mount('#app')
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### 按需引入
|
|
53
|
+
|
|
54
|
+
```vue
|
|
55
|
+
<template>
|
|
56
|
+
<j-button type="primary">按钮</j-button>
|
|
57
|
+
</template>
|
|
58
|
+
|
|
59
|
+
<script setup lang="ts">
|
|
60
|
+
import { JButton } from '@a2simcode/ui'
|
|
61
|
+
import '@a2simcode/ui/dist/style.css'
|
|
62
|
+
</script>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## 🎯 组件列表
|
|
66
|
+
|
|
67
|
+
- ✅ Button 按钮
|
|
68
|
+
- ✅ Input 输入框
|
|
69
|
+
- ✅ Radio 单选框
|
|
70
|
+
- 🚧 更多组件开发中...
|
|
71
|
+
|
|
72
|
+
## 💻 本地开发
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# 进入项目目录
|
|
76
|
+
cd simcode-ui
|
|
77
|
+
|
|
78
|
+
# 安装依赖
|
|
79
|
+
pnpm install
|
|
80
|
+
|
|
81
|
+
# 启动开发服务器
|
|
82
|
+
pnpm dev
|
|
83
|
+
|
|
84
|
+
# 构建组件库
|
|
85
|
+
pnpm build
|
|
86
|
+
|
|
87
|
+
# 运行测试
|
|
88
|
+
pnpm test
|
|
89
|
+
|
|
90
|
+
# 启动文档站点
|
|
91
|
+
pnpm docs:dev
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## 📁 项目结构
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
simcode-ui/
|
|
98
|
+
├── packages/ # 组件源码
|
|
99
|
+
│ ├── components/ # 组件
|
|
100
|
+
│ │ ├── button/ # 按钮组件
|
|
101
|
+
│ │ ├── input/ # 输入框组件
|
|
102
|
+
│ │ └── index.ts # 组件入口
|
|
103
|
+
│ └── theme/ # 主题样式
|
|
104
|
+
│ └── src/ # 样式源码 (Less)
|
|
105
|
+
├── examples/ # 组件预览
|
|
106
|
+
│ ├── App.vue # 预览应用
|
|
107
|
+
│ └── main.ts # 入口文件
|
|
108
|
+
├── docs/ # 文档
|
|
109
|
+
│ ├── .vitepress/ # VitePress 配置
|
|
110
|
+
│ ├── guide/ # 指南
|
|
111
|
+
│ └── components/ # 组件文档
|
|
112
|
+
├── __tests__/ # 测试文件
|
|
113
|
+
├── vite.config.ts # Vite 配置
|
|
114
|
+
├── vitest.config.ts # Vitest 配置
|
|
115
|
+
└── package.json # 项目配置
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## 🤝 贡献
|
|
119
|
+
|
|
120
|
+
欢迎提交 Issue 和 Pull Request!
|
|
121
|
+
|
|
122
|
+
## 📄 版权声明
|
|
123
|
+
|
|
124
|
+
Copyright © 2024 苏州极简搭信息技术有限公司. All rights reserved.
|
|
125
|
+
|
|
126
|
+
本软件及其相关文档为专有软件,受版权法保护。未经版权所有者明确书面许可,不得以任何形式或方式(电子、机械、复印、录制或其他方式)复制、分发、传播或使用本软件的任何部分。
|
|
127
|
+
|
|
128
|
+
## 🙏 致谢
|
|
129
|
+
|
|
130
|
+
感谢所有为这个项目做出贡献的开发者!
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
declare const JAutocomplete: {
|
|
2
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./src/autocomplete.vue').AutocompleteProps> & Readonly<{
|
|
3
|
+
onSelect?: ((value: any) => any) | undefined;
|
|
4
|
+
onFocus?: (() => any) | undefined;
|
|
5
|
+
onBlur?: (() => any) | undefined;
|
|
6
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
7
|
+
onChange?: ((value: string) => any) | undefined;
|
|
8
|
+
}>, {
|
|
9
|
+
focus: () => void;
|
|
10
|
+
blur: () => void;
|
|
11
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
12
|
+
select: (value: any) => any;
|
|
13
|
+
focus: () => any;
|
|
14
|
+
blur: () => any;
|
|
15
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
16
|
+
change: (value: string) => any;
|
|
17
|
+
}, import('vue').PublicProps, {
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
readonly: boolean;
|
|
20
|
+
placeholder: string;
|
|
21
|
+
clearable: boolean;
|
|
22
|
+
options: import('./src/autocomplete.vue').Option[];
|
|
23
|
+
teleported: boolean;
|
|
24
|
+
placement: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end";
|
|
25
|
+
valueKey: string;
|
|
26
|
+
debounce: number;
|
|
27
|
+
triggerOnFocus: boolean;
|
|
28
|
+
selectWhenUnmatched: boolean;
|
|
29
|
+
hideLoading: boolean;
|
|
30
|
+
highlightFirstItem: boolean;
|
|
31
|
+
fitInputWidth: boolean;
|
|
32
|
+
loopNavigation: boolean;
|
|
33
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
34
|
+
autocompleteRef: unknown;
|
|
35
|
+
}, any, import('vue').ComponentProvideOptions, {
|
|
36
|
+
P: {};
|
|
37
|
+
B: {};
|
|
38
|
+
D: {};
|
|
39
|
+
C: {};
|
|
40
|
+
M: {};
|
|
41
|
+
Defaults: {};
|
|
42
|
+
}, Readonly<import('./src/autocomplete.vue').AutocompleteProps> & Readonly<{
|
|
43
|
+
onSelect?: ((value: any) => any) | undefined;
|
|
44
|
+
onFocus?: (() => any) | undefined;
|
|
45
|
+
onBlur?: (() => any) | undefined;
|
|
46
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
47
|
+
onChange?: ((value: string) => any) | undefined;
|
|
48
|
+
}>, {
|
|
49
|
+
focus: () => void;
|
|
50
|
+
blur: () => void;
|
|
51
|
+
}, {}, {}, {}, {
|
|
52
|
+
disabled: boolean;
|
|
53
|
+
readonly: boolean;
|
|
54
|
+
placeholder: string;
|
|
55
|
+
clearable: boolean;
|
|
56
|
+
options: import('./src/autocomplete.vue').Option[];
|
|
57
|
+
teleported: boolean;
|
|
58
|
+
placement: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end";
|
|
59
|
+
valueKey: string;
|
|
60
|
+
debounce: number;
|
|
61
|
+
triggerOnFocus: boolean;
|
|
62
|
+
selectWhenUnmatched: boolean;
|
|
63
|
+
hideLoading: boolean;
|
|
64
|
+
highlightFirstItem: boolean;
|
|
65
|
+
fitInputWidth: boolean;
|
|
66
|
+
loopNavigation: boolean;
|
|
67
|
+
}>;
|
|
68
|
+
__isFragment?: never;
|
|
69
|
+
__isTeleport?: never;
|
|
70
|
+
__isSuspense?: never;
|
|
71
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('./src/autocomplete.vue').AutocompleteProps> & Readonly<{
|
|
72
|
+
onSelect?: ((value: any) => any) | undefined;
|
|
73
|
+
onFocus?: (() => any) | undefined;
|
|
74
|
+
onBlur?: (() => any) | undefined;
|
|
75
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
76
|
+
onChange?: ((value: string) => any) | undefined;
|
|
77
|
+
}>, {
|
|
78
|
+
focus: () => void;
|
|
79
|
+
blur: () => void;
|
|
80
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
81
|
+
select: (value: any) => any;
|
|
82
|
+
focus: () => any;
|
|
83
|
+
blur: () => any;
|
|
84
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
85
|
+
change: (value: string) => any;
|
|
86
|
+
}, string, {
|
|
87
|
+
disabled: boolean;
|
|
88
|
+
readonly: boolean;
|
|
89
|
+
placeholder: string;
|
|
90
|
+
clearable: boolean;
|
|
91
|
+
options: import('./src/autocomplete.vue').Option[];
|
|
92
|
+
teleported: boolean;
|
|
93
|
+
placement: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end";
|
|
94
|
+
valueKey: string;
|
|
95
|
+
debounce: number;
|
|
96
|
+
triggerOnFocus: boolean;
|
|
97
|
+
selectWhenUnmatched: boolean;
|
|
98
|
+
hideLoading: boolean;
|
|
99
|
+
highlightFirstItem: boolean;
|
|
100
|
+
fitInputWidth: boolean;
|
|
101
|
+
loopNavigation: boolean;
|
|
102
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
103
|
+
$slots: {
|
|
104
|
+
prefix?(_: {}): any;
|
|
105
|
+
suffix?(_: {}): any;
|
|
106
|
+
default?(_: {
|
|
107
|
+
item: any;
|
|
108
|
+
}): any;
|
|
109
|
+
header?(_: {}): any;
|
|
110
|
+
footer?(_: {}): any;
|
|
111
|
+
prepend?(_: {}): any;
|
|
112
|
+
append?(_: {}): any;
|
|
113
|
+
loading?(_: {}): any;
|
|
114
|
+
};
|
|
115
|
+
}) & {
|
|
116
|
+
install: (app: import('vue').App) => void;
|
|
117
|
+
};
|
|
118
|
+
export default JAutocomplete;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
export interface Option {
|
|
2
|
+
label?: string;
|
|
3
|
+
value?: string;
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
}
|
|
6
|
+
export interface AutocompleteProps {
|
|
7
|
+
/** 绑定值 */
|
|
8
|
+
modelValue?: string;
|
|
9
|
+
/** 占位文本 */
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
/** 是否可清空 */
|
|
12
|
+
clearable?: boolean;
|
|
13
|
+
/** 自动补全组件是否被禁用 */
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/** 是否只读 */
|
|
16
|
+
readonly?: boolean;
|
|
17
|
+
/** 输入建议对象中用于显示的键名 */
|
|
18
|
+
valueKey?: string;
|
|
19
|
+
/** 获取输入建议的防抖延时,单位为毫秒 */
|
|
20
|
+
debounce?: number;
|
|
21
|
+
/** 菜单弹出位置 */
|
|
22
|
+
placement?: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end';
|
|
23
|
+
options?: Option[];
|
|
24
|
+
/** 获取输入建议的方法 */
|
|
25
|
+
fetchSuggestions?: (queryString: string, callback: (data: any[]) => void) => void;
|
|
26
|
+
/** 是否在输入框获得焦点时显示建议 */
|
|
27
|
+
triggerOnFocus?: boolean;
|
|
28
|
+
/** 在输入没有任何匹配建议的情况下,按下回车是否触发 select 事件 */
|
|
29
|
+
selectWhenUnmatched?: boolean;
|
|
30
|
+
/** 原生 aria-label属性 */
|
|
31
|
+
ariaLabel?: string;
|
|
32
|
+
/** 是否隐藏远程加载时的加载图标 */
|
|
33
|
+
hideLoading?: boolean;
|
|
34
|
+
/** 下拉列表的类名 */
|
|
35
|
+
popperClass?: string | Record<string, any>;
|
|
36
|
+
/** autocomplete 下拉列表的样式 */
|
|
37
|
+
popperStyle?: Record<string, any>;
|
|
38
|
+
/** 是否将下拉列表元素插入 append-to 指向的元素下 */
|
|
39
|
+
teleported?: boolean;
|
|
40
|
+
/** 下拉框挂载到哪个 DOM 元素 */
|
|
41
|
+
appendTo?: HTMLElement | string;
|
|
42
|
+
/** 是否默认高亮远程搜索结果的第一项 */
|
|
43
|
+
highlightFirstItem?: boolean;
|
|
44
|
+
/** 下拉框的宽度是否与输入框相同 */
|
|
45
|
+
fitInputWidth?: boolean;
|
|
46
|
+
/** 键盘导航是否从末尾循环到开头 */
|
|
47
|
+
loopNavigation?: boolean;
|
|
48
|
+
}
|
|
49
|
+
declare function __VLS_template(): {
|
|
50
|
+
attrs: Partial<{}>;
|
|
51
|
+
slots: {
|
|
52
|
+
prefix?(_: {}): any;
|
|
53
|
+
suffix?(_: {}): any;
|
|
54
|
+
default?(_: {
|
|
55
|
+
item: any;
|
|
56
|
+
}): any;
|
|
57
|
+
header?(_: {}): any;
|
|
58
|
+
footer?(_: {}): any;
|
|
59
|
+
prepend?(_: {}): any;
|
|
60
|
+
append?(_: {}): any;
|
|
61
|
+
loading?(_: {}): any;
|
|
62
|
+
};
|
|
63
|
+
refs: {
|
|
64
|
+
autocompleteRef: unknown;
|
|
65
|
+
};
|
|
66
|
+
rootEl: any;
|
|
67
|
+
};
|
|
68
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
69
|
+
declare const __VLS_component: import('vue').DefineComponent<AutocompleteProps, {
|
|
70
|
+
focus: () => void;
|
|
71
|
+
blur: () => void;
|
|
72
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
73
|
+
select: (value: any) => any;
|
|
74
|
+
focus: () => any;
|
|
75
|
+
blur: () => any;
|
|
76
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
77
|
+
change: (value: string) => any;
|
|
78
|
+
}, string, import('vue').PublicProps, Readonly<AutocompleteProps> & Readonly<{
|
|
79
|
+
onSelect?: ((value: any) => any) | undefined;
|
|
80
|
+
onFocus?: (() => any) | undefined;
|
|
81
|
+
onBlur?: (() => any) | undefined;
|
|
82
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
83
|
+
onChange?: ((value: string) => any) | undefined;
|
|
84
|
+
}>, {
|
|
85
|
+
disabled: boolean;
|
|
86
|
+
readonly: boolean;
|
|
87
|
+
placeholder: string;
|
|
88
|
+
clearable: boolean;
|
|
89
|
+
options: Option[];
|
|
90
|
+
teleported: boolean;
|
|
91
|
+
placement: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end";
|
|
92
|
+
valueKey: string;
|
|
93
|
+
debounce: number;
|
|
94
|
+
triggerOnFocus: boolean;
|
|
95
|
+
selectWhenUnmatched: boolean;
|
|
96
|
+
hideLoading: boolean;
|
|
97
|
+
highlightFirstItem: boolean;
|
|
98
|
+
fitInputWidth: boolean;
|
|
99
|
+
loopNavigation: boolean;
|
|
100
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
101
|
+
autocompleteRef: unknown;
|
|
102
|
+
}, any>;
|
|
103
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
104
|
+
export default _default;
|
|
105
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
106
|
+
new (): {
|
|
107
|
+
$slots: S;
|
|
108
|
+
};
|
|
109
|
+
};
|