使用自定义导航栏
导航栏作为常用组件有做简单封装,当然你也可以直接复制代码结构自己修改,达到个性化目的。
`App.vue`获得系统信息
```
onLaunch:function(){
uni.getSystemInfo({
success:function(e){
//#ifndefMP
Vue.prototype.StatusBar=e.statusBarHeight;
if(e.platform=='android'){
...
2022-04-12 浏览(5059)
uin小程序滚动浮窗案例
perfToX(){//悬浮按钮向右滑动
this.animation=uni.createAnimation({duration:300,timingFunction:'ease'})
this.animation.translateX(50).opacity(0.4).step()
this.animationTask=this.animation.export()
},
dismissToX(){//悬浮按钮向左滑动
this.animation=uni.createAnimation({duration:800...
2022-03-09 浏览(5112)
uin框架搭建
app.vue中创建.main_content{
position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden;
display:flex;flex-direction:column;align-items:center;
navbar{position:relative;width:100%;flex-grow:0;flex-shrink:0;}
container{position:relative;width:100%;flex-grow:1;display:flex;}
...
2022-03-09 浏览(5619)
scroll-view封裝刷新加载组件
<template>
<viewclass="container">
<scroll-viewscroll-with-animationclass="scroll":class="class1":scroll-y="scrollY":scroll-top="scrollTop"
:refresher-enabled="isrefresh":refresher-threshold="refresherTh...
2022-03-09 浏览(5483)
uni-app 子组件如何调用父组件的方法
1.在父组件methods中定义一个方法:changeType:function(type){
this.typeActive=type;
alert(type);
}2.在父组件引用子组件时绑定该方法:<cate-top:catelist="catelist"v-on:pChangeType="changeType"></cate-top>3.在子组件中绑定点击事件:<templatename="cate-top&...
2021-05-26 浏览(6961)
uni-app 父组件引用子组件时怎么调用子组件的方法
1.写一个简单的子组件main/index.vue:<template>
<view>
</view>
</template>
<script>
exportdefault{
data(){
return{
}
},
onLoad(){
},
methods:{
childMethod(){
console.log('childMethoddo...')
}
}
}
</script>
<style>
...
2021-05-26 浏览(8565)
forEach与async/await使用踩坑
forEach与async/await使用踩坑functiontest(){letarr=[1,2,3]arr.forEach(asyncitem=>{constres=awaitfetch(item)console.log(res)})console.log('end')}functionfetch(x){returnnewPromise((resolve,reject)=>{resolve(x)})}test()思考如上代码、我们预期结果是先输出1,2,3,然后因为等待异步结果...
2021-05-26 浏览(7354)
uni-app本地运行修改调试已上线微信H5项目(要有微信开发者权限方便修改)
一、打开如图系统目录修改host地址打开后找到这里修改host二、打开uni-app 找到项目中的manifest.json三、正常运行项目到浏览器这时候如果浏览器提示微信打开四、打开微信开发者工具 选择 公众号网页五、复制 uni-app控制台输出的地址 粘贴到 微信开发者工具中公众号网页的地址栏中运行六、在公众号后台配置网页授...
2021-05-26 浏览(7610)
排名
6
文章
6
粉丝
16
评论
8
{{item.articleTitle}}
{{item.blogName}} : {{item.content}}
ICP备案 :渝ICP备18016597号-1
网站信息:2018-2026TNBLOG.NET
技术交流:群号656732739
联系我们:contact@tnblog.net
公网安备:
50010702506256
50010702506256
欢迎加群交流技术