logoWave's Blog
  • |
  • 🔍 搜索
  • 🏠 主页
  • 📚 文章
  • 🧩 标签
  • ⏱️ 时间轴
  • 🙋🏻‍♂️ 关于
  • 🤝 友链
🏠 主页 » 📚文章

👨🏻‍💻 技术

Vite4 + Typescript + Vue3 + Pinia 从零搭建(1) - 项目初始化

前提准备 1. node 版本 Node.js 版本 >= 12,如果有老项目需要旧版本的,推荐用 nvm 管理 node 版本。 PS C:\Windows\system32> nvm --version 1.1.12 PS C:\Windows\system32> nvm list 20.5.0 * 16.20.2 (Currently using 64-bit executable) 10.17.0 PS C:\Windows\system32> nvm use 20.5.0 Now using node v20.5.0 (64-bit) 2. vscode 推荐使用 vscode 编辑器,安装插件以下插件: EditorConfig for VS Code, Volar,TypeScript Vue Plugin,Prettier - Code formatter,ESl...

2024-06-28    411字    1分钟    Wave    Vite4  Typescript  Vue3  Pinia

Vite4 + Typescript + Vue3 + Pinia 从零搭建(2) - ts配置

tsconfig.json { "compilerOptions": { "target": "ESNext", // 将代码编译为最新版本的 JS "useDefineForClassFields": true, "module": "ESNext", // 使用 ES Module 格式打包编译后的文件 "lib": ["ESNext", "DOM", "DOM.Iterable"], // 引入 ES 最新特性和 DOM 接口的类型定义 "skipLibCheck": true, // 跳过对 .d.ts 文件的类型检查 "esModuleInterop": true, // 允许使用 import 引入使用 export = 导出的内容 "sourceMap": true, // 用来指定编译时是否生成.map文件 "allowJs": false, // 是否允许使用js "baseUrl": ".", // 查询的基础路径 "paths": { // 路径映射...

2024-06-28    674字    2分钟    Wave    Vite4  Typescript  Vue3  Pinia

接入 CloudFlare Turnstile 记录

在逛 CloudFlare 的时候看到了 Turnstile,觉得好奇就去看了下文档才知道它是 CloudFlare 家的人机验证,刚好部署了图床管理就想着能不能试试接入它,做下记录。 1. 创建 Turnstile 组件 在 src/components 目录中创建一个新的 Turnstile 组件,比如 Turnstile.vue: <template> <div> <div id="cf-turnstile" :data-sitekey="siteKey"></div> </div> </template> <script setup lang="ts"> import {onMounted, ref} from "vue"; const props = defineProps<{ sitekey: { type: String, required: true } }>() const turnstileResponse = ref<string>('') const emit =...

2024-06-27    617字    2分钟    Wave    CloudFlare  Turnstile  Vue3  TS

使用 Pages 部署免费的 R2 图床管理工具

背景 之前我们使用图床是用 picGo 上传到 R2 上,然而这个工具有一个严重的问题,多客户端同步的问题。使用一段时间就不再使用了。 一直在想,能不能做一个网页版的图床,使用网页上传,最好不做元数据存储,直接读取 R2 的目录。 调研 站在巨人的肩膀行走事半功倍,我开始找轮子,github 上搜了搜,找到一个还...

2024-06-26    581字    2分钟    Wave    CloudFlare  R2  Pages  图床

Redis利用HyperLogLog实现去重复统计功能的基数估计算法

HyperLogLog 应用场景 去重复统计功能的基数估计算法 算法知识前置 什么是UV? Unique Visitor,独立访客,一般理解为客户端IP,需要去重考虑 什么是PV? Page View,页面浏览量,不用去重 什么是DAU? Daily Active User 日活跃用户量 什么是基数 是一种数据集,去重复后的真实个数 去重复统计的方式? HashSet bitmap: 如果数据显较大亿...

2024-06-21    1734字    4分钟    Wave    Redis
下一页  »
Copyright © 2023-2024 Wave's Blog All Rights Reserved