فهرست منبع

perf: 显示icon

xingyu4j 2 سال پیش
والد
کامیت
cd4b9e9771

+ 4 - 0
yudao-ui-admin-vue3/src/views/system/menu/index.vue

@@ -14,6 +14,10 @@
         <XButton title="展开所有" @click="xGrid?.setAllTreeExpand(true)" />
         <XButton title="关闭所有" @click="xGrid?.clearTreeExpand()" />
       </template>
+      <template #name_default="{ row }">
+        <Icon :icon="row.icon" />
+        <span class="ml-3">{{ row.name }}</span>
+      </template>
       <template #actionbtns_default="{ row }">
         <!-- 操作:修改 -->
         <XTextButton

+ 4 - 1
yudao-ui-admin-vue3/src/views/system/menu/menu.data.ts

@@ -31,7 +31,10 @@ const crudSchemas = reactive<VxeCrudSchema>({
       table: {
         treeNode: true,
         align: 'left',
-        width: '200px'
+        width: '200px',
+        slots: {
+          default: 'name_default'
+        }
       }
     },
     {