15 changed files with 172 additions and 30 deletions
@ -1,9 +1,13 @@ |
|||||
<template> |
<template> |
||||
<view class="w-full bg-gray-100 text-gray-200 text-center pt-4 pb-12">----------我也是有底线的----------</view> |
<view class="w-full bg-gray text-gray-200 text-center pt-4 pb-12">----------我也是有底线的----------</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
export default {}; |
export default {}; |
||||
</script> |
</script> |
||||
|
|
||||
<style></style> |
<style lang="scss" scoped> |
||||
|
.bg-gray { |
||||
|
background-color: $uni-bg-color-grey; |
||||
|
} |
||||
|
</style> |
||||
|
|||||
@ -1,9 +1,87 @@ |
|||||
<template> |
<template> |
||||
<view>训练归属</view> |
<view class="bg-white px-2"> |
||||
|
<view v-for="(list, index) in lists" :key="index"> |
||||
|
<view class="flex flex-col"> |
||||
|
<text>{{ list.title }}</text> |
||||
|
<img :src="list.img" class="w-full" /> |
||||
|
<text>训练结果</text> |
||||
|
<view class="flex flex-nowrap mt-3 rounded-3xl overflow-hidden"> |
||||
|
<view v-for="i in lines" :key="i.value" class="flex-1" :class="i.value === 6 ? '' : 'box'"> |
||||
|
<view class="w-full h-2" :class="i.checked ? 'bg-blue-500' : 'bg-gray-100'" @click="chooseLevel(i.value)"></view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
<EndLine /> |
||||
|
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
export default {}; |
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
lines: [ |
||||
|
{ |
||||
|
value: 1, |
||||
|
checked: true, |
||||
|
}, |
||||
|
{ |
||||
|
value: 2, |
||||
|
checked: false, |
||||
|
}, |
||||
|
{ |
||||
|
value: 3, |
||||
|
checked: false, |
||||
|
}, |
||||
|
{ |
||||
|
value: 4, |
||||
|
checked: false, |
||||
|
}, |
||||
|
{ |
||||
|
value: 5, |
||||
|
checked: false, |
||||
|
}, |
||||
|
{ |
||||
|
value: 6, |
||||
|
checked: false, |
||||
|
}, |
||||
|
], |
||||
|
lists: [ |
||||
|
{ |
||||
|
title: '迷宫', |
||||
|
img: 'https://www.tall.wiki/staticrec/guide/2.png', |
||||
|
trainer: ['张斌', '思南', '雪梅', '方圆', '张野', '马壮', '慧娟'], |
||||
|
}, |
||||
|
{ |
||||
|
title: '迷宫', |
||||
|
img: 'https://www.tall.wiki/staticrec/guide/2.png', |
||||
|
trainer: ['张斌', '思南', '雪梅', '方圆', '张野', '马壮', '慧娟'], |
||||
|
}, |
||||
|
], |
||||
|
}; |
||||
|
}, |
||||
|
|
||||
|
methods: { |
||||
|
chooseLevel(index) { |
||||
|
this.lines.forEach((line, i) => { |
||||
|
console.log('i: ', i, index); |
||||
|
if (i < index) { |
||||
|
line.checked = true; |
||||
|
} else { |
||||
|
line.checked = false; |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
</script> |
</script> |
||||
|
|
||||
<style></style> |
<style lang="scss" scoped> |
||||
|
page { |
||||
|
background-color: $uni-bg-color-grey; |
||||
|
} |
||||
|
|
||||
|
.box { |
||||
|
margin-right: 2px; |
||||
|
} |
||||
|
</style> |
||||
|
|||||
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
@ -1,9 +1,55 @@ |
|||||
<template> |
<template> |
||||
<view>工具箱</view> |
<view class="bg-white flex flex-col px-2"> |
||||
|
<view v-for="(item, index) in lists" :key="index"> |
||||
|
<view class="flex justify-between items-center py-3 border-b"> |
||||
|
<view>{{ item.title }}</view> |
||||
|
<view class="flex items-center text-gray-400"> |
||||
|
<text class="mr-2">{{ item.name || '绑定' }}</text> |
||||
|
<u-icon name="wifi" :color="item.bound ? '#1890FF' : '#999999'" size="36"></u-icon> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
export default {}; |
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
lists: [ |
||||
|
{ |
||||
|
title: '工具箱1', |
||||
|
name: 'ccsens_5G', |
||||
|
bound: true, |
||||
|
}, |
||||
|
{ |
||||
|
title: '工具箱2', |
||||
|
name: 'ccsens_5G', |
||||
|
bound: true, |
||||
|
}, |
||||
|
{ |
||||
|
title: '工具箱3', |
||||
|
name: 'ccsens_5G', |
||||
|
bound: true, |
||||
|
}, |
||||
|
{ |
||||
|
title: '工具箱4', |
||||
|
name: '', |
||||
|
bound: false, |
||||
|
}, |
||||
|
{ |
||||
|
title: '工具箱5', |
||||
|
name: '', |
||||
|
bound: false, |
||||
|
}, |
||||
|
], |
||||
|
}; |
||||
|
}, |
||||
|
}; |
||||
</script> |
</script> |
||||
|
|
||||
<style></style> |
<style lang="scss" scoped> |
||||
|
page { |
||||
|
background-color: $uni-bg-color-grey; |
||||
|
} |
||||
|
</style> |
||||
|
|||||
Loading…
Reference in new issue