diff --git a/docs/docs/zh-CN/components/field.md b/docs/docs/zh-CN/components/field.md index f8ee3a25..2384dc07 100644 --- a/docs/docs/zh-CN/components/field.md +++ b/docs/docs/zh-CN/components/field.md @@ -18,6 +18,26 @@ export default { ::: +::: demo + + + + + +::: + | | | | |--|--|--| | title | 标题 | -- | \ No newline at end of file diff --git a/docs/docs/zh-CN/components/form.md b/docs/docs/zh-CN/components/form.md index bca58bcd..671ae148 100644 --- a/docs/docs/zh-CN/components/form.md +++ b/docs/docs/zh-CN/components/form.md @@ -192,4 +192,26 @@ export default { } +::: + +::: demo + + + + + ::: \ No newline at end of file diff --git a/docs/src/layouts/Layout.vue b/docs/src/layouts/Layout.vue index eceb20da..43b1e7d9 100644 --- a/docs/src/layouts/Layout.vue +++ b/docs/src/layouts/Layout.vue @@ -82,7 +82,7 @@ export default { { id: 21, title: '手风琴',subTitle:"collapse" ,path: '/zh-CN/components/collapse' }, { id: 22, title: '表格',subTitle:"table" ,path: '/zh-CN/components/table' }, { id: 23, title: '头像',subTitle:"avatar" ,path: '/zh-CN/components/avatar' }, - { id: 23, title: '字段',subTitle:"field" ,path: '/zh-CN/components/field' }, + { id: 24, title: '字段',subTitle:"field" ,path: '/zh-CN/components/field' }, ] const selected = ref(1) diff --git a/src/index.ts b/src/index.ts index 9931d780..9ad7dcb6 100644 --- a/src/index.ts +++ b/src/index.ts @@ -39,6 +39,7 @@ import LayForm from './module/form/index' import LayBreadcrumb from './module/breadcrumb/index' import LayBreadcrumbItem from './module/breadcrumbItem/index' import LayField from './module/field/index' +import LaySelect from './module/select/index' const components: Record = { LayRadio, @@ -76,7 +77,8 @@ const components: Record = { LayBreadcrumb, LayBreadcrumbItem, LayAvatar, - LayField + LayField, + LaySelect } const install = (app: App, options?: InstallOptions): void => { @@ -128,6 +130,7 @@ export { LayBreadcrumbItem, LayAvatar, LayField, + LaySelect, install, } diff --git a/src/module/select/index.ts b/src/module/select/index.ts new file mode 100644 index 00000000..a51d2752 --- /dev/null +++ b/src/module/select/index.ts @@ -0,0 +1,9 @@ +import type { App } from 'vue' +import Component from './index.vue' +import type { IDefineComponent } from '../type/index' + +Component.install = (app: App) => { + app.component(Component.name || 'LaySelect', Component) +} + +export default Component as IDefineComponent \ No newline at end of file diff --git a/src/module/select/index.vue b/src/module/select/index.vue new file mode 100644 index 00000000..b47d0db3 --- /dev/null +++ b/src/module/select/index.vue @@ -0,0 +1,44 @@ + + +