<template>
<view class="content">
<view class="label" @click="toggleFavorite">
<img class="heart" :class="{ heartt: isChecked }"
:src="isChecked ? '../../static/A.png' : '../../static/B.png'" alt="Favorite" />
<view class="action">
<view class="option-1" :class="{ active: isChecked }">我喜欢你</view>
<view class="option-2" :class="{ active: !isChecked }">不喜欢你</view>
</view>
</view>
</view>
</template>
<script setup>
import {
ref
} from 'vue';
const isChecked = ref(false);
function