12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <template>
- <uni-popup ref="alertDialog" type="dialog">
- <uni-popup-dialog :type="popupInfo.msgType" :cancelText="popupInfo.cancelText" :confirmText="popupInfo.confirmText" :title="popupInfo.title" :content="popupInfo.content" @confirm="dialogConfirm" @close="dialogClose"></uni-popup-dialog>
- </uni-popup>
- </template>
- <script>
- export default {
- props: {
- popupInfo: {
- type: Object,
- default: () => ({
- msgType: 'success',
- cancelText: '关闭',
- confirmText: '确认',
- title: '通知',
- content: '默认消息'
- })
- }
- },
- data () {
- return {}
- },
- mounted() {},
- methods: {
- dialogConfirm() {
- this.$emit('confirm')
- },
- dialogClose() {
- this.$emit('close')
- },
- open() {
- this.$refs.alertDialog.open()
- },
- close() {
- this.$refs.alertDialog.close()
- }
- }
- }
- </script>
- <style>
- </style>
|