Web Editor home made

This commit is contained in:
Surya Paolo
2022-11-17 08:10:43 +01:00
parent 711f1b515d
commit 495abc33be
77 changed files with 1742 additions and 1771 deletions

View File

@@ -96,7 +96,7 @@ export default defineComponent({
default: null,
},
mycol: {
type: Object as PropType<IColGridTable>,
type: Object as PropType<IColGridTable> | undefined,
required: false,
default: () => {
return { name: '' }
@@ -142,16 +142,24 @@ export default defineComponent({
}
function withBorder() {
return col.value.fieldtype !== costanti.FieldType.onlydate && col.value.fieldtype !== costanti.FieldType.date
if (col.value)
return col.value.fieldtype !== costanti.FieldType.onlydate && col.value.fieldtype !== costanti.FieldType.date
else
return false
}
function mounted() {
if (props.rec) {
row.value = props.rec
}
if (props.mycol.name !== '') {
if (props.mycol && props.mycol.name !== '') {
col.value = props.mycol
} else {
console.log('Tab = ', props.table, 'key=', props.mykey)
col.value = fieldsTable.getColByTable(props.table, props.mykey)
console.log('MYCOL = ', col.value)
}
}
onMounted(mounted)

View File

@@ -23,6 +23,7 @@
<div :class="` q-ma-sm q-pa-sm col-grow popupedit `" :style="withBorder() ? `` : ``">
<CMyPopupEdit
:fielddb="true"
v-bind="$attrs"
:rec="rec"
:isrec="!!rec"
@@ -43,7 +44,7 @@
:canEdit="true"
:id="id"
:idmain="idmain"
:mycol="col"
:mycol="col ? col : {}"
:tablesel="tablesel"
:pickup="pickup"
v-model:row="row"