Browse Source

Merge remote-tracking branch 'origin/master'

luoyifan 3 years ago
parent
commit
bd7e3c123d
2 changed files with 24 additions and 9 deletions
  1. 20 1
      src/PropertyDescriptionTable.ts
  2. 4 8
      src/controls/button.js

+ 20 - 1
src/PropertyDescriptionTable.ts

@@ -49,6 +49,25 @@ export const fieldLabel: PropertyValue = {
     type: 'string',
     expr: true,
 };
+
+export const text: PropertyValue = {
+    name: 'text',
+    default: '',
+    group: 'common',
+    desc: '文本描述',
+    type: 'string',
+    expr: true,
+};
+
+export const iconCls: PropertyValue = {
+    name: 'iconCls',
+    default: '',
+    group: 'common',
+    desc: '图标',
+    type: 'string',
+    expr: true,
+};
+
 export const borderless: PropertyValue = {
     name: 'borderless',
     default: '',
@@ -304,7 +323,7 @@ export const YvBase: PropertyDescriptionInterface = {
         },
         {
             name: 'hidden',
-            default: true,
+            default: false,
             group: 'common',
             desc: '是否显示',
             type: 'boolean'

+ 4 - 8
src/controls/button.js

@@ -4,11 +4,10 @@ import {baseConfig} from "./base";
 import {button} from "../Defaults";
 import {
     disabled,
-    fieldLabel,
-    gravity, height, metaId,
+    text,
+    iconCls,
+    width, height,
     PropertyDescriptionTable,
-    tooltip,
-    value, width,
     YvBase
 } from "../PropertyDescriptionTable";
 import {PropertyDescription} from "../PropertyDescription";
@@ -28,10 +27,7 @@ export default function () {
     PropertyDescriptionTable.set(
         'button',
         new PropertyDescription(YvBase, {
-            props: [
-                fieldLabel, value, disabled,
-                gravity, tooltip, metaId, width, height
-            ],
+            props: [ text, disabled, height, width, iconCls],
         })
     )
 }