1.0.0 • Published 5 years ago

alert123456789 v1.0.0

Weekly downloads
4
License
-
Repository
-
Last release
5 years ago

npm

A Vue.js project

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report
<template>
  <div class="alert">
    <button @click="buttonClick()">{{text}}</button>
  </div>
</template>

<script>
export default {
  name: 'Alert',
  props: {
    text: { // 文本
      type: String,
      default () {
        return '测试文本'
      }
    }
  },
  data () {
    return {}
  },
  methods:{
    buttonClick() {
      alert(this.text)
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>

</style>

For a detailed explanation on how things work, check out the guide and docs for vue-loader.

1.0.0

5 years ago