modal
模态框
查看代码
html
<button class="open-btn" bg @click="base">默认</button>
<button class="open-btn open-btn-primary" bg @click="english">英文按钮</button>
<button class="open-btn open-btn-warn" bg @click="hide">隐藏按钮</button>
<script setup>
import opener from '../public/opener.esm.js'
const base = ()=>{
opener.modal({
title: '默认modal',
message: '默认消息'
})
}
const english = ()=>{
opener.modal({
title: '英文标题',
message: '英文消息',
lang: {
ok: 'ok',
cancel: 'cancel'
}
})
}
const hide = ()=>{
opener.modal({
title: '隐藏按钮标题',
message: '隐藏按钮消息',
show: {
ok: false,
cancel: false
}
})
}
</script>