diff --git a/packages/uni-mp-alipay/dist/uni.mp.esm.js b/packages/uni-mp-alipay/dist/uni.mp.esm.js index 840f7b6de0650081c185901ffcf97bfeae1f65f3..8c7e07b0ec5c837175433b0e7de3b0c59a51c8be 100644 --- a/packages/uni-mp-alipay/dist/uni.mp.esm.js +++ b/packages/uni-mp-alipay/dist/uni.mp.esm.js @@ -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() { diff --git a/packages/uni-mp-baidu/dist/uni.mp.esm.js b/packages/uni-mp-baidu/dist/uni.mp.esm.js index 2665fba250f12337b6e7f29c6dd41c5d5b770371..3662851403888e1a94a7fd523592a10a0d6177d6 100644 --- a/packages/uni-mp-baidu/dist/uni.mp.esm.js +++ b/packages/uni-mp-baidu/dist/uni.mp.esm.js @@ -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); diff --git a/packages/uni-mp-kuaishou/dist/uni.mp.esm.js b/packages/uni-mp-kuaishou/dist/uni.mp.esm.js index 4bc82375a294d1df9bc11ae2e80c35f28bd25e10..5b7c9a0c6f2faa15710c0d07319dcbe76392a7de 100644 --- a/packages/uni-mp-kuaishou/dist/uni.mp.esm.js +++ b/packages/uni-mp-kuaishou/dist/uni.mp.esm.js @@ -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); diff --git a/packages/uni-mp-lark/dist/uni.mp.esm.js b/packages/uni-mp-lark/dist/uni.mp.esm.js index e3ae8a71e8664db0ed5a4aa282043e5683e84d76..97328d34c860278aa3a60066f09d2eb85e3bd0fd 100644 --- a/packages/uni-mp-lark/dist/uni.mp.esm.js +++ b/packages/uni-mp-lark/dist/uni.mp.esm.js @@ -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); diff --git a/packages/uni-mp-qq/dist/uni.mp.esm.js b/packages/uni-mp-qq/dist/uni.mp.esm.js index 9dde973c846b8f70dcf091e79fd15b98f065ae12..075b4832e2e44224dfd015f2529d0b0154de4a2e 100644 --- a/packages/uni-mp-qq/dist/uni.mp.esm.js +++ b/packages/uni-mp-qq/dist/uni.mp.esm.js @@ -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); diff --git a/packages/uni-mp-toutiao/dist/uni.mp.esm.js b/packages/uni-mp-toutiao/dist/uni.mp.esm.js index f103af78d719b135927a9d384d567304126dc262..47666428a147bdf8937462e06818a19a67ce079c 100644 --- a/packages/uni-mp-toutiao/dist/uni.mp.esm.js +++ b/packages/uni-mp-toutiao/dist/uni.mp.esm.js @@ -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); diff --git a/packages/uni-mp-weixin/dist/uni.mp.esm.js b/packages/uni-mp-weixin/dist/uni.mp.esm.js index e30d718317062b16db317889f6baf8fad9dcde39..ffa5bb14faa173aff52540a7a7b9e4dbfc132231 100644 --- a/packages/uni-mp-weixin/dist/uni.mp.esm.js +++ b/packages/uni-mp-weixin/dist/uni.mp.esm.js @@ -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); diff --git a/packages/uni-quickapp-webview/dist/uni.mp.esm.js b/packages/uni-quickapp-webview/dist/uni.mp.esm.js index 28b06f3e0e7734df65fd89403a2d418bbea2a064..bedcce36615f69753893c17d5d3f5321af15866c 100644 --- a/packages/uni-quickapp-webview/dist/uni.mp.esm.js +++ b/packages/uni-quickapp-webview/dist/uni.mp.esm.js @@ -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);