04 2024 档案

摘要:base64加载图片文件 使用base64可以不发送请求将图片文件转换为base64格式的链接渲染到图片上,减少服务器访问次数,下面是base64加载图片的方式 document.getElementById("front-file").onchange = (e) => { const file 阅读全文
posted @ 2024-04-30 15:07 ZerlinM 阅读(4657) 评论(0) 推荐(0)
摘要:代码如下 upload组件的 afterRead 方法: const afterRead = async file => { file.status = "uploading"; file.message = "上传中..."; const { data } = await upLoaderImg( 阅读全文
posted @ 2024-04-30 14:04 ZerlinM 阅读(610) 评论(0) 推荐(0)
摘要:问题 项目中使用vue3+vant4,列表页使用了 List 来做列表加载,代码如下: <van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="onLoad" > <div v-if= 阅读全文
posted @ 2024-04-25 10:15 ZerlinM 阅读(671) 评论(0) 推荐(0)
摘要:可在App.vue文件中引入样式 <template> <router-view /> </template> <script setup> // Toast import "vant/es/toast/style"; // Dialog import "vant/es/dialog/style"; 阅读全文
posted @ 2024-04-23 15:42 ZerlinM 阅读(692) 评论(0) 推荐(0)
摘要:实现效果 代码如下 多选组件 DictSelect.vue <template> <van-popup :show="showPicker" position="bottom" :style="{ height: '34vh' }"> <div class="con"> <div class="co 阅读全文
posted @ 2024-04-17 10:21 ZerlinM 阅读(1052) 评论(0) 推荐(0)