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

chore: build

上级 052822a9
......@@ -550,10 +550,8 @@ function hasPropsChanged(prevProps, nextProps, checkLen = true) {
}
return false;
}
function initBehaviors(vueOptions, initBehavior) {
function initBehaviors(vueOptions) {
const vueBehaviors = vueOptions.behaviors;
const vueExtends = vueOptions.extends;
const vueMixins = vueOptions.mixins;
let vueProps = vueOptions.props;
if (!vueProps) {
vueOptions.props = vueProps = [];
......@@ -580,18 +578,6 @@ function initBehaviors(vueOptions, initBehavior) {
}
});
}
if (vueExtends && vueExtends.props) {
const behavior = {};
behaviors.push(initBehavior(behavior));
}
if (isArray(vueMixins)) {
vueMixins.forEach((vueMixin) => {
if (vueMixin.props) {
const behavior = {};
behaviors.push(initBehavior(behavior));
}
});
}
return behaviors;
}
......@@ -681,15 +667,6 @@ const customizeRE = /:/g;
function customize(str) {
return camelize(str.replace(customizeRE, '-'));
}
function initBehavior({ properties }) {
const props = {};
Object.keys(properties).forEach((key) => {
props[key] = properties[key].value;
});
return {
props,
};
}
function initRelation(mpInstance, detail) {
// onVueInit
mpInstance.props.onVI(detail);
......@@ -981,7 +958,7 @@ function initCreateComponent() {
};
if (__VUE_OPTIONS_API__) {
mpComponentOptions.data = initData();
mpComponentOptions.mixins = initBehaviors(vueOptions, initBehavior);
mpComponentOptions.mixins = initBehaviors(vueOptions);
}
if (isComponent2) {
mpComponentOptions.onInit = function onInit() {
......
......@@ -468,9 +468,6 @@ function initLocale(appVm) {
});
}
function initBehavior(options) {
return Behavior(options);
}
function initVueIds(vueIds, mpInstance) {
if (!vueIds) {
return;
......@@ -772,10 +769,8 @@ function hasPropsChanged(prevProps, nextProps, checkLen = true) {
}
return false;
}
function initBehaviors(vueOptions, initBehavior) {
function initBehaviors(vueOptions) {
const vueBehaviors = vueOptions.behaviors;
const vueExtends = vueOptions.extends;
const vueMixins = vueOptions.mixins;
let vueProps = vueOptions.props;
if (!vueProps) {
vueOptions.props = vueProps = [];
......@@ -802,23 +797,11 @@ function initBehaviors(vueOptions, initBehavior) {
}
});
}
if (vueExtends && vueExtends.props) {
const behavior = {};
behaviors.push(initBehavior(behavior));
}
if (isArray(vueMixins)) {
vueMixins.forEach((vueMixin) => {
if (vueMixin.props) {
const behavior = {};
behaviors.push(initBehavior(behavior));
}
});
}
return behaviors;
}
function applyOptions(componentOptions, vueOptions, initBehavior) {
function applyOptions(componentOptions, vueOptions) {
componentOptions.data = initData();
componentOptions.behaviors = initBehaviors(vueOptions, initBehavior);
componentOptions.behaviors = initBehaviors(vueOptions);
}
function parseComponent(vueOptions, { parse, mocks, isPage, initRelation, handleLink, initLifetimes, }) {
......@@ -850,7 +833,7 @@ function parseComponent(vueOptions, { parse, mocks, isPage, initRelation, handle
},
};
if (__VUE_OPTIONS_API__) {
applyOptions(mpComponentOptions, vueOptions, initBehavior);
applyOptions(mpComponentOptions, vueOptions);
}
initProps(mpComponentOptions);
initPropsObserver(mpComponentOptions);
......
......@@ -463,9 +463,6 @@ function initLocale(appVm) {
});
}
function initBehavior(options) {
return Behavior(options);
}
function initVueIds(vueIds, mpInstance) {
if (!vueIds) {
return;
......@@ -756,10 +753,8 @@ function hasPropsChanged(prevProps, nextProps, checkLen = true) {
}
return false;
}
function initBehaviors(vueOptions, initBehavior) {
function initBehaviors(vueOptions) {
const vueBehaviors = vueOptions.behaviors;
const vueExtends = vueOptions.extends;
const vueMixins = vueOptions.mixins;
let vueProps = vueOptions.props;
if (!vueProps) {
vueOptions.props = vueProps = [];
......@@ -786,23 +781,11 @@ function initBehaviors(vueOptions, initBehavior) {
}
});
}
if (vueExtends && vueExtends.props) {
const behavior = {};
behaviors.push(initBehavior(behavior));
}
if (isArray(vueMixins)) {
vueMixins.forEach((vueMixin) => {
if (vueMixin.props) {
const behavior = {};
behaviors.push(initBehavior(behavior));
}
});
}
return behaviors;
}
function applyOptions(componentOptions, vueOptions, initBehavior) {
function applyOptions(componentOptions, vueOptions) {
componentOptions.data = initData();
componentOptions.behaviors = initBehaviors(vueOptions, initBehavior);
componentOptions.behaviors = initBehaviors(vueOptions);
}
function parseComponent(vueOptions, { parse, mocks, isPage, initRelation, handleLink, initLifetimes, }) {
......@@ -834,7 +817,7 @@ function parseComponent(vueOptions, { parse, mocks, isPage, initRelation, handle
},
};
if (__VUE_OPTIONS_API__) {
applyOptions(mpComponentOptions, vueOptions, initBehavior);
applyOptions(mpComponentOptions, vueOptions);
}
initProps(mpComponentOptions);
initPropsObserver(mpComponentOptions);
......
......@@ -462,9 +462,6 @@ function initLocale(appVm) {
});
}
function initBehavior(options) {
return Behavior(options);
}
function initVueIds(vueIds, mpInstance) {
if (!vueIds) {
return;
......@@ -729,10 +726,8 @@ function hasPropsChanged(prevProps, nextProps, checkLen = true) {
}
return false;
}
function initBehaviors(vueOptions, initBehavior) {
function initBehaviors(vueOptions) {
const vueBehaviors = vueOptions.behaviors;
const vueExtends = vueOptions.extends;
const vueMixins = vueOptions.mixins;
let vueProps = vueOptions.props;
if (!vueProps) {
vueOptions.props = vueProps = [];
......@@ -759,23 +754,11 @@ function initBehaviors(vueOptions, initBehavior) {
}
});
}
if (vueExtends && vueExtends.props) {
const behavior = {};
behaviors.push(initBehavior(behavior));
}
if (isArray(vueMixins)) {
vueMixins.forEach((vueMixin) => {
if (vueMixin.props) {
const behavior = {};
behaviors.push(initBehavior(behavior));
}
});
}
return behaviors;
}
function applyOptions(componentOptions, vueOptions, initBehavior) {
function applyOptions(componentOptions, vueOptions) {
componentOptions.data = initData();
componentOptions.behaviors = initBehaviors(vueOptions, initBehavior);
componentOptions.behaviors = initBehaviors(vueOptions);
}
function parseComponent(vueOptions, { parse, mocks, isPage, initRelation, handleLink, initLifetimes, }) {
......@@ -807,7 +790,7 @@ function parseComponent(vueOptions, { parse, mocks, isPage, initRelation, handle
},
};
if (__VUE_OPTIONS_API__) {
applyOptions(mpComponentOptions, vueOptions, initBehavior);
applyOptions(mpComponentOptions, vueOptions);
}
initProps(mpComponentOptions);
initPropsObserver(mpComponentOptions);
......
......@@ -459,9 +459,6 @@ function initLocale(appVm) {
});
}
function initBehavior(options) {
return Behavior(options);
}
function initVueIds(vueIds, mpInstance) {
if (!vueIds) {
return;
......@@ -718,10 +715,8 @@ function hasPropsChanged(prevProps, nextProps, checkLen = true) {
}
return false;
}
function initBehaviors(vueOptions, initBehavior) {
function initBehaviors(vueOptions) {
const vueBehaviors = vueOptions.behaviors;
const vueExtends = vueOptions.extends;
const vueMixins = vueOptions.mixins;
let vueProps = vueOptions.props;
if (!vueProps) {
vueOptions.props = vueProps = [];
......@@ -748,23 +743,11 @@ function initBehaviors(vueOptions, initBehavior) {
}
});
}
if (vueExtends && vueExtends.props) {
const behavior = {};
behaviors.push(initBehavior(behavior));
}
if (isArray(vueMixins)) {
vueMixins.forEach((vueMixin) => {
if (vueMixin.props) {
const behavior = {};
behaviors.push(initBehavior(behavior));
}
});
}
return behaviors;
}
function applyOptions(componentOptions, vueOptions, initBehavior) {
function applyOptions(componentOptions, vueOptions) {
componentOptions.data = initData();
componentOptions.behaviors = initBehaviors(vueOptions, initBehavior);
componentOptions.behaviors = initBehaviors(vueOptions);
}
function parseComponent(vueOptions, { parse, mocks, isPage, initRelation, handleLink, initLifetimes, }) {
......@@ -796,7 +779,7 @@ function parseComponent(vueOptions, { parse, mocks, isPage, initRelation, handle
},
};
if (__VUE_OPTIONS_API__) {
applyOptions(mpComponentOptions, vueOptions, initBehavior);
applyOptions(mpComponentOptions, vueOptions);
}
initProps(mpComponentOptions);
initPropsObserver(mpComponentOptions);
......
......@@ -462,9 +462,6 @@ function initLocale(appVm) {
});
}
function initBehavior(options) {
return Behavior(options);
}
function initVueIds(vueIds, mpInstance) {
if (!vueIds) {
return;
......@@ -729,10 +726,8 @@ function hasPropsChanged(prevProps, nextProps, checkLen = true) {
}
return false;
}
function initBehaviors(vueOptions, initBehavior) {
function initBehaviors(vueOptions) {
const vueBehaviors = vueOptions.behaviors;
const vueExtends = vueOptions.extends;
const vueMixins = vueOptions.mixins;
let vueProps = vueOptions.props;
if (!vueProps) {
vueOptions.props = vueProps = [];
......@@ -759,23 +754,11 @@ function initBehaviors(vueOptions, initBehavior) {
}
});
}
if (vueExtends && vueExtends.props) {
const behavior = {};
behaviors.push(initBehavior(behavior));
}
if (isArray(vueMixins)) {
vueMixins.forEach((vueMixin) => {
if (vueMixin.props) {
const behavior = {};
behaviors.push(initBehavior(behavior));
}
});
}
return behaviors;
}
function applyOptions(componentOptions, vueOptions, initBehavior) {
function applyOptions(componentOptions, vueOptions) {
componentOptions.data = initData();
componentOptions.behaviors = initBehaviors(vueOptions, initBehavior);
componentOptions.behaviors = initBehaviors(vueOptions);
}
function parseComponent(vueOptions, { parse, mocks, isPage, initRelation, handleLink, initLifetimes, }) {
......@@ -807,7 +790,7 @@ function parseComponent(vueOptions, { parse, mocks, isPage, initRelation, handle
},
};
if (__VUE_OPTIONS_API__) {
applyOptions(mpComponentOptions, vueOptions, initBehavior);
applyOptions(mpComponentOptions, vueOptions);
}
initProps(mpComponentOptions);
initPropsObserver(mpComponentOptions);
......
......@@ -331,9 +331,6 @@ function initLocale(appVm) {
});
}
function initBehavior(options) {
return Behavior(options);
}
function initVueIds(vueIds, mpInstance) {
if (!vueIds) {
return;
......@@ -590,10 +587,8 @@ function hasPropsChanged(prevProps, nextProps, checkLen = true) {
}
return false;
}
function initBehaviors(vueOptions, initBehavior) {
function initBehaviors(vueOptions) {
const vueBehaviors = vueOptions.behaviors;
const vueExtends = vueOptions.extends;
const vueMixins = vueOptions.mixins;
let vueProps = vueOptions.props;
if (!vueProps) {
vueOptions.props = vueProps = [];
......@@ -620,23 +615,11 @@ function initBehaviors(vueOptions, initBehavior) {
}
});
}
if (vueExtends && vueExtends.props) {
const behavior = {};
behaviors.push(initBehavior(behavior));
}
if (isArray(vueMixins)) {
vueMixins.forEach((vueMixin) => {
if (vueMixin.props) {
const behavior = {};
behaviors.push(initBehavior(behavior));
}
});
}
return behaviors;
}
function applyOptions(componentOptions, vueOptions, initBehavior) {
function applyOptions(componentOptions, vueOptions) {
componentOptions.data = initData();
componentOptions.behaviors = initBehaviors(vueOptions, initBehavior);
componentOptions.behaviors = initBehaviors(vueOptions);
}
function parseComponent(vueOptions, { parse, mocks, isPage, initRelation, handleLink, initLifetimes, }) {
......@@ -668,7 +651,7 @@ function parseComponent(vueOptions, { parse, mocks, isPage, initRelation, handle
},
};
if (__VUE_OPTIONS_API__) {
applyOptions(mpComponentOptions, vueOptions, initBehavior);
applyOptions(mpComponentOptions, vueOptions);
}
initProps(mpComponentOptions);
initPropsObserver(mpComponentOptions);
......
......@@ -459,9 +459,6 @@ function initLocale(appVm) {
});
}
function initBehavior(options) {
return Behavior(options);
}
function initVueIds(vueIds, mpInstance) {
if (!vueIds) {
return;
......@@ -707,10 +704,8 @@ function hasPropsChanged(prevProps, nextProps, checkLen = true) {
}
return false;
}
function initBehaviors(vueOptions, initBehavior) {
function initBehaviors(vueOptions) {
const vueBehaviors = vueOptions.behaviors;
const vueExtends = vueOptions.extends;
const vueMixins = vueOptions.mixins;
let vueProps = vueOptions.props;
if (!vueProps) {
vueOptions.props = vueProps = [];
......@@ -737,23 +732,11 @@ function initBehaviors(vueOptions, initBehavior) {
}
});
}
if (vueExtends && vueExtends.props) {
const behavior = {};
behaviors.push(initBehavior(behavior));
}
if (isArray(vueMixins)) {
vueMixins.forEach((vueMixin) => {
if (vueMixin.props) {
const behavior = {};
behaviors.push(initBehavior(behavior));
}
});
}
return behaviors;
}
function applyOptions(componentOptions, vueOptions, initBehavior) {
function applyOptions(componentOptions, vueOptions) {
componentOptions.data = initData();
componentOptions.behaviors = initBehaviors(vueOptions, initBehavior);
componentOptions.behaviors = initBehaviors(vueOptions);
}
function parseComponent(vueOptions, { parse, mocks, isPage, initRelation, handleLink, initLifetimes, }) {
......@@ -785,7 +768,7 @@ function parseComponent(vueOptions, { parse, mocks, isPage, initRelation, handle
},
};
if (__VUE_OPTIONS_API__) {
applyOptions(mpComponentOptions, vueOptions, initBehavior);
applyOptions(mpComponentOptions, vueOptions);
}
initProps(mpComponentOptions);
initPropsObserver(mpComponentOptions);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册