摘要: // a.ts import { b } from "./b" export const a = [b] // b.ts import { a } from "./a" export const b = [a] 或 // a.ts import { b1 } from "./b" export co 阅读全文
posted @ 2022-12-30 16:05 kidrue 阅读(26) 评论(0) 推荐(0)
摘要: 斐波那契数列 已知: 斐波那契数列第n项是除前两项以外,第n-2与第n-1项的和:S(n) = S(n-2) + S(n-1)。 优化前 // 优化前 const n = ""; function getFibonacciSequenceItem(n) { let arr = [0, 1]; let 阅读全文
posted @ 2022-11-11 17:14 kidrue 阅读(504) 评论(0) 推荐(0)
摘要: 2022-8-14 契约之吻 2022-8-14 overload 阅读全文
posted @ 2022-08-14 18:48 kidrue 阅读(23) 评论(0) 推荐(0)
摘要: 21:50:31 [vite] Internal server error: Preprocessor dependency "less" not found. Did you install it? 只需要执行 npm install less -D 将其加入开发者依赖则不会出现上述错误 阅读全文
posted @ 2022-06-01 15:17 kidrue 阅读(4133) 评论(0) 推荐(0)
摘要: 首先克隆一份代码下来(默认main分支)。 git clone https://github.com/kidrue/gittest.git 创建并切换分支开始工作(分支相当于一个独立的版本,以创建分支时的为版本保存新分支)。 git checkout -b dev 或 git switch -c d 阅读全文
posted @ 2022-04-20 10:38 kidrue 阅读(44) 评论(0) 推荐(0)
摘要: 解决方案: watch: { $route() { // 监听路由变化并执行相应方法即可; if (this.$route.query.ishit) { console.log(123); this.isshowModel = true this.domainlist = [] this.listd 阅读全文
posted @ 2021-10-11 16:51 kidrue 阅读(695) 评论(0) 推荐(0)
摘要: 样式ui组件库:https://www.tailwindcss.cn/docs 动画库: animate.css:https://www.dowebok.com/demo/2014/98/ swiper.js:https://www.swiper.com.cn/ 阅读全文
posted @ 2021-10-11 16:13 kidrue 阅读(216) 评论(0) 推荐(0)
摘要: navigator.platform 阅读全文
posted @ 2021-09-30 15:02 kidrue 阅读(165) 评论(0) 推荐(0)
摘要: 函数提升及变量提升: js中在函数作用域或全局作用域中通过关键字var声明的变量,无论是在哪里声明的,都会被当场当前作用域顶部声明的变量。(即为变量提升) 函数提升同理在当前作用域中通过function声明的函数,无论是在哪里声明的,都会被当成顶部声明的函数 块级声明: 1.块级声明用于声明在指定块 阅读全文
posted @ 2021-09-27 23:57 kidrue 阅读(159) 评论(0) 推荐(0)
摘要: props是常量不允许修改 React通过propTypes来设置参数类型。例: Person.propTypes = { name:PropTypes.string.isRequired,//限制为必传字段 age:PropTypes.number, sex: PropTypes.string, 阅读全文
posted @ 2021-09-18 16:46 kidrue 阅读(1201) 评论(0) 推荐(0)