mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-15 21:53:48 +08:00
v2.0
This commit is contained in:
7
web/src/plugins/customComponents.ts
Normal file
7
web/src/plugins/customComponents.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* 全局注册自定义组件 待完善
|
||||
* @param app
|
||||
*/
|
||||
export function setupCustomComponents() {
|
||||
// app.component()
|
||||
}
|
||||
12
web/src/plugins/directives.ts
Normal file
12
web/src/plugins/directives.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { App } from 'vue';
|
||||
|
||||
import { permission } from '@/directives/permission';
|
||||
|
||||
/**
|
||||
* 注册全局自定义指令
|
||||
* @param app
|
||||
*/
|
||||
export function setupDirectives(app: App) {
|
||||
// 权限控制指令(演示)
|
||||
app.directive('permission', permission);
|
||||
}
|
||||
5
web/src/plugins/globalMethods.ts
Normal file
5
web/src/plugins/globalMethods.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
/**
|
||||
* 注册全局方法 待完善
|
||||
* @param app
|
||||
*/
|
||||
export function setupGlobalMethods() {}
|
||||
4
web/src/plugins/index.ts
Normal file
4
web/src/plugins/index.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export { setupNaive } from '@/plugins/naive';
|
||||
export { setupDirectives } from '@/plugins/directives';
|
||||
export { setupCustomComponents } from '@/plugins/customComponents';
|
||||
export { setupGlobalMethods } from '@/plugins/globalMethods';
|
||||
143
web/src/plugins/naive.ts
Normal file
143
web/src/plugins/naive.ts
Normal file
@@ -0,0 +1,143 @@
|
||||
import type { App } from 'vue';
|
||||
import {
|
||||
create,
|
||||
NConfigProvider,
|
||||
NMessageProvider,
|
||||
NDialogProvider,
|
||||
NInput,
|
||||
NButton,
|
||||
NForm,
|
||||
NFormItem,
|
||||
NCheckboxGroup,
|
||||
NCheckbox,
|
||||
NIcon,
|
||||
NLayout,
|
||||
NLayoutHeader,
|
||||
NLayoutContent,
|
||||
NLayoutFooter,
|
||||
NLayoutSider,
|
||||
NMenu,
|
||||
NBreadcrumb,
|
||||
NBreadcrumbItem,
|
||||
NDropdown,
|
||||
NSpace,
|
||||
NTooltip,
|
||||
NAvatar,
|
||||
NTabs,
|
||||
NTabPane,
|
||||
NCard,
|
||||
NRow,
|
||||
NCol,
|
||||
NDrawer,
|
||||
NDrawerContent,
|
||||
NDivider,
|
||||
NSwitch,
|
||||
NBadge,
|
||||
NAlert,
|
||||
NElement,
|
||||
NTag,
|
||||
NNotificationProvider,
|
||||
NProgress,
|
||||
NDatePicker,
|
||||
NGrid,
|
||||
NGridItem,
|
||||
NList,
|
||||
NListItem,
|
||||
NThing,
|
||||
NDataTable,
|
||||
NPopover,
|
||||
NPagination,
|
||||
NSelect,
|
||||
NRadioGroup,
|
||||
NRadio,
|
||||
NSteps,
|
||||
NStep,
|
||||
NInputGroup,
|
||||
NResult,
|
||||
NDescriptions,
|
||||
NDescriptionsItem,
|
||||
NTable,
|
||||
NInputNumber,
|
||||
NLoadingBarProvider,
|
||||
NModal,
|
||||
NUpload,
|
||||
NTree,
|
||||
NSpin,
|
||||
NTimePicker,
|
||||
NBackTop,
|
||||
NSkeleton,
|
||||
} from 'naive-ui';
|
||||
|
||||
const naive = create({
|
||||
components: [
|
||||
NMessageProvider,
|
||||
NDialogProvider,
|
||||
NConfigProvider,
|
||||
NInput,
|
||||
NButton,
|
||||
NForm,
|
||||
NFormItem,
|
||||
NCheckboxGroup,
|
||||
NCheckbox,
|
||||
NIcon,
|
||||
NLayout,
|
||||
NLayoutHeader,
|
||||
NLayoutContent,
|
||||
NLayoutFooter,
|
||||
NLayoutSider,
|
||||
NMenu,
|
||||
NBreadcrumb,
|
||||
NBreadcrumbItem,
|
||||
NDropdown,
|
||||
NSpace,
|
||||
NTooltip,
|
||||
NAvatar,
|
||||
NTabs,
|
||||
NTabPane,
|
||||
NCard,
|
||||
NRow,
|
||||
NCol,
|
||||
NDrawer,
|
||||
NDrawerContent,
|
||||
NDivider,
|
||||
NSwitch,
|
||||
NBadge,
|
||||
NAlert,
|
||||
NElement,
|
||||
NTag,
|
||||
NNotificationProvider,
|
||||
NProgress,
|
||||
NDatePicker,
|
||||
NGrid,
|
||||
NGridItem,
|
||||
NList,
|
||||
NListItem,
|
||||
NThing,
|
||||
NDataTable,
|
||||
NPopover,
|
||||
NPagination,
|
||||
NSelect,
|
||||
NRadioGroup,
|
||||
NRadio,
|
||||
NSteps,
|
||||
NStep,
|
||||
NInputGroup,
|
||||
NResult,
|
||||
NDescriptions,
|
||||
NDescriptionsItem,
|
||||
NTable,
|
||||
NInputNumber,
|
||||
NLoadingBarProvider,
|
||||
NModal,
|
||||
NUpload,
|
||||
NTree,
|
||||
NSpin,
|
||||
NTimePicker,
|
||||
NBackTop,
|
||||
NSkeleton,
|
||||
],
|
||||
});
|
||||
|
||||
export function setupNaive(app: App<Element>) {
|
||||
app.use(naive);
|
||||
}
|
||||
Reference in New Issue
Block a user