摘要: C语言中文网出品 http://c.biancheng.net/sitemap/ MDN https://developer.mozilla.org/zh-CN/docs/Web 码云上的项目 https://gitee.com/jch1011/shangpinhui_0415?_from=gite 阅读全文
posted @ 2022-02-23 23:51 波吉国王 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 1.系统左下角搜索设置 >更新和安全 点击左侧菜单栏 恢复 >高级启动下的 立即重启 3.选择: 疑难解答 > 高级选项 >重启 >重启后选择4 (第四个选项) 输入密码(选择自己的账户,不选Administrator), 进入安全模式 (界面明显不同于正常模式: 黑色背景,系统未加载很多组件) 5 阅读全文
posted @ 2022-02-23 23:44 波吉国王 阅读(334) 评论(0) 推荐(0) 编辑
摘要: setting.json { // VScode主题配置 "workbench.colorCustomizations": { "editorIndentGuide.activeBackground": "#ff0000" // 设置guide线高亮颜色,可以改为自己喜欢的颜色 }, "editor 阅读全文
posted @ 2022-02-23 23:40 波吉国王 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 截图snipaste https://download.zol.com.cn/tuiguang/detail/44/436540.shtml?qw=#down 使用: f1截图 f3置顶 alt取色 esc/双击 取消 阅读全文
posted @ 2022-02-23 23:37 波吉国王 阅读(14) 评论(0) 推荐(0) 编辑
摘要: node 1.不选最新版本,少bug,安装一路next ,cmd以管理员模式 2.修改全局包路径 在node安装目录下下新建两个文件夹 node_global //全局包下载存放 node_cache //缓存 修改路径 cmd npm config set prefix "D:\node\node 阅读全文
posted @ 2022-02-23 23:35 波吉国王 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 一句话解释: 双向绑定顾名思义, 使用v-bind实现data=>input, 使用@input事件实现input=>data 1 v-model 用在 input 元素上时 使用 <input v-model="sth" /> 原理 <input v-model="sth" /> 等价于: <in 阅读全文
posted @ 2022-02-23 23:25 波吉国王 阅读(50) 评论(0) 推荐(0) 编辑
摘要: import { mapState , mapGetters} from 'vuex' computed: { ...mapGetters(['attrsList', 'goodsList', 'trademarkList']), ...mapState({total: (state) => sta 阅读全文
posted @ 2022-02-23 23:24 波吉国王 阅读(45) 评论(0) 推荐(0) 编辑
摘要: npm install mockjs --save -dev开发时使用 1 src下创建文件夹mock 文件夹mock下创建banner.json 和 mockServe.js [ { "id": "1", "imgUrl": "/images/banner1.jpg" }, { "id": "2" 阅读全文
posted @ 2022-02-23 23:24 波吉国王 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 区别 data中的属性并不会随赋值变量的改动而改动 computed属性属于持续变化跟踪。在computed属性定义的时候,这个computed属性就与给它赋值的变量绑定了。改变这个赋值变量,computed属性值会随之改变 错误使用场景 <div>{{name}}</div> data() { r 阅读全文
posted @ 2022-02-23 23:21 波吉国王 阅读(1345) 评论(0) 推荐(0) 编辑
摘要: 1 vue-cli3以后工程文件夹中是没有vue.config.js这个文件的,所以我们需要自己创建一个 2 npm run serve可以将项目在本地和通过ip方式都跑起来。我们不需要再去配置webpack, 下面的Network后为本机ip地址 App running at: - Local: 阅读全文
posted @ 2022-02-23 23:20 波吉国王 阅读(403) 评论(0) 推荐(0) 编辑
摘要: 1 先放在 created 里 首先我们先将请求放在 created 里,如下: created(){ console.log('created'); this.$store.dispatch('getDetail', 11); }, mounted(){ console.log('mounted' 阅读全文
posted @ 2022-02-23 23:20 波吉国王 阅读(1906) 评论(0) 推荐(0) 编辑
摘要: 1 父=>子 父:msg='msg' 子props 单向数据流,子组件不允许改变props的值,如msg 2 子=>父 子事件里触发事件this.$emit(名 , 参) 父@名='fn' fn(参) 在组件上写event,都是自定义事件 即便: <Son @click='fn'/> 点击不会触发c 阅读全文
posted @ 2022-02-23 23:18 波吉国王 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 路由守卫的afterEach() 方法有个常用的地方是自动让页面返回最顶端 比如一个页面较长,滚动到某个位置后跳转。这时另一个页面滚动条默认是上一个页面停留的位置。我们可以在 afterEach() 方法中将滚动条位置进行重置。 //全局路由改变后钩子 router.afterEach((to, f 阅读全文
posted @ 2022-02-23 23:18 波吉国王 阅读(702) 评论(0) 推荐(0) 编辑
摘要: // 添加请求拦截器 requests.interceptors.request.use( function (config) { // 在发送请求之前做些什么 if(store.state.Detail.uuid_token){ config.headers.userTempId = store. 阅读全文
posted @ 2022-02-23 23:17 波吉国王 阅读(304) 评论(0) 推荐(0) 编辑
摘要: 一句话解释: 在script里 99% 是要写this. 在Vue 中会定义很多的函数或者变量 data computed methods prop filter 路由相关等 这些属性或方法往往需要在 template 或者 script 标签中使用 在template 中直接使用不需要this 在 阅读全文
posted @ 2022-02-23 23:17 波吉国王 阅读(454) 评论(0) 推荐(0) 编辑
摘要: 一句话解释 跳到哪个路由, 加载哪个组件 (增加首屏加载速度) 原来: import Home from '../pages/Home' const routes = [ { path: '/home', name: 'home', component: Home, } ] 现在: const ro 阅读全文
posted @ 2022-02-23 23:16 波吉国王 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 1 create vue demo时, 选择如下设置: (*) Choose Vue version //2 (*) Babel ( ) TypeScript ( ) Progressive Web App (PWA) Support (*) Router //not history (*) Vue 阅读全文
posted @ 2022-02-23 23:16 波吉国王 阅读(974) 评论(0) 推荐(0) 编辑
摘要: QR Code码 Quick Response Code快速响应码 下载 npm install --save qrcode 引入 import QRCode from 'qrcode'; 使用 let text='ztyj34thj34hgfds23' let url = await QRCode 阅读全文
posted @ 2022-02-23 23:15 波吉国王 阅读(130) 评论(0) 推荐(0) 编辑
摘要: <template> <div class="swiper-slide" v-for="(carousel, index) in bannerList" :key="carousel.id" > <img :src="carousel.imgUrl" alt="" /> </div> </templ 阅读全文
posted @ 2022-02-23 23:14 波吉国王 阅读(923) 评论(0) 推荐(0) 编辑
摘要: call apply bind box.onclick = function(){ function fn(){ alert(this); } fn(); //window.fn() this指向window }; 1 我们原本以为这里面的this指向的是box,然而却是Window。一般我们这样解 阅读全文
posted @ 2022-02-23 23:10 波吉国王 阅读(22) 评论(0) 推荐(0) 编辑