File tree Expand file tree Collapse file tree 18 files changed +1596
-157
lines changed Expand file tree Collapse file tree 18 files changed +1596
-157
lines changed Original file line number Diff line number Diff line change 7
7
<browser-window
8
8
v-if =" browser"
9
9
:url =" browser"
10
- width =" 80% "
10
+ width =" calc(100% - 40px) "
11
11
height =" 400px"
12
12
>
13
13
<slot />
86
86
}"
87
87
:code =" code"
88
88
:expanded =" editorExpanded"
89
+ :browser =" !!browser"
89
90
@close =" handleEditorClose"
90
91
@toggle =" handleEditorToggle"
91
92
/>
@@ -221,6 +222,10 @@ Icon.register({
221
222
border- top- right- radius 4px
222
223
padding 30px
223
224
225
+ & >>> .style - module_body__14MV-
226
+ transform translate (0 , 0 )
227
+ padding 0
228
+
224
229
.desc
225
230
border 1px solid #eee
226
231
padding 18px 20px
Original file line number Diff line number Diff line change 64
64
<v-pane
65
65
min-size =" 40"
66
66
class =" live-preview"
67
+ :class =" {
68
+ 'live-preview-browser': browser
69
+ }"
67
70
>
68
71
<v-live-preview
69
72
class =" editor-preview"
@@ -166,7 +169,8 @@ export default {
166
169
code: {
167
170
type: String ,
168
171
default: ' '
169
- }
172
+ },
173
+ browser: Boolean
170
174
},
171
175
data () {
172
176
return {
@@ -321,6 +325,10 @@ export default {
321
325
& >>> .live-preview
322
326
overflow auto
323
327
328
+ .live-preview-browser
329
+ transform translate (0 , 0 )
330
+ padding 0 !important
331
+
324
332
.editor-toolbar
325
333
position absolute
326
334
top 12px
Original file line number Diff line number Diff line change 21
21
<one-live
22
22
class =" editor"
23
23
:code =" code"
24
+ :browser =" browser"
24
25
/>
25
26
</article >
26
27
</template >
@@ -60,7 +61,8 @@ export default {
60
61
type: String ,
61
62
default: ' '
62
63
},
63
- expanded: Boolean
64
+ expanded: Boolean ,
65
+ browser: Boolean
64
66
},
65
67
methods: {
66
68
handleClose () {
Original file line number Diff line number Diff line change 10
10
11
11
` Layout ` 组件支持多种典型布局。
12
12
13
- [[ demo src="/demo/layout/basic.vue" ]]
13
+ [[ demo src="/demo/layout/basic.vue" browser="/demos/layout/basic.vue" ]]
14
14
15
15
### 通顶侧边栏
16
16
17
- [[ demo src="/demo/layout/global-sidebar.vue" ]]
17
+ [[ demo src="/demo/layout/global-sidebar.vue" browser="/demos/layout/global-sidebar.vue" ]]
18
18
19
19
### 通栏底部
20
20
21
- [[ demo src="/demo/layout/global-footer.vue" ]]
21
+ [[ demo src="/demo/layout/global-footer.vue" browser="/demos/layout/global-footer.vue" ]]
22
22
23
23
### 吸顶/吸底布局
24
24
32
32
当吸底的布局底部和吸顶侧边栏一起使用需要在布局底部的父组件 ` Layout ` 上设置 ` --dls-layout-footer-height ` 来指定布局底部的高度。
33
33
:::
34
34
35
- [[ demo src="/demo/layout/sticky.vue" ]]
35
+ [[ demo src="/demo/layout/sticky.vue" browser="/demos/layout/sticky.vue" ]]
36
36
37
37
## API
38
38
Original file line number Diff line number Diff line change 1
- # Menu <small >边栏菜单</small >
1
+ # Sidenav <small >边栏菜单</small >
2
2
3
3
## 示例
4
4
5
5
### 普通
6
6
7
7
结合 Vue Router 使用边栏菜单。
8
8
9
- [[ demo src="/demo/menu /normal.vue" ]]
9
+ [[ demo src="/demo/sidenav /normal.vue" ]]
10
10
11
11
### 可折叠
12
12
13
- 使用 [ ` collapsible ` ] ( #props-collapsible ) 属性控制菜单是否可以折叠 。
13
+ 配合 ` Sidebar ` 的 [ ` collapsible ` ] ( ./sidebar #props-collapsible) 属性可以控制菜单的展开/收起 。
14
14
15
- [[ demo src="/demo/menu /collaspible.vue" ]]
15
+ [[ demo src="/demo/sidenav/collaspible.vue" browser="/demo/sidenav /collaspible.vue" ]]
16
16
17
17
### 自定义插槽
18
18
19
- [[ demo src="/demo/menu /slot.vue" ]]
19
+ [[ demo src="/demo/sidenav /slot.vue" ]]
20
20
21
21
## API
22
22
28
28
| `` items `` | ` Array<Object>= ` | ` [] ` | [ ^ items ] |
29
29
| `` active `` | ` string ` | - | [ ^ active ] |
30
30
| `` matches `` | ` function(Object, string): boolean ` | - | [ ^ matches ] |
31
- | `` collapsible `` | ` boolean ` | ` false ` | 整个导航菜单是否可折叠。 |
32
31
| `` collapsed `` | ` boolean ` | ` false ` | [ ^ collapsed ] |
33
32
| `` expanded `` | ` Array<string>= ` | ` [] ` | [ ^ expanded ] |
34
33
139
138
| -- | -- |
140
139
| `` activate `` | 用户点击有 ` to ` 的节点触发,参数是激活节点的整个 ` item ` 数据。 |
141
140
| `` click `` | 用户点击节点时触发,参数是激活节点整个 ` item ` 数据。 |
142
-
143
- ### 图标
144
- | 名称 | 描述 |
145
- | -- | -- |
146
- | `` expand `` | 展开。 |
147
- | `` collapse `` | 折叠。 |
Original file line number Diff line number Diff line change 10
10
>
11
11
<template #default =" { invalid , listeners } " >
12
12
<input
13
+ v-model =" formData.name"
13
14
:class =" {
14
15
'demo-invalid': invalid
15
16
}"
16
- v-model =" formData.name"
17
17
v-on =" listeners"
18
18
>
19
19
</template >
Original file line number Diff line number Diff line change @@ -64,6 +64,10 @@ export default {
64
64
</script >
65
65
66
66
<style lang="less" scoped>
67
+ article {
68
+ padding : 10px 12px ;
69
+ }
70
+
67
71
.veui-grid-row {
68
72
& + & {
69
73
margin : 2px 0 ; /* Just for showcase */
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ export default {
53
53
<style lang="less" scoped>
54
54
article {
55
55
width : 400px ; /* Fixed-width container */
56
+ padding : 10px 12px ;
56
57
}
57
58
58
59
.veui-grid-row {
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<article >
3
- <div class =" mock-window" >
3
+ <veui-layout >
4
+ <veui-header >Header</veui-header >
4
5
<veui-layout >
5
- <veui-header >Header</veui-header >
6
+ <veui-sidebar >
7
+ <div class =" center full" >
8
+ Sidebar
9
+ </div >
10
+ </veui-sidebar >
6
11
<veui-layout >
7
- <veui-sidebar >
8
- <div class =" center full" >Sidebar</div >
9
- </veui-sidebar >
10
- <veui-layout >
11
- <veui-content >Content</veui-content >
12
- <veui-footer style =" background : #ccc ;" >Footer(背景仅为演示)</veui-footer >
13
- </veui-layout >
12
+ <veui-content >Content</veui-content >
13
+ <veui-footer style =" background : #ccc ;" >
14
+ Footer(背景仅为演示)
15
+ </veui-footer >
14
16
</veui-layout >
15
17
</veui-layout >
16
- </div >
18
+ </veui-layout >
17
19
</article >
18
20
</template >
19
21
@@ -32,12 +34,11 @@ export default {
32
34
</script >
33
35
34
36
<style lang="less" scoped>
35
- .mock-window {
36
- height : 384px ;
37
- transform : translate (0 , 0 ); // bfc for fixed
37
+ article {
38
+ height : 100% ;
38
39
39
40
& > .veui-layout {
40
- min-width : 860 px ;
41
+ min-width : 720 px ;
41
42
}
42
43
}
43
44
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<article >
3
- <div class =" mock-window" >
3
+ <veui-layout >
4
+ <veui-header >Header</veui-header >
4
5
<veui-layout >
5
- <veui-header >Header</veui-header >
6
+ <veui-sidebar >
7
+ <div class =" center full" >
8
+ Sidebar
9
+ </div >
10
+ </veui-sidebar >
6
11
<veui-layout >
7
- <veui-sidebar >
8
- <div class =" center full" >Sidebar</div >
9
- </veui-sidebar >
10
- <veui-layout >
11
- <veui-content >Content</veui-content >
12
- </veui-layout >
12
+ <veui-content >Content</veui-content >
13
13
</veui-layout >
14
- <veui-footer style =" background : #ccc ;" >Footer(背景仅为演示)</veui-footer >
15
14
</veui-layout >
16
- </div >
15
+ <veui-footer style =" background : #ccc ;" >
16
+ Footer(背景仅为演示)
17
+ </veui-footer >
18
+ </veui-layout >
17
19
</article >
18
20
</template >
19
21
@@ -36,12 +38,11 @@ export default {
36
38
</script >
37
39
38
40
<style lang="less" scoped>
39
- .mock-window {
40
- height : 384px ;
41
- transform : translate (0 , 0 ); // bfc for fixed
41
+ article {
42
+ height : 100% ;
42
43
43
44
& > .veui-layout {
44
- min-width : 860 px ;
45
+ min-width : 720 px ;
45
46
}
46
47
}
47
48
You can’t perform that action at this time.
0 commit comments