File tree Expand file tree Collapse file tree 3 files changed +21
-12
lines changed Expand file tree Collapse file tree 3 files changed +21
-12
lines changed Original file line number Diff line number Diff line change 261
261
</thead >
262
262
<tbody >
263
263
<tr >
264
- <td >multiple < i class = " vd-demo__new " >(特殊标识)</ i > </td >
264
+ <td >multiple</td >
265
265
<td >是否同时展示多个示例</td >
266
266
<td >boolean</td >
267
267
<td >—</td >
329
329
<th >参数</th >
330
330
<th >说明</th >
331
331
</thead >
332
- <tbody >
332
+ <tbody >
333
+ <tr >
334
+ <td >title <i class =" vd-demo__new" >(1.0.1 新增)</i ></td >
335
+ <td >标题</td >
336
+ </tr >
333
337
<tr >
334
338
<td >description</td >
335
339
<td >标题描述</td >
Original file line number Diff line number Diff line change 3
3
<vd-demo-title
4
4
:title =" title"
5
5
:anchor =" anchor"
6
- :tag =" tag" ></vd-demo-title >
6
+ :tag =" tag"
7
+ :has-slot =" !!$slots.title" ></vd-demo-title >
7
8
<vd-demo-description
8
9
:description =" description"
9
10
:has-slot =" !!$slots.description" >
53
54
type: String ,
54
55
default: ' '
55
56
},
56
- title: String ,
57
- description: String ,
57
+ title: {
58
+ type: String ,
59
+ default: ' '
60
+ },
61
+ description: {
62
+ type: String ,
63
+ default: ' '
64
+ },
58
65
showContent: {
59
66
type: Boolean ,
60
67
default: true
101
108
props: {
102
109
title: String ,
103
110
anchor: String ,
104
- tag: String
111
+ tag: String ,
112
+ hasSlot: Boolean
105
113
},
106
114
render (h ) {
107
- if (this .title ) {
108
- return h (this .tag , {
115
+ return h (this .tag , {
109
116
attrs: {
110
117
id: this .anchor
111
118
}
121
128
innerHTML: ' ¶'
122
129
}
123
130
}),
124
- this .title
131
+ this .title ? this . title : ( this . hasSlot ? this . $parent . $slots . title : ' ' )
125
132
])
126
- }
127
- return ' '
128
133
}
129
134
},
130
135
' vd-demo-description' : {
You can’t perform that action at this time.
0 commit comments