chore: ad release label

This commit is contained in:
Bereket Engida
2024-09-27 13:36:20 +03:00
parent d49330e8a1
commit afd51708be
341 changed files with 4644 additions and 3805 deletions

View File

@@ -1,29 +1,35 @@
<script setup lang="ts">
import { ref } from 'vue'
import { TrashIcon } from '@radix-icons/vue'
import { beautifyObjectName } from './utils'
import type { FieldProps } from './interface'
import AutoFormLabel from './AutoFormLabel.vue'
import { FormControl, FormDescription, FormField, FormItem, FormMessage } from '@/components/ui/form'
import { Input } from '@/components/ui/input'
import { Button } from '@/components/ui/button'
import { ref } from "vue";
import { TrashIcon } from "@radix-icons/vue";
import { beautifyObjectName } from "./utils";
import type { FieldProps } from "./interface";
import AutoFormLabel from "./AutoFormLabel.vue";
import {
FormControl,
FormDescription,
FormField,
FormItem,
FormMessage,
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import { Button } from "@/components/ui/button";
defineProps<FieldProps>()
defineProps<FieldProps>();
const inputFile = ref<File>()
const inputFile = ref<File>();
async function parseFileAsString(file: File | undefined): Promise<string> {
return new Promise((resolve, reject) => {
if (file) {
const reader = new FileReader()
reader.onloadend = () => {
resolve(reader.result as string)
}
reader.onerror = (err) => {
reject(err)
}
reader.readAsDataURL(file)
}
})
return new Promise((resolve, reject) => {
if (file) {
const reader = new FileReader();
reader.onloadend = () => {
resolve(reader.result as string);
};
reader.onerror = (err) => {
reject(err);
};
reader.readAsDataURL(file);
}
});
}
</script>