Last active
June 5, 2019 02:58
-
-
Save scturtle/84fe5f1bdac4380e0f59a90a46a68e02 to your computer and use it in GitHub Desktop.
simple vue template with element-ui
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Welcome to Vue</title> | |
<script src="https://cdn.bootcss.com/vue/2.6.10/vue.min.js"></script> | |
<script src="https://cdn.bootcss.com/element-ui/2.7.2/index.js"></script> | |
<script src="https://cdn.bootcss.com/element-ui/2.7.2/locale/zh-CN.min.js"></script> | |
<link href="https://cdn.bootcss.com/element-ui/2.7.2/theme-chalk/index.css" rel=stylesheet> | |
</head> | |
<body> | |
<div id="app" style='text-align: center'> | |
<h1>{{ greeting }}</h1> | |
<el-button type="primary" @click="hello">click me</el-button> | |
</div> | |
<script> | |
var app = new Vue({ | |
el: '#app', | |
data: { | |
greeting: 'Welcome to your Vue.js app!', | |
}, | |
methods: { | |
hello: function() { | |
this.$message({message: 'hello'}) | |
} | |
} | |
}) | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment