Replies: 1 comment
-
你可以在初始渲染后抛出一个事件,获取html内容高度(它们只是被overflow:hide了,高度只要不是百分比的话就还是正常的)后通知lf改变model的高度 class newview extends Core.HtmlNode {
constructor(props) {
super(props)
this.isMounted = false
this.r = h(z_flowBlock, {
properties: props.model.getProperties(),
text: props.model.inputData,
addnewinput: (newProperties) => {
if (newProperties == 'groupNew') {
props.model.height += 25;
} else {
props.model.height = getBlockStyle(newProperties.block).height;
props.model.properties = newProperties;
}
},
changeBlockType: (type) => {
this.base.getElementsByClassName("z_flowBlock_box")[0].className = "z_flowBlock_box z_FBType_" + type;
}
})
this.app = createApp({
render: () => this.r
})
}
setHtml(rootEl) {
if (!this.isMounted) {
this.isMounted = true
const node = document.createElement('div');
node.className = "z_flowBlock_box z_FBType_" + JSON.parse(this.preProperties).block.type;
rootEl.appendChild(node)
this.app.mount(node)
} else {
this.r.component.props.properties = this.props.model.getProperties()
}
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
如题
Beta Was this translation helpful? Give feedback.
All reactions