فهرست منبع

解决打包报错的问题

Lijy 1 سال پیش
والد
کامیت
dae53f1446

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 393 - 388
fhKeeper/formulahousekeeper/customerBuler-crm/package-lock.json


+ 2 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/package.json

@@ -19,7 +19,8 @@
     "pinia": "^2.1.7",
     "pinia-plugin-persistedstate": "^3.2.1",
     "vue": "^3.4.19",
-    "vue-router": "^4.3.0"
+    "vue-router": "^4.3.0",
+    "vuex": "^4.1.0"
   },
   "devDependencies": {
     "@types/node": "^20.11.24",

+ 1 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/components/ReEcharts/index.vue

@@ -62,5 +62,5 @@ watch(
 </script>
 
 <template>
-	<div ref="myChartsRef" :style="{ height: height, width: width }" :option="option" />
+	<div ref="myChartsRef" :style="{ height: height, width: width }" :option="option"></div>
 </template>

+ 3 - 3
fhKeeper/formulahousekeeper/customerBuler-crm/src/components/TaskModal/index.vue

@@ -222,9 +222,9 @@ function closeVisible() {
 }
 function submitForm(formEl: FormInstance | undefined, isClose: boolean) {
   if (!formEl) return
-  formEl.validate((valid) => {
+  formEl.validate((valid: boolean) => {
     if (!valid) {
-      return false
+      return false as any
     }
     const repeatDesignDay = customeDate.value.join(",")
     generateFormRef.value?.getData().then((res: any) => {
@@ -324,7 +324,7 @@ function changeRepeatType(value: REPEAT_VALUE_TYPE) {
   customeDate.value = [];
 }
 
-function changeEndType(value: string | number | boolean) {
+function changeEndType(value: string | number | boolean | undefined) {
   form.value = {
     ...form.value,
     endType: value, //重复类型

+ 0 - 5
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/customer/detail/index.vue

@@ -158,10 +158,5 @@ function handleScroll(event: any) { // 滚表横向滚动
     padding-top: 4px;
     padding-bottom: 4px;
   }
-
-  .selectClas >>> .el-select__wrapper {
-    background-color: none !important;
-    box-shadow: none !important;
-  }
 }
 </style>

+ 2 - 2
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/login.vue

@@ -68,9 +68,9 @@ const login = (formEl: FormInstance | undefined) => {
   if (!formEl) {
     return
   }
-  formEl.validate((valid) => {
+  formEl.validate((valid: boolean) => {
     if (!valid) {
-      return false;
+      return false as any;
     }
     loginLoading.value = true;
     //console.log(ruleForm.value);

+ 0 - 5
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/product/detail/index.vue

@@ -182,10 +182,5 @@ onMounted(() => {
     padding-top: 4px;
     padding-bottom: 4px;
   }
-
-  .selectClas>>>.el-select__wrapper {
-    background-color: none !important;
-    box-shadow: none !important;
-  }
 }
 </style>

+ 2 - 2
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/register.vue

@@ -138,9 +138,9 @@ const register = (formEl: FormInstance | undefined) => {
     return
   }
 
-  formEl.validate((valid) => {
+  formEl.validate((valid: boolean) => {
     if (!valid) {
-      return false;
+      return false as any;
     }
     registerLoading.value = true;
     let params = {

+ 3 - 2
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/test/echarts.vue

@@ -1,6 +1,6 @@
 <template>
   <div :style="{ width: '1230px', height: '350px' }">
-    <Echarts :option="option" />
+    <Echarts :option="{}"></Echarts>
   </div>
 </template>
 
@@ -141,4 +141,5 @@ const option = reactive<Partial<EChartsOption>>({
 });
 </script>
 
-<style lang="scss" scoped></style>
+<style lang="scss" scoped>
+</style>

+ 17 - 5
fhKeeper/formulahousekeeper/customerBuler-crm/vite.config.ts

@@ -3,8 +3,8 @@ import vue from "@vitejs/plugin-vue";
 
 import { resolve } from "path";
 
-// const target = "http://192.168.2.8:10010";
-const target = "http://192.168.2.178:10010";
+const target = "http://192.168.2.8:10080";
+// const target = "http://192.168.2.178:10010";
 // const target = "http://47.101.180.183:10010";
 
 export default defineConfig({
@@ -26,16 +26,28 @@ export default defineConfig({
     alias: {
       "@": resolve(__dirname, "./src"),
     },
-    //extensions: [".ts", ".js", ".vue", ".json", ".mjs"],
     extensions: [".mjs", ".js", ".ts", ".jsx", ".tsx", ".json", ".vue"],
   },
-  // css相关配置
   css: {
     preprocessorOptions: {
       scss: {
         additionalData: '@import "@/styles/global.scss";'
-
       },
     },
   },
+
+  build: {
+    rollupOptions: {
+      output: {
+        entryFileNames: `assets/[name].${new Date().getTime()}.js`,
+        chunkFileNames: `assets/[name].${new Date().getTime()}.js`,
+        assetFileNames: `assets/[name].${new Date().getTime()}.[ext]`,
+        compact: true,
+        manualChunks: {
+          vue: ['vue', 'vue-router', 'vuex'],
+          echarts: ['echarts']
+        },
+      },
+    }
+  }
 });