mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-09-29 07:43:38 +08:00
feat: 配置栏旁新增一个全屏按钮
This commit is contained in:
@@ -621,7 +621,7 @@
|
||||
<p><input type="text" id="code" style="display: none">
|
||||
<span class="word">匹 配</span>
|
||||
<select id="type"></select>
|
||||
<span class="word" id="ruleWord">关键字</span><input class="customize" type="text" id="rule" placeholder="多个关键字用逗号隔开"></p>
|
||||
<span class="word" id="ruleWord">关键字</span><input class="customize" type="text" id="rule" placeholder="多个关键字用逗号隔开"><img id="expandBtn" src="./img/expand.svg"></p>
|
||||
<p><span class="word">说 明</span><input class="customize" type="text" id="desc" placeholder="命令功能的描述">
|
||||
<img id="icon" src="">
|
||||
</p>
|
||||
@@ -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()
|
||||
|
@@ -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 {
|
||||
|
Reference in New Issue
Block a user