File tree Expand file tree Collapse file tree 2 files changed +20
-17
lines changed Expand file tree Collapse file tree 2 files changed +20
-17
lines changed Original file line number Diff line number Diff line change @@ -72,25 +72,23 @@ export function createModule(app: App) {
72
72
73
73
if ( d ) {
74
74
Object . assign ( e , d ) ;
75
-
76
- // 注册组件
77
- e . components ?. forEach ( async ( c : any ) => {
78
- const v = await ( isFunction ( c ) ? c ( ) : c ) ;
79
- const n = v . default || v ;
80
- app . component ( n . name , n ) ;
81
- } ) ;
82
-
83
- // 注册指令
84
- e . directives ?. forEach ( ( v ) => {
85
- app . directive ( v . name , v . value ) ;
86
- } ) ;
87
-
88
- // 安装事件
89
- if ( d . install ) {
90
- d . install ( app , d . options ) ;
91
- }
92
75
}
93
76
77
+ // 安装事件
78
+ e . install ?.( app , d . options ) ;
79
+
80
+ // 注册组件
81
+ e . components ?. forEach ( async ( c : any ) => {
82
+ const v = await ( isFunction ( c ) ? c ( ) : c ) ;
83
+ const n = v . default || v ;
84
+ app . component ( n . name , n ) ;
85
+ } ) ;
86
+
87
+ // 注册指令
88
+ e . directives ?. forEach ( ( v ) => {
89
+ app . directive ( v . name , v . value ) ;
90
+ } ) ;
91
+
94
92
// 合并
95
93
deepMerge ( service , mergeService ( e . services || [ ] ) ) ;
96
94
Original file line number Diff line number Diff line change
1
+ export default {
2
+ created ( el : HTMLElement , binding : any ) {
3
+ el . style . color = binding . value ;
4
+ }
5
+ } ;
You can’t perform that action at this time.
0 commit comments