|
|
@ -1,6 +1,6 @@ |
|
|
|
<template> |
|
|
|
<view class="px-2 bg-white wrap"> |
|
|
|
<view class="home-box u-skeleton"> |
|
|
|
<view class="home-box u-skeleton" v-if="!loading"> |
|
|
|
<scroll-view :enable-flex="true" :scroll-left="scrollLeft" :throttle="false" scroll-with-animation scroll-x @scroll="scroll"> |
|
|
|
<view class="tab-box flex justify-between"> |
|
|
|
<!-- 角色项 |
|
|
@ -53,15 +53,17 @@ |
|
|
|
</scroll-view> |
|
|
|
</view> |
|
|
|
<!-- 骨架屏 --> |
|
|
|
<u-skeleton :animation="true" :loading="loading" bg-color="#fff"></u-skeleton> |
|
|
|
<skeleton :banner="false" :loading="loading" :row="1" animate class="skeleton"></skeleton> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { mapState, mapMutations, mapActions } from 'vuex'; |
|
|
|
import Skeleton from '../Skeleton/Skeleton'; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'Roles', |
|
|
|
components: { Skeleton }, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
tabIndex: 0, // 当前访问的 index 默认为0 |
|
|
@ -69,9 +71,9 @@ export default { |
|
|
|
scrollLeft: 0, // scrollview需要滚动的距离 |
|
|
|
loading: false, // 是否显示骨架屏组件 |
|
|
|
roles: [ |
|
|
|
{ id: 1, name: '项目经理', mine: 1, pm: 1, sequence: 1, type: 0 }, |
|
|
|
{ id: 2, name: '运维', mine: 0, pm: 0, sequence: 2, type: 0 }, |
|
|
|
{ id: 3, name: '设置', mine: 0, pm: 0, sequence: 2, type: 1 }, |
|
|
|
{ id: 1, name: ' ', mine: 1, pm: 1, sequence: 1, type: 0 }, |
|
|
|
{ id: 2, name: ' ', mine: 0, pm: 0, sequence: 2, type: 0 }, |
|
|
|
{ id: 3, name: ' ', mine: 0, pm: 0, sequence: 2, type: 1 }, |
|
|
|
], |
|
|
|
roleLeft: 0, |
|
|
|
|
|
|
|