Skip to content

Instantly share code, notes, and snippets.

@scturtle scturtle/index.html
Last active Jun 5, 2019

Embed
What would you like to do?
simple vue template with element-ui
<!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
You can’t perform that action at this time.