TerryZ/v-selectpage

Avatar/thumbnail option in dropdown

Cannonb4ll opened this issue · 1 comments

Is this planned?

The show-filed option can be string and function types. When you set a string type, it will specify a data column as show text content, set function type like below:

<template>
    <v-selectpage key-field="id" :show-field="render"></v-selectpage>
</template>

<script>
export default {
    methods: {
        render(row) {
            const html = `<img src="${row.avatar}" />`;
            return html;
        }
    }
}
</script>

You can build anything you want in function.