Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
京东前端
nutui
提交
b3834314
N
nutui
项目概览
京东前端
/
nutui
通知
37
Star
4
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
N
nutui
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
b3834314
编写于
9月 06, 2022
作者:
D
Drjingfubo
提交者:
GitHub
9月 06, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
docs(actionsheet,toast): edit (#1635)
上级
66a7c5d2
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
113 addition
and
16 deletion
+113
-16
src/packages/__VUE/actionsheet/doc.en-US.md
src/packages/__VUE/actionsheet/doc.en-US.md
+51
-4
src/packages/__VUE/actionsheet/doc.md
src/packages/__VUE/actionsheet/doc.md
+53
-3
src/packages/__VUE/toast/doc.en-US.md
src/packages/__VUE/toast/doc.en-US.md
+4
-4
src/packages/__VUE/toast/doc.md
src/packages/__VUE/toast/doc.md
+5
-5
未找到文件。
src/packages/__VUE/actionsheet/doc.en-US.md
浏览文件 @
b3834314
...
...
@@ -13,7 +13,8 @@ import { ActionSheet, Popup } from '@nutui/nutui';
import
{
ActionSheet
,
Popup
}
from
'
@nutui/nutui-taro
'
;
const
app
=
createApp
();
app
.
use
(
ActionSheet
).
use
(
Popup
);
app
.
use
(
ActionSheet
);
app
.
use
(
Popup
);
```
## Basic Usage
...
...
@@ -259,7 +260,53 @@ export default {
```
:::
## Prop
## Custom Content
:::demo
```
html
<template>
<div>
<nut-cell
:show-icon=
"true"
:isLink=
"true"
@
click=
"switchActionSheet('isVisible')"
>
<span><label>
Custom Content
</label></span>
</nut-cell>
<nut-actionsheet
v-model:visible=
"state.isVisible"
title=
"title"
>
<div
class=
"custom-content"
>
Custom Content
</div>
</nut-actionsheet>
</div>
</template>
<script>
import
{
reactive
}
from
'
vue
'
;
export
default
{
setup
()
{
const
state
=
reactive
({
isVisible
:
false
,
val
:
''
,
});
const
switchActionSheet
=
(
param
)
=>
{
state
.
isVisible
=
!
state
.
isVisible
;
};
return
{
state
,
switchActionSheet
,
};
}
}
</script>
<style
lang=
"scss"
scoped
>
.custom-content
{
padding
:
10px
10px
160px
;
}
</style>
```
:::
## Props
| Attribute | Description | Type | Default |
|------------------|----------------------------------------|---------|-----------|
...
...
@@ -271,7 +318,7 @@ export default {
| color | selected item color,when choose-tag-value == option-tag | String | '#ee0a24' |
| title | set list item title | String | '' |
| description | set list item description | String | '' |
| cancel-txt | Text of cancel button | String | '
取消
' |
| cancel-txt | Text of cancel button | String | '
cancel
' |
| close-abled | Whether the mask layer can be closed | Boolean | true |
## menu-items
...
...
@@ -284,7 +331,7 @@ export default {
| loading | Whether to be loading status | Boolean |
| disable | Whether to be disabled | Boolean |
## Event
## Event
s
| Event | Description | Arguments |
|--------|--------------------|-----------------------------------|
...
...
src/packages/__VUE/actionsheet/doc.md
浏览文件 @
b3834314
...
...
@@ -13,7 +13,8 @@ import { ActionSheet, Popup } from '@nutui/nutui';
import
{
ActionSheet
,
Popup
}
from
'
@nutui/nutui-taro
'
;
const
app
=
createApp
();
app
.
use
(
ActionSheet
).
use
(
Popup
);
app
.
use
(
ActionSheet
);
app
.
use
(
Popup
);
```
## 基本用法
...
...
@@ -260,7 +261,56 @@ export default {
```
:::
## Prop
## 自定义内容
:::demo
```
html
<template>
<div>
<nut-cell
:show-icon=
"true"
:isLink=
"true"
@
click=
"switchActionSheet('isVisible')"
>
<span><label>
自定义内容
</label></span>
</nut-cell>
<nut-actionsheet
v-model:visible=
"state.isVisible"
title=
"标题"
>
<div
class=
"custom-content"
>
自定义内容
</div>
</nut-actionsheet>
</div>
</template>
<script>
import
{
reactive
}
from
'
vue
'
;
export
default
{
setup
()
{
const
state
=
reactive
({
isVisible
:
false
,
val
:
''
,
});
const
switchActionSheet
=
(
param
)
=>
{
state
.
isVisible
=
!
state
.
isVisible
;
};
return
{
state
,
switchActionSheet
,
};
}
}
</script>
<style
lang=
"scss"
scoped
>
.custom-content
{
padding
:
10px
10px
160px
;
}
</style>
```
:::
## Props
| 字段 | 说明 | 类型 | 默认值 |
|------------------|----------------------------------------|---------|-----------|
...
...
@@ -285,7 +335,7 @@ export default {
| loading | 是否为loading状态 | Boolean |
| disable | 是否为禁用状态 | Boolean |
## Event
## Event
s
| 字段 | 说明 | 回调参数 |
|--------|--------------------|-----------------------------------|
...
...
src/packages/__VUE/toast/doc.en-US.md
浏览文件 @
b3834314
...
...
@@ -275,15 +275,15 @@ toast.hide();
| title | title | String | - |
| center | Whether to display in the middle of the page (display at the bottom when false) | Boolean| true |
| bottom | The distance from the bottom of the page (px or %), which takes effect when option.center is false | String| 30px |
| text
AlignC
enter | Whether the multi-line copy is centered | Boolean | true |
| text
-align-c
enter | Whether the multi-line copy is centered | Boolean | true |
| bgColor | background color (transparency) | String | rgba(0, 0, 0, 0.8) |
| custom
C
lass | Custom Class | String | - |
| custom
-c
lass | Custom Class | String | - |
| icon | Custom Icon | String | - |
| icon
S
ize | Custom iconSize | String | 20 |
| icon
-s
ize | Custom iconSize | String | 20 |
| size | Text Size
**small**
/
**base**
/
**large**
| String | base |
| cover | Whether to show the mask layer | Boolean | false |
| cover-color | Cover Color | String | rgba(0,0,0,0) |
| loading
R
otate | Whether the loading icon is rotated, only valid for the loading type | Boolean | true |
| loading
-r
otate | Whether the loading icon is rotated, only valid for the loading type | Boolean | true |
| close | Callback function after close | function | null |
| close-on-click-overlay | Whether to close when overlay is clicked | Boolean | false |
| custom-class | Custom Class | String | - |
...
...
src/packages/__VUE/toast/doc.md
浏览文件 @
b3834314
...
...
@@ -275,15 +275,15 @@ toast.hide();
| title | 标题 | String | - |
| center | 是否展示在页面中部(为false时展示在底部) | Boolean | true |
| bottom | 距页面底部的距离(像素或者百分比),option.center为false时生效 | String | 30px |
| text
AlignC
enter | 多行文案是否居中 | Boolean | true |
| bg
C
olor | 背景颜色(透明度) | String | rgba(0, 0, 0, 0.8) |
| custom
C
lass | 自定义类名 | String | - |
| text
-align-c
enter | 多行文案是否居中 | Boolean | true |
| bg
-c
olor | 背景颜色(透明度) | String | rgba(0, 0, 0, 0.8) |
| custom
-c
lass | 自定义类名 | String | - |
| icon | 自定义图标,
**支持图片链接或base64格式**
| String | - |
| icon
S
ize | 自定义图标尺寸 | String | 20 |
| icon
-s
ize | 自定义图标尺寸 | String | 20 |
| size | 文案尺寸,
**small**
/
**base**
/
**large**
三选一 | String | base |
| cover | 是否显示遮罩层 | Boolean | false |
| cover-color | 遮罩层颜色,默认透明 | String | rgba(0,0,0,0) |
| loading
R
otate | loading图标是否旋转,仅对loading类型生效 | Boolean | true |
| loading
-r
otate | loading图标是否旋转,仅对loading类型生效 | Boolean | true |
| close | 关闭时触发的事件 | function | null |
| close-on-click-overlay | 是否在点击遮罩层后关闭提示 | Boolean | false |
| custom-class | 提示框class | String | - |
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录