作业:作业上传

This commit is contained in:
2025-03-24 14:11:48 +08:00
parent 3f7f49351a
commit eb40235f16
44 changed files with 4432 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
<template>
<h3 v-if="flag">条件为{{flag}}渲染这是v-if</h3>
<h3 v-show="flag">条件为{{flag}}渲染h3-这是v-show</h3>
<div v-show="flag" class="div1">div</div>
<button type="button" @click="change">切换元素-{{flag}}</button>
</template>
<script setup lang="ts">
import {ref } from "vue";
const flag = ref(true)
const change = ()=>{
flag.value = !flag.value
}
</script>