Skip to content

Commit 8b4fb57

Browse files
committed
refactor(searchbar): move to script setup
1 parent 87f044d commit 8b4fb57

File tree

10 files changed

+489
-515
lines changed

10 files changed

+489
-515
lines changed

src/config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@
336336
"name": "Searchbar",
337337
"cName": "搜索栏",
338338
"desc": "搜索栏",
339+
"setup": true,
339340
"author": "zongyue3"
340341
},
341342
{
@@ -932,4 +933,4 @@
932933
]
933934
}
934935
]
935-
}
936+
}

src/packages/__VUE/searchbar/doc.en-US.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,19 @@ app.use(Searchbar)
9191
| rightin | right icon in the input box |
9292
| rightout | right icon outside the input box |
9393

94+
### Types version
95+
96+
The component exports the following type definitions:
97+
98+
```js
99+
import type {
100+
SearchbarProps,
101+
SearchbarInstance,
102+
SearchbarInputAlign,
103+
SearchbarShape,
104+
} from '@nutui/nutui';
105+
```
106+
94107
## Theming
95108

96109
### CSS Variables

src/packages/__VUE/searchbar/doc.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,19 @@ app.use(Searchbar)
9191
| rightin | 输入框内 右 icon |
9292
| rightout | 输入框外 右 icon |
9393

94+
### 类型定义 version
95+
96+
组件导出以下类型定义:
97+
98+
```js
99+
import type {
100+
SearchbarProps,
101+
SearchbarInstance,
102+
SearchbarInputAlign,
103+
SearchbarShape,
104+
} from '@nutui/nutui';
105+
```
106+
94107
## 主题定制
95108

96109
### 样式变量

src/packages/__VUE/searchbar/doc.taro.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,20 @@ app.use(Searchbar)
9393
| rightin | 输入框内 右 icon |
9494
| rightout | 输入框外 右 icon |
9595

96+
### 类型定义 version
97+
98+
组件导出以下类型定义:
99+
100+
```js
101+
import type {
102+
SearchbarProps,
103+
SearchbarInstance,
104+
SearchbarInputAlign,
105+
SearchbarConfirmType,
106+
SearchbarShape,
107+
} from '@nutui/nutui-taro';
108+
```
109+
96110
## 主题定制
97111

98112
### 样式变量
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import Searchbar from './searchbar.taro.vue'
2+
import type { ComponentPublicInstance } from 'vue'
3+
import { withInstall } from '@/packages/utils'
4+
5+
withInstall(Searchbar)
6+
7+
export type { SearchbarProps } from './searchbar.taro.vue'
8+
9+
export type { SearchbarInputAlign, SearchbarConfirmType, SearchbarShape } from './types'
10+
11+
export type SearchbarInstance = ComponentPublicInstance & InstanceType<typeof Searchbar>
12+
13+
export { Searchbar, Searchbar as default }

src/packages/__VUE/searchbar/index.taro.vue

Lines changed: 0 additions & 258 deletions
This file was deleted.

src/packages/__VUE/searchbar/index.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import Searchbar from './searchbar.vue'
2+
import type { ComponentPublicInstance } from 'vue'
3+
import { withInstall } from '@/packages/utils'
4+
5+
withInstall(Searchbar)
6+
7+
export type { SearchbarProps } from './searchbar.vue'
8+
9+
export type { SearchbarInputAlign, SearchbarShape } from './types'
10+
11+
export type SearchbarInstance = ComponentPublicInstance & InstanceType<typeof Searchbar>
12+
13+
export { Searchbar, Searchbar as default }

0 commit comments

Comments
 (0)