public: 发布2.8.0版本 (#1998)
* feat:修改token获取优先级,优先从header获取 * feat: 增加业务ctx的传递 * fix文件选择问题, 有公共函数onDownloadFile,去掉downloadFile * 没问题 * feat: 增加context引入 * fix: 修复图片多选的情况下点击确定抽屉无法收起的bug * feat: 提高header的token优先级,优化导出表格逻辑,不再依赖于cookie鉴权 --------- Co-authored-by: piexlMax(奇淼 <qimiaojiangjizhao@gmail.com> Co-authored-by: task <121913992@qq.com>
This commit is contained in:
co-authored by
piexlMax(奇淼
task
parent
f776a061ce
commit
ab75bc7f59
@@ -84,6 +84,7 @@ import 'vue-cropper/dist/index.css'
|
||||
import { VueCropper } from 'vue-cropper'
|
||||
import { getBaseUrl } from '@/utils/format'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useUserStore } from "@/pinia";
|
||||
|
||||
defineOptions({
|
||||
name: 'scanUpload'
|
||||
|
||||
@@ -657,7 +657,7 @@
|
||||
<el-table-column
|
||||
align="left"
|
||||
prop="dataTypeLong"
|
||||
label="数据库字段长度"
|
||||
label="字段长度/枚举值"
|
||||
width="160"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
@@ -741,6 +741,7 @@
|
||||
class="flex items-center"
|
||||
:before-upload="importJson"
|
||||
:show-file-list="false"
|
||||
:headers="{'x-token': token}"
|
||||
accept=".json"
|
||||
>
|
||||
<el-button type="primary" class="mx-2" :disabled="isAdd"
|
||||
@@ -828,6 +829,11 @@
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import WarningBar from '@/components/warningBar/warningBar.vue'
|
||||
import Sortable from 'sortablejs'
|
||||
import { useUserStore } from "@/pinia";
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
const token = userStore.token
|
||||
|
||||
const handleFocus = () => {
|
||||
document.addEventListener('keydown', handleKeydown);
|
||||
@@ -931,7 +937,6 @@
|
||||
if (res.code === 0) {
|
||||
form.value.fields = []
|
||||
const json = JSON.parse(res.data)
|
||||
|
||||
json.fields?.forEach((item) => {
|
||||
item.fieldName = toUpperCase(item.fieldName)
|
||||
})
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
:show-file-list="false"
|
||||
:on-success="handleSuccess"
|
||||
:on-error="handleSuccess"
|
||||
:headers="{'x-token': token}"
|
||||
name="plug"
|
||||
>
|
||||
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
||||
@@ -20,6 +21,11 @@
|
||||
<script setup>
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { getBaseUrl } from '@/utils/format'
|
||||
import { useUserStore } from "@/pinia";
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
const token = userStore.token
|
||||
|
||||
const handleSuccess = (res) => {
|
||||
if (res.code === 0) {
|
||||
|
||||
Reference in New Issue
Block a user