Forráskód Böngészése

新增 按钮 class名

huangbin 4 éve
szülő
commit
0d16c7fa2c

+ 1 - 1
src/common/components/buttonList/interface.ts

@@ -1,4 +1,4 @@
-export type BtnClassName = 'btnDeafault' | 'btnPrimary' | 'btnDanger'
+export type BtnClassName = 'btnDeafault' | 'btnPrimary' | 'btnDanger' | 'operBtn'
 export interface BtnList {
     lable: string;  // 按钮名字
     callback: Function;

+ 2 - 0
src/common/setup/contextMenu/index.ts

@@ -17,6 +17,8 @@ function getClassName(val: string): BtnClassName {
         result = 'btnDanger'
     } else if (val === '') {
         result = 'btnDeafault'
+    } else if (val.includes('add')) {
+        result = 'operBtn'
     } else {
         result = 'btnPrimary'
     }