签入版本
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import { PageWrapper, PageFooter } from '@/components/Page';
|
||||
import NumberInput from '@/components/numberInput/index.vue';
|
||||
import PriceInput from '@/components/numberInput/index.vue';
|
||||
import pagination from '@/components/pagination/index.vue';
|
||||
import icon from '@/components/icon/index.vue';
|
||||
import { BasicTable } from '@/components/Table';
|
||||
import { BasicForm } from '@/components/Form/index';
|
||||
/**
|
||||
* 全局注册自定义组件 待完善
|
||||
* @param app
|
||||
*/
|
||||
export function setupCustomComponents(app) {
|
||||
app.component('PageWrapper', PageWrapper);
|
||||
app.component('PageFooter', PageFooter);
|
||||
app.component('NumberInput',NumberInput)
|
||||
app.component('PriceInput',PriceInput)
|
||||
app.component('pagination',pagination)
|
||||
app.component('icon',icon)
|
||||
app.component('BasicTable',BasicTable)
|
||||
app.component('BasicForm',BasicForm)
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import { App } from 'vue';
|
||||
|
||||
import { perm,perms } from '@/directives/permission';
|
||||
import { scrollBar } from '@/directives/scrollBar';
|
||||
|
||||
/**
|
||||
* 注册全局自定义指令
|
||||
* @param app
|
||||
*/
|
||||
export function setupDirectives(app: App) {
|
||||
app.directive('perm', perm); // 权限控制指令 (是否包含其中某个权限)
|
||||
app.directive('perms', perms); // 权限控制指令 (是否包含所有权限)
|
||||
app.directive('scrollBar', scrollBar); // 滚动条
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import type { App } from 'vue';
|
||||
import ElementPlus from 'element-plus';
|
||||
import zhCn from 'element-plus/es/locale/lang/zh-cn';
|
||||
|
||||
//全局按需加载示例 | 也可以使用官方推荐自动按需导入 在 build\vite\plugin\index.ts 中使用
|
||||
// import { ElButton, ElForm, ElFormItem, ElInput } from 'element-plus';
|
||||
|
||||
// const components = [ElButton, ElForm, ElFormItem, ElInput];
|
||||
|
||||
// export function registerApp(app: any) {
|
||||
// for (const component of components) {
|
||||
// app.component(component.name, component);
|
||||
// }
|
||||
// }
|
||||
|
||||
export function setupElement(app: App<Element>) {
|
||||
app.use(ElementPlus, {
|
||||
locale: zhCn,
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
/**
|
||||
* 注册全局方法 待完善
|
||||
* @param app
|
||||
*/
|
||||
export function setupGlobalMethods() {}
|
||||
@@ -0,0 +1,4 @@
|
||||
export { setupElement } from '@/plugins/element';
|
||||
export { setupDirectives } from '@/plugins/directives';
|
||||
export { setupCustomComponents } from '@/plugins/customComponents';
|
||||
export { setupGlobalMethods } from '@/plugins/globalMethods';
|
||||
Reference in New Issue
Block a user