88 <Preview :component =" AlertPreview3" />
99 <Preview :component =" AlertPreview4" />
1010 <Preview :component =" AlertPreview5" />
11+ <Doc title =" 属性" type =" prop" :body =" propsDoc" />
12+ <Doc title =" 事件" type =" event" :body =" eventDoc" />
13+ <Doc title =" 插槽" type =" slot" :body =" slotDoc" />
14+ <PrevAndNext
15+ :prev =" { path: '/doc/switch', name: '开关 Switch' }"
16+ :next =" { path: '/doc/dialog', name: '对话框 Dialog' }"
17+ />
1118 </div >
1219 </div >
1320</template >
@@ -19,6 +26,29 @@ import AlertPreview2 from "./AlertPreview2.preview.vue";
1926import AlertPreview3 from " ./AlertPreview3.preview.vue" ;
2027import AlertPreview4 from " ./AlertPreview4.preview.vue" ;
2128import AlertPreview5 from " ./AlertPreview5.preview.vue" ;
29+ import PrevAndNext from " @/components/PrevAndNext.vue" ;
30+ import Doc from " @/components/Doc.vue" ;
31+
32+ const propsDoc = [
33+ [" title" , " 标题" , " string" , " -" , " -" ],
34+ [
35+ " type" ,
36+ " 类型" ,
37+ " string" ,
38+ " default / info / success / warning / error" ,
39+ " default" ,
40+ ],
41+ [" content" , " 辅助性文字" , " string" , " -" , " -" ],
42+ [" closable" , " 是否可关闭" , " boolean" , " -" , " false" ],
43+ [" center" , " 文字是否居中" , " boolean" , " -" , " false" ],
44+ [" show-icon" , " 是否显示图标" , " boolean" , " -" , " false" ],
45+ ];
46+ const eventDoc = [[" close" , " 关闭 Alert 时触发的事件" , " -" ]];
47+ const slotDoc = [
48+ [" default" , " 辅助性文字" ],
49+ [" icon" , " 图标" ],
50+ [" title" , " 标题" ],
51+ ];
2252 </script >
2353
2454<style lang="scss">
0 commit comments