前端知识技术手册

关住 公 纵 号 “  阿蒙课程分享    ”  获得学习资料及趣味分享 


1.Element,一套为开发者、设计师和产品经理准备的基于 Vue 2.0 的桌面端组件库

http://element.eleme.io/#/zh-CN  

2. 渐进式JavaScript 框架

https://cn.vuejs.org/

3. vue-cli git-hub

https://github.com/vuejs/vue-cli

4. 切换npm源

http://blog.csdn.net/wozaixiaoximen/article/details/50448893

5. vue-cli 学习博客

http://www.cnblogs.com/wisewrong/p/6255817.html

 

https://www.cnblogs.com/luxiaoxing/p/7563350.html

6. vs code 软件

https://code.visualstudio.com/Download

 

问题:

importHelloWorldfrom'@/components/HelloWorld'

@ 是什么意思?

7. vue-cli 引入 element-ui 组件

https://jingyan.baidu.com/article/a17d5285c85acb8098c8f204.html

8. echarts

http://echarts.baidu.com/tutorial.html

9. 淘宝镜像

https://www.nuandiaodiao.com/config/npm_cnpm_registry.html

npm install -g cnpm --registry=https://registry.npm.taobao.org

8. nrm 包管理器   

https://www.nuandiaodiao.com/config/nrm.html

9. 开发本地跨域问题

https://www.jianshu.com/p/95b2caf7e0da

9. vue-devtools 必备开发工具(简单方法可以通过翻墙实现)

http://blog.csdn.net/sinat_17775997/article/details/70224280

9. 安装公司的包管理 nrm

npm install -g nrm --registry=https://www.nuandiaodiao.com/config/nrm.html

9. Axure 谷歌Chrome 浏览器插件安装教程

http://blog.csdn.net/sinat_17775997/article/details/70224280

10. 修改api 地址:

Config -- > env

http://blog.csdn.net/sinat_17775997/article/details/70224280

 

-----------------------------摘录-------------------------------

**************************

三、使用 <router-link> 映射路由

home.vue 中引入了 header.vue 组件,其中含有导航菜单

当点击导航菜单的时候,会切换 home.vue <router-view> 中的内容

这种只需要跳转页面,不需要添加验证方法的情况,可以使用 <router-link> 来实现导航的功能:

在编译之后,<router-link> 会被渲染为 <a> 标签, to 会被渲染为 href,当 <router-link> 被点击的时候,url 会发生相应的改变

如果使用 v-bind 指令,还可以在 to 后面接变量,配合 v-for 指令可以渲染导航菜单

 

如果对于所有 ID 各不相同的用户,都要使用 home 组件来渲染,可以在 routers.js 中添加动态参数

{

    path: '/home/:id',

    component: Home

}

这样 "/home/user01""/home/user02""/home/user03" 等路由,都会映射到 Home 组件

然后还可以使用 $route.params.id 来获取到对应的 id

 

 

四、编程式导航

实际情况下,有很多按钮在执行跳转之前,还会执行一系列方法,这时可以使用 this.$router.push(location) 来修改 url,完成跳转

push 后面可以是对象,也可以是字符串:

// 字符串

this.$router.push('/home/first')

 

// 对象

this.$router.push({path: '/home/first' })

 

// 命名的路由

this.$router.push({name: 'home', params: { userId: wise }})

 

 

 

--------------------------------************************-------------------------------------------

遇到的错误

 

vue常见问题解决办法(二)|warningcomponentlists rendered with v-for should have explicit keys

 

 

 

 

问题1

解决方法 npm install -g nodemon

问题2

有些问题是有些安装包被屏蔽需要针对特定的包指定安装源

方法:

修改 C:\Users\lvfengwen.QL\.npmrc目录下文件内容为

sass_binary_site=https://npm.taobao.org/mirrors/node-sass/

phantomjs_cdnurl=https://npm.taobao.org/mirrors/phantomjs/

electron_mirror=https://npm.taobao.org/mirrors/electron/

registry=http://registry.npm.taobao.org

问题3

如何启动假数据 mock 访问

方法:

打开项目文件: build à dev-server.js

在 config à index.js 文件修改 mock:true

问题4

修改 mode 模式为history 去除 #

在文件  routes à index 里修改 mode :‘history’

问题5

修改接口请求的地址

在文件 static à js àconfig.js 里面修改 varapiPrefix = 'https://localhost:8080'; // API接口链接

问题 6

npm i -D uglifyjs-webpack-plugin    安装到 devDependencies

问题 7

如何清理 npm 缓存

cnpmcache clean    npm cache clean

问题 8

Window.Event.KeyCode=13是什么意思

就是enter键处发windows事件,enter键的ASCII是13。

问题9

 

**************************注意事项*********************************

1.

 

*************************待解答问题*******************************

1.      给的模板里没有history,那是怎么处理 # 的?

2.      这个返回值复制一下页对象是什么意思?

3.      页码的控制

4.      全选的控制

5.      如何控制单元格宽度

/*--------------------------------------------20180117----------------------------------------*/

6.      删除可以支持分页删除吗?

7.      网页图标怎么换?

8.      如何去掉记忆?

9.      

10.  新的页面的跳转如何实现?如何带着id 传递?

11.  选择后怎么没有变化?

12.  

13.  修改的时候如何加载数据?

14.  联动选择返回值的样式是什么样的?

15.  

16.  如何通过变量控制 elements的样式变化?

17.  状态修改

18.  ----------------------**********************************-----------------**********

19.  文件上传

20.  **************************------------------------------------20180202

21.  Resolve reject

22.   

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值