提交 | 用户 | age
|
d98d05
|
1 |
<wxs src="../wxs/utils.wxs" module="utils" /> |
53cc6f
|
2 |
<wxs src="./index.wxs" module="computed" /> |
d98d05
|
3 |
|
S |
4 |
<view |
|
5 |
wx:if="{{ show }}" |
|
6 |
class="custom-class {{ utils.bem('notice-bar', { withicon: mode, wrapable }) }}" |
53cc6f
|
7 |
style="{{ computed.rootStyle({ color, backgroundColor, background }) }}" |
d98d05
|
8 |
bind:tap="onClick" |
S |
9 |
> |
|
10 |
<van-icon |
|
11 |
wx:if="{{ leftIcon }}" |
|
12 |
size="16px" |
|
13 |
name="{{ leftIcon }}" |
|
14 |
class="van-notice-bar__left-icon" |
|
15 |
/> |
|
16 |
<slot wx:else name="left-icon" /> |
|
17 |
|
|
18 |
<view class="van-notice-bar__wrap"> |
|
19 |
<view class="van-notice-bar__content {{ !scrollable && !wrapable ? 'van-ellipsis' : '' }}" animation="{{ animationData }}"> |
|
20 |
{{ text }} |
|
21 |
</view> |
|
22 |
</view> |
|
23 |
|
|
24 |
<van-icon |
|
25 |
wx:if="{{ mode === 'closeable' }}" |
|
26 |
class="van-notice-bar__right-icon" |
|
27 |
name="cross" |
|
28 |
catch:tap="onClickIcon" |
|
29 |
/> |
|
30 |
<navigator |
|
31 |
wx:elif="{{ mode === 'link' }}" |
|
32 |
url="{{ url }}" |
|
33 |
open-type="{{ openType }}" |
|
34 |
> |
|
35 |
<van-icon class="van-notice-bar__right-icon" name="arrow" /> |
|
36 |
</navigator> |
|
37 |
<slot wx:else name="right-icon" /> |
|
38 |
</view> |