@tarojs/runtime 3.3.16 → 3.3.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/runtime.esm.js +8 -8
- package/dist/runtime.esm.js.map +1 -1
- package/package.json +4 -4
package/dist/runtime.esm.js
CHANGED
|
@@ -2141,7 +2141,7 @@ let TaroElement = class TaroElement extends TaroNode {
|
|
|
2141
2141
|
qualifiedName = shortcutAttr(qualifiedName);
|
|
2142
2142
|
const payload = {
|
|
2143
2143
|
path: `${this._path}.${toCamelCase(qualifiedName)}`,
|
|
2144
|
-
value
|
|
2144
|
+
value: isFunction$1(value) ? () => value : value
|
|
2145
2145
|
};
|
|
2146
2146
|
(_b = (_a = this.hooks).modifySetAttrPayload) === null || _b === void 0 ? void 0 : _b.call(_a, this, qualifiedName, payload);
|
|
2147
2147
|
this.enqueueUpdate(payload);
|
|
@@ -3971,8 +3971,12 @@ class StyleTagParser {
|
|
|
3971
3971
|
// console.log('res this.styles: ', this.styles)
|
|
3972
3972
|
}
|
|
3973
3973
|
parseSelector(src) {
|
|
3974
|
-
|
|
3975
|
-
|
|
3974
|
+
const list = src
|
|
3975
|
+
.trim()
|
|
3976
|
+
.replace(/ *([>~+]) */g, ' $1')
|
|
3977
|
+
.replace(/ +/g, ' ')
|
|
3978
|
+
.replace(/\[\s*([^[\]=\s]+)\s*=\s*([^[\]=\s]+)\s*\]/g, '[$1=$2]')
|
|
3979
|
+
.split(' ');
|
|
3976
3980
|
const selectors = list.map(item => {
|
|
3977
3981
|
const firstChar = item.charAt(0);
|
|
3978
3982
|
const selector = {
|
|
@@ -5189,7 +5193,7 @@ function createPageConfig(component, pageName, data, pageConfig) {
|
|
|
5189
5193
|
let loadResolver;
|
|
5190
5194
|
let hasLoaded;
|
|
5191
5195
|
const config = {
|
|
5192
|
-
onLoad(options, cb) {
|
|
5196
|
+
onLoad(options = {}, cb) {
|
|
5193
5197
|
hasLoaded = new Promise(resolve => { loadResolver = resolve; });
|
|
5194
5198
|
perf.start(PAGE_INIT);
|
|
5195
5199
|
Current.page = this;
|
|
@@ -5976,10 +5980,6 @@ function createVue3Page(h, id) {
|
|
|
5976
5980
|
},
|
|
5977
5981
|
created() {
|
|
5978
5982
|
injectPageInstance(this, id);
|
|
5979
|
-
// vue3 组件 created 时机比小程序页面 onShow 慢,因此在 created 后再手动触发一次 onShow。
|
|
5980
|
-
this.$nextTick(() => {
|
|
5981
|
-
safeExecute(id, 'onShow');
|
|
5982
|
-
});
|
|
5983
5983
|
}
|
|
5984
5984
|
};
|
|
5985
5985
|
if (isArray$1(component.mixins)) {
|