Files
luos/resources/assets/js/components/search/SearchDataTable.vue
Rodrigo Quelca ffda3997d5 fix conflicts
fix

Revert "fix"

This reverts commit 6d21e322081ecd8b89db4d6c07c6c8a82b2549a6.

add advanced-search main

fix header

gif Home

fix missed code

CR notes

CR notes 2

CR notes 5

CR notes 8
2020-12-04 21:36:59 +00:00

84 lines
3.3 KiB
Vue

<template>
<div :class="`VueTables VueTables--${props.source}`" slot-scope="props">
<div :class="props.theme.row">
<div :class="props.theme.column">
<div v-if="!props.opts.filterByColumn && props.opts.filterable"
:class="`${props.theme.field} ${props.theme.inline} ${props.theme.left} VueTables__search`">
<vnodes :vnodes="props.slots.beforeFilter"/>
<vt-generic-filter ref="genericFilter"/>
<vnodes :vnodes="props.slots.afterFilter"/>
</div>
<vnodes :vnodes="props.slots.afterFilterWrapper"/>
<div v-if="props.perPageValues.length > 1 || props.opts.alwaysShowPerPageSelect"
:class="`${props.theme.field} ${props.theme.inline} ${props.theme.right} VueTables__limit`">
<vnodes :vnodes="props.slots.beforeLimit"/>
<vt-per-page-selector/>
<vnodes :vnodes="props.slots.afterLimit"/>
</div>
{{ props.generic}}
<GenericFilter @onSearch="onSearch" @onJumpCase="onJumpCase"/>
<div class="VueTables__pagination-wrapper" v-if="props.opts.pagination.dropdown && props.totalPages > 1">
<div :class="`${props.theme.field} ${props.theme.inline} ${props.theme.right} VueTables__dropdown-pagination`">
<vt-dropdown-pagination/>
</div>
</div>
<div v-if="props.opts.columnsDropdown"
:class="`VueTables__columns-dropdown-wrapper ${props.theme.right} ${props.theme.dropdown.container}`">
<vt-columns-dropdown/>
</div>
</div>
</div>
<vnodes :vnodes="props.slots.beforeTable"/>
<div class="table-responsive">
<vt-table ref="vt_table"/>
</div>
<vnodes :vnodes="props.slots.afterTable"/>
<vt-pagination/>
</div>
</template>
<script>
import VtColumnsDropdown from 'vue-tables-2/compiled/components/VtColumnsDropdown'
import VtDropdownPagination from 'vue-tables-2/compiled/components/VtDropdownPagination'
import VtGenericFilter from 'vue-tables-2/compiled/components/VtGenericFilter'
import VtPerPageSelector from 'vue-tables-2/compiled/components/VtPerPageSelector';
import VtPagination from 'vue-tables-2/compiled/components/VtPagination'
import VtTable from 'vue-tables-2/compiled/components/VtTable';
import GenericFilter from './GenericFilter'
export default {
name: "SearchDataTable",
props: ['props'],
components: {
VtGenericFilter,
VtPerPageSelector,
VtColumnsDropdown,
VtDropdownPagination,
VtTable,
VtPagination,
GenericFilter,
vnodes: {
functional: true,
render: (h, ctx) => ctx.props.vnodes
}
},
methods: {
onSearch(jsonFilter) {
this.$parent.$parent.$emit("onsearch", jsonFilter);
},
onJumpCase(params) {
this.$parent.$parent.$emit("onjumpcase", params);
}
}
}
</script>