代码拉取完成,页面将自动刷新
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Document</title>
</head>
<body>
<div id="app">
<p>
<h-button color="primary" @click="show = true">Open vue modal</h-button>
</p>
<p>
<h-button color="primary" @click="openModal">Open js modal</h-button>
</p>
<Modal v-model="show">
<template v-slot:header>title</template>
<div>This is a modal called by vue</div>
<template v-slot:footer>
<h-button @click="show=false">cancel</h-button>
</template>
</Modal>
<h-pagination />
</div>
</body>
<script src="https://cdn.jsdelivr.net/npm/vue@3"></script>
<script src="./dist/heyui.js"></script>
<link rel="stylesheet" href="./themes/index.css" />
<script>
const App = {
data() {
return {
message: 'Hello Vue!',
show: false
};
},
methods: {
openModal: function () {
console.log(this);
HeyUI.modal({
title: 'title',
content: 'This is a js modal'
});
}
}
};
const app = Vue.createApp(App);
app.use(HeyUI);
app.mount('#app');
</script>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。