我正在嘗試使用來自 php 文件的數據創建一個表,但我找不到一種方法來創建一個帶有 FOLIO 值和 id 的復選框,這是我的方法:門票.vue <template> <v-card class="elevation-5 pa-3"> <v-data-table ref="data_table" :headers="configuracion.configClientes.encabezados" expand rows-per-page-text="Filas por página" :rows-per-page-items="[10, 20, 55, { text: 'Todas', value: -1 }]" :no-results-text="'No se han encontrado tickets'" :item-key="configuracion.configClientes.itemKey" v-model="seleccion" :configuracion="configuracion.configClientes" :items="cat_clientes.catalogo" > <template slot="headerCell" slot-scope="props"> <span> {{ props.header.text }} </span> </template> <template slot="items" slot-scope="props"> <tr> <td v-for="columna in configuracion.configClientes.encabezados" v-if="columna.value !== '$acciones'" :key="keyUUID()" > {{ formatearColumna( props.item, columna ) }} </td> </tr> </template> <template slot="no-data"> <v-alert :value="true" color="warning" icon="warning"> {{ configuracion.mensajeVacia ? configuracion.mensajeVacia : 'No hay tickets' }} </v-alert> </template> </v-data-table> </v-card> </template>
1 回答

浮云間
TA貢獻1829條經驗 獲得超4個贊
您可能正在尋找true-value并false-value在<v-checkbox>vuetify 組件內部。它可以看起來像這樣的小東西。
<v-data-table
:items="cat_clientes.catalog"
:headers="this.headers"
hide-default-headers
:items-per-page="10"
:search="search"
>
<template v-slot:item.status="{ item }">
<v-checkbox true-value="Done" false-value="Open" v-model="itemStatus" @change="changeCheckbox(item)"
color="primary"/>
</template>
- 1 回答
- 0 關注
- 122 瀏覽
添加回答
舉報
0/150
提交
取消