提交 7698e6f4 编写于 作者: fxy060608's avatar fxy060608

feat(vue3): render

上级 c1c85721
......@@ -98,6 +98,9 @@ function initBaseInstance(instance, options) {
ctx.mpType = options.mpType; // @deprecated
ctx.$mpType = options.mpType;
ctx.$scope = options.mpInstance;
// TODO @deprecated
ctx.$mp = {};
ctx._self = {};
// $vm
ctx.$scope.$vm = instance.proxy;
// slots
......
......@@ -91,6 +91,9 @@ function initBaseInstance(instance, options) {
ctx.mpType = options.mpType; // @deprecated
ctx.$mpType = options.mpType;
ctx.$scope = options.mpInstance;
// TODO @deprecated
ctx.$mp = {};
ctx._self = {};
// $vm
ctx.$scope.$vm = instance.proxy;
// slots
......
......@@ -91,6 +91,9 @@ function initBaseInstance(instance, options) {
ctx.mpType = options.mpType; // @deprecated
ctx.$mpType = options.mpType;
ctx.$scope = options.mpInstance;
// TODO @deprecated
ctx.$mp = {};
ctx._self = {};
// $vm
ctx.$scope.$vm = instance.proxy;
// slots
......
......@@ -91,6 +91,9 @@ function initBaseInstance(instance, options) {
ctx.mpType = options.mpType; // @deprecated
ctx.$mpType = options.mpType;
ctx.$scope = options.mpInstance;
// TODO @deprecated
ctx.$mp = {};
ctx._self = {};
// $vm
ctx.$scope.$vm = instance.proxy;
// slots
......
......@@ -3043,6 +3043,11 @@ function getVueInstanceData(instance) {
});
}
}
if (ctx.$mp) {
// TODO
extend(ret, ctx.$mp.data || {});
}
// TODO form-field
// track
return { keys, data: JSON.parse(JSON.stringify(ret)) };
}
......@@ -3169,9 +3174,11 @@ function setupRenderEffect(instance) {
// create reactive effect for rendering
instance.update = effect(function componentEffect() {
if (!instance.isMounted) {
instance.render && instance.render.call(instance.proxy);
patch(instance);
}
else {
instance.render && instance.render.call(instance.proxy);
// updateComponent
const { bu, u } = instance;
// beforeUpdate hook
......
......@@ -91,6 +91,9 @@ function initBaseInstance(instance, options) {
ctx.mpType = options.mpType; // @deprecated
ctx.$mpType = options.mpType;
ctx.$scope = options.mpInstance;
// TODO @deprecated
ctx.$mp = {};
ctx._self = {};
// $vm
ctx.$scope.$vm = instance.proxy;
// slots
......
......@@ -91,6 +91,9 @@ function initBaseInstance(instance, options) {
ctx.mpType = options.mpType; // @deprecated
ctx.$mpType = options.mpType;
ctx.$scope = options.mpInstance;
// TODO @deprecated
ctx.$mp = {};
ctx._self = {};
// $vm
ctx.$scope.$vm = instance.proxy;
// slots
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册