Skip to content

Commit 1fd5778

Browse files
committed
fix(button): 适配rn导致的问题
animation && wx:style
1 parent 6cca967 commit 1fd5778

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

packages/mpx-cube-ui/__tests__/components/button/__snapshots__/button.spec.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ exports[`component button unit test props bolder check matchSnapshot 1`] = `"<wx
88
99
exports[`component button unit test props disabled check matchSnapshot 1`] = `"<wx-button style=\\"\\" class=\\"main--cube-btn main--cube-btn_disabled\\"><wx-view class=\\"main--cube-btn-content\\" style=\\"\\"></wx-view></wx-button>"`;
1010
11-
exports[`component button unit test props icon="like" check matchSnapshot 1`] = `"<wx-button style=\\"\\" class=\\"main--cube-btn\\"><cube-icon class=\\"main--cube-btn-icon\\"><wx-view class=\\"cube-icon--cubeic cube-icon--cubeic cube-icon--cubeic-like\\" style=\\"\\"></wx-view></cube-icon><wx-view class=\\"main--cube-btn-content\\" style=\\"\\"></wx-view></wx-button>"`;
11+
exports[`component button unit test props icon="like" check matchSnapshot 1`] = `"<wx-button style=\\"\\" class=\\"main--cube-btn\\"><cube-icon class=\\"main--cube-btn-icon\\" style=\\"\\"><wx-view class=\\"cube-icon--cubeic cube-icon--cubeic cube-icon--cubeic-like\\" style=\\"\\"></wx-view></cube-icon><wx-view class=\\"main--cube-btn-content\\" style=\\"\\"></wx-view></wx-button>"`;
1212
1313
exports[`component button unit test props inline check matchSnapshot 1`] = `"<wx-button style=\\"\\" class=\\"main--cube-btn main--cube-btn-inline\\"><wx-view class=\\"main--cube-btn-content\\" style=\\"\\"></wx-view></wx-button>"`;
1414
@@ -44,4 +44,4 @@ exports[`component button unit test props outline primary check matchSnapshot 1`
4444
4545
exports[`component button unit test props primary check matchSnapshot 1`] = `"<wx-button style=\\"\\" class=\\"main--cube-btn main--cube-btn-primary\\"><wx-view class=\\"main--cube-btn-content\\" style=\\"\\"></wx-view></wx-button>"`;
4646
47-
exports[`component button unit test props tip="辅助文案" check matchSnapshot 1`] = `"<wx-button style=\\"\\" class=\\"main--cube-btn main--cube-btn-with-tip\\"><wx-view class=\\"main--cube-btn-content\\" style=\\"\\"></wx-view><wx-view class=\\"main--cube-btn-tip\\"><wx-text class=\\"main--cube-btn-tip-text\\">辅助文案</wx-text></wx-view></wx-button>"`;
47+
exports[`component button unit test props tip="辅助文案" check matchSnapshot 1`] = `"<wx-button style=\\"\\" class=\\"main--cube-btn main--cube-btn-with-tip\\"><wx-view class=\\"main--cube-btn-content\\" style=\\"\\"></wx-view><wx-view class=\\"main--cube-btn-tip\\" style=\\"\\"><wx-text class=\\"main--cube-btn-tip-text\\">辅助文案</wx-text></wx-view></wx-button>"`;

packages/mpx-cube-ui/lib/components/button/loading/index.mpx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<view class="cube-loading-content">
44
<view @_ios|_android|_harmony class="cube-loading-origin-before" animation="{{ beforeAnim }}"></view>
55
<view class="cube-loading-origin">
6-
<view class="cube-loading-middle-dot" animation="{{ middleAnim }}"></view>
6+
<view class="cube-loading-middle-dot" animation@_ios|_android|_harmony="{{ middleAnim }}"></view>
77
</view>
88
<view @_ios|_android|_harmony class="cube-loading-origin-after" animation="{{ afterAnim }}"></view>
99
</view>

packages/mpx-cube-ui/src/components/button/index.mpx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
type="{{ icon }}"
3838
wx:style="{{ hiddenStyle }}"
3939
/>
40-
<view class="cube-btn-content" numberOfLines="{{ 1 }}" wx:class="{{ contentClass }}" wx:style="{{ styleConfig.content, hiddenStyle }}">
40+
<view class="cube-btn-content" numberOfLines="{{ 1 }}" wx:class="{{ contentClass }}" wx:style="{{ [styleConfig.content, hiddenStyle] }}">
4141
<slot />
4242
</view>
4343
<view class="cube-btn-tip" wx:class="{{ tipClass }}" wx:if="{{ tip }}" wx:style="{{ hiddenStyle }}">

packages/mpx-cube-ui/src/components/button/loading/index.mpx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<view class="cube-loading-content">
44
<view @_ios|_android|_harmony class="cube-loading-origin-before" animation="{{ beforeAnim }}"></view>
55
<view class="cube-loading-origin">
6-
<view class="cube-loading-middle-dot" animation="{{ middleAnim }}"></view>
6+
<view class="cube-loading-middle-dot" animation@_ios|_android|_harmony="{{ middleAnim }}"></view>
77
</view>
88
<view @_ios|_android|_harmony class="cube-loading-origin-after" animation="{{ afterAnim }}"></view>
99
</view>

packages/mpx-cube-ui/src/components/modal/index.mpx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<view @_ios|_android|_harmony class="cube-modal-line cube-modal-line-horizontal"></view>
3939
<!-- 竖线 -->
4040
<view @_ios|_android|_harmony class="cube-modal-line cube-modal-line-vertical"></view>
41-
<cube-icon type="close" theme-type="{{ themeType }}"></cube-icon>
41+
<cube-icon @_wx|_ali|_web type="close" theme-type="{{ themeType }}"></cube-icon>
4242
</view>
4343
</view>
4444

0 commit comments

Comments
 (0)