parent
2959ad0af4
commit
73dcc76ec8
2 changed files with 37 additions and 1 deletions
@ -0,0 +1,36 @@ |
|||||||
|
<!DOCTYPE html> |
||||||
|
<html lang="en"> |
||||||
|
<head> |
||||||
|
<meta charset="UTF-8"> |
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE-edge"> |
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
||||||
|
<title>Hello-Vue</title> |
||||||
|
<link rel="stylesheet" href="https://unpkg.com/element-plus/dist/index.css"/> |
||||||
|
<script src="https://unpkg.com/vue@3.2.24/dist/vue.global.js"></script> |
||||||
|
<script src="https://unpkg.com/element-plus"></script> |
||||||
|
</head> |
||||||
|
<body> |
||||||
|
<div id="app"> |
||||||
|
<h1>{{ title }}</h1> |
||||||
|
<el-button type="primary" @click="add">点我</el-button> |
||||||
|
<p>计数 {{ count }}</p> |
||||||
|
</div> |
||||||
|
|
||||||
|
<script type="text/javascript"> |
||||||
|
const App = { |
||||||
|
data() { |
||||||
|
return { |
||||||
|
title: "Hello Vue", |
||||||
|
count: 0, |
||||||
|
} |
||||||
|
}, |
||||||
|
methods: { |
||||||
|
add() { |
||||||
|
this.count++; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
Vue.createApp(App).use(ElementPlus).mount('#app') |
||||||
|
</script> |
||||||
|
</body> |
||||||
|
</html> |
Loading…
Reference in new issue