uniapp实现会议室预约时间轴占用情况展示
最终实现效果(深色为占用时间段):话不多说,上代码:<template><view class="item"><view v-for="(item,index) in nums" :key="index" ><view>{{item}}</view></view></view><view style="dis
·
最终实现效果(深色为占用时间段):
话不多说,上代码:
<template>
<view>
<view class="item">
<view v-for="(item,index) in nums" :key="index" >
<view>
{{item}}
</view>
</view>
</view>
<view style="display: flex;">
<view v-for="(item,index) in nums" :key="index"
:style="{width:100/nums.length + '%'}" style="background:#BBDAFF;height:36rpx">
<view v-for="(deepitem,dindex) in colorDeeps"
:key="dindex">
<view v-if="item>= deepitem.start && item <deepitem.end" class="deep">
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
nums: [
8,9,10,11,12,13,14,15,16,17,18,19,20,21,22
],
colorDeeps:[
{
start: 12,
end: 13
}
],
}
},
methods: {
}
}
</script>
<style lang="less" scoped>
.item{
font-size: 33rpx;
display: flex;
justify-content: space-around;
align-items: center;
height: 60rpx;
line-height: 54rpx;
color: #999999;
}
.deep{
background:#4278F7;
height:36rpx;
}
</style>
更多推荐
已为社区贡献7条内容
所有评论(0)