feat: 二维码生成插件

master
lichaojun 1 week ago
parent 3dd9324308
commit 075ca62f7e

@ -1,18 +1,27 @@
<!DOCTYPE html>
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0"
/>
<title>内容转二维码</title>
<link rel="stylesheet" href="style.css">
<link
rel="stylesheet"
href="style.css"
/>
</head>
<body>
<div class="container">
<h1>内容转二维码生成器</h1>
<p>将您的文本粘贴到下面的框中,然后点击“生成二维码”按钮。</p>
<textarea id="text-input" rows="10" placeholder="请在此处粘贴您的文本内容..."></textarea>
<textarea
id="text-input"
rows="10"
placeholder="请在此处粘贴您的文本内容..."
></textarea>
<button id="generate-btn">生成二维码</button>
@ -22,7 +31,7 @@
</div>
<!-- 引入 qrcode.js 库 -->
<script src="https://cdn.jsdelivr.net/npm/qrcodejs@1.0.0/qrcode.min.js"></script>
<script src="qrcode.min.js"></script>
<!-- 引入我们自己的逻辑脚本 -->
<script src="main.js"></script>
</body>

@ -22,7 +22,7 @@ document.addEventListener('DOMContentLoaded', () => {
}
// 定义每个二维码的最大字符数
const chunkSize = 2000;
const chunkSize = 1000;
// 计算需要生成多少个二维码
const totalChunks = Math.ceil(text.length / chunkSize);
@ -66,7 +66,7 @@ document.addEventListener('DOMContentLoaded', () => {
height: 400, // 二维码高度
colorDark: '#000000', // 二维码颜色
colorLight: '#ffffff', // 二维码背景色
correctLevel: QRCode.CorrectLevel.H // 纠错级别H是最高级
correctLevel: QRCode.CorrectLevel.H, // 纠错级别H是最高级
});
console.log(`已为第 ${i + 1} 块内容生成二维码。`);

@ -8,10 +8,5 @@
},
"background": {
"service_worker": "background.js"
},
"icons": {
"16": "images/icon16.png",
"48": "images/icon48.png",
"128": "images/icon128.png"
}
}

File diff suppressed because one or more lines are too long

@ -1,12 +1,12 @@
{
"totalNotes": 74,
"totalNotes": 76,
"categories": 5,
"lastUpdated": "2025-10-15T08:30:23.764Z",
"weeklyAdded": 8,
"lastUpdated": "2025-10-17T12:02:18.785Z",
"weeklyAdded": 20,
"categoryChartData": [
{
"name": "demo",
"value": 63
"value": 65
},
{
"name": "python",
@ -27,16 +27,16 @@
],
"recentNotes": [
{
"path": "demo/scssLiveTranslate/index.vue",
"title": "SCSS → CSS 实时翻译器",
"path": "demo/messageBoxWithHtml.vue",
"title": "messageBoxWithHtml",
"category": "demo",
"date": "2025-10-15"
"date": "2025-10-17"
},
{
"path": "demo/cssDemo.vue",
"title": "cssDemo",
"path": "demo/base64Tool.vue",
"title": "base64编码解码工具",
"category": "demo",
"date": "2025-10-15"
"date": "2025-10-17"
},
{
"path": "demo/tuiImageEditor/index.vue",
@ -45,16 +45,16 @@
"date": "2025-10-15"
},
{
"path": "demo/deletdNodeModules/index.vue",
"title": "删除 node_modules 文件夹非常耗时解决办法",
"path": "demo/scssLiveTranslate/index.vue",
"title": "SCSS → CSS 实时翻译器",
"category": "demo",
"date": "2025-10-14"
"date": "2025-10-15"
},
{
"path": "demo/asyncDynComp/index.vue",
"title": "异步动态加载组件",
"path": "demo/cssDemo.vue",
"title": "cssDemo",
"category": "demo",
"date": "2025-10-11"
"date": "2025-10-15"
}
]
}
Loading…
Cancel
Save