Change test filtering base to use watch
<span v-text="i18n('common.button.search')"></span>
</button>
<label class="checkbox-label">
- <input type="checkbox" class="align-middle" @click="$emit('filter-running', {enable: !running, token: 'R'})" v-model="running">
+ <input type="checkbox" class="align-middle" v-model="running">
<span v-text="i18n('perfTest.action.running')"></span>
</label>
<label class="checkbox-label">
- <input type="checkbox" class="align-middle" @click="$emit('filter-schduled', {enable: !scheduled, token: 'S'})" v-model="scheduled">
+ <input type="checkbox" class="align-middle" v-model="scheduled">
<span v-text="i18n('perfTest.action.scheduled')"></span>
</label>
</div>
</template>
<script>
import { Mixins } from 'vue-mixin-decorator';
- import Component from 'vue-class-component';
+ import { Component, Watch } from 'vue-property-decorator';
import Base from '../../Base.vue';
import Select2 from '../../common/Select2.vue';
import MessagesMixin from '../../common/mixin/MessagesMixin.vue';
running = false;
scheduled = false;
+ @Watch('running')
+ filterRunning() {
+ this.$emit('filter-running', { enable: this.running, token: 'R' });
+ }
+
+ @Watch('scheduled')
+ filterScheduled() {
+ this.$emit('filter-schduled', { enable: this.scheduled, token: 'S' });
+ }
+
created() {
this.getUserTags();
}
