UNPKG

uv-ui

Version:

基于vue3的移动端组件库

55 lines (54 loc) 1.67 kB
import { openBlock as e, createElementBlock as a, createElementVNode as o, Fragment as d, renderList as n, normalizeStyle as p, renderSlot as c, createTextVNode as i, toDisplayString as v } from "vue"; import "./table.vue_vue_type_style_index_0_lang.js"; const b = { class: "uv-table" }, _ = { class: "uv-table-header-wrapper" }, f = { class: "uv-table-tr" }, h = { class: "uv-table-body-wrapper" }, w = { name: "UvTable" }, g = /* @__PURE__ */ Object.assign(w, { props: { data: { type: Array, default: () => [] }, columns: { type: Array, default: () => [] } }, setup(l) { return (u, m) => (e(), a("div", b, [ o("div", _, [ o("div", f, [ (e(!0), a(d, null, n(l.columns, (t, s) => (e(), a("div", { class: "uv-table-th", style: p({ width: t.width, flex: t.width ? "" : 1 }), key: t.prop || s }, [ c(u.$slots, t.titleSlot, { data: t }, () => [ i(v(t.title), 1) ]) ], 4))), 128)) ]) ]), o("div", h, [ (e(!0), a(d, null, n(l.data, (t, s) => (e(), a("div", { class: "uv-table-tr", key: s }, [ (e(!0), a(d, null, n(l.columns, (r, y) => (e(), a("div", { class: "uv-table-td", style: p({ width: r.width, flex: r.width ? "" : 1 }), key: r.prop || y }, [ c(u.$slots, r.prop, { data: t[r.prop] }, () => [ i(v(t[r.prop] || ""), 1) ]) ], 4))), 128)) ]))), 128)) ]) ])); } }); export { g as default };