@tarojs/runtime 3.4.9 → 3.4.12
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/current.d.ts +1 -0
- package/dist/runtime.esm.js +17 -22
- package/dist/runtime.esm.js.map +1 -1
- package/package.json +4 -4
package/dist/current.d.ts
CHANGED
package/dist/runtime.esm.js
CHANGED
|
@@ -1927,6 +1927,7 @@ TaroText = __decorate([
|
|
|
1927
1927
|
*
|
|
1928
1928
|
* https://www.w3.org/Style/CSS/all-properties.en.html
|
|
1929
1929
|
*/
|
|
1930
|
+
const WEBKIT = 'webkit';
|
|
1930
1931
|
const styleProperties = [
|
|
1931
1932
|
'all',
|
|
1932
1933
|
'appearance',
|
|
@@ -2006,6 +2007,9 @@ function combine(prefix, list, excludeSelf) {
|
|
|
2006
2007
|
!excludeSelf && styleProperties.push(prefix);
|
|
2007
2008
|
list.forEach(item => {
|
|
2008
2009
|
styleProperties.push(prefix + item);
|
|
2010
|
+
if (prefix === WEBKIT) {
|
|
2011
|
+
styleProperties.push('Webkit' + item);
|
|
2012
|
+
}
|
|
2009
2013
|
});
|
|
2010
2014
|
}
|
|
2011
2015
|
const color = 'Color';
|
|
@@ -2060,7 +2064,6 @@ combine('mask', ['Clip', 'Composite', image, 'Mode', 'Origin', 'Position', 'Repe
|
|
|
2060
2064
|
combine('borderImage', ['Outset', 'Repeat', 'Slice', 'Source', 'Transform', width]);
|
|
2061
2065
|
combine('maskBorder', ['Mode', 'Outset', 'Repeat', 'Slice', 'Source', width]);
|
|
2062
2066
|
combine('font', ['Family', 'FeatureSettings', 'Kerning', 'LanguageOverride', 'MaxSize', 'MinSize', 'OpticalSizing', 'Palette', size, 'SizeAdjust', 'Stretch', style, 'Weight', 'VariationSettings']);
|
|
2063
|
-
combine('fontSynthesis', ['SmallCaps', style, 'Weight']);
|
|
2064
2067
|
combine('transform', ['Box', 'Origin', style]);
|
|
2065
2068
|
combine('background', [color, image, 'Attachment', 'BlendMode', 'Clip', 'Origin', 'Position', 'Repeat', size]);
|
|
2066
2069
|
combine('listStyle', [image, 'Position', 'Type']);
|
|
@@ -2069,22 +2072,17 @@ combine('grid', ['Area', 'AutoColumns', 'AutoFlow', 'AutoRows']);
|
|
|
2069
2072
|
combine('gridTemplate', ['Areas', 'Columns', 'Rows']);
|
|
2070
2073
|
combine('overflow', ['Block', 'Inline', 'Wrap', 'X', 'Y']);
|
|
2071
2074
|
combine('transition', ['Delay', 'Duration', 'Property', 'TimingFunction']);
|
|
2072
|
-
combine('lineStacking', ['Ruby', 'Shift', 'Strategy']);
|
|
2073
2075
|
combine('color', ['Adjust', 'InterpolationFilters', 'Scheme']);
|
|
2074
2076
|
combine('textAlign', ['All', 'Last']);
|
|
2075
2077
|
combine('page', ['BreakAfter', 'BreakBefore', 'BreakInside']);
|
|
2076
|
-
combine('speak', ['Header', 'Numeral', 'Punctuation']);
|
|
2077
2078
|
combine('animation', ['Delay', 'Direction', 'Duration', 'FillMode', 'IterationCount', 'Name', 'PlayState', 'TimingFunction']);
|
|
2078
2079
|
combine('flex', ['Basis', 'Direction', 'Flow', 'Grow', 'Shrink', 'Wrap']);
|
|
2079
2080
|
combine('offset', [...after_before, ...end_start, 'Anchor', 'Distance', 'Path', 'Position', 'Rotate']);
|
|
2080
|
-
combine('fontVariant', ['Alternates', 'Caps', 'EastAsian', 'Emoji', 'Ligatures', 'Numeric', 'Position']);
|
|
2081
2081
|
combine('perspective', ['Origin']);
|
|
2082
|
-
combine('pitch', ['Range']);
|
|
2083
2082
|
combine('clip', ['Path', 'Rule']);
|
|
2084
2083
|
combine('flow', ['From', 'Into']);
|
|
2085
2084
|
combine('align', ['Content', 'Items', 'Self'], true);
|
|
2086
2085
|
combine('alignment', ['Adjust', 'Baseline'], true);
|
|
2087
|
-
combine('bookmark', ['Label', 'Level', 'State'], true);
|
|
2088
2086
|
combine('borderStart', endRadius_startRadius, true);
|
|
2089
2087
|
combine('borderEnd', endRadius_startRadius, true);
|
|
2090
2088
|
combine('borderCorner', ['Fit', image, 'ImageTransform'], true);
|
|
@@ -2104,9 +2102,9 @@ combine('inline', ['BoxAlign', size, 'Sizing'], true);
|
|
|
2104
2102
|
combine('text', ['CombineUpright', 'GroupAlign', 'Height', 'Indent', 'Justify', 'Orientation', 'Overflow', 'Shadow', 'SpaceCollapse', 'SpaceTrim', 'Spacing', 'Transform', 'UnderlinePosition', 'Wrap'], true);
|
|
2105
2103
|
combine('shape', ['ImageThreshold', 'Inside', 'Margin', 'Outside'], true);
|
|
2106
2104
|
combine('word', ['Break', 'Spacing', 'Wrap'], true);
|
|
2107
|
-
combine('nav', ['Down', 'Left', 'Right', 'Up'], true);
|
|
2108
2105
|
combine('object', ['Fit', 'Position'], true);
|
|
2109
|
-
combine('box', ['DecorationBreak', 'Shadow', 'Sizing', 'Snap'], true);
|
|
2106
|
+
combine('box', ['DecorationBreak', 'Shadow', 'Sizing', 'Snap'], true);
|
|
2107
|
+
combine(WEBKIT, ['LineClamp', 'BoxOrient', 'TextFillColor', 'TextStroke', 'TextStrokeColor', 'TextStrokeWidth'], true);
|
|
2110
2108
|
|
|
2111
2109
|
function setStyle(newVal, styleKey) {
|
|
2112
2110
|
const old = this[styleKey];
|
|
@@ -2175,7 +2173,10 @@ class Style {
|
|
|
2175
2173
|
const val = this[key];
|
|
2176
2174
|
if (!val)
|
|
2177
2175
|
return;
|
|
2178
|
-
|
|
2176
|
+
let styleName = isCssVariable(key) ? key : toDashed(key);
|
|
2177
|
+
if (styleName.indexOf('webkit') === 0 || styleName.indexOf('Webkit') === 0) {
|
|
2178
|
+
styleName = `-${styleName}`;
|
|
2179
|
+
}
|
|
2179
2180
|
texts.push(`${styleName}: ${val};`);
|
|
2180
2181
|
});
|
|
2181
2182
|
return texts.join(' ');
|
|
@@ -4486,6 +4487,7 @@ function createPageConfig(component, pageName, data, pageConfig) {
|
|
|
4486
4487
|
Current.router = {
|
|
4487
4488
|
params: page.$taroParams,
|
|
4488
4489
|
path: addLeadingSlash(router),
|
|
4490
|
+
$taroPath: page.$taroPath,
|
|
4489
4491
|
onReady: getOnReadyEventKey(id),
|
|
4490
4492
|
onShow: getOnShowEventKey(id),
|
|
4491
4493
|
onHide: getOnHideEventKey(id)
|
|
@@ -4499,16 +4501,15 @@ function createPageConfig(component, pageName, data, pageConfig) {
|
|
|
4499
4501
|
perf.start(PAGE_INIT);
|
|
4500
4502
|
Current.page = this;
|
|
4501
4503
|
this.config = pageConfig || {};
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
this.$taroPath = getPath(id,
|
|
4505
|
-
const $taroPath = this.$taroPath;
|
|
4504
|
+
// this.$taroPath 是页面唯一标识
|
|
4505
|
+
const uniqueOptions = Object.assign({}, options, { $taroTimestamp: Date.now() });
|
|
4506
|
+
const $taroPath = this.$taroPath = getPath(id, uniqueOptions);
|
|
4506
4507
|
if (process.env.TARO_ENV === 'h5') {
|
|
4507
|
-
config.path =
|
|
4508
|
+
config.path = $taroPath;
|
|
4508
4509
|
}
|
|
4509
4510
|
// this.$taroParams 作为暴露给开发者的页面参数对象,可以被随意修改
|
|
4510
4511
|
if (this.$taroParams == null) {
|
|
4511
|
-
this.$taroParams =
|
|
4512
|
+
this.$taroParams = uniqueOptions;
|
|
4512
4513
|
}
|
|
4513
4514
|
setCurrentRouter(this);
|
|
4514
4515
|
const mount = () => {
|
|
@@ -4696,12 +4697,6 @@ function createRecursiveComponentConfig(componentName) {
|
|
|
4696
4697
|
} }, lifeCycles);
|
|
4697
4698
|
}
|
|
4698
4699
|
|
|
4699
|
-
function removeLeadingSlash(path) {
|
|
4700
|
-
if (path == null) {
|
|
4701
|
-
return '';
|
|
4702
|
-
}
|
|
4703
|
-
return path.charAt(0) === '/' ? path.slice(1) : path;
|
|
4704
|
-
}
|
|
4705
4700
|
const nextTick = (cb, ctx) => {
|
|
4706
4701
|
var _a, _b, _c;
|
|
4707
4702
|
const router = Current.router;
|
|
@@ -4712,7 +4707,7 @@ const nextTick = (cb, ctx) => {
|
|
|
4712
4707
|
};
|
|
4713
4708
|
if (router !== null) {
|
|
4714
4709
|
let pageElement = null;
|
|
4715
|
-
const path =
|
|
4710
|
+
const path = router.$taroPath;
|
|
4716
4711
|
pageElement = document$1.getElementById(path);
|
|
4717
4712
|
if (pageElement === null || pageElement === void 0 ? void 0 : pageElement.pendingUpdate) {
|
|
4718
4713
|
if (process.env.TARO_ENV === 'h5') {
|