adverich-kun-ui
Version:
Una librería de componentes Vue.js con Tailwind CSS
67 lines (66 loc) • 2.46 kB
JavaScript
const t = () => ({
items: { type: Array, default: () => [] },
selected: { type: Array, default: () => [] },
headers: { type: Array, default: () => [] },
hasActions: { type: Boolean, default: !1 },
actionLabel: { type: String, default: "Acciones" },
actionsAlign: String,
actionLoadingMap: { type: Object, default: () => ({}) },
filterable: Boolean,
filters: { type: Array, default: () => [] },
customFilter: { type: Function, default: null },
// Features
itemsPerPage: { type: [Number, String], default: 10 },
page: { type: [Number, String], default: 1 },
sortBy: {
type: [Array, String],
default: () => []
},
mutliSort: Boolean,
pageOptions: { type: Array, default: () => [5, 10, 25, 50, 100] },
searchable: { type: Boolean, default: !1 },
search: {
type: String,
default: ""
},
searchableKeys: { type: Array, default: null },
searchPosition: {
type: String,
default: "end",
// 'start' | 'center' | 'end'
validator: (e) => ["start", "center", "end"].includes(e)
},
searchPlaceholder: { type: String, default: "Buscar..." },
debounceTime: { type: Number, default: 300 },
showSelect: { type: Boolean, default: !1 },
showExpand: { type: Boolean, default: !1 },
showGroupBy: { type: Boolean, default: !1 },
// Display
hideDefaultHeader: { type: Boolean, default: !1 },
hideDefaultFooter: { type: Boolean, default: !1 },
// Custom class props
wrapperClass: { type: String, default: "" },
tableClass: { type: String, default: "" },
tbodyClass: { type: String, default: "" },
theadClass: { type: String, default: "" },
trClass: { type: String, default: "" },
thClass: { type: String, default: "" },
tdClass: { type: [String, Function], default: "" },
selectedClass: { type: String, default: "bg-blue-100" },
stripedClass: { type: String, default: "" },
tfootClass: { type: String, default: "" },
rowClass: { type: String, default: "" },
rowClassCondition: { type: [String, Function], default: "" },
// Misc
noDataText: { type: String, default: "No hay elementos disponibles" },
loadingText: { type: String, default: "Cargando..." },
// Slots control
customSlots: { type: Object, default: () => ({}) },
customHeaders: { type: Object, default: () => ({}) },
showTopSlot: { type: Boolean, default: !1 },
showBottomSlot: { type: Boolean, default: !1 },
functionMap: { type: Object, default: () => ({}) }
});
export {
t as default
};