* zin: export page config to js var

This commit is contained in:
Hao Sun
2023-03-29 09:34:57 +08:00
parent b8a1fc7c5e
commit ffc1b5aaef
+2
View File
@@ -43,6 +43,7 @@ class pagebase extends wg
$css = $context->getCssList();
$js = $context->getJsList();
$imports = $context->getImportList();
$jsConfig = \js::getJSConfigVars();
return h::html
(
@@ -65,6 +66,7 @@ class pagebase extends wg
'return Component ? new Component(element, options) : null;',
'};'
) : null,
h::jsVar('window.config', $jsConfig),
empty($imports) ? NULL : h::import($imports),
$head,
empty($css) ? NULL : h::css($css)