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
f307f7f4
Commit
f307f7f4
authored
Nov 25, 2017
by
Leopoldthecoder
Committed by
杨奕
Nov 25, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cascader: add separator prop
parent
6c400648
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
1 deletion
+7
-1
examples/docs/en-US/cascader.md
examples/docs/en-US/cascader.md
+1
-0
examples/docs/zh-CN/cascader.md
examples/docs/zh-CN/cascader.md
+1
-0
packages/cascader/src/main.vue
packages/cascader/src/main.vue
+5
-1
No files found.
examples/docs/en-US/cascader.md
View file @
f307f7f4
...
@@ -1669,6 +1669,7 @@ Search and select options with a keyword.
...
@@ -1669,6 +1669,7 @@ Search and select options with a keyword.
| options | data of the options | array | — | — |
| options | data of the options | array | — | — |
| props | configuration options, see the following table | object | — | — |
| props | configuration options, see the following table | object | — | — |
| value | selected value | array | — | — |
| value | selected value | array | — | — |
| separator | option separator | string | — | / |
| popper-class | custom class name for Cascader's dropdown | string | — | — |
| popper-class | custom class name for Cascader's dropdown | string | — | — |
| placeholder | input placeholder | string | — | Select |
| placeholder | input placeholder | string | — | Select |
| disabled | whether Cascader is disabled | boolean | — | false |
| disabled | whether Cascader is disabled | boolean | — | false |
...
...
examples/docs/zh-CN/cascader.md
View file @
f307f7f4
...
@@ -1669,6 +1669,7 @@
...
@@ -1669,6 +1669,7 @@
| options | 可选项数据源,键名可通过
`props`
属性配置 | array | — | — |
| options | 可选项数据源,键名可通过
`props`
属性配置 | array | — | — |
| props | 配置选项,具体见下表 | object | — | — |
| props | 配置选项,具体见下表 | object | — | — |
| value | 选中项绑定值 | array | — | — |
| value | 选中项绑定值 | array | — | — |
| separator | 选项分隔符 | string | — | 斜杠'/' |
| popper-class | 自定义浮层类名 | string | — | — |
| popper-class | 自定义浮层类名 | string | — | — |
| placeholder | 输入框占位文本 | string | — | 请选择 |
| placeholder | 输入框占位文本 | string | — | 请选择 |
| disabled | 是否禁用 | boolean | — | false |
| disabled | 是否禁用 | boolean | — | false |
...
...
packages/cascader/src/main.vue
View file @
f307f7f4
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
<
template
v-if=
"showAllLevels"
>
<
template
v-if=
"showAllLevels"
>
<template
v-for=
"(label, index) in currentLabels"
>
<template
v-for=
"(label, index) in currentLabels"
>
{{
label
}}
{{
label
}}
<span
v-if=
"index
<
currentLabels
.
length
-
1
"
>
/
</span>
<span
v-if=
"index
<
currentLabels
.
length
-
1
"
>
{{
separator
}}
</span>
</
template
>
</
template
>
</template>
</template>
<
template
v-else
>
<
template
v-else
>
...
@@ -123,6 +123,10 @@ export default {
...
@@ -123,6 +123,10 @@ export default {
return
[];
return
[];
}
}
},
},
separator
:
{
type
:
String
,
default
:
'
/
'
},
placeholder
:
{
placeholder
:
{
type
:
String
,
type
:
String
,
default
()
{
default
()
{
...
...
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