From 78310dcd050c29a714eaec8aca1f65d53f01fa7d Mon Sep 17 00:00:00 2001 From: tnt group Date: Sat, 27 May 2023 13:21:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=8A=E6=AC=A1=E9=81=97=E6=BC=8F?= =?UTF-8?q?=E7=9A=84=E4=BF=AE=E5=A4=8D=20#e463b2cd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/packages/components/Photos/Private/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/packages/components/Photos/Private/index.ts b/src/packages/components/Photos/Private/index.ts index 45740315..a975a41e 100644 --- a/src/packages/components/Photos/Private/index.ts +++ b/src/packages/components/Photos/Private/index.ts @@ -22,7 +22,7 @@ const userPhotosList: ConfigType[] = getLocalStorage(StoreKey) || [] const uploadFile = (callback: Function | null = null) => { const input = document.createElement('input') input.type = 'file' - input.accept = 'image/*' // 这里只允许图片类型 + input.accept = '.png,.jpg,.jpeg,.gif' // 这里只允许部分图片类型 input.onchange = async () => { if (!input.files || !input.files.length) return const file = input.files[0] @@ -53,7 +53,7 @@ const addConfig = { chartFrame: ChartFrameEnum.STATIC, title: '点击上传图片', image: 'upload.png', - redirectComponent: 'Informations/Mores/Image', // 跳转组件路径规则:packageName/categoryName/componentKey + redirectComponent: `${ImageConfig.package}/${ImageConfig.category}/${ImageConfig.key}`, // 跳转组件路径规则:packageName/categoryName/componentKey disabled: true, configEvents: { // 点击上传事件