上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 48 下一页
摘要: 1、可以在请求中添加跳转 myLogin(){ console.log(this.account+" "+this.accountPassword) if(this.account == '' || this.accountPassword == '') { console.log(this.acc 阅读全文
posted @ 2020-03-29 11:16 小白啊小白,Fighting 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 1、安装可以参考这篇博客 编译安装: https://www.cnblogs.com/liujuncm5/p/6713784.htmlyum安装:https://zhuanlan.zhihu.com/p/136824395 2、部署前端程序 location / { root /var/www/di 阅读全文
posted @ 2020-03-26 16:20 小白啊小白,Fighting 阅读(1903) 评论(0) 推荐(0) 编辑
摘要: 1、当Vue项目完成的时候,就需要部署到服务器上,首先,我们要修改config/index.js文件 assetsPublicPath: '/' 改为 assetsPublicPath: './'#注意,这个文件要改两处assetsPublicPath 2、运行 npm dev build ,把编译 阅读全文
posted @ 2020-03-25 23:27 小白啊小白,Fighting 阅读(3024) 评论(0) 推荐(0) 编辑
摘要: 1、watch属性使用案例 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <!--cdn镜像快速导入Vue包--> <script src="https://cdn.bootcs 阅读全文
posted @ 2020-03-25 15:23 小白啊小白,Fighting 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 1、命名视图 routes:[ { path:'/',components:{ default:header, 'left':leftBox, 'main':mainBox } } ] 2、案例 <!DOCTYPE html> <html lang="en"> <head> <meta charse 阅读全文
posted @ 2020-03-24 21:24 小白啊小白,Fighting 阅读(282) 评论(0) 推荐(0) 编辑
摘要: 1、路由嵌套 routes:[ { path:'/account', component:account, children:[ {path: '/login',component: login}, {path: '/register',component: register}, ] } 2、案例 阅读全文
posted @ 2020-03-24 21:21 小白啊小白,Fighting 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 1、ref获取Dom <!--ref除了引用元素之外,还可以引用组件以及组件方法、数据--> <h1 ref="h1">哈哈</h1> 引用:this.$refs.h1.innerText 2、案例 <!DOCTYPE html> <html lang="en"> <head> <meta char 阅读全文
posted @ 2020-03-24 16:07 小白啊小白,Fighting 阅读(341) 评论(0) 推荐(0) 编辑
摘要: 1、组件传值练习以及浏览器缓存 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <!-- jQuery文件。务必在bootstrap.min.js 之前引入 --> <script 阅读全文
posted @ 2020-03-24 16:05 小白啊小白,Fighting 阅读(323) 评论(0) 推荐(0) 编辑
摘要: 1、子组件向父组件传值步骤 1、父组件定义一个方法 methods:{ show(data){ this.fumsg = data; console.log("父组件数据"+data) } } 2、子组件通过事件绑定调用父组件方法 <!-- 父组件向子组件传递方法,使用事件绑定机制 v-on --> 阅读全文
posted @ 2020-03-23 23:47 小白啊小白,Fighting 阅读(339) 评论(0) 推荐(0) 编辑
摘要: 1、父组件向子组件传值步骤 a) <!--父组件通过v-bind向子组件传值--> <com1 :parentmsg="msg"></com1>b) //把父组件传递过来的parentmsg属性,先在props数组中定义一下,才能使用父组件的数据//注意:组件中所有的props中的数据,都是通过父组 阅读全文
posted @ 2020-03-23 23:18 小白啊小白,Fighting 阅读(283) 评论(0) 推荐(0) 编辑
上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 48 下一页