Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: 格式化 axml #843

Merged
merged 2 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading