表:
<v-card :dark="true"> <v-card-title> <v-btn color="indigo" dark @click="initialize"><v-icon dark>refresh</v-icon></v-btn> <v-spacer></v-spacer> <v-text-field append-icon="search" label="Search" single-line hide-details></v-text-field> </v-card-title> <v-data-table :dark="true" :headers="headers" :items="expenses" hide-actions class="elevation-1"> <template slot="headers" slot-scope="props"> <tr> <th v-for="header in props.headers">{{header.text}}</th> </tr> </template> <template slot="items" slot-scope="props"> <tr v-bind:class="getClass(props.item)"> <td class="text-xs-center">{{ props.item.year }}</td> <td class="text-xs-center">{{ props.item.month }}</td> <td class="text-xs-center">{{ props.item.day }}</td> <td class="text-xs-center">{{ props.item.description }}</td> <td class="text-xs-center">{{ props.item.value }}</td> <td class="text-xs-center">{{ props.item.category }}</td> <td class="text-xs-center">{{ props.item.details }}</td> <td class="justify-center layout px-0"> <v-btn icon class="mx-0" @click="deleteItem(props.item)"> <v-icon color="pink">delete</v-icon> </v-btn> </td> </tr> </template> <template slot="no-data"> <v-btn color="primary" @click="initialize">Reset</v-btn> </template> </v-data-table> </v-card>
页面重新加载之前的Css,在Webstorm中编辑代码并自动编译之后:
重装后:
如果我只删除第一行,无论哪一个是第一行,都会发生同样的情况.