File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
uni-mp-alipay/src/compiler Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ export const miniProgram: MiniProgramCompilerOptions = {
5252 } ,
5353 directive : 'a:' ,
5454 component : {
55- // 支付宝小程序支持 :host 选择器
55+ // 只有组件支持 :host 选择器,还需开启 virtualHost: false (https://opendocs.alipay.com/mini/framework/component-template#%3Ahost%20%E9%80%89%E6%8B%A9%E5%99%A8)
5656 ':host' : true ,
5757 dir : COMPONENTS_DIR ,
5858 getPropertySync : true ,
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ export function createConfigResolved({
150150 const flexDirection = parseUniXFlexDirection (
151151 parseManifestJsonOnce ( process . env . UNI_INPUT_DIR )
152152 )
153- cssCode = `:host{display:flex;flex-direction:${ flexDirection } }\n${ cssCode } `
153+ cssCode = `:host,page {display:flex;flex-direction:${ flexDirection } }\n${ cssCode } `
154154 }
155155
156156 if ( ! isMiniProgramPageFile ( filename ) ) {
You can’t perform that action at this time.
0 commit comments