fix: 上次遗漏的修复 #e463b2cd
This commit is contained in:
parent
d907d30686
commit
78310dcd05
@ -22,7 +22,7 @@ const userPhotosList: ConfigType[] = getLocalStorage(StoreKey) || []
|
|||||||
const uploadFile = (callback: Function | null = null) => {
|
const uploadFile = (callback: Function | null = null) => {
|
||||||
const input = document.createElement('input')
|
const input = document.createElement('input')
|
||||||
input.type = 'file'
|
input.type = 'file'
|
||||||
input.accept = 'image/*' // 这里只允许图片类型
|
input.accept = '.png,.jpg,.jpeg,.gif' // 这里只允许部分图片类型
|
||||||
input.onchange = async () => {
|
input.onchange = async () => {
|
||||||
if (!input.files || !input.files.length) return
|
if (!input.files || !input.files.length) return
|
||||||
const file = input.files[0]
|
const file = input.files[0]
|
||||||
@ -53,7 +53,7 @@ const addConfig = {
|
|||||||
chartFrame: ChartFrameEnum.STATIC,
|
chartFrame: ChartFrameEnum.STATIC,
|
||||||
title: '点击上传图片',
|
title: '点击上传图片',
|
||||||
image: 'upload.png',
|
image: 'upload.png',
|
||||||
redirectComponent: 'Informations/Mores/Image', // 跳转组件路径规则:packageName/categoryName/componentKey
|
redirectComponent: `${ImageConfig.package}/${ImageConfig.category}/${ImageConfig.key}`, // 跳转组件路径规则:packageName/categoryName/componentKey
|
||||||
disabled: true,
|
disabled: true,
|
||||||
configEvents: {
|
configEvents: {
|
||||||
// 点击上传事件
|
// 点击上传事件
|
||||||
|
Loading…
x
Reference in New Issue
Block a user