vConsole
按钮。单击 vConsole
按钮可以打开日志面板。JSON
字符串后传输给vConsole
的,导致vConsole
中展示的内容会有一些限制:Number
、String
、Boolean
、null
外,其他类型都会被作为Object
处理展示,打印对象及原型链中的 Enumerable 属性。Infinity
和 NaN
会显示为null
。undefined
、ArrayBuffer
、Function
类型无法显示。const a = {}a.b = aconsole.log(a)
const circular = {x: {}, c: {}}circular.x = [{promise: Promise.resolve()}]circular.a = circularcircular.c.x0 = circular.x[0]console.log(circular)// "{a: '<Circular: @>', c: {x0: '<Circular: @.x[0]>'}, x: [{promise: '<Promise>'}]}"
eval
执行 JS
代码。new Function
创建函数。JavaScript
语法和 API 支持不一致:语法上开发者可以通过开启ES6
转ES5
的功能来规避;此外,小程序基础库内置了必要的 Polyfill,来弥补 API 的差异。WXSS
渲染表现不一致:尽管可以通过开启样式补全来规避大部分的问题,还是建议开发者需要在 iOS 和 Android 上分别检查小程序的真实表现。String | iOS 8 | iOS9 | iOS10 | Android |
codePointAt | √ | √ | √ | √ |
normalize | × | × | √ | √ |
includes | √ | √ | √ | √ |
startsWith | √ | √ | √ | √ |
endsWith | √ | √ | √ | √ |
repeat | √ | √ | √ | √ |
String.fromCodePoint | √ | √ | √ | √ |
Array | iOS 8 | iOS9 | iOS10 | Android |
copyWithin | √ | √ | √ | √ |
find | √ | √ | √ | √ |
findIndex | √ | √ | √ | √ |
fill | √ | √ | √ | √ |
entries | √ | √ | √ | √ |
keys | √ | √ | √ | √ |
values | × | √ | √ | × |
includes | × | √ | √ | √ |
Array.from | √ | √ | √ | √ |
Array.of | √ | √ | √ | √ |
Number | iOS 8 | iOS9 | iOS10 | Android |
isFinite | √ | √ | √ | √ |
isNaN | √ | √ | √ | √ |
parseInt | √ | √ | √ | √ |
parseFloat | √ | √ | √ | √ |
isInteger | √ | √ | √ | √ |
EPSILON | √ | √ | √ | √ |
isSafeInteger | √ | √ | √ | √ |
Math | iOS 8 | iOS9 | iOS10 | Android | | | |
trunc | √ | √ | √ | √ | |||
sign | √ | √ | √ | √ | |||
cbrt | √ | √ | √ | √ | |||
clz32 | √ | √ | √ | √ | |||
imul | √ | √ | √ | √ | |||
fround | √ | √ | √ | √ | |||
hypot | √ | √ | √ | √ | |||
expm1 | √ | √ | √ | √ | |||
log1p | √ | √ | √ | √ | |||
log10 | √ | √ | √ | √ | |||
log2 | √ | √ | √ | √ | |||
sinh | √ | √ | √ | √ | |||
cosh | √ | √ | √ | √ | |||
tanh | √ | √ | √ | √ | |||
asinh | √ | √ | √ | √ | | | |
acosh | √ | √ | √ | √ | | | |
atanh | √ | √ | √ | √ | | | |
Object | iOS 8 | iOS9 | iOS10 | Android |
is | √ | √ | √ | √ |
assign | √ | √ | √ | √ |
getOwnPropertyDescriptor | √ | √ | √ | √ |
keys | √ | √ | √ | √ |
getOwnPropertyNames | √ | √ | √ | √ |
getOwnPropertySymbols | √ | √ | √ | √ |
Other | iOS 8 | iOS9 | iOS10 | Android |
Symbol | √ | √ | √ | √ |
Set | √ | √ | √ | √ |
Map | √ | √ | √ | √ |
Proxy | × | × | √ | × |
Reflect | √ | √ | √ | √ |
Promise | √ | √ | √ | √ |
本页内容是否解决了您的问题?