瀏覽代碼

feat:组件图标

ananzhusen 1 年之前
父節點
當前提交
9fdfa7f315
共有 3 個文件被更改,包括 22 次插入8 次删除
  1. 2 2
      index.html
  2. 14 4
      src/views/components/Graphics.vue
  3. 6 2
      src/views/components/View.vue

+ 2 - 2
index.html

@@ -24,10 +24,10 @@
       }
     </style> 
     <link
-      href="//at.alicdn.com/t/c/font_4042197_h5hgbmc7d75.css"
+      href="//at.alicdn.com/t/c/font_4042197_useutdj9jks.css"
       rel="stylesheet"
     />
-    <script src="//at.alicdn.com/t/c/font_4042197_h5hgbmc7d75.js"></script>
+    <script src="//at.alicdn.com/t/c/font_4042197_useutdj9jks.js"></script>
     <script>document.domain ='le5le.com'</script>
   </head>
   <body>

+ 14 - 4
src/views/components/Graphics.vue

@@ -17,8 +17,14 @@
           :class="group.name === activedGroup ? 'active' : ''"
           @click="groupChange(group.name)"
         >
-          <t-icon :name="group.icon" />
-          {{ group.name }}
+          <template v-if="group.type === 'iconfont'">
+            <i class="l-icon" :class="group.icon"> </i>
+            {{ group.name }}
+          </template>
+          <template v-else>
+            <t-icon :name="group.icon" />
+            {{ group.name }}
+          </template>
         </div>
       </div>
       <div class="list" :class="groupType ? 'two-columns' : ''">
@@ -357,9 +363,10 @@ const userGroups = [
     key: '',
   },
   {
-    icon: 'app',
+    icon: 'l-zujian',
     name: '组件',
     key: 'chart',
+    type: 'iconfont',
   },
   {
     icon: 'image',
@@ -1926,7 +1933,10 @@ onUnmounted(() => {
           font-size: 20px;
           margin-bottom: 8px;
         }
-
+        .l-icon {
+          font-size: 24px;
+          margin-bottom: 8px;
+        }
         &:hover {
           color: var(--color-primary);
         }

+ 6 - 2
src/views/components/View.vue

@@ -41,10 +41,11 @@
       <t-tooltip content="保存为我的组件" placement="bottom">
         <a :class="{ gray: route.query.id && !route.query.c }">
           <t-badge dot :showZero="false" :count="route.query.c && dot ? 1 : 0">
-            <t-icon
+            <!-- <t-icon
               name="app"
               @click="save(SaveType.Save, 'le5leV-components', true)"
-            />
+            /> -->
+            <i class="l-icon l-zujian hover"> </i>
           </t-badge>
         </a>
       </t-tooltip>
@@ -1792,6 +1793,9 @@ const onSuccessChargeCloud = () => {
     .t-icon {
       font-size: 16px;
     }
+    .l-icon {
+      font-size: 18px;
+    }
   }
 
   #meta2d {