摘要: npm config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/ npm config set registry https://registry.npm.taobao.org 这样再一键安装vue-cli3就不会有报 阅读全文
posted @ 2020-05-06 14:03 是你的天天呢 阅读(564) 评论(0) 推荐(0)
摘要: // 和自定义过滤器一样,我们这里定义的是全局指令 Vue.directive('focus',{ inserted(el) { el.focus() } }) <div id='app'> <input type="text"> <input type="text" v-focus placeho 阅读全文
posted @ 2020-04-22 20:48 是你的天天呢 阅读(365) 评论(0) 推荐(0)
摘要: 1.临时使用 npm --registry https://registry.npm.taobao.org install 包名 2.永久设置为淘宝镜像 npm config set registry https://registry.npm.taobao.org 3.换回国外官方源 npm con 阅读全文
posted @ 2020-04-10 14:11 是你的天天呢 阅读(8650) 评论(0) 推荐(0)
摘要: 1. 2. 输入 vue 点击第一项 3. vue.json中输入代码 { "Vue Template":{ "prefix":"vueTemplate", "body":[ "<template>\n\t<div>\n\n\t</div>\n</template>\n\n", "<script l 阅读全文
posted @ 2020-04-06 15:28 是你的天天呢 阅读(1630) 评论(0) 推荐(1)
摘要: 》普通滚动 》组件滚动 阅读全文
posted @ 2020-04-02 20:30 是你的天天呢 阅读(572) 评论(0) 推荐(0)
摘要: 》路由 utils 公用方法 》routerList 中引入加载 阅读全文
posted @ 2020-04-02 20:26 是你的天天呢 阅读(1537) 评论(0) 推荐(0)
摘要: import React, { Component } from 'react' import { Route, Redirect, Switch } from 'react-router-dom' export default class RouterView extends Component  阅读全文
posted @ 2020-04-02 20:21 是你的天天呢 阅读(2286) 评论(2) 推荐(0)
摘要: 当使用Egg 渲染模板,渲染Html时可以选择 NunJucks npm install egg-view-nunjucks -S <1>. 在 config.default.js 中写入配置 config.view = { mapping: { '.html': 'nunjucks' } } <2 阅读全文
posted @ 2020-04-02 20:15 是你的天天呢 阅读(2667) 评论(0) 推荐(1)
摘要: 当运行终端时出现 error TS5058: The specified path does not exist:(错误TS5058:指定的路径不存在:) ctrl + shift + p 然后选择第一个终端 tsconfig.json 设置 阅读全文
posted @ 2020-04-02 20:10 是你的天天呢 阅读(500) 评论(0) 推荐(0)
摘要: 写React 路由表的时候 报错如下: 一般是因为 没有在 app.js 中 引入 BrowserRouter 组件 需要在app.js中以下配置: import { BrowserRouter } from 'react-router-dom'; function App() { return ( 阅读全文
posted @ 2020-03-14 19:42 是你的天天呢 阅读(101) 评论(0) 推荐(0)