Skip to content

Commit

Permalink
chore: 格式化 axml (#843)
Browse files Browse the repository at this point in the history
* chore: 格式化 axml

* chore: 格式化 src 的 axml

---------

Co-authored-by: DiamondYuan <fandi.yfd@antgroup.com>
  • Loading branch information
DiamondYuan and DiamondYuan committed Sep 25, 2023
1 parent 91c2e44 commit f95b3df
Show file tree
Hide file tree
Showing 171 changed files with 3,908 additions and 2,613 deletions.
11 changes: 6 additions & 5 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
"files": "*.axml",
"options": {
"parser": "html",
"printWidth": 40,
"printWidth": 80,
"tabWidth": 2,
"useTabs":true,
"bracketSameLine":true,
"bracketSpacing":true
"bracketSameLine": true,
"bracketSpacing": true,
"singleAttributePerLine": true,
"htmlWhitespaceSensitivity": "ignore"
}
}
],
"singleQuote": true
}
}
33 changes: 24 additions & 9 deletions demo/pages/ActionSheet/index.axml
Original file line number Diff line number Diff line change
@@ -1,35 +1,50 @@
<container title="基础用法">
<button onTap="handleOpenBasic" inline="{{true}}" inlineSize="large" data-index="1">基础用法</button>
<button
onTap="handleOpenBasic"
inline="{{true}}"
inlineSize="large"
data-index="1">
基础用法
</button>
</container>
<container title="选项状态">
<button onTap="handleOpenBasic" inline="{{true}}" inlineSize="large" data-index="2">危险状态&禁用状态</button>
<button
onTap="handleOpenBasic"
inline="{{true}}"
inlineSize="large"
data-index="2">
危险状态&禁用状态
</button>
</container>
<container title="带注释及icon">
<button onTap="handleOpenBasic" inline="{{true}}" inlineSize="large" data-index="3">带注释及icon</button>
<button
onTap="handleOpenBasic"
inline="{{true}}"
inlineSize="large"
data-index="3">
带注释及icon
</button>
</container>
<action-sheet
title="请选择你要进行的操作"
visible="{{visible1}}"
actions="{{actions1}}"
data-index="1"
onAction="handleAction"
onClose="handleCloseBasic"
/>
onClose="handleCloseBasic" />

<action-sheet
title="请选择你要进行的操作"
visible="{{visible2}}"
actions="{{actions2}}"
data-index="2"
onAction="handleAction"
onClose="handleCloseBasic"
/>
onClose="handleCloseBasic" />

<action-sheet
title="请选择你要进行的操作"
visible="{{visible3}}"
actions="{{actions3}}"
data-index="3"
onAction="handleAction"
onClose="handleCloseBasic"
/>
onClose="handleCloseBasic" />
26 changes: 18 additions & 8 deletions demo/pages/Avatar/index.axml
Original file line number Diff line number Diff line change
@@ -1,30 +1,40 @@
<container title="基础用法-四种尺寸">
<avatar src="{{item}}" a:for="{{images}}" class="avatar" />
<avatar
src="{{item}}"
a:for="{{images}}"
class="avatar" />
</container>

<container title="占位头像">
<avatar size="{{item}}" />
</container>

<container title="不同大小">
<avatar size="{{item}}" src="{{images[0]}}" a:for="{{sizes}}" class="avatar" />
<avatar
size="{{item}}"
src="{{images[0]}}"
a:for="{{sizes}}"
class="avatar" />
</container>

<container title="配合列表使用" className="container">
<container
title="配合列表使用"
className="container">
<list-item
imageSize="large"
brief="Deserunt dolor ea eaque eos"
>
brief="Deserunt dolor ea eaque eos">
Novalee Spicer
<avatar
slot="image"
name="Novlee Spicer"
desc="Deserunt dolor ea eaque eos"
src="{{images[0]}}"
/>
src="{{images[0]}}" />
</list-item>
</container>

<container title="自定义">
<avatar size="{{item}}" src="{{images[0]}}" class="avatar-custom" />
<avatar
size="{{item}}"
src="{{images[0]}}"
class="avatar-custom" />
</container>
42 changes: 22 additions & 20 deletions demo/pages/Badge/index.axml
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,31 @@
<badge
type="dot"
position="top-right">
<view class="box"/>
<view class="box" />
</badge>
<badge
type="text"
text=""
position="top-right">
<view class="box"/>
<view class="box" />
</badge>
<badge
type="number"
text="{{2}}"
position="top-right">
<view class="box"/>
<view class="box" />
</badge>
<badge
type="number"
text="{{100}}"
position="top-right">
<view class="box"/>
<view class="box" />
</badge>
<badge
type="bubble"
text="new"
position="top-right">
<view class="box"/>
<view class="box" />
</badge>
</view>
</container>
Expand All @@ -38,35 +38,35 @@
type="dot"
stroke
position="top-right">
<view class="box"/>
<view class="box" />
</badge>
<badge
type="text"
text=""
stroke
position="top-right">
<view class="box"/>
<view class="box" />
</badge>
<badge
type="number"
text="{{1}}"
stroke
position="top-right">
<view class="box"/>
<view class="box" />
</badge>
<badge
type="number"
text="{{100}}"
stroke
position="top-right">
<view class="box"/>
<view class="box" />
</badge>
<badge
type="bubble"
text="new"
stroke
position="top-right">
<view class="box"/>
<view class="box" />
</badge>
</view>
</container>
Expand All @@ -77,34 +77,34 @@
type="number"
text="{{1}}"
position="top-left">
<view class="box"/>
<view class="box" />
</badge>
<badge
type="bubble"
text="1"
position="bottom-right">
<view class="box"/>
<view class="box" />
</badge>
<badge
type="number"
text="{{100}}"
stroke
bgColor="#1677FF">
<view class="box"/>
<view class="box" />
</badge>
<badge
type="text"
text="new"
bgColor="#FF9F18"
position="top-center">
<view class="box"/>
<view class="box" />
</badge>
<badge
type="bubble"
text="new"
stroke
bgColor="#34B368">
<view class="box"/>
<view class="box" />
</badge>
</view>
</container>
Expand All @@ -116,23 +116,23 @@
text="1"
offsetX="-20px"
offsetY="0px">
<view class="box"/>
<view class="box" />
</badge>
<badge
type="text"
text="1"
position="bottom-right"
offsetX="-20px"
offsetY="-14px">
<view class="box"/>
<view class="box" />
</badge>
<badge
type="bubble"
text="new"
position="top-right"
offsetX="2px"
offsetY="-8px">
<view class="box"/>
<view class="box" />
</badge>
</view>
</container>
Expand All @@ -143,8 +143,10 @@
type="text"
iconType="GlobalOutline"
position="top-right">
<am-icon type="GlobalOutline" slot="text"/>
<view class="box"/>
<am-icon
type="GlobalOutline"
slot="text" />
<view class="box" />
</badge>
</view>
</container>
Loading

0 comments on commit f95b3df

Please sign in to comment.