zmc
2023-08-08 bab83405c39ae9ab8b6569ca29b1e9a6a3b04327
src/sfc/ExceptionType.vue
@@ -3,8 +3,8 @@
    将选中的多个异常以数组形式返回给父组件 
-->
<script>
// import axios from 'axios';
import axiosInstance from '../utils/request.js'
// import axiosInstance from 'axiosInstance';
import axiosInstanceInstance from '../utils/request.js'
export default {
  emits:['submitExceptionType'],
  data() {
@@ -18,7 +18,7 @@
  methods: {
    //获取不同的异常类型
    getShopName() {
      axiosInstance.get('/fume/exceptiontype').then(result => {
      axiosInstanceInstance.get('/fume/exceptiontype').then(result => {
        this.exceptionType = result.data.data
      
      });
@@ -38,6 +38,7 @@
  
  <div class="container">
  <span class="text">异常类型:</span>
  <div class="exception-type">
  <el-checkbox-group v-model="checkedList" :change="$emit('submitExceptionType',checkedList)">
    <el-checkbox :label="item.exceptionType"  v-for="(item,index) in exceptionType" :key="index">
        <template #default>
@@ -48,17 +49,23 @@
    </el-checkbox>
  </el-checkbox-group>
</div>
</div>
</template>
<style scoped>
/* 不能对  */
.container {
    display: flex;
    flex-wrap: wrap;
    /* flex-wrap: wrap; */
}
.text {
    margin-top: 5px;
    margin-right: 10px;
    margin-left: 20px;
    font-weight: bolder;
    white-space: nowrap;
}
.exception-type {
  white-space: nowrap;
}
</style>