This repository was archived by the owner on Jan 18, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -483,10 +483,10 @@ export default function vue(opts: Partial<VuePluginOptions> = {}): Plugin {
483
483
`export * from '${ createVuePartRequest (
484
484
filename ,
485
485
( typeof block . attrs . lang === 'string' && block . attrs . lang ) ||
486
- createVuePartRequest . defaultLang [ block . type ] ||
487
- block . type ,
486
+ createVuePartRequest . defaultLang [ block . type ] ,
488
487
'customBlocks' ,
489
- index
488
+ index ,
489
+ block . type
490
490
) } '`
491
491
} )
492
492
Original file line number Diff line number Diff line change @@ -22,7 +22,13 @@ export interface VuePartRequestMeta {
22
22
}
23
23
24
24
export interface VuePartRequestCreator {
25
- ( filename : string , lang : string , type : string , index ?: number ) : string
25
+ (
26
+ filename : string ,
27
+ lang : string ,
28
+ type : string ,
29
+ index ?: number ,
30
+ blockType ?: string
31
+ ) : string
26
32
27
33
defaultLang : {
28
34
[ key : string ] : string
@@ -68,15 +74,16 @@ export const createVuePartRequest: VuePartRequestCreator = ((
68
74
filename : string ,
69
75
lang : string | undefined ,
70
76
type : string ,
71
- index ?: number
77
+ index ?: number ,
78
+ blockType ?: string
72
79
) : string => {
73
80
lang = lang || createVuePartRequest . defaultLang [ type ]
74
81
75
82
const match = GET_QUERY . exec ( filename )
76
83
77
84
const query = match ? queryString . parse ( match [ 2 ] ) : { }
78
85
79
- query [ PARAM_NAME ] = [ type , index , lang ]
86
+ query [ PARAM_NAME ] = [ type , index , blockType , lang ]
80
87
. filter ( it => it !== undefined )
81
88
. join ( '.' )
82
89
You can’t perform that action at this time.
0 commit comments