Fix: Mk:C:mfm
のonClickEv
が正常に呼び出されない問題を修正 (#12831)
* fix clickable api * Update CHANGELOG.md * revert CHANGELOG.md * Update CHANGELOG.md
This commit is contained in:
parent
00e195f50b
commit
622a09f8ed
|
@ -218,7 +218,7 @@ function getTextOptions(def: values.Value | undefined): Omit<AsUiText, 'id' | 't
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function getMfmOptions(def: values.Value | undefined): Omit<AsUiMfm, 'id' | 'type'> {
|
function getMfmOptions(def: values.Value | undefined, call: (fn: values.VFn, args: values.Value[]) => Promise<values.Value>): Omit<AsUiMfm, 'id' | 'type'> {
|
||||||
utils.assertObject(def);
|
utils.assertObject(def);
|
||||||
|
|
||||||
const text = def.value.get('text');
|
const text = def.value.get('text');
|
||||||
|
@ -241,7 +241,7 @@ function getMfmOptions(def: values.Value | undefined): Omit<AsUiMfm, 'id' | 'typ
|
||||||
color: color?.value,
|
color: color?.value,
|
||||||
font: font?.value,
|
font: font?.value,
|
||||||
onClickEv: (evId: string) => {
|
onClickEv: (evId: string) => {
|
||||||
if (onClickEv) call(onClickEv, values.STR(evId));
|
if (onClickEv) call(onClickEv, [values.STR(evId)]);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue