refactor(editor): edgeless attacment toolbar config extension (#10710)

This commit is contained in:
fundon
2025-03-19 00:52:22 +00:00
parent 3cce147c60
commit 251d1d8782
19 changed files with 196 additions and 114 deletions
@@ -155,8 +155,7 @@ export const builtinToolbarConfig = {
if (!model) return null;
const actions = this.actions.map(action => ({ ...action }));
const toggle = (e: CustomEvent<boolean>) => {
const onToggle = (e: CustomEvent<boolean>) => {
const opened = e.detail;
if (!opened) return;
@@ -169,9 +168,9 @@ export const builtinToolbarConfig = {
return html`${keyed(
model,
html`<affine-view-dropdown-menu
@toggle=${onToggle}
.actions=${actions}
.context=${ctx}
.toggle=${toggle}
.viewType$=${signal(actions[2].label)}
></affine-view-dropdown-menu>`
)}`;