-
Notifications
You must be signed in to change notification settings - Fork 144
/
Copy pathindex.axml
53 lines (50 loc) · 1.91 KB
/
index.axml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<import-sjs name="util" from="./index.sjs" />
<!-- #if ALIPAY -->
<view
class="ant-typography-container {{disabled ? 'ant-typography-disabled' : ''}} {{className}}"
hover-class="{{onTap || catchTap ? `ant-typography-hover {{activeClassName}}` : ''}}"
hover-start-time="{{20}}"
hover-stay-time="{{40}}"
style="{{style}}"
onTap="{{ onTap || onDisabledTap ? 'onTap' : '' }}"
catchTap="{{ catchTap ? 'catchTap' : '' }}"
>
<!-- #endif -->
<!-- #if WECHAT -->
<view
class="ant-typography-container {{disabled ? 'ant-typography-disabled' : ''}} {{className}}"
hover-class="ant-typography-hover {{activeClassName}}"
hover-start-time="{{20}}"
hover-stay-time="{{40}}"
style="{{style}}"
catchTap="onTap"
>
<!-- #endif -->
<!-- 左侧图标 -->
<view class="ant-typography-icon-container {{iconPosition}}" a:if="{{iconPosition === 'left'}}">
<ant-icon
a:if="{{!util.isUrl(icon)}}"
type="{{icon}}"
className="ant-typography-icon"
/>
<image a:else class="ant-typography-icon-image" style="{{fontSize ? `width: ${fontSize};height: ${fontSize};` : ''}}" src="{{icon}}"/>
</view>
<!-- 文案 -->
<text
selectable="{{selectable}}"
number-of-lines="{{ellipsisRow}}"
class="ant-typography-text {{lineThrough ? 'lineThrough' : ''}} {{underline ? 'underline' : ''}} {{util.isiOS(phonemodel) ? `ant-typography-text-${fontWeight || 'normal'}` : ''}}"
style="{{!util.isiOS(phonemodel) ? `font-weight: ${util.getFontWeight(fontWeight, phonemodel)};` : ''}}"
>
<slot>{{text}}</slot>
</text>
<!-- 右侧图标 -->
<view class="ant-typography-icon-container {{iconPosition}}" a:if="{{iconPosition === 'right'}}">
<ant-icon
a:if="{{!util.isUrl(icon)}}"
type="{{icon}}"
className="ant-typography-icon"
/>
<image a:else class="ant-typography-icon-image" style="{{fontSize ? `width: ${fontSize};height: ${fontSize};` : ''}}" src="{{icon}}"/>
</view>
</view>