Skip to content

Commit 5adc529

Browse files
authored
Merge branch 'main' into babel
2 parents 6d4ea8a + f9a84d1 commit 5adc529

16 files changed

+2125
-2117
lines changed

packages/shared/src/is.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function isNumber (o: unknown): o is number {
2828
}
2929

3030
export function isBooleanStringLiteral (o: unknown): o is string {
31-
return o === 'true' || o === 'false'
31+
return o === 'true' || o === 'false' || o === '!0' || o === '!1'
3232
}
3333

3434
export function isObjectStringLiteral (o: unknown): o is string {

packages/taro-runtime/src/dom-external/element.ts

+8
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ export function getBoundingClientRectImpl (this: TaroElement): Promise<null> {
77
if (!options.miniGlobal) return Promise.resolve(null)
88
return new Promise(resolve => {
99
const query = options.miniGlobal.createSelectorQuery()
10+
// ref: https://opendocs.alipay.com/mini/api/na4yun
11+
if (process.env.TARO_ENV === 'alipay') {
12+
query.select(`#${this.uid}`).boundingClientRect().exec(res => {
13+
resolve(res)
14+
})
15+
return
16+
}
17+
1018
query.select(`#${this.uid}`).boundingClientRect(res => {
1119
resolve(res)
1220
}).exec()

tests/__tests__/__snapshots__/babel.spec.ts.snap

+72-72
Large diffs are not rendered by default.

tests/__tests__/__snapshots__/compiler-macros.spec.ts.snap

+72-72
Large diffs are not rendered by default.

tests/__tests__/__snapshots__/config.spec.ts.snap

+376-376
Large diffs are not rendered by default.

tests/__tests__/__snapshots__/css-modules.spec.ts.snap

+144-144
Large diffs are not rendered by default.

tests/__tests__/__snapshots__/framework.spec.ts.snap

+194-194
Large diffs are not rendered by default.

tests/__tests__/__snapshots__/mini-platform.spec.ts.snap

+129-129
Large diffs are not rendered by default.

tests/__tests__/__snapshots__/parse-html.spec.ts.snap

+72-72
Large diffs are not rendered by default.

tests/__tests__/__snapshots__/prerender.spec.ts.snap

+216-216
Large diffs are not rendered by default.

tests/__tests__/__snapshots__/sass.spec.ts.snap

+360-360
Large diffs are not rendered by default.

tests/__tests__/__snapshots__/skyline.spec.ts.snap

+97-97
Large diffs are not rendered by default.

tests/__tests__/__snapshots__/subpackages.spec.ts.snap

+72-72
Large diffs are not rendered by default.

tests/__tests__/__snapshots__/tabbar.spec.ts.snap

+167-167
Large diffs are not rendered by default.

tests/__tests__/__snapshots__/ts.spec.ts.snap

+72-72
Large diffs are not rendered by default.

tests/__tests__/__snapshots__/wx-hybrid.spec.ts.snap

+73-73
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)