50 lines
1.2 KiB
Vue
50 lines
1.2 KiB
Vue
<script setup>
|
|
import { useQuasar } from 'quasar';
|
|
const quasar = useQuasar();
|
|
import VnComponent from 'components/common/VnComponent.vue';
|
|
import { onMounted, ref } from 'vue';
|
|
import ItemDescriptor from 'src/pages/Item/Card/ItemDescriptor.vue';
|
|
|
|
const $props = defineProps({
|
|
label: {
|
|
type: Function,
|
|
required: true,
|
|
},
|
|
row: {
|
|
type: Object,
|
|
default: null,
|
|
},
|
|
proxy: {
|
|
type: Object,
|
|
default: null,
|
|
},
|
|
});
|
|
const btnRow = ref(null);
|
|
const popupVisible = ref(true);
|
|
const handleClick = (event) => {
|
|
event.preventDefault();
|
|
event.stopPropagation();
|
|
console.log(event);
|
|
popupVisible.value = true;
|
|
// quasar.dialog({
|
|
// component: $props.proxy.component,
|
|
// componentProps: {
|
|
// id: $props.row[$props.proxy.key],
|
|
|
|
// },
|
|
// });
|
|
};
|
|
onMounted(() => {
|
|
// btnRow.value = btnRow.value.$el;
|
|
});
|
|
</script>
|
|
<template>
|
|
<QBtn class="link" flat dense ref="btnRow" @click="handleClick"
|
|
>{{ $props.label($props.row) }}
|
|
</QBtn>
|
|
<!-- <VnComponent :id="row.itemFk" /> -->
|
|
|
|
<QPopupProxy :target="btnRow"> <ItemDescriptor :id="1" /></QPopupProxy>
|
|
</template>
|
|
<style lang="scss"></style>
|