feat(editor): unify block props api (#10888)

Closes: [BS-2707](https://linear.app/affine-design/issue/BS-2707/统一使用props获取和更新block-prop)
This commit is contained in:
Saul-Mirone
2025-03-16 05:48:34 +00:00
parent 8f9e5bf0aa
commit 26285f7dcb
193 changed files with 1019 additions and 891 deletions
@@ -96,10 +96,10 @@ export class DataViewBlockComponent extends CaptionedBlockComponent<DataViewBloc
options: {
items: [
menu.input({
initialValue: this.model.title,
initialValue: this.model.props.title,
placeholder: 'Untitled',
onChange: text => {
this.model.title = text;
this.model.props.title = text;
},
}),
menu.action({
@@ -158,7 +158,7 @@ export class DataViewBlockComponent extends CaptionedBlockComponent<DataViewBloc
return html`
<div style="margin-bottom: 16px;display:flex;flex-direction: column">
<div style="display:flex;gap:8px;padding: 0 6px;margin-bottom: 8px;">
<div>${this.model.title}</div>
<div>${this.model.props.title}</div>
${this.renderDatabaseOps()}
</div>
<div