短网址生成

微信等部分网址不支持中文路径的识别 可以采用短网址生成器来生成新的短网址坐map映射

http://dwz.cn/ 百度短网址生成地址 还要对应api可以对接

地图慧 直接利用数据 结合地图 生成相对应的表格

http://c.dituhui.com/

百度图说

字体图标

https://icomoon.io/

配合zepling使用
http://www.ui.cn/detail/151088.html

TWaver HTML5 3D 商用软件

电信 地铁线路图 机房 3D展示
3D立体展示解决方案
http://www.servasoft.com

YML 配置文件的书写

阮一峰YAML教程

for ... in 遍历对象的属性

for ... of 遍历数组
Array.forEach(value, index,orgDataArray) 遍历

当然,用别人的 CDN 都是不保险的,所以建议在 CDN 读取失败的时候从自己服务器提供:

  1. <script src="//http://lib.sinaapp.com/js/jquery/1.7.2/jquery.min.js"></script><script>
  2. if (!window.jQuery) {
  3. var script = document.createElement('script');
  4. script.src = "/js/jquery.min.js"; document.body.appendChild(script);
  5. }
  6. </script>

博客和主题

参考:
https://gu091120.github.io/

使用yalianext

favicon 的图标 在webpack 中通过插件来添加 HtmlWebpackPlugin

  1. new HtmlWebpackPlugin({
  2. template: 'src/index.html',
  3. favicon: path.resolve('./src/favicon.ico')
  4. })

vux uuid 生成策略

export default {
  created () {
    this.uuid = Math.random().toString(36).substring(3, 8)
  }
}

// 使用 *.vue 
import uuidMixin from '../../mixins/uuid'

export default {
  name: 'agree',
  mixins: [uuidMixin]

}


<a name="cnpm"></a>
### cnpm

```javascript
npm install -g cnpm --registry=https://registry.npm.taobao.org
cnpm 安装有各种诡异的问题 可以采用如下方式

// npm 设置 registry  或开启vpn
npm install --registry=https://registry.npm.taobao.org
// yarn 安装
yarn config set registry https://registry.npm.taobao.org
yarn install
// 如果安装失败或中途错误 可以直接删除 node_modules 文件夹
然后重试

使用cdn快速加载类库

https://unpkg.com/#/

eg 最新的vue https://unpkg.com/vue
lodash https://unpkg.com/lodash
再引入相对应的npm pkg 中可以直接测试使用

当然还有cdnjs https://cdnjs.com/

axios promise化的ajax请求封装框架

axios攻略

chrome developer tools

  • 记录ex的值 记录上一次表达式计算的结果 $_
  • $0 $1 $2 … 分别表示最近第几次选择的dom
  • $ $ 相当于 document.querySelector();
    $$ $$ 相当于 document.querySelectorAll();
  • copy($0) 复制当前选择的节点 + ctrl +v
  • 列出对象的所有属性 dir(objcet)
    列出事件的getEventListeners(object)
  • 表格化显示object table(data[, columns])
    eg: var list = dataResponeArr; table(list);
  • 文件跳转
    command+p; 跳转到对应的文件
    command+P+”:”+ 数字 : 跳转到对应文件的对应行数
    command+ shift+ o 跳转到对应的方法
  • Element tab界面 使用 H键可以快速隐藏和显示 dom
  • debug 编辑断点 可以使断点 满足某一条件后进入 debug

css3动画 要注意保持在最顶层 999

z-index可以这样设计
默认为0 dialog modal 可以设计为9
loading 可以设置为5

动画可以设计为99

ie 包含ie11 下的Date显示的问题

  • 时间串 2017-09-26 这样的时间串 google 能识别 ie
    下不能转化为正常的Date()对象
    将中划线 - 转化成/
    需要做如下处理:
if(time && time!="" && time.indexOf("-") > -1 ){
    time = time.replace(/-/g,"/");
}

axios 在ie9下需要安装 es6-promise 安装包

mac工具(https://cloud.tencent.com/developer/article/1139503?fromSource=waitui