report-design/src/components/reportTemplate/reportRow.vue

40 lines
703 B
Vue

<template>
<tr @click="rowClickHandler" :class="{active:isActive}">
<reportCell></reportCell>
</tr>
</template>
<script lang="ts">
import Vue from 'vue';
import reportCell from './reportCell.vue';
export default Vue.extend({
props: ['rowId'],
components: { reportCell },
data: function() {
return {
isActive: false,
};
},
methods: {
rowClickHandler: function() {
this.isActive = !this.isActive;
console.log(this.rowId);
},
},
});
</script>
<style lang="scss" scoped>
tr {
border: 1px black solid;
}
.active {
background-color: blue;
}
</style>
/*
@click="rowClickHandler(row.rowId,$event)" v-bind:class="{active:row.rowId==selectedRow}"
*/