Vanthink-UED / vue-core-image-upload

a vue plugin for image to crop and upload

Home Page:http://vanthink-ued.github.io/vue-core-image-upload/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom element (button) how to disable upload input?

erik-viking opened this issue · comments

Using the following HTML:

<vue-core-image-upload
            :max-file-size="10000"
            :is-xhr="false"
            :max-height="500"
            :max-width="500"
            crop="local"
            resize="local"
            v-on="$listeners"
            @errorhandle="imageError"
            @imagechanged="imageChanged"
        >
            <p-button
                :disabled="isImageUploading"
                :loading="isImageUploading"
            >
                UPDATE
            </p-button>
        </vue-core-image-upload>

How can I disable the input element from being clicked when using custom upload method? The <p-button> element gets disabled properly, but the user can still click it to upload a different image.

Adding :disabled="isImageUploading" on vue-core-image-upload component