Merge pull request 'zdg' (#368) from zdg into main

Reviewed-on: #368
This commit is contained in:
zhengdegang 2024-10-25 15:29:56 +08:00
commit 4816a4565b
2 changed files with 8 additions and 9 deletions

View File

@ -73,9 +73,8 @@ const list = computed(() => props.data.map((o,i) => {
})) }))
onMounted(() => { onMounted(() => {
posBtnAll = btnRef.value.getBoundingClientRect() posBtnAll = btnRef.value.getBoundingClientRect()
hPost.value = posBtnAll.height hPost.value = Math.round(posBtnAll.height)
curNode = sessionStore?.get?.('subject.curNode')
curNode = sessionStore.get('subject.curNode')
}) })
// === === // === ===
// //
@ -97,7 +96,7 @@ const clickHandel = (o, e) => {
isVisible.value = !isColse // isVisible.value = !isColse //
activeObj.value = o activeObj.value = o
const nodeH = parseInt(node.height / 2) // const nodeH = parseInt(node.height / 2) //
topPos.value = parseInt(node.top) - posBtnAll.top + nodeH topPos.value = Math.round(parseInt(node.top) - posBtnAll.top + nodeH)
} }
emit('change', o) emit('change', o)
} }
@ -149,8 +148,8 @@ const closeActive = () =>{
--top: 30px; --top: 30px;
--height: 40vh; --height: 40vh;
position: fixed; position: fixed;
inset: 50% 75px auto auto; inset: 0 75px auto auto;
transform: translateY(-50%); // transform: translateY(-50%);
background-color: #121212; background-color: #121212;
padding: 10px; padding: 10px;
border-radius: 4px; border-radius: 4px;

View File

@ -1,6 +1,6 @@
<template> <template>
<div v-if="props.test"> <div v-if="props.test">
<el-button type="primary" @click="trigger" v-tap:trigger="">点赞</el-button> <el-button type="primary" @click="trigger(1)" v-tap:trigger="[1,'']">点赞</el-button>
<el-button type="primary" @click="trigger(2, '学生A')" v-tap:trigger="[2,'学生A']">疑惑</el-button> <el-button type="primary" @click="trigger(2, '学生A')" v-tap:trigger="[2,'学生A']">疑惑</el-button>
</div> </div>
<!-- 温度计-模式 --> <!-- 温度计-模式 -->
@ -258,11 +258,11 @@ defineExpose({ trigger })
min-width: 15px; min-width: 15px;
// height: 500px; // height: 500px;
&.like{ &.like{
background-image: linear-gradient(to top, #fef0f0, #f56c6c); background-image: linear-gradient(to top, #d2f0cb, #2f9e44);
// animation: striped-flow 5s linear infinite; // animation: striped-flow 5s linear infinite;
} }
&.doubt{ &.doubt{
background-image: linear-gradient(to top, #fdf6ec, #e6a23c); background-image: linear-gradient(to top, #ebc6c6, #ff0000);
} }
} }
} }