Добалвлен крестик в строку поиска

This commit is contained in:
Book Pauk
2020-12-21 17:48:49 +07:00
parent a251d16432
commit 2de8d7515e

View File

@@ -27,8 +27,11 @@
placeholder="Найти"
v-model="search"
@click.stop
/>
>
<template v-slot:append>
<q-icon v-if="search !== ''" name="la la-times" class="cursor-pointer" @click.stop="resetSearch"/>
</template>
</q-input>
<span v-html="props.cols[2].label"></span>
</q-th>
</q-tr>
@@ -106,7 +109,7 @@ export default @Component({
})
class RecentBooksPage extends Vue {
loading = false;
search = null;
search = '';
tableData = [];
columns = [];
pagination = {};
@@ -244,6 +247,11 @@ class RecentBooksPage extends Vue {
this.updating = false;
}
resetSearch() {
this.search = '';
this.$refs.input.focus();
}
wordEnding(num) {
const endings = ['', 'а', 'и', 'и', 'и', '', '', '', '', ''];
const deci = num % 100;