Skip to content

Commit 74f0385

Browse files
authored
Update componentdoc.vue
1 parent 3094a28 commit 74f0385

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

docs/components/componentdoc.vue

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,10 @@ export default {
155155
// Regular component
156156
props = component.options.props || {}
157157
}
158+
159+
return props
158160
},
159161
propsFields() {
160-
const component = Vue.options.components[this.component]
161162
const props = this.componentProps
162163
163164
const hasRequired = Object.keys(props).some(p => props[p].required)
@@ -194,12 +195,7 @@ export default {
194195
return [{ key: 'name', label: 'Slot' }, { key: 'description', label: 'Description' }]
195196
},
196197
propsItems() {
197-
const component = Vue.options.components[this.component]
198-
if (!component) {
199-
return []
200-
}
201-
202-
const props = this.componentProps || {}
198+
const props = this.componentProps
203199
204200
return Object.keys(props).map(prop => {
205201
const p = props[prop]

0 commit comments

Comments
 (0)