Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Element
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林焕东
Element
Commits
4a6765c2
Commit
4a6765c2
authored
Aug 22, 2016
by
Leopoldthecoder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update message-box, select and slider docs
parent
019b325a
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
144 additions
and
411 deletions
+144
-411
examples/docs/message-box.md
examples/docs/message-box.md
+33
-14
examples/docs/select.md
examples/docs/select.md
+111
-371
examples/docs/slider.md
examples/docs/slider.md
+0
-26
No files found.
examples/docs/message-box.md
View file @
4a6765c2
...
@@ -15,12 +15,12 @@
...
@@ -15,12 +15,12 @@
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
type: 'warning'
type: 'warning'
}).then(() => {
}).then(() => {
this.$
msgbox
({
this.$
notify
({
message: '删除成功!',
message: '删除成功!',
type: 'success'
type: 'success'
});
});
}).catch(() => {
}).catch(() => {
this.$
msgbox
({
this.$
notify
({
message: '已取消删除',
message: '已取消删除',
type: 'info'
type: 'info'
});
});
...
@@ -31,11 +31,16 @@
...
@@ -31,11 +31,16 @@
this.$prompt('请输入邮箱', '提示', {
this.$prompt('请输入邮箱', '提示', {
inputPattern: /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/,
inputPattern: /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/,
inputErrorMessage: '邮箱格式不正确'
inputErrorMessage: '邮箱格式不正确'
}).then(({ value, action }) => {
}).then(({ value }) => {
console.log('action: ', action);
this.$notify({
this.$msgbox('', '你的邮箱是: ' + value);
type: 'success',
message: '你的邮箱是: ' + value
});
}).catch(() => {
}).catch(() => {
this.$msgbox('', '取消输入');
this.$notify({
type: 'info',
messgae: '取消输入'
});
});
});
},
},
...
@@ -46,7 +51,10 @@
...
@@ -46,7 +51,10 @@
message: '这是一段内容, 这是一段内容, 这是一段内容, 这是一段内容, 这是一段内容, 这是一段内容, 这是一段内容',
message: '这是一段内容, 这是一段内容, 这是一段内容, 这是一段内容, 这是一段内容, 这是一段内容, 这是一段内容',
showCancelButton: true
showCancelButton: true
}).then(action => {
}).then(action => {
this.$msgbox('', 'action: ' + action);
this.$notify({
type: 'info',
message: 'action: ' + action
});
});
});
}
}
...
@@ -124,12 +132,14 @@ MessageBox 组件也拥有极高的定制性,我们可以传入`options`作为
...
@@ -124,12 +132,14 @@ MessageBox 组件也拥有极高的定制性,我们可以传入`options`作为
this
.
$confirm
(
'
此操作将永久删除该文件, 是否继续?
'
,
'
提示
'
,
{
this
.
$confirm
(
'
此操作将永久删除该文件, 是否继续?
'
,
'
提示
'
,
{
type
:
'
warning
'
type
:
'
warning
'
}).
then
(()
=>
{
}).
then
(()
=>
{
this
.
$alert
(
'
删除成功!
'
,{
this
.
$notify
({
type
:
'
success
'
type
:
'
success
'
,
message
:
'
删除成功!
'
});
});
}).
catch
(()
=>
{
}).
catch
(()
=>
{
this
.
$alert
(
'
已取消删除
'
,
{
this
.
$notify
({
type
:
'
info
'
type
:
'
info
'
,
message
:
'
已取消删除
'
});
});
});
});
},
},
...
@@ -157,9 +167,15 @@ Prompt 框功能强大,可以处理简单的输入,甚至你可以用`inputP
...
@@ -157,9 +167,15 @@ Prompt 框功能强大,可以处理简单的输入,甚至你可以用`inputP
inputPattern
:
/
[\w
!#$%&'*+
/
=?^_`{|}~-
]
+
(?:\.[\w
!#$%&'*+
/
=?^_`{|}~-
]
+
)
*@
(?:[\w](?:[\w
-
]
*
[\w])?\.)
+
[\w](?:[\w
-
]
*
[\w])?
/
,
inputPattern
:
/
[\w
!#$%&'*+
/
=?^_`{|}~-
]
+
(?:\.[\w
!#$%&'*+
/
=?^_`{|}~-
]
+
)
*@
(?:[\w](?:[\w
-
]
*
[\w])?\.)
+
[\w](?:[\w
-
]
*
[\w])?
/
,
inputErrorMessage
:
'
邮箱格式不正确
'
inputErrorMessage
:
'
邮箱格式不正确
'
}).
then
(
value
=>
{
}).
then
(
value
=>
{
this
.
$alert
(
'
你的邮箱是:
'
+
value
);
this
.
$notify
({
type
:
'
success
'
,
message
:
'
你的邮箱是:
'
+
value
});
}).
catch
(()
=>
{
}).
catch
(()
=>
{
this
.
$alert
(
'
取消输入
'
);
this
.
$notify
({
type
:
'
info
'
,
message
:
'
取消输入
'
});
});
});
}
}
}
}
...
@@ -187,7 +203,10 @@ Msgbox 框是最基本的弹框,与 Alert 的区别在于 Alert 无法通过 E
...
@@ -187,7 +203,10 @@ Msgbox 框是最基本的弹框,与 Alert 的区别在于 Alert 无法通过 E
message
:
'
这是一段内容, 这是一段内容, 这是一段内容, 这是一段内容, 这是一段内容, 这是一段内容, 这是一段内容
'
,
message
:
'
这是一段内容, 这是一段内容, 这是一段内容, 这是一段内容, 这是一段内容, 这是一段内容, 这是一段内容
'
,
showCancelButton
:
true
showCancelButton
:
true
}).
then
(
action
=>
{
}).
then
(
action
=>
{
this
.
$alert
(
'
action:
'
+
action
);
this
.
$notify
({
type
:
'
info
'
,
message
:
'
action:
'
+
action
});
});
});
},
},
}
}
...
...
examples/docs/select.md
View file @
4a6765c2
This diff is collapsed.
Click to expand it.
examples/docs/slider.md
View file @
4a6765c2
...
@@ -10,11 +10,6 @@
...
@@ -10,11 +10,6 @@
value6: null,
value6: null,
value7: null
value7: null
};
};
},
methods: {
onChange(value) {
console.log(value);
}
}
}
}
}
</script>
</script>
...
@@ -67,27 +62,6 @@
...
@@ -67,27 +62,6 @@
<el-slider
show-input
v-model=
"value6"
></el-slider>
<el-slider
show-input
v-model=
"value6"
></el-slider>
```
```
## 回调函数
<el-slider
@
change=
"onChange"
v-model=
"value7"
></el-slider>
```
html
<template>
<el-slider
@
change=
"onChange"
></el-slider>
</template>
<script>
export
default
{
methods
:
{
onChange
(
value
)
{
console
.
log
(
value
);
}
}
}
</script>
```
## API
## API
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|---------- |-------------- |---------- |-------------------------------- |-------- |
|---------- |-------------- |---------- |-------------------------------- |-------- |
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment