fix accepts

This commit is contained in:
2023-07-27 15:50:46 +10:00
parent d60efe38e2
commit f77b5f7556
2 changed files with 7 additions and 5 deletions

View File

@@ -93,9 +93,9 @@ const props = defineProps({
default: false,
required: false,
},
accept: {
accepts: {
type: String,
default: "",
default: "image/*",
required: false,
},
options: {
@@ -305,6 +305,7 @@ const handleChange = (event) => {
const handleMediaSelect = async () => {
let result = await openDialog(SMDialogMedia, {
allowUpload: props.allowUpload,
accepts: props.accepts,
});
if (result) {
const mediaResult = result as Media;

View File

@@ -18,10 +18,11 @@
:src="imageUrl" />
<SMImageStack v-else class="mb-8" :src="imageStackUrls" />
</div>
<SMInputFile
<SMSelectImage
v-if="!editMultiple"
control="file"
type="file"
allow-upload
accepts="*"
class="mb-8" />
<SMInput control="title" class="mb-8" />
<SMInput control="permission" class="mb-8" />
@@ -94,7 +95,7 @@ import { useToastStore } from "../../store/ToastStore";
import SMImage from "../../components/SMImage.vue";
import SMImageStack from "../../components/SMImageStack.vue";
import SMPageStatus from "../../components/SMPageStatus.vue";
import SMInputFile from "../../components/SMInputFile.vue";
import SMSelectImage from "../../components/SMSelectImage.vue";
import { userHasPermission } from "../../helpers/utils";
const route = useRoute();