layui/src/index.ts

182 lines
4.4 KiB
TypeScript
Raw Normal View History

2021-09-26 22:09:33 +00:00
import type { App } from 'vue'
import type { IDefineComponent, InstallOptions } from './module/type/index'
import './css/layui.css'
2021-10-01 12:22:49 +00:00
import LayAvatar from './module/avatar/index'
2021-09-26 22:09:33 +00:00
import LayRadio from './module/radio/index'
import LayButton from './module/button/index'
2021-09-27 06:08:05 +00:00
import LayButtonContainer from './module/buttonContainer/index'
2021-09-27 05:35:53 +00:00
import LayButtonGroup from './module/buttonGroup/index'
2021-09-26 22:09:33 +00:00
import LayIcon from './module/icon/index'
import LayIconPicker from './module/iconPicker/index'
2021-09-27 00:43:12 +00:00
import LayCard from './module/card/index'
import LayLayout from './module/layout/index'
import LaySide from './module/side/index'
import LayBody from './module/body/index'
import LayHeader from './module/header/index'
import LayFooter from './module/footer/index'
import LayLogo from './module/logo/index'
import LayPanel from './module/panel/index'
import LayProgress from './module/progress/index'
import LayCol from './module/col/index'
import LayRow from './module/row/index'
import LayInput from './module/input/index'
import LayBadge from './module/badge/index'
import LayBlock from './module/block/index'
import LayLine from './module/line/index'
import LayTimeline from './module/timeline/index'
import LayTimelineItem from './module/timelineItem/index'
import LayTextarea from './module/textarea/index'
import LaySwitch from './module/switch/index'
import LayCollapse from './module/collapse/index'
import LayCollapseItem from './module/collapseItem/index'
import LayContainer from './module/container/index'
2021-09-29 15:42:53 +00:00
import LayMenu from './module/menu/index'
import LayMenuItem from './module/menuItem/index'
import LayMenuChildItem from './module/menuChildItem/index'
import LayCheckbox from './module/checkbox/index'
import LayForm from './module/form/index'
import LayBreadcrumb from './module/breadcrumb/index'
import LayBreadcrumbItem from './module/breadcrumbItem/index'
2021-10-01 14:31:21 +00:00
import LayField from './module/field/index'
2021-10-01 16:05:59 +00:00
import LaySelect from './module/select/index'
2021-10-02 16:52:06 +00:00
import LaySelectOption from './module/selectOption/index'
2021-10-02 16:01:14 +00:00
import LayScroll from './module/scroll/index'
2021-10-03 14:47:49 +00:00
import LayEmpty from './module/empty/index'
2021-10-03 23:44:31 +00:00
import LayFormItem from './module/formItem/index'
2021-10-04 00:06:19 +00:00
import LayRate from './module/rate/index'
2021-10-05 10:44:07 +00:00
import LayDropdown from './module/dropdown/index'
import LayDropdownItem from './module/dropdownItem/index'
2021-10-05 11:04:06 +00:00
import LayTab from './module/tab/index'
import LayTabItem from './module/tabItem/index'
import LayTree from './module/tree/index'
2021-10-09 02:41:52 +00:00
import LayTable from './module/table/index'
import LayPage from './module/page/index'
import LayTransfer from './module/transfer/index'
import LayCheckboxGroup from './module/checkboxGroup/index'
2021-09-26 22:09:33 +00:00
const components: Record<string, IDefineComponent> = {
LayRadio,
LayButton,
LayIcon,
LayLayout,
LaySide,
LayHeader,
LayBody,
LayFooter,
2021-09-26 22:59:01 +00:00
LayLogo,
2021-09-27 00:43:12 +00:00
LayPanel,
2021-09-27 01:24:54 +00:00
LayCard,
2021-09-27 05:35:53 +00:00
LayProgress,
2021-09-27 06:08:05 +00:00
LayButtonGroup,
2021-09-27 07:30:38 +00:00
LayButtonContainer,
LayRow,
LayCol,
2021-09-27 08:42:13 +00:00
LayInput,
2021-09-27 09:39:35 +00:00
LayBadge,
2021-09-27 14:01:22 +00:00
LayBlock,
2021-09-28 02:35:58 +00:00
LayLine,
LayTimeline,
2021-09-28 04:41:16 +00:00
LayTimelineItem,
LayTextarea,
LaySwitch,
LayCollapse,
2021-10-01 05:35:00 +00:00
LayCollapseItem,
2021-09-29 15:42:53 +00:00
LayContainer,
LayMenu,
LayMenuItem,
LayMenuChildItem,
LayCheckbox,
LayForm,
LayBreadcrumb,
2021-10-01 12:22:49 +00:00
LayBreadcrumbItem,
2021-10-01 14:31:21 +00:00
LayAvatar,
2021-10-01 16:05:59 +00:00
LayField,
2021-10-02 16:01:14 +00:00
LaySelect,
2021-10-02 16:52:06 +00:00
LayScroll,
2021-10-03 14:47:49 +00:00
LaySelectOption,
2021-10-03 23:44:31 +00:00
LayEmpty,
2021-10-04 00:06:19 +00:00
LayFormItem,
2021-10-05 10:44:07 +00:00
LayRate,
2021-10-05 11:04:06 +00:00
LayDropdown,
LayDropdownItem,
2021-10-05 11:04:06 +00:00
LayTab,
LayTabItem,
LayIconPicker,
LayTree,
2021-10-09 02:41:52 +00:00
LayTable,
LayPage,
LayTransfer,
LayCheckboxGroup
2021-09-26 22:09:33 +00:00
}
const install = (app: App, options?: InstallOptions): void => {
const _options = options
2021-09-26 22:09:33 +00:00
app.config.globalProperties.$PROOPTIONS = _options
for (const key in components) {
const item = components[key]
app.component(item.name || key, item)
}
}
console.log('document Site : http://layui-vue.pearadmin.com')
2021-10-01 12:38:24 +00:00
2021-09-26 22:09:33 +00:00
export {
LayRadio,
LayIcon,
LayButton,
LayLayout,
LaySide,
LayHeader,
LayBody,
LayFooter,
LayLogo,
LayPanel,
2021-09-27 00:43:12 +00:00
LayCard,
2021-09-27 01:24:54 +00:00
LayProgress,
2021-09-27 05:35:53 +00:00
LayButtonGroup,
2021-09-27 06:08:05 +00:00
LayButtonContainer,
2021-09-27 07:30:38 +00:00
LayRow,
LayCol,
2021-09-27 08:42:13 +00:00
LayInput,
LayBadge,
2021-09-27 09:39:35 +00:00
LayBlock,
2021-09-27 14:01:22 +00:00
LayLine,
2021-09-28 02:35:58 +00:00
LayTimeline,
LayTimelineItem,
2021-09-28 04:41:16 +00:00
LayTextarea,
LaySwitch,
LayCollapse,
2021-10-01 05:35:00 +00:00
LayCollapseItem,
LayContainer,
2021-09-29 15:42:53 +00:00
LayMenu,
LayMenuItem,
LayMenuChildItem,
LayCheckbox,
LayForm,
LayBreadcrumb,
LayBreadcrumbItem,
2021-10-01 12:22:49 +00:00
LayAvatar,
2021-10-01 14:31:21 +00:00
LayField,
2021-10-01 16:05:59 +00:00
LaySelect,
2021-10-02 16:01:14 +00:00
LayScroll,
2021-10-02 16:52:06 +00:00
LaySelectOption,
2021-10-03 14:47:49 +00:00
LayEmpty,
2021-10-03 23:44:31 +00:00
LayFormItem,
2021-10-04 00:06:19 +00:00
LayRate,
2021-10-05 10:44:07 +00:00
LayDropdown,
LayDropdownItem,
2021-10-05 11:04:06 +00:00
LayTab,
LayTabItem,
LayIconPicker,
LayTree,
2021-10-09 02:41:52 +00:00
LayTable,
LayPage,
LayTransfer,
LayCheckboxGroup,
2021-09-26 22:09:33 +00:00
install,
}
2021-10-12 04:01:30 +00:00
export default { install }