当前位置:网站首页>uniapp学习
uniapp学习
2022-07-24 04:34:00 【真*菜】
uni-app是一个使用vue.js开发所有前端应用的框架,开发者编写一套代码可以发布到ios,Android,H5以上
HbuiderX初始化
运行微信小程序的时候第一次需要微信小程序开发工具的地址,在微信开发者工具中把端口号打开
uniapp列表
page 存放页面
static 存放静态资源
unpackage 存放打包输出的文件
App.vue 项目的根组件 是入口文件 调用生命周期,所有的页面都是在这里调换的
main.js 是项目的入口文件
manifest.json 应用的配置文件
pages.json 项目页面的路径 和全局的一些外观
uni.scss 常用的样式变量
uniapp的开发规范
1:页面文件遵守vue单文件组件规范
2:组件标签靠近小程序规范
3;接口能力靠近微信小程序规范,但是需要将前缀WX替换为uni
4:数据绑定及事件处理同vue.js规范,同时补充了APP页面的生命舟曲
5:为了兼容多端运行建议使用flex布局进行开发
全局配置和页面的配置uni-app官网
在pages.json里面调试样式 在globalStyle里面配置文件样式uni-app官网
常用的有:“navigationBarBackgroundColor”导航栏背景色
“navigationBarTextStyle”导航栏标题颜色
“navigationBarTitleText”标题栏文字内容
“enablePullDownRefresh”下拉刷新开启
“backgroundColor”下拉刷新颜色
“onReachBottomDistance”上啦触底的距离,距底部有多远触发事件
页面配置
pages:单独页面配置里面的东西,用的是对象 path路径 style 单独样式,pages第一个对象是首页
tabbar:可以通过tabbar配置来指定tab栏的表现,以及tab切换时显示对应的页面,当tab在position:top的时候不显示图标只显示文字
tabbar的属性:color 文字颜色 selectColor选中时的颜色 backgroundColor :tab的背景色 borderStyle 边框颜色仅支持black/white
list:是一个数组,每一项的具体表现,路由
position :tab在上还是下
tabbar常用的属性

condition启动模式配置,仅开发期间生效,用于模拟直达页面的场景,如:小程序转发后,用户点击所打开的页面。 (和tabbar同级关系)
:可以配置当前list激活索引的模式


组件的基本使用
text文本组件
:

view(
视图容器。
它类似于传统html中的div,用于包裹各种元素内容。
)


button组件
边栏推荐
- Qt5.14_ Realize the free drag and drop combination function of vs2019 panel under mingw/msvc
- J9 number theory: what is Web3.0? What are the characteristics of Web3.0?
- Design of two power dividers and directional couplers for basic experiment of microwave technology
- Up sampling method (deconvolution, interpolation, anti pooling)
- 到3mm;提供安全稳定的产品作的执行据发出方iid
- C语言经典练习题
- IP second experiment mGRE OSPF
- What are the 10 live demos showing? It's worth watching again whether you've seen it or not
- Educational Codeforces Round 132 A - D
- The problem of monkeys eating peaches in classic exercises of C language
猜你喜欢

Privacy protection federal learning framework supporting most irregular users

Division of training set, verification set and test set in link prediction (take randomlinksplit of pyg as an example)

Where is the difficulty in attracting investment in the park? Inventory of difficulties and difficulties in attracting investment in industrial parks

Up sampling method (deconvolution, interpolation, anti pooling)

Imitate today's headlines real-time news wechat applet project source code

Energy principle and variational method note 11: shape function (a dimension reduction idea)

Little black leetcode journey: 100 same trees

Esp32 tutorial (I): vscode+platform and vscade+esp-idf

Common cross domain problems

高频小信号谐振放大器设计-课程设计Multisim仿真
随机推荐
Shell syntax (2)
C语言:冒泡排序法
64 attention mechanism 10 chapters
Share a login interface template of QT implementation
【2023芯动科技提前批笔试题】~ 题目及参考答案
别人发的word中的参考文献是{}这样的乱码格式怎么办
What if Adobe pr2022 doesn't have open subtitles?
Energy principle and variational method note 11: shape function (a dimension reduction idea)
PMIX ERROR: ERROR in file gds_ ds12_ lock_ pthread.c
Er system, in Lin reply bit, count, successfully open r com change
[translation] chaos mesh moved to CNCF incubator
Privacy protection federal learning framework supporting most irregular users
高频小信号谐振放大器设计-课程设计Multisim仿真
LabVIEW主VI冻结挂起
What is the general family of programmers working in first tier cities?
智能合约:发布一种ERC20代币
【ARC127F】±AB
Can NFT pledge in addition to trading?
The second anniversary of opengauss' open source, cracking the pain point of database ecology
An online accident, I suddenly realized the essence of asynchrony