1 Star 0 Fork 249

juanmao2009/一指香飞uni-app

forked from yichen/一指香飞uni-app 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
App.vue 2.34 KB
一键复制 编辑 原始数据 按行查看 历史
yichen 提交于 2019-12-08 16:56 . 重构首页布局功能
<script>
export default {
computed: {
// this.$store.getters.user;
},
mounted() {
var that = this;
// 监听窗口宽高变化
(function screenListener() {
uni.onWindowResize((res) => {
that.$store.commit('screen', {
width: res.size.windowWidth,
height: res.size.windowHeight
});
// console.log('变化后的窗口宽度=' + res.size.windowWidth)
// console.log('变化后的窗口高度=' + res.size.windowHeight)
})
})()
},
onLaunch: function() {
console.log('App Launch')
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style>
/* uni.css - 通用组件、模板样式库,可以当作一套ui库应用 */
@import "./common/uni.css";
/* @import "./common/css/iconfont.css"; */
@import "./common/css/tui.css";
@import "./common/yc.css";
.color-font {
color: #F7F7F7;
}
.color-background {
color: #333333;
background: #F7F7F7;
}
.color-nav{
background: #0A98D5;
color: #ffffff;
}
/* 以下样式用于 hello uni-app 演示所需 */
page {
color: #666;
background-color: #F4F5F6;
height: 100%;
font-size: 28upx;
overflow: hidden;
}
.page-body {
padding: 0;
margin: 0;
justify-content: space-between;
flex-direction: column;
align-content: ;
height: 100vh;
box-sizing: border-box;
display: flex;
}
/* .main-content{
margin-bottom: 100upx;
text-align: center;
width: 100%;
flex:1;
overflow-y:auto;
box-sizing:border-box;
} */
.uni-input-group .uni-input-row:after {
right: 10upx;
left: 10upx;
}
.uni-input-row input {
flex: 1;
padding: 0 10upx;
border-radius: 6upx;
background: #E9E9E9;
}
.uni-input-row .uni-label {
text-indent: 0;
flex-direction: column;
display: flex;
justify-content: center;
text-align: center;
}
</style>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/moon2003/a_fragrant_fly.git
[email protected]:moon2003/a_fragrant_fly.git
moon2003
a_fragrant_fly
一指香飞uni-app
master

搜索帮助