@a-drowned-fish/rox-v 1.0.19 → 1.0.21
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 +149 -201
- package/dist/es/collapse/collapse.js +1 -1
- package/dist/es/collapse/collapse.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/es/collapse/style.css +1 -1
- package/dist/es/components.js +6 -2
- package/dist/es/index.js +7 -5
- package/dist/es/input/index.js +7 -0
- package/dist/es/input/input.js +7 -0
- package/dist/es/input/input.vue_vue_type_script_setup_true_lang.js +44 -0
- package/dist/es/input/style.css +1 -0
- package/dist/es/input/style.css.js +0 -0
- package/dist/es/input-otp/input-otp.js +1 -1
- package/dist/es/input-otp/style.css +1 -1
- package/dist/es/menu/index.js +7 -0
- package/dist/es/menu/menu-item.js +5 -0
- package/dist/es/menu/menu-item.vue_vue_type_script_setup_true_lang.js +97 -0
- package/dist/es/menu/menu.js +7 -0
- package/dist/es/menu/menu.vue_vue_type_script_setup_true_lang.js +82 -0
- package/dist/es/menu/style.css +1 -0
- package/dist/es/menu/style.css.js +0 -0
- package/dist/es/popup/popup.js +1 -1
- package/dist/es/popup/style.css +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/collapse/collapse.js +1 -1
- package/dist/lib/collapse/collapse.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/lib/collapse/style.css +1 -1
- package/dist/lib/components.js +1 -1
- package/dist/lib/index.js +1 -1
- package/dist/lib/input/index.js +1 -0
- package/dist/lib/input/input.js +1 -0
- package/dist/lib/input/input.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/lib/input/style.css +1 -0
- package/dist/lib/input/style.css.js +0 -0
- package/dist/lib/input-otp/input-otp.js +1 -1
- package/dist/lib/input-otp/style.css +1 -1
- package/dist/lib/menu/index.js +1 -0
- package/dist/lib/menu/menu-item.js +1 -0
- package/dist/lib/menu/menu-item.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/lib/menu/menu.js +1 -0
- package/dist/lib/menu/menu.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/lib/menu/style.css +1 -0
- package/dist/lib/menu/style.css.js +0 -0
- package/dist/lib/popup/popup.js +1 -1
- package/dist/lib/popup/style.css +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/components.d.ts +6 -2
- package/dist/types/components/input/index.d.ts +5 -0
- package/dist/types/components/input/input.vue.d.ts +23 -0
- package/dist/types/components/input/style.css.d.ts +1 -0
- package/dist/types/components/input/types.d.ts +7 -0
- package/dist/types/components/input-otp/input-otp.vue.d.ts +3 -3
- package/dist/types/components/input-otp/types.d.ts +1 -1
- package/dist/types/components/menu/index.d.ts +5 -0
- package/dist/types/components/menu/menu-item.vue.d.ts +17 -0
- package/dist/types/components/menu/menu.vue.d.ts +39 -0
- package/dist/types/components/menu/style.css.d.ts +1 -0
- package/dist/types/components/menu/types.d.ts +19 -0
- package/dist/types/components/popup/popup.vue.d.ts +2 -2
- package/dist/types/components/popup/types.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,279 +1,227 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
一个基于 Vue 3 的组件库,支持按需引入和自动导入。
|
|
4
|
-
|
|
5
|
-
## 安装
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install @a-drowned-fish/rox-v
|
|
9
|
-
# 或
|
|
10
|
-
yarn add @a-drowned-fish/rox-v
|
|
11
|
-
# 或
|
|
12
|
-
pnpm add @a-drowned-fish/rox-v
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## 使用方式
|
|
16
|
-
|
|
17
|
-
### 1. 完整引入
|
|
18
|
-
|
|
19
|
-
```ts
|
|
20
|
-
import { createApp } from "vue";
|
|
21
|
-
import RoxV from "@a-drowned-fish/rox-v";
|
|
22
|
-
import "@a-drowned-fish/rox-v/dist/style.css"; // 如果需要样式
|
|
23
|
-
|
|
24
|
-
const app = createApp(App);
|
|
25
|
-
app.use(RoxV);
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
### 2. 按需引入(推荐)
|
|
29
|
-
|
|
30
|
-
- 优势: 无需手动引入样式文件 且 按需加载
|
|
1
|
+
|
|
|
31
2
|
|
|
32
|
-
|
|
33
|
-
<template>
|
|
34
|
-
<Button>点击我</Button>
|
|
35
|
-
<InputOtp />
|
|
36
|
-
</template>
|
|
37
|
-
<script setup lang="ts">
|
|
38
|
-
import { Button, InputOtp } from "@a-drowned-fish/rox-v";
|
|
39
|
-
</script>
|
|
40
|
-
```
|
|
3
|
+
#### Slots
|
|
41
4
|
|
|
42
|
-
|
|
5
|
+
| 插槽名 | 说明 |
|
|
6
|
+
| ------- | ------------ |
|
|
7
|
+
| default | 弹窗内容区域 |
|
|
43
8
|
|
|
44
|
-
###
|
|
9
|
+
### Menu - 下拉菜单组件
|
|
45
10
|
|
|
46
|
-
|
|
11
|
+
一个支持多级嵌套的下拉菜单组件,支持点击和悬停触发方式,带有过渡动画效果。
|
|
47
12
|
|
|
48
13
|
#### 基础用法
|
|
49
14
|
|
|
50
15
|
```vue
|
|
51
16
|
<template>
|
|
52
|
-
|
|
17
|
+
<Menu :items="menuItems" v-model="selectedValue">
|
|
18
|
+
<span>点击打开菜单</span>
|
|
19
|
+
</Menu>
|
|
53
20
|
</template>
|
|
54
21
|
|
|
55
22
|
<script setup lang="ts">
|
|
56
23
|
import { ref } from "vue";
|
|
24
|
+
import { Menu } from "@a-drowned-fish/rox-v";
|
|
57
25
|
|
|
58
|
-
const
|
|
26
|
+
const selectedValue = ref<(string | number)[]>([]);
|
|
27
|
+
|
|
28
|
+
const menuItems = [
|
|
29
|
+
{ label: "选项1", value: "option1" },
|
|
30
|
+
{ label: "选项2", value: "option2" },
|
|
31
|
+
{ label: "选项3", value: "option3" },
|
|
32
|
+
];
|
|
59
33
|
</script>
|
|
60
34
|
```
|
|
61
35
|
|
|
62
|
-
####
|
|
36
|
+
#### 多级菜单
|
|
63
37
|
|
|
64
38
|
```vue
|
|
65
39
|
<template>
|
|
66
|
-
|
|
67
|
-
<
|
|
68
|
-
|
|
69
|
-
<!-- 8位验证码 -->
|
|
70
|
-
<InputOtp v-model="code" :length="8" />
|
|
40
|
+
<Menu :items="menuItems" v-model="selectedValue">
|
|
41
|
+
<span>多级菜单</span>
|
|
42
|
+
</Menu>
|
|
71
43
|
</template>
|
|
72
44
|
|
|
73
45
|
<script setup lang="ts">
|
|
74
46
|
import { ref } from "vue";
|
|
75
|
-
|
|
76
|
-
|
|
47
|
+
import { Menu } from "@a-drowned-fish/rox-v";
|
|
48
|
+
|
|
49
|
+
const selectedValue = ref<(string | number)[]>([]);
|
|
50
|
+
|
|
51
|
+
const menuItems = [
|
|
52
|
+
{
|
|
53
|
+
label: "文件",
|
|
54
|
+
value: "file",
|
|
55
|
+
children: [
|
|
56
|
+
{ label: "新建", value: "new" },
|
|
57
|
+
{ label: "打开", value: "open" },
|
|
58
|
+
{ label: "保存", value: "save" },
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
label: "编辑",
|
|
63
|
+
value: "edit",
|
|
64
|
+
children: [
|
|
65
|
+
{ label: "撤销", value: "undo" },
|
|
66
|
+
{ label: "重做", value: "redo" },
|
|
67
|
+
{
|
|
68
|
+
label: "查找",
|
|
69
|
+
value: "find",
|
|
70
|
+
children: [
|
|
71
|
+
{ label: "查找文本", value: "find-text" },
|
|
72
|
+
{ label: "替换", value: "replace" },
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
];
|
|
77
78
|
</script>
|
|
78
79
|
```
|
|
79
80
|
|
|
80
|
-
####
|
|
81
|
+
#### 自定义图标
|
|
81
82
|
|
|
82
83
|
```vue
|
|
83
84
|
<template>
|
|
84
|
-
|
|
85
|
+
<Menu :items="menuItems" suffix-icon="/icons/arrow-right.svg" checked-icon="/icons/check.svg" v-model="selectedValue">
|
|
86
|
+
<span>带图标的菜单</span>
|
|
87
|
+
</Menu>
|
|
85
88
|
</template>
|
|
86
89
|
|
|
87
90
|
<script setup lang="ts">
|
|
88
91
|
import { ref } from "vue";
|
|
89
|
-
|
|
90
|
-
|
|
92
|
+
import { Menu } from "@a-drowned-fish/rox-v";
|
|
93
|
+
|
|
94
|
+
const selectedValue = ref<(string | number)[]>([]);
|
|
95
|
+
|
|
96
|
+
const menuItems = [
|
|
97
|
+
{ label: "选项1", value: "option1" },
|
|
98
|
+
{ label: "选项2", value: "option2" },
|
|
99
|
+
{
|
|
100
|
+
label: "子菜单",
|
|
101
|
+
value: "submenu",
|
|
102
|
+
children: [{ label: "子选项", value: "sub-option" }],
|
|
103
|
+
},
|
|
104
|
+
];
|
|
91
105
|
</script>
|
|
92
|
-
|
|
93
|
-
<style scoped>
|
|
94
|
-
.custom-item {
|
|
95
|
-
width: 50px;
|
|
96
|
-
height: 60px;
|
|
97
|
-
border: 2px solid #ddd;
|
|
98
|
-
border-radius: 12px;
|
|
99
|
-
font-size: 24px;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.custom-active {
|
|
103
|
-
border-color: #67c23a;
|
|
104
|
-
box-shadow: 0 0 0 3px rgba(103, 194, 58, 0.2);
|
|
105
|
-
}
|
|
106
|
-
</style>
|
|
107
106
|
```
|
|
108
107
|
|
|
109
|
-
####
|
|
108
|
+
#### 监听事件
|
|
110
109
|
|
|
111
110
|
```vue
|
|
112
111
|
<template>
|
|
113
|
-
|
|
112
|
+
<Menu :items="menuItems" v-model="selectedValue" @open="handleOpen" @close="handleClose">
|
|
113
|
+
<span>监听事件</span>
|
|
114
|
+
</Menu>
|
|
114
115
|
</template>
|
|
115
116
|
|
|
116
117
|
<script setup lang="ts">
|
|
117
118
|
import { ref } from "vue";
|
|
119
|
+
import { Menu } from "@a-drowned-fish/rox-v";
|
|
118
120
|
|
|
119
|
-
const
|
|
121
|
+
const selectedValue = ref<(string | number)[]>([]);
|
|
120
122
|
|
|
121
|
-
const
|
|
122
|
-
|
|
123
|
-
|
|
123
|
+
const menuItems = [
|
|
124
|
+
{ label: "选项1", value: "option1" },
|
|
125
|
+
{ label: "选项2", value: "option2" },
|
|
126
|
+
];
|
|
127
|
+
|
|
128
|
+
const handleOpen = () => {
|
|
129
|
+
console.log("菜单已打开");
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
const handleClose = () => {
|
|
133
|
+
console.log("菜单已关闭");
|
|
124
134
|
};
|
|
125
135
|
</script>
|
|
126
136
|
```
|
|
127
137
|
|
|
128
|
-
####
|
|
129
|
-
|
|
130
|
-
| 属性 | 说明 | 类型 | 默认值 |
|
|
131
|
-
| ------------------ | -------------------------------------------- | -------- | ---------- |
|
|
132
|
-
| length | 输入框数量 | `number` | `6` |
|
|
133
|
-
| itemClass | 每个输入项的自定义类名 | `string` | `''` |
|
|
134
|
-
| activeItemClass | 激活状态输入项的自定义类名 | `string` | `''` |
|
|
135
|
-
| gap | 输入项之间的间距 | `string` | `'10px'` |
|
|
136
|
-
| hasFilledItemClass | 具有内容的输入项的类名[active前面选项的类名] | `string` | `'active'` |
|
|
137
|
-
|
|
138
|
-
#### Events
|
|
139
|
-
|
|
140
|
-
| 事件名 | 说明 | 回调参数 |
|
|
141
|
-
| -------- | ------------------------------ | ----------------- |
|
|
142
|
-
| complete | 输入完成时触发(达到指定长度) | `(value: string)` |
|
|
143
|
-
|
|
144
|
-
### Popup - 弹出层组件
|
|
145
|
-
|
|
146
|
-
一个灵活的弹出层组件,支持从不同方向滑入,带有遮罩层和过渡动画效果。
|
|
147
|
-
|
|
148
|
-
#### 基础用法
|
|
138
|
+
#### 自定义样式
|
|
149
139
|
|
|
150
140
|
```vue
|
|
151
141
|
<template>
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
142
|
+
<Menu
|
|
143
|
+
:items="menuItems"
|
|
144
|
+
v-model="selectedValue"
|
|
145
|
+
item-gap="8px"
|
|
146
|
+
active-item-class="custom-active"
|
|
147
|
+
list-container-class="custom-list"
|
|
148
|
+
default-container-class="custom-trigger"
|
|
149
|
+
>
|
|
150
|
+
<span>自定义样式</span>
|
|
151
|
+
</Menu>
|
|
161
152
|
</template>
|
|
162
153
|
|
|
163
154
|
<script setup lang="ts">
|
|
164
155
|
import { ref } from "vue";
|
|
165
|
-
import {
|
|
156
|
+
import { Menu } from "@a-drowned-fish/rox-v";
|
|
157
|
+
|
|
158
|
+
const selectedValue = ref<(string | number)[]>([]);
|
|
166
159
|
|
|
167
|
-
const
|
|
160
|
+
const menuItems = [
|
|
161
|
+
{ label: "选项1", value: "option1" },
|
|
162
|
+
{ label: "选项2", value: "option2" },
|
|
163
|
+
];
|
|
168
164
|
</script>
|
|
169
165
|
|
|
170
166
|
<style scoped>
|
|
171
|
-
.
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
167
|
+
.custom-trigger {
|
|
168
|
+
background-color: #409eff;
|
|
169
|
+
color: white;
|
|
170
|
+
border-radius: 4px;
|
|
175
171
|
}
|
|
176
|
-
</style>
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
#### 不同位置
|
|
180
172
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
<Popup v-model="showBottom" position="bottom">
|
|
185
|
-
<div class="content">底部弹窗</div>
|
|
186
|
-
</Popup>
|
|
187
|
-
|
|
188
|
-
<!-- 顶部弹出 -->
|
|
189
|
-
<Popup v-model="showTop" position="top">
|
|
190
|
-
<div class="content">顶部弹窗</div>
|
|
191
|
-
</Popup>
|
|
192
|
-
|
|
193
|
-
<!-- 左侧弹出 -->
|
|
194
|
-
<Popup v-model="showLeft" position="left">
|
|
195
|
-
<div class="content">左侧弹窗</div>
|
|
196
|
-
</Popup>
|
|
197
|
-
|
|
198
|
-
<!-- 右侧弹出 -->
|
|
199
|
-
<Popup v-model="showRight" position="right">
|
|
200
|
-
<div class="content">右侧弹窗</div>
|
|
201
|
-
</Popup>
|
|
202
|
-
</template>
|
|
203
|
-
|
|
204
|
-
<script setup lang="ts">
|
|
205
|
-
import { ref } from "vue";
|
|
206
|
-
import { Popup } from "@a-drowned-fish/rox-v";
|
|
173
|
+
.custom-list {
|
|
174
|
+
border-radius: 8px;
|
|
175
|
+
}
|
|
207
176
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
</
|
|
177
|
+
.custom-active {
|
|
178
|
+
background-color: #ecf5ff;
|
|
179
|
+
color: #409eff;
|
|
180
|
+
}
|
|
181
|
+
</style>
|
|
213
182
|
```
|
|
214
183
|
|
|
215
|
-
####
|
|
184
|
+
#### Props
|
|
216
185
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
186
|
+
| 属性 | 说明 | 类型 | 默认值 |
|
|
187
|
+
| --------------------- | ------------------------ | ----------------------- | ------- |
|
|
188
|
+
| items | 菜单项数据 | `RoxVMenuOptionProps[]` | `[]` |
|
|
189
|
+
| duration | 过渡动画持续时间(毫秒) | `number` | `100` |
|
|
190
|
+
| suffixIcon | 子菜单后缀图标 URL | `string` | `''` |
|
|
191
|
+
| suffixIconClass | 后缀图标的自定义类名 | `string` | `''` |
|
|
192
|
+
| checkedIcon | 选中项的图标 URL | `string` | `''` |
|
|
193
|
+
| checkedIconClass | 选中标记图标的自定义类名 | `string` | `''` |
|
|
194
|
+
| listContainerClass | 菜单列表容器的自定义类名 | `string` | `''` |
|
|
195
|
+
| subMenuContainerClass | 子菜单容器的自定义类名 | `string` | `''` |
|
|
196
|
+
| defaultContainerClass | 触发区域容器的自定义类名 | `string` | `''` |
|
|
197
|
+
| itemContainerClass | 菜单项的自定义类名 | `string` | `''` |
|
|
198
|
+
| itemGap | 菜单项之间的间距 | `string` | `'4px'` |
|
|
199
|
+
| activeItemClass | 激活菜单项的自定义类名 | `string` | `''` |
|
|
200
|
+
| v-model | 当前选中的菜单项路径 | `(string \| number)[]` | `[]` |
|
|
226
201
|
|
|
227
|
-
|
|
228
|
-
import { ref } from "vue";
|
|
229
|
-
import { Popup, Button } from "@a-drowned-fish/rox-v";
|
|
202
|
+
#### Events
|
|
230
203
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
204
|
+
| 事件名 | 说明 | 回调参数 |
|
|
205
|
+
| ------ | ---------- | -------- |
|
|
206
|
+
| open | 菜单打开时 | 无 |
|
|
207
|
+
| close | 菜单关闭时 | 无 |
|
|
234
208
|
|
|
235
|
-
####
|
|
209
|
+
#### Slots
|
|
236
210
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
<Popup v-model="show" to="#custom-container">
|
|
241
|
-
<div class="content">挂载到指定容器</div>
|
|
242
|
-
</Popup>
|
|
243
|
-
</div>
|
|
244
|
-
</template>
|
|
211
|
+
| 插槽名 | 说明 |
|
|
212
|
+
| ------- | -------------------- |
|
|
213
|
+
| default | 触发区域的自定义内容 |
|
|
245
214
|
|
|
246
|
-
|
|
247
|
-
import { ref } from "vue";
|
|
248
|
-
import { Popup } from "@a-drowned-fish/rox-v";
|
|
215
|
+
#### 类型定义
|
|
249
216
|
|
|
250
|
-
|
|
251
|
-
|
|
217
|
+
```ts
|
|
218
|
+
interface RoxVMenuOptionProps {
|
|
219
|
+
label: string; // 菜单项显示文本
|
|
220
|
+
value: string | number; // 菜单项唯一标识
|
|
221
|
+
children?: RoxVMenuOptionProps[]; // 子菜单项(可选)
|
|
222
|
+
}
|
|
252
223
|
```
|
|
253
224
|
|
|
254
|
-
#### Props
|
|
255
|
-
|
|
256
|
-
| 属性 | 说明 | 类型 | 默认值 |
|
|
257
|
-
| ------------ | ---------------------------- | ---------------------------------------- | --------------------- |
|
|
258
|
-
| position | 弹出位置 | `'top' \| 'bottom' \| 'left' \| 'right'` | `'bottom'` |
|
|
259
|
-
| bg | 遮罩层背景色 | `string` | `'rgba(0, 0, 0, .5)'` |
|
|
260
|
-
| duration | 动画持续时间(毫秒) | `number` | `300` |
|
|
261
|
-
| maskClosable | 点击遮罩层是否关闭 | `boolean` | `true` |
|
|
262
|
-
| to | teleport 的目标节点 | `string` | `'body'` |
|
|
263
|
-
| top | 弹窗顶部距离父元素顶部的距离 | `string` | `'0px'` |
|
|
264
|
-
| left | 弹窗左侧距离父元素左侧的距离 | `string` | `'0px'` |
|
|
265
|
-
| right | 弹窗右侧距离父元素右侧的距离 | `string` | `'0px'` |
|
|
266
|
-
| bottom | 弹窗底部距离父元素底部的距离 | `string` | `'0px'` |
|
|
267
|
-
| zIndex | 弹窗的 z-index 值 | `number` | `50` |
|
|
268
|
-
|
|
269
|
-
|
|
|
270
|
-
|
|
271
|
-
#### Slots
|
|
272
|
-
|
|
273
|
-
| 插槽名 | 说明 |
|
|
274
|
-
| ------- | ------------ |
|
|
275
|
-
| default | 弹窗内容区域 |
|
|
276
|
-
|
|
277
225
|
## License
|
|
278
226
|
|
|
279
227
|
MIT
|
|
@@ -2,6 +2,6 @@ import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
|
2
2
|
import t from "./collapse.vue_vue_type_script_setup_true_lang.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region components/collapse/collapse.vue
|
|
5
|
-
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-
|
|
5
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-cc071022"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Transition as e, createBlock as t, createCommentVNode as n, createElementBlock as r, defineComponent as i, normalizeStyle as a, openBlock as o, renderSlot as s, withCtx as c } from "vue";
|
|
2
2
|
//#region components/collapse/collapse.vue?vue&type=script&setup=true&lang.ts
|
|
3
3
|
var l = /* @__PURE__ */ i({
|
|
4
|
+
name: "Collapse",
|
|
4
5
|
__name: "collapse",
|
|
5
6
|
props: {
|
|
6
7
|
open: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.collapse-content[data-v-
|
|
1
|
+
.collapse-content[data-v-cc071022]{width:max-content}.collapse-enter-from[data-v-cc071022],.collapse-leave-to[data-v-cc071022]{max-height:0!important}.collapse-enter-active[data-v-cc071022],.collapse-leave-active[data-v-cc071022]{max-height:var(--max-height);transition:max-height var(--duration) ease-in-out;overflow:hidden}
|
package/dist/es/components.js
CHANGED
|
@@ -3,12 +3,16 @@ import t from "./input-otp/index.js";
|
|
|
3
3
|
import n from "./popup/index.js";
|
|
4
4
|
import r from "./button/index.js";
|
|
5
5
|
import i from "./collapse/index.js";
|
|
6
|
+
import a from "./input/index.js";
|
|
7
|
+
import o from "./menu/index.js";
|
|
6
8
|
//#region components/components.ts
|
|
7
|
-
var
|
|
9
|
+
var s = /* @__PURE__ */ e({
|
|
8
10
|
Button: () => r,
|
|
9
11
|
Collapse: () => i,
|
|
12
|
+
Input: () => a,
|
|
10
13
|
InputOtp: () => t,
|
|
14
|
+
Menu: () => o,
|
|
11
15
|
Popup: () => n
|
|
12
16
|
});
|
|
13
17
|
//#endregion
|
|
14
|
-
export {
|
|
18
|
+
export { s as components_exports };
|
package/dist/es/index.js
CHANGED
|
@@ -2,12 +2,14 @@ import e from "./input-otp/index.js";
|
|
|
2
2
|
import t from "./popup/index.js";
|
|
3
3
|
import n from "./button/index.js";
|
|
4
4
|
import r from "./collapse/index.js";
|
|
5
|
-
import
|
|
5
|
+
import i from "./input/index.js";
|
|
6
|
+
import a from "./menu/index.js";
|
|
7
|
+
import { components_exports as o } from "./components.js";
|
|
6
8
|
/* empty css */
|
|
7
9
|
//#region components/index.ts
|
|
8
|
-
var
|
|
9
|
-
let n =
|
|
10
|
+
var s = (e) => (Object.keys(o).forEach((t) => {
|
|
11
|
+
let n = o[t];
|
|
10
12
|
n.install && e.use(n);
|
|
11
|
-
}), e),
|
|
13
|
+
}), e), c = { install: s };
|
|
12
14
|
//#endregion
|
|
13
|
-
export { n as Button, r as Collapse, e as InputOtp, t as Popup,
|
|
15
|
+
export { n as Button, r as Collapse, i as Input, e as InputOtp, a as Menu, t as Popup, c as default, s as install };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./input.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region components/input/input.vue
|
|
5
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-56cf72b9"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { createCommentVNode as e, createElementBlock as t, createElementVNode as n, defineComponent as r, mergeModels as i, openBlock as a, useModel as o, useTemplateRef as s, vModelDynamic as c, vShow as l, withDirectives as u, withKeys as d } from "vue";
|
|
2
|
+
//#region components/input/input.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var f = { class: "input-box" }, p = ["type", "placeholder"], m = ["src"], h = /* @__PURE__ */ r({
|
|
4
|
+
name: "Input",
|
|
5
|
+
__name: "input",
|
|
6
|
+
props: /* @__PURE__ */ i({
|
|
7
|
+
placeholder: { default: "" },
|
|
8
|
+
type: { default: "text" },
|
|
9
|
+
iconVisible: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: !1
|
|
12
|
+
},
|
|
13
|
+
icon: { default: "" }
|
|
14
|
+
}, {
|
|
15
|
+
modelValue: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: ""
|
|
18
|
+
},
|
|
19
|
+
modelModifiers: {}
|
|
20
|
+
}),
|
|
21
|
+
emits: /* @__PURE__ */ i(["click", "enter"], ["update:modelValue"]),
|
|
22
|
+
setup(r, { emit: i }) {
|
|
23
|
+
let h = i, g = s("input"), _ = o(r, "modelValue"), v = r, y = () => {
|
|
24
|
+
h("click"), g.value?.focus?.(), setTimeout(() => {
|
|
25
|
+
let e = _.value.length;
|
|
26
|
+
g.value?.setSelectionRange?.(e, e);
|
|
27
|
+
}, 0);
|
|
28
|
+
};
|
|
29
|
+
return (r, i) => (a(), t("div", f, [u(n("input", {
|
|
30
|
+
type: v.type,
|
|
31
|
+
"onUpdate:modelValue": i[0] ||= (e) => _.value = e,
|
|
32
|
+
ref: "input",
|
|
33
|
+
placeholder: v.placeholder,
|
|
34
|
+
onKeyup: i[1] ||= d((e) => r.$emit("enter"), ["enter"])
|
|
35
|
+
}, null, 40, p), [[c, _.value]]), v.icon ? u((a(), t("img", {
|
|
36
|
+
key: 0,
|
|
37
|
+
src: v.icon,
|
|
38
|
+
alt: "icon",
|
|
39
|
+
onClick: y
|
|
40
|
+
}, null, 8, m)), [[l, v.iconVisible]]) : e("", !0)]));
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
//#endregion
|
|
44
|
+
export { h as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.input-box[data-v-56cf72b9]{will-change:border-color;box-sizing:border-box;border-bottom:1px solid #00000029;align-items:center;gap:16px;height:60px;padding:16px 0;transition:border-color .2s ease-in-out;display:flex}.input-box[data-v-56cf72b9]:focus-within{border-color:#000}.input-box input[data-v-56cf72b9]{width:100%;height:100%;font-size:inherit;border:none;outline:none}input[data-v-56cf72b9]::-webkit-input-placeholder{color:var(--input-placeholder-color,#999)}input[data-v-56cf72b9]::-moz-placeholder{color:var(--input-placeholder-color,#999)}input[data-v-56cf72b9]:-ms-placeholder-shown{color:var(--input-placeholder-color,#999)}.input-box img[data-v-56cf72b9]{-o-object-fit:contain;object-fit:contain;cursor:pointer;width:24px;height:24px}
|
|
File without changes
|
|
@@ -2,6 +2,6 @@ import e from "./input-otp.vue_vue_type_script_setup_true_lang.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
//#region components/input-otp/input-otp.vue
|
|
5
|
-
var n = /* @__PURE__ */ t(e, [["__scopeId", "data-v-
|
|
5
|
+
var n = /* @__PURE__ */ t(e, [["__scopeId", "data-v-e8da3c38"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.otp-wrapper[data-v-
|
|
1
|
+
.otp-wrapper[data-v-e8da3c38]{cursor:pointer;width:400px;max-width:100%;position:relative}.otp-box[data-v-e8da3c38]{width:100%;display:flex}.otp-item[data-v-e8da3c38]{border-bottom:1px solid #00000029;flex:1;justify-content:center;align-items:center;height:60px;transition:all .2s;display:flex}.otp-item.active[data-v-e8da3c38]{border-bottom:1px solid #000}
|