如何在自定义文本时从 v-select 添加复选框而不覆盖multiple
.
<v-select
v-model="selectedRepoImage"
:items="repoImages"
item-text="fulltag"
item-value="repo_image_id"
multiple>
<template v-slot:selection="{ item, index }">
<template v-slot:selection="{ item, index }">
<v-chip v-if="index === 0">
<span>{{item.fulltag}}</span>
</v-chip>
<span
v-if="index === 1"
class="grey--text caption"
>(+{{ selectedRepoImage.length - 1}} others)</span>
</template>
</template>
<template v-slot:item="{ item }">
//checkboxes ??
//item.name ??
</template>
</v-select>
Run Code Online (Sandbox Code Playgroud) 例如,如何从选择查询中添加一列,但新列中的值将是选择查询的行数。
select quantity from menu;
Run Code Online (Sandbox Code Playgroud)
并像这样返回
+--------+
|quantity|
+--------+
| 50 |
| 32 |
| 23 |
+--------+
Run Code Online (Sandbox Code Playgroud)
但我想要这样的东西
+----------+--------+
|new column|quantity|
+----------+--------+
| 1 | 50 |
| 2 | 32 |
| 3 | 23 |
+----------+--------+
Run Code Online (Sandbox Code Playgroud)
新列应该从 1 开始,从 select 查询语句的行数结束。任何答案都会有所帮助谢谢