diff --git a/src/components/lowCode/assistant/lowcodeImage.vue b/src/components/lowCode/assistant/lowcodeImage.vue
index eb2ff71..fef8ced 100644
--- a/src/components/lowCode/assistant/lowcodeImage.vue
+++ b/src/components/lowCode/assistant/lowcodeImage.vue
@@ -8,6 +8,10 @@ import { AnalysisCss,AnalysisInputCss } from '@/api/common/cssInfo'
import { uploadUrl } from '@/api/lowCode/form/fieldUnit'
import { uploadFiledTinymce } from '@/api/common/public'
import errimg from '@/assets/image/404_images/imgNotFound.png'
+import { ref,useAttrs,computed } from 'vue'
+import { Plus } from '@element-plus/icons-vue'
+
+import type { UploadProps, UploadUserFile } from 'element-plus'
const props = withDefaults(
defineProps<{
@@ -100,9 +104,93 @@ const getFormItemInputStyle = (ele: any,sty:number) => {
return AnalysisInputCss(ele?.inputStyle,sty)
}
}
+
+
+const fileUpload = ref(null);
+// 添加capture="camera"属性
+ const addCaptureAttribute = () => {
+ if (fileUpload.value) {
+ const input = fileUpload.value.$el.querySelector('input[type="file"]');
+ if (input) {
+ input.setAttribute('capture', 'camera');
+ input.setAttribute('accept', 'image/*');
+ }
+ }
+ };
+function selectFile(){
+
+ addCaptureAttribute()
+ fileUpload.value.$el.querySelector('input[type="file"]').click();
+}
+
+
+const handlePictureCardPreview: UploadProps['onPreview'] = (uploadFile) => {
+ dialogImageUrl.value = uploadFile.url!
+ dialogVisible.value = true
+}
+const dialogImageUrl = ref('')
+const dialogVisible = ref(false)
+
+const valueArr = computed(()=>{
+ return value.value.split(',');
+})
+
+
+const handleRemove: UploadProps['onRemove'] = (uploadFile, uploadFiles) => {
+ console.log(uploadFile, uploadFiles)
+
+ let arrStr = ''
+ uploadFiles.forEach((element) => {
+ //console.log(element.response.data.url)
+ arrStr+= element.response.data.url+","
+ });
+
+ arrStr = arrStr.slice(0, -1);
+
+ console.log(arrStr)
+
+
+ emits("update:modelValue", arrStr);
+}
+
+
+//上传成功回调
+const handleAvatarSuccess1 = (response: any, uploadFile: any) => {
+ // imageUrl.value = URL.createObjectURL(uploadFile.raw!)
+ // console.log("上传成功回调", value);
+ /* console.log(response.data.url)
+ console.log(uploadFile) */
+
+ let arrStr = ''
+ props.data.control.uploadedImgs.forEach((element: { url: any; }) => {
+ //console.log(element.response.data.url)
+ arrStr+= element.response.data.url+","
+ });
+
+ arrStr = arrStr.slice(0, -1);
+
+ console.log(arrStr)
+
+
+ emits("update:modelValue", arrStr);
+ /*imgPath.value = response.data.url;
+ value.value = response.data.url; */
+ imgLoading.value = false;
+};
+
+const attrs = useAttrs()
+
+
+
-
+
-
-
+
+
+ -->
+
+
+
+
+
+
+
+
+
+ 默认选择按钮
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
\ No newline at end of file