아래는 제 초기화 코드입니다:
export default {
name: 'customInit',
initialize() {
withPluginApi('0.8.7', api => {
api.attachWidgetAction('post', 'showCustomModal', () => {
const modal = showModal('customModal');
});
api.addPostMenuButton('customBtn', (attrs) => {
return {
data: {
"post-id": attrs.id,
"user": attrs.username
},
action: 'showCustomModal',
icon: 'hand-holding-usd',
className: 'custom-btn',
title: 'custom_icon_anchor',
position: 'first'
};
});
});
}
};
모달은 올바르게 표시되지만, 어떤 커스텀 게시물 메뉴 버튼이 클릭되었는지에 따라 post-id와 user를 어떻게 전달할 수 있는지 궁금합니다. GitHub에서 몇 시간째 검색해 보고 있지만, 이 값들을 커스텀 모달 컨트롤러로 전달하는 방법을 여전히 이해하지 못하고 있습니다.