Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
京东前端
nutui
提交
3708b82f
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,发现更多精彩内容 >>
提交
3708b82f
编写于
8月 11, 2020
作者:
Y
yangkaixuan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: popup demo
上级
37ce568e
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
35 addition
and
5 deletion
+35
-5
src/assets/img/QQ-friends-icon.png
src/assets/img/QQ-friends-icon.png
+0
-0
src/assets/img/circle-friends-icon.png
src/assets/img/circle-friends-icon.png
+0
-0
src/assets/img/wechat-icon.png
src/assets/img/wechat-icon.png
+0
-0
src/packages/popup/demo.vue
src/packages/popup/demo.vue
+31
-2
src/packages/popup/doc.md
src/packages/popup/doc.md
+4
-3
未找到文件。
src/assets/img/QQ-friends-icon.png
0 → 100644
浏览文件 @
3708b82f
8.8 KB
src/assets/img/circle-friends-icon.png
0 → 100644
浏览文件 @
3708b82f
12.1 KB
src/assets/img/wechat-icon.png
0 → 100644
浏览文件 @
3708b82f
10.3 KB
src/packages/popup/demo.vue
浏览文件 @
3708b82f
...
...
@@ -33,7 +33,13 @@
<h4>
圆角弹框
</h4>
<div>
<nut-popup
round
v-model=
"showRound"
position=
"bottom"
:style=
"
{ height: '20%' }">
</nut-popup>
<nut-popup
round
v-model=
"showRound"
closeable
close-icon-position=
"top-right"
position=
"bottom"
:style=
"
{ height: '185px' }">
<div
class=
"box"
>
<div
class=
"icon"
>
<img
src=
"@/assets/img/wechat-icon.png"
/>
<span>
微信好友
</span></div>
<div
class=
"icon"
>
<img
src=
"@/assets/img/QQ-friends-icon.png"
/><span>
QQ好友
</span></div>
<div
class=
"icon"
>
<img
src=
"@/assets/img/circle-friends-icon.png"
/><span>
微信朋友圈
</span></div>
</div>
</nut-popup>
<nut-cell
isLink
title=
"圆角弹框"
:showIcon=
"true"
@
click.native=
"showRound = true"
>
</nut-cell>
</div>
<h4>
指定挂载节点
</h4>
...
...
@@ -67,4 +73,27 @@ export default {
},
};
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
<
style
lang=
"scss"
scoped
>
.box
{
display
:
flex
;
height
:
136px
;
margin-top
:
48px
;
border-top
:
1px
solid
#e6e6e6
;
justify-content
:
space-around
;
align-items
:
center
;
.icon
{
display
:
inline-flex
;
flex-direction
:
column
;
align-items
:
center
;
span
{
color
:
#646464
;
font-size
:
13px
;
}
img
{
width
:
60px
;
height
:
60px
;
margin-bottom
:
5px
;
}
}
}
</
style
>
src/packages/popup/doc.md
浏览文件 @
3708b82f
...
...
@@ -29,7 +29,8 @@ export default {
## 弹出位置
通过 position 属性设置弹出位置,默认居中弹出,可以设置为 top、bottom、left、right
通过 position 属性设置弹出位置,默认居中弹出(center),可以设置为 top、bottom、left、right、center、none
__注意__
:在某些情况下使用center可能会出现定位偏移问题,例如在组件样式中设置top、left等定位等,这时可以可以设置为none。由组件调用者设置样式;
```
html
<nut-popup
v-model=
"show"
position=
"top"
:style=
"{ height: '20%' }"
/>
...
...
@@ -70,14 +71,14 @@ export default {
| ---------- | ---------------------------------------- | ------- | ------ |
| v-model | 当前组件是否显示 | boolean | - |
| overlay | 是否显示遮罩层 | boolean | true |
| position | 弹出位置,可选值为 top bottom right left center| string | center |
| position | 弹出位置,可选值为 top bottom right left center
none
| string | center |
| duration | 动画时长,单位秒 | Number | - |
| round | 是否显示圆角 | boolean | - |
| transition | 动画类名,等价于 transtion 的 name 属性 | string | - |
| closeable | 是否显示关闭图标 | Boolean | false |
| close-icon | 关闭图标名称 | string | cross |
| close-icon-position | 关闭图标位置,可选值为top-left top-right bottom-left bottom-right | string | top-right |
| destroy-on-close| 控制是否在关闭 pop
o
p 之后将子元素全部销毁 | boolean | false |
| destroy-on-close| 控制是否在关闭 pop
u
p 之后将子元素全部销毁 | boolean | false |
| overlay-class | 自定义遮罩层类名 | string | |
| overlay-style | 自定义遮罩层样式 | object | |
| lock-scroll | 是否锁定背景滚动 | boolean | true |
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录