From 8df3db319983e4dde6f33c4ba30decc3a07caa60 Mon Sep 17 00:00:00 2001 From: yihui Date: Fri, 30 Sep 2022 15:27:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=9A=8F=E6=9C=BA=E5=AF=86?= =?UTF-8?q?=E7=A0=81=E7=94=9F=E6=88=90=20&=20=E6=B7=BB=E5=8A=A0=E8=A1=8C?= =?UTF-8?q?=E6=95=B0=E7=BB=9F=E8=AE=A1=20&=20=E6=B7=BB=E5=8A=A0html?= =?UTF-8?q?=E7=BE=8E=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 + assets/fonts/iconfont/iconfont.js | 2 + components/Footer.vue | 2 +- components/UI/nya-foot-info.vue | 2 +- history.md | 5 ++ package.json | 1 + pages/tools/code/htmlformat.vue | 85 +++++++++++++++++++++ pages/tools/other/random.vue | 3 + pages/tools/other/random_pwd.vue | 123 ++++++++++++++++++++++++++++++ pages/tools/text/wordcount.vue | 10 ++- store/tools.js | 24 +++++- 11 files changed, 255 insertions(+), 4 deletions(-) create mode 100644 pages/tools/code/htmlformat.vue create mode 100644 pages/tools/other/random_pwd.vue diff --git a/README.md b/README.md index 1612780..c9bf274 100644 --- a/README.md +++ b/README.md @@ -168,6 +168,7 @@ yarn generate | 编程 | | | | | | | 时间戳转换 | [url](https://tool.hhui.top/tools/code/timestamp) | 在线时间戳转换 格式化工具 | 2022/07/07 | | | markdown表格格式化 | [url](https://tool.hhui.top/tools/code/mdFormat) | markdown表格数据格式化 | 2022/07/07 | +| | html美化 | [url](https://tool.hhui.top/tools/code/htmlformat) | html美化 | 2022/09/30 | | | HTTP解析 | [url](https://tool.hhui.top/tools/code/http) | HTTP参数解析、编解码、请求头处理 | 2022/07/07 | | | UserAgent 解析 | [url](https://tool.hhui.top/tools/code/ua) | UserAgent 解析 | 2022/07/07 | | | CSS 兼容性处理 | [url](https://tool.hhui.top/tools/code/autoprefixer) | 在线CSS兼容性处理 | 2022/07/07 | @@ -214,6 +215,7 @@ yarn generate | | 番茄时钟 | [url](https://tool.hhui.top/tools/other/pomodoro_technique) | 在线番茄时钟 | 2022/07/07 | | | 人生小格 | [url](https://tool.hhui.top/tools/other/lifecount) | 人生小格 | 2022/07/07 | | | 随机数生成 | [url](https://tool.hhui.top/tools/other/random) | 在线随机数生成 | 2022/07/07 | +| | 随机密码生成 | [url](https://tool.hhui.top/tools/other/random_pwd) | 随机密码生成 | 2022/09/30 | | | LINE 贴纸下载 | [url](https://tool.hhui.top/tools/other/line_sticker_download) | LINE贴纸在线下载 | 2022/07/07 | | | 帮你百度 | [url](https://tool.hhui.top/tools/other/search_help) | 帮你百度 | 2022/07/07 | | | 这是什么动漫 | [url](https://tool.hhui.top/tools/other/what_anime_is_this) | 根据截图搜索动漫 | 2022/07/07 | diff --git a/assets/fonts/iconfont/iconfont.js b/assets/fonts/iconfont/iconfont.js index 30060ee..84cc6d9 100644 --- a/assets/fonts/iconfont/iconfont.js +++ b/assets/fonts/iconfont/iconfont.js @@ -76,6 +76,8 @@ '' + '' + '' + + '' + + '' + '' + ''; var t, e = (t = document.getElementsByTagName('script'))[t.length - 1].getAttribute('data-injectcss'); diff --git a/components/Footer.vue b/components/Footer.vue index a348d37..2d091d8 100644 --- a/components/Footer.vue +++ b/components/Footer.vue @@ -2,7 +2,7 @@
- 更新时间: 2022-07-07 | 工具数量: {{ this.toolNum }} + 更新时间: 2022-09-30 | 工具数量: {{ this.toolNum }}
diff --git a/components/UI/nya-foot-info.vue b/components/UI/nya-foot-info.vue index c54a3cb..893d917 100644 --- a/components/UI/nya-foot-info.vue +++ b/components/UI/nya-foot-info.vue @@ -2,7 +2,7 @@
  • - 该工具所有功能直接在浏览器端完成,请放心使用 + 该工具所有功能直接在浏览器端完成,无服务端交互,不会收集任何数据,请放心使用
  • diff --git a/pages/tools/other/random_pwd.vue b/pages/tools/other/random_pwd.vue new file mode 100644 index 0000000..6152900 --- /dev/null +++ b/pages/tools/other/random_pwd.vue @@ -0,0 +1,123 @@ + + + diff --git a/pages/tools/text/wordcount.vue b/pages/tools/text/wordcount.vue index d27aae1..26306ce 100644 --- a/pages/tools/text/wordcount.vue +++ b/pages/tools/text/wordcount.vue @@ -32,7 +32,15 @@ export default { }, computed: { results() { - return "有效字符数:" + this.content.length; + let lines = this.content.split("\n"); + let totalLineNum = lines.length; + let legalLineNum = 0; + for (let i = 0; i < totalLineNum; i++) { + if (lines[i]) { + legalLineNum += 1; + } + } + return "有效字符数:" + this.content.length + "\n总行数:" + totalLineNum + "\n非空行数:" + legalLineNum; } }, methods: {} diff --git a/store/tools.js b/store/tools.js index 9b8f6df..015c8c4 100644 --- a/store/tools.js +++ b/store/tools.js @@ -423,6 +423,17 @@ export const state = () => { description: 'markdown 表格数据格式化' } }, + { + name: 'Html美化', + search_keys: "html js beautify css format", + icon: '#icon-beautify', + path: '/tools/code/htmlformat', + recommend: true, + head: { + keywords: ['html', 'css', "javascript", "beautify"], + description: 'html编码美化工具' + } + }, { name: 'HTTP解析', search_keys: 'http parse', @@ -955,7 +966,7 @@ export const state = () => { }, { name: '随机数生成', - search_keys: 'rand numbers', + search_keys: 'random numbers', icon: '#icon-random', path: '/tools/other/random', recommend: false, @@ -964,6 +975,17 @@ export const state = () => { description: '在线随机数生成' } }, + { + name: '随机密码生成', + search_keys: 'random password pwd', + icon: '#icon-key', + path: '/tools/other/random_pwd', + recommend: true, + head: { + keywords: ['在线随机密码生成'], + description: '在线随机密码生成' + } + }, { name: 'LINE 贴纸下载', search_keys: 'line downloads',