2025年2月28日

showToast、hideToast

摘要: <template> <button @click="show">显示</button> <button @click="hide">隐藏</button> </template> <script setup> const show = () => { uni.showToast({ duratio 阅读全文

posted @ 2025-02-28 23:30 ChoZ 阅读(52) 评论(0) 推荐(0)

uniapp auto-import

摘要: 1.安装 npm i unplugin-auto-import 2.创建vite.config.js,并配置 import { defineConfig } from 'vite' import uni from '@dcloudio/vite-plugin-uni' import AutoImpo 阅读全文

posted @ 2025-02-28 18:11 ChoZ 阅读(38) 评论(0) 推荐(0)

mainfest设置

摘要: 在这里可以对要输出的不同端进行设置 阅读全文

posted @ 2025-02-28 17:41 ChoZ 阅读(48) 评论(0) 推荐(0)

easyCom、tabBar

摘要: 1.easyCom:根据固定的路径创建的文件,不需要引入和注册组件,可以直接template使用 安装在项目根目录的components目录下,并符合components/组件名称/组件名称.vue 2.tarBar { "pages": [ //pages数组中第一项表示应用启动页,参考:http 阅读全文

posted @ 2025-02-28 17:30 ChoZ 阅读(9) 评论(0) 推荐(0)

page.json的pages配置

摘要: { "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages { "path": "pages/index/index", // 取的是文件路径 "style": { // 这里都可以单独配置globa 阅读全文

posted @ 2025-02-28 16:15 ChoZ 阅读(55) 评论(0) 推荐(0)

生命周期onPullDownRefresh、onReachBottom和page.json中的globalStyle

摘要: { "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages { "path": "pages/index/index", "style": { "navigationBarTitleText": "u 阅读全文

posted @ 2025-02-28 15:43 ChoZ 阅读(9) 评论(0) 推荐(0)

rpx

摘要: <template> <view class="rpx"></view> </template> <style lang="scss"> // rpx是屏幕宽度自适应的动态单位,是把屏幕分为750份,750是固定值 // 使用方法是把设计稿改为宽度750,缩放后取对应的宽度的rpx // app端不 阅读全文

posted @ 2025-02-28 14:26 ChoZ 阅读(7) 评论(0) 推荐(0)

生命周期onLoad、onShow、onReady、onHide、onUnLoad、onPageScroll和App.vue的生命周期

摘要: <template> <text>{{name}}</text> <view ref="v"> <navigator url="/pages/index/index">回到主页面</navigator> </view> <view class=""> <navigator url="/pages/i 阅读全文

posted @ 2025-02-28 11:35 ChoZ 阅读(43) 评论(0) 推荐(0)

导航