Kaynağa Gözat

feat: 新增汽车

dulonghui 3 ay önce
ebeveyn
işleme
1f7109532a
2 değiştirilmiş dosya ile 19 ekleme ve 2 silme
  1. 5 2
      src/components/StyleSetting.vue
  2. 14 0
      src/utils/formEnum.js

+ 5 - 2
src/components/StyleSetting.vue

@@ -235,6 +235,7 @@ import {
   vacuumCleaner, // 吸尘器
   rechargeableToothbrush, //电动牙刷
   laptopComputer, // 笔记本电脑
+  carTypeList, //汽车
 } from '@/utils/formEnum'
 import {postCreatTask} from '@/network/api/user'
 
@@ -251,10 +252,10 @@ const rainGroup = ref([
   {label: '4096:4096', value: 2},
   {label: '1636:1536', value: 3},
 ])
-let categoryList = ref()
+let categoryList = ref(carTypeList)
 let categoryListOther = ref(typeList)
 let formData = ref({
-  product: 'jewelry',
+  product: 'car',
   description: '',
   category: [],
   scene: '',
@@ -279,6 +280,8 @@ function setData(type) {
   categoryList.value = []
   if (type === 'jewelry') { // 珠宝
     // categoryList.value = typeList
+  } else if(type === 'car') {
+    categoryList.value = carTypeList
   } else if (type === 'electricRiceCooker') { // 电饭煲
     categoryList.value = electricRiceCooker
   } else if (type === 'refrigerator') { // 冰箱

+ 14 - 0
src/utils/formEnum.js

@@ -265,6 +265,7 @@ export const imageSizeList = [
   {value: 1, label: '512*512'},
 ]
 export const typeGroup = [
+  { label: '汽车', value: 'car' },
   { label: '珠宝', value: 'jewelry' },
   { label: '电饭煲', value: 'electricCooker' },
   { label: '冰箱', value: 'refrigerator' },
@@ -300,4 +301,17 @@ export const laptopComputer = [
   {value: 'Gaming laptop', label: '游戏本'},
   {value: 'Tablet', label: '平板'},
 ]
+// 汽车
+export const carTypeList = [
+  {value: 'Sedan', label: '轿车'},
+  {value: 'Sports Car', label: '跑车'},
+  {value: 'City SUV', label: '城市越野'},
+  {value: 'Hardcore SUV', label: '硬派越野'},
+  {value: 'Minivan', label: '商务车'},
+  {value: 'Bus', label: '客车'},
+  {value: 'Van', label: '面包车'},
+  {value: 'Pickup Truck', label: '皮卡车'},
+  {value: 'Convertible', label: '敞篷车'},
+  {value: 'Race Car', label: '赛车'}
+]