feat(imgConfig): 优化图片存储结构
新增uuid依赖用于生成唯一ID,改进图片上传功能中的本地存储结构, 使用uuid替代时间戳作为键名以避免冲突,并调整从indexedDB读取数据的方式。
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<script setup lang='ts'>
|
||||
import localforage from 'localforage'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { onMounted, ref, watch } from 'vue'
|
||||
import { ColorPicker } from 'vue3-colorpicker'
|
||||
@@ -8,6 +9,7 @@ import { daisyuiThemes } from '@/constant/theme'
|
||||
import i18n, { languageList } from '@/locales/i18n'
|
||||
import useStore from '@/store'
|
||||
import { themeChange } from '@/utils'
|
||||
import { clearAllDbStore } from '@/utils/localforage'
|
||||
import PatternSetting from './components/PatternSetting.vue'
|
||||
import 'vue3-colorpicker/style.css'
|
||||
|
||||
@@ -94,18 +96,12 @@ function resetData() {
|
||||
globalConfig.reset()
|
||||
personConfig.reset()
|
||||
prizeConfig.resetDefault()
|
||||
// 删除所有indexDb
|
||||
clearAllDbStore()
|
||||
// 刷新页面
|
||||
window.location.reload()
|
||||
}
|
||||
|
||||
// const handleChangeShowFields = (fieldItem: any) => {
|
||||
// formData.value.showField.map((item) => {
|
||||
// if (item.label === fieldItem.label) {
|
||||
// item.value = !item.value
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
|
||||
watch(() => formData.value.rowCount, () => {
|
||||
payload.rowCount = formData.value.rowCount
|
||||
parseSchema(payload).then((res) => {
|
||||
|
||||
Reference in New Issue
Block a user