🐛: 修复 withInstall

This commit is contained in:
sight 2022-05-15 03:17:00 +08:00
parent f972c94f55
commit 334699b210
82 changed files with 238 additions and 241 deletions

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { LayIcon as Component } from "@layui/icons-vue"; import { LayIcon as Component } from "@layui/icons-vue";
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,5 +1,5 @@
import { withInstall } from "../../utils"; import { withInstall, WithInstallType } from "../../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,11 +1,10 @@
import type { App, Component } from "vue"; import type { App, Plugin } from "vue";
import "./theme/index.less"; import "./theme/index.less";
import "@layui/layer-vue/lib/index.css"; import "@layui/layer-vue/lib/index.css";
import "@layui/icons-vue/lib/index.css"; import "@layui/icons-vue/lib/index.css";
import { layer } from "@layui/layer-vue"; import { layer } from "@layui/layer-vue";
import layerInstall from "@layui/layer-vue"; import layerInstall from "@layui/layer-vue";
import i18n from "./language";
import LayBacktop from "./component/backTop/index"; import LayBacktop from "./component/backTop/index";
import LayAvatar from "./component/avatar/index"; import LayAvatar from "./component/avatar/index";
@ -86,7 +85,7 @@ import LayNoticeBar from "./component/noticeBar/index";
import LayConfigProvider from "./provider"; import LayConfigProvider from "./provider";
import { InstallOptions } from "./types"; import { InstallOptions } from "./types";
const components: Record<string, Component> = { const components: Record<string, Plugin> = {
LaySplitPanel, LaySplitPanel,
LaySplitPanelItem, LaySplitPanelItem,
LayRadio, LayRadio,
@ -167,11 +166,9 @@ const components: Record<string, Component> = {
}; };
const install = (app: App, options?: InstallOptions): void => { const install = (app: App, options?: InstallOptions): void => {
for (const key in components) { for (const key of Object.keys(components)) {
const item = components[key]; app.use(components[key], options);
app.component(item.name || key, item);
} }
app.use(i18n);
app.use(layerInstall); app.use(layerInstall);
}; };

View File

@ -1,5 +1,5 @@
import { withInstall } from "../utils"; import { withInstall, WithInstallType } from "../utils";
import Component from "./index.vue"; import Component from "./index.vue";
const component = withInstall(Component); const component: WithInstallType<typeof Component> = withInstall(Component);
export default component; export default component;

View File

@ -1,3 +1,3 @@
export * from "./domUtil"; export * from "./domUtil";
export * from "./guidUtil"; export * from "./guidUtil";
export * from "./install"; export * from "./withInstall";

View File

@ -1,17 +0,0 @@
import type { App } from "vue";
import i18n from "../language";
export const withInstall = (comp: any) => {
comp.install = (app: App | any) => {
if (
!app._instance?.isCE &&
!app._instance?.appContext?.app?.__VUE_I18N_SYMBOL__
) {
app.use(i18n);
}
app.component(comp.name, comp);
};
return comp;
};

View File

@ -0,0 +1,17 @@
import type { App, Plugin } from "vue";
import i18n from "../language";
export type WithInstallType<T> = T & Plugin;
export const withInstall = <T>(comp: T): T & Plugin => {
const component = comp as any;
component.install = (app: App | any) => {
if (!app.__VUE_I18N_SYMBOL__) {
app.use(i18n);
}
app.component(component.name, comp);
};
return component as T & Plugin;
};

View File

@ -33,85 +33,85 @@ declare module '@vue/runtime-core' {
IconPicker: typeof import('./src/document/zh-CN/components/iconPicker.md')['default'] IconPicker: typeof import('./src/document/zh-CN/components/iconPicker.md')['default']
Input: typeof import('./src/document/zh-CN/components/input.md')['default'] Input: typeof import('./src/document/zh-CN/components/input.md')['default']
InputNumber: typeof import('./src/document/zh-CN/components/inputNumber.md')['default'] InputNumber: typeof import('./src/document/zh-CN/components/inputNumber.md')['default']
LayAvatar: typeof import('@layui/layui-vue')['LayAvatar'] LayAvatar: typeof import("@layui/layui-vue")["LayAvatar"];
LayAvatarList: typeof import('@layui/layui-vue')['LayAvatarList'] LayAvatarList: typeof import("@layui/layui-vue")["LayAvatarList"];
LayBacktop: typeof import('@layui/layui-vue')['LayBacktop'] LayBacktop: typeof import("@layui/layui-vue")["LayBacktop"];
LayBadge: typeof import('@layui/layui-vue')['LayBadge'] LayBadge: typeof import('@layui/layui-vue')['LayBadge']
LayBody: typeof import('@layui/layui-vue')['LayBody'] LayBody: typeof import('@layui/layui-vue')['LayBody']
LayBreadcrumb: typeof import('@layui/layui-vue')['LayBreadcrumb'] LayBreadcrumb: typeof import("@layui/layui-vue")["LayBreadcrumb"];
LayBreadcrumbItem: typeof import('@layui/layui-vue')['LayBreadcrumbItem'] LayBreadcrumbItem: typeof import("@layui/layui-vue")["LayBreadcrumbItem"];
LayButton: typeof import('@layui/layui-vue')['LayButton'] LayButton: typeof import('@layui/layui-vue')['LayButton']
LayButtonContainer: typeof import('@layui/layui-vue')['LayButtonContainer'] LayButtonContainer: typeof import("@layui/layui-vue")["LayButtonContainer"];
LayButtonGroup: typeof import('@layui/layui-vue')['LayButtonGroup'] LayButtonGroup: typeof import("@layui/layui-vue")["LayButtonGroup"];
LayCard: typeof import('@layui/layui-vue')['LayCard'] LayCard: typeof import("@layui/layui-vue")["LayCard"];
LayCarousel: typeof import('@layui/layui-vue')['LayCarousel'] LayCarousel: typeof import("@layui/layui-vue")["LayCarousel"];
LayCarouselItem: typeof import('@layui/layui-vue')['LayCarouselItem'] LayCarouselItem: typeof import("@layui/layui-vue")["LayCarouselItem"];
LayCheckbox: typeof import('@layui/layui-vue')['LayCheckbox'] LayCheckbox: typeof import("@layui/layui-vue")["LayCheckbox"];
LayCheckboxGroup: typeof import('@layui/layui-vue')['LayCheckboxGroup'] LayCheckboxGroup: typeof import("@layui/layui-vue")["LayCheckboxGroup"];
LayCol: typeof import('@layui/layui-vue')['LayCol'] LayCol: typeof import("@layui/layui-vue")["LayCol"];
LayCollapse: typeof import('@layui/layui-vue')['LayCollapse'] LayCollapse: typeof import("@layui/layui-vue")["LayCollapse"];
LayCollapseItem: typeof import('@layui/layui-vue')['LayCollapseItem'] LayCollapseItem: typeof import("@layui/layui-vue")["LayCollapseItem"];
LayColorPicker: typeof import('@layui/layui-vue')['LayColorPicker'] LayColorPicker: typeof import('@layui/layui-vue')['LayColorPicker']
LayConfigProvider: typeof import('@layui/layui-vue')['LayConfigProvider'] LayConfigProvider: typeof import('@layui/layui-vue')['LayConfigProvider']
LayContainer: typeof import('@layui/layui-vue')['LayContainer'] LayContainer: typeof import("@layui/layui-vue")["LayContainer"];
LayCountUp: typeof import('@layui/layui-vue')['LayCountUp'] LayCountUp: typeof import("@layui/layui-vue")["LayCountUp"];
LayDropdown: typeof import('@layui/layui-vue')['LayDropdown'] LayDropdown: typeof import('@layui/layui-vue')['LayDropdown']
LayDropdownMenu: typeof import('@layui/layui-vue')['LayDropdownMenu'] LayDropdownMenu: typeof import("@layui/layui-vue")["LayDropdownMenu"];
LayDropdownMenuItem: typeof import('@layui/layui-vue')['LayDropdownMenuItem'] LayDropdownMenuItem: typeof import("@layui/layui-vue")["LayDropdownMenuItem"];
LayEmpty: typeof import('@layui/layui-vue')['LayEmpty'] LayEmpty: typeof import("@layui/layui-vue")["LayEmpty"];
Layer: typeof import('./src/document/zh-CN/components/layer.md')['default'] Layer: typeof import('./src/document/zh-CN/components/layer.md')['default']
LayException: typeof import('@layui/layui-vue')['LayException'] LayException: typeof import("@layui/layui-vue")["LayException"];
LayField: typeof import('@layui/layui-vue')['LayField'] LayField: typeof import("@layui/layui-vue")["LayField"];
LayFooter: typeof import('@layui/layui-vue')['LayFooter'] LayFooter: typeof import("@layui/layui-vue")["LayFooter"];
LayForm: typeof import('@layui/layui-vue')['LayForm'] LayForm: typeof import('@layui/layui-vue')['LayForm']
LayFormItem: typeof import('@layui/layui-vue')['LayFormItem'] LayFormItem: typeof import("@layui/layui-vue")["LayFormItem"];
LayFullscreen: typeof import('@layui/layui-vue')['LayFullscreen'] LayFullscreen: typeof import("@layui/layui-vue")["LayFullscreen"];
LayHeader: typeof import('@layui/layui-vue')['LayHeader'] LayHeader: typeof import('@layui/layui-vue')['LayHeader']
LayIcon: typeof import('@layui/icons-vue')['LayIcon'] LayIcon: typeof import('@layui/icons-vue')['LayIcon']
LayIconPicker: typeof import('@layui/layui-vue')['LayIconPicker'] LayIconPicker: typeof import("@layui/layui-vue")["LayIconPicker"];
LayInput: typeof import('@layui/layui-vue')['LayInput'] LayInput: typeof import('@layui/layui-vue')['LayInput']
LayInputNumber: typeof import('@layui/layui-vue')['LayInputNumber'] LayInputNumber: typeof import("@layui/layui-vue")["LayInputNumber"];
LayLayer: typeof import('@layui/layer-vue')['LayLayer'] LayLayer: typeof import("@layui/layer-vue")["LayLayer"];
LayLayout: typeof import('@layui/layui-vue')['LayLayout'] LayLayout: typeof import('@layui/layui-vue')['LayLayout']
LayLine: typeof import('@layui/layui-vue')['LayLine'] LayLine: typeof import("@layui/layui-vue")["LayLine"];
LayLogo: typeof import('@layui/layui-vue')['LayLogo'] LayLogo: typeof import('@layui/layui-vue')['LayLogo']
LayMenu: typeof import('@layui/layui-vue')['LayMenu'] LayMenu: typeof import("@layui/layui-vue")["LayMenu"];
LayMenuItem: typeof import('@layui/layui-vue')['LayMenuItem'] LayMenuItem: typeof import("@layui/layui-vue")["LayMenuItem"];
LayNoticeBar: typeof import('@layui/layui-vue')['LayNoticeBar'] LayNoticeBar: typeof import("@layui/layui-vue")["LayNoticeBar"];
Layout: typeof import('./src/document/zh-CN/components/layout.md')['default'] Layout: typeof import('./src/document/zh-CN/components/layout.md')['default']
LayPage: typeof import('@layui/layui-vue')['LayPage'] LayPage: typeof import("@layui/layui-vue")["LayPage"];
LayPanel: typeof import('@layui/layui-vue')['LayPanel'] LayPanel: typeof import("@layui/layui-vue")["LayPanel"];
LayProgress: typeof import('@layui/layui-vue')['LayProgress'] LayProgress: typeof import("@layui/layui-vue")["LayProgress"];
LayQuote: typeof import('@layui/layui-vue')['LayQuote'] LayQuote: typeof import("@layui/layui-vue")["LayQuote"];
LayRadio: typeof import('@layui/layui-vue')['LayRadio'] LayRadio: typeof import("@layui/layui-vue")["LayRadio"];
LayRate: typeof import('@layui/layui-vue')['LayRate'] LayRate: typeof import("@layui/layui-vue")["LayRate"];
LayResult: typeof import('@layui/layui-vue')['LayResult'] LayResult: typeof import("@layui/layui-vue")["LayResult"];
LayRipple: typeof import('@layui/layui-vue')['LayRipple'] LayRipple: typeof import("@layui/layui-vue")["LayRipple"];
LayRow: typeof import('@layui/layui-vue')['LayRow'] LayRow: typeof import("@layui/layui-vue")["LayRow"];
LayScroll: typeof import('@layui/layui-vue')['LayScroll'] LayScroll: typeof import('@layui/layui-vue')['LayScroll']
LaySelect: typeof import('@layui/layui-vue')['LaySelect'] LaySelect: typeof import("@layui/layui-vue")["LaySelect"];
LaySelectOption: typeof import('@layui/layui-vue')['LaySelectOption'] LaySelectOption: typeof import("@layui/layui-vue")["LaySelectOption"];
LaySide: typeof import('@layui/layui-vue')['LaySide'] LaySide: typeof import('@layui/layui-vue')['LaySide']
LaySkeleton: typeof import('@layui/layui-vue')['LaySkeleton'] LaySkeleton: typeof import("@layui/layui-vue")["LaySkeleton"];
LaySkeletonItem: typeof import('@layui/layui-vue')['LaySkeletonItem'] LaySkeletonItem: typeof import("@layui/layui-vue")["LaySkeletonItem"];
LaySlider: typeof import('@layui/layui-vue')['LaySlider'] LaySlider: typeof import("@layui/layui-vue")["LaySlider"];
LaySplitPanel: typeof import('@layui/layui-vue')['LaySplitPanel'] LaySplitPanel: typeof import("@layui/layui-vue")["LaySplitPanel"];
LaySplitPanelItem: typeof import('@layui/layui-vue')['LaySplitPanelItem'] LaySplitPanelItem: typeof import("@layui/layui-vue")["LaySplitPanelItem"];
LayStep: typeof import('@layui/layui-vue')['LayStep'] LayStep: typeof import("@layui/layui-vue")["LayStep"];
LayStepItem: typeof import('@layui/layui-vue')['LayStepItem'] LayStepItem: typeof import("@layui/layui-vue")["LayStepItem"];
LaySubMenu: typeof import('@layui/layui-vue')['LaySubMenu'] LaySubMenu: typeof import("@layui/layui-vue")["LaySubMenu"];
LaySwitch: typeof import('@layui/layui-vue')['LaySwitch'] LaySwitch: typeof import('@layui/layui-vue')['LaySwitch']
LayTab: typeof import('@layui/layui-vue')['LayTab'] LayTab: typeof import("@layui/layui-vue")["LayTab"];
LayTabItem: typeof import('@layui/layui-vue')['LayTabItem'] LayTabItem: typeof import("@layui/layui-vue")["LayTabItem"];
LayTable: typeof import('@layui/layui-vue')['LayTable'] LayTable: typeof import("@layui/layui-vue")["LayTable"];
LayTextarea: typeof import('@layui/layui-vue')['LayTextarea'] LayTextarea: typeof import("@layui/layui-vue")["LayTextarea"];
LayTimeline: typeof import('@layui/layui-vue')['LayTimeline'] LayTimeline: typeof import("@layui/layui-vue")["LayTimeline"];
LayTimelineItem: typeof import('@layui/layui-vue')['LayTimelineItem'] LayTimelineItem: typeof import("@layui/layui-vue")["LayTimelineItem"];
LayTooltip: typeof import('@layui/layui-vue')['LayTooltip'] LayTooltip: typeof import("@layui/layui-vue")["LayTooltip"];
LayTransfer: typeof import('@layui/layui-vue')['LayTransfer'] LayTransfer: typeof import("@layui/layui-vue")["LayTransfer"];
LayTransition: typeof import('@layui/layui-vue')['LayTransition'] LayTransition: typeof import("@layui/layui-vue")["LayTransition"];
LayTree: typeof import('@layui/layui-vue')['LayTree'] LayTree: typeof import("@layui/layui-vue")["LayTree"];
LayUpload: typeof import('@layui/layui-vue')['LayUpload'] LayUpload: typeof import("@layui/layui-vue")["LayUpload"];
Line: typeof import('./src/document/zh-CN/components/line.md')['default'] Line: typeof import('./src/document/zh-CN/components/line.md')['default']
Load: typeof import('./src/document/zh-CN/components/load.md')['default'] Load: typeof import('./src/document/zh-CN/components/load.md')['default']
Menu: typeof import('./src/document/zh-CN/components/menu.md')['default'] Menu: typeof import('./src/document/zh-CN/components/menu.md')['default']