Vue
wbl320
这个作者很懒,什么都没留下…
展开
-
Vue创建一个实时显示的时间
html代码: <div id="time"> <a>time{[now_time]}</a> </div> js代码: var time = new Vue({ el:‘#time’, data(){ return { now_time: new Date() } }, mounted(){ this.tim...原创 2019-12-11 16:00:43 · 862 阅读 · 0 评论 -
更改Vue默认插值格式
在Vue中,页面绑定数据默认使用 {{ data }}实现数据绑定 如: <div id="app1"> <p>{{message}}</p> </div> var app1 = new Vue({ el: '#app1', data() { return { message...原创 2019-12-09 13:18:57 · 255 阅读 · 0 评论 -
Vue通过axios向后端提交数据
首先Vue是不支持Ajax的,所以得依靠axios插件提交。 在Vue之前引入axios文件: <script src="/static/source/static/element/axios.min.js"></script> <script src="/static/source/static/element/vue.js"></script>...原创 2019-12-11 11:30:34 · 1241 阅读 · 0 评论