From 7059d55377c39fcd1d7808b3def06218b7947a99 Mon Sep 17 00:00:00 2001
From: ctw <>
Date: Wed, 8 Jan 2025 11:02:16 +0800
Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E5=88=86=E7=B1=BB=E4=B8=8B?=
=?UTF-8?q?=E6=8B=89=E9=80=89=E6=8B=A9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/Select/SelectCtcg.vue | 85 ++++++++++++++++++++
src/components/index.ts | 27 ++++---
src/views/canteen/canteenOnlineSpu/form.vue | 6 +-
src/views/canteen/canteenOnlineSpu/index.vue | 7 +-
4 files changed, 103 insertions(+), 22 deletions(-)
create mode 100644 src/components/Select/SelectCtcg.vue
diff --git a/src/components/Select/SelectCtcg.vue b/src/components/Select/SelectCtcg.vue
new file mode 100644
index 0000000..412d0d3
--- /dev/null
+++ b/src/components/Select/SelectCtcg.vue
@@ -0,0 +1,85 @@
+
+ e && getOptions()"
+ >
+
+
+
+
+
+
+
diff --git a/src/components/index.ts b/src/components/index.ts
index 536ddd5..d3f3a02 100644
--- a/src/components/index.ts
+++ b/src/components/index.ts
@@ -1,7 +1,7 @@
import Pagination from '/@/components/Pagination/index.vue';
import RightToolbar from '/@/components/RightToolbar/index.vue';
import DictTag from '/@/components/DictTag/index.vue';
-import DictSelect from "/@/components/DictSelect/index.vue"
+import DictSelect from '/@/components/DictSelect/index.vue';
import UploadExcel from '/@/components/Upload/Excel.vue';
import UploadFile from '/@/components/Upload/index.vue';
import UploadImg from '/@/components/Upload/Image.vue';
@@ -11,14 +11,14 @@ import Editor from '/@/components/Editor/index.vue';
import Tip from '/@/components/Tip/index.vue';
import TagList from '/@/components/TagList/index.vue';
import SvgIcon from '/@/components/SvgIcon/index.vue';
-import PreviewImage from "/@/components/PreviewImage/index.vue"
+import PreviewImage from '/@/components/PreviewImage/index.vue';
// 业务组件
-import SelectUser from '/@/components/Select/SelectUser.vue'
-import SelectWalletType from '/@/components/Select/SelectWalletType.vue'
-import SelectMch from '/@/components/Select/SelectMch.vue'
-import SelectDept from '/@/components/Select/SelectDept.vue'
-
+import SelectUser from '/@/components/Select/SelectUser.vue';
+import SelectWalletType from '/@/components/Select/SelectWalletType.vue';
+import SelectMch from '/@/components/Select/SelectMch.vue';
+import SelectDept from '/@/components/Select/SelectDept.vue';
+import SelectCtcg from '/@/components/Select/SelectCtcg.vue';
// 第三方组件
import ElementPlus from 'element-plus';
@@ -41,7 +41,7 @@ import { App } from 'vue';
export default {
install(app: App) {
app.component('DictTag', DictTag);
- app.component('DictSelect', DictSelect)
+ app.component('DictSelect', DictSelect);
app.component('Pagination', Pagination);
app.component('RightToolbar', RightToolbar);
app.component('uploadExcel', UploadExcel);
@@ -53,11 +53,12 @@ export default {
app.component('DelWrap', DelWrap);
app.component('TagList', TagList);
app.component('SvgIcon', SvgIcon);
- app.component('PreviewImage', PreviewImage)
- app.component('SelectUser', SelectUser)
- app.component('SelectWalletType', SelectWalletType)
- app.component('SelectMch', SelectMch)
- app.component('SelectDept', SelectDept)
+ app.component('PreviewImage', PreviewImage);
+ app.component('SelectUser', SelectUser);
+ app.component('SelectWalletType', SelectWalletType);
+ app.component('SelectMch', SelectMch);
+ app.component('SelectDept', SelectDept);
+ app.component('SelectCtcg', SelectCtcg);
// 导入全部的elmenet-plus的图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
diff --git a/src/views/canteen/canteenOnlineSpu/form.vue b/src/views/canteen/canteenOnlineSpu/form.vue
index 4a494f1..dfbc140 100644
--- a/src/views/canteen/canteenOnlineSpu/form.vue
+++ b/src/views/canteen/canteenOnlineSpu/form.vue
@@ -14,10 +14,7 @@
-
-
-
-
+
@@ -112,6 +109,7 @@ const form = reactive({
// 定义校验规则
const dataRules = ref({
merchantId: [{ required: true, message: '商户不能为空', trigger: 'blur' }],
+ categoryId: [{ required: true, message: '商品分类不能为空', trigger: 'blur' }],
name: [{ required: true, message: '商品名称不能为空', trigger: 'blur' }],
picUrl: [{ required: true, message: '商品封面图不能为空', trigger: 'blur' }],
price: [{ required: true, message: '商品价格', trigger: 'blur' }],
diff --git a/src/views/canteen/canteenOnlineSpu/index.vue b/src/views/canteen/canteenOnlineSpu/index.vue
index 572255a..6b22f13 100644
--- a/src/views/canteen/canteenOnlineSpu/index.vue
+++ b/src/views/canteen/canteenOnlineSpu/index.vue
@@ -6,11 +6,8 @@
-
-
-
-
-
+
+
查询