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 @@
-
-
-
-
-
+
+
查询