表格过滤器未显示 VueJS

问题描述 投票:0回答:1

我希望能够过滤数据表中显示的日期,并按照演示来执行此操作。这应该相对简单,但尽管满足了过滤器的要求,但没有显示任何内容。

这些是显示表格的文件的导入和数据:

import CoreLibrary from "../../../../core/helpers/CoreLibrary.js";
import * as actions from "../../../Config/ApiUrl";
import { TableHelpers } from "./TableHelpers";
import axios from 'axios';

export default {
    name: "Biometricos",
    mixins: [TableHelpers],
    extends: [CoreLibrary],
    data() {
        return {
            salidaDescription: '',
            salidaLocation: '',
            momentInstance: moment(),
            searchValue: '',
            deleteLoader: false,
            isAddEditModalActive: false,
            isInfoModalActive: false,
            deleteConformationModalActive: false,
            selectedUrl: '',
            tableId: '',
            options: {
                id: '',
                name: 'biometricos-table',
                isAddEditModalActive: false,
                isInfoModalActive: false,
                url: `${actions.BIOMETRICOS}/index`,
                showHeader: true,
                showCount: true,
                showClearFilter: true,
                columns: [],
                filters: [
                    {
                        "title": this.$t('date'),
                        "type": "range-picker",
                        "key": "date",
                        "option": ["today", "thisMonth", "last7Days", "nextYear"]
                    },
                ],
                actions: [
                    {
                        title: 'Info',
                        icon: 'eye',
                        type: 'none',
                        component: 'InfoModal',
                    }
                ],
                paginationType: "pagination",
                responsive: true,
                rowLimit: 10,
                orderBy: 'asc',
                datatableWrapper: false,
                showFilter: true,
                showSearch: true,
                showAction: true,
            },

        }
    },

这就是我调用表格的方式:

                <app-table :id="'biometricos-table'" :options="options" @action="getListAction" />

非常感谢任何帮助,我担心这是一个愚蠢的修复,但我根本找不到问题所在。

javascript html vue.js filter datatable
1个回答
0
投票

删除

datatableWrapper: false
可以显示过滤器。我相信包装器以某种方式阻塞了过滤器,即使它被设置为
false

© www.soinside.com 2019 - 2024. All rights reserved.