瀏覽代碼

工作台调整

徐滕 1 周之前
父節點
當前提交
a531322c1d
共有 2 個文件被更改,包括 683 次插入 和 333 次删除
  1. 37 0
      forge-admin-ui/src/components/flow/FlowTaskCardList.vue
  2. 646 333
      forge-admin-ui/src/views/home/index.vue

+ 37 - 0
forge-admin-ui/src/components/flow/FlowTaskCardList.vue

@@ -10,6 +10,7 @@
         />
         <div class="task-list-title">
           {{ title }}
+          <span v-if="badgeCount > 0" class="task-list-badge">{{ badgeCount }}</span>
         </div>
         <span v-if="selectedKeys.length > 0" class="task-list-selected">
           已选 {{ selectedKeys.length }} 条
@@ -40,6 +41,7 @@
             <RefreshOutline />
           </n-icon>
         </n-button>
+        <slot name="toolbar-actions" />
       </div>
     </div>
 
@@ -105,6 +107,7 @@ import { computed } from 'vue'
 
 const props = defineProps({
   title: { type: String, default: '列表' },
+  badgeCount: { type: Number, default: 0 },
   items: { type: Array, default: () => [] },
   loading: { type: Boolean, default: false },
   pagination: { type: Object, default: null },
@@ -224,6 +227,40 @@ function clearSelection() {
   white-space: nowrap;
 }
 
+.task-list-badge {
+  display: inline-flex;
+  align-items: center;
+  justify-content: center;
+  min-width: 18px;
+  height: 18px;
+  margin-left: 6px;
+  padding: 0 5px;
+  border-radius: 9px;
+  background: #e03e3e;
+  color: #fff;
+  font-size: 12px;
+  font-weight: 600;
+  line-height: 1;
+  vertical-align: middle;
+}
+
+.task-list-badge {
+  display: inline-flex;
+  align-items: center;
+  justify-content: center;
+  min-width: 18px;
+  height: 18px;
+  margin-left: 6px;
+  padding: 0 5px;
+  border-radius: 9px;
+  background: #e03e3e;
+  color: #fff;
+  font-size: 12px;
+  font-weight: 600;
+  line-height: 1;
+  vertical-align: middle;
+}
+
 .task-list-selected {
   color: var(--primary-color);
   font-size: 13px;

文件差異過大導致無法顯示
+ 646 - 333
forge-admin-ui/src/views/home/index.vue