File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 11import '@abraham/reflection'
2- import { Component , Mut , VueComponent } from 'vue3-oop'
2+ import { Component , Hook , Mut , VueComponent } from 'vue3-oop'
33import { createApp } from 'vue'
44import 'ant-design-vue/dist/antd.css'
55import { ConfigProvider , Layout , Menu } from 'ant-design-vue'
@@ -13,12 +13,20 @@ import { setup } from './setup'
1313class App extends VueComponent {
1414 @Mut ( ) collapsed = false
1515
16+ @Hook ( 'ErrorCaptured' )
17+ error ( ...args : any [ ] ) {
18+ console . log ( args )
19+ }
20+
1621 render ( ) {
1722 return (
1823 < ConfigProvider locale = { zhCN } >
1924 < Layout style = { { minHeight : '100vh' } } >
2025 < Layout . Sider v-model :collapsed = { this . collapsed } collapsible >
2126 < h2
27+ onClick = { ( ) => {
28+ throw new Error ( 'hahaha' )
29+ } }
2230 style = { { color : '#fff' , textAlign : 'center' , lineHeight : '40px' } }
2331 >
2432 VUE 示例
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ function handler(targetThis: any) {
9191 break
9292 }
9393 doneLife [ option ] = true
94- vueFn ( ( ) => targetThis [ item . key ] ( ) )
94+ vueFn ( ( ... args : any [ ] ) => targetThis [ item . key ] ( ... args ) )
9595 }
9696 }
9797}
You can’t perform that action at this time.
0 commit comments