1.0.3 • Published 2 years ago

vue-custom-alert v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

适用于vue的弹框

示例

使用示例

<alert v-if="showAlert" text="测试内容" title="测试抬头" cancel="取消" confirm="确认" @closeAlert='closeAlert' @confirm='confirmAlert' @cancel='cancelAlert'></alert>
import alert from 'vue-custom-alert'
export default {
  data() {
    return {
      showAlert: true
    };
  },
  components: {
    alert
  },
  methods: {
    closeAlert() {
      this.showAlert = false
    },
    confirmAlert () {
      console.log('点击了确定按钮')
      this.showAlert = false
    },
    cancelAlert () {
      console.log('点击了取消按钮')
      this.showAlert = false
    },
  }
}
1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago