随笔分类 -  uniapp

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 阅读(13) 评论(0) 推荐(0) 编辑

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 阅读(5) 评论(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 阅读(10) 评论(0) 推荐(0) 编辑

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

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

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

posted @ 2025-02-28 17:30 ChoZ 阅读(5) 评论(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 阅读(34) 评论(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 阅读(4) 评论(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 阅读(3) 评论(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 阅读(3) 评论(0) 推荐(0) 编辑

input、button
摘要:<template> <button size="default" type="primary" plain>默认按钮大小,按钮镂空</button> <button size="mini" disabled loading>迷你按钮大小</button> <input type="text" :v 阅读全文

posted @ 2025-02-27 21:42 ChoZ 阅读(5) 评论(0) 推荐(0) 编辑

navigator
摘要:<template> <view class=""> <navigator url="/pages/demo/image" open-type="reLaunch"> 文字跳转写法,open-type是relanuch的时候会把跳过去的页面当初主页,左上角没有返回箭头 </navigator> </ 阅读全文

posted @ 2025-02-27 18:26 ChoZ 阅读(5) 评论(0) 推荐(0) 编辑

image
摘要:<template> <swiper :indicator-dots="true" :autoplay="true" circular> <swiper-item> <image src="/static/logo.png" mode="aspectFill"></image> </swiper-i 阅读全文

posted @ 2025-02-27 17:55 ChoZ 阅读(4) 评论(0) 推荐(0) 编辑

swiper
摘要:<template> <swiper :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000" indicator-color="#007aff" indicator-active-color="#fff" c 阅读全文

posted @ 2025-02-27 16:42 ChoZ 阅读(4) 评论(0) 推荐(0) 编辑

scrollView
摘要:<template> <scroll-view scroll-y class="scrollView scrollViewY"> <view>相当于一个y轴滚动条的盒子</view> <view>相当于一个y轴滚动条的盒子</view> <view>相当于一个y轴滚动条的盒子</view> <vie 阅读全文

posted @ 2025-02-27 15:28 ChoZ 阅读(4) 评论(0) 推荐(0) 编辑

内置组件view & text、路由创建
摘要:1.创建页面和路由配置 如创建后访问不到该路径,尝试重新启动 2.uniapp组件开发和PC端开发的不同 div等html标签在H5开发中可以使用,小程序不能使用,需要使用uniapp提供的组件 3.view组件:类似div标签,不过有自己的一些属性 4.text组件:类型span标签 <templ 阅读全文

posted @ 2025-02-27 14:50 ChoZ 阅读(4) 评论(0) 推荐(0) 编辑

base
摘要:1.创建 2.运行配置exe文件地址(小程序或者浏览器都需要配置),需开启服务端口 阅读全文

posted @ 2025-02-26 23:49 ChoZ 阅读(3) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示