naive-ui/demo/documentation/components/message/zhCN/basic.demo.md
07akioni 487001d697 build: add changelog to site, refactor loader based on suffix
.demo.md for component demo
.demo-entry.md for demo entry
.md for common docs
2020-08-19 23:30:04 +08:00

1006 B

基础用法

<n-button @click="emitInfo">
  信息
</n-button>
<n-button @click="emitError">
  错误
</n-button>
<n-button @click="emitWarning">
  警告
</n-button>
<n-button @click="emitSuccess">
  成功
</n-button>
<n-button @click="emitLoading">
  加载中
</n-button>
export default {
  data() {
    return {}
  },
  methods: {
    emitInfo() {
      this.$NMessage.info(
        "I don't know why nobody told you how to unfold your love"
      )
    },
    emitError() {
      this.$NMessage.error("Once upon a time you dressed so fine")
    },
    emitWarning() {
      this.$NMessage.warning("How many roads must a man walk down")
    },
    emitSuccess() {
      this.$NMessage.success(
        "'Cause you walked hand in hand With another man in my place"
      )
    },
    emitLoading() {
      this.$NMessage.loading(
        "If I were you, I will realize that I love you more than any other guy"
      )
    }
  }
}
.n-button {
  margin: 0 12px 8px 0;
}