Open AtahanAltiparmak opened 1 year ago
As I see the package is written in Vue2. So actually you have to use the options-api. Probably you even have to install @vue/compat for Vue3 compatibility.
If you trust me, you can use my fork which supports Vue 3 at @marcusball/flatfile-button-vue, or clone it yourself.
The main note for that is that is I updated it to use events instead of props, so the syntax for the button would be:
<flatfile-button
:token="flatfileToken"
@init="onFlatfileInit"
@launch="onFlatfileLaunch"
@complete="onFlatfileComplete"
@error="onFlatfileError"
@close="onFlatfileClose"
>
Upload to Flatfile!
</flatfile-button>
async function onFlatfileComplete(payload) {
const data = await payload.data();
console.log('Flatfile upload complete', data);
}
Hi,
When I use FlatfileButton in my Vue3 project, the error occurred like below, and the page not rendered as well.
You wrote usages of Options api. Is @flatfile/vuejs package not applicable for Vue3 with CompositionApi? @MarkPieszak