[置顶]
文档和工具
摘要:
文档汇总 vue3 https://cn.vuejs.org/guide/introduction.html ts https://ts.xcatliu.com/basics/index.html pinia https://pinia.web3doc.top/introduction.html v
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.
摘要:
看到报错,搜索后的第一反应是vite打包时出错了,结果是浏览器的本地缓存导致出错。 * 开发时勾选停用缓存
每日面试题
摘要:
sass @mixin 声明 @include 使用 @import 声明变量 $ @extend 继承父类的css @media 冒泡 数字函数 abs 基础数据类型 null undefined number string boolean symbol 栈 array function obje
类和函数
摘要:
类 继承 子类继承父类时,子类的构造函数必须执行super()。 重写 同名方法,针对不同的类,有不同的处理方式。 子类对父类的方法进行修改,返回值和形参不能修改。 注意区分重载 重载是在一个类里面,方法名字相同,而参数不同。返回类型可以相同也可以不同。 每个重载的方法(或者构造函数)都必须有一个独
ts
摘要:
动态类型vs静态类型 弱类型 发生隐式转换 bootstrap:通过添加class就能得到自己想要的样子。 参考:https://juejin.cn/post/7059394497012039717 type && interface type extends interface extends t
布局
摘要:
介绍 http://ruanyifeng.com/blog/2015/07/flex-grammar.html 应用 https://juejin.cn/post/6844903614280892429#heading-0 骰子 https://juejin.cn/post/711245167861
路由过渡效果
摘要:
歌手列表切换到歌手详情页 在base.scss定义全局样式 .slide-enter-active, .slide-leave-active { transition: all 0.3s } .slide-enter-from, .slide-leave-to { transform: transl
歌曲随机播放
摘要:
knuth shuffle export function shuffle(source) { const arr = source.slice() //避免产生副作用,修改原始的值 for (let i = 0; i < arr.length; i++) { const j = getRandom
对scroll进行防抖的优化(在vue中使用防抖)
摘要:
目标效果:在一个长内容的页面中,当滚动到一定的距离时,会出现一个 "返回顶部" 的图标,点击会平滑的返回到页面顶部,有助于提升用户体验。 HTML <div class="backtop" @click="backtop" ref="top">TOP</div> CSS .backtop { pos
webpack优化
摘要:
webpack瓶颈 webpack 的构建过程太花时间 webpack 打包的结果体积太大 不要让loader干太多 module: { rules: [ { test: /\.js$/, use: ['babel-loader'], include: srcPath, exclude: /node