Skip to content

message

消息通知

查看代码
html
<button class="open-btn" bg @click="base">默认</button>
<button class="open-btn open-btn-primary" bg @click="success">success</button>
<button class="open-btn open-btn-warn" bg @click="warn">warn</button>
<button class="open-btn open-btn-danger" bg @click="danger">danger</button>

<script setup>

	import { onMounted } from 'vue'

	import opener from '../public/opener.esm.js'

	const base = ()=>{
		opener.message({
			message: '默认消息'
		})
	}

	const success = ()=>{
		opener.message({
			type: 'success',
			message: 'success消息'
		})
	}	

	const warn = ()=>{
		opener.message({
			type: 'warn',
			message: 'warn消息'
		})
	}

	const danger = ()=>{
		opener.message({
			type: 'danger',
			message: 'danger消息'
		})
	}
</script>