提交 7430eb30 编写于 作者: fxy060608's avatar fxy060608

chore: add comments

上级 83f87f89
...@@ -99,8 +99,8 @@ var serviceContext = (function (vue) { ...@@ -99,8 +99,8 @@ var serviceContext = (function (vue) {
map[list[i]] = true; map[list[i]] = true;
} }
return expectsLowerCase ? val => !!map[val.toLowerCase()] : val => !!map[val]; return expectsLowerCase ? val => !!map[val.toLowerCase()] : val => !!map[val];
} }
(process.env.NODE_ENV !== 'production') (process.env.NODE_ENV !== 'production')
? Object.freeze({}) ? Object.freeze({})
: {}; : {};
......
...@@ -82,7 +82,7 @@ export function setupPage(comp: any) { ...@@ -82,7 +82,7 @@ export function setupPage(comp: any) {
comp.__mpType = 'page' comp.__mpType = 'page'
} }
return setupComponent(comp, { return setupComponent(comp, {
clone: true, clone: true, // 页面组件可能会被其他地方手动引用,比如 windows 等,需要 clone 一份新的作为页面组件
init: initPage, init: initPage,
setup(instance) { setup(instance) {
instance.root = instance // 组件 root 指向页面 instance.root = instance // 组件 root 指向页面
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册