File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1
1
import '@abraham/reflection'
2
- import { Component , Mut , VueComponent } from 'vue3-oop'
2
+ import { Component , Hook , Mut , VueComponent } from 'vue3-oop'
3
3
import { createApp } from 'vue'
4
4
import 'ant-design-vue/dist/antd.css'
5
5
import { ConfigProvider , Layout , Menu } from 'ant-design-vue'
@@ -13,12 +13,20 @@ import { setup } from './setup'
13
13
class App extends VueComponent {
14
14
@Mut ( ) collapsed = false
15
15
16
+ @Hook ( 'ErrorCaptured' )
17
+ error ( ...args : any [ ] ) {
18
+ console . log ( args )
19
+ }
20
+
16
21
render ( ) {
17
22
return (
18
23
< ConfigProvider locale = { zhCN } >
19
24
< Layout style = { { minHeight : '100vh' } } >
20
25
< Layout . Sider v-model :collapsed = { this . collapsed } collapsible >
21
26
< h2
27
+ onClick = { ( ) => {
28
+ throw new Error ( 'hahaha' )
29
+ } }
22
30
style = { { color : '#fff' , textAlign : 'center' , lineHeight : '40px' } }
23
31
>
24
32
VUE 示例
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ function handler(targetThis: any) {
91
91
break
92
92
}
93
93
doneLife [ option ] = true
94
- vueFn ( ( ) => targetThis [ item . key ] ( ) )
94
+ vueFn ( ( ... args : any [ ] ) => targetThis [ item . key ] ( ... args ) )
95
95
}
96
96
}
97
97
}
You can’t perform that action at this time.
0 commit comments