linmasahiro / vue3-table-lite

A simple and lightweight data table component for Vue.js 3. Features sorting, paging, row check, dynamic data rendering, supported TypeScript, and more.
https://vue3-lite-table.vercel.app/
MIT License
248 stars 74 forks source link

Allow HTML in header #91

Closed Chcap closed 1 year ago

Chcap commented 1 year ago

Hi,

currently, in the current configuration, the label of a column can only be simple text, as {{ col.label }} (see code) can only display text.

It would be nice to support HTML, to have more complex display (images, font change, colors). In some cases, there are some workarounds with headerStyles but it has its limit.

Using the directive v-html="col.label" instead of {{ col.label }} should do the trick.

Regards

linmasahiro commented 1 year ago

Hi @Chcap , Thanks for your advice, I am sorry reply too late. It's a good idea, and I will change it to next version, thank you a lot.

linmasahiro commented 1 year ago

Hi @Chcap , I am already changed the label's statement. Supported HTML now :)

Chcap commented 1 year ago

@linmasahiro Thanks ! I will try it soon :)

Chcap commented 1 year ago

@linmasahiro Works fine, thanks again !!