xiaofangweibao-applet/pages/index/index.vue

95 lines
2.5 KiB
Vue

<template>
<view class="content">
<uni-card class="box-boder" v-for="(item, index) in projectList" :key="index" >
<text>{{item.value}}</text>
</uni-card>
<movable-area class="movable-area">
<movable-view class="movable-view" direction="all">
<button style="width: 50px;height:50px;border-radius:50px;position:fixed;background:#ff6700;line-height:50px;font-size:25pt;color:#fff;" @click="handerinto">+</button>
</movable-view>
</movable-area>
</view>
</template>
<script>
export default {
data() {
return {
projectList:[
{index:1,value:'123132132132132132131312132132231啊大苏打飒飒大苏打飒飒大苏打撒旦阿松大阿松大阿松大阿松大啊阿斯顿阿松大阿三大苏打阿松大阿三阿松大阿松大阿松大阿三阿松大阿松大啊飒飒4'},
{index:1,value:'dasdasdasdasdasdasdasd'},
{index:1,value:'12313213213啊实打实的阿松大阿松大阿三'},
{index:1,value:'12313213213啊实打实的阿松大阿松大阿三'},
{index:1,value:'12313213213啊实打实的阿松大阿松大阿三'},
{index:1,value:'12313213213啊实打实的阿松大阿松大阿三'},
{index:1,value:'12313213213啊实打实的阿松大阿松大阿三'},
{index:1,value:'12313213213啊实打实的阿松大阿松大阿三'},
{index:1,value:'12313213213啊实打实的阿松大阿松大阿三'},
{index:1,value:'12313213213啊实打实的阿松大阿松大阿三'},
{index:1,value:'12313213213啊实打实的阿松大阿松大阿三'},
{index:1,value:'12313213213啊实打实的阿松大阿松大阿三'},
]
}
},
onLoad() {
},
methods: {
handerinto(){
uni.navigateTo({
url:'../itemlist/itemlist'
})
},
//发送请求案例
getNoticelist(){
this.request('loadNotice', 'GET').then(res=>{
console.log("res:",res)
if(res){
this.messageData = res.data
}
})
},
//跳转路由案例
goMore(){
uni.navigateTo({
url:'../itemlist/itemlist'
})
},
}
}
</script>
<style lang="scss">
.box-title{
width: 200rpx;
height: 70rpx;
// background-color: red;
text-align: center;
margin-left: 270rpx;
font-size: 1.5rem
}
.movable-area{
pointer-events:none;// 这个属性设置为none,让所有事件穿透过去
z-index: 100;
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.movable-view{
pointer-events:auto;// 重设为auto,覆盖父属性设置
height: 50px;
width: 50px;
border-radius: 50rpx;
background: skyblue;
}
</style>