fix: Issues #200 done.

This commit is contained in:
chiayin
2023-11-21 10:21:22 +08:00
parent 1aba349a76
commit b0b1c32932
2 changed files with 5 additions and 4 deletions

View File

@@ -168,9 +168,10 @@ export default {
},
},
watch: {
selectArea: function(newValue) {
selectArea: function(newValue, oldValue) {
let roundValue = Math.round(newValue[1].toFixed());
if(newValue[1] !== roundValue) this.selectArea[1] = roundValue;
if(newValue != oldValue) this.$emit('filter-trace-selectArea', newValue); // 判斷 Apply 是否 disable
},
infinite404: function(newValue) {
if(newValue === 404) this.infinitMaxItems = true;

View File

@@ -87,7 +87,7 @@
<!-- title: Attributes -->
<Attributes v-if="selectValue[0] === 'Attributes'" @select-attribute="getSelectAttribute"></Attributes>
<!-- title: Trace -->
<Trace v-if="selectValue[0] === 'Trace'" ref="filterTraceView"></Trace>
<Trace v-if="selectValue[0] === 'Trace'" ref="filterTraceView" @filter-trace-selectArea="selectTraceArea = $event"></Trace>
<!-- title: Timeframes -->
<Timeframes v-if="selectValue[0] === 'Timeframes'" :selectValue="selectValue"></Timeframes>
</div>
@@ -96,7 +96,6 @@
<div class="float-right space-x-4 px-4 py-2">
<button type="button" class="btn btn-sm btn-neutral" @click="reset">Clear</button>
<button type="button" class="btn btn-sm" @click="submit" :disabled="isDisabledButton" :class="this.isDisabled ? 'btn-disable' : 'btn-neutral'">Apply</button>
<!-- :disabled="isDisabled" -->
</div>
</div>
</div>
@@ -163,6 +162,7 @@ export default {
isEndSelected: null,
isActAllTask: true,
rowData: [],
selectTraceArea: [], // Trace 滑快
isDisabled: true, // Apply Button disabled setting
}
},
@@ -245,7 +245,7 @@ export default {
}
break;
case 'Trace': // Filter Type 選 Trace 的行為
disabled = false;
if(this.selectTraceArea[0] !== this.selectTraceArea[1]) disabled = false;
break;
case 'Timeframes': // Filter Type 選 Timeframes 的行為
if(this.selectTimeFrame.length > 0) disabled = false;