随笔分类 -  Vue

该文被密码保护。
posted @ 2020-11-17 15:32 晨光曦微 阅读(1) 评论(0) 推荐(0) 编辑
摘要:mapActions() 返回的是一个对象, 用了 ... 扩展符后,才可以放进一个对象里,和其他组件内定义的 method 在同一个 methods 对象。 { methods: mapActions() // 如果没有其它组件内的定义的方法,可以这样写 } { methods: { ...map 阅读全文
posted @ 2020-11-17 11:16 晨光曦微 阅读(395) 评论(0) 推荐(0) 编辑
摘要:一、抽取首页商家列表作为单独组件 1.抽取商家列表组件src/components/shoplist/shoplist.vue 同时不要忘记把msite下的images/shop | stars拿来 <template> <div class="shop_container"> <ul class= 阅读全文
posted @ 2020-11-09 17:11 晨光曦微 阅读(234) 评论(0) 推荐(0) 编辑
摘要:懒加载:又叫延时加载,即在需要的时候进行加载,随用即载 【相关问题】import() webpack4懒加载使用变量报错解决:https://www.cnblogs.com/chenxi188/p/13662036.html import和require的区别 node编程中最重要的思想就是模块化, 阅读全文
posted @ 2020-11-09 12:09 晨光曦微 阅读(11736) 评论(0) 推荐(0) 编辑
摘要:swiper相关文档 官网 www.swiper.com.cn s3使用说明 3.swiper.com.cn/usage/index.html s6使用 www.swiper.com.cn/usage/index.html 配置Api文档 www.swiper.com.cn/api/paginati 阅读全文
posted @ 2020-11-07 17:33 晨光曦微 阅读(346) 评论(0) 推荐(0) 编辑
摘要:一、抽取公共组件TopHeader.vue 1.从Msite.vue抽取头部标题到src/components/TopHeader/TopHeader.vue 知识点1. 子组件接收父组件传值 模板内留下接收位置: <!--1.接收父组件传值,名为title--> <span class="head 阅读全文
posted @ 2020-11-07 11:19 晨光曦微 阅读(342) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2020-11-07 10:06 晨光曦微 阅读(0) 评论(0) 推荐(0) 编辑
摘要:一、引入+配置路由 1.安装路由 // 不单单是生产环境部署,所以安装后,会在package.json内记录 cnpm install vue-router --save 2.写路由文件src/router/index.js import Vue from 'vue' import VueRoute 阅读全文
posted @ 2020-10-30 09:26 晨光曦微 阅读(305) 评论(0) 推荐(0) 编辑
摘要:一、使用 vue-cli(脚手架)搭建项目 Vue-cli是 vue 官方提供的用于搭建基于 vue+webpack+es6 项目的脚手架工具 在线文档: https://github.com/vuejs/vue-cli https://docs.qq.com/pdf/DSEdmZVVZWlV4am 阅读全文
posted @ 2020-10-28 17:09 晨光曦微 阅读(163) 评论(0) 推荐(0) 编辑
摘要:Vue2.0 render: h ⇒ h(App)的解释 render: h => h(App)是ES6的写法,其实就是如下内容的简写: render: function (createElement) { return createElement(App); } 官方文档中是这样的,createE 阅读全文
posted @ 2020-10-28 15:56 晨光曦微 阅读(213) 评论(0) 推荐(0) 编辑
摘要:calc() #div1 { position: absolute; left: 50px; width: calc(100% - 100px); } scss的样式计算 /*加法*/ minwidth:200px;max-width: 600px; .container { width: 阅读全文
posted @ 2020-09-15 10:51 晨光曦微 阅读(355) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2020-09-14 18:03 晨光曦微 阅读(0) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2020-09-13 16:56 晨光曦微 阅读(11) 评论(0) 推荐(0) 编辑
摘要:yarn -v # 查看yarn版本 yarn config list # 查看yarn配置 #修改yarn的源镜像为淘宝源 yarn config set registry https://registry.npm.taobao.org/ #查看当前yarn的bin的位置 yarn global 阅读全文
posted @ 2020-09-10 10:19 晨光曦微 阅读(2048) 评论(0) 推荐(1) 编辑
该文被密码保护。
posted @ 2020-09-06 22:41 晨光曦微 阅读(0) 评论(0) 推荐(0) 编辑
摘要:什么是 NPM npm之于Node,就像pip之于Python,gem之于Ruby,composer之于PHP。 npm是Node官方提供的包管理工具,他已经成了Node包的标准发布平台,用于Node包的发布、传播、依赖控制。npm提供了命令行工具,使你可以方便地下载、安装、升级、删除包,也可以让你 阅读全文
posted @ 2020-01-11 08:20 晨光曦微 阅读(1245) 评论(0) 推荐(0) 编辑
摘要:一、MVC MVC的产生理念: 分工。让专门的人去做专门的事。 MVC的核心思想: 解耦。 M: Model,模型, 和数据库进行交互。 V: View,视图, 产生html页面。 C: Controller,控制器, 接收请求,进行处理,与M和V进行交互,返回应答。 二、MVT Django是劳伦 阅读全文
posted @ 2020-01-11 08:18 晨光曦微 阅读(663) 评论(0) 推荐(0) 编辑
摘要:一、概述 官方文档:https://vuex.vuejs.org/zh/installation.html 1.1vuex有什么用 Vuex:实现data(){}内数据多个组件间共享一种解决方案(类似react的redux) 1.2什么情况下使用vuex 虽然 Vuex 可以帮助我们管理共享状态,但 阅读全文
posted @ 2020-01-11 08:16 晨光曦微 阅读(4238) 评论(0) 推荐(0) 编辑
摘要:一、响应式开发 响应式开发优先适配移动端又兼容到pc端 官网:https://less.bootcss.com/usage/ 教程:https://www.w3cschool.cn/less/ rem和em:https://blog.csdn.net/u010132177/article/detai 阅读全文
posted @ 2020-01-11 08:15 晨光曦微 阅读(931) 评论(0) 推荐(0) 编辑
摘要:一、Vue懒加载 文档:https://github.com/hilongjw/vue lazyload 1.安装 2.实例 导入配置等操作 src/main.js 使用懒加载src/components/lazy.vue 【1】定义图片错误显示等(引入图片,如果是在js中。必须require进来) 阅读全文
posted @ 2020-01-10 16:59 晨光曦微 阅读(425) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示