2021-12-25 00:09:30 +08:00
|
|
|
import type { App } from "vue";
|
|
|
|
import type { IDefineComponent, InstallOptions } from "./module/type/index";
|
2021-09-27 06:09:33 +08:00
|
|
|
|
2021-12-25 00:09:30 +08:00
|
|
|
import "./css/layui.css";
|
|
|
|
import "@layui/layer-vue/lib/index.css";
|
|
|
|
import "@layui/icons-vue/lib/index.css";
|
|
|
|
import { layer } from "@layui/layer-vue";
|
2021-11-28 18:53:42 +08:00
|
|
|
|
2022-01-02 21:12:47 +08:00
|
|
|
import LayLayer from "./module/layer/index";
|
2021-12-25 00:09:30 +08:00
|
|
|
import LayBacktop from "./module/backTop/index";
|
|
|
|
import LayAvatar from "./module/avatar/index";
|
2022-01-09 22:41:56 +08:00
|
|
|
import LayAvatarList from "./module/avatarList/index";
|
2021-12-25 00:09:30 +08:00
|
|
|
import LayRadio from "./module/radio/index";
|
|
|
|
import LayButton from "./module/button/index";
|
|
|
|
import LayButtonContainer from "./module/buttonContainer/index";
|
|
|
|
import LayButtonGroup from "./module/buttonGroup/index";
|
|
|
|
import LayIcon from "./module/icon/index";
|
|
|
|
import LayIconPicker from "./module/iconPicker/index";
|
|
|
|
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-12-27 14:37:45 +08:00
|
|
|
import LayCountUp from "./module/countUp/index";
|
2021-12-25 00:09:30 +08:00
|
|
|
import LayMenu from "./module/menu/index";
|
|
|
|
import LayMenuItem from "./module/menuItem/index";
|
|
|
|
import LayCheckbox from "./module/checkbox/index";
|
|
|
|
import LayCheckboxGroup from "./module/checkboxGroup/index";
|
|
|
|
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";
|
|
|
|
import LaySelectOption from "./module/selectOption/index";
|
|
|
|
import LayScroll from "./module/scroll/index";
|
|
|
|
import LayEmpty from "./module/empty/index";
|
|
|
|
import LayFormItem from "./module/formItem/index";
|
|
|
|
import LayRate from "./module/rate/index";
|
|
|
|
import LayDropdown from "./module/dropdown/index";
|
|
|
|
import LayDropdownItem from "./module/dropdownItem/index";
|
|
|
|
import LayTab from "./module/tab/index";
|
|
|
|
import LayTabItem from "./module/tabItem/index";
|
|
|
|
import LayTree from "./module/tree/index";
|
|
|
|
import LayTable from "./module/table/index";
|
|
|
|
import LayPage from "./module/page/index";
|
|
|
|
import LayTransfer from "./module/transfer/index";
|
|
|
|
import LaySlider from "./module/slider/index";
|
|
|
|
import LayCarousel from "./module/carousel/index";
|
|
|
|
import LayCarouselItem from "./module/carouselItem/index";
|
|
|
|
import LayColorPicker from "./module/colorPicker/index";
|
|
|
|
import LayTooltip from "./module/tooltip/index";
|
|
|
|
import LayInputNumber from "./module/inputNumber/index";
|
2022-01-04 18:12:13 +08:00
|
|
|
import LaySkeleton from "./module/skeleton/index";
|
|
|
|
import LaySkeletonItem from "./module/skeletonItem/index";
|
|
|
|
import LayStep from "./module/step/index";
|
|
|
|
import LayStepItem from "./module/stepItem/index";
|
2022-01-19 09:38:54 +08:00
|
|
|
import LaySubMenu from "./module/subMenu/index";
|
|
|
|
import LaySplitPanel from "./module/splitPanel/index";
|
|
|
|
import LaySplitPanelItem from "./module/splitPanelItem/index";
|
2021-09-27 06:09:33 +08:00
|
|
|
|
|
|
|
const components: Record<string, IDefineComponent> = {
|
2022-01-19 09:38:54 +08:00
|
|
|
LaySplitPanel,
|
|
|
|
LaySplitPanelItem,
|
2021-09-27 06:09:33 +08:00
|
|
|
LayRadio,
|
|
|
|
LayButton,
|
|
|
|
LayIcon,
|
2021-12-14 01:15:36 +08:00
|
|
|
LayBacktop,
|
2021-09-27 06:09:33 +08:00
|
|
|
LayLayout,
|
|
|
|
LaySide,
|
|
|
|
LayHeader,
|
|
|
|
LayBody,
|
|
|
|
LayFooter,
|
2021-09-27 06:59:01 +08:00
|
|
|
LayLogo,
|
2021-09-27 08:43:12 +08:00
|
|
|
LayPanel,
|
2021-09-27 09:24:54 +08:00
|
|
|
LayCard,
|
2021-09-27 13:35:53 +08:00
|
|
|
LayProgress,
|
2021-09-27 14:08:05 +08:00
|
|
|
LayButtonGroup,
|
2021-09-27 15:30:38 +08:00
|
|
|
LayButtonContainer,
|
|
|
|
LayRow,
|
|
|
|
LayCol,
|
2021-09-27 16:42:13 +08:00
|
|
|
LayInput,
|
2021-09-27 17:39:35 +08:00
|
|
|
LayBadge,
|
2021-09-27 22:01:22 +08:00
|
|
|
LayBlock,
|
2021-09-28 10:35:58 +08:00
|
|
|
LayLine,
|
|
|
|
LayTimeline,
|
2021-09-28 12:41:16 +08:00
|
|
|
LayTimelineItem,
|
2021-09-28 15:01:12 +08:00
|
|
|
LayTextarea,
|
2021-09-29 09:42:11 +08:00
|
|
|
LaySwitch,
|
|
|
|
LayCollapse,
|
2021-10-01 13:35:00 +08:00
|
|
|
LayCollapseItem,
|
2021-09-29 23:42:53 +08:00
|
|
|
LayContainer,
|
|
|
|
LayMenu,
|
|
|
|
LayMenuItem,
|
2021-09-30 01:44:02 +08:00
|
|
|
LayCheckbox,
|
2021-09-30 14:56:36 +08:00
|
|
|
LayForm,
|
|
|
|
LayBreadcrumb,
|
2021-10-01 20:22:49 +08:00
|
|
|
LayBreadcrumbItem,
|
2021-10-01 22:31:21 +08:00
|
|
|
LayAvatar,
|
2022-01-09 22:41:56 +08:00
|
|
|
LayAvatarList,
|
2021-10-02 00:05:59 +08:00
|
|
|
LayField,
|
2021-10-03 00:01:14 +08:00
|
|
|
LaySelect,
|
2021-10-03 00:52:06 +08:00
|
|
|
LayScroll,
|
2021-10-03 22:47:49 +08:00
|
|
|
LaySelectOption,
|
2021-10-04 07:44:31 +08:00
|
|
|
LayEmpty,
|
2021-10-04 08:06:19 +08:00
|
|
|
LayFormItem,
|
2021-10-05 18:44:07 +08:00
|
|
|
LayRate,
|
2021-10-05 19:04:06 +08:00
|
|
|
LayDropdown,
|
2021-10-07 03:24:53 +08:00
|
|
|
LayDropdownItem,
|
2021-10-05 19:04:06 +08:00
|
|
|
LayTab,
|
2021-10-07 18:32:23 +08:00
|
|
|
LayTabItem,
|
2021-10-09 14:59:38 +08:00
|
|
|
LayIconPicker,
|
2021-10-09 15:02:11 +08:00
|
|
|
LayTree,
|
2021-10-09 10:41:52 +08:00
|
|
|
LayTable,
|
2021-10-10 23:42:05 +08:00
|
|
|
LayPage,
|
2021-10-12 11:30:07 +08:00
|
|
|
LayTransfer,
|
2021-10-15 17:50:50 +08:00
|
|
|
LayCheckboxGroup,
|
2021-10-15 22:44:10 +08:00
|
|
|
LaySlider,
|
2021-10-15 23:52:01 +08:00
|
|
|
LayCarousel,
|
2021-10-21 14:45:21 +08:00
|
|
|
LayCarouselItem,
|
|
|
|
LayColorPicker,
|
2022-01-02 21:12:47 +08:00
|
|
|
LayLayer,
|
2021-12-12 17:39:02 +08:00
|
|
|
LayTooltip,
|
|
|
|
LayInputNumber,
|
2021-12-29 15:47:31 +08:00
|
|
|
LaySkeleton,
|
|
|
|
LaySkeletonItem,
|
2021-12-27 14:37:45 +08:00
|
|
|
LayCountUp,
|
2022-01-04 18:12:13 +08:00
|
|
|
LayStep,
|
|
|
|
LayStepItem,
|
2022-01-19 09:38:54 +08:00
|
|
|
LaySubMenu,
|
2021-12-25 00:09:30 +08:00
|
|
|
};
|
2021-09-27 06:09:33 +08:00
|
|
|
|
|
|
|
const install = (app: App, options?: InstallOptions): void => {
|
2021-12-23 00:16:42 +08:00
|
|
|
const _options = options;
|
|
|
|
app.config.globalProperties.$PROOPTIONS = _options;
|
2021-09-27 06:09:33 +08:00
|
|
|
for (const key in components) {
|
2021-12-23 00:16:42 +08:00
|
|
|
const item = components[key];
|
|
|
|
app.component(item.name || key, item);
|
2021-09-27 06:09:33 +08:00
|
|
|
}
|
2021-12-25 00:09:30 +08:00
|
|
|
};
|
2021-09-27 06:09:33 +08:00
|
|
|
|
|
|
|
export {
|
2022-01-19 09:38:54 +08:00
|
|
|
LaySplitPanel,
|
|
|
|
LaySplitPanelItem,
|
2021-09-27 06:09:33 +08:00
|
|
|
LayRadio,
|
|
|
|
LayButton,
|
2022-01-05 14:56:16 +08:00
|
|
|
LayIcon,
|
2021-12-14 01:15:36 +08:00
|
|
|
LayBacktop,
|
2021-09-27 06:09:33 +08:00
|
|
|
LayLayout,
|
|
|
|
LaySide,
|
|
|
|
LayHeader,
|
|
|
|
LayBody,
|
|
|
|
LayFooter,
|
|
|
|
LayLogo,
|
2021-10-09 14:59:38 +08:00
|
|
|
LayPanel,
|
2021-09-27 08:43:12 +08:00
|
|
|
LayCard,
|
2021-09-27 09:24:54 +08:00
|
|
|
LayProgress,
|
2021-09-27 13:35:53 +08:00
|
|
|
LayButtonGroup,
|
2021-09-27 14:08:05 +08:00
|
|
|
LayButtonContainer,
|
2021-09-27 15:30:38 +08:00
|
|
|
LayRow,
|
|
|
|
LayCol,
|
2021-09-27 16:42:13 +08:00
|
|
|
LayInput,
|
|
|
|
LayBadge,
|
2021-09-27 17:39:35 +08:00
|
|
|
LayBlock,
|
2021-09-27 22:01:22 +08:00
|
|
|
LayLine,
|
2021-09-28 10:35:58 +08:00
|
|
|
LayTimeline,
|
|
|
|
LayTimelineItem,
|
2021-09-28 12:41:16 +08:00
|
|
|
LayTextarea,
|
2021-09-28 15:01:12 +08:00
|
|
|
LaySwitch,
|
2021-09-29 09:42:11 +08:00
|
|
|
LayCollapse,
|
2021-10-01 13:35:00 +08:00
|
|
|
LayCollapseItem,
|
2021-09-29 09:42:11 +08:00
|
|
|
LayContainer,
|
2021-09-29 23:42:53 +08:00
|
|
|
LayMenu,
|
|
|
|
LayMenuItem,
|
2021-09-30 01:44:02 +08:00
|
|
|
LayCheckbox,
|
|
|
|
LayForm,
|
2021-09-30 14:56:36 +08:00
|
|
|
LayBreadcrumb,
|
|
|
|
LayBreadcrumbItem,
|
2021-10-01 20:22:49 +08:00
|
|
|
LayAvatar,
|
2022-01-09 22:41:56 +08:00
|
|
|
LayAvatarList,
|
2021-10-01 22:31:21 +08:00
|
|
|
LayField,
|
2021-10-02 00:05:59 +08:00
|
|
|
LaySelect,
|
2021-10-03 00:01:14 +08:00
|
|
|
LayScroll,
|
2021-10-03 00:52:06 +08:00
|
|
|
LaySelectOption,
|
2021-10-03 22:47:49 +08:00
|
|
|
LayEmpty,
|
2021-10-04 07:44:31 +08:00
|
|
|
LayFormItem,
|
2021-10-04 08:06:19 +08:00
|
|
|
LayRate,
|
2021-10-05 18:44:07 +08:00
|
|
|
LayDropdown,
|
2021-10-07 03:24:53 +08:00
|
|
|
LayDropdownItem,
|
2021-10-05 19:04:06 +08:00
|
|
|
LayTab,
|
|
|
|
LayTabItem,
|
2021-10-07 18:32:23 +08:00
|
|
|
LayIconPicker,
|
2021-10-09 14:59:38 +08:00
|
|
|
LayTree,
|
2021-10-09 10:41:52 +08:00
|
|
|
LayTable,
|
|
|
|
LayPage,
|
2021-10-10 23:42:05 +08:00
|
|
|
LayTransfer,
|
2021-10-12 14:27:33 +08:00
|
|
|
LayCheckboxGroup,
|
2021-10-15 17:50:50 +08:00
|
|
|
LaySlider,
|
2021-10-15 22:44:10 +08:00
|
|
|
LayCarousel,
|
2021-10-15 23:52:01 +08:00
|
|
|
LayCarouselItem,
|
2021-10-21 14:45:21 +08:00
|
|
|
LayColorPicker,
|
2022-01-05 14:56:16 +08:00
|
|
|
LayLayer,
|
|
|
|
LayTooltip,
|
|
|
|
LayInputNumber,
|
|
|
|
LaySkeleton,
|
|
|
|
LaySkeletonItem,
|
|
|
|
LayCountUp,
|
|
|
|
LayStep,
|
|
|
|
LayStepItem,
|
2022-01-19 09:38:54 +08:00
|
|
|
LaySubMenu,
|
2021-12-25 00:09:30 +08:00
|
|
|
};
|
2021-09-27 06:09:33 +08:00
|
|
|
|
2021-12-26 02:18:25 +08:00
|
|
|
export { layer };
|
2021-09-27 06:09:33 +08:00
|
|
|
|
2021-12-25 00:09:30 +08:00
|
|
|
export default { install };
|