Vue——声明式语法与数据双向绑定

<template>
  <h1>{
   
   { msg }}</h1>
</template>

<script>

// 命令式
// document.querySelector("h1").innerHTML = "我不想上班";

// 声明式
export default {
  name: "App",
  data() {
    return {
      msg: "1234",
    };
  }
};
</script>

猜你喜欢

转载自blog.csdn.net/qq_43201350/article/details/120398754
今日推荐