waningflow/vue-virtual-table

Use plain html data

Closed this issue · 6 comments

Is it possible to use this library with v-html directive ?

I'm not sure what feature you are going to achieve with v-html. Maybe you can describe your demand with more detail. Thank you.

I want to pass data which is raw html and be able to render it as a table content

The passed data must be a json array now. I think it's more convenient with json format. I haven't met a case that I have to use raw html.
(If there are not any other questions, this issue will be closed later.)

I mean I want to put in specific cell some rendered html value

You can use "_action" and put the html in the slot.
This is part of an example:

<vue-virtual-table
    :config="tableConfig"
    :data="tableData"
>
    <template slot-scope="scope" slot="actionHtml">
        <span v-html="htmlvalue"></span>
    </template>
</vue-virtual-table>

And add this to tableConfig:

{prop: '_action', name: 'Action', actionName: 'actionHtml'}

I think this issue has been solved. It will be closed soon.