优化界面

This commit is contained in:
刘祥超
2022-03-25 14:10:40 +08:00
parent 2e626a915f
commit b2af8e196b
4 changed files with 15 additions and 5 deletions

View File

@@ -6862,14 +6862,14 @@ Vue.component("http-compression-config-box", {
</div> </div>
</div> </div>
<p class="comment">选择支持的压缩算法和优先顺序,拖动<i class="icon list small grey"></i>图表排序。</p> <p class="comment" v-show="!config.useDefaultTypes">选择支持的压缩算法和优先顺序,拖动<i class="icon list small grey"></i>图表排序。</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>支持已压缩内容</td> <td>支持已压缩内容</td>
<td> <td>
<checkbox v-model="config.decompressData"></checkbox> <checkbox v-model="config.decompressData"></checkbox>
<p class="comment">支持对已压缩内容尝试重新使用新的算法压缩。</p> <p class="comment">支持对已压缩内容尝试重新使用新的算法压缩;不选中表示保留当前的压缩格式。</p>
</td> </td>
</tr> </tr>
<tr> <tr>

View File

@@ -1,7 +1,7 @@
let sourceCodeBoxIndex = 0 let sourceCodeBoxIndex = 0
Vue.component("source-code-box", { Vue.component("source-code-box", {
props: ["name", "type", "id", "read-only", "width", "height"], props: ["name", "type", "id", "read-only", "width", "height", "focus"],
mounted: function () { mounted: function () {
let readOnly = this.readOnly let readOnly = this.readOnly
if (typeof readOnly != "boolean") { if (typeof readOnly != "boolean") {
@@ -53,6 +53,10 @@ Vue.component("source-code-box", {
}) })
boxEditor.setValue(value) boxEditor.setValue(value)
if (this.focus) {
boxEditor.focus()
}
let width = this.width let width = this.width
let height = this.height let height = this.height
if (width != null && height != null) { if (width != null && height != null) {
@@ -64,6 +68,11 @@ Vue.component("source-code-box", {
} }
boxEditor.setSize(width, height) boxEditor.setSize(width, height)
} }
} else if (height != null) {
height = parseInt(height)
if (!isNaN(height)) {
boxEditor.setSize("100%", height)
}
} }
let info = CodeMirror.findModeByMIME(this.type) let info = CodeMirror.findModeByMIME(this.type)

View File

@@ -9,7 +9,7 @@
<thead> <thead>
<tr> <tr>
<th style="width:3em"><checkbox @input="checkAll"></checkbox></th> <th style="width:3em"><checkbox @input="checkAll"></checkbox></th>
<th>集群</th> <th class="three wide">集群</th>
<th>节点</th> <th>节点</th>
<th>任务</th> <th>任务</th>
<th>状态</th> <th>状态</th>
@@ -29,6 +29,7 @@
<td> <td>
<span v-if="task.type == 'configChanged'">同步配置</span> <span v-if="task.type == 'configChanged'">同步配置</span>
<span v-if="task.type == 'ipItemChanged'">同步IP名单</span> <span v-if="task.type == 'ipItemChanged'">同步IP名单</span>
<span v-if="task.type == 'scriptsChanged'">同步脚本</span>
</td> </td>
<td> <td>
<span v-if="task.isDone" class="red">{{task.error}}</span> <span v-if="task.isDone" class="red">{{task.error}}</span>

View File

@@ -6,7 +6,7 @@
<table class="ui table selectable celled"> <table class="ui table selectable celled">
<thead> <thead>
<tr> <tr>
<th>对象</th> <th class="three wide">对象</th>
<th>任务</th> <th>任务</th>
<th>状态</th> <th>状态</th>
<th>触发时间</th> <th>触发时间</th>