<template>
  <div>
    <h1>{{message}}</h1>
    <button v-on:click="increment">Increment</button>
  </div>
</template>
<script>
export default {
  data() {
    return {
      count: 0,
      message: "Hello, Vue!"
    };
  },
  methods: {
    increment() {
      this.count++;
    }
  }
};
</script>
<style>
h1 {
  color: blue;
}
</style>
<!-- This component displays a message and a button that increments a counter when clicked. -->
写一段vue代码

原文地址: https://www.cveoy.top/t/topic/bs3T 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录