From 1c32f3a632a5a3d260d2b3cc044c7ec07ce14f09 Mon Sep 17 00:00:00 2001 From: ctw <> Date: Tue, 24 Dec 2024 17:03:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=A4=9A=E4=B8=AA=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E4=B8=8A=E4=BC=A0=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 2 +- .env.development | 2 +- src/components/Upload/Image.vue | 8 +- src/components/Upload/Images.vue | 296 +++++++++++++++++++++++++ src/components/index.ts | 65 +++--- src/views/canteen/canteenSpu/form.vue | 304 +++++++++++++------------- tsconfig.json | 2 +- 7 files changed, 484 insertions(+), 195 deletions(-) create mode 100644 src/components/Upload/Images.vue diff --git a/.env b/.env index 26338c2c..4bc9e6cb 100644 --- a/.env +++ b/.env @@ -14,7 +14,7 @@ VITE_PUBLIC_PATH = / VITE_API_URL = /api # ADMIN 服务地址 -VITE_ADMIN_PROXY_PATH = http://localhost:9999 +VITE_ADMIN_PROXY_PATH = http://123.156.230.15:8089/api/ # 前端加密密钥 VITE_PWD_ENC_KEY='pigxpigxpigxpigx' diff --git a/.env.development b/.env.development index 3d121f13..3466e927 100644 --- a/.env.development +++ b/.env.development @@ -8,7 +8,7 @@ VITE_OPEN = true ENV = 'development' # ADMIN 服务地址 -VITE_ADMIN_PROXY_PATH = http://localhost:9999 +VITE_ADMIN_PROXY_PATH = http://123.156.230.15:8089/api/ # 代码生成服务地址 VITE_GEN_PROXY_PATH = http://localhost:5003 \ No newline at end of file diff --git a/src/components/Upload/Image.vue b/src/components/Upload/Image.vue index 343941ef..080625b2 100644 --- a/src/components/Upload/Image.vue +++ b/src/components/Upload/Image.vue @@ -71,8 +71,8 @@ interface UploadFileProps { width?: string; // 组件宽度 ==> 非必传(默认为 150px) borderRadius?: string; // 组件边框圆角 ==> 非必传(默认为 8px) iconSize?: number; - dir?: string; // 文件目录 - listType:string; + dir?: string; // 文件目录 + listType: string; } // 接受父组件参数 @@ -86,8 +86,8 @@ const props = withDefaults(defineProps(), { height: '150px', width: '150px', borderRadius: '8px', - dir: '', - listType:'' + dir: '', + listType: '', }); // 生成组件唯一id diff --git a/src/components/Upload/Images.vue b/src/components/Upload/Images.vue new file mode 100644 index 00000000..52ad5dcf --- /dev/null +++ b/src/components/Upload/Images.vue @@ -0,0 +1,296 @@ + + + + + diff --git a/src/components/index.ts b/src/components/index.ts index 2350f9c5..67208b3d 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -4,6 +4,7 @@ import DictTag from '/@/components/DictTag/index.vue'; import UploadExcel from '/@/components/Upload/Excel.vue'; import UploadFile from '/@/components/Upload/index.vue'; import UploadImg from '/@/components/Upload/Image.vue'; +import UploadImgs from '/@/components/Upload/Images.vue'; import DelWrap from '/@/components/DelWrap/index.vue'; import Editor from '/@/components/Editor/index.vue'; import Tip from '/@/components/Tip/index.vue'; @@ -12,12 +13,12 @@ import SvgIcon from '/@/components/SvgIcon/index.vue'; // 第三方组件 import ElementPlus from 'element-plus'; -import * as ElementPlusIconsVue from '@element-plus/icons-vue' +import * as ElementPlusIconsVue from '@element-plus/icons-vue'; import 'element-plus/dist/index.css'; -import {Pane, Splitpanes} from 'splitpanes'; +import { Pane, Splitpanes } from 'splitpanes'; import 'splitpanes/dist/splitpanes.css'; // 日历组件 -import {setupCalendar} from 'v-calendar'; +import { setupCalendar } from 'v-calendar'; // @ts-ignore 引入VForm3库 import VForm3 from 'form-designer-plus'; // import 'form-designer-plus/dist/designer.style.css'; //引入VForm3样式 @@ -25,36 +26,36 @@ import 'form-designer-plus/dist/designer.style.css'; //引入VForm3样式 import vue3TreeOrg from 'vue3-tree-org'; import 'vue3-tree-org/lib/vue3-tree-org.css'; - // 导入声明 -import {App} from "vue"; +import { App } from 'vue'; export default { - install(app: App) { - app.component('DictTag', DictTag); - app.component('Pagination', Pagination); - app.component('RightToolbar', RightToolbar); - app.component('uploadExcel', UploadExcel); - app.component('UploadFile', UploadFile); - app.component('UploadImg', UploadImg); - app.component('Editor', Editor); - app.component('Tip', Tip); - app.component('DelWrap', DelWrap); - app.component('TagList', TagList); - app.component('SvgIcon', SvgIcon); + install(app: App) { + app.component('DictTag', DictTag); + app.component('Pagination', Pagination); + app.component('RightToolbar', RightToolbar); + app.component('uploadExcel', UploadExcel); + app.component('UploadFile', UploadFile); + app.component('UploadImg', UploadImg); + app.component('UploadImgs', UploadImgs); + app.component('Editor', Editor); + app.component('Tip', Tip); + app.component('DelWrap', DelWrap); + app.component('TagList', TagList); + app.component('SvgIcon', SvgIcon); - // 导入全部的elmenet-plus的图标 - for (const [key, component] of Object.entries(ElementPlusIconsVue)) { - app.component(key, component) - // 兼容性 - app.component(`ele-${key}`, component) - } - // 导入布局插件 - app.component('Splitpanes', Splitpanes); - app.component('Pane', Pane); - app.use(ElementPlus) // ELEMENT 组件 - app.use(setupCalendar, {}) // 日历组件 - app.use(VForm3) // 表单设计 - app.use(vue3TreeOrg) // 组织架构组件 - } -} + // 导入全部的elmenet-plus的图标 + for (const [key, component] of Object.entries(ElementPlusIconsVue)) { + app.component(key, component); + // 兼容性 + app.component(`ele-${key}`, component); + } + // 导入布局插件 + app.component('Splitpanes', Splitpanes); + app.component('Pane', Pane); + app.use(ElementPlus); // ELEMENT 组件 + app.use(setupCalendar, {}); // 日历组件 + app.use(VForm3); // 表单设计 + app.use(vue3TreeOrg); // 组织架构组件 + }, +}; diff --git a/src/views/canteen/canteenSpu/form.vue b/src/views/canteen/canteenSpu/form.vue index 12eae430..a4014174 100644 --- a/src/views/canteen/canteenSpu/form.vue +++ b/src/views/canteen/canteenSpu/form.vue @@ -1,184 +1,176 @@ diff --git a/tsconfig.json b/tsconfig.json index 704db556..589fb645 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -69,6 +69,6 @@ "skipLibCheck": true /* Skip type checking of declaration files. */, "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ }, - "include": ["src/**/*.ts", "src/**/*.vue", "src/**/*.tsx", "src/**/*.d.ts", "auto-imports.d.ts"], // **Represents any directory, and * represents any file. Indicates that all files in the src directory will be compiled + "include": ["src/**/*.ts", "src/**/*.vue", "src/**/*.tsx", "src/**/*.d.ts", "src/types/**/*.d.ts", "auto-imports.d.ts"], // **Represents any directory, and * represents any file. Indicates that all files in the src directory will be compiled "exclude": ["node_modules", "dist"] // Indicates the file directory that does not need to be compiled }