Skip to content

Commit

Permalink
Fix/20230715 wrong label (#2195)
Browse files Browse the repository at this point in the history
* fix(slider, message): 修复message nowrap classPrefix 失效 & slider 组件标签大括号异常

message nowrap 属性中的 classPrefix 被当做字符串处理,导致无法正常使用。slider 组件中多出来了一对闭合大括号,导致无法正常匹配

* fix(message 组件): marquee 还原

变量还原

* fix(message): 多余中括号移除

多余中括号移除

---------

Co-authored-by: gao.ghf <[email protected]>
  • Loading branch information
hwaphon and gao.ghf authored Jul 17, 2023
1 parent 271e822 commit 9181dbc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions src/message/message.wxml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<wxs src="./message.wxs" module="this"></wxs>
<wxs src="../common/utils.wxs" module="_" />

<import src="../common/template/icon.wxml" />

<block wx:if="{{visible}}">
<view
class="{{classPrefix}} class {{prefix}}-class {{classPrefix}}--{{theme}}"
Expand All @@ -15,9 +13,8 @@
<slot name="icon" />
<template wx:if="{{_icon}}" is="icon" data="{{tClass: prefix + '-class-icon', ariaHidden: true, ..._icon }}" />
</view>

<view
class="{{classPrefix}}__text-wrap {{marquee ? '{{classPrefix}}__text-nowrap' : ''}}"
class="{{classPrefix}}__text-wrap {{marquee ? classPrefix + '__text-nowrap' : ''}}"
style="text-align: {{align}}"
id="{{classPrefix}}__text-wrap"
>
Expand All @@ -43,7 +40,6 @@
bind:complete="handleLinkClick"
/>
<slot name="link" />

<view class="{{classPrefix}}__icon--right" bind:tap="handleClose">
<slot name="close-btn" />
<template
Expand Down
2 changes: 1 addition & 1 deletion src/slider/slider.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
style="left:{{item.left}}px; transform: translateX(-50%);"
aria-hidden="{{true}}"
>
<view wx:if="{{scaleTextArray.length}}" class="{{_.cls(classPrefix + '__scale-desc', [theme])}}}}">
<view wx:if="{{scaleTextArray.length}}" class="{{_.cls(classPrefix + '__scale-desc', [theme])}}">
{{scaleTextArray[index]}}
</view>
</view>
Expand Down

0 comments on commit 9181dbc

Please sign in to comment.