1. 程式人生 > >讀掘金小冊元件精講總結3

讀掘金小冊元件精講總結3

4.Vue的構造器--extend和$mount

5.全域性提示元件和全域性自定義標籤(npm install ggg-ui 自行檢視原始碼,檢視另外一篇部落格模仿element釋出一個npm關於vue外掛的包

main.js
import gggUi from 'ggg-ui' Vue.use(gggUi)

  

<template>
  <div>
    <ggg-button @click="open">
      btn
    </ggg-button>
  </div>
</template>

<script>
export default {
  data () {
    return {

    }
  },
  components: {

  },
  computed: {},
  methods: {
    open () {
      this.$message({
        message: '你好呀',
        duration: 1000
      })
    }
  },
  mounted () {
  }
}
</script>

<style>
</style>