49 lines
929 B
Vue
49 lines
929 B
Vue
<template>
|
|
<view class="u-wrap">
|
|
<u-sticky>
|
|
<!-- 只能有一个根元素 -->
|
|
<view class="sticky">
|
|
<u-search v-model="keyword" placeholder="请输入单位名称" :show-action="false" ></u-search>
|
|
</view>
|
|
</u-sticky>
|
|
<ListCol v-for="(item, idx) in list" :data="item" :column='column' label-width="160" />
|
|
</view>
|
|
</template>
|
|
|
|
<script setup>
|
|
import {
|
|
ref
|
|
} from 'vue';
|
|
import ListCol from '@/components/ListCol.vue'
|
|
|
|
const keyword = ref("")
|
|
const column = ref([{
|
|
name: '单位名称',
|
|
value: 'unitName',
|
|
type: 'string',
|
|
}, {
|
|
name: '在建项目数',
|
|
value: 'inProject',
|
|
type: 'string',
|
|
}, {
|
|
name: '停工项目数',
|
|
value: 'stopProject',
|
|
type: 'string',
|
|
}])
|
|
|
|
const list = ref([{
|
|
unitName: '天辰',
|
|
inProject: 20,
|
|
stopProject: 5
|
|
}, {
|
|
unitName: '赛鼎',
|
|
inProject: 20,
|
|
stopProject: 5
|
|
}])
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.sticky{
|
|
padding: 20rpx 30rpx;
|
|
}
|
|
</style> |