zhangyong
2024-02-23 9bd345bcd04bd59700cbf397e1a2aeeee8797f55
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<script setup>
import request from "@/utils/request";
import deepClone from "@/utils/deepClone";
import {ElMessage} from "element-plus";
import useProductGlassTypeStore from "@/stores/sd/product/productGlassType"
let productGlassTypeStore = useProductGlassTypeStore()
 
let options=$ref([])
request.get("/basicGlassType/getAll").then((res) => {
  if(res.code==200){
    for (let dataKey of res.data) {
      dataKey.children=JSON.parse(dataKey.children)
    }
    options= deepClone(res.data)
  }else{
    ElMessage.warning(res.msg)
  }
})
</script>
 
<template>
  <div>
    <el-cascader
        v-model="productGlassTypeStore.GlassType"
        :options="options"
        clearable
        placeholder="玻璃类别"
    />
  </div>
</template>
 
<style scoped>
 
</style>