-
Notifications
You must be signed in to change notification settings - Fork 263
/
simple.html
53 lines (52 loc) · 1.34 KB
/
simple.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!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>