@tuya-miniapp/smart-ui 2.7.2-beta-15 → 2.7.2-beta-17

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.
@@ -58,6 +58,8 @@ SmartComponent({
58
58
  data: {
59
59
  canvasId: '',
60
60
  dpr: 0,
61
+ width: 100,
62
+ height: 100,
61
63
  },
62
64
  watch: {
63
65
  dpr() {
@@ -68,6 +70,7 @@ SmartComponent({
68
70
  },
69
71
  created() {
70
72
  this.initId();
73
+ this.initSize();
71
74
  this.render = new Render(this);
72
75
  },
73
76
  mounted() {
@@ -90,6 +93,13 @@ SmartComponent({
90
93
  });
91
94
  idListRef.value.push(id);
92
95
  },
96
+ initSize() {
97
+ const sizeVal = this.parseSize();
98
+ this.setData({
99
+ width: +sizeVal,
100
+ height: +sizeVal,
101
+ });
102
+ },
93
103
  parseSize() {
94
104
  if (typeof this.data.size === 'number')
95
105
  return this.data.size;
@@ -112,10 +122,6 @@ SmartComponent({
112
122
  width: +sizeVal,
113
123
  height: +sizeVal,
114
124
  lineWidth: this.data.trackWidth,
115
- trackColor: this.data.trackColor,
116
- fillColor: this.data.fillColor,
117
- fillColorStops: this.data.fillColorStops,
118
- maskColor: this.data.maskColor,
119
125
  dpr: dpr,
120
126
  canvasId: this.data.canvasId,
121
127
  };
@@ -63,6 +63,8 @@ var idListRef = {
63
63
  data: {
64
64
  canvasId: '',
65
65
  dpr: 0,
66
+ width: 100,
67
+ height: 100,
66
68
  },
67
69
  watch: {
68
70
  dpr: function () {
@@ -73,6 +75,7 @@ var idListRef = {
73
75
  },
74
76
  created: function () {
75
77
  this.initId();
78
+ this.initSize();
76
79
  this.render = new index_rjs_1.default(this);
77
80
  },
78
81
  mounted: function () {
@@ -96,6 +99,13 @@ var idListRef = {
96
99
  });
97
100
  idListRef.value.push(id);
98
101
  },
102
+ initSize: function () {
103
+ var sizeVal = this.parseSize();
104
+ this.setData({
105
+ width: +sizeVal,
106
+ height: +sizeVal,
107
+ });
108
+ },
99
109
  parseSize: function () {
100
110
  if (typeof this.data.size === 'number')
101
111
  return this.data.size;
@@ -119,10 +129,6 @@ var idListRef = {
119
129
  width: +sizeVal,
120
130
  height: +sizeVal,
121
131
  lineWidth: _this.data.trackWidth,
122
- trackColor: _this.data.trackColor,
123
- fillColor: _this.data.fillColor,
124
- fillColorStops: _this.data.fillColorStops,
125
- maskColor: _this.data.maskColor,
126
132
  dpr: dpr,
127
133
  canvasId: _this.data.canvasId,
128
134
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-miniapp/smart-ui",
3
- "version": "2.7.2-beta-15",
3
+ "version": "2.7.2-beta-17",
4
4
  "author": "MiniApp Team",
5
5
  "license": "MIT",
6
6
  "miniprogram": "lib",
@@ -86,7 +86,7 @@
86
86
  "iOS >= 9"
87
87
  ],
88
88
  "dependencies": {
89
- "@ray-js/components-ty-slider": "^0.3.6",
89
+ "@ray-js/components-ty-slider": "^0.3.7",
90
90
  "@tuya-miniapp/icons": "^2.2.0"
91
91
  },
92
92
  "maintainers": [