更新记录
1.0.0(2025-09-01) 下载此版本
复制实例代码
<template>
<view class="content">
<image class="logo" src="/static/logo.png"></image>
<view class="text-area">
<text class="title">{{title}}</text>
</view>
<button @click="OnTest">
点击
</button>
</view>
</template>
<script setup>
import * as test from '../../uni_modules/easemob-fileselect'
const OnTest = () => {
console.log("开始请求");
test.requestFile({
complete: (path,name) => {
if (path.length > 0) {
console.log(path)
console.log(name)
}
}
})
}
</script>
<style>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36rpx;
color: #8f8f94;
}
</style>
平台兼容性
uni-app x
Chrome | Safari | Android | iOS | 鸿蒙 | 微信小程序 |
---|---|---|---|---|---|
- | - | × | 12 | × | × |
easemob-fileselect
开发文档
UTS 语法 UTS API插件 UTS uni-app兼容模式组件 UTS 标准模式组件 Hello UTS
1.导入插件 2.复制实例代码
<template>
<view class="content">
<image class="logo" src="/static/logo.png"></image>
<view class="text-area">
<text class="title">{{title}}</text>
</view>
<button @click="OnTest">
点击
</button>
</view>
</template>
<script setup>
import * as test from '../../uni_modules/easemob-fileselect'
const OnTest = () => {
console.log("开始请求");
test.requestFile({
complete: (path,name) => {
if (path.length > 0) {
console.log(path)
console.log(name)
}
}
})
}
</script>
<style>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36rpx;
color: #8f8f94;
}
</style>