From 63e633c4521093b17feefef4bf3e6ef604cae202 Mon Sep 17 00:00:00 2001 From: Frost-ZX <30585462+Frost-ZX@users.noreply.github.com> Date: Sat, 19 Mar 2022 18:45:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=83=A8=E5=88=86=E5=B0=8F?= =?UTF-8?q?=E5=B7=A5=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/js/navTools.js | 5 ++- src/components/Tools/GenRandomStr.vue | 6 ++-- src/components/Tools/OtherEditCSV.vue | 48 +++++++++++++++++++++---- src/components/Tools/OtherNewWindow.vue | 12 +++++-- src/components/Tools/OtherRunJS.vue | 14 ++++++-- 5 files changed, 71 insertions(+), 14 deletions(-) diff --git a/src/assets/js/navTools.js b/src/assets/js/navTools.js index 10cad14..accb46b 100644 --- a/src/assets/js/navTools.js +++ b/src/assets/js/navTools.js @@ -118,13 +118,15 @@ const navTools = { list: { 'edit-csv': { title: 'CSV 编辑工具', + desc: '查看或编辑 CSV 文件', component: 'OtherEditCSV', update: '2022-03-17', - version: '1', + version: '2', enabled: true, }, 'new-window': { title: '新窗口(小窗)中打开', + desc: '从新的小窗口中打开指定的链接(仅支持 PC 端浏览器)', component: 'OtherNewWindow', update: '2021-05-03', version: '1', @@ -132,6 +134,7 @@ const navTools = { }, 'run-js': { title: '执行 JavaScript', + desc: '执行简单的 JavaScript 代码片段', component: 'OtherRunJS', update: '2021-06-14', version: '2', diff --git a/src/components/Tools/GenRandomStr.vue b/src/components/Tools/GenRandomStr.vue index c591d48..96d0bc3 100644 --- a/src/components/Tools/GenRandomStr.vue +++ b/src/components/Tools/GenRandomStr.vue @@ -59,18 +59,20 @@
生成
-
参考资料
+
算法参考
博客园 - hankuksui
diff --git a/src/components/Tools/OtherEditCSV.vue b/src/components/Tools/OtherEditCSV.vue index d94603a..c34fdd0 100644 --- a/src/components/Tools/OtherEditCSV.vue +++ b/src/components/Tools/OtherEditCSV.vue @@ -12,7 +12,7 @@
-
导入 / 导出
+
打开 / 保存
@@ -20,7 +20,7 @@ type="success" size="small" plain - >导入 CSV + >打开 CSV 导出 CSV + >保存 CSV
编辑区
-
+
+
+
+ +
+
设置
+
+ +
+
编辑区高度
+ +
+
@@ -185,6 +208,7 @@ export default { data() { return { + editorHeight: 25, gridInstance: null, } @@ -296,12 +320,12 @@ export default { }, - /** 导出 CSV */ + /** 保存 CSV */ exportCSV() { this.callGrid('downloadDataAsCSV'); }, - /** 导入 CSV */ + /** 打开 CSV */ importCSV(datas) { const files = datas.list; @@ -388,7 +412,7 @@ export default { .grid { width: 100%; - height: 400px; + height: 25rem; border: 0.125rem solid #2196f3; border-radius: 0.375rem; } @@ -427,4 +451,14 @@ export default { display: none !important; } } + +.config .config-item { + > div { + display: inline-block; + } + + .title { + margin-right: 0.5em; + } +} diff --git a/src/components/Tools/OtherNewWindow.vue b/src/components/Tools/OtherNewWindow.vue index 1adc59f..c847664 100644 --- a/src/components/Tools/OtherNewWindow.vue +++ b/src/components/Tools/OtherNewWindow.vue @@ -19,8 +19,16 @@
操作
- 打开 - 清空 + 打开 + 清空
diff --git a/src/components/Tools/OtherRunJS.vue b/src/components/Tools/OtherRunJS.vue index 1f2a17d..6e4abb1 100644 --- a/src/components/Tools/OtherRunJS.vue +++ b/src/components/Tools/OtherRunJS.vue @@ -13,8 +13,18 @@
操作
- 执行 - 清空 + 执行 + 清空