|
@@ -1,6 +1,9 @@
|
|
|
<script setup>
|
|
|
-import { ref, computed, onMounted } from "vue"
|
|
|
+import { ref, computed, onMounted, onBeforeUnmount } from "vue"
|
|
|
import { useRoute } from 'vue-router'
|
|
|
+import { useStore } from "vuex"
|
|
|
+
|
|
|
+const store = useStore()
|
|
|
|
|
|
const route = useRoute()
|
|
|
|
|
@@ -93,7 +96,11 @@ const changeCloseFu = () => {
|
|
|
isShowInfoText.value = false
|
|
|
}
|
|
|
isCloseInfo.value = !isCloseInfo.value
|
|
|
-
|
|
|
+ if (isShowOperationTip.value) {
|
|
|
+ isShowOperationTip.value = false
|
|
|
+ clearTimeout(timeoutIdOpTip)
|
|
|
+ timeoutIdOpTip = null
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
onMounted(() => {
|
|
@@ -113,6 +120,20 @@ const exChangeFu = () => {
|
|
|
curState.value = 1
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+store.dispatch('recordShownPaintingDetailOpTip')
|
|
|
+console.log(store.state.paintingDetailOpTipShowCount)
|
|
|
+const isShowOperationTip = ref(store.state.paintingDetailOpTipShowCount <= 2)
|
|
|
+// const isShowOperationTip = ref(true)
|
|
|
+let timeoutIdOpTip = null
|
|
|
+timeoutIdOpTip = setTimeout(() => {
|
|
|
+ isShowOperationTip.value = false
|
|
|
+ timeoutIdOpTip = null
|
|
|
+}, 2000)
|
|
|
+onBeforeUnmount(() => {
|
|
|
+ clearTimeout(timeoutIdOpTip)
|
|
|
+ timeoutIdOpTip = null
|
|
|
+})
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
@@ -178,6 +199,13 @@ const exChangeFu = () => {
|
|
|
<p v-html="FormatAuthorDesc.length > 0 ? FormatAuthorDesc :'暂无信息'" />
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <OperationTip
|
|
|
+ v-show="isShowOperationTip"
|
|
|
+ class="operation-tip-click"
|
|
|
+ :text="'点击收起'"
|
|
|
+ :color="'white'"
|
|
|
+ type="click"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -263,6 +291,12 @@ const exChangeFu = () => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ >.operation-tip-click{
|
|
|
+ position: absolute;
|
|
|
+ left: 2%;
|
|
|
+ top: 56%;
|
|
|
+ transform: translate(-50%, -50%);
|
|
|
+ }
|
|
|
}
|
|
|
.info-box-close{
|
|
|
width: 2%;
|