基于H5平台的app,uni页面配置及组件说明

globalStyle

用于设置应用的状态栏、导航条、标题、窗口背景色等。

<template>
	<view class="content">
		<image class="logo" src="/static/logo.png"></image>
		<view class="text-area">
			<text class="title">{{title}}</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello'
			}
		},
		onLoad() {

		},
		methods: {

		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>

全局配置。

{
	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
		{
			"path": "pages/index/index",
			"style": {
				"navigationBarTitleText": "todo"
			}
		}
	],
	"globalStyle": {
		"navigationBarTextStyle": "black",
		"navigationBarTitleText": "uni-app",
		"navigationBarBackgroundColor": "#F8F8F8",
		"backgroundColor": "#F8F8F8"
	}
}

 基于uni的多端应用程序的应用部署使用的是三丰云www.sanfengyuncom,提供的"免费虚拟主机",“免费云服务器”,

在日常的使用和学习中,提供的服务器响应及时,服务稳定,目前未发现问题,很适合学习。

 也可以分平台配置

1.自定义文件类型.vue,类html语法描述一个vue

2.三部分组成

-template 视图层 组件,template下面只能有一个节点

-script 逻辑层

-style 样式层

3.常用的基础组件

uni-app组件对应html组件

-view ->div 容器组件

-text ->span 文字组件

-image ->img 图片组件

 

 

 效果如下

 选中未选中效果

 

tabBar

1.List最多5项最少2项。

2.tabbar 显示一次之后,就会保存在内存之中,要操作要重新onshow生命周期。

3.属性支撑情况,需要看文档注意各平台差异。

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值