|
|
@@ -33,9 +33,10 @@
|
|
|
|
|
|
<!-- 内容区域 -->
|
|
|
<div class="content-box">
|
|
|
- <div @click="handleLabClick(item)" v-for="(item, index) in laboratoryList" :key="index" class="small-box">
|
|
|
+ <div v-for="(item, index) in laboratoryList" :key="index" class="small-box">
|
|
|
<div
|
|
|
class="nested-box"
|
|
|
+ @click="handleLabClick(item)"
|
|
|
:style="{
|
|
|
backgroundImage: `url(${item.image})`,
|
|
|
backgroundSize: 'cover'
|
|
|
@@ -116,10 +117,7 @@ const fetchLaboratoryList = async () => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-// 组件挂载时获取数据
|
|
|
-onMounted(() => {
|
|
|
- fetchLaboratoryList();
|
|
|
-});
|
|
|
+
|
|
|
|
|
|
const handleLabClick = (item) => {
|
|
|
try {
|
|
|
@@ -141,6 +139,12 @@ const handleLabClick = (item) => {
|
|
|
window.location.reload();
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+// 组件挂载时获取数据
|
|
|
+onMounted(() => {
|
|
|
+ fetchLaboratoryList();
|
|
|
+});
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
@@ -258,7 +262,6 @@ const handleLabClick = (item) => {
|
|
|
align-items: center;
|
|
|
color: black;
|
|
|
font-size: rpx(8);
|
|
|
- cursor: pointer; // 鼠标指针样式
|
|
|
}
|
|
|
.nested-box {
|
|
|
width: rpx(150);
|
|
|
@@ -269,6 +272,7 @@ const handleLabClick = (item) => {
|
|
|
border: 1px solid white; // 添加边框;
|
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
|
+ cursor: pointer; // 鼠标指针样式
|
|
|
}
|
|
|
.nested-box:hover,
|
|
|
.nested-box:active {
|