提交 78f11e40 编写于 作者: fxy060608's avatar fxy060608

fix(v3): injectStyles()

上级 23914717
...@@ -91,16 +91,17 @@ function getStylesCode(loaderContext) { ...@@ -91,16 +91,17 @@ function getStylesCode(loaderContext) {
module.exports = function(source, map) { module.exports = function(source, map) {
return ` return `
import 'uni-pages' import 'uni-pages'
function initView(){ function initView(){
${getStylesCode(this)} ${getStylesCode(this)}
injectStyles()
${getDefineComponents(parseComponents(source, traverse)).join('\n')} ${getDefineComponents(parseComponents(source, traverse)).join('\n')}
UniViewJSBridge.publishHandler('webviewReady') UniViewJSBridge.publishHandler('webviewReady')
} }
if(typeof plus !== 'undefined'){ if(typeof plus !== 'undefined'){
initView() initView()
} else { } else {
document.addEventListener('plusready',initView) document.addEventListener('plusready',initView)
} }
` `
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册