diff --git a/.gitignore b/.gitignore index 60b575c..786738c 100644 --- a/.gitignore +++ b/.gitignore @@ -87,3 +87,5 @@ yarn.lock package-lock.json ssl + +upload.sh diff --git a/assets/fonts/iconfont/iconfont.js b/assets/fonts/iconfont/iconfont.js index 3b1b640..43009f8 100644 --- a/assets/fonts/iconfont/iconfont.js +++ b/assets/fonts/iconfont/iconfont.js @@ -1,10 +1,64 @@ -!(function(a) { - var t, - c = - '', - e = (t = document.getElementsByTagName('script'))[ - t.length - 1 - ].getAttribute('data-injectcss'); +!(function (a) { + var c = '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + ''; + var t, e = (t = document.getElementsByTagName('script'))[t.length - 1].getAttribute('data-injectcss'); if (e && !a.__iconfont__svg__cssinject__) { a.__iconfont__svg__cssinject__ = !0; try { @@ -15,7 +69,7 @@ // err } } - !(function(t) { + !(function (t) { if (document.addEventListener) if ( ~['complete', 'loaded', 'interactive'].indexOf( @@ -24,7 +78,7 @@ ) setTimeout(t, 0); else { - var e = function() { + var e = function () { document.removeEventListener('DOMContentLoaded', e, !1), t(); }; @@ -32,10 +86,10 @@ } else document.attachEvent && - ((l = t), + ((l = t), (i = a.document), (n = !1), - (o = function() { + (o = function () { try { i.documentElement.doScroll('left'); } catch (t) { @@ -43,30 +97,32 @@ } c(); })(), - (i.onreadystatechange = function() { + (i.onreadystatechange = function () { 'complete' == i.readyState && - ((i.onreadystatechange = null), c()); + ((i.onreadystatechange = null), c()); })); + function c() { n || ((n = !0), l()); } + var l, i, n, o; - })(function() { + })(function () { var t, e; ((t = document.createElement('div')).innerHTML = c), (c = null), - (e = t.getElementsByTagName('svg')[0]) && - (e.setAttribute('aria-hidden', 'true'), - (e.style.position = 'absolute'), - (e.style.width = 0), - (e.style.height = 0), - (e.style.overflow = 'hidden'), - (function(t, e) { - e.firstChild - ? (function(t, e) { - e.parentNode.insertBefore(t, e); - })(t, e.firstChild) - : e.appendChild(t); - })(e, document.body)); + (e = t.getElementsByTagName('svg')[0]) && + (e.setAttribute('aria-hidden', 'true'), + (e.style.position = 'absolute'), + (e.style.width = 0), + (e.style.height = 0), + (e.style.overflow = 'hidden'), + (function (t, e) { + e.firstChild + ? (function (t, e) { + e.parentNode.insertBefore(t, e); + })(t, e.firstChild) + : e.appendChild(t); + })(e, document.body)); }); })(window); diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..9e737aa --- /dev/null +++ b/build.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +yarn generate + +tar -zcvf tool.tar.gz dist diff --git a/components/Favorites.vue b/components/Favorites.vue index 09a0ae8..1b82dd0 100644 --- a/components/Favorites.vue +++ b/components/Favorites.vue @@ -1,13 +1,14 @@ @@ -18,6 +19,7 @@ export default { toolsList() { let arr = []; this.$store.state.tools.forEach(tool => { + tool.list.forEach(item => item['category'] = tool['title']); arr = arr.concat(tool.list); }); return arr; @@ -33,6 +35,19 @@ export default { }); return results; } + }, + methods: { + evaIcon(icon) { + return icon; + + }, + icoIcon(icon) { + if (!icon) { + return false; + } + return !!icon.startsWith("#icon"); + + }, } }; diff --git a/components/Footer.vue b/components/Footer.vue index e9bbf68..552be9d 100644 --- a/components/Footer.vue +++ b/components/Footer.vue @@ -1,43 +1,26 @@ @@ -48,24 +31,12 @@ export default { display: flex; align-items: center; justify-content: center; + flex-direction: column; + flex-wrap: wrap; + a { - color: inherit; - } - .icon { - cursor: pointer; - $iconSize: 25px; - width: $iconSize; - height: $iconSize; - margin: 0 7px; - vertical-align: -0.15em; - fill: currentColor; - overflow: hidden; - background-color: rgba($color: #fff, $alpha: 0.65); - color: #222831; - border-radius: 50%; - padding: 5px; - box-shadow: 8px 14px 38px rgba(39, 44, 49, 0.06), - 1px 3px 8px rgba(39, 44, 49, 0.03); + color: #38b7ea; + text-decoration: none; } } diff --git a/components/Navbar.vue b/components/Navbar.vue index 9a91e58..4958e3d 100644 --- a/components/Navbar.vue +++ b/components/Navbar.vue @@ -1,62 +1,118 @@ diff --git a/components/Search.vue b/components/Search.vue index d04a2ac..05a75a2 100644 --- a/components/Search.vue +++ b/components/Search.vue @@ -44,9 +44,16 @@ export default { computed: { toolsList() { let arr = []; - this.$store.state.tools.forEach(tool => { + // 更新每个工具的分类 + let tools = this.$store.state.tools; + for (let i = 0; i < tools.length; i++) { + const tool = tools[i]; + const category = tool['title']; + for (let j = 0; j < tool.list.length; j++) { + tool.list[j]['category'] = category; + } arr = arr.concat(tool.list); - }); + } return arr; }, searchList() { @@ -56,22 +63,18 @@ export default { this.toolsList.forEach(tool => { if (this.$route.path !== '/hide_tool' && !this.showBtn(tool)) return false; - if ( - tool.pinyin.first.find(i => { - return i.indexOf(value) >= 0; - }) - ) { + + if (tool.pinyin.first.find(i => { return i.indexOf(value) >= 0;})) { return results.push(tool); - } - if ( - tool.pinyin.pinyin.find(i => { - return i.indexOf(value) >= 0; - }) - ) { + } else if (tool.pinyin.pinyin.find(i => {return i.indexOf(value) >= 0;})) { return results.push(tool); - } - if (tool.name.toLowerCase().indexOf(value) >= 0) + } else if (tool.name.toLowerCase().indexOf(value) >= 0) { + // 拼音搜索 results.push(tool); + } else if (tool.en_name.toLowerCase().indexOf(value) >= 0) { + // 英文搜索 + results.push(tool); + } }); return results; } diff --git a/components/SetBackground.vue b/components/SetBackground.vue index 4192763..939a0bb 100644 --- a/components/SetBackground.vue +++ b/components/SetBackground.vue @@ -6,12 +6,12 @@ - + - +
- +
高斯模糊
diff --git a/components/SideBar.vue b/components/SideBar.vue new file mode 100644 index 0000000..b6a1a80 --- /dev/null +++ b/components/SideBar.vue @@ -0,0 +1,109 @@ + + + + + diff --git a/components/ThemeBtn.vue b/components/ThemeBtn.vue index b83ecc9..e3e7330 100644 --- a/components/ThemeBtn.vue +++ b/components/ThemeBtn.vue @@ -1,5 +1,5 @@ @@ -87,6 +38,7 @@ import Search from '~/components/Search'; import isMobile from 'ismobilejs'; import Welcome from '~/components/Welcome'; import ToolBox from "../components/ToolBox"; +import ToolItem from "../components/ToolItem"; export default { name: 'Home', @@ -95,6 +47,7 @@ export default { Search, Welcome, ToolBox, + ToolItem, }, head() { return { @@ -112,6 +65,7 @@ export default { toolsList() { let arr = []; this.$store.state.tools.forEach(tool => { + tool.list.forEach(item => item['category'] = tool['title']); arr = arr.concat(tool.list); }); return arr; diff --git a/pages/search.vue b/pages/search.vue new file mode 100644 index 0000000..4e1f841 --- /dev/null +++ b/pages/search.vue @@ -0,0 +1,64 @@ + + + + + diff --git a/pages/setting.vue b/pages/setting.vue index ebf2c3d..6e493f3 100644 --- a/pages/setting.vue +++ b/pages/setting.vue @@ -13,6 +13,7 @@ + diff --git a/pages/tools/code/http_format.vue b/pages/tools/code/http_format.vue new file mode 100644 index 0000000..b3f08dd --- /dev/null +++ b/pages/tools/code/http_format.vue @@ -0,0 +1,173 @@ + + + + + diff --git a/pages/tools/code/json_editor.vue b/pages/tools/code/json_editor.vue index 61f34a5..5105613 100644 --- a/pages/tools/code/json_editor.vue +++ b/pages/tools/code/json_editor.vue @@ -1,9 +1,9 @@ @@ -55,7 +55,7 @@ export default { diff --git a/pages/tools/code/url_format.vue b/pages/tools/code/url_format.vue deleted file mode 100644 index 0819276..0000000 --- a/pages/tools/code/url_format.vue +++ /dev/null @@ -1,39 +0,0 @@ - - - diff --git a/pages/tools/text/morse.vue b/pages/tools/text/morse.vue index 603244c..e3a0d1f 100644 --- a/pages/tools/text/morse.vue +++ b/pages/tools/text/morse.vue @@ -15,11 +15,34 @@
{{ result }}
- + -
    -
  • 如果内容包含中文,仅在本平台使用,可能其他人将无法识别
  • -
+ +
+A .- B -. . . C -. -.
+D -. . E . F . .-.
+G --. H . . . . I . .
+J .--- K -. - L .-. .
+M -- N -. O ---
+P . --. Q --.- R .-.
+S . . . T - U . .-
+V . . .- W .-- X -. .-
+Y -.-- Z --. .
+0 -----
+1.----
+2 . .---
+3 . . .--
+4. . . .-
+5. . . . .
+6 -. . . .
+7--. . .
+8---. . 9----.
+                
+ +
    +
  • 注意:如果内容包含中文,仅在本平台使用,可能其他人将无法识别
  • +
+
diff --git a/pages/tools/text/text_replace.vue b/pages/tools/text/text_replace.vue new file mode 100644 index 0000000..cbb6644 --- /dev/null +++ b/pages/tools/text/text_replace.vue @@ -0,0 +1,187 @@ + + + + + diff --git a/pages/tools/text/textdiff.vue b/pages/tools/text/textdiff.vue index a5ba3a9..8298e17 100644 --- a/pages/tools/text/textdiff.vue +++ b/pages/tools/text/textdiff.vue @@ -1,51 +1,53 @@