-
-
-
+
-
-
-
-
- 合同段管理
+
+ {{ item.label }}
-
-
\ No newline at end of file
+
diff --git a/src/main.ts b/src/main.ts
index acccb13..84d4398 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -2,7 +2,12 @@ import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import { createPinia } from 'pinia'
+import { AllCommunityModule, ModuleRegistry } from 'ag-grid-community';
+import { TreeDataModule ,LicenseManager,CellSelectionModule,ContextMenuModule,ClipboardModule } from 'ag-grid-enterprise';
+LicenseManager.setLicenseKey("[v3][RELEASE][0102]_NDg2Njc4MzY3MDgzNw==16d78ca762fb5d2ff740aed081e2af7b");
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate' // 引入
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)
+ModuleRegistry.registerModules([AllCommunityModule,TreeDataModule,CellSelectionModule,ContextMenuModule ,ClipboardModule ]);
+
createApp(App).use(pinia).mount('#app')
diff --git a/tsconfig.app.json b/tsconfig.app.json
deleted file mode 100644
index 93fde25..0000000
--- a/tsconfig.app.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "extends": "@vue/tsconfig/tsconfig.dom.json",
- "compilerOptions": {
- "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
- "types": ["vite/client"],
-"baseUrl": ".",
- "paths": {
- "@/*": [
- "./src/*"
- ]
- },
- /* Linting */
- "strict": true,
- "noUnusedLocals": true,
- "noUnusedParameters": true,
- "erasableSyntaxOnly": true,
- "noFallthroughCasesInSwitch": true,
- "noUncheckedSideEffectImports": true
- },
- "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"]
-}
diff --git a/tsconfig.json b/tsconfig.json
index 69ec1ca..e93b5ec 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,19 +1,30 @@
+// tsconfig.json(主配置)
{
- "files": [],
- "references": [
- {
- "path": "./tsconfig.app.json"
- },
- {
- "path": "./tsconfig.node.json"
- }
- ],
"compilerOptions": {
+ "target": "ESNext",
+ "useDefineForClassFields": true,
+ "module": "ESNext",
+ "moduleResolution": "Node",
+ "strict": true,
+ "jsx": "preserve",
+ "sourceMap": true,
+ "resolveJsonModule": true,
+ "isolatedModules": true,
+ "esModuleInterop": true,
+ "lib": ["ESNext", "DOM"],
+ "skipLibCheck": true,
+ "noEmit": true, // Vue项目由Vite编译,TS仅做类型检查,无需输出文件
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
},
- "types": ["@types/node", "@types/bun"] // 新增 @types/bun
-
- }
-}
+ "types": ["@types/node", "@types/bun", "vite/client"] // 合并类型声明
+ },
+ "include": [
+ "src/**/*.ts",
+ "src/**/*.d.ts",
+ "src/**/*.tsx",
+ "src/**/*.vue"
+ ],
+ "exclude": ["node_modules"]
+}
\ No newline at end of file
diff --git a/tsconfig.node.json b/tsconfig.node.json
deleted file mode 100644
index 8a67f62..0000000
--- a/tsconfig.node.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "compilerOptions": {
- "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
- "target": "ES2023",
- "lib": ["ES2023"],
- "module": "ESNext",
- "types": ["node"],
- "skipLibCheck": true,
-
- /* Bundler mode */
- "moduleResolution": "bundler",
- "allowImportingTsExtensions": true,
- "verbatimModuleSyntax": true,
- "moduleDetection": "force",
- "noEmit": true,
-
- /* Linting */
- "strict": true,
- "noUnusedLocals": true,
- "noUnusedParameters": true,
- "erasableSyntaxOnly": true,
- "noFallthroughCasesInSwitch": true,
- "noUncheckedSideEffectImports": true
- },
- "include": ["vite.config.ts"]
-}
diff --git a/tsconfig.tsbuildinfo b/tsconfig.tsbuildinfo
new file mode 100644
index 0000000..0911cd7
--- /dev/null
+++ b/tsconfig.tsbuildinfo
@@ -0,0 +1 @@
+{"root":["./src/main.ts","./src/components/ui/button/index.ts","./src/components/ui/card/index.ts","./src/components/ui/scroll-area/index.ts","./src/lib/utils.ts","./src/pinia/tab.ts","./src/app.vue","./src/components/ui/button/button.vue","./src/components/ui/card/card.vue","./src/components/ui/card/cardaction.vue","./src/components/ui/card/cardcontent.vue","./src/components/ui/card/carddescription.vue","./src/components/ui/card/cardfooter.vue","./src/components/ui/card/cardheader.vue","./src/components/ui/card/cardtitle.vue","./src/components/ui/scroll-area/scrollarea.vue","./src/components/ui/scroll-area/scrollbar.vue","./src/components/views/ht.vue","./src/components/views/xm.vue","./src/components/views/xminfo.vue","./src/layout/tab.vue","./src/layout/typeline.vue"],"version":"5.9.3"}
\ No newline at end of file
diff --git a/vite.config.ts b/vite.config.ts
index 01de06d..b611ed0 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -3,11 +3,45 @@ import { defineConfig } from 'vite'
import tailwindcss from '@tailwindcss/vite'
import vue from '@vitejs/plugin-vue'
+
export default defineConfig({
- plugins: [vue(), tailwindcss()],
+ plugins: [vue(),tailwindcss()],
+ // 路径别名(和 tsconfig 保持一致)
resolve: {
alias: {
- '@': path.resolve(__dirname, './src'),
- },
+ '@': path.resolve(__dirname, 'src')
+ }
},
-})
+ // 核心:build 输出配置
+ build: {
+ // 1. 打包输出根目录(默认 dist),可自定义
+ outDir: 'dist',
+ // 2. 静态资源(js/css/img)输出子目录(默认 assets)
+ assetsDir: 'static',
+ // 3. 生成的静态资源文件名是否包含哈希(用于缓存控制)
+ assetsInlineLimit: 4096, // 小于4kb的资源内联,不生成文件
+ rollupOptions: {
+ // 4. 自定义入口/出口(进阶,一般无需修改)
+ output: {
+ // 自定义 chunk 文件名(拆分公共代码)
+ chunkFileNames: 'static/js/[name]-[hash].js',
+ // 自定义入口文件名
+ entryFileNames: 'static/js/[name]-[hash].js',
+ // 自定义 css 文件名
+ assetFileNames: 'static/[ext]/[name]-[hash].[ext]',
+ // 拆分第三方依赖(如 vue、axios 单独打包)
+ manualChunks(id) {
+ if (id.includes('node_modules')) {
+ return id.toString().split('node_modules/')[1].split('/')[0].toString();
+ }
+ }
+ }
+ },
+ // 5. 生产环境是否生成 sourcemap(默认 false,关闭可减小包体积)
+ sourcemap: false,
+ // 6. 清空输出目录(默认 true)
+ emptyOutDir: true
+ },
+ // 7. 部署的公共路径(关键!如部署到子路径 https://xxx.com/my-app/,需设为 '/my-app/')
+ base: './' // 相对路径(推荐),或绝对路径 '/'
+})
\ No newline at end of file