Skip to content

Commit b1f5d4c

Browse files
committed
chore: release v1.4.2
1 parent 2bb7d69 commit b1f5d4c

File tree

6 files changed

+22
-10
lines changed

6 files changed

+22
-10
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mpx-cube-ui",
3-
"version": "1.4.1",
3+
"version": "1.4.2",
44
"private": true,
55
"description": "mpx components library",
66
"author": "xiaolei <[email protected]>",

packages/extract-theme-var/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mpxjs/extract-theme-var",
3-
"version": "1.4.1",
3+
"version": "1.4.2",
44
"description": "mpx-cube-ui theme variable extractor",
55
"publishConfig": {
66
"registry": "https://registry.npmjs.org",

packages/mpx-cube-ui/lib/components/switch/rn-mixin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ if (__mpx_mode__ === 'ios' || __mpx_mode__ === 'android' || __mpx_mode__ === 'ha
1515
'cube-switch-BGC': (animationOptions) => {
1616
const animation = this.bgAnimation || (this.bgAnimation = mpx.createAnimation({ ...animationOptions }));
1717
if (this.isOn) {
18-
const onBGC = this.switchOnGBC || '#FF6435';
18+
const onBGC = this.switchOnBGC || this.switchOnGBC || '#FF6435';
1919
animation.backgroundColor(onBGC).step({ duration: animationOptions.duration });
2020
}
2121
else {
22-
const defaultBGC = this.switchDefaultGBC || '#EAEAEA';
22+
const defaultBGC = this.switchDefaultBGC || this.switchDefaultGBC || '#EAEAEA';
2323
animation.backgroundColor(defaultBGC).step({ duration: animationOptions.duration });
2424
}
2525
this.switchAnimationData = animation.export();

packages/mpx-cube-ui/lib/components/switch/switch.js

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,22 @@ createComponent({
1111
type: Boolean,
1212
value: false
1313
},
14+
switchDefaultBGC: {
15+
type: String,
16+
value: ''
17+
},
18+
switchOnBGC: {
19+
type: String,
20+
value: ''
21+
},
22+
// @dosHide
23+
// props 命名错误,没人用就删掉
1424
switchDefaultGBC: {
1525
type: String,
1626
value: ''
1727
},
28+
// @dosHide
29+
// props 命名错误,没人用就删掉
1830
switchOnGBC: {
1931
type: String,
2032
value: ''
@@ -51,14 +63,14 @@ createComponent({
5163
if (__mpx_mode__ === 'ios' || __mpx_mode__ === 'android' || __mpx_mode__ === 'harmony') {
5264
return {};
5365
}
54-
if (this.isOn && this.switchOnGBC) {
66+
if (this.isOn && (this.switchOnBGC || this.switchOnGBC)) {
5567
return {
56-
backgroundColor: this.switchOnGBC
68+
backgroundColor: this.switchOnBGC || this.switchOnGBC
5769
};
5870
}
59-
else if (!this.isOn && this.switchDefaultGBC) {
71+
else if (!this.isOn && (this.switchDefaultBGC || this.switchDefaultGBC)) {
6072
return {
61-
backgroundColor: this.switchDefaultGBC
73+
backgroundColor: this.switchDefaultBGC || this.switchDefaultGBC
6274
};
6375
}
6476
else {

packages/mpx-cube-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mpxjs/mpx-cube-ui",
3-
"version": "1.4.1",
3+
"version": "1.4.2",
44
"description": "mpx components library",
55
"author": "xiaolei <[email protected]>",
66
"publishConfig": {

packages/website-build/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mpxjs/website-build",
3-
"version": "1.4.1",
3+
"version": "1.4.2",
44
"description": "mpx-cube-ui website builder",
55
"publishConfig": {
66
"registry": "https://registry.npmjs.org",

0 commit comments

Comments
 (0)