-
-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathMethodList.vue
More file actions
77 lines (73 loc) · 2.37 KB
/
MethodList.vue
File metadata and controls
77 lines (73 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<template>
<div class="member-list method-list" v-if="methods.length">
<h2 id="methods">
<a href="#methods" class="header-anchor">#</a> Methods
</h2>
<div v-for="(method, index) in methods" :key="method.name">
<div class="member-header" :id="`${method.name.toLowerCase()}`">
<h3 :id="`methods_${method.name.toLowerCase()}`">
<a :href="`#${method.name.toLowerCase()}`" class="header-anchor">#</a> {{method.name}} <Badge v-if="method.deprecated" text="DEPRECATED" type="warn"/>
</h3>
<AvailabilityInfo :platforms="method.platforms"/>
</div>
<FunctionSignature v-bind="method"/>
<DeprecationAlert :deprecated="method.deprecated"/>
<div class="member-summary" v-html="method.summary"></div>
<div class="member-description" v-html="method.description"></div>
<h4 v-if="method.parameters && method.parameters.length">Parameters</h4>
<table v-if="method.parameters && method.parameters.length" class="table parameter-table">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr v-for="parameter in method.parameters" :key="parameter.name">
<td><code>{{parameter.name}}</code></td>
<td><TypeLinks :types="parameter.type"/></td>
<td class="parameter-description">
<div v-html="parameter.summary"></div>
<div v-if="parameter.description" v-html="parameter.description"></div>
</td>
</tr>
</tbody>
</table>
<h4>Returns</h4>
<p v-if="method.returns && method.returns.summary" v-html="method.returns.summary"></p>
<div class="type-info">
<dl>
<dt>Type</dt>
<dd><TypeLinks :types="method.returns"/></dd>
</dl>
</div>
<hr v-if="index < methods.length - 1">
</div>
</div>
</template>
<script>
import AvailabilityInfo from './AvailabilityInfo'
import DeprecationAlert from './DeprecationAlert'
import FunctionSignature from './FunctionSignature'
export default {
components: {
AvailabilityInfo,
DeprecationAlert,
FunctionSignature
},
props: {
methods: {
type: Array,
default: () => []
}
}
}
</script>
<style lang="stylus">
.type-info
dt
display inline-block
dd
display inline-block
</style>