naive-ui/demo/documentation/components/confirm/enUS/useComponent.md
songwanli2025@163.com 4f90dd3b05 merge from upstream
2019-12-17 14:36:37 +08:00

527 B

Use Component

<n-confirm
  title="Confirm"
  content="Are you sure?" 
  :closable="false"
  positive-text="submit"
  @positive-click="cancelCallback"
  @negative-click="submitCallback"
  negative-text="cancel">
</n-confirm>
export default {
  methods: {
    cancelCallback () {
      this.$NMessage.success('cancel')
      this.isActive = false
    },
    submitCallback () {
      this.$NMessage.success('submit')
      this.isActive = false
    }
  }
}
.n-button {
  margin: 0 12px 8px 0;
}