Skip to content

Commit

Permalink
refactor(searchbar): move to script setup
Browse files Browse the repository at this point in the history
  • Loading branch information
subordon committed May 19, 2024
1 parent 87f044d commit 8b4fb57
Show file tree
Hide file tree
Showing 10 changed files with 489 additions and 515 deletions.
3 changes: 2 additions & 1 deletion src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@
"name": "Searchbar",
"cName": "搜索栏",
"desc": "搜索栏",
"setup": true,
"author": "zongyue3"
},
{
Expand Down Expand Up @@ -932,4 +933,4 @@
]
}
]
}
}
13 changes: 13 additions & 0 deletions src/packages/__VUE/searchbar/doc.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,19 @@ app.use(Searchbar)
| rightin | right icon in the input box |
| rightout | right icon outside the input box |

### Types version

The component exports the following type definitions:

```js
import type {
SearchbarProps,
SearchbarInstance,
SearchbarInputAlign,
SearchbarShape,
} from '@nutui/nutui';
```

## Theming

### CSS Variables
Expand Down
13 changes: 13 additions & 0 deletions src/packages/__VUE/searchbar/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,19 @@ app.use(Searchbar)
| rightin | 输入框内 右 icon |
| rightout | 输入框外 右 icon |

### 类型定义 version

组件导出以下类型定义:

```js
import type {
SearchbarProps,
SearchbarInstance,
SearchbarInputAlign,
SearchbarShape,
} from '@nutui/nutui';
```

## 主题定制

### 样式变量
Expand Down
14 changes: 14 additions & 0 deletions src/packages/__VUE/searchbar/doc.taro.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,20 @@ app.use(Searchbar)
| rightin | 输入框内 右 icon |
| rightout | 输入框外 右 icon |

### 类型定义 version

组件导出以下类型定义:

```js
import type {
SearchbarProps,
SearchbarInstance,
SearchbarInputAlign,
SearchbarConfirmType,
SearchbarShape,
} from '@nutui/nutui-taro';
```

## 主题定制

### 样式变量
Expand Down
13 changes: 13 additions & 0 deletions src/packages/__VUE/searchbar/index.taro.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import Searchbar from './searchbar.taro.vue'
import type { ComponentPublicInstance } from 'vue'
import { withInstall } from '@/packages/utils'

withInstall(Searchbar)

export type { SearchbarProps } from './searchbar.taro.vue'

export type { SearchbarInputAlign, SearchbarConfirmType, SearchbarShape } from './types'

export type SearchbarInstance = ComponentPublicInstance & InstanceType<typeof Searchbar>

export { Searchbar, Searchbar as default }
258 changes: 0 additions & 258 deletions src/packages/__VUE/searchbar/index.taro.vue

This file was deleted.

13 changes: 13 additions & 0 deletions src/packages/__VUE/searchbar/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import Searchbar from './searchbar.vue'
import type { ComponentPublicInstance } from 'vue'
import { withInstall } from '@/packages/utils'

withInstall(Searchbar)

export type { SearchbarProps } from './searchbar.vue'

export type { SearchbarInputAlign, SearchbarShape } from './types'

export type SearchbarInstance = ComponentPublicInstance & InstanceType<typeof Searchbar>

export { Searchbar, Searchbar as default }

0 comments on commit 8b4fb57

Please sign in to comment.