<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title> Vue学习第二天 </title>
<script type="text/javascript" src="../js/vue.js"></script>
<!-- 引入样式 -->
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<!-- 引入组件库 -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<style>
</style>
</head>
<body>
<div id="root">
<h1>控制</h1>
<button @click="human.age++">年龄++</button>
<button @click="addSex">增加性别属性</button>
<button v-show="human.sex" @click="human.sex='保密'">修改性别</button>
<!-- 修饰符,仅触发
Vue 数据监视
最新推荐文章于 2023-10-24 10:29:01 发布