diff --git a/.stylelintrc b/.stylelintrc index b04f6ee2e0..3fbeb5629e 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -27,7 +27,8 @@ "no-descending-specificity": null, "selector-type-no-unknown": null, "color-function-notation": "legacy", - "value-keyword-case": null + "value-keyword-case": null, + "property-no-unknown": [true, { "checkPrefixed": true }] }, "overrides": [ { "files": ["**/*.less"], "customSyntax": "postcss-less" }, diff --git a/docs/miniprogram/_design/ActionSheet.md b/docs/miniprogram/_design/ActionSheet.md index e97342cf09..c92df4642e 100644 --- a/docs/miniprogram/_design/ActionSheet.md +++ b/docs/miniprogram/_design/ActionSheet.md @@ -15,8 +15,6 @@ -
- ### 常见用法 ##### 当用户完成一个事件可以通过若干种方式达成,可以用动态面板来承载这若干种方式的操作。 @@ -24,6 +22,8 @@ +
+ ##### 当页面中有一组操作因低频/空间不足不希望外露时,但却必要存在,可以用动作面板来承载,通过“更多”按钮触发
@@ -31,7 +31,6 @@
-
### 推荐/慎用示例 @@ -49,6 +48,8 @@ +
+ ##### 动作面板中的操作项不建议用icon完成替代文字。
@@ -56,8 +57,6 @@
- -
@@ -66,10 +65,11 @@ - ### 相似组件 | 组件名 | 何时使用 | | :----- | :----------------------------------- | | [抽屉](./drawer) | 需要收折展示一组数量较多的菜单时使用。 | | [对话框](./dialog) | 需要用户做一些决定,或这提供完成某个任务是需要的一些额外信息时使用。 | +| [下拉菜单](./dropdown-menu) | 当内容较多时,需要通过筛选快速定位某一类内容时使用。 | +| [选择器](./dropdown-menu) | 当需要在有限的空间展示大量选项供用户选择,或者一组选项由递进层级构成需要用户逐级选择时使用。 | diff --git a/docs/miniprogram/_design/Badge.md b/docs/miniprogram/_design/Badge.md new file mode 100644 index 0000000000..019cf6285e --- /dev/null +++ b/docs/miniprogram/_design/Badge.md @@ -0,0 +1,70 @@ +# 徽标 Badge + +## 组件设计指南 + +### 何时使用 + +当需要展示特定对象的状态变化或承载运营性质提示时使用。 + +### 组件搭配使用 + +##### 徽标与[选项卡](./tabs)、[底部标签栏](./tab-bar)组合使用,置于文字段的右上方,用于展示状态信息或营销信息。 + +
+
+ +
+ +
+ +
+
+ +
+ +##### 徽标与[头像](./avatar)组合使用,可作为消息提示或数量提示。 + +
+
+ +
+
+ + +### 常见用法 + +##### 当用户只需要关注是否有消息,而无需关注消息数量时,可使用红点型徽标;当提示的信息需要精确显示数量时,应使用带数字的徽标。 + +
+
+ +
+ +
+ +
+
+ + +### 推荐/慎用示例 + +##### 建议根据场景和信息类型定义最长字数,不宜出现过长的情况。 + +
+
+ + +
+ +
+ + +
+
+ + +### 相似组件 + +| 组件名 | 何时使用 | +| :------------ | :------------------------------------------------------------------------------------------------------------------- | +| [标签](./tag) | 当需要展示内容本身的属性、状态、类别、营销情况时作为纯展示使用;或者当大量的内容数据需要根据类型进行选择筛选时使用。 | diff --git a/docs/miniprogram/_design/Button.md b/docs/miniprogram/_design/Button.md index 4a6e7a275f..e12730d4aa 100644 --- a/docs/miniprogram/_design/Button.md +++ b/docs/miniprogram/_design/Button.md @@ -32,6 +32,7 @@
+
@@ -40,8 +41,6 @@
-
- ### 常见用法 ##### 当在填写场景,按钮通常作为当前流程的结束操作,在表单过长时通常需要吸顶或吸底处理。 @@ -56,7 +55,6 @@
-
### 推荐/慎用示例 @@ -76,11 +74,10 @@ - ### 相似组件 | 组件名 | 何时使用 | | :----- | :----------------------------------- | | [链接](./link) | 当需要外链跳转或页面底部footer链接跳转时使用。 | | [悬浮按钮](./fab) | 当某个操作为全局操作,且为用户高频/业务强推的操作时可使用。 | -| [返回顶部](./backtop) | 当页面内容过长,用户有快速返回到页面顶部的诉求时使用。 | +| [返回顶部](./back-top) | 当页面内容过长,用户有快速返回到页面顶部的诉求时使用。 | diff --git a/docs/miniprogram/_design/Calendar.md b/docs/miniprogram/_design/Calendar.md new file mode 100644 index 0000000000..6d174c5451 --- /dev/null +++ b/docs/miniprogram/_design/Calendar.md @@ -0,0 +1,53 @@ +# 日历 Calendar + +## 组件设计指南 + +### 何时使用 + +需要在页面间跳转、返回,或需承载少量辅助功能时使用。 + +### 组件搭配使用 + +##### 通常和[单元格](./cell)搭配使用,点击后唤起日历。 + +
+ +
+ +### 推荐/慎用 + +##### 日期与描述结合时,通常与价格结合,不建议描述过长、或承载过复杂的信息。 + +
+
+ + +
+ +
+ + +
+
+ +
+ +##### 区间选择尽量使用在较短时间的场景中,当涉及的时间通常在数月、数年的长度时,建议使用其它方式让用户输入。 + +
+
+ + +
+ +
+ + +
+
+ +### 相似组件 + +| 组件名 | 何时使用 | +| :------------------------------- | :------------------------------------- | +| [时间选择器](./date-time-picker) | 在表单中需要输入单个日期或时间时使用。 | diff --git a/docs/miniprogram/_design/Cell.md b/docs/miniprogram/_design/Cell.md new file mode 100644 index 0000000000..9d07a5ec62 --- /dev/null +++ b/docs/miniprogram/_design/Cell.md @@ -0,0 +1,57 @@ +# 单元格 Cell + +## 组件设计指南 + +### 常见用法 + +##### 常用作内容详情入口或功能入口的平铺陈列。 + +
+
+ +
+ +
+ +
+
+ +
+ +##### 常用作同类型同格式信息项平铺陈列。 + +
+
+ +
+
+ +### 推荐/慎用示例 + +##### 作为入口时,不建议承载过多过复杂的内容。 + +
+
+ + +
+
+ +
+ +##### 作为入口时,不建议在一个单元格内承载其他操作。 + +
+
+ + +
+
+ + + +### 相似组件 + +| 组件名 | 何时使用 | +| :----- | :----------------------------------- | +| [宫格](./grid) | 当需要展示多个功能或信息入口,且这些入口没有明显的优先级时使用。| diff --git a/docs/miniprogram/_design/Checkbox.md b/docs/miniprogram/_design/Checkbox.md index 2eaecd586b..efa45d60a0 100644 --- a/docs/miniprogram/_design/Checkbox.md +++ b/docs/miniprogram/_design/Checkbox.md @@ -8,7 +8,7 @@ ### 组件搭配使用 -##### 多选框与[索引](./indexes)、[搜索](./search)组合使用,便于用户从大量的选项中,快速地找到目标选项。 +##### 多选框与[索引](./indexes)、[搜索框](./search)组合使用,便于用户从大量的选项中,快速地找到目标选项。
@@ -16,11 +16,10 @@
- +
-
- + ### 推荐/慎用示例 @@ -36,7 +35,6 @@ -
##### 在选项较多的场景下执行多选时,建议展示用户已选数量。 @@ -48,8 +46,6 @@ -
- ### 相似组件 diff --git a/docs/miniprogram/_design/Collapse.md b/docs/miniprogram/_design/Collapse.md new file mode 100644 index 0000000000..3f41991f7c --- /dev/null +++ b/docs/miniprogram/_design/Collapse.md @@ -0,0 +1,65 @@ +# 折叠面板 Collapse + +## 组件设计指南 + +### 何时使用 + +当信息较多,需要进行收纳时使用。 + +### 常见用法 + +##### 经常用于信息种类较多的页面,将相对次要的信息收纳起来,让用户能够关注到页面中的主要信息或流程。 + +
+ +
+ +
+ +##### 在展示多条内容较长的同类型信息时,通常从中抽取出关键信息作为标题,收纳在手风琴式折叠面板中,便于用户检索和查看。 + +
+
+ +
+
+ +
+ +##### 在网站中,经常使用折叠面板作为分类导航,将页面进行归类、收纳在折叠面板中,展开后可点击跳转。 + +
+ +
+ + + +### 推荐/慎用示例 + +##### 当信息层级较多时,不建议嵌套折叠面板,层级过多时建议审视信息结构或使用其它交互方式展示。 + +
+
+ + +
+
+ +
+ +##### 不建议使用右箭头作为折叠面板的展开图标,用户可能会误把它认作跳转二级页面的入口。 + +
+
+ + +
+
+ + + +### 相似组件 + +| 组件名 | 何时使用 | +| :----- | :----------------------------------- | +| [下拉菜单](./dropdown-menu) |当内容较多时,需要通过筛选快速定位某一类内容时使用。| diff --git a/docs/miniprogram/_design/CountDown.md b/docs/miniprogram/_design/CountDown.md new file mode 100644 index 0000000000..fa50e0b56a --- /dev/null +++ b/docs/miniprogram/_design/CountDown.md @@ -0,0 +1,52 @@ +# 倒计时 CountDown + +## 组件设计指南 + +### 何时使用 + +当需要向用户提示剩余时间时使用。 + +### 常见用法 + +##### 在营销场景下,通过倒计时向用户展示运营活动开始倒计时或距活动结束的剩余时间,从而体现稀缺性吸引目标受众的注意力,勾起足够兴趣以此激励用户参与。 + +
+
+ +
+
+ +
+ +##### 在一些工作流场景下,提示用户还剩余多少时间来完成某项任务或处理某些事项,强化时间概念。 + +
+
+ +
+
+ + +### 推荐/慎用示例 + +##### 不建议在同一个页面滥用倒计时,若需要反复使用,建议用较为轻量的样式. + +
+
+ + +
+ +
+ + +
+
+ + +### 相似组件 + +| 组件名 | 何时使用 | +| :-------------- | :------------------------------------------------------------------------------------------------------------------- | +| [标签](./tag) | 当需要展示内容本身的属性、状态、类别、营销情况时作为纯展示使用;或者当大量的内容数据需要根据类型进行选择筛选时使用。 | +| [徽标](./badge) | 当需要展示特定对象的状态变化或承载运营性质提示时使用。 | diff --git a/docs/miniprogram/_design/DateTimePicker.md b/docs/miniprogram/_design/DateTimePicker.md new file mode 100644 index 0000000000..173b7e5df0 --- /dev/null +++ b/docs/miniprogram/_design/DateTimePicker.md @@ -0,0 +1,44 @@ +# 时间选择器 DateTimePicker + +## 组件设计指南 + +### 何时使用 + +在表单中需要输入单个日期或时间时使用。 + +### 组件搭配使用 + +##### 通常和[单元格](./Cell)搭配使用,点击后唤起时间选择器。 + +
+ +
+ +### 常见用法 + +##### 当需要输入时间区间时,通常使用两个时间选择器分别选择起、止时间。 + +
+ +
+ +
+ +
+ +### 推荐/慎用示例 + +##### 选择时间后,建议使用标准化格式在表单中书写日期和时间。 + +
+
+ + +
+
+ + +### 何时使用 +| 组件名 | 何时使用 | +| :----------------- | :------------------------------------------------- | +| [日历](./Calendar) | 在表单中需要精确输入单个、多个、或区间日期时使用。 | diff --git a/docs/miniprogram/_design/Dialog.md b/docs/miniprogram/_design/Dialog.md index 27d9224698..98ae7ed66f 100644 --- a/docs/miniprogram/_design/Dialog.md +++ b/docs/miniprogram/_design/Dialog.md @@ -17,13 +17,11 @@
- +
-
- ### 常见用法 @@ -35,6 +33,8 @@ +
+ ##### 用于较为重要的信息提示,且需要用户决定。
@@ -48,7 +48,6 @@
-
### 推荐/慎用示例 @@ -67,3 +66,9 @@ +### 何时使用 +| 组件名 | 何时使用 | +| :----- | :----------------------------------- | +| [轻提示](./toast) |当需要对用户进行轻量反馈或提示,且不需要用户进行操作时使用,轻提示会在一段时间后自动消失。| +| [消息通知](./message) |当需要对用户进行较轻量的反馈或提示,可以自动消失或通过点击关闭,通常由用户触发。| + diff --git a/docs/miniprogram/_design/Divider.md b/docs/miniprogram/_design/Divider.md index 4e0df6d027..7c918325f6 100644 --- a/docs/miniprogram/_design/Divider.md +++ b/docs/miniprogram/_design/Divider.md @@ -17,6 +17,7 @@ +
##### 内嵌分割线:一般会在左侧或者右侧预留缺口,目的来区分统一模块下的相关内容,目的是为了让用户浏览大量相关内容时,更加高效。 @@ -26,7 +27,8 @@ - +
+ ##### 组合分割线:通栏分割线与内嵌分割线组合布局。
@@ -34,8 +36,6 @@
- -
### 推荐/慎用示例 diff --git a/docs/miniprogram/_design/Drawer.md b/docs/miniprogram/_design/Drawer.md index 7297e8b840..02db126364 100644 --- a/docs/miniprogram/_design/Drawer.md +++ b/docs/miniprogram/_design/Drawer.md @@ -4,35 +4,32 @@ ### 何时使用 -需要收折展示一组数量较多的菜单时使用。 +需要收折展示一组数量较多的菜单时使用 ### 组件搭配使用 ##### 抽屉与[按钮](./button)组合使用,通过按钮点击唤起抽屉。 -
+
-
- -
+
### 常见用法 ##### 在网站场景,通常用来收折展示整个网站的菜单导航。 -
+
-
+

##### 在应用场景,通常用来承载某类相关性较强的或较为低频的,如个人中心、设置等场景。 -
+
-
+
-
### 推荐/慎用示例 @@ -50,12 +47,11 @@ -
- - - ### 相似组件 -| 组件名 | 何时使用 | -| :----- | :----------------------------------- | -| [动作面板](./actionsheet) | 需要提供一组与当前场景操作相关的关联操作时使用。 | +| 组件名 | 何时使用 | +| :-------------------------- | :------------------------------------------------------------------------------------------- | +| [动作面板](./action-sheet) | 需要提供一组与当前场景操作相关的关联操作时使用。 | +| [对话框](./dialog) | 需要用户做一些决定,或这提供完成某个任务是需要的一些额外信息时使用。 | +| [下拉菜单](./dropdown-menu) | 当内容较多时,需要通过筛选快速定位某一类内容时使用。 | +| [选择器](./dropdown-menu) | 当需要在有限的空间展示大量选项供用户选择,或者一组选项由递进层级构成需要用户逐级选择时使用。 | diff --git a/docs/miniprogram/_design/DropdownMenu.md b/docs/miniprogram/_design/DropdownMenu.md new file mode 100644 index 0000000000..0312d49913 --- /dev/null +++ b/docs/miniprogram/_design/DropdownMenu.md @@ -0,0 +1,50 @@ +# 下拉菜单 DropdownMenu + +## 组件设计指南 + +### 何时使用 + +当内容较多时,需要通过筛选快速定位某一类内容时使用。 + +### 常见用法 + +##### 常用于单个维度筛选或多个维度复合筛选的场景,可进行单选或多选。 + +
+
+ +
+ +
+ +
+
+ + +### 推荐/慎用示例 + +##### 在单选的筛选场景内,建议将用户选择项替换标题显示于菜单面板内。 + +
+
+ + +
+
+ +
+ +##### 当筛选维度为多选时,建议提供重置按钮,便于用户恢复到未筛选状态。 + +
+ + +
+ + + +### 相似组件 + +| 组件名 | 何时使用 | +| :----- | :----------------------------------- | +| [选择器](./Cascader) | 当需要在有限的空间展示大量选项供用户选择时,或一组选项由递进层级构成,需要用户逐级选择使用时。| diff --git a/docs/miniprogram/_design/Empty.md b/docs/miniprogram/_design/Empty.md new file mode 100644 index 0000000000..e40a8081da --- /dev/null +++ b/docs/miniprogram/_design/Empty.md @@ -0,0 +1,46 @@ +# 空状态 Empty + +## 组件设计指南 + +### 何时使用 + +当页面或模块数据为空时使用。 + +### 与页面布局相关 + +##### 用于整个页面或某个独立模块的状态展示,在页面、模块内居中。 + +
+
+ +
+ +
+ +
+
+ +### 组件搭配使用 + +##### 空状态与[步骤条](./steps)组合使用,通过步骤展示提示用户如何新建/添加。 +
+
+ +
+
+ +
+ +##### 空状态与[按钮](./button)组合使用,引导用户直接新建/添加。 + +
+
+ +
+
+ +### 相似组件 + +| 组件名 | 何时使用 | +| :--------------- | :--------------------------------------- | +| [结果](./result) | 当需要向用户展示操作后的结果反馈时使用。 | diff --git a/docs/miniprogram/_design/Fab.md b/docs/miniprogram/_design/Fab.md index bff833178f..7d89149464 100644 --- a/docs/miniprogram/_design/Fab.md +++ b/docs/miniprogram/_design/Fab.md @@ -30,18 +30,15 @@ - -
- ### 组件搭配使用 -##### 悬浮按钮与[动作面板](./actionsheet)组合使用,当触发悬浮按钮涉及的任务通过若干种方式达成,可以用动态面板来承载这若干种方式的操作。 +##### 悬浮按钮与[动作面板](./action-sheet)组合使用,当触发悬浮按钮涉及的任务通过若干种方式达成,可以用动态面板来承载这若干种方式的操作。
- - -
-
+ + + + ### 推荐/慎用示例 @@ -76,13 +73,10 @@ -
- - ### 相似组件 | 组件名 | 何时使用 | | :----- | :----------------------------------- | | [按钮](./button) | 当前流程的结束或新流程的开启需要用户点击触发时使用。 | -| [返回顶部](./backtop ) | 当页面内容过长,用户有快速返回到页面顶部的诉求时使用。 | +| [返回顶部](./back-top ) | 当页面内容过长,用户有快速返回到页面顶部的诉求时使用。 | diff --git a/docs/miniprogram/_design/Footer.md b/docs/miniprogram/_design/Footer.md new file mode 100644 index 0000000000..1f309b2644 --- /dev/null +++ b/docs/miniprogram/_design/Footer.md @@ -0,0 +1,63 @@ +# 页脚 Footer + +## 组件设计指南 + +### 何时使用 + +当页面底部需要放置一些补充信息和链接时使用。 + +### 与页面布局相关 + +##### 页脚通常位于网站每个页面底部或主体内容下方的区域。 + +
+
+ +
+
+ +### 常见用法 + +##### 用于承载版权、隐私政策和使用条款等信息,它们是法律保护所需的。 + +
+
+ +
+
+ +
+ +##### 用于承载网站、产品的联系方式,便于用户在页脚查找联系信息或查找获得客户支持的方式。 + +
+
+ +
+
+ +
+ +##### 用于承载网站导航。 + +
+
+ +
+
+ +
+ +##### 用于承载相关公司/品牌列表,让用户能认知合作或者旗下的品牌/公司,并提供找到他们的方式。 + +
+
+ +
+ +
+ +
+
+ + diff --git a/docs/miniprogram/_design/Grid.md b/docs/miniprogram/_design/Grid.md new file mode 100644 index 0000000000..177a790e75 --- /dev/null +++ b/docs/miniprogram/_design/Grid.md @@ -0,0 +1,90 @@ +# 宫格 Grid + +## 组件设计指南 + +### 何时使用 + +当需要展示多个功能或信息入口,且这些入口没有明显的优先级时使用。 + +### 组件搭配使用 + +##### 可与徽标组合使用,可作为消息提示、或其它相关的数量提示。 + +
+
+ +
+
+ +### 常见用法 + +##### 通常用于金刚区、或底部标签栏等,在页面中较为醒目的位置承载主要的功能入口。 + +
+
+ +
+
+ +
+ +##### 通常承载图片、头像等信息进行展示,并作为查看相应信息的入口。 + +
+
+ +
+ +
+ +
+
+ +
+ +##### 通常用于动作面板,和头像、图标按钮相结合,承载分享、保存到本地等操作。 + +
+
+ +
+
+ + +### 推荐/慎用示例 + +##### 当在金刚区使用宫格承载功能入口时,建议梳理功能的优先级,将金刚区控制在3行以内,一些相对次要的功能可通过左右滑动的方式收纳在第二屏。 + +
+
+ + +
+ +
+ + +
+
+ +
+ +
+
+ + +
+ +
+ + +
+
+ + + +### 相似组件 + +| 组件名 | 何时使用 | +| :----- | :----------------------------------- | +| [单元格](./cell) |用于各个类别行的信息展示。| diff --git a/docs/miniprogram/_design/Image.md b/docs/miniprogram/_design/Image.md index 91939044da..92f3c745cb 100644 --- a/docs/miniprogram/_design/Image.md +++ b/docs/miniprogram/_design/Image.md @@ -22,7 +22,7 @@
-##### 图片与[下拉刷新](./pulldownrefresh)组合使用,用于图片瀑布流时的内容更新。 +##### 图片与[下拉刷新](./pull-down-refresh)组合使用,用于图片瀑布流时的内容更新。
@@ -31,8 +31,6 @@
-
- ### 推荐/慎用示例 @@ -50,12 +48,10 @@
-
- ### 相似组件 | 组件名 | 何时使用 | | :----- | :----------------------------------- | -| [图片预览](./imageviewer) | 当需要对展示的图片进行快速查看,以及在查看时存在放大、缩小、删除等操作诉求时使用。 | +| [图片预览](./image-viewer) | 当需要对展示的图片进行快速查看,以及在查看时存在放大、缩小、删除等操作诉求时使用。 | diff --git a/docs/miniprogram/_design/ImageViewer.md b/docs/miniprogram/_design/ImageViewer.md index fe4cf2105d..ae98582d3b 100644 --- a/docs/miniprogram/_design/ImageViewer.md +++ b/docs/miniprogram/_design/ImageViewer.md @@ -16,13 +16,12 @@
-##### 当使用带删除操作的图片预览组件时,可与[动作面板](./actionsheet)组合使用,对删除操作进行二次确认。 +##### 当使用带删除操作的图片预览组件时,可与[动作面板](./action-sheet)组合使用,对删除操作进行二次确认。
-
### 推荐/慎用示例 @@ -34,8 +33,6 @@ -
- ### 相似组件 diff --git a/docs/miniprogram/_design/Indexes.md b/docs/miniprogram/_design/Indexes.md new file mode 100644 index 0000000000..4396b37d86 --- /dev/null +++ b/docs/miniprogram/_design/Indexes.md @@ -0,0 +1,56 @@ +# 索引 Indexes + +## 组件设计指南 + +### 何时使用 + +当数据项较多时,为方便用户快速找到目标数据项时使用。 + +### 组件搭配使用 + +##### 索引与[单选框](./radio)、[多选框](./checkbox)组合使用,在选择数据的场景配合索引有利于用户快速找到目标选项。 + +
+
+ +
+
+ +### 推荐/慎用示例 + +##### 索引项需要跟数据项小标题保持一致。 + +
+
+ + +
+ +
+ + +
+
+ +
+ +##### 索引项排序应具备一定的逻辑相关性。 + +
+
+ + +
+ +
+ + +
+
+ + +### 相似组件 + +| 组件名 | 何时使用 | +| :------------------- | :------------------------------------------------------------- | +| [侧边栏](./side-bar) | 当内容项数量较多,需要用户根据品类快速选择到目标内容项时使用。 | diff --git a/docs/miniprogram/_design/Input.md b/docs/miniprogram/_design/Input.md new file mode 100644 index 0000000000..7df39948df --- /dev/null +++ b/docs/miniprogram/_design/Input.md @@ -0,0 +1,74 @@ +# 输入框 Input + +## 组件设计指南 + +### 何时使用 + +需要进行文字输入,且需填写的字数较少时使用。 + +### 组件搭配使用 + +##### 呈现在单元格中,可与按钮组件相结合,点击按钮触发相关功能。 + +
+
+ +
+
+ + +### 常见用法 + +##### 通常使用在表单中进行文字填写,填写状态下可在右侧显示清空输入的按钮,供用户快速清空已输入的内容。 + +
+ +
+ +
+ +##### 当需要进行较复杂的内容填写,如验证码等,可使用特定类型输入框,结合按钮、图形等辅助元素帮助用户完成流程。 + +
+
+ +
+ +
+ +
+
+ +### 推荐/慎用示例 + +##### 标签、占位符文本简明扼要地描述用户需要输入的内容,标签超过10个字时请考虑使用其它展示方式。 + +
+
+ + +
+ +
+ + +
+
+ +
+ +##### 当需要输入较长的复杂内容时,建议使用多行文本框输入。 +
+
+ + +
+
+ + +### 相似组件 + +| 组件名 | 何时使用 | +| :----------------------- | :------------------------------------------- | +| [多行文本框](./textarea) | 需要进行文字输入,且需填写的字数较多时使用。 | +| [搜索框](./search) | 当需要从海量信息中准确提取准确的内容时使用。 | diff --git a/docs/miniprogram/_design/Loading.md b/docs/miniprogram/_design/Loading.md new file mode 100644 index 0000000000..3da3dde123 --- /dev/null +++ b/docs/miniprogram/_design/Loading.md @@ -0,0 +1,60 @@ +# 加载 loading + +## 组件设计指南 + +### 何时使用 + +当打开新页面或操作完成后,等待加载时使用。 + +### 与页面布局相关 + +##### 当展示整个页面、或模块的加载进度时,通常放置在页面、模块的正中间。 + +
+
+ +
+ +
+ +
+
+ + +### 组件搭配使用 + +##### 在信息流页面中,可结合下拉刷新使用,对未展示出来的最新内容进行加载。 + +
+
+ +
+ +
+ +
+
+ +### 推荐/慎用示例 + +##### 当加载时间较长,尤其是超过10秒的场景中,推荐使用进度条,向用户明确展示当前任务的进展,避免等待时间过长带来焦急的负面体验。 + +
+
+ + +
+ +
+ + +
+
+ + +### 相似组件 + +| 组件名 | 何时使用 | +| :------------------------------ | :--------------------------------------------------------------- | +| [进度条](./progress) | 当有一项系统任务正在进行,需要向用户展示该任务的当前进度时使用。 | +| [下拉刷新](./pull-down-refresh) | 当需要对页面信息进行整体刷新或加载更多同类信息时使用。 | diff --git a/docs/miniprogram/_design/Message.md b/docs/miniprogram/_design/Message.md new file mode 100644 index 0000000000..e0a7c42ff2 --- /dev/null +++ b/docs/miniprogram/_design/Message.md @@ -0,0 +1,52 @@ +# 消息通知 Message + +## 组件设计指南 + +### 何时使用 + +当需要对用户进行较轻量的反馈或提示,可以自动消失或通过点击关闭,通常由用户触发。 + +### 与页面布局相关 + +##### 通知通常出现在页面顶部,叠加在页面的上层,可在一段时间后自动消失、或用户点击关闭。 + +
+
+ +
+ +
+ +
+
+ + +### 推荐/慎用示例 + +##### 当需要在通知栏中展示按钮时,不建议超过1个。若需要使用更多按钮,建议使用其它交互方式。 + +
+
+ + +
+
+ +
+ +##### 消息通知是一种相对轻量、短时的反馈方式,尽量避免在页面中同时堆叠多个消息通知,用户可能会来不及关注它们。 + +
+
+ + +
+
+ + +### 相似组件 + +| 组件名 | 何时使用 | +| :--------------------- | :----------------------------------------------------------------------------------------------- | +| [轻提示](./toast) | 当需要对用户进行轻量反馈或提示,且不需要用户进行操作时使用,轻提示会在一段时间后自动消失。 | +| [公告栏](./notice-bar) | 当需要对用户进行较明显的反馈或提示,需要用户关注时使用,一段时间后不会自动消失,通常是自动触发。 | diff --git a/docs/miniprogram/_design/Picker.md b/docs/miniprogram/_design/Picker.md new file mode 100644 index 0000000000..5375b7e21c --- /dev/null +++ b/docs/miniprogram/_design/Picker.md @@ -0,0 +1,42 @@ +# 选择器 Picker + +## 组件设计指南 + +### 何时使用 + +当需要在有限的空间展示大量选项供用户选择,或者一组选项由递进层级构成需要用户逐级选择时使用。 + +### 推荐/慎用示例 + +##### 选择器若为一组有层级关系的选项时,选项层级不宜超过4层,层级过多时应调整数据结构或改用其他交互方式。 + +
+
+ + +
+
+ +
+ +##### 选择器若为一组有层级关系的选项时,各层级选项的归属关系应具备逻辑相关性,数据层级由大到小,避免归属关系混乱。 + +
+
+ + +
+ +
+ + +
+
+ + +### 相似组件 + +| 组件名 | 何时使用 | +| :-------------------------------- | :----------------------------------------------------------------------- | +| [时间选择器](./date-time-picker ) | 在表单中需要输入单个日期或时间时使用。 | +| [级联选择器](./Cascader) | 当一组选项由递进层级构成,且每个层级有大量的选项需要用户逐级选择时使用。 | diff --git a/docs/miniprogram/_design/Popup.md b/docs/miniprogram/_design/Popup.md new file mode 100644 index 0000000000..cdafb95b2c --- /dev/null +++ b/docs/miniprogram/_design/Popup.md @@ -0,0 +1,55 @@ +# 弹出层 Popup + +## 组件设计指南 + +### 常见用法 + +##### 在筛选的场景,若筛选条件外露,通常会使用顶部弹出的弹出层;若为筛选入口,则通常触发使用右侧弹出的弹出层。 + +
+ +
+ +
+ +
+ +
+ +
+ +##### 承载页面中某个任务操作流程,通常会使用底部弹出的弹出层。 + +
+ +
+ +
+ +##### 承载重要提示且可能需要用户做出一些重要决策时,通常会使用中间弹出的弹出层。 + +
+
+ +
+
+ +
+ +##### 承载较为重要的运营活动入口(如拍脸图)时,通常会使用中间弹出的弹出层。 + +
+
+ +
+
+ +
+ +##### 承载网站、应用收折起来的导航菜单时,通常会使用左侧弹出的弹出层。 + +
+
+ +
+
diff --git a/docs/miniprogram/_design/Progress.md b/docs/miniprogram/_design/Progress.md new file mode 100644 index 0000000000..d7b048c316 --- /dev/null +++ b/docs/miniprogram/_design/Progress.md @@ -0,0 +1,64 @@ +# 进度条 Progress + +## 组件设计指南 + +### 何时使用 + +当有一项系统任务正在进行,需要向用户展示该任务的当前进度时使用。 + +### 与页面布局相关 + +##### 当展示页面、模块的加载进度时,通常进度条放置在页面、模块的正中间。 + +
+
+ +
+ +
+ +
+
+ +### 常见用法 + +##### 通常用于任务周期较长的场景中,配有文字或图标显示进度和状态。 + +
+
+ +
+
+ +
+ +##### 当任务时间较短、或难以预估剩余时间时,通常弱化进度的百分比信息,如使用隐藏数值进度条、或微型的环形进度条。 + +
+
+ +
+ +
+ +
+
+ + +### 推荐/慎用示例 + +##### 若任务需要等待的时间很长,可以提供大概的时间估计,让用户更有预期。 + +
+
+ + +
+
+ + +### 相似组件 + +| 组件名 | 何时使用 | +| :---------------- | :----------------------------------------- | +| [加载](./loading) | 当打开新页面或操作完成后,等待加载时使用。 | diff --git a/docs/miniprogram/_design/PullDownRefresh.md b/docs/miniprogram/_design/PullDownRefresh.md index 00823e705b..f43851d555 100644 --- a/docs/miniprogram/_design/PullDownRefresh.md +++ b/docs/miniprogram/_design/PullDownRefresh.md @@ -13,47 +13,51 @@
- +
- +
-
- +
-
- - ### 常见用法 ##### 在推荐型信息流页面使用下拉刷新,对页面所有信息进行整体更新。
- +
+
+ ##### 在按时间排布型信息流页面使用下拉刷新,对未展示出来的最新内容进行加载。
- +
- +
-
+ +### 相似组件 + +| 组件名 | 何时使用 | +| :----- | :----------------------------------- | +| [加载](./loading) |当打开新页面或操作完成后,等待加载时使用。| + diff --git a/docs/miniprogram/_design/Radio.md b/docs/miniprogram/_design/Radio.md index 02414adca4..7cd9b6f97a 100644 --- a/docs/miniprogram/_design/Radio.md +++ b/docs/miniprogram/_design/Radio.md @@ -8,7 +8,7 @@ ### 组件搭配使用 -##### 单选框与[索引](./indexes)、[搜索](./search)组合使用,便于用户从大量的选项中,快速地找到目标选项。 +##### 单选框与[索引](./indexes)、[搜索框](./search)组合使用,便于用户从大量的选项中,快速地找到目标选项。
@@ -21,8 +21,6 @@
-
- ### 推荐/慎用示例 @@ -54,8 +52,6 @@ -
- ### 相似组件 diff --git a/docs/miniprogram/_design/Rate.md b/docs/miniprogram/_design/Rate.md new file mode 100644 index 0000000000..849489aa7e --- /dev/null +++ b/docs/miniprogram/_design/Rate.md @@ -0,0 +1,55 @@ +# 评分 Rate + +## 组件设计指南 + +### 何时使用 + +当需要对某行为/事物进行简单的星级评定时使用。 + +### 组件搭配使用 + +##### 通常结合多行文本框、标签使用,常见于评论场景,用户对某事物进行星级评定后,可选择预设的文本标签、或在文本框中撰写内容来进行更详细的评价。 + +
+
+ +
+
+ +### 常见用法 + +##### 在较为严谨的评论场景,通常结合辅助文字,帮助用户更好地理解每个星级的含义,避免个体的打分标准不统一。 + +
+
+ +
+
+ +### 推荐/慎用示例 + +##### 可结合业务场景自定义评分图标,如使用品牌的icon,增强品牌透出,但不建议使用过于复杂的图形作为评分图标。 + +
+
+ + +
+ +
+ + +
+
+ +
+ +##### 在同一个评论场景中,评分机制应保持一致,不建议将半星、整星的评分机制混用。 +
+
+ + +
+
+ + diff --git a/docs/miniprogram/_design/Result.md b/docs/miniprogram/_design/Result.md new file mode 100644 index 0000000000..5c6a0997d3 --- /dev/null +++ b/docs/miniprogram/_design/Result.md @@ -0,0 +1,56 @@ +# 结果 Result + +## 组件设计指南 + +### 何时使用 + +当需要向用户展示操作后的结果反馈时使用。 + +### 常见用法 + +##### 任务本身在弹窗中进行或仅需要较为轻量的结果反馈时,可使用弹窗承载结果反馈。 + +
+
+ +
+
+ +
+ +##### 当任务结束并给予反馈后,需要推荐其他内容、任务、商品等给用户时,通常使用页面承载结果和推荐。 + +
+
+ +
+
+ +
+ +##### 当任务结果为失败时,通常会告知用户失败原因,甚至提供解决问题的操作。 + +
+
+ +
+
+ +
+ + +##### 当前操作结束后,若还存在一系列用户需关注的流程进度,通常会结合步骤条将流程展示于结果页。 + +
+
+ +
+
+ + + +### 相似组件 + +| 组件名 | 何时使用 | +| :----------------- | :--------------------------- | +| [空状态](./empty ) | 当页面或模块数据为空时使用。 | diff --git a/docs/miniprogram/_design/Search.md b/docs/miniprogram/_design/Search.md new file mode 100644 index 0000000000..4b56e46c62 --- /dev/null +++ b/docs/miniprogram/_design/Search.md @@ -0,0 +1,53 @@ +# 搜索框 Search + +## 组件设计指南 + +### 何时使用 + +当需要从海量信息中准确提取准确的内容时使用。 + +### 与页面布局相关 + +##### 位于页面或内容模块的最上方,通过搜索框、搜索icon等方式承载和触发功能。 + +
+
+ +
+ +
+ +
+
+ + +### 常见用法 + +##### 在可搜索内容类型较为单一的场景下,可直接在原页面激活搜索态进行搜索,并通过高亮命中字符的方式展示搜索结果,页面内容组织结构保持不变。 + +
+ +
+ +
+ +##### 在可搜索内容类型较丰富的场景下,通过模态承载搜索态,并在新页面中按分类呈现搜索结果。 + +
+ +
+ +
+ +##### 在用户触发搜索后,对用户即将搜索的内容进行预判和推荐,并需要满足营销的诉求。 + +
+ +
+ + +### 相似组件 + +| 组件名 | 何时使用 | +| :---------------- | :------------------------------------------- | +| [输入框](./Input) | 需要进行文字输入,且需填写的字数较少时使用。 | diff --git a/docs/miniprogram/_design/SideBar.md b/docs/miniprogram/_design/SideBar.md new file mode 100644 index 0000000000..6c5de1da91 --- /dev/null +++ b/docs/miniprogram/_design/SideBar.md @@ -0,0 +1,52 @@ +# 侧边栏 SideBar + +## 组件设计指南 + +### 何时使用 + +当内容项数量较多,需要用户根据品类快速选择到目标内容项时使用。 + +### 组件搭配使用 + +##### 侧边栏与徽标组合使用,用于展示品类的状态信息或营销情况。 + +
+
+ +
+
+ + +### 正确/慎用示例 + +##### 建议文本简明扼要,若文本过长建议进行换行处理,尽量避免将文本进行截断。 + +
+
+ + +
+ +
+ + +
+
+ +
+ +##### 不建议仅用图标、emoji作为品类选项,避免表意不清晰。 +
+
+ + +
+
+ + +### 相似组件 + +| 组件名 | 何时使用 | +| :------------------ | :---------------------------------------------------------------------------- | +| [标签栏](./tab-bar) | 目标模块/视图需要从应用的任何地方直接进行访问时使用 | +| [选项卡](./tabs) | 当内容/数据需要一定的分类纬度进行区分,便于用户快速作出选择并切换时可以使用。 | diff --git a/docs/miniprogram/_design/Slider.md b/docs/miniprogram/_design/Slider.md index 82ac2b5592..3f3d43d7df 100644 --- a/docs/miniprogram/_design/Slider.md +++ b/docs/miniprogram/_design/Slider.md @@ -17,8 +17,6 @@ -
- ### 常见用法 ##### 用于可量化的数值选择,需要精确到具体某个数值/区间。 @@ -29,6 +27,8 @@ +
+ ##### 用于难以量化的对立数据,以此表示程度。
@@ -37,8 +37,6 @@
-
- ### 推荐/慎用示例 @@ -56,7 +54,8 @@ -
- - +### 相似组件 +| 组件名 | 何时使用 | +| :----- | :----------------------------------- | +| [步进器](./stepper) |需要进行数量选择时使用。| diff --git a/docs/miniprogram/_design/Steps.md b/docs/miniprogram/_design/Steps.md new file mode 100644 index 0000000000..21d64ed8c2 --- /dev/null +++ b/docs/miniprogram/_design/Steps.md @@ -0,0 +1,76 @@ +# 步骤条 Steps + +## 组件设计指南 + +### 何时使用 + +当需要展示较为复杂的线性流程时使用。 + +### 与页面布局相关 + +##### 位于页面或模块的顶部,统领下方内容的切换,通常设置吸顶,方便用户快速切换。 +
+
+ +
+
+ + +### 推荐/慎用示例 + +##### 步骤不宜过多,过长的步骤建议优化流程或使用其它交互方式。 + +
+
+ + +
+ +
+ + +
+
+ +
+ +##### 每个小步骤建议尽量简洁清晰,以降低用户的理解和操作成本;若小步骤本身已经具有较高的复杂度,建议使用其它方式呈现。 + +
+
+ + +
+ +
+ + +
+
+ +
+ +##### 建议用简明的语言对步骤进行描述,描述文案不宜过长。 + +
+ + +
+ +
+ +##### 尽量避免嵌套步骤条。 +
+
+ + +
+
+ + +### 相似组件 + +| 组件名 | 何时使用 | +| :------------------- | :---------------------------------------------------------------------------- | +| [进度条](./progress) | 当有一项系统任务正在进行,需要向用户展示该任务的当前进度时使用。 | +| [选项卡](./tabs) | 当内容/数据需要一定的分类纬度进行区分,便于用户快速作出选择并切换时可以使用。 | diff --git a/docs/miniprogram/_design/SwipeCell.md b/docs/miniprogram/_design/SwipeCell.md new file mode 100644 index 0000000000..ca53df15b6 --- /dev/null +++ b/docs/miniprogram/_design/SwipeCell.md @@ -0,0 +1,77 @@ +# 滑动操作 SwipeCell + +## 组件设计指南 + +### 何时使用 + +需要针对列表项目进行某项低频的辅助操作时使用。 + +### 组件搭配使用 + +##### 与[单元格](./cell)、[按钮](./button)组合使用,单元格作为承载滑动操作的容器,左右滑动后展示操作项的按钮。 + +
+
+ +
+ +
+ +
+
+ + +### 常见用法 + +##### 通常使用在对话列表、收藏列表、购物车等场景中,承载删除、收藏等辅助操作。 + +
+
+ +
+ +
+ +
+
+ +
+ +##### 通常左滑后展示删除按钮,若删除操作重要且无法撤回,可在滑动操作中对删除进行二次确认。 + +
+ +
+ + +### 推荐/慎用示例 + +##### 左右滑动操作通常承载低频的辅助功能,不建议承载高频或过于复杂的功能。 + +
+ + +
+ +
+ +##### 按钮的顺序、颜色使用需要符合用户预期。 +
+ + +
+ +
+ +##### 左滑的操作数不建议超过4个,右滑不建议超过1个,操作过多时应改用其它交互方式。 +
+ + +
+ + +### 相似组件 + +| 组件名 | 何时使用 | +| :--------------- | :--------------------------------------------------- | +| [按钮](./button) | 当前流程的结束或新流程的开启需要用户点击触发时使用。 | diff --git a/docs/miniprogram/_design/Switch.md b/docs/miniprogram/_design/Switch.md new file mode 100644 index 0000000000..f11d087fbe --- /dev/null +++ b/docs/miniprogram/_design/Switch.md @@ -0,0 +1,33 @@ +# 开关 Switch + +## 组件设计指南 + +### 何时使用 + +当需要切换某个功能的开启、关闭时使用。 + +### 推荐/慎用示例 + +##### 开关状态的颜色使用建议符合颜色语义,尽量避免让开启、关闭状态的颜色产生混淆。 + +
+
+ + +
+ +
+ + +
+
+ +
+ +##### 若需结合文本描述开关状态,建议文案和开关状态保持一致,确保表意清晰。 +
+
+ + +
+
diff --git a/docs/miniprogram/_design/TabBar.md b/docs/miniprogram/_design/TabBar.md index ce2022c539..c3e1722bc4 100644 --- a/docs/miniprogram/_design/TabBar.md +++ b/docs/miniprogram/_design/TabBar.md @@ -8,7 +8,7 @@ ### 组件搭配使用 -##### 标签栏与[徽标](./adge)组合使用,用于告知用户该模块/视图的状态变化。 +##### 标签栏与[徽标](./badge)组合使用,用于告知用户该模块/视图的状态变化。
@@ -20,9 +20,6 @@
-
- - ### 推荐/慎用示例 ##### 建议标签栏数量在2-5个之间;若多与5个,建议重新审视应用的信息架构,对信息架构进行优化。 @@ -66,18 +63,17 @@ -
- - -
- -
+
+ + +
### 相似组件 | 组件名 | 何时使用 | | :----- | :----------------------------------- | -| [选项卡](./tabs) | 当内容/数据需要一定的分类纬度进行区分,便于用户快速作出选择并切换时可以使用。 | +| [选项卡](./tabs) |当内容/数据需要一定的分类纬度进行区分,便于用户快速作出选择并切换时可以使用。| +| [侧边栏](./side-bar) |当内容项数量较多,需要用户根据品类快速选择到目标内容项时使用。| diff --git a/docs/miniprogram/_design/Tabs.md b/docs/miniprogram/_design/Tabs.md index 38942bff64..355ddb6761 100644 --- a/docs/miniprogram/_design/Tabs.md +++ b/docs/miniprogram/_design/Tabs.md @@ -19,7 +19,6 @@ -
### 组件搭配使用 @@ -32,9 +31,6 @@ -
- - ### 常见用法 ##### 较常使用于以信息瀑布流为场景的应用,使用选项卡承载类目或状态,便于用户区分和切换。 @@ -55,7 +51,6 @@ -
### 推荐/慎用示例 @@ -103,12 +98,11 @@ -
- ### 相似组件 | 组件名 | 何时使用 | | :----- | :----------------------------------- | -| [底部标签栏](./tabbar) | 目标模块/视图需要从应用的任何地方直接进行访问时使用 。 | +| [标签栏](./tab-bar) | 当目标模块/视图需要从应用的任何地方直接进行访问时使用。| +| [侧边栏](./side-bar) |当内容项数量较多,需要用户根据品类快速选择到目标内容项时使用。| diff --git a/docs/miniprogram/_design/Tag.md b/docs/miniprogram/_design/Tag.md new file mode 100644 index 0000000000..054ed2642a --- /dev/null +++ b/docs/miniprogram/_design/Tag.md @@ -0,0 +1,88 @@ +# 标签 Tag + +## 组件设计指南 + +### 何时使用 + +当需要展示内容本身的属性、状态、类别、营销情况时作为纯展示使用;或者当大量的内容数据需要根据类型进行选择筛选时使用。 + +### 组件搭配使用 + +##### 与[图片](./image)组合使用,图片作为内容、商品等对象的详情入口时,可通过添加标签来展示该对象的属性、状态、类别、营销情况等。 + +
+
+ +
+ +
+ +
+
+ +
+ +##### 与[下拉菜单](./dropdown-menu)组合使用,作为菜单面板下拉后的选项,供用户进行选择。 + +
+
+ +
+
+ +### 常见用法 + +##### 常用于展示对象本身的属性、状态、类别、营销情况等信息,且仅作为展示使用。 + +
+
+ +
+ +
+ +
+
+ +
+ +##### 常用于内容数据基于某个维度或某些维度的检索、筛选。 + +
+
+ +
+ +
+ +
+
+ + +### 推荐/慎用示例 + +##### 标签颜色和字体颜色在明度、色相上要避免难以区分,保证标签的可读性。 + +
+
+ + +
+
+ +
+ +##### 标签文案需要经过概括和提炼,不建议过长。 + +
+ + +
+ + + +### 相似组件 + +| 组件名 | 何时使用 | +| :----- | :----------------------------------- | +| [徽标](./badge) | 当需要展示特定对象的状态变化或承载运营性质提示时使用。| diff --git a/docs/miniprogram/_design/Textarea.md b/docs/miniprogram/_design/Textarea.md new file mode 100644 index 0000000000..75f99e7cea --- /dev/null +++ b/docs/miniprogram/_design/Textarea.md @@ -0,0 +1,61 @@ +# 多行文本框 Textarea + +## 组件设计指南 + +### 何时使用 + +需要进行文字输入,且需填写的字数较多时使用。 + +### 常见用法 + +##### 常见于表单、内容发布的场景中,用于输入较长的文本内容。 + +
+
+ +
+ +
+ +
+
+ + +### 推荐/慎用示例 + +##### 尽量避免输入过于复杂的文本内容,考虑将内容拆分,让用户分步输入。 + +
+
+ + +
+ +
+ + +
+
+ +
+ +##### 建议根据待输入的内容决定多行文本框的高度。 +
+
+ + +
+ +
+ + +
+
+ + +### 相似组件 + +| 组件名 | 何时使用 | +| :---------------- | :------------------------------------------- | +| [输入框](./input) | 需要进行文字输入,且需填写的字数较少时使用。 | + diff --git a/docs/miniprogram/_design/Toast.md b/docs/miniprogram/_design/Toast.md new file mode 100644 index 0000000000..0846bfe2e9 --- /dev/null +++ b/docs/miniprogram/_design/Toast.md @@ -0,0 +1,53 @@ +# 轻提示 Toast + +## 组件设计指南 + +### 何时使用 + +当需要对用户进行轻量反馈或提示,且不需要用户进行操作时使用,轻提示会在一段时间后自动消失。 + +### 与页面布局相关 + +##### 轻提示通常放置在页面正中间,一段时间后自动消失。 + +
+
+ +
+
+ + +### 组件搭配使用 + +##### 轻提示经常和加载搭配使用,在页面内进行某项操作后,用作加载反馈。 + +
+
+ +
+
+ + +### 推荐/慎用示例 + +##### 轻提示的文案内容通常不超过30个字,确保用户有充足的时间进行阅读,若需要提示较长的文本内容,建议使用其它交互方式。 + +
+
+ + +
+ +
+ + +
+
+ + +### 相似组件 + +| 组件名 | 何时使用 | +| :--------------------- | :----------------------------------------------------------------------------------------------------- | +| [消息通知](./message) | 当需要对用户进行较轻量的反馈或提示,且不需要、或只需要少量用户交互时使用,可以自动消失或通过点击关闭。 | +| [公告栏](./notice-bar) | 当需要对用户进行较明显的反馈或提示,需要用户关注时使用,一段时间后不会自动消失。 | diff --git a/docs/miniprogram/_design/TreeSelect.md b/docs/miniprogram/_design/TreeSelect.md new file mode 100644 index 0000000000..9b7f4023bd --- /dev/null +++ b/docs/miniprogram/_design/TreeSelect.md @@ -0,0 +1,28 @@ +# 树形选择器 TreeSelect + +## 组件设计指南 + +### 何时使用 + +当一组选项由2-3个层级构成,且每个层级有大量的选项需要用户逐级选择时使用。 + + +### 推荐/慎用示例 + +##### 级联选择器的层级不宜超过3层,层级过多时应调整数据结构或改用级联选择器。 + +
+
+ + +
+
+ + + +### 相似组件 + +| 组件名 | 何时使用 | +| :----- | :----------------------------------- | +| [选择器](./picker) | 当需要在有限的空间展示大量选项供用户选择时,或一组选项由递进层级构成,需要用户逐级选择使用时。| +| [级联选择器](./cascader) |当一组选项由递进层级构成,且有每个层级有大量的选项需要用户逐级选择使用时。| diff --git a/docs/miniprogram/_design/Upload.md b/docs/miniprogram/_design/Upload.md new file mode 100644 index 0000000000..58789bdb3a --- /dev/null +++ b/docs/miniprogram/_design/Upload.md @@ -0,0 +1,45 @@ +# 上传 Upload + +## 组件设计指南 + +### 何时使用 + +当需要进行图片上传时使用。 + +### 组件搭配使用 + +##### 通常用于图片上传,点击上传按钮可唤起[动作面板](./action-sheet),供用户选择不同渠道进行新的上传。 + +
+ +
+ +
+ +##### 点击已经上传的图片可跳转[图片预览](./image-viewer),让用户对已上传的图片进行快速查看。 + +
+ +
+ + + +### 推荐/慎用示例 + +##### 若上传的文件有尺寸、格式、数量限制,推荐在文案中进行明确标识。 + +
+ + +
+ +
+ +##### 上传特定证件图片,特别是涉及到证件正反面时,推荐结合图示进行上传指引,更加直观。 + +
+
+ + +
+
diff --git a/docs/miniprogram/_design/avatar.md b/docs/miniprogram/_design/avatar.md new file mode 100644 index 0000000000..f2760c576a --- /dev/null +++ b/docs/miniprogram/_design/avatar.md @@ -0,0 +1,63 @@ +# 头像 Avatar + +## 组件设计指南 + +### 何时使用 + +作为一个用户信息展示,或用来代表某个/某些具体用户。 + +### 组件搭配使用 + +##### 头像与[动作面板](./action-sheet ) 组合使用,在分享场景中利用动作面板承载用户头像,用于分享对象的选择。 + +
+
+ +
+
+
+ +##### 头像与[单元格](./cell) 组合使用,用于展示结构化的成员名称及信息,方便快速识别。 + +
+
+ +
+
+ +
+ +##### 头像与[徽标](./badge) 组合使用,可作为消息提示或人员数量提示等。 + +
+
+ +
+
+ + +### 常见用法 + +##### 多个头像可组合展示构成头像组;当页面布局空间有限,超过可外显个数时候,可将重复性较高的头像信息做隐藏收起,需要时再让用户主动触发查看。 + +
+ +
+ + + +### 推荐/慎用示例 + +##### 对于字符型头像,需要根据场景定义最大字符数,避免字符过多影响可读性,降低可识别度。 + +
+
+ + +
+ +
+ + +
+
diff --git a/docs/miniprogram/_design/cascader.md b/docs/miniprogram/_design/cascader.md new file mode 100644 index 0000000000..4ca5b5ca66 --- /dev/null +++ b/docs/miniprogram/_design/cascader.md @@ -0,0 +1,61 @@ +# 级联选择器 Cascader + +## 组件设计指南 + +### 何时使用 + +当一组选项由递进层级构成,且每个层级有大量的选项需要用户逐级选择时使用。 + + +### 组件搭配使用 + +##### 级联选择器与[索引](./indexes)组合使用,当每个层级选项较多时,配合索引有利于用户快速找到目标选项。 + +
+ +
+ + +### 常见用法 + +##### 在表单中,级联选择器可放置于表单内容需要的顺序中,通常用于地址信息的选择和填写。 +
+
+ +
+
+ + +### 推荐/慎用示例 + +##### 级联选择器的层级不宜超过4层,层级过多时应调整数据结构或改用其他交互方式。 + +
+
+ + +
+
+ +
+ +##### 在多层级中,各层级选项的归属关系应具备逻辑相关性,数据层级由大到小,避免归属关系混乱。 + +
+
+ + +
+ +
+ + +
+
+ + +### 相似组件 + +| 组件名 | 何时使用 | +| :----------------- | :------------------------------------------------------------------------------------------- | +| [选择器](./picker) | 当需要在有限的空间展示大量选项供用户选择,或者一组选项由递进层级构成需要用户逐级选择时使用。 | diff --git a/docs/miniprogram/_design/link.md b/docs/miniprogram/_design/link.md new file mode 100644 index 0000000000..2f5bcd4f4a --- /dev/null +++ b/docs/miniprogram/_design/link.md @@ -0,0 +1,46 @@ +# 链接 Link + +## 组件设计指南 + +### 何时使用 + +当需要跳转至外链时使用。 + +### 组件搭配使用 + +##### 链接与[消息通知](./message)、[公告栏](./notice-bar)组合使用,在进行消息通知与提示的同时,提供解决方案或详情的跳转入口。 + +
+
+ +
+ +
+ +
+
+ + +### 推荐/慎用示例 + +##### 在同一段文本中如使用多个链接,需要利用纯文本字符等将其区隔开。 + +
+
+ + +
+ +
+ + +
+
+ + + +### 相似组件 + +| 组件名 | 何时使用 | +| :--------------- | :--------------------------------------------------- | +| [按钮](./button) | 当前流程的结束或新流程的开启需要用户点击触发时使用。 | diff --git a/docs/miniprogram/_design/navbar.md b/docs/miniprogram/_design/navbar.md new file mode 100644 index 0000000000..c8c7b56e79 --- /dev/null +++ b/docs/miniprogram/_design/navbar.md @@ -0,0 +1,53 @@ +# 导航栏 Navbar + +## 组件设计指南 + +### 何时使用 + +需要在页面间跳转、返回,或需承载少量辅助功能时使用。 + +### 组件搭配使用 + +##### 带图标的导航栏与[抽屉](./drawer)、[动作面板](./action-sheet)组合使用,用于唤起一组操作或功能。 + +
+ +
+ +
+ +
+ +
+ + +### 常见用法 + +##### 通常用来承载页面标题和返回操作,点击跳转回到上一个打开的页面。 + +
+ +
+ +
+ +##### 在应用内,通常用来承载搜索、扫码等功能性高频操作。 + +
+
+ +
+ +
+ +
+
+ +
+ +##### 在需要定位的场景,通常结合当前定位进行、所在城市等进行展示并提供切换的能力。 +
+
+ +
+
diff --git a/docs/miniprogram/_design/swiper.md b/docs/miniprogram/_design/swiper.md new file mode 100644 index 0000000000..3a184535f1 --- /dev/null +++ b/docs/miniprogram/_design/swiper.md @@ -0,0 +1,42 @@ +# 轮播图 Swiper + +## 组件设计指南 + +### 何时使用 + +当需要承载一组banner或一组图片时使用。 + +### 常见用法 + +##### 用于放置营销活动或承载平台广告等具有时效性的内容入口。 + +
+
+ +
+ +
+ +
+
+ +
+ + ##### 在图文详情页场景,用于当图片数量大于1时的折叠展示。 +
+
+ +
+
+ + +### 推荐/慎用示例 + +##### 索引项需要跟数据项小标题保持一致。 + +
+
+ + +
+
diff --git a/docs/miniprogram/design/action-sheet.md b/docs/miniprogram/design/action-sheet.md index 28d6f7335c..fbe3df06c2 100644 --- a/docs/miniprogram/design/action-sheet.md +++ b/docs/miniprogram/design/action-sheet.md @@ -13,8 +13,6 @@ -
- ### 常见用法 ##### 当用户完成一个事件可以通过若干种方式达成,可以用动态面板来承载这若干种方式的操作。 @@ -22,6 +20,8 @@ +
+ ##### 当页面中有一组操作因低频/空间不足不希望外露时,但却必要存在,可以用动作面板来承载,通过“更多”按钮触发
@@ -29,7 +29,6 @@
-
### 推荐/慎用示例 @@ -47,6 +46,8 @@ +
+ ##### 动作面板中的操作项不建议用icon完成替代文字。
@@ -54,8 +55,6 @@
- -
@@ -64,10 +63,11 @@ - ### 相似组件 | 组件名 | 何时使用 | | :----- | :----------------------------------- | | [抽屉](./drawer) | 需要收折展示一组数量较多的菜单时使用。 | | [对话框](./dialog) | 需要用户做一些决定,或这提供完成某个任务是需要的一些额外信息时使用。 | +| [下拉菜单](./dropdown-menu) | 当内容较多时,需要通过筛选快速定位某一类内容时使用。 | +| [选择器](./dropdown-menu) | 当需要在有限的空间展示大量选项供用户选择,或者一组选项由递进层级构成需要用户逐级选择时使用。 | diff --git a/docs/miniprogram/design/avatar.md b/docs/miniprogram/design/avatar.md new file mode 100644 index 0000000000..eb7220cc4b --- /dev/null +++ b/docs/miniprogram/design/avatar.md @@ -0,0 +1,61 @@ + + +### 何时使用 + +作为一个用户信息展示,或用来代表某个/某些具体用户。 + +### 组件搭配使用 + +##### 头像与[动作面板](./action-sheet ) 组合使用,在分享场景中利用动作面板承载用户头像,用于分享对象的选择。 + +
+
+ +
+
+
+ +##### 头像与[单元格](./cell) 组合使用,用于展示结构化的成员名称及信息,方便快速识别。 + +
+
+ +
+
+ +
+ +##### 头像与[徽标](./badge) 组合使用,可作为消息提示或人员数量提示等。 + +
+
+ +
+
+ + +### 常见用法 + +##### 多个头像可组合展示构成头像组;当页面布局空间有限,超过可外显个数时候,可将重复性较高的头像信息做隐藏收起,需要时再让用户主动触发查看。 + +
+ +
+ + + +### 推荐/慎用示例 + +##### 对于字符型头像,需要根据场景定义最大字符数,避免字符过多影响可读性,降低可识别度。 + +
+
+ + +
+ +
+ + +
+
diff --git a/docs/miniprogram/design/badge.md b/docs/miniprogram/design/badge.md new file mode 100644 index 0000000000..173d086096 --- /dev/null +++ b/docs/miniprogram/design/badge.md @@ -0,0 +1,68 @@ + + +### 何时使用 + +当需要展示特定对象的状态变化或承载运营性质提示时使用。 + +### 组件搭配使用 + +##### 徽标与[选项卡](./tabs)、[底部标签栏](./tab-bar)组合使用,置于文字段的右上方,用于展示状态信息或营销信息。 + +
+
+ +
+ +
+ +
+
+ +
+ +##### 徽标与[头像](./avatar)组合使用,可作为消息提示或数量提示。 + +
+
+ +
+
+ + +### 常见用法 + +##### 当用户只需要关注是否有消息,而无需关注消息数量时,可使用红点型徽标;当提示的信息需要精确显示数量时,应使用带数字的徽标。 + +
+
+ +
+ +
+ +
+
+ + +### 推荐/慎用示例 + +##### 建议根据场景和信息类型定义最长字数,不宜出现过长的情况。 + +
+
+ + +
+ +
+ + +
+
+ + +### 相似组件 + +| 组件名 | 何时使用 | +| :------------ | :------------------------------------------------------------------------------------------------------------------- | +| [标签](./tag) | 当需要展示内容本身的属性、状态、类别、营销情况时作为纯展示使用;或者当大量的内容数据需要根据类型进行选择筛选时使用。 | diff --git a/docs/miniprogram/design/button.md b/docs/miniprogram/design/button.md index 69084c4b84..3bb7573b20 100644 --- a/docs/miniprogram/design/button.md +++ b/docs/miniprogram/design/button.md @@ -30,6 +30,7 @@
+
@@ -38,8 +39,6 @@
-
- ### 常见用法 ##### 当在填写场景,按钮通常作为当前流程的结束操作,在表单过长时通常需要吸顶或吸底处理。 @@ -54,7 +53,6 @@
-
### 推荐/慎用示例 @@ -74,11 +72,10 @@ - ### 相似组件 | 组件名 | 何时使用 | | :----- | :----------------------------------- | | [链接](./link) | 当需要外链跳转或页面底部footer链接跳转时使用。 | | [悬浮按钮](./fab) | 当某个操作为全局操作,且为用户高频/业务强推的操作时可使用。 | -| [返回顶部](./backtop) | 当页面内容过长,用户有快速返回到页面顶部的诉求时使用。 | +| [返回顶部](./back-top) | 当页面内容过长,用户有快速返回到页面顶部的诉求时使用。 | diff --git a/docs/miniprogram/design/calendar.md b/docs/miniprogram/design/calendar.md new file mode 100644 index 0000000000..e606fada96 --- /dev/null +++ b/docs/miniprogram/design/calendar.md @@ -0,0 +1,51 @@ + + +### 何时使用 + +需要在页面间跳转、返回,或需承载少量辅助功能时使用。 + +### 组件搭配使用 + +##### 通常和[单元格](./cell)搭配使用,点击后唤起日历。 + +
+ +
+ +### 推荐/慎用 + +##### 日期与描述结合时,通常与价格结合,不建议描述过长、或承载过复杂的信息。 + +
+
+ + +
+ +
+ + +
+
+ +
+ +##### 区间选择尽量使用在较短时间的场景中,当涉及的时间通常在数月、数年的长度时,建议使用其它方式让用户输入。 + +
+
+ + +
+ +
+ + +
+
+ +### 相似组件 + +| 组件名 | 何时使用 | +| :------------------------------- | :------------------------------------- | +| [时间选择器](./date-time-picker) | 在表单中需要输入单个日期或时间时使用。 | diff --git a/docs/miniprogram/design/cascader.md b/docs/miniprogram/design/cascader.md new file mode 100644 index 0000000000..1d02f8e3c3 --- /dev/null +++ b/docs/miniprogram/design/cascader.md @@ -0,0 +1,59 @@ + + +### 何时使用 + +当一组选项由递进层级构成,且每个层级有大量的选项需要用户逐级选择时使用。 + + +### 组件搭配使用 + +##### 级联选择器与[索引](./indexes)组合使用,当每个层级选项较多时,配合索引有利于用户快速找到目标选项。 + +
+ +
+ + +### 常见用法 + +##### 在表单中,级联选择器可放置于表单内容需要的顺序中,通常用于地址信息的选择和填写。 +
+
+ +
+
+ + +### 推荐/慎用示例 + +##### 级联选择器的层级不宜超过4层,层级过多时应调整数据结构或改用其他交互方式。 + +
+
+ + +
+
+ +
+ +##### 在多层级中,各层级选项的归属关系应具备逻辑相关性,数据层级由大到小,避免归属关系混乱。 + +
+
+ + +
+ +
+ + +
+
+ + +### 相似组件 + +| 组件名 | 何时使用 | +| :----------------- | :------------------------------------------------------------------------------------------- | +| [选择器](./picker) | 当需要在有限的空间展示大量选项供用户选择,或者一组选项由递进层级构成需要用户逐级选择时使用。 | diff --git a/docs/miniprogram/design/cell.md b/docs/miniprogram/design/cell.md new file mode 100644 index 0000000000..965f2bd0a5 --- /dev/null +++ b/docs/miniprogram/design/cell.md @@ -0,0 +1,55 @@ + + +### 常见用法 + +##### 常用作内容详情入口或功能入口的平铺陈列。 + +
+
+ +
+ +
+ +
+
+ +
+ +##### 常用作同类型同格式信息项平铺陈列。 + +
+
+ +
+
+ +### 推荐/慎用示例 + +##### 作为入口时,不建议承载过多过复杂的内容。 + +
+
+ + +
+
+ +
+ +##### 作为入口时,不建议在一个单元格内承载其他操作。 + +
+
+ + +
+
+ + + +### 相似组件 + +| 组件名 | 何时使用 | +| :----- | :----------------------------------- | +| [宫格](./grid) | 当需要展示多个功能或信息入口,且这些入口没有明显的优先级时使用。| diff --git a/docs/miniprogram/design/checkbox.md b/docs/miniprogram/design/checkbox.md index 992f4f83e8..40dd0ca0d0 100644 --- a/docs/miniprogram/design/checkbox.md +++ b/docs/miniprogram/design/checkbox.md @@ -6,7 +6,7 @@ ### 组件搭配使用 -##### 多选框与[索引](./indexes)、[搜索](./search)组合使用,便于用户从大量的选项中,快速地找到目标选项。 +##### 多选框与[索引](./indexes)、[搜索框](./search)组合使用,便于用户从大量的选项中,快速地找到目标选项。
@@ -14,11 +14,10 @@
- +
-
- + ### 推荐/慎用示例 @@ -34,20 +33,17 @@ -
##### 在选项较多的场景下执行多选时,建议展示用户已选数量。
- +
-
- ### 相似组件 diff --git a/docs/miniprogram/design/collapse.md b/docs/miniprogram/design/collapse.md new file mode 100644 index 0000000000..5ad03d869a --- /dev/null +++ b/docs/miniprogram/design/collapse.md @@ -0,0 +1,63 @@ + + +### 何时使用 + +当信息较多,需要进行收纳时使用。 + +### 常见用法 + +##### 经常用于信息种类较多的页面,将相对次要的信息收纳起来,让用户能够关注到页面中的主要信息或流程。 + +
+ +
+ +
+ +##### 在展示多条内容较长的同类型信息时,通常从中抽取出关键信息作为标题,收纳在手风琴式折叠面板中,便于用户检索和查看。 + +
+
+ +
+
+ +
+ +##### 在网站中,经常使用折叠面板作为分类导航,将页面进行归类、收纳在折叠面板中,展开后可点击跳转。 + +
+ +
+ + + +### 推荐/慎用示例 + +##### 当信息层级较多时,不建议嵌套折叠面板,层级过多时建议审视信息结构或使用其它交互方式展示。 + +
+
+ + +
+
+ +
+ +##### 不建议使用右箭头作为折叠面板的展开图标,用户可能会误把它认作跳转二级页面的入口。 + +
+
+ + +
+
+ + + +### 相似组件 + +| 组件名 | 何时使用 | +| :----- | :----------------------------------- | +| [下拉菜单](./dropdown-menu) |当内容较多时,需要通过筛选快速定位某一类内容时使用。| diff --git a/docs/miniprogram/design/count-down.md b/docs/miniprogram/design/count-down.md new file mode 100644 index 0000000000..dbb1ad4c22 --- /dev/null +++ b/docs/miniprogram/design/count-down.md @@ -0,0 +1,50 @@ + + +### 何时使用 + +当需要向用户提示剩余时间时使用。 + +### 常见用法 + +##### 在营销场景下,通过倒计时向用户展示运营活动开始倒计时或距活动结束的剩余时间,从而体现稀缺性吸引目标受众的注意力,勾起足够兴趣以此激励用户参与。 + +
+
+ +
+
+ +
+ +##### 在一些工作流场景下,提示用户还剩余多少时间来完成某项任务或处理某些事项,强化时间概念。 + +
+
+ +
+
+ + +### 推荐/慎用示例 + +##### 不建议在同一个页面滥用倒计时,若需要反复使用,建议用较为轻量的样式. + +
+
+ + +
+ +
+ + +
+
+ + +### 相似组件 + +| 组件名 | 何时使用 | +| :-------------- | :------------------------------------------------------------------------------------------------------------------- | +| [标签](./tag) | 当需要展示内容本身的属性、状态、类别、营销情况时作为纯展示使用;或者当大量的内容数据需要根据类型进行选择筛选时使用。 | +| [徽标](./badge) | 当需要展示特定对象的状态变化或承载运营性质提示时使用。 | diff --git a/docs/miniprogram/design/date-time-picker.md b/docs/miniprogram/design/date-time-picker.md new file mode 100644 index 0000000000..92a1cf0d48 --- /dev/null +++ b/docs/miniprogram/design/date-time-picker.md @@ -0,0 +1,42 @@ + + +### 何时使用 + +在表单中需要输入单个日期或时间时使用。 + +### 组件搭配使用 + +##### 通常和[单元格](./Cell)搭配使用,点击后唤起时间选择器。 + +
+ +
+ +### 常见用法 + +##### 当需要输入时间区间时,通常使用两个时间选择器分别选择起、止时间。 + +
+ +
+ +
+ +
+ +### 推荐/慎用示例 + +##### 选择时间后,建议使用标准化格式在表单中书写日期和时间。 + +
+
+ + +
+
+ + +### 何时使用 +| 组件名 | 何时使用 | +| :----------------- | :------------------------------------------------- | +| [日历](./Calendar) | 在表单中需要精确输入单个、多个、或区间日期时使用。 | diff --git a/docs/miniprogram/design/dialog.md b/docs/miniprogram/design/dialog.md index 7e370cf3bc..ddf930d34d 100644 --- a/docs/miniprogram/design/dialog.md +++ b/docs/miniprogram/design/dialog.md @@ -20,8 +20,6 @@ -
- ### 常见用法 @@ -33,6 +31,8 @@ +
+ ##### 用于较为重要的信息提示,且需要用户决定。
@@ -46,7 +46,6 @@
-
### 推荐/慎用示例 @@ -65,3 +64,9 @@ +### 何时使用 +| 组件名 | 何时使用 | +| :----- | :----------------------------------- | +| [轻提示](./toast) |当需要对用户进行轻量反馈或提示,且不需要用户进行操作时使用,轻提示会在一段时间后自动消失。| +| [消息通知](./message) |当需要对用户进行较轻量的反馈或提示,可以自动消失或通过点击关闭,通常由用户触发。| + diff --git a/docs/miniprogram/design/divider.md b/docs/miniprogram/design/divider.md index c598e4dd73..c4ec583cbd 100644 --- a/docs/miniprogram/design/divider.md +++ b/docs/miniprogram/design/divider.md @@ -15,6 +15,7 @@ +
##### 内嵌分割线:一般会在左侧或者右侧预留缺口,目的来区分统一模块下的相关内容,目的是为了让用户浏览大量相关内容时,更加高效。 @@ -24,7 +25,8 @@ - +
+ ##### 组合分割线:通栏分割线与内嵌分割线组合布局。
@@ -32,8 +34,6 @@
- -
### 推荐/慎用示例 diff --git a/docs/miniprogram/design/drawer.md b/docs/miniprogram/design/drawer.md index b802a36667..63d524ca8b 100644 --- a/docs/miniprogram/design/drawer.md +++ b/docs/miniprogram/design/drawer.md @@ -2,35 +2,32 @@ ### 何时使用 -需要收折展示一组数量较多的菜单时使用。 +需要收折展示一组数量较多的菜单时使用 ### 组件搭配使用 ##### 抽屉与[按钮](./button)组合使用,通过按钮点击唤起抽屉。 -
+
-
- -
+
### 常见用法 ##### 在网站场景,通常用来收折展示整个网站的菜单导航。 -
+
-
+

##### 在应用场景,通常用来承载某类相关性较强的或较为低频的,如个人中心、设置等场景。 -
+
-
+
-
### 推荐/慎用示例 @@ -48,12 +45,11 @@ -
- - - ### 相似组件 -| 组件名 | 何时使用 | -| :----- | :----------------------------------- | -| [动作面板](./actionsheet) | 需要提供一组与当前场景操作相关的关联操作时使用。 | +| 组件名 | 何时使用 | +| :-------------------------- | :------------------------------------------------------------------------------------------- | +| [动作面板](./action-sheet) | 需要提供一组与当前场景操作相关的关联操作时使用。 | +| [对话框](./dialog) | 需要用户做一些决定,或这提供完成某个任务是需要的一些额外信息时使用。 | +| [下拉菜单](./dropdown-menu) | 当内容较多时,需要通过筛选快速定位某一类内容时使用。 | +| [选择器](./dropdown-menu) | 当需要在有限的空间展示大量选项供用户选择,或者一组选项由递进层级构成需要用户逐级选择时使用。 | diff --git a/docs/miniprogram/design/dropdown-menu.md b/docs/miniprogram/design/dropdown-menu.md new file mode 100644 index 0000000000..12874dd344 --- /dev/null +++ b/docs/miniprogram/design/dropdown-menu.md @@ -0,0 +1,48 @@ + + +### 何时使用 + +当内容较多时,需要通过筛选快速定位某一类内容时使用。 + +### 常见用法 + +##### 常用于单个维度筛选或多个维度复合筛选的场景,可进行单选或多选。 + +
+
+ +
+ +
+ +
+
+ + +### 推荐/慎用示例 + +##### 在单选的筛选场景内,建议将用户选择项替换标题显示于菜单面板内。 + +
+
+ + +
+
+ +
+ +##### 当筛选维度为多选时,建议提供重置按钮,便于用户恢复到未筛选状态。 + +
+ + +
+ + + +### 相似组件 + +| 组件名 | 何时使用 | +| :----- | :----------------------------------- | +| [选择器](./Cascader) | 当需要在有限的空间展示大量选项供用户选择时,或一组选项由递进层级构成,需要用户逐级选择使用时。| diff --git a/docs/miniprogram/design/empty.md b/docs/miniprogram/design/empty.md new file mode 100644 index 0000000000..3337f15219 --- /dev/null +++ b/docs/miniprogram/design/empty.md @@ -0,0 +1,44 @@ + + +### 何时使用 + +当页面或模块数据为空时使用。 + +### 与页面布局相关 + +##### 用于整个页面或某个独立模块的状态展示,在页面、模块内居中。 + +
+
+ +
+ +
+ +
+
+ +### 组件搭配使用 + +##### 空状态与[步骤条](./steps)组合使用,通过步骤展示提示用户如何新建/添加。 +
+
+ +
+
+ +
+ +##### 空状态与[按钮](./button)组合使用,引导用户直接新建/添加。 + +
+
+ +
+
+ +### 相似组件 + +| 组件名 | 何时使用 | +| :--------------- | :--------------------------------------- | +| [结果](./result) | 当需要向用户展示操作后的结果反馈时使用。 | diff --git a/docs/miniprogram/design/fab.md b/docs/miniprogram/design/fab.md index 3955a23d7d..c873dca237 100644 --- a/docs/miniprogram/design/fab.md +++ b/docs/miniprogram/design/fab.md @@ -28,18 +28,15 @@ - -
- ### 组件搭配使用 -##### 悬浮按钮与[动作面板](./actionsheet)组合使用,当触发悬浮按钮涉及的任务通过若干种方式达成,可以用动态面板来承载这若干种方式的操作。 +##### 悬浮按钮与[动作面板](./action-sheet)组合使用,当触发悬浮按钮涉及的任务通过若干种方式达成,可以用动态面板来承载这若干种方式的操作。
- - -
-
+ + + + ### 推荐/慎用示例 @@ -74,13 +71,10 @@ -
- - ### 相似组件 | 组件名 | 何时使用 | | :----- | :----------------------------------- | | [按钮](./button) | 当前流程的结束或新流程的开启需要用户点击触发时使用。 | -| [返回顶部](./backtop ) | 当页面内容过长,用户有快速返回到页面顶部的诉求时使用。 | +| [返回顶部](./back-top ) | 当页面内容过长,用户有快速返回到页面顶部的诉求时使用。 | diff --git a/docs/miniprogram/design/footer.md b/docs/miniprogram/design/footer.md new file mode 100644 index 0000000000..0aae241a4b --- /dev/null +++ b/docs/miniprogram/design/footer.md @@ -0,0 +1,61 @@ + + +### 何时使用 + +当页面底部需要放置一些补充信息和链接时使用。 + +### 与页面布局相关 + +##### 页脚通常位于网站每个页面底部或主体内容下方的区域。 + +
+
+ +
+
+ +### 常见用法 + +##### 用于承载版权、隐私政策和使用条款等信息,它们是法律保护所需的。 + +
+
+ +
+
+ +
+ +##### 用于承载网站、产品的联系方式,便于用户在页脚查找联系信息或查找获得客户支持的方式。 + +
+
+ +
+
+ +
+ +##### 用于承载网站导航。 + +
+
+ +
+
+ +
+ +##### 用于承载相关公司/品牌列表,让用户能认知合作或者旗下的品牌/公司,并提供找到他们的方式。 + +
+
+ +
+ +
+ +
+
+ + diff --git a/docs/miniprogram/design/grid.md b/docs/miniprogram/design/grid.md new file mode 100644 index 0000000000..4e019d23b5 --- /dev/null +++ b/docs/miniprogram/design/grid.md @@ -0,0 +1,88 @@ + + +### 何时使用 + +当需要展示多个功能或信息入口,且这些入口没有明显的优先级时使用。 + +### 组件搭配使用 + +##### 可与徽标组合使用,可作为消息提示、或其它相关的数量提示。 + +
+
+ +
+
+ +### 常见用法 + +##### 通常用于金刚区、或底部标签栏等,在页面中较为醒目的位置承载主要的功能入口。 + +
+
+ +
+
+ +
+ +##### 通常承载图片、头像等信息进行展示,并作为查看相应信息的入口。 + +
+
+ +
+ +
+ +
+
+ +
+ +##### 通常用于动作面板,和头像、图标按钮相结合,承载分享、保存到本地等操作。 + +
+
+ +
+
+ + +### 推荐/慎用示例 + +##### 当在金刚区使用宫格承载功能入口时,建议梳理功能的优先级,将金刚区控制在3行以内,一些相对次要的功能可通过左右滑动的方式收纳在第二屏。 + +
+
+ + +
+ +
+ + +
+
+ +
+ +
+
+ + +
+ +
+ + +
+
+ + + +### 相似组件 + +| 组件名 | 何时使用 | +| :----- | :----------------------------------- | +| [单元格](./cell) |用于各个类别行的信息展示。| diff --git a/docs/miniprogram/design/image-viewer.md b/docs/miniprogram/design/image-viewer.md index 98326bd7f1..dd4f1d3a94 100644 --- a/docs/miniprogram/design/image-viewer.md +++ b/docs/miniprogram/design/image-viewer.md @@ -14,13 +14,12 @@
-##### 当使用带删除操作的图片预览组件时,可与[动作面板](./actionsheet)组合使用,对删除操作进行二次确认。 +##### 当使用带删除操作的图片预览组件时,可与[动作面板](./action-sheet)组合使用,对删除操作进行二次确认。
-
### 推荐/慎用示例 @@ -32,8 +31,6 @@ -
- ### 相似组件 diff --git a/docs/miniprogram/design/image.md b/docs/miniprogram/design/image.md index 1c5ee7d669..5292350c08 100644 --- a/docs/miniprogram/design/image.md +++ b/docs/miniprogram/design/image.md @@ -20,7 +20,7 @@
-##### 图片与[下拉刷新](./pulldownrefresh)组合使用,用于图片瀑布流时的内容更新。 +##### 图片与[下拉刷新](./pull-down-refresh)组合使用,用于图片瀑布流时的内容更新。
@@ -29,8 +29,6 @@
-
- ### 推荐/慎用示例 @@ -48,12 +46,10 @@
-
- ### 相似组件 | 组件名 | 何时使用 | | :----- | :----------------------------------- | -| [图片预览](./imageviewer) | 当需要对展示的图片进行快速查看,以及在查看时存在放大、缩小、删除等操作诉求时使用。 | +| [图片预览](./image-viewer) | 当需要对展示的图片进行快速查看,以及在查看时存在放大、缩小、删除等操作诉求时使用。 | diff --git a/docs/miniprogram/design/indexes.md b/docs/miniprogram/design/indexes.md new file mode 100644 index 0000000000..a6cef20142 --- /dev/null +++ b/docs/miniprogram/design/indexes.md @@ -0,0 +1,54 @@ + + +### 何时使用 + +当数据项较多时,为方便用户快速找到目标数据项时使用。 + +### 组件搭配使用 + +##### 索引与[单选框](./radio)、[多选框](./checkbox)组合使用,在选择数据的场景配合索引有利于用户快速找到目标选项。 + +
+
+ +
+
+ +### 推荐/慎用示例 + +##### 索引项需要跟数据项小标题保持一致。 + +
+
+ + +
+ +
+ + +
+
+ +
+ +##### 索引项排序应具备一定的逻辑相关性。 + +
+
+ + +
+ +
+ + +
+
+ + +### 相似组件 + +| 组件名 | 何时使用 | +| :------------------- | :------------------------------------------------------------- | +| [侧边栏](./side-bar) | 当内容项数量较多,需要用户根据品类快速选择到目标内容项时使用。 | diff --git a/docs/miniprogram/design/input.md b/docs/miniprogram/design/input.md new file mode 100644 index 0000000000..27aa917662 --- /dev/null +++ b/docs/miniprogram/design/input.md @@ -0,0 +1,72 @@ + + +### 何时使用 + +需要进行文字输入,且需填写的字数较少时使用。 + +### 组件搭配使用 + +##### 呈现在单元格中,可与按钮组件相结合,点击按钮触发相关功能。 + +
+
+ +
+
+ + +### 常见用法 + +##### 通常使用在表单中进行文字填写,填写状态下可在右侧显示清空输入的按钮,供用户快速清空已输入的内容。 + +
+ +
+ +
+ +##### 当需要进行较复杂的内容填写,如验证码等,可使用特定类型输入框,结合按钮、图形等辅助元素帮助用户完成流程。 + +
+
+ +
+ +
+ +
+
+ +### 推荐/慎用示例 + +##### 标签、占位符文本简明扼要地描述用户需要输入的内容,标签超过10个字时请考虑使用其它展示方式。 + +
+
+ + +
+ +
+ + +
+
+ +
+ +##### 当需要输入较长的复杂内容时,建议使用多行文本框输入。 +
+
+ + +
+
+ + +### 相似组件 + +| 组件名 | 何时使用 | +| :----------------------- | :------------------------------------------- | +| [多行文本框](./textarea) | 需要进行文字输入,且需填写的字数较多时使用。 | +| [搜索框](./search) | 当需要从海量信息中准确提取准确的内容时使用。 | diff --git a/docs/miniprogram/design/link.md b/docs/miniprogram/design/link.md new file mode 100644 index 0000000000..1c5231861a --- /dev/null +++ b/docs/miniprogram/design/link.md @@ -0,0 +1,44 @@ + + +### 何时使用 + +当需要跳转至外链时使用。 + +### 组件搭配使用 + +##### 链接与[消息通知](./message)、[公告栏](./notice-bar)组合使用,在进行消息通知与提示的同时,提供解决方案或详情的跳转入口。 + +
+
+ +
+ +
+ +
+
+ + +### 推荐/慎用示例 + +##### 在同一段文本中如使用多个链接,需要利用纯文本字符等将其区隔开。 + +
+
+ + +
+ +
+ + +
+
+ + + +### 相似组件 + +| 组件名 | 何时使用 | +| :--------------- | :--------------------------------------------------- | +| [按钮](./button) | 当前流程的结束或新流程的开启需要用户点击触发时使用。 | diff --git a/docs/miniprogram/design/loading.md b/docs/miniprogram/design/loading.md new file mode 100644 index 0000000000..a62bd77a06 --- /dev/null +++ b/docs/miniprogram/design/loading.md @@ -0,0 +1,58 @@ + + +### 何时使用 + +当打开新页面或操作完成后,等待加载时使用。 + +### 与页面布局相关 + +##### 当展示整个页面、或模块的加载进度时,通常放置在页面、模块的正中间。 + +
+
+ +
+ +
+ +
+
+ + +### 组件搭配使用 + +##### 在信息流页面中,可结合下拉刷新使用,对未展示出来的最新内容进行加载。 + +
+
+ +
+ +
+ +
+
+ +### 推荐/慎用示例 + +##### 当加载时间较长,尤其是超过10秒的场景中,推荐使用进度条,向用户明确展示当前任务的进展,避免等待时间过长带来焦急的负面体验。 + +
+
+ + +
+ +
+ + +
+
+ + +### 相似组件 + +| 组件名 | 何时使用 | +| :------------------------------ | :--------------------------------------------------------------- | +| [进度条](./progress) | 当有一项系统任务正在进行,需要向用户展示该任务的当前进度时使用。 | +| [下拉刷新](./pull-down-refresh) | 当需要对页面信息进行整体刷新或加载更多同类信息时使用。 | diff --git a/docs/miniprogram/design/message.md b/docs/miniprogram/design/message.md new file mode 100644 index 0000000000..cfcc35ae63 --- /dev/null +++ b/docs/miniprogram/design/message.md @@ -0,0 +1,50 @@ + + +### 何时使用 + +当需要对用户进行较轻量的反馈或提示,可以自动消失或通过点击关闭,通常由用户触发。 + +### 与页面布局相关 + +##### 通知通常出现在页面顶部,叠加在页面的上层,可在一段时间后自动消失、或用户点击关闭。 + +
+
+ +
+ +
+ +
+
+ + +### 推荐/慎用示例 + +##### 当需要在通知栏中展示按钮时,不建议超过1个。若需要使用更多按钮,建议使用其它交互方式。 + +
+
+ + +
+
+ +
+ +##### 消息通知是一种相对轻量、短时的反馈方式,尽量避免在页面中同时堆叠多个消息通知,用户可能会来不及关注它们。 + +
+
+ + +
+
+ + +### 相似组件 + +| 组件名 | 何时使用 | +| :--------------------- | :----------------------------------------------------------------------------------------------- | +| [轻提示](./toast) | 当需要对用户进行轻量反馈或提示,且不需要用户进行操作时使用,轻提示会在一段时间后自动消失。 | +| [公告栏](./notice-bar) | 当需要对用户进行较明显的反馈或提示,需要用户关注时使用,一段时间后不会自动消失,通常是自动触发。 | diff --git a/docs/miniprogram/design/navbar.md b/docs/miniprogram/design/navbar.md new file mode 100644 index 0000000000..2812619ef6 --- /dev/null +++ b/docs/miniprogram/design/navbar.md @@ -0,0 +1,51 @@ + + +### 何时使用 + +需要在页面间跳转、返回,或需承载少量辅助功能时使用。 + +### 组件搭配使用 + +##### 带图标的导航栏与[抽屉](./drawer)、[动作面板](./action-sheet)组合使用,用于唤起一组操作或功能。 + +
+ +
+ +
+ +
+ +
+ + +### 常见用法 + +##### 通常用来承载页面标题和返回操作,点击跳转回到上一个打开的页面。 + +
+ +
+ +
+ +##### 在应用内,通常用来承载搜索、扫码等功能性高频操作。 + +
+
+ +
+ +
+ +
+
+ +
+ +##### 在需要定位的场景,通常结合当前定位进行、所在城市等进行展示并提供切换的能力。 +
+
+ +
+
diff --git a/docs/miniprogram/design/picker.md b/docs/miniprogram/design/picker.md new file mode 100644 index 0000000000..fe98748bc5 --- /dev/null +++ b/docs/miniprogram/design/picker.md @@ -0,0 +1,40 @@ + + +### 何时使用 + +当需要在有限的空间展示大量选项供用户选择,或者一组选项由递进层级构成需要用户逐级选择时使用。 + +### 推荐/慎用示例 + +##### 选择器若为一组有层级关系的选项时,选项层级不宜超过4层,层级过多时应调整数据结构或改用其他交互方式。 + +
+
+ + +
+
+ +
+ +##### 选择器若为一组有层级关系的选项时,各层级选项的归属关系应具备逻辑相关性,数据层级由大到小,避免归属关系混乱。 + +
+
+ + +
+ +
+ + +
+
+ + +### 相似组件 + +| 组件名 | 何时使用 | +| :-------------------------------- | :----------------------------------------------------------------------- | +| [时间选择器](./date-time-picker ) | 在表单中需要输入单个日期或时间时使用。 | +| [级联选择器](./Cascader) | 当一组选项由递进层级构成,且每个层级有大量的选项需要用户逐级选择时使用。 | diff --git a/docs/miniprogram/design/popup.md b/docs/miniprogram/design/popup.md new file mode 100644 index 0000000000..2fd21868f9 --- /dev/null +++ b/docs/miniprogram/design/popup.md @@ -0,0 +1,53 @@ + + +### 常见用法 + +##### 在筛选的场景,若筛选条件外露,通常会使用顶部弹出的弹出层;若为筛选入口,则通常触发使用右侧弹出的弹出层。 + +
+ +
+ +
+ +
+ +
+ +
+ +##### 承载页面中某个任务操作流程,通常会使用底部弹出的弹出层。 + +
+ +
+ +
+ +##### 承载重要提示且可能需要用户做出一些重要决策时,通常会使用中间弹出的弹出层。 + +
+
+ +
+
+ +
+ +##### 承载较为重要的运营活动入口(如拍脸图)时,通常会使用中间弹出的弹出层。 + +
+
+ +
+
+ +
+ +##### 承载网站、应用收折起来的导航菜单时,通常会使用左侧弹出的弹出层。 + +
+
+ +
+
diff --git a/docs/miniprogram/design/progress.md b/docs/miniprogram/design/progress.md new file mode 100644 index 0000000000..8f5428500c --- /dev/null +++ b/docs/miniprogram/design/progress.md @@ -0,0 +1,62 @@ + + +### 何时使用 + +当有一项系统任务正在进行,需要向用户展示该任务的当前进度时使用。 + +### 与页面布局相关 + +##### 当展示页面、模块的加载进度时,通常进度条放置在页面、模块的正中间。 + +
+
+ +
+ +
+ +
+
+ +### 常见用法 + +##### 通常用于任务周期较长的场景中,配有文字或图标显示进度和状态。 + +
+
+ +
+
+ +
+ +##### 当任务时间较短、或难以预估剩余时间时,通常弱化进度的百分比信息,如使用隐藏数值进度条、或微型的环形进度条。 + +
+
+ +
+ +
+ +
+
+ + +### 推荐/慎用示例 + +##### 若任务需要等待的时间很长,可以提供大概的时间估计,让用户更有预期。 + +
+
+ + +
+
+ + +### 相似组件 + +| 组件名 | 何时使用 | +| :---------------- | :----------------------------------------- | +| [加载](./loading) | 当打开新页面或操作完成后,等待加载时使用。 | diff --git a/docs/miniprogram/design/pull-down-refresh.md b/docs/miniprogram/design/pull-down-refresh.md index 07bbdc419f..ded3d1d51c 100644 --- a/docs/miniprogram/design/pull-down-refresh.md +++ b/docs/miniprogram/design/pull-down-refresh.md @@ -11,47 +11,51 @@
- +
- +
-
- +
-
- - ### 常见用法 ##### 在推荐型信息流页面使用下拉刷新,对页面所有信息进行整体更新。
- +
+
+ ##### 在按时间排布型信息流页面使用下拉刷新,对未展示出来的最新内容进行加载。
- +
- +
-
+ +### 相似组件 + +| 组件名 | 何时使用 | +| :----- | :----------------------------------- | +| [加载](./loading) |当打开新页面或操作完成后,等待加载时使用。| + diff --git a/docs/miniprogram/design/radio.md b/docs/miniprogram/design/radio.md index 1abb7dab43..28141fa0d0 100644 --- a/docs/miniprogram/design/radio.md +++ b/docs/miniprogram/design/radio.md @@ -6,7 +6,7 @@ ### 组件搭配使用 -##### 单选框与[索引](./indexes)、[搜索](./search)组合使用,便于用户从大量的选项中,快速地找到目标选项。 +##### 单选框与[索引](./indexes)、[搜索框](./search)组合使用,便于用户从大量的选项中,快速地找到目标选项。
@@ -19,8 +19,6 @@
-
- ### 推荐/慎用示例 @@ -52,8 +50,6 @@ -
- ### 相似组件 diff --git a/docs/miniprogram/design/rate.md b/docs/miniprogram/design/rate.md new file mode 100644 index 0000000000..ffcacaedca --- /dev/null +++ b/docs/miniprogram/design/rate.md @@ -0,0 +1,53 @@ + + +### 何时使用 + +当需要对某行为/事物进行简单的星级评定时使用。 + +### 组件搭配使用 + +##### 通常结合多行文本框、标签使用,常见于评论场景,用户对某事物进行星级评定后,可选择预设的文本标签、或在文本框中撰写内容来进行更详细的评价。 + +
+
+ +
+
+ +### 常见用法 + +##### 在较为严谨的评论场景,通常结合辅助文字,帮助用户更好地理解每个星级的含义,避免个体的打分标准不统一。 + +
+
+ +
+
+ +### 推荐/慎用示例 + +##### 可结合业务场景自定义评分图标,如使用品牌的icon,增强品牌透出,但不建议使用过于复杂的图形作为评分图标。 + +
+
+ + +
+ +
+ + +
+
+ +
+ +##### 在同一个评论场景中,评分机制应保持一致,不建议将半星、整星的评分机制混用。 +
+
+ + +
+
+ + diff --git a/docs/miniprogram/design/result.md b/docs/miniprogram/design/result.md new file mode 100644 index 0000000000..20a43b4678 --- /dev/null +++ b/docs/miniprogram/design/result.md @@ -0,0 +1,54 @@ + + +### 何时使用 + +当需要向用户展示操作后的结果反馈时使用。 + +### 常见用法 + +##### 任务本身在弹窗中进行或仅需要较为轻量的结果反馈时,可使用弹窗承载结果反馈。 + +
+
+ +
+
+ +
+ +##### 当任务结束并给予反馈后,需要推荐其他内容、任务、商品等给用户时,通常使用页面承载结果和推荐。 + +
+
+ +
+
+ +
+ +##### 当任务结果为失败时,通常会告知用户失败原因,甚至提供解决问题的操作。 + +
+
+ +
+
+ +
+ + +##### 当前操作结束后,若还存在一系列用户需关注的流程进度,通常会结合步骤条将流程展示于结果页。 + +
+
+ +
+
+ + + +### 相似组件 + +| 组件名 | 何时使用 | +| :----------------- | :--------------------------- | +| [空状态](./empty ) | 当页面或模块数据为空时使用。 | diff --git a/docs/miniprogram/design/search.md b/docs/miniprogram/design/search.md new file mode 100644 index 0000000000..d3e60af01a --- /dev/null +++ b/docs/miniprogram/design/search.md @@ -0,0 +1,51 @@ + + +### 何时使用 + +当需要从海量信息中准确提取准确的内容时使用。 + +### 与页面布局相关 + +##### 位于页面或内容模块的最上方,通过搜索框、搜索icon等方式承载和触发功能。 + +
+
+ +
+ +
+ +
+
+ + +### 常见用法 + +##### 在可搜索内容类型较为单一的场景下,可直接在原页面激活搜索态进行搜索,并通过高亮命中字符的方式展示搜索结果,页面内容组织结构保持不变。 + +
+ +
+ +
+ +##### 在可搜索内容类型较丰富的场景下,通过模态承载搜索态,并在新页面中按分类呈现搜索结果。 + +
+ +
+ +
+ +##### 在用户触发搜索后,对用户即将搜索的内容进行预判和推荐,并需要满足营销的诉求。 + +
+ +
+ + +### 相似组件 + +| 组件名 | 何时使用 | +| :---------------- | :------------------------------------------- | +| [输入框](./Input) | 需要进行文字输入,且需填写的字数较少时使用。 | diff --git a/docs/miniprogram/design/side-bar.md b/docs/miniprogram/design/side-bar.md new file mode 100644 index 0000000000..bf1bbcaf7f --- /dev/null +++ b/docs/miniprogram/design/side-bar.md @@ -0,0 +1,50 @@ + + +### 何时使用 + +当内容项数量较多,需要用户根据品类快速选择到目标内容项时使用。 + +### 组件搭配使用 + +##### 侧边栏与徽标组合使用,用于展示品类的状态信息或营销情况。 + +
+
+ +
+
+ + +### 正确/慎用示例 + +##### 建议文本简明扼要,若文本过长建议进行换行处理,尽量避免将文本进行截断。 + +
+
+ + +
+ +
+ + +
+
+ +
+ +##### 不建议仅用图标、emoji作为品类选项,避免表意不清晰。 +
+
+ + +
+
+ + +### 相似组件 + +| 组件名 | 何时使用 | +| :------------------ | :---------------------------------------------------------------------------- | +| [标签栏](./tab-bar) | 目标模块/视图需要从应用的任何地方直接进行访问时使用 | +| [选项卡](./tabs) | 当内容/数据需要一定的分类纬度进行区分,便于用户快速作出选择并切换时可以使用。 | diff --git a/docs/miniprogram/design/slider.md b/docs/miniprogram/design/slider.md index 02820dd5ae..ecea810eb1 100644 --- a/docs/miniprogram/design/slider.md +++ b/docs/miniprogram/design/slider.md @@ -15,8 +15,6 @@ -
- ### 常见用法 ##### 用于可量化的数值选择,需要精确到具体某个数值/区间。 @@ -27,6 +25,8 @@ +
+ ##### 用于难以量化的对立数据,以此表示程度。
@@ -35,8 +35,6 @@
-
- ### 推荐/慎用示例 @@ -54,7 +52,8 @@ -
- - +### 相似组件 +| 组件名 | 何时使用 | +| :----- | :----------------------------------- | +| [步进器](./stepper) |需要进行数量选择时使用。| diff --git a/docs/miniprogram/design/steps.md b/docs/miniprogram/design/steps.md new file mode 100644 index 0000000000..014a2a73cb --- /dev/null +++ b/docs/miniprogram/design/steps.md @@ -0,0 +1,74 @@ + + +### 何时使用 + +当需要展示较为复杂的线性流程时使用。 + +### 与页面布局相关 + +##### 位于页面或模块的顶部,统领下方内容的切换,通常设置吸顶,方便用户快速切换。 +
+
+ +
+
+ + +### 推荐/慎用示例 + +##### 步骤不宜过多,过长的步骤建议优化流程或使用其它交互方式。 + +
+
+ + +
+ +
+ + +
+
+ +
+ +##### 每个小步骤建议尽量简洁清晰,以降低用户的理解和操作成本;若小步骤本身已经具有较高的复杂度,建议使用其它方式呈现。 + +
+
+ + +
+ +
+ + +
+
+ +
+ +##### 建议用简明的语言对步骤进行描述,描述文案不宜过长。 + +
+ + +
+ +
+ +##### 尽量避免嵌套步骤条。 +
+
+ + +
+
+ + +### 相似组件 + +| 组件名 | 何时使用 | +| :------------------- | :---------------------------------------------------------------------------- | +| [进度条](./progress) | 当有一项系统任务正在进行,需要向用户展示该任务的当前进度时使用。 | +| [选项卡](./tabs) | 当内容/数据需要一定的分类纬度进行区分,便于用户快速作出选择并切换时可以使用。 | diff --git a/docs/miniprogram/design/swipe-cell.md b/docs/miniprogram/design/swipe-cell.md new file mode 100644 index 0000000000..41432cc620 --- /dev/null +++ b/docs/miniprogram/design/swipe-cell.md @@ -0,0 +1,75 @@ + + +### 何时使用 + +需要针对列表项目进行某项低频的辅助操作时使用。 + +### 组件搭配使用 + +##### 与[单元格](./cell)、[按钮](./button)组合使用,单元格作为承载滑动操作的容器,左右滑动后展示操作项的按钮。 + +
+
+ +
+ +
+ +
+
+ + +### 常见用法 + +##### 通常使用在对话列表、收藏列表、购物车等场景中,承载删除、收藏等辅助操作。 + +
+
+ +
+ +
+ +
+
+ +
+ +##### 通常左滑后展示删除按钮,若删除操作重要且无法撤回,可在滑动操作中对删除进行二次确认。 + +
+ +
+ + +### 推荐/慎用示例 + +##### 左右滑动操作通常承载低频的辅助功能,不建议承载高频或过于复杂的功能。 + +
+ + +
+ +
+ +##### 按钮的顺序、颜色使用需要符合用户预期。 +
+ + +
+ +
+ +##### 左滑的操作数不建议超过4个,右滑不建议超过1个,操作过多时应改用其它交互方式。 +
+ + +
+ + +### 相似组件 + +| 组件名 | 何时使用 | +| :--------------- | :--------------------------------------------------- | +| [按钮](./button) | 当前流程的结束或新流程的开启需要用户点击触发时使用。 | diff --git a/docs/miniprogram/design/swiper.md b/docs/miniprogram/design/swiper.md new file mode 100644 index 0000000000..17a00ac8f4 --- /dev/null +++ b/docs/miniprogram/design/swiper.md @@ -0,0 +1,40 @@ + + +### 何时使用 + +当需要承载一组banner或一组图片时使用。 + +### 常见用法 + +##### 用于放置营销活动或承载平台广告等具有时效性的内容入口。 + +
+
+ +
+ +
+ +
+
+ +
+ + ##### 在图文详情页场景,用于当图片数量大于1时的折叠展示。 +
+
+ +
+
+ + +### 推荐/慎用示例 + +##### 索引项需要跟数据项小标题保持一致。 + +
+
+ + +
+
diff --git a/docs/miniprogram/design/switch.md b/docs/miniprogram/design/switch.md new file mode 100644 index 0000000000..466c5ea5ed --- /dev/null +++ b/docs/miniprogram/design/switch.md @@ -0,0 +1,31 @@ + + +### 何时使用 + +当需要切换某个功能的开启、关闭时使用。 + +### 推荐/慎用示例 + +##### 开关状态的颜色使用建议符合颜色语义,尽量避免让开启、关闭状态的颜色产生混淆。 + +
+
+ + +
+ +
+ + +
+
+ +
+ +##### 若需结合文本描述开关状态,建议文案和开关状态保持一致,确保表意清晰。 +
+
+ + +
+
diff --git a/docs/miniprogram/design/tab-bar.md b/docs/miniprogram/design/tab-bar.md index d1e23aacab..51bf0b0a56 100644 --- a/docs/miniprogram/design/tab-bar.md +++ b/docs/miniprogram/design/tab-bar.md @@ -6,7 +6,7 @@ ### 组件搭配使用 -##### 标签栏与[徽标](./adge)组合使用,用于告知用户该模块/视图的状态变化。 +##### 标签栏与[徽标](./badge)组合使用,用于告知用户该模块/视图的状态变化。
@@ -18,9 +18,6 @@
-
- - ### 推荐/慎用示例 ##### 建议标签栏数量在2-5个之间;若多与5个,建议重新审视应用的信息架构,对信息架构进行优化。 @@ -64,18 +61,17 @@ -
- - -
- -
+
+ + +
### 相似组件 | 组件名 | 何时使用 | | :----- | :----------------------------------- | -| [选项卡](./tabs) | 当内容/数据需要一定的分类纬度进行区分,便于用户快速作出选择并切换时可以使用。 | +| [选项卡](./tabs) |当内容/数据需要一定的分类纬度进行区分,便于用户快速作出选择并切换时可以使用。| +| [侧边栏](./side-bar) |当内容项数量较多,需要用户根据品类快速选择到目标内容项时使用。| diff --git a/docs/miniprogram/design/tabs.md b/docs/miniprogram/design/tabs.md index 8ce0dfa141..cecdd26d81 100644 --- a/docs/miniprogram/design/tabs.md +++ b/docs/miniprogram/design/tabs.md @@ -17,7 +17,6 @@ -
### 组件搭配使用 @@ -30,9 +29,6 @@ -
- - ### 常见用法 ##### 较常使用于以信息瀑布流为场景的应用,使用选项卡承载类目或状态,便于用户区分和切换。 @@ -53,7 +49,6 @@ -
### 推荐/慎用示例 @@ -101,12 +96,11 @@ -
- ### 相似组件 | 组件名 | 何时使用 | | :----- | :----------------------------------- | -| [底部标签栏](./tabbar) | 目标模块/视图需要从应用的任何地方直接进行访问时使用 。 | +| [标签栏](./tab-bar) | 当目标模块/视图需要从应用的任何地方直接进行访问时使用。| +| [侧边栏](./side-bar) |当内容项数量较多,需要用户根据品类快速选择到目标内容项时使用。| diff --git a/docs/miniprogram/design/tag.md b/docs/miniprogram/design/tag.md new file mode 100644 index 0000000000..316091d4c8 --- /dev/null +++ b/docs/miniprogram/design/tag.md @@ -0,0 +1,86 @@ + + +### 何时使用 + +当需要展示内容本身的属性、状态、类别、营销情况时作为纯展示使用;或者当大量的内容数据需要根据类型进行选择筛选时使用。 + +### 组件搭配使用 + +##### 与[图片](./image)组合使用,图片作为内容、商品等对象的详情入口时,可通过添加标签来展示该对象的属性、状态、类别、营销情况等。 + +
+
+ +
+ +
+ +
+
+ +
+ +##### 与[下拉菜单](./dropdown-menu)组合使用,作为菜单面板下拉后的选项,供用户进行选择。 + +
+
+ +
+
+ +### 常见用法 + +##### 常用于展示对象本身的属性、状态、类别、营销情况等信息,且仅作为展示使用。 + +
+
+ +
+ +
+ +
+
+ +
+ +##### 常用于内容数据基于某个维度或某些维度的检索、筛选。 + +
+
+ +
+ +
+ +
+
+ + +### 推荐/慎用示例 + +##### 标签颜色和字体颜色在明度、色相上要避免难以区分,保证标签的可读性。 + +
+
+ + +
+
+ +
+ +##### 标签文案需要经过概括和提炼,不建议过长。 + +
+ + +
+ + + +### 相似组件 + +| 组件名 | 何时使用 | +| :----- | :----------------------------------- | +| [徽标](./badge) | 当需要展示特定对象的状态变化或承载运营性质提示时使用。| diff --git a/docs/miniprogram/design/textarea.md b/docs/miniprogram/design/textarea.md new file mode 100644 index 0000000000..ce907af8cf --- /dev/null +++ b/docs/miniprogram/design/textarea.md @@ -0,0 +1,59 @@ + + +### 何时使用 + +需要进行文字输入,且需填写的字数较多时使用。 + +### 常见用法 + +##### 常见于表单、内容发布的场景中,用于输入较长的文本内容。 + +
+
+ +
+ +
+ +
+
+ + +### 推荐/慎用示例 + +##### 尽量避免输入过于复杂的文本内容,考虑将内容拆分,让用户分步输入。 + +
+
+ + +
+ +
+ + +
+
+ +
+ +##### 建议根据待输入的内容决定多行文本框的高度。 +
+
+ + +
+ +
+ + +
+
+ + +### 相似组件 + +| 组件名 | 何时使用 | +| :---------------- | :------------------------------------------- | +| [输入框](./input) | 需要进行文字输入,且需填写的字数较少时使用。 | + diff --git a/docs/miniprogram/design/toast.md b/docs/miniprogram/design/toast.md new file mode 100644 index 0000000000..43af7fa315 --- /dev/null +++ b/docs/miniprogram/design/toast.md @@ -0,0 +1,51 @@ + + +### 何时使用 + +当需要对用户进行轻量反馈或提示,且不需要用户进行操作时使用,轻提示会在一段时间后自动消失。 + +### 与页面布局相关 + +##### 轻提示通常放置在页面正中间,一段时间后自动消失。 + +
+
+ +
+
+ + +### 组件搭配使用 + +##### 轻提示经常和加载搭配使用,在页面内进行某项操作后,用作加载反馈。 + +
+
+ +
+
+ + +### 推荐/慎用示例 + +##### 轻提示的文案内容通常不超过30个字,确保用户有充足的时间进行阅读,若需要提示较长的文本内容,建议使用其它交互方式。 + +
+
+ + +
+ +
+ + +
+
+ + +### 相似组件 + +| 组件名 | 何时使用 | +| :--------------------- | :----------------------------------------------------------------------------------------------------- | +| [消息通知](./message) | 当需要对用户进行较轻量的反馈或提示,且不需要、或只需要少量用户交互时使用,可以自动消失或通过点击关闭。 | +| [公告栏](./notice-bar) | 当需要对用户进行较明显的反馈或提示,需要用户关注时使用,一段时间后不会自动消失。 | diff --git a/docs/miniprogram/design/tree-select.md b/docs/miniprogram/design/tree-select.md new file mode 100644 index 0000000000..b6229eaa51 --- /dev/null +++ b/docs/miniprogram/design/tree-select.md @@ -0,0 +1,26 @@ + + +### 何时使用 + +当一组选项由2-3个层级构成,且每个层级有大量的选项需要用户逐级选择时使用。 + + +### 推荐/慎用示例 + +##### 级联选择器的层级不宜超过3层,层级过多时应调整数据结构或改用级联选择器。 + +
+
+ + +
+
+ + + +### 相似组件 + +| 组件名 | 何时使用 | +| :----- | :----------------------------------- | +| [选择器](./picker) | 当需要在有限的空间展示大量选项供用户选择时,或一组选项由递进层级构成,需要用户逐级选择使用时。| +| [级联选择器](./cascader) |当一组选项由递进层级构成,且有每个层级有大量的选项需要用户逐级选择使用时。| diff --git a/docs/miniprogram/design/upload.md b/docs/miniprogram/design/upload.md new file mode 100644 index 0000000000..5ce2473d2b --- /dev/null +++ b/docs/miniprogram/design/upload.md @@ -0,0 +1,43 @@ + + +### 何时使用 + +当需要进行图片上传时使用。 + +### 组件搭配使用 + +##### 通常用于图片上传,点击上传按钮可唤起[动作面板](./action-sheet),供用户选择不同渠道进行新的上传。 + +
+ +
+ +
+ +##### 点击已经上传的图片可跳转[图片预览](./image-viewer),让用户对已上传的图片进行快速查看。 + +
+ +
+ + + +### 推荐/慎用示例 + +##### 若上传的文件有尺寸、格式、数量限制,推荐在文案中进行明确标识。 + +
+ + +
+ +
+ +##### 上传特定证件图片,特别是涉及到证件正反面时,推荐结合图示进行上传指引,更加直观。 + +
+
+ + +
+
diff --git a/docs/mobile/api/image.md b/docs/mobile/api/image.md index a26b3bc5bf..110eb7a187 100644 --- a/docs/mobile/api/image.md +++ b/docs/mobile/api/image.md @@ -6,46 +6,30 @@ isComponent: true toc: false --- -### 基础用法 +### 基础类型 -基础用法和原生 img 标签一样,可以设置 `src`、`alt`、`class` 等原生属性 +图片样式可为圆形、圆角方形、方形 -{{ base }} +#### 裁切样式 -### 图片形状 +{{ crop }} -通过 `shape` 属性可以设置图片形状,可选项有 `circle` | `round` | `square`,分别代表圆形、圆角方形、方形 +#### 圆角样式 -当图片长宽不相等时,无法使用 `circle` 展示一个完整圆形 +{{ rounded }} -{{ shape }} +### 状态 -#### 填充模式 +#### 加载中提示 -通过 `fit` 属性可以设置图片填充模式,可选项有 `contain` | `cover` | `fill` | `none` | `scale-down`,效果与原生的 `object-fit` 属性一致 +{{ loading-tip }} -{{ fit }} +#### 加载失败提醒 -#### 图片位置 +{{ loading-error }} -通过 `position` 属性可以设置图片位置,效果与原生的 `object-position` 属性一致 +### 规格 -{{ position }} -#### 图片懒加载 +{{ size }} -通过lazy属性来开启图片懒加载 - -{{ lazy }} - -### 加载中提示 - -Image 组件提供了默认的加载中提示,也支持通过 `loading` 插槽自定义提示内容 - -{{ loading }} - -### 加载失败提示 - -Image 组件提供了默认的加载失败提示,也支持通过 `error` 插槽自定义提示内容 - -{{ error }} diff --git a/docs/mobile/api/message.md b/docs/mobile/api/message.md index e9a2001215..7c3f0f2b60 100644 --- a/docs/mobile/api/message.md +++ b/docs/mobile/api/message.md @@ -8,7 +8,7 @@ toc: false ### 基础消息通知 -弹窗内容为纯文本、标题和副标题、带操作按钮。 +用于轻量级反馈或提示,不会打断用户操作。 {{ base }} diff --git a/docs/mobile/api_v2/avatar.md b/docs/mobile/api_v2/avatar.md index 53f17a3775..b577b6d1c5 100644 --- a/docs/mobile/api_v2/avatar.md +++ b/docs/mobile/api_v2/avatar.md @@ -8,21 +8,36 @@ toc: false ### 头像类型 -头像样式可为默认头像、微信头像圆形、方形、自定义文字 +图片头像 -{{ shape }} +{{ image-avatar }} -### 纯展示 从上往下 +字符头像 + +{{ character-avatar }} + +图标头像 + +{{ icon-avatar }} + +徽标头像 + +{{ badge-avatar }} + + +### 组合头像 + +纯展示 {{ exhibition }} -### 带操作 从下往上 +带操作 {{ action }} -### 头像大小尺寸 +### 头像尺寸 -头像默认支持三种大小:`small`、`medium`、`large`,用户可自定义设置大小 +头像 large/medium/small 尺寸 {{ size }} diff --git a/docs/mobile/api_v2/back-top.md b/docs/mobile/api_v2/back-top.md index b22cfb6ced..7862ec1b0b 100644 --- a/docs/mobile/api_v2/back-top.md +++ b/docs/mobile/api_v2/back-top.md @@ -16,7 +16,7 @@ toc: false 通过 `icon` 属性可以自定义按钮 icon -{{ round }} +{{ base }} ### 半圆型返回顶部 diff --git a/docs/mobile/api_v2/badge.md b/docs/mobile/api_v2/badge.md index 22f1f7b0c5..e9c86d6a61 100644 --- a/docs/mobile/api_v2/badge.md +++ b/docs/mobile/api_v2/badge.md @@ -6,14 +6,14 @@ isComponent: true toc: false --- -### 普通徽标 +### 组件类型 {{ base }} -### 按钮徽标 +### 组件样式 -{{ button }} +{{ theme }} -### 单行徽标 +### 组件尺寸 -{{ cell }} \ No newline at end of file +{{ size }} \ No newline at end of file diff --git a/docs/mobile/api_v2/button.md b/docs/mobile/api_v2/button.md index f2d5726530..aee607069b 100644 --- a/docs/mobile/api_v2/button.md +++ b/docs/mobile/api_v2/button.md @@ -6,7 +6,7 @@ isComponent: true toc: false --- -### 类型 +### 组件类型 #### 基础按钮 @@ -24,14 +24,43 @@ toc: false {{ base }} -### 状态 +#### 图标按钮 + +图标按钮由图标+文字或图标构成。通过图标可增强识别性,以便直观理解。 + +{{ icon }} + +#### 幽灵按钮 + +幽灵按钮将按钮的内容反色,背景变为透明,一般是底色透明。常用于有色背景上,例如 banner 图等。 + +{{ ghost }} + +#### 组合按钮 + +{{ group }} + +#### 通栏按钮 + +通栏按钮在宽度上充满其所在的父容器(无 padding 和 margin 值)。该按钮常见于移动端和一些表单场景中。 + +{{ block }} + +### 组件状态 #### 按钮禁用态 {{ status }} -### 规格 - +### 组件样式 #### 按钮尺寸 -{{ size }} \ No newline at end of file +{{ size }} + +#### 按钮形状 + +{{ shape }} + +#### 按钮主题 + +{{ theme }} \ No newline at end of file diff --git a/docs/mobile/api_v2/cascader.md b/docs/mobile/api_v2/cascader.md index 7abdbf6754..911e4d4e90 100644 --- a/docs/mobile/api_v2/cascader.md +++ b/docs/mobile/api_v2/cascader.md @@ -6,14 +6,26 @@ isComponent: true toc: false --- -### 基础 +## 代码演示 -#### 基本用法 +### 基础用法 {{ base }} -### 状态 +### 选项卡风格 -#### 禁用可选项 +{{ theme-tab }} -{{ status }} +### 进阶 + +#### 带初始值 + +{{ with-value }} + +#### 自定义 keys + +{{ keys }} + +#### 使用次级标题 + +{{ with-title }} diff --git a/docs/mobile/api_v2/cell.md b/docs/mobile/api_v2/cell.md index a772a80e87..2808f61074 100644 --- a/docs/mobile/api_v2/cell.md +++ b/docs/mobile/api_v2/cell.md @@ -6,22 +6,18 @@ isComponent: true toc: false --- -### 单行单元格 +### 组件类型 + +#### 单行单元格 {{ single }} -### 多行单元格 +#### 多行单元格 {{ multiple }} -### 组合单元格 - -{{ group }} - -### 显示组边框 - -{{ border }} +### 样式 -### 单元格点击时触发 +#### 卡片单元格 -{{ click }} +{{ group }} diff --git a/docs/mobile/api_v2/checkbox.md b/docs/mobile/api_v2/checkbox.md index e3c5df83b9..f653663f20 100644 --- a/docs/mobile/api_v2/checkbox.md +++ b/docs/mobile/api_v2/checkbox.md @@ -1,35 +1,47 @@ --- -title: Checkbox 复选框 +title: Checkbox 多选框 description: 用于预设的一组选项中执行多项选择,并呈现选择结果。 spline: base isComponent: true toc: false --- -### 基础多选框 +### 组件类型 + +纵向多选框 {{ base }} -### 右侧多选框 +横向多选框 -{{ right }} +{{ horizontal }} + +带全选多选框 + +{{ all }} -### 带全选多选框 +### 组件状态 -{{ group }} +多选框状态 -### 限制最多可选数量 +{{ status }} -{{ max }} +### 组件样式 -### 状态 +勾选样式 + +{{ type }} + +勾选显示位置 + +{{ right }} -{{ disable }} +非通栏多选样式 -### 特殊类型 +{{ card }} -{{ icon }} +### 组件规格 -### 规格 +多选框尺寸规格 -{{ size }} +{{ special }} \ No newline at end of file diff --git a/docs/mobile/api_v2/count-down.md b/docs/mobile/api_v2/count-down.md index 11dce7fd48..6efccdd9a0 100644 --- a/docs/mobile/api_v2/count-down.md +++ b/docs/mobile/api_v2/count-down.md @@ -6,10 +6,12 @@ isComponent: true toc: false --- -### 类型 +## 代码演示 + +### 基础倒计时 {{ base }} -### 规格 +### 调整尺寸 -{{ specs }} +{{ size }} diff --git a/docs/mobile/api_v2/dialog.md b/docs/mobile/api_v2/dialog.md index 4d090165a8..81891ffc5b 100644 --- a/docs/mobile/api_v2/dialog.md +++ b/docs/mobile/api_v2/dialog.md @@ -6,20 +6,44 @@ isComponent: true toc: false --- -### 反馈类对话框 +## 代码演示 + +按钮的样式,默认使用 `variant = text`,如果任意按钮改变了 `variant`,那么全部按钮都改变成这个。 + +### 组件类型 + +#### 反馈类对话框 用于用户进行了一个操作,需传达重要信息,告知用户当前状况的情况。 {{ feedback }} -### 确认类对话框 +#### 确认类对话框 用于用户进行了一个操作,后果比较严重,需要用户二次确认的情况。 例如 退出、删除、清空等操作 {{ confirm }} -### 输入对话框 +#### 输入对话框 用于用户进行了一个操作,需输入下一步操作的必要信息。 例如 输入密码 {{ input }} + +#### 带图片对话框 + +对话框中可以插入图片元素,并且自定义位置。 + +{{ image-dialog }} + +### 组件状态 + +文字按钮、水平基础按钮、垂直基础按钮、多按钮、附带关闭按钮 + +{{ multi-state }} + +### 组件用法 + +命令行调用 + +{{ plugin }} \ No newline at end of file diff --git a/docs/mobile/api_v2/divider.md b/docs/mobile/api_v2/divider.md index 56b396b822..000171b39e 100644 --- a/docs/mobile/api_v2/divider.md +++ b/docs/mobile/api_v2/divider.md @@ -8,16 +8,10 @@ toc: false ### 基础分割符 -基础分割线是没有文字的独立线条,又分为水平分割线和垂直分割线。水平分割线常用来对不同元素内容进行分割,垂直分割线常用来做行内分割。 +分割符主要是由直线和文字组成,通过`slot`传入分割线文案或者其他自定义内容,通过`layout`控制分隔符是垂直还是横向 {{ base }} -### 文字 + 直线 +### 虚线样式 -{{ align }} - -### 纯文字 + 分割 - -带文字的分割线是在分割线中嵌入文字,在需要对分割内容进行解释说明时使用 - -{{ vertical }} +{{ theme }} diff --git a/docs/mobile/api_v2/empty.md b/docs/mobile/api_v2/empty.md new file mode 100644 index 0000000000..6a8b4c3f6a --- /dev/null +++ b/docs/mobile/api_v2/empty.md @@ -0,0 +1,23 @@ +--- +title: Empty 空状态 +description: 用于空状态时的占位提示。 +spline: data +isComponent: true +toc: false +--- + +## 代码演示 + +### 类型 + +图标空状态 + +{{ base }} + +自定义图片空状态 + +{{ imageEmpty }} + +带操作空状态 + +{{ buttonEmpty }} diff --git a/docs/mobile/api_v2/fab.md b/docs/mobile/api_v2/fab.md index d1d726f998..f4b61ad2cf 100644 --- a/docs/mobile/api_v2/fab.md +++ b/docs/mobile/api_v2/fab.md @@ -6,14 +6,14 @@ isComponent: true toc: false --- -### 基础使用 +### 纯图标悬浮按钮 -纯图标悬浮按钮,使用场景:当功能使用图标即可表意清楚时,可使用纯图标悬浮按钮,例如:添加、发布 +使用场景:当功能使用图标即可表意清楚时,可使用纯图标悬浮按钮,例如:添加、发布 -{{ display }} +{{ base }} -### 进阶使用 +### 图标加文字悬浮按钮 -图标加文字悬浮按钮,使用场景:当功能使用图标无法表意清楚需要文字辅助描述时,可使用图标加文字悬浮按钮 +使用场景:当功能使用图标无法表意清楚需要文字辅助描述时,可使用图标加文字悬浮按钮 -{{ text }} +{{ advance }} diff --git a/docs/mobile/api_v2/footer.md b/docs/mobile/api_v2/footer.md new file mode 100644 index 0000000000..efa3267114 --- /dev/null +++ b/docs/mobile/api_v2/footer.md @@ -0,0 +1,19 @@ +--- +title: Footer 页脚 +description: 用于基础列表展示,可附带文字、品牌 logo、操作,常用商详、个人中心、设置等页面。 +spline: data +isComponent: true +toc: false +--- + +### 基础页脚 + +{{ base }} + +### 基础加链接页脚 + +{{ link }} + +### 品牌页脚 + +{{ logo }} \ No newline at end of file diff --git a/docs/mobile/api_v2/form.md b/docs/mobile/api_v2/form.md new file mode 100644 index 0000000000..f99d547350 --- /dev/null +++ b/docs/mobile/api_v2/form.md @@ -0,0 +1,15 @@ +--- +title: Form 表单 +description: 按钮用于开启一个闭环的操作任务,如“删除”对象、“购买”商品等。 +spline: base +isComponent: true +toc: false +--- + +### 01 组件类型 + +基础表单 + +{{ horizontal }} + +{{ vertical }} diff --git a/docs/mobile/api_v2/grid.md b/docs/mobile/api_v2/grid.md index dee21473c6..cc49995906 100644 --- a/docs/mobile/api_v2/grid.md +++ b/docs/mobile/api_v2/grid.md @@ -10,10 +10,26 @@ toc: false {{ base }} -### 带说明宫格 +### 带描述宫格 {{ desc }} +### 带边框宫格 + +{{ bordered }} + ### 带徽标宫格 -{{ badge }} \ No newline at end of file +{{ badge }} + +### 可滑动宫格 + +{{ scroll }} + +### 可传图标宫格 + +{{ icon }} + +### 卡片宫格 + +{{ card }} \ No newline at end of file diff --git a/docs/mobile/api_v2/image.md b/docs/mobile/api_v2/image.md index a26b3bc5bf..1f5a94bab9 100644 --- a/docs/mobile/api_v2/image.md +++ b/docs/mobile/api_v2/image.md @@ -20,32 +20,6 @@ toc: false {{ shape }} -#### 填充模式 +### 组件状态 -通过 `fit` 属性可以设置图片填充模式,可选项有 `contain` | `cover` | `fill` | `none` | `scale-down`,效果与原生的 `object-fit` 属性一致 - -{{ fit }} - -#### 图片位置 - -通过 `position` 属性可以设置图片位置,效果与原生的 `object-position` 属性一致 - -{{ position }} - -#### 图片懒加载 - -通过lazy属性来开启图片懒加载 - -{{ lazy }} - -### 加载中提示 - -Image 组件提供了默认的加载中提示,也支持通过 `loading` 插槽自定义提示内容 - -{{ loading }} - -### 加载失败提示 - -Image 组件提供了默认的加载失败提示,也支持通过 `error` 插槽自定义提示内容 - -{{ error }} +{{ status }} diff --git a/docs/mobile/api_v2/input.md b/docs/mobile/api_v2/input.md index 9f56734b65..9d86e993ed 100644 --- a/docs/mobile/api_v2/input.md +++ b/docs/mobile/api_v2/input.md @@ -6,30 +6,58 @@ isComponent: true toc: false --- -### 类型 +## 代码演示 -{{ type }} +### 01 组件类型 -### 状态 +基础输入框 -输入框状态可分为:正常、禁用、异常(带提示)、带额外内容提示、带状态图标提示。 +{{ base }} -{{ status }} +带字数限制输入框 + +{{ maxlength }} + +带操作输入框 + +{{ suffix }} -### 特殊类型 +带图标输入框 -使用场景:较复杂场景的文字填写,主要运用于密码输入、手机验证码输入、价格数量重量输入等场景 +{{ prefix }} + +特定类型输入框 {{ special }} -### 规格 +### 02 组件状态 + +输入框状态 + +{{ status }} + +信息超长状态 + +{{ label }} -{{ size }} +### 03 组件样式 -### 内容位置 +内容位置 {{ align }} -### 字数限制 +竖排样式 + +{{ layout }} + +非通栏样式 + +{{ banner }} + +标签外置样式 + +{{ bordered }} + +自定义样式文本框 -{{ limit }} +{{ custom }} \ No newline at end of file diff --git a/docs/mobile/api_v2/link.md b/docs/mobile/api_v2/link.md new file mode 100644 index 0000000000..6a9fbbc2f1 --- /dev/null +++ b/docs/mobile/api_v2/link.md @@ -0,0 +1,15 @@ +--- +title: Link 标签 +description: 当功能使用图标即可表意清楚时,可使用纯图标悬浮按钮,例如:添加、发布。 +spline: base +isComponent: true +toc: false +--- + +### 01 组件类型 + +{{ base }} + +### 02 组件状态 + +{{ status }} diff --git a/docs/mobile/api_v2/loading.md b/docs/mobile/api_v2/loading.md index e0402657d8..2135cb1ba8 100644 --- a/docs/mobile/api_v2/loading.md +++ b/docs/mobile/api_v2/loading.md @@ -6,17 +6,17 @@ isComponent: true toc: false --- -### 类型 +### 组件类型 -#### 纯icon +#### 纯图标 {{ base }} -#### icon加文字横向 +#### 图标加文字横向 {{ horz }} -#### icon加文字竖向 +#### 图标加文字竖向 {{ vert }} @@ -24,20 +24,10 @@ toc: false {{ pure-text }} -#### 页面进度条加载 - -{{ bar }} - -#### 延迟加载 - -{{ delay }} +### 组件尺寸 +{{ size }} ### 加载速度 {{ speed }} -### 规格 - -{{ size }} - - diff --git a/docs/mobile/api_v2/message.md b/docs/mobile/api_v2/message.md index e9a2001215..7c3f0f2b60 100644 --- a/docs/mobile/api_v2/message.md +++ b/docs/mobile/api_v2/message.md @@ -8,7 +8,7 @@ toc: false ### 基础消息通知 -弹窗内容为纯文本、标题和副标题、带操作按钮。 +用于轻量级反馈或提示,不会打断用户操作。 {{ base }} diff --git a/docs/mobile/api_v2/popup.md b/docs/mobile/api_v2/popup.md index 23d31c83e7..0b046ed755 100644 --- a/docs/mobile/api_v2/popup.md +++ b/docs/mobile/api_v2/popup.md @@ -6,36 +6,18 @@ isComponent: true toc: false --- -### 中部弹出 +### 基础类型 -使用场景:常用于轻提示场景 +#### 基础弹出层 -{{ placement-center }} +{{ base }} -### 底部弹出 +### 组件示例 -使用场景:常用于较重要的操作反馈提示场景或不打断主任务的临时操作 +#### 带标题和操作 -{{ placement-bottom }} +{{ with-title }} -### 顶部弹出 +#### 带自定义关闭按钮 -使用场景:常用于及时反馈 - -{{ placement-top }} - -### 左侧弹出 - -使用场景:常用于页面导航场景 - -{{ placement-left }} - -### 右侧弹出 - -使用场景:常用于页面导航场景 - -{{ placement-right }} - -### 自定义动画 - -{{ custom-animation }} +{{ custom-close }} \ No newline at end of file diff --git a/docs/mobile/api_v2/radio.md b/docs/mobile/api_v2/radio.md index 643e9f40be..8e2fc1e4db 100644 --- a/docs/mobile/api_v2/radio.md +++ b/docs/mobile/api_v2/radio.md @@ -6,12 +6,30 @@ isComponent: true toc: false --- -### 基础单选框 - -使用场景:基本文本框 +### 纵向单选框 {{ base }} -### 单选项组 +### 横向单选框 + +{{ horizontal }} + +### 单选框状态 + +{{ status }} + +### 勾选样式 + +{{ icon }} + +### 勾选显示位置 + +{{ placement }} + +### 非通栏单选框 + +{{ card }} + +### 特殊样式 -{{ group }} +{{ custom }} \ No newline at end of file diff --git a/docs/mobile/api_v2/rate.md b/docs/mobile/api_v2/rate.md index 99cd2481e0..e292acab67 100644 --- a/docs/mobile/api_v2/rate.md +++ b/docs/mobile/api_v2/rate.md @@ -6,34 +6,40 @@ isComponent: true toc: false --- -### 实心评分 +### 组件类型 -{{ filled }} +实心评分 -### 空心评分 +{{ base }} -{{ outline }} +自定义评分 -### 自定义数量评分 +{{ custom }} + +自定义评分数量 {{ count }} -### 半星评分 +带描述评分 + +{{ show-text }} -{{ allow-half }} +### 组件状态 -### 带描述评分 +{{ action }} -{{ text }} +### 组件样式 -### 禁用评分 +评分大小 -{{ disabled }} +{{ size }} -### 设置评分颜色 +设置评分颜色 {{ color }} -### 评价规格 +### 特殊样式 -{{ size }} +竖向带描述评分 + +{{ special }} diff --git a/docs/mobile/api_v2/search.md b/docs/mobile/api_v2/search.md index 6beeb5248e..ab7e412897 100644 --- a/docs/mobile/api_v2/search.md +++ b/docs/mobile/api_v2/search.md @@ -1,17 +1,31 @@ --- title: Search 搜索框 -description: 用于用户输入搜索信息,并进行页面内容搜索 +description: 用于用户输入搜索信息,并进行页面内容搜索。 spline: base isComponent: true toc: false --- -### 基础搜索框 +## 代码演示 -使用场景:常用于全局内容搜索,位于搜索内容上方 +### 01 组件类型 + +基础搜索框 {{ base }} -### 不同输入状态 +获取焦点后显示取消按钮 + +{{ action }} + +### 02 组件样式 + +搜索框形状 + +{{ shape }} + +### 03 组件状态 + +默认状态其他对齐方式 -{{ status }} +{{ other }} diff --git a/docs/mobile/api_v2/skeleton.md b/docs/mobile/api_v2/skeleton.md index 1c38203921..7cc98c08df 100644 --- a/docs/mobile/api_v2/skeleton.md +++ b/docs/mobile/api_v2/skeleton.md @@ -6,26 +6,27 @@ isComponent: true toc: false --- -### 基础骨架屏 +## 代码演示 -基础 +### 骨架屏类型 -{{ base }} +基础骨架屏 -头像组合 +{{ theme }} -{{ avatar-text }} +单元格骨架屏 -图片组合 +{{ cell-group }} -{{ pic-text }} -### 动画 +宫格骨架屏 -渐变加载动画 +{{ grid }} -{{ gradient }} +图文组合骨架屏 -### 闪烁加载动画 +{{ image-group }} -{{ flashed }} +### 组件动效 + +{{ animation }} \ No newline at end of file diff --git a/docs/mobile/api_v2/slider.md b/docs/mobile/api_v2/slider.md index 687e0b5fb4..9c1fa4f189 100644 --- a/docs/mobile/api_v2/slider.md +++ b/docs/mobile/api_v2/slider.md @@ -6,34 +6,34 @@ isComponent: true toc: false --- -### 基础滑动选择器 +## 代码演示 -使用场景:当仅需简单调节某事物的程度值、数量值,不需要精准度量时可使用 +### 组件类型 -{{ base }} +单游标滑块 -### 带数值滑动选择器 +{{ base }} -使用场景:当需简精准知晓调节某事物的程度值、数量值、区间值时可使用 +双游标滑块 -{{ value }} +{{ range }} -### 起始非零滑动选择器 +带数值滑动选择器 -{{ unZero }} +{{ label }} -### 带刻度滑动选择器 +带刻度滑动选择器 -{{ mark }} +{{ step }} -### 区间滑动选择器 +### 组件状态 -{{ range }} +滑块禁用状态 -### 滑动选择器禁用状态 +{{ disabled }} -{{ disable }} +#### 特殊样式 -### 有标题滑动选择器 +胶囊型滑块 -{{ title }} +{{ capsule }} \ No newline at end of file diff --git a/docs/mobile/api_v2/sticky.md b/docs/mobile/api_v2/sticky.md index f0dc61ad20..c3a1c18f21 100644 --- a/docs/mobile/api_v2/sticky.md +++ b/docs/mobile/api_v2/sticky.md @@ -6,15 +6,18 @@ isComponent: true toc: false --- -### 基础吸顶 +## 代码演示 将内容包裹在 `Sticky` 组件内 +### 基础吸顶 + {{ base }} + ### 吸顶距离 -{{ offsetTop }} +{{ offset }} ### 指定容器 diff --git a/docs/mobile/api_v2/switch.md b/docs/mobile/api_v2/switch.md index adc38318d6..f2afd3507c 100644 --- a/docs/mobile/api_v2/switch.md +++ b/docs/mobile/api_v2/switch.md @@ -16,8 +16,12 @@ toc: false 使用场景:需要通过描述解释、提示结果时,可用带描述开关 -{{ desc }} +{{ label }} -### 禁用状态 +### 组件状态 -{{ disabled }} +{{ status }} + +### 开关尺寸 + +{{ size }} \ No newline at end of file diff --git a/docs/mobile/api_v2/tag.md b/docs/mobile/api_v2/tag.md index 8e2ce1207e..b8dab274eb 100644 --- a/docs/mobile/api_v2/tag.md +++ b/docs/mobile/api_v2/tag.md @@ -6,40 +6,26 @@ isComponent: true toc: false --- -### 展示型标签 +## 代码演示 -通常跟在标题后方或内容信息下方,用于内容属性或状态的辅助性展示,不可点击。一般用在列表的场景中标签文字建议控制在 4 个汉字以内(2 英文字母= 1 汉字) +### 组件类型 -#### 风格 +{{ type }} -{{ theme }} - -#### 主题效果 - -{{ variant }} - -#### 大小 - -{{ size }} - -#### 圆角 +可关闭的标签 -{{ shape }} - -#### 超长省略 +{{ closable }} -{{ ellipsis }} +可点击的标签 -### 点击型标签 +{{ checkable }} -用于展示内容分类,单击后改变标签状态,对当前页面内容进行筛选及选择。 -标签文字建议控制在 6 个汉字以内(2 英文字母= 1 汉字) -不带图标型,点击后只改变状态 +### 组件状态 -#### 可关闭 +展示型标签 -{{ closable }} +{{ theme }} -#### 可选中 +### 组件尺寸 -{{ checkable }} +{{ size }} diff --git a/docs/mobile/api_v2/textarea.md b/docs/mobile/api_v2/textarea.md index 91c753da90..215f1b4d88 100644 --- a/docs/mobile/api_v2/textarea.md +++ b/docs/mobile/api_v2/textarea.md @@ -1,37 +1,43 @@ --- title: Textarea 多行文本框 description: 用于多行文本信息输入。 -spline: base +spline: form isComponent: true toc: false --- -### 基础多行文本框 +## 代码演示 -使用场景:最常规的文字填写,且需填写的文字字数较少时可以使用 +### 组件类型 + +基础多行文本框 {{ base }} -### 带标题多行文本框 +带标题多行文本框 {{ label }} -### 自动增高多行文本框 +自动增高多行文本框 {{ autosize }} -### 禁用多行文本框 - -{{ status }} - -### 设置最大字符个数 +设置最大字符个数 {{ maxlength }} -### 设置最大字符个数,一个汉字表示两个字符 +设置最大字符个数,一个汉字表示两个字符 {{ maxcharacter }} -### 带事件文本框 +### 组件状态 + +禁用多行文本框 + +{{ disabled }} + +### 自定义组件样式 + +标签外置输入框 -{{ events }} +{{ custom }} \ No newline at end of file diff --git a/docs/mobile/api_v2/toast.md b/docs/mobile/api_v2/toast.md index 366f058141..af895c59f8 100644 --- a/docs/mobile/api_v2/toast.md +++ b/docs/mobile/api_v2/toast.md @@ -6,30 +6,20 @@ isComponent: true toc: false --- -### 文本轻提示 +## 代码演示 -当进行某一操作,需要对该操作进行解释或者提示时,提示 2 秒后自动消失 提示内容整体居中对齐,最多显示两行 整体位置可以位于内容区顶部、底部、中心等,需整体居中对齐 +### 基础演示 -{{ text }} +{{ base }} -### 默认提示 +### 组件状态 -相比图标轻提示可以加一些辅助文字,对当前状态进行解释说明 - -{{ iconText }} - -### 不同位置的提示 - -{{ position }} +{{ theme }} ### 显示遮罩 -{{ preventScrollThrough }} +{{ cover }} ### 手动关闭 -{{ mask }} - -### 透传 Overlay - -{{ overlay }} +{{ close }} diff --git a/docs/mobile/api_v2/upload.md b/docs/mobile/api_v2/upload.md index ec1538fb85..ece49f1f87 100644 --- a/docs/mobile/api_v2/upload.md +++ b/docs/mobile/api_v2/upload.md @@ -13,3 +13,7 @@ toc: false ### 多选上传图片 {{ multiple }} + +### 组件状态 + +{{ status }} \ No newline at end of file diff --git a/docs/mobile/overview.md b/docs/mobile/overview.md index 36f898cf52..03df71ad1a 100644 --- a/docs/mobile/overview.md +++ b/docs/mobile/overview.md @@ -4,7 +4,7 @@ description: 将根据业务实践持续新增组件类型,敬请留意组件 spline: explain --- -

基础3

+

基础5

@@ -22,6 +22,14 @@ spline: explain
+
+ + + +

Fab 悬浮按钮

+
+
+
@@ -29,24 +37,39 @@ spline: explain

Icon 图标

+ +
+ + + +

Link 链接

+
+
-

导航6

+

导航7

- - - -

DropdownMenu 下拉菜单

+
+ + +

BackTop 返回顶部

+
+
+
+ + + +

Drawer 抽屉

- +
@@ -76,8 +99,22 @@ spline: explain
-

输入12

+

输入14

+
+ + + +

Calendar 日历

+
+
+
+ + + +

Cascader 级联选择器

+
+
@@ -164,7 +201,7 @@ spline: explain
-

数据展示10

+

数据展示16

@@ -187,6 +224,13 @@ spline: explain

Cell 单元格

+
+ + + +

Collapse 折叠面板

+
+
@@ -194,6 +238,20 @@ spline: explain

CountDown 倒计时

+
+ + + +

Empty 空状态

+
+
+
+ + + +

Footer 页脚

+
+
@@ -208,6 +266,27 @@ spline: explain

Image 图片

+
+ + + +

ImageViewer 图片预览

+
+
+
+ + + +

Progress 进度条

+
+
+
+ + + +

Result 结果

+
+
@@ -238,13 +317,13 @@ spline: explain
-

消息提醒7

+

反馈11

- - - -

BackTop 返回顶部

+
+ + +

ActionSheet 动作面板

@@ -254,6 +333,13 @@ spline: explain

Dialog 对话框

+
+ + + +

DropdownMenu 下拉菜单

+
+
@@ -268,6 +354,20 @@ spline: explain

Message 全局提示

+
+ + + +

NoticeBar 消息提醒

+
+
+
+ + + +

Overlay 遮罩层

+
+
@@ -275,6 +375,13 @@ spline: explain

Popup 弹出层

+
+ + + +

PullDownRefresh 下拉刷新

+
+
diff --git a/docs/web/api/back-top.md b/docs/web/api/back-top.md index 239d87c899..cd9e9f1394 100644 --- a/docs/web/api/back-top.md +++ b/docs/web/api/back-top.md @@ -2,30 +2,37 @@ title: BackTop 返回顶部 description: 用于返回页面顶部 isComponent: true -usage: { title: '', description: '' } +usage: { title: 'BackTop 返回顶部', description: '用于返回页面顶部' } spline: data --- -### 基础使用 +### 基础的回到顶部 -{{ base }} +默认距离页面右侧24px,距离页面底部80px,滚动动画时长200ms -### 不同尺寸 +{{ baseList }} + +### 可设置不同耗时的回到顶部 + +{{ baseListSmall }} + +### 不同组件尺寸的回到顶部 提供标准(默认)、小两种尺寸。 {{ size }} -### 不同形状 +### 不同组件形状的回到顶部 提供圆形和方形两种不同形状。 {{ shape }} -### 不同主题 +### 不同组件主题的回到顶部 + {{ theme }} -### 自定义内容 +### 可自定义内容的回到顶部 -{{ custom }} +{{ custom }} \ No newline at end of file diff --git a/docs/web/api/badge.en-US.md b/docs/web/api/badge.en-US.md new file mode 100644 index 0000000000..5c1c171f5e --- /dev/null +++ b/docs/web/api/badge.en-US.md @@ -0,0 +1,41 @@ +--- +title: Badge +description: The badge identifier that appears in the upper right corner of an icon or text. +isComponent: true +usage: { title: '', description: '' } +spline: data +--- + +### Badge in the style of a red dot. + +It is displayed as a circle and is located in the upper right corner of an icon or after a text title when there is no icon. In scenarios with weak prompts, the number is not displayed and the user needs to manually click to view and clear it. + +{{ base }} + +### Badge in the style of a number. + +The badge containing a number, suitable for scenarios that require strong reminders and directly alerting the user to the number of related information. + +{{ number }} + +### Customized Badge + +The displayed information can be customized, such as displaying as “hot” or “new”. + +{{ custom }} + +### Badges of different sizes. + +Two sizes are provided: standard (default) and small. + +{{ size }} + +### Badges of different shapes. + +wo different shapes of badges are provided: round and square. + +{{ shape }} + +### Control the offset position of the badge display. + +{{ offset }} diff --git a/docs/web/api/breadcrumb.en-US.md b/docs/web/api/breadcrumb.en-US.md new file mode 100644 index 0000000000..c9b38a74df --- /dev/null +++ b/docs/web/api/breadcrumb.en-US.md @@ -0,0 +1,36 @@ +--- +title: Breadcrumb +description: Displays the position of the current page in the system hierarchy, and can return to any previous page level. +isComponent: true +usage: { title: '', description: '' } +spline: navigation +--- + +### Basic breadcrumb + +Suitable for a wide range of basic uses, the system has more than two levels of hierarchy for switching up any level of content. + +{{ base }} + +### Breadcrumbs with icons + +Can customize each content, unified icon plus text, icon placed in front of the text. + +{{ icon }} + +### Custom separator breadcrumbs + +Customize`separator`the separator character through the separator property, and it is recommended to use an icon instead of a text symbol. + +{{ custom }} + + + +### Using Options to Configure Breadcrumbs + +Use the `options` property to configure the content of the breadcrumbs. + +{{ options }} diff --git a/docs/web/api/calendar.en-US.md b/docs/web/api/calendar.en-US.md new file mode 100644 index 0000000000..daae512754 --- /dev/null +++ b/docs/web/api/calendar.en-US.md @@ -0,0 +1,91 @@ +--- +title: Calendar +description: Container for displaying data or dates in a calendar format. +isComponent: true +usage: { title: "", description: "" } +spline: data +--- + +### Event calendar panel + +A date display container that can display events within dates. It is commonly used when there is enough space and when it is necessary to carry or display event information. + +{{ base }} + +### Card mode calendar + +Using individual dates as units, nested within a container with limited space to display dates and other information. + +{{ card }} + +### Function example + +#### Specify highlighted dates + +Customize specified highlighted dates through component properties. The component defaults to highlighting “today” or “the current month”. The `value` attribute can be used to set this highlighted date. + +{{ value }} + +#### Switch mode Calendar/Monthly + +Specify the display form of the component through component properties. The component is displayed in calendar form by default and provides “Calendar” and “Monthly” mode switching buttons. Developers can switch modes by modifying the `mode` attribute. + +{{ mode }} + +#### Specify the first day of the week in the first column + +Specify the first day of the week in the first column: Specify the first day of the week in the calendar’s first column through component properties. The component defaults to “Monday” in the first column and can be set to other days of the week through the `firstDayOfWeek` attribute (only valid when `mode` is `month`). + +{{ first-day-of-week }} + +#### Control related configuration + +Customize the control of the component through component properties. In some business scenarios, it may be necessary to globally hide or disable controls. This can also be achieved through the `controllerConfig` attribute for local control. + +{{ controller-config }} + +### Customization + +#### Custom calendar range + +Specify the value range of the year and month selection box through component properties. By default, the component allows years to be selected from `1970 - ∞` and there is no restriction on months. The range attribute can be used to set the selectable `range` of the calendar. + +{{ range }} + +#### Customizing the display of weeks + +You can customize the display of weeks through the `week` attribute or slot. By default, the weeks in the calendar are displayed as “Monday” to “Sunday”, but in some scenarios, you may want to customize the display. + +{{ week }} + +### Event example + +Use `methods` to define the execution logic of events. Developers can use these events to implement more customized features. + +{{ events }} + +### Slot example + +#### Header slot (top left corner of the component) + +Display content in the top left corner of the component. In some business scenarios, you may need to display a title or similar content in the top left corner of the component. In this case, you can use the `head` named slot. + +{{ head }} + +#### Cell slot - Append content + +Append content to the existing cell display. By default, the current date is displayed in the calendar cell. If you need to display additional information, you can use the `cellAppend` named slot. + +{{ cell-append }} + +#### Cell slot - Custom content + +Completely rewrite the content displayed in the cell. Unlike the `cellAppend` named slot, the `cell` named slot allows you to fully customize the cell content. + +{{ cell }} + +#### Attribute slot + +Use the `Props API` to use slots. In some scenarios, you may want to render slot content through the `Props API`. `head`, `cell` and`cellAppend` all have their corresponding `Props API`. The following briefly demonstrates the `Props API` for `head` and `cell`. + +{{ slot-props-api }} diff --git a/docs/web/api/cascader.en-US.md b/docs/web/api/cascader.en-US.md new file mode 100644 index 0000000000..665c40aab8 --- /dev/null +++ b/docs/web/api/cascader.en-US.md @@ -0,0 +1,103 @@ +--- +title: Cascader +description: Cascading selectors are useful for data sets that have a clear hierarchical structure that the user can view and select through. in general, a cascade selector include:Selectors and cascades. +isComponent: true +usage: { title: '', description: '' } +spline: form +--- + +### Single Cascaded Selector + +Provide a single cascade selector, after the selection of each level to display the selected content. + +{{ base }} + +### Multi-selection cascade selector + +Provide multi-choice cascading selector, display multi-choice content through label. + +{{ multiple }} + +### Collapsible Options Multi-selector + +In the case of multiple selections, the selected items are collapsed, and the selected items exceeding the value are collapsed. + +{{ collapsed }} + +### Cascade selectors of different size + +Provide large, medium and small three different height, width selector to adapt to different size layout. + +{{ size }} + +### Filterable Cascade Selector + +Enter the Filter option. It is used in business scenarios with specific requirements. Filter text by default. + +{{ filterable }} + +### Disabling Cascading Selectors + +Cascaded selectors that provide a disabled state. + +{{ disabled }} + +### Display only the last cascade selector + +You can display only the label of the last level of the selected item in the input box, rather than the full path of the selected item. + +{{ show-all-levels }} + +### Cascading selector for selecting any item + +When enabled, you can select any level of options. + +{{ check-strictly }} + +### Cascaded selector in full path mode + +The default input/output value type is the value of the leaf node. The full path value is used when `value-type="full"` + +{{ value-type }} + +### Customize Selected Value Mode + +Only valid for multiple-choice conditions.` onlyLeaft`indicates that only leaf nodes are selected in any case;`parentFirst`indicates that only parent nodes are selected when all child nodes are selected;`all`indicates that both parent nodes and child nodes are selected. + +{{ value-mode }} + +### Different Trigger Methods + +Submenus can be loaded by different triggering methods. + +{{ trigger }} + +### Display when the text is too long + +When the data text is too long, use the browser `title` to display the long text. + +{{ ellipsis }} + +### Limit the number of options + +Limits the maximum number of selections for a multi-choice selector. This is typically used when you need to limit the number of multi-choice options. + +{{ max }} + +### Customizing Data Field Aliases + +When using `options` to configure drop-down options, if the data fields are not `label` and `value`, you can use `keys` to define aliases. + +{{ keys }} + +### Dynamic Loading + +The selector contents can be customized according to requirements. It is used in business scenarios with complex logic or specific requirements. + +{{ load }} + +### Cascading Panels + +Cascading panel used alone for combination with other triggers + +{{ panel }} diff --git a/docs/web/api/checkbox.en-US.md b/docs/web/api/checkbox.en-US.md new file mode 100644 index 0000000000..9e52e71b78 --- /dev/null +++ b/docs/web/api/checkbox.en-US.md @@ -0,0 +1,31 @@ +--- +title: Checkbox +description: A check box is a selection control that allows the user to toggle between checked and unchecked with a single click. +isComponent: true +usage: { title: '', description: '' } +spline: form +--- + +### Basic multi-selection box + +The simplest form of multi-selection box, often used for multi-selection of data in the form. + +{{ base }} + +### Linked Multi-check Box + +Linked check boxes are check boxes used in conjunction with other components. + +{{ link }} + +### Grouped Multi-check Box Groups + +A group of check boxes that are combined according to certain attributes. + +{{ group }} + +### Controlled Class Checkbox + +The checkbox supports v-model, controlled and uncontrolled usage. + +{{ controlled }} diff --git a/docs/web/api/collapse.en-US.md b/docs/web/api/collapse.en-US.md new file mode 100644 index 0000000000..74c6b09f58 --- /dev/null +++ b/docs/web/api/collapse.en-US.md @@ -0,0 +1,35 @@ +--- +title: Collapse +description: You can group more or more complex content. The grouped content area can be collapsed, expanded or hidden. +isComponent: true +usage: { title: "", description: "" } +spline: data +--- + +### Basic collapsible panel + +Basic collapsible panel, with customizable panel content. + +{{ base }} + +### Accordion mode collapsible panel + +Accordion mode collapsible panel, only one panel can be opened at a time. + +{{ mutex }} + +### Collapsible panel with settable icons + +You can set whether to display the expand icon and the position of the icon display. + +{{ icon }} + +### Collapsible panel with settable right-side operation + +You can customize the right-side operation area of the panel. + +{{ rightSlot }} + +### Collapsible panel in different modes + +{{ other }} diff --git a/docs/web/api/color-picker.en-US.md b/docs/web/api/color-picker.en-US.md new file mode 100644 index 0000000000..5512b08338 --- /dev/null +++ b/docs/web/api/color-picker.en-US.md @@ -0,0 +1,51 @@ +--- +title: ColorPicker +description: Used for color selection, supports multiple formats. +isComponent: true +usage: { title: '', description: '' } +spline: form +--- + +### Panel Color Selector + +There is no trigger and the color picker panel is displayed directly. + +{{ panel }} + +### Color Picker with Trigger Element + +Trigger the display selector panel through the trigger, and transparently transfer all attributes to the panel selector component. + +{{ trigger }} + +### Color selector for different color modes + +Support monochrome mode, linear gradient two color mode selection, can be used in a single mode, can also switch between two modes at the same time. Use `colorMode` to configure. + +{{ color-mode }} + +### Color picker with transparency adjustment + +Set `enableAlpha=true` to enable the transparency of the selector. + +{{ enable-alpha }} + +### Color Selector with Configurable System Color + +You can configure the system preset colors through `swatchColors`. If the value is null or [], the system colors will not be displayed. + +{{ swatch-color }} + +### Configurable Color Selector for Recently Used Color + +The most recently used color can be configured through `recentColors`. A value of [] indicates that the "Most Recently Used Color" in the component is used as the standard. If the value length is greater than 0, the "Most Recently Used Color" is displayed based on this value. A value of null does not display Recent Colors at all. + +{{ recent-color }} + +### Disabling Color Selector + +{{ status-disabled }} + +### Read-only Color Selector + +{{ status-readonly }} diff --git a/docs/web/api/comment.en-US.md b/docs/web/api/comment.en-US.md new file mode 100644 index 0000000000..393680c05d --- /dev/null +++ b/docs/web/api/comment.en-US.md @@ -0,0 +1,43 @@ +--- +title: Comment +description: Comment is used for feedback, evaluation, discussion, etc. on page content, such as evaluations of articles and discussions on topics. +isComponent: true +usage: { title: "", description: "" } +spline: data +--- + +### Basic comments + +The most basic comment component, including avatar, author, time, and comment content. Suitable for various scenarios where comments need to be displayed. + +{{ base }} + +### Comments with operations + +A component that allows you to perform related operations on comment content. Suitable for scenarios where a custom operation column is needed. + +{{ operation }} + +### List comments + +Comments displayed in list form. + +{{ list }} + +### Comments with replies + +A component that displays the reply content of a comment. Suitable for scenarios where comments need to be replied to. The author’s name can be followed by the name of the reply object. + +{{ reply }} + +### Comments with quotes + +Comments can quote other content to indicate the reference relationship between the comment and other content. + +{{ quote }} + +### Comments with reply form + +A component for replying to comment content. You can directly enter content in the reply form to reply. + +{{ reply-form }} diff --git a/docs/web/api/date-picker.en-US.md b/docs/web/api/date-picker.en-US.md new file mode 100644 index 0000000000..f01ca0defa --- /dev/null +++ b/docs/web/api/date-picker.en-US.md @@ -0,0 +1,97 @@ +--- +title: DatePicker +description: Use to select a specific date or a range of dates. +isComponent: true +usage: { title: '', description: '' } +spline: form +--- + +### Year Selector + +Used for year selection. It is used when the user only needs to enter the year information, and is often used in query scenarios where data is recorded by year, such as annual bills. + +{{ year }} + +### Month Selector + +Used for month selection. Use only when the user needs to enter month information. + +{{ month }} + +### Quarter Selector + +Used for quarterly selection. Use only when the user needs to enter quarterly information. + +{{ quarter }} + +### Week Selector + +Used for week selection. Used when the user only needs to enter year + week information. + +{{ week }} + +### Date Picker + +For selection of specific dates. Use only when the user needs to enter very specific date information. + +{{ base }} + +### Date Time Selector + +For date and time associated selections. Used when the user needs to enter a date including a time. + +{{ date-time }} + +### Date Range Selector + +Used for selection of a certain period of time. Used when the user needs to enter a date range. + +{{ date-range }} + +### Date picker with shortcut label + +with a time stamp that can be set in advance. When the date information is regular and needs to be clicked for quick input. + +{{ date-presets-alt }} + +### Date selector can be disabled + +The date that does not support user selection can be disabled from clicking. + +{{ disable-date }} + +### Selector for specifying the start of the week + +You can specify the day of the week from which a week starts through the `firstDayOfWeek` attribute. This is only valid when a date is selected (`mode = date`). The default value is 1, that is, it starts from Monday. You can set it to start from Sunday as follows. + +{{ first-day-of-week }} + +### Custom Icon Selector + +Prefix and suffix icons can be customized through `prefixIcon` and `suffixIcon`. + +{{ custom-icon }} + +### Date Selection Panel Used Alone + +You can use `DatePickerPanel` and `DateRangePickerPanel` separately. You can assemble your own date picker. + +{{ panel }} + +## FAQ + +### The backend data format is special. How can I format the date quickly? + +The `onChange` callback event will return the currently selected date object wrapped in `dayjs`. You can format it with the help of a third-party library or use the provided `dayjs` object for custom conversion. + +```js + { + const data = dayjsValue.format('YYYYMMDD'); + ... +}}> + + { + const data = dayjsValue.map(d => d.format('YYYYMMDD')); + ... +}}> +``` diff --git a/docs/web/api/divider.en-US.md b/docs/web/api/divider.en-US.md new file mode 100644 index 0000000000..b71a570f4d --- /dev/null +++ b/docs/web/api/divider.en-US.md @@ -0,0 +1,30 @@ +--- +title: Divider +description: The divider is a linear lightweight component that serves to separate, organize, and refine. It is used to logically organize element content and page structure. +isComponent: true +usage: { title: '', description: '' } +spline: layout +--- + +### Basic divider + +The basic divider is an independent line without text, divided into horizontal and vertical dividers. + +#### Horizontal divider + +Horizontal dividers are commonly used to separate different element content. + +{{ base }} + +#### Vertical divider + +Vertical dividers are commonly used for inline separation. + +{{ vertical }} + +### Text divider + +The text divider is a divider with embedded text and is used when an explanation of the separated content is needed. + +{{ text }} + diff --git a/docs/web/api/drawer.en-US.md b/docs/web/api/drawer.en-US.md new file mode 100644 index 0000000000..543af32033 --- /dev/null +++ b/docs/web/api/drawer.en-US.md @@ -0,0 +1,69 @@ +--- + +title: Drawer +description: Drawers are often opened by clicking on adjacent button controls, floating panels that slide in from the edge of the screen, also known as half-screen pop-ups. +isComponent: true +usage: { title: '', description: '' } +spline: message + +--- + +### Visible Drawers + +Carrying the informational content of the presentation. Drawers can be used to increase page scalability when page space is limited. + +{{ base }} + +### Operable Drawer + +The operation drawer carries the forms to be edited or operated in the drawer, and can be used when the user needs to operate. + +{{ operation }} + +### Drawers with no hidden layer + +By setting `showOverlay`, you can control whether to display the drawer overlay. + +{{ no-mask }} + +### Drawers in Different Positions + +With `placement`, the drawer can be displayed in different positions. + +{{ placement }} + +### Drawers of different size + +The width of the drawer display is controlled by the `size` attribute. + +{{ size }} + +### Customizing the Top and Bottom Drawers + +You can adjust the contents at the top and bottom of the drawer by using `header` and `footer`. + +{{ custom }} + +### Eject Mode Drawer + +Drawers can be displayed by covering or pushing the content area. For the `push` mode of the entire page,`attach` needs to be set to body. (The drawer component is mounted by default to the location of the element itself). + +{{ popup }} + +### Rendering and rendering in the drawer of the current parent element + +The `showInAttachedElement` attribute is used to specify the parent container element of the drawer. The parent element must have a positioning attribute, for example:position: relative。 + +{{ attach-parent }} + +### Destroy drawer when closing + +You can use `destroyOnClose` to destroy a drawer from a page node when closing it. + +{{ destroy }} + +### Draggable Drawers + +With `sizeDraggable`, you can drag and drop the edge of the drawer to change the size of the drawer. + +{{ size-draggable }} diff --git a/docs/web/api/dropdown.en-US.md b/docs/web/api/dropdown.en-US.md new file mode 100644 index 0000000000..bd70ffc859 --- /dev/null +++ b/docs/web/api/dropdown.en-US.md @@ -0,0 +1,61 @@ +--- +title: Dropdown +description: It is used to carry too many operation sets and accept more operations through drop-down expansion. +isComponent: true +usage: { title: "", description: "" } +spline: navigation +--- + +### Text drop-down menu + +The text button triggers a drop-down menu. It is commonly used in storage operation scenarios where space is extremely limited, and is generally used to store detailed operations in the form. + +{{ base }} + +### Button drop-down menu + +A normal button triggers a drop-down menu. It is often used to operate storage scenes. + +{{ button }} + +### With Split Line drop-down menu + +The different pull-down menu operations are distinguished by dividing lines. It is often used in scenarios where the results of different operations need to be distinguished. + +{{ split }} + +### Multi-level drop-down menu + +Action drop-down menu with logical hierarchy. It is often used in operational scenarios where multiple layers of logic need to be accommodated. + +{{ multiple }} + +### Drop-down menu with disabled action items + +The operation items of the drop-down menu can be set to be disabled. This is often used to disable some of the action items. + +{{ disabled }} + +### Customize drop-down menus for additional properties + +The drop-down menu depends on the`Popup`component and can pass through`Popup`the properties of the custom Popup component. + +{{ custom }} + +### Drop-down menu to define maximum height + +The drop-down menu supports defining the maximum height. + +{{ long }} + +### Custom theme drop-down menu + +The menu items of the drop-down menu support custom themes, which are used according to specific scenarios. + +{{ theme }} + +### Drop-down menu expanded to the left + +The drop-down menu supports expansion to the left. + +{{ left }} diff --git a/docs/web/api/form.en-US.md b/docs/web/api/form.en-US.md new file mode 100644 index 0000000000..29c71abb28 --- /dev/null +++ b/docs/web/api/form.en-US.md @@ -0,0 +1,97 @@ +--- +title: Form +description: Used to collect, verify and submit data, generally composed of input box, radio box, check box, selector and other controls. +isComponent: true +usage: { title: "", description: "" } +spline: form +--- + +### Typical Form + +A typical form component contains a variety of form items, such as input boxes, selectors, radio boxes, multicheck boxes, switches, text input, and so on. + +- If there is a submit button `