|
|
@@ -1,13 +1,13 @@
|
|
|
<template>
|
|
|
<a-button
|
|
|
- class="btn"
|
|
|
+ :class="answer_status / 1 === 2 ? 'btn' : 'btn-1'"
|
|
|
v-if="show_internet_search"
|
|
|
- @mouseenter="isHovered = true"
|
|
|
- @mouseleave="isHovered = false"
|
|
|
+ @mouseenter="mouseChange(1)"
|
|
|
+ @mouseleave="mouseChange(0)"
|
|
|
@click="toSearchPage"
|
|
|
>
|
|
|
<icon-check-circle class="icon" />
|
|
|
- <span class="btn-text"> {{ buttonText }}</span>
|
|
|
+ <span class="btn-text" :style="btn_text_style"> {{ buttonText }}</span>
|
|
|
</a-button>
|
|
|
<a-button class="btn-right" v-if="show_internet_search" @click="handleShowChange">
|
|
|
<icon-down />
|
|
|
@@ -35,7 +35,8 @@
|
|
|
<script setup>
|
|
|
import { ref, computed, watch } from 'vue';
|
|
|
const props = defineProps({
|
|
|
- internet_search: Array
|
|
|
+ internet_search: Array,
|
|
|
+ answer_status: String
|
|
|
});
|
|
|
const emit = defineEmits(['toSearchPage']);
|
|
|
const internet_search_len = computed(() => {
|
|
|
@@ -45,6 +46,16 @@ const isHovered = ref(false);
|
|
|
const buttonText = computed(() => {
|
|
|
return isHovered.value ? '打开网页详情' : `已阅读${internet_search_len.value}个网页`;
|
|
|
});
|
|
|
+
|
|
|
+const mouseChange = (status) => {
|
|
|
+ console.log(props.answer_status, typeof props.answer_status);
|
|
|
+ if (props.answer_status / 1 !== 2) {
|
|
|
+ return;
|
|
|
+ } else {
|
|
|
+ isHovered.value = status ? true : false;
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
const toSearchPage = () => {
|
|
|
emit('toSearchPage');
|
|
|
};
|
|
|
@@ -58,10 +69,10 @@ const openUrl = (url) => {
|
|
|
};
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
-.btn {
|
|
|
+/* .btn {
|
|
|
border-top-left-radius: 12px;
|
|
|
border-bottom-left-radius: 12px;
|
|
|
-}
|
|
|
+} */
|
|
|
.icon {
|
|
|
color: #20b759;
|
|
|
font-size: 16px;
|
|
|
@@ -69,7 +80,8 @@ const openUrl = (url) => {
|
|
|
}
|
|
|
|
|
|
/* 基础按钮样式 */
|
|
|
-.btn {
|
|
|
+.btn,
|
|
|
+.btn-1 {
|
|
|
position: relative;
|
|
|
overflow: hidden;
|
|
|
padding: 10px 15px;
|