mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
## Summary we need to add root div to avoid warning > Extraneous non-props attributes (data-v-inspector) were passed to > component but could not be automatically inherited because component renders fragment or text or teleport root > nodes. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6650-fix-warning-log-2a86d73d365081a89c5af0c60cdaa618) by [Unito](https://www.unito.io)
43 lines
810 B
Vue
43 lines
810 B
Vue
<template>
|
|
<div class="space-y-4">
|
|
<Select
|
|
v-model="exportFormat"
|
|
:options="exportFormats"
|
|
option-label="label"
|
|
option-value="value"
|
|
>
|
|
</Select>
|
|
|
|
<Button
|
|
severity="secondary"
|
|
text
|
|
rounded
|
|
@click="exportModel(exportFormat)"
|
|
>
|
|
{{ $t('load3d.export') }}
|
|
</Button>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import Button from 'primevue/button'
|
|
import Select from 'primevue/select'
|
|
import { ref } from 'vue'
|
|
|
|
const emit = defineEmits<{
|
|
(e: 'exportModel', format: string): void
|
|
}>()
|
|
|
|
const exportFormats = [
|
|
{ label: 'GLB', value: 'glb' },
|
|
{ label: 'OBJ', value: 'obj' },
|
|
{ label: 'STL', value: 'stl' }
|
|
]
|
|
|
|
const exportFormat = ref('obj')
|
|
|
|
const exportModel = (format: string) => {
|
|
emit('exportModel', format)
|
|
}
|
|
</script>
|