feat: add web application

This commit is contained in:
richjohnrambo
2026-10-10 20:55:59 +08:00
parent 3eb5d78875
commit 50fcfd2d3d
571 changed files with 73992 additions and 135 deletions
+7
View File
@@ -0,0 +1,7 @@
/**
* 全局注册自定义组件 待完善
* @param app
*/
export function setupCustomComponents() {
// app.component()
}
+24
View File
@@ -0,0 +1,24 @@
import { App } from 'vue';
import { permission } from '@/directives/permission';
import copy from '@/directives/copy';
import debounce from '@/directives/debounce';
import throttle from '@/directives/throttle';
import draggable from '@/directives/draggable';
/**
* 注册全局自定义指令
* @param app
*/
export function setupDirectives(app: App) {
// 权限控制指令(演示)
app.directive('permission', permission);
// 复制指令
app.directive('copy', copy);
// 防抖指令
app.directive('debounce', debounce);
// 节流指令
app.directive('throttle', throttle);
// 拖拽指令
app.directive('draggable', draggable);
}
+5
View File
@@ -0,0 +1,5 @@
/**
* 注册全局方法 待完善
* @param app
*/
export function setupGlobalMethods() {}
+4
View 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
View 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);
}