![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
vue
文章平均质量分 67
无处安放的前端
爱编程 不爱bug
展开
-
vue3.0初体验
vue3.0(函数式导入) npm 安装 1. 我的vue-cli 4是以上 vue create vue-demo 下一步选择vue3 preview cd vue-demo npm run serve 2. 从vue2 升级到3 vue add vue-next vue3 vue2不同点 入口文件 3.* import { createApp } from 'vue' import App from './App.vue' import router from './router' cre原创 2021-02-24 10:43:15 · 253 阅读 · 0 评论 -
自定义简单的vue-router
import Home from './views/Home' import About from './views/About' import Vue from 'vue' class VueRouter { constructor(options) { this.$options = options this.routeMap = {} // 当前路由的响应式 ...原创 2020-02-18 16:30:39 · 348 阅读 · 0 评论 -
vue 组件传值 通信常用方式
父组件 => 子组件 属性props // child prop:{msg:String} // parent <helloWord msg="helloword"/> 引用refs // parent <helloWord ref='hw' msg="helloword"/> this.$refs.hw.xx 子组件 =>父组件 : ...原创 2020-01-14 19:34:07 · 10181 阅读 · 0 评论 -
axios配合vue使用解决跨域问题
中文参考站点:https://www.kancloud.cn/yunye/axios/234845 vue官网维护了一个网络请求:vue-resource,后期不维护了,推荐使用axios vue -> axios: Axios 是一个基于 promise 的 HTTP 库,可以用在浏览器和 node.js 中。 安装: npm install axios --save 引入: import...原创 2019-05-24 23:04:15 · 509 阅读 · 0 评论 -
ypeError: Cannot read property '$createElement' of undefined at render
修改路由中的配置 把components 中的 s 去掉原创 2019-06-25 22:15:36 · 2664 阅读 · 0 评论 -
Vue-cli 项目main.js引入scss报错./src/main.js Module not found: Error: Can't resolve 'css' in 'D:\web\sell'
删除weebpack.bse.conf.js中的配置: scss 详细配置可以参考 :https://www.cnblogs.com/crazycode2/p/6535105.html原创 2019-06-25 23:40:22 · 6913 阅读 · 0 评论 -
vue-cli 配置本地接口
npm 安装 express 2.首先找到bulid目录下的webpack.dev.conf.js 如图 3, 然后在webpack.dev.conf.js文件中添加如下代码 const express = require('express'); const app = express(); const appData = require('../data...原创 2019-06-26 18:04:32 · 811 阅读 · 0 评论 -
require模块管理 通过hashchange事件 模拟Vue中的路由
Route.js define([],function () { function Route(option) { this.routes = option.routes; this.init(); } Route.prototype = { constructor:Route, init(){ ...原创 2019-07-02 19:26:26 · 298 阅读 · 0 评论