next.js基础
## next.js基础 `pnpm dev` 调试运行 `Remove-Item -Recurse -Force .next` 清理css缓存 `pnpm build` 构建 `pnpm start` 构建后运行 ## Next.js 是什么 一个 React 框架。在 React 之上多帮你做了三件事: 1. **路由**:你在 `app/` 下建一个文件夹,URL 就自动出来了,不用配 react-router。 2. **服务端
## next.js基础 `pnpm dev` 调试运行 `Remove-Item -Recurse -Force .next` 清理css缓存 `pnpm build` 构建 `pnpm start` 构建后运行 ## Next.js 是什么 一个 React 框架。在 React 之上多帮你做了三件事: 1. **路由**:你在 `app/` 下建一个文件夹,URL 就自动出来了,不用配 react-router。 2. **服务端
## WXT框架开发浏览器扩展 扩展设置,启用开发者模式,可以查看扩展的背景页,查看代码输出的错误,V3版本已经在Service Worker中了 为和自己使用的浏览器区分,建议使用一个第三方精简版chromium: https://ungoogled-software.github.io/ungoogled-chromium-binaries/?utm_source=chatgpt.com 边开发边调试,加载未打包的扩展程序,然后
## Tailwind 文档:`https://tailwind.nodejs.cn/brand` 切换源 `npm config set registry https://mirrors.cloud.tencent.com/npm/` ### 3.x版本安装 `npm install -D tailwindcss@3` #安装 `npx tailwindcss init` #初始化 `npm install @headlessui/
## 各种网页状态码说明 - 100:客户端继续发送请求,这是临时响应 - 101:切换协议,主要用于websocket或http2升级 - **200:请求成功** - 201:请求成功并且服务器创建了新的资源 - 202:请求成功,但服务器尚未处理 - 203:请求成功,但返回的信息可能来自另一来源 - 204:请求成功,但无返回内容 - 301:永久移动到其他页面 - 302:临时移动到其他页面 - 303:提示请求者,应请求不同
## element UI 文档:https://element-plus.org/zh-CN/guide/design.html 开箱即用: https://github.com/youlaitech/vue3-element-admin-thin `npm create vite@latest element_demo -- --template vue-ts` 创建一个vue模板项目 `cd element_demo` 或在IDE
## vue3基础 ### 安装 前提安装node.js勾选npm工具 `https://nodejs.org/en/download` 安装完重启 vscode 安装`vue-official`插件 可选`Vue VSCode Snippets`插件可快速开始模板 在vscode终端执行下面代码 `npm create vue@latest .` 直接在以当前目录创建vue项目 `npm create vue@latest`
## vitepresss生成静态知识库 网站https://vitepress.dev/zh/guide/getting-started `npm add -D vitepress@next` `npx vitepress init` 脚手架创建一个初始化项目,需要回答一些问题: ```bash Where should VitePress initialize the config? ./docs Where should Vit
## React Native+expo跨端开发 官方文档:https://reactnative.dev/docs/getting-started 中文文档:https://rn.nodejs.cn/docs/getting-started 个人中心:https://expo.dev/accounts/leeken expo:https://expo.dev/go 模拟器https://expo.dev/orbit ### expo是
#### Drizzle ORM(expo-sqlite) `npx expo install expo-sqlite` `npm i drizzle-orm` `npm i -D drizzle-kit` 迁移功能 **官方基础用法** 连接数据库 ```ts import * as SQLite from 'expo-sqlite'; import { drizzle } from 'drizzle-orm/expo-sqlite';
## react+ant.design+tailwindcss **快速理解语法** jsx使用{}写表达式, 注释也要写在{}中使用css注释 ant组件带的样式权重会比tailwindcss高,如果要穿透组件样式,在类名前加'!'号 组件文档: https://ant-design.antgroup.com/components/overview-cn/ 定制主题: https://ant-design.antgroup.com
## petite-vue JS库 在生产环境中引用 `https://unpkg.com/petite-vue@0.2.2/dist/petite-vue.iife.js` 使用方法: //注意,中间的defer init自动初始化步骤必须执行,否则无法使用 ```html <script src="https://unpkg.com/petite-vue" defer init></script> <div v-scope="{
## JavaScript基础 ```javascript document.getElementById("id"); //获取指定ID的元素 document.getElementById("id").innerHTML = "已过期"; //替换元素内容 document.getElementById("id").remove(); //删除元素 //判断删除元素 var element = document.get