wangwei před 3 roky
rodič
revize
97e304298f
2 změnil soubory, kde provedl 6 přidání a 1 odebrání
  1. 1 0
      src/components/Layout.vue
  2. 5 1
      src/components/Main.vue

+ 1 - 0
src/components/Layout.vue

@@ -249,6 +249,7 @@ export default defineComponent({
       }
     );
     function handleTab(id) {
+      console.log('点击的tab => id:' + id)
       current_tab.value = id;
     }
     function handleMenuBtn(id) {

+ 5 - 1
src/components/Main.vue

@@ -4,12 +4,14 @@
       <p>
         <span style="font-size: 1.8rem">4389 Axies</span>
         <img
+        @click="() => {full = !full}"
+        v-if="!full"
           style="vertical-align: super; margin-left: 5px"
           width="18"
           src="../assets/heart.png"
           alt=""
         />
-        <!-- <img style="vertical-align: super; margin-left: 5px;" width="18" src="../assets/heart-full-red.png" alt=""> -->
+        <img @click="() => {full = !full}" v-if="full" style="vertical-align: super; margin-left: 5px;" width="18" src="../assets/heart-full-red.png" alt="">
       </p>
       <div class="action">
         <a-select
@@ -140,6 +142,7 @@ export default defineComponent({
       label: "Lowest ID",
     });
     const page = ref(1);
+    const full = ref(false);
     function handleAdd() {
       page.value = page.value + 1;
       console.log(`page.value`, page.value);
@@ -157,6 +160,7 @@ export default defineComponent({
       console.log(`e`, e);
     }
     return {
+      full,
       page,
       value,
       options,