| 
						
						
						
					 | 
					 | 
					@ -1,9 +1,10 @@ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					<script lang="ts" setup> | 
					 | 
					 | 
					 | 
					<script lang="ts" setup> | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import { computed } from 'vue' | 
					 | 
					 | 
					 | 
					import { computed, reactive } from 'vue' | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import { Upload } from 'ant-design-vue' | 
					 | 
					 | 
					 | 
					import { Upload } from 'ant-design-vue' | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import { useDesign } from '@/hooks/web/useDesign' | 
					 | 
					 | 
					 | 
					import { useDesign } from '@/hooks/web/useDesign' | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import { useGlobSetting } from '@/hooks/setting' | 
					 | 
					 | 
					 | 
					import { useGlobSetting } from '@/hooks/setting' | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import { useI18n } from '@/hooks/web/useI18n' | 
					 | 
					 | 
					 | 
					import { useI18n } from '@/hooks/web/useI18n' | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					import { getAccessToken, getTenantId } from '@/utils/auth' | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					defineOptions({ name: 'TinymceImageUpload' }) | 
					 | 
					 | 
					 | 
					defineOptions({ name: 'TinymceImageUpload' }) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -17,6 +18,10 @@ const props = defineProps({ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  }, | 
					 | 
					 | 
					 | 
					  }, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}) | 
					 | 
					 | 
					 | 
					}) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					const emit = defineEmits(['uploading', 'done', 'error']) | 
					 | 
					 | 
					 | 
					const emit = defineEmits(['uploading', 'done', 'error']) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					const headers = reactive({ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  'Authorization': `Bearer ${getAccessToken()}`, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  'tenant-id': getTenantId(), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					}) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					let uploading = false | 
					 | 
					 | 
					 | 
					let uploading = false | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					const { uploadUrl } = useGlobSetting() | 
					 | 
					 | 
					 | 
					const { uploadUrl } = useGlobSetting() | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -55,7 +60,7 @@ function handleChange(info: Recordable) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					<template> | 
					 | 
					 | 
					 | 
					<template> | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  <div :class="[prefixCls, { fullscreen }]"> | 
					 | 
					 | 
					 | 
					  <div :class="[prefixCls, { fullscreen }]"> | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    <Upload name="file" multiple :action="uploadUrl" :show-upload-list="false" accept=".jpg,.jpeg,.gif,.png,.webp" @change="handleChange"> | 
					 | 
					 | 
					 | 
					    <Upload name="file" :headers="headers" multiple :action="uploadUrl" :show-upload-list="false" accept=".jpg,.jpeg,.gif,.png,.webp" @change="handleChange"> | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      <a-button type="primary" v-bind="{ ...getButtonProps }"> | 
					 | 
					 | 
					 | 
					      <a-button type="primary" v-bind="{ ...getButtonProps }"> | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        {{ t('component.upload.imgUpload') }} | 
					 | 
					 | 
					 | 
					        {{ t('component.upload.imgUpload') }} | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      </a-button> | 
					 | 
					 | 
					 | 
					      </a-button> | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |