
简体中文
将 Base64 字符串转成 ArrayBuffer 对象
名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |
---|---|---|---|---|---|
base64 | string | 是 | - | - | - |
类型 |
---|
ArrayBuffer |
Web | 微信小程序 | Android | iOS |
---|---|---|---|
4.0 | 4.41 | 4.51 | x |
将 ArrayBuffer 对象转成 Base64 字符串
名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |
---|---|---|---|---|---|
arrayBuffer | ArrayBuffer | 是 | - | - | - |
类型 |
---|
string |
Web | 微信小程序 | Android | iOS |
---|---|---|---|
4.0 | 4.41 | 4.51 | x |
Template
Script
<template>
<view>
<view class="text-area">
<button class="btnstyle" type="primary" @tap="arrayBufferToBase64"> arrayBufferToBase64 </button>
<button class="btnstyle" type="primary" @tap="base64ToArrayBuffer"> base64ToArrayBuffer </button>
</view>
</view>
</template>
<style>
.logo {
height: 100px;
width: 100px;
margin: 100px auto 25px auto;
}
.title {
font-size: 18px;
color: #8f8f94;
text-align: center;
}
.btnstyle {
margin: 4px;
}
</style>
名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |
---|---|---|---|---|---|
errMsg | string | 是 | - | 错误信息 |