数据模型完成

This commit is contained in:
aixianling
2023-04-04 14:10:46 +08:00
parent 75b7b01706
commit 89c406d802
5 changed files with 129 additions and 86 deletions

View File

@@ -19,7 +19,7 @@ class DataView extends HtmlNode {
el.innerHTML = `
<b>${id}</b>
<div class="content pad-8">
${props.map(e => `<div flex><b class="fill sherk">${e.columnName}</b><span class="mar-l8">${e.columnComment}</span></div>`).join('')}
${props.map(e => `<div flex><b class="fill sherk">${e.field}</b><span class="mar-l8 w160 nowrap-text">${e.fieldName||"-"}</span></div>`).join('')}
</div>`;
rootEl.setAttribute('class', "pad-8")
rootEl.style.boxSizing = 'border-box'
@@ -58,7 +58,7 @@ class DataModel extends HtmlNodeModel {
anchors.push({
x: x - width / 2 + 6,
y: y - height / 2 + 58 + index * 20,
id: `${id}@${field.columnName}`,
id: `${id}@${field.field}`,
edgeAddable: false,
type: "left"
});
@@ -90,7 +90,7 @@ class MainModel extends DataModel {
anchors.push({
x: x + width / 2 - 6,
y: y - height / 2 + 58 + index * 20,
id: `${id}@${field.columnName}`,
id: `${id}@${field.field}`,
type: "right",
field
});