File tree 1 file changed +8
-4
lines changed
packages/uni-mp-vue/src/helpers
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -6,20 +6,24 @@ function hasIdProp(_ctx: any): boolean {
6
6
)
7
7
}
8
8
9
- function hasVirtualHostId ( _ctx : any ) : boolean {
9
+ function getVirtualHostId ( _ctx : any ) : string {
10
10
// #if _X_
11
- return _ctx . virtualHostId !== ''
11
+ return _ctx . virtualHostId
12
12
// #endif
13
13
// #if !_X_
14
- return _ctx . $scope . virtualHostId !== ''
14
+ return _ctx . $scope . virtualHostId
15
15
// #endif
16
16
}
17
17
18
+ function hasVirtualHostId ( _ctx : any ) : boolean {
19
+ return ! ! getVirtualHostId ( _ctx )
20
+ }
21
+
18
22
function genIdWithVirtualHost ( _ctx : any , idBinding : string ) : string {
19
23
if ( ! hasVirtualHostId ( _ctx ) || hasIdProp ( _ctx ) ) {
20
24
return idBinding
21
25
}
22
- return _ctx . virtualHostId
26
+ return getVirtualHostId ( _ctx )
23
27
}
24
28
25
29
export function genUniElementId (
You can’t perform that action at this time.
0 commit comments