Web Editor home made
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user