From 13b0b37f8f6d3aa9d5b06c87a1fa0d0718e40112 Mon Sep 17 00:00:00 2001
From: lee
Date: Sat, 10 Oct 2020 01:02:49 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E9=85=8D=E7=BD=AE=E6=A0=8F=E6=97=81?=
=?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=B8=80=E4=B8=AA=E5=85=A8=E5=B1=8F=E6=8C=89?=
=?UTF-8?q?=E9=92=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/assets/index.js | 17 ++++++++++++++++-
src/assets/style/options.css | 12 +++++++++++-
src/img/expand.svg | 1 +
3 files changed, 28 insertions(+), 2 deletions(-)
create mode 100644 src/img/expand.svg
diff --git a/src/assets/index.js b/src/assets/index.js
index 24e4c2e..2dd79f6 100644
--- a/src/assets/index.js
+++ b/src/assets/index.js
@@ -621,7 +621,7 @@
匹 配
- 关键字
+ 关键字
说 明
@@ -1701,6 +1701,21 @@
runCurrentCommand()
})
+ // 配置栏扩大
+ $("#options").on('click', '#expandBtn', function () {
+ let placeholder = $('#rule').prop('placeholder')
+ let rule = $('#rule').val()
+ try {
+ rule = JSON.stringify(JSON.parse(rule), null, 4)
+ } catch (error) { }
+ quickcommand.showTextAera(placeholder, rule).then(x => {
+ try {
+ x = JSON.stringify(JSON.parse(x))
+ } catch (error) { }
+ $('#rule').val(x)
+ })
+ })
+
// 格式化
$("#options").on('click', '#beautifyCode', function () {
beautifyCode()
diff --git a/src/assets/style/options.css b/src/assets/style/options.css
index a58e0b3..dee57e8 100644
--- a/src/assets/style/options.css
+++ b/src/assets/style/options.css
@@ -439,7 +439,17 @@ body {
}
#options #customize input#rule {
- width: 40%;
+ width: 38%;
+}
+
+#options #customize img#expandBtn {
+ max-width: 15px;
+ cursor: pointer;
+}
+
+#options #customize img#expandBtn:hover {
+ filter: drop-shadow(0 0 5px black);
+ transition: 0.2s;
}
#options #customize input#scptarg {
diff --git a/src/img/expand.svg b/src/img/expand.svg
new file mode 100644
index 0000000..c3d4539
--- /dev/null
+++ b/src/img/expand.svg
@@ -0,0 +1 @@
+
\ No newline at end of file