上一页 1 2 3 4 5 6 7 ··· 24 下一页

2025年3月5日

mp-html富文本渲染插件

摘要: <template> <mp-html :content="html"></mp-html> </template> <script setup> const html = '<div>123<h1>5555</h1></div>' </script> <style scoped lang="scs 阅读全文

posted @ 2025-03-05 11:27 ChoZ 阅读(75) 评论(0) 推荐(0)

分享朋友圈、分享小程序

摘要: <template> <view class="">123</view> </template> <script setup> // 打开分享功能 onShareAppMessage((e) => { return { title: '自定义分享标题', path: '/pages/demo/ima 阅读全文

posted @ 2025-03-05 01:33 ChoZ 阅读(26) 评论(0) 推荐(0)

小程序存储图片到相册getImageInfo、saveImageToPhotosAlbum、openSetting

摘要: 1.配置download地址 2.配置隐私协议 3.模拟器清除授权 4.代码 <template> </template> <script setup> // 实现储存网络图片到相册 // #ifdef H5 // H5无法实现,只能弹出图片让用户截图或者长按保存图片 // #endif // #i 阅读全文

posted @ 2025-03-05 00:22 ChoZ 阅读(162) 评论(0) 推荐(0)

2025年3月4日

设备顶部信息uni.getSystemInfoSync()、uni.getMenuButtonBoundingClientRect()

摘要: <template> </template> <script setup> // 实现隐藏顶部导航Bar,自己模拟实现左上角返回按钮,可根据下面的数据写出与右上角收藏和退出区域平行的高度 // 获取不同设备的信息 let SYSTEM_INFO = uni.getSystemInfoSync() / 阅读全文

posted @ 2025-03-04 00:55 ChoZ 阅读(206) 评论(0) 推荐(0)

2025年3月3日

uni-popup、uni-rate

摘要: <template> <button @click="open">打开弹窗组件</button> <uni-popup ref="popup" type="bottom" background-color="#fff"> <view style="height: 300rpx;"> 评分组件 <un 阅读全文

posted @ 2025-03-03 23:18 ChoZ 阅读(244) 评论(0) 推荐(0)

条件编译#ifdef

摘要: <template> MP是指代所有小程序 ifdef 只在MP设备会编译代码块里面的代码 <!-- #ifdef MP --> <button open-type="contact">点击会直接打开微信小程序后台配置的客服聊天,h5不生效</button> <!-- #endif --> ifnd 阅读全文

posted @ 2025-03-03 15:56 ChoZ 阅读(24) 评论(0) 推荐(0)

磨砂效果、fit-content

摘要: backdrop-filter: blur(10px); width:fit-content // 自适应内容的宽度 阅读全文

posted @ 2025-03-03 14:09 ChoZ 阅读(13) 评论(0) 推荐(0)

uni-扩展组件

摘要: 官方提供的组件包,直接下载安装按需导入即可 loading示例 <template> <view class="" v-for="item in 50">{{item}}</view> <text>当前页面无数据时显示loading</text> <text>把数据下划到最下,下划时显示loadin 阅读全文

posted @ 2025-03-03 00:36 ChoZ 阅读(18) 评论(0) 推荐(0)

2025年3月2日

pageScrollTo、env(safe-area-inset-bottom)

摘要: <template> <view class="" v-for="item in 50">{{item}}</view> <button @click="back">回到顶部</button> <view class="v">11</view> </template> <script setup> 阅读全文

posted @ 2025-03-02 15:10 ChoZ 阅读(50) 评论(0) 推荐(0)

api调用下拉刷新和关闭startPullDownRefresh、stopPullDownRefresh

摘要: <template> <button @click="fresh">api调用下拉刷新</button> <button @click="stop">api关闭下拉刷新</button> </template> <script setup> const fresh = () => { uni.sta 阅读全文

posted @ 2025-03-02 14:39 ChoZ 阅读(60) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 ··· 24 下一页

导航