0.1.2 • Published 1 year ago
vue3-table-complex v0.1.2
Vue 3 + TypeScript + Vite
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 <script setup>
SFCs, check out the script setup docs to learn more.
Recommended Setup
VS Code + Vue - Official (previously Volar) and disable Vetur
Use vue-tsc for performing the same type checking from the command line, or for generating d.ts files for SFCs.
export interface TableColumn {
- field: string;
- header: string;
- type?: 'number' | 'decimal' | 'boolean' | 'string' | 'percent' | 'dateTime' | 'date' | 'custome';
- classList?: string;
- width: string;
- isShow: boolean;
- isFilter: boolean;
- filterEvent?: any;
- filterItems?: Array;
}
<vue3-table :headers="headers" :tableData="data" v-model:selectRow="selectedRow" @changeSelectedRow="(a)=>console.log(a)">
<template v-if="data.column == 'operation'">
<i class="fa-regular fa-eye hover:text-yellow-600"></i>
{{data.row.id}}
</template>
</template>