浏览代码

首页常用功能图标动态引入显示

祁鹏飞 6 天之前
父节点
当前提交
ef34e02d1c
共有 2 个文件被更改,包括 5 次插入11 次删除
  1. 1 3
      src/components/ruleConditionContainer/index.vue
  2. 4 8
      src/views/index.vue

+ 1 - 3
src/components/ruleConditionContainer/index.vue

@@ -217,9 +217,7 @@ const handleCheckAll = (item, index: number, val: boolean) => {
   } else {
     item.minArray = item.minArray.filter(v => !arr.find(a => a.code === v))
   }
-  nextTick(() => {
-    el.blur()
-  })
+  nextTick(() => el.blur())
 }
 onMounted(() => {
   console.log('规则数据', props.rulesAttrList)

+ 4 - 8
src/views/index.vue

@@ -13,14 +13,6 @@ import { useRouter } from 'vue-router'
 
 import up from '@/assets/images/home/up.png'
 import down from '@/assets/images/home/down.png'
-import cxcd from '@/assets/images/home/cxcd.png'
-import bldd from '@/assets/images/home/bldd.png'
-import ddcx from '@/assets/images/home/ddcx.png'
-import xygl from '@/assets/images/home/xygl.png'
-import fygl from '@/assets/images/home/fygl.png'
-import bxgs from '@/assets/images/home/bxgs.png'
-import bxgszh from '@/assets/images/home/bxgszh.png'
-import ywygl from '@/assets/images/home/ywygl.png'
 
 import chinaMap from '@/assets/json/china.json'
 
@@ -715,6 +707,10 @@ const initCommonFunctions = () => {
   api.homeApi.commonFunctions().then((res: any) => {
     if (res.code == 200) {
       functionsList.value = res.data
+      functionsList.value.forEach(item => {
+        const ican = new URL(`${item.ican}`, import.meta.url).href
+        item.ican = ican
+      })
     } else {
       functionsList.value = []
     }