jsbox-cview 1.5.2 → 1.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,7 @@
1
1
  import { Base } from "./base";
2
2
 
3
3
  interface SymbolButtonProps {
4
+ enabled: boolean;
4
5
  symbol?: string;
5
6
  image?: UIImage;
6
7
  src?: string;
@@ -34,6 +35,7 @@ export class SymbolButton extends Base<UIButtonView, UiTypes.ButtonOptions> {
34
35
  }) {
35
36
  super();
36
37
  this._props = {
38
+ enabled: true,
37
39
  contentMode: 1,
38
40
  insets: $insets(12.5, 12.5, 12.5, 12.5),
39
41
  tintColor: $color("primaryText"),
@@ -47,10 +49,12 @@ export class SymbolButton extends Base<UIButtonView, UiTypes.ButtonOptions> {
47
49
  bgcolor: $color("clear"),
48
50
  id: this.id,
49
51
  menu: this._props.menu,
52
+ enabled: this._props.enabled
50
53
  } : {
51
54
  radius: 0,
52
55
  bgcolor: $color("clear"),
53
- id: this.id
56
+ id: this.id,
57
+ enabled: this._props.enabled
54
58
  }
55
59
  return {
56
60
  type: "button",
@@ -15,7 +15,7 @@ const base_1 = require("./base");
15
15
  class SymbolButton extends base_1.Base {
16
16
  constructor({ props, layout, events = {} }) {
17
17
  super();
18
- this._props = Object.assign({ contentMode: 1, insets: $insets(12.5, 12.5, 12.5, 12.5), tintColor: $color("primaryText") }, props);
18
+ this._props = Object.assign({ enabled: true, contentMode: 1, insets: $insets(12.5, 12.5, 12.5, 12.5), tintColor: $color("primaryText") }, props);
19
19
  this._layout = layout;
20
20
  this._defineView = () => {
21
21
  const props = this._props.menu
@@ -24,10 +24,12 @@ class SymbolButton extends base_1.Base {
24
24
  bgcolor: $color("clear"),
25
25
  id: this.id,
26
26
  menu: this._props.menu,
27
+ enabled: this._props.enabled
27
28
  } : {
28
29
  radius: 0,
29
30
  bgcolor: $color("clear"),
30
- id: this.id
31
+ id: this.id,
32
+ enabled: this._props.enabled
31
33
  };
32
34
  return {
33
35
  type: "button",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsbox-cview",
3
- "version": "1.5.2",
3
+ "version": "1.5.3",
4
4
  "description": "为 JSBox 设计的微型框架",
5
5
  "repository": {
6
6
  "type": "git",