2025年3月1日

request

摘要: <template> <text>{{data}}</text> </template> <script setup> import { ref } from 'vue'; const data = ref([]) // 代替axios了,返回的是一个promise const init = asy 阅读全文

posted @ 2025-03-01 22:52 ChoZ 阅读(3) 评论(0) 推荐(0)

setStorageSync、getStorageSync、removeStorageSync、clearStorageSync

摘要: <template> <text>{{getStorage}}</text> </template> <script setup> // 一般使用Sync同步的api // 设置localStorage uni.setStorageSync('key', '我是存的数据') // 获取localSt 阅读全文

posted @ 2025-03-01 22:24 ChoZ 阅读(40) 评论(0) 推荐(0)

navigateTo、relaunch、navigateBack、getCurrentPages

摘要: <template> <button @click="show">跳1</button> <button @click="hide">跳2</button> <button @click="back">回退</button> </template> <script setup> // 使用js代码跳 阅读全文

posted @ 2025-03-01 18:54 ChoZ 阅读(9) 评论(0) 推荐(0)

setTabBarItem、setTabBarStyle、showTabBar、hideTabBar、setTabBarBadge、removeTabBarBadge、showTabBarRedDot、hideTabBarRedDot

摘要: <template> <!-- <button @click="show">显示</button> <button @click="hide">隐藏</button> --> </template> <script setup> // 设置下面的tabbar的配置 uni.setTabBarItem 阅读全文

posted @ 2025-03-01 17:18 ChoZ 阅读(12) 评论(0) 推荐(0)

setNavigationBarTitle、setNavigationBarColor、showNavigationBarLoading、hideNavigationBarLoading、hideHomeButton

摘要: <template> <button @click="show">显示</button> <button @click="hide">隐藏</button> <view class=""> <navigator url="/pages/demo/rpx">跳</navigator> </view> 阅读全文

posted @ 2025-03-01 15:25 ChoZ 阅读(7) 评论(0) 推荐(0)

showActionSheet

摘要: <template> <button @click="show">显示</button> </template> <script setup> const arr = ['A','B','C'] const show = () => { // 下面弹出来的选项 uni.showActionSheet 阅读全文

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

showModal、showLoading、hideLoading

摘要: <template> <button @click="show">显示</button> <button @click="hide">隐藏</button> <button @click="deleteMsg">删除</button> </template> <script setup> const 阅读全文

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

导航