fix scene load and add first version UpdateValueDialog
This commit is contained in:
13
src/components/dbm/UpdateValue.vue
Normal file
13
src/components/dbm/UpdateValue.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<QCard v-if="props.display"> Test </QCard>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const props = defineProps({
|
||||
display: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
</script>
|
@@ -11,14 +11,24 @@
|
||||
row-key="path"
|
||||
virtual-scroll
|
||||
:rows-per-page-options="[0]"
|
||||
/>
|
||||
>
|
||||
<template v-slot:body-cell-value="props">
|
||||
<q-td :props="props" @click="openDialog(props.row)">
|
||||
<span :class="['cursor-pointer', open ? 'text-green' : '']"> {{ props.row.value }}</span>
|
||||
</q-td>
|
||||
</template>
|
||||
</q-table>
|
||||
<Dialog dialogLabel="Update Value" :show-dialog="open" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import Dialog from 'src/components/dialog/UpdateValueDialog.vue';
|
||||
import type { QTableProps } from 'quasar';
|
||||
import type { Subs } from 'src/models/Subscribe';
|
||||
import { computed } from 'vue';
|
||||
import type { Subs, Subscribe } from 'src/models/Subscribe';
|
||||
import { computed, ref } from 'vue';
|
||||
|
||||
const open = ref(false);
|
||||
|
||||
// we generate lots of rows here
|
||||
const props = defineProps<{
|
||||
@@ -35,5 +45,16 @@ const columns = [
|
||||
field: 'value',
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
name: 'test',
|
||||
label: '',
|
||||
field: 'test',
|
||||
align: 'left',
|
||||
},
|
||||
] as QTableProps['columns'];
|
||||
|
||||
function openDialog(item: Subscribe) {
|
||||
console.log(77, item);
|
||||
open.value = true;
|
||||
}
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user