09 2022 档案
摘要:npm 全局安装: npm install -g gatsby-cli@5.2.0 全局卸载: npm uninstall -g gatsby-cli 全局查询: npm list -g --depth 0 yarn 全局安装: yarn global add gatsby-cli@5.2.0 全局
阅读全文
摘要:场景: 思路: 方案: 1.使用 -webkit-text-size-adjust CSS 属性: 在需要应用小于12px字体大小的元素上添加以下样式: -webkit-text-size-adjust: none; 2.使用 transform: scale() 缩放元素: 在需要应用小于12px
阅读全文
摘要:代码: @Bind() speak(sentence) { // 生成需要语音朗读的内容 const utterance = new SpeechSynthesisUtterance(sentence); // 由浏览器发起语音朗读的请求 window.speechSynthesis.speak(u
阅读全文
摘要:场景: 正常情况下,使用 Upload 组件,需要添加 action,以便将图标上传至服务器,但是在我们的项目中,不需要真正的将图片上传,只需要 读取到 File 对象,并将 File对象 通过 FormData 传给后端即可,注释掉 action 以后发现 loading 的状态 无法变为 suc
阅读全文
摘要:场景:页面开发中,发现通过列表获取到 id,请求详情数据,请求成功以后,但是详情页没有渲染 思路: dataKey 默认值为 content,如果返回的数据包含 content 字段,则会将content 赋值给 dataSet 的 current,但是当详情数据中 content 为普通字段 --
阅读全文
摘要:代码: const validate = // eslint-disable-next-line no-nested-ternary cycleFlag 1 ? activeKey 'simpleMode' ? await simpleModeDs.validate() : await profes
阅读全文
摘要:解决方案: // eslint-disable-next-line no-async-promise-executor new Promise<boolean>(async (resolve, reject) => { ... }), .
阅读全文