Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DiDi
cube-ui
提交
57a0a4ec
C
cube-ui
项目概览
DiDi
/
cube-ui
11 个月 前同步成功
通知
34
Star
9078
Fork
1508
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
cube-ui
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
57a0a4ec
编写于
6月 06, 2018
作者:
D
dolymood
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(ActionSheet, Dialog, Picker, Toast): support mask-closable
#221
上级
3cf5c16c
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
38 addition
and
7 deletion
+38
-7
src/common/mixins/basic-picker.js
src/common/mixins/basic-picker.js
+4
-0
src/components/action-sheet/action-sheet.vue
src/components/action-sheet/action-sheet.vue
+9
-4
src/components/dialog/dialog.vue
src/components/dialog/dialog.vue
+11
-1
src/components/picker/picker.vue
src/components/picker/picker.vue
+4
-1
src/components/toast/toast.vue
src/components/toast/toast.vue
+10
-1
未找到文件。
src/common/mixins/basic-picker.js
浏览文件 @
57a0a4ec
...
...
@@ -22,6 +22,10 @@ export default {
default
()
{
return
{}
}
},
maskClosable
:
{
type
:
Boolean
,
default
:
true
}
},
computed
:
{
...
...
src/components/action-sheet/action-sheet.vue
浏览文件 @
57a0a4ec
...
...
@@ -7,10 +7,10 @@
:mask="true"
:z-index="zIndex"
v-show="isVisible"
@touchmove.prevent
="noop"
@mask-click="
cancel
">
@touchmove.prevent
@mask-click="
maskClick
">
<transition
name=
"cube-action-sheet-move"
>
<div
class=
"cube-action-sheet-panel cube-safe-area-pb"
v-show=
"isVisible"
@
click.stop
=
"noop"
>
<div
class=
"cube-action-sheet-panel cube-safe-area-pb"
v-show=
"isVisible"
@
click.stop
>
<h1
class=
"cube-action-sheet-title border-bottom-1px"
v-show=
"pickerStyle || title"
>
{{
title
}}
</h1>
<div
class=
"cube-action-sheet-content"
>
<ul
class=
"cube-action-sheet-list"
>
...
...
@@ -64,10 +64,15 @@
pickerStyle
:
{
type
:
Boolean
,
default
:
false
},
maskClosable
:
{
type
:
Boolean
,
default
:
true
}
},
methods
:
{
noop
()
{
maskClick
()
{
this
.
maskClosable
&&
this
.
cancel
()
},
cancel
()
{
this
.
hide
()
...
...
src/components/dialog/dialog.vue
浏览文件 @
57a0a4ec
<
template
>
<transition
name=
"cube-dialog-fade"
>
<cube-popup
type=
"dialog"
:z-index=
"zIndex"
:mask=
"true"
:center=
"true"
v-show=
"isVisible"
>
<cube-popup
type=
"dialog"
:z-index=
"zIndex"
:mask=
"true"
:center=
"true"
v-show=
"isVisible"
@
mask-click=
"maskClick"
>
<div
class=
"cube-dialog-main"
>
<span
class=
"cube-dialog-close"
v-show=
"showClose"
@
click=
"close"
><i
class=
"cubeic-close"
></i></span>
<div
:class=
"containerClass"
>
...
...
@@ -122,6 +129,9 @@
}
},
methods
:
{
maskClick
(
e
)
{
this
.
maskClosable
&&
this
.
cancel
(
e
)
},
confirm
(
e
)
{
if
(
this
.
_confirmBtn
.
disabled
)
{
return
...
...
src/components/picker/picker.vue
浏览文件 @
57a0a4ec
...
...
@@ -8,7 +8,7 @@
:z-index=
"zIndex"
v-show=
"isVisible"
@
touchmove.prevent
@
mask-click=
"
cancel
"
>
@
mask-click=
"
maskClick
"
>
<transition
name=
"cube-picker-move"
>
<div
class=
"cube-picker-panel cube-safe-area-pb"
v-show=
"isVisible"
@
click.stop
>
<div
class=
"cube-picker-choose border-bottom-1px"
>
...
...
@@ -123,6 +123,9 @@
this
.
$emit
(
EVENT_VALUE_CHANGE
,
this
.
pickerSelectedVal
,
this
.
pickerSelectedIndex
,
pickerSelectedText
)
}
},
maskClick
()
{
this
.
maskClosable
&&
this
.
cancel
()
},
cancel
()
{
this
.
hide
()
this
.
$emit
(
EVENT_CANCEL
)
...
...
src/components/toast/toast.vue
浏览文件 @
57a0a4ec
<
template
>
<transition
name=
"cube-toast-fade"
>
<cube-popup
type=
"toast"
:z-index=
"zIndex"
:mask=
"mask"
v-show=
"isVisible"
>
<cube-popup
type=
"toast"
:z-index=
"zIndex"
:mask=
"mask"
v-show=
"isVisible"
@
mask-click=
"maskClick"
>
<i
v-show=
"!isLoading"
class=
"cube-toast-icon"
:class=
"iconClass"
></i>
<cube-loading
v-show=
"isLoading"
></cube-loading>
<div
v-show=
"txt"
class=
"cube-toast-tip"
v-html=
"txt"
></div>
...
...
@@ -69,6 +75,9 @@
}
},
methods
:
{
maskClick
()
{
this
.
maskClosable
&&
this
.
hide
()
},
show
()
{
this
.
isVisible
=
true
this
.
clearTimer
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录