mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 05:22:13 +08:00
style: 调整创建仪表板、发布等提示菜单样式
This commit is contained in:
@@ -41,6 +41,7 @@ import { getPanelAllLinkageInfo, saveLinkage } from '@/api/visualization/linkage
|
||||
import { queryVisualizationJumpInfo } from '@/api/visualization/linkJump'
|
||||
import {
|
||||
canvasSave,
|
||||
canvasSaveWithParams,
|
||||
checkCanvasChangePre,
|
||||
findAllViewsId,
|
||||
initCanvasData
|
||||
@@ -259,7 +260,7 @@ const saveResource = (checkParams?) => {
|
||||
useEmitt().emitter.emit(`updateQueryCriteria${ele.id}`)
|
||||
})
|
||||
try {
|
||||
canvasSave(() => {
|
||||
canvasSaveWithParams(checkParams, () => {
|
||||
snapshotStore.resetStyleChangeTimes()
|
||||
let url = window.location.href
|
||||
url = url.replace(/(#\/[^?]*)(?:\?[^#]*)?/, `$1?resourceId=${dvInfo.value.id}`)
|
||||
|
||||
@@ -30,6 +30,7 @@ import CommonGroup from '@/custom-component/component-group/CommonGroup.vue'
|
||||
import DeResourceGroupOpt from '@/views/common/DeResourceGroupOpt.vue'
|
||||
import {
|
||||
canvasSave,
|
||||
canvasSaveWithParams,
|
||||
checkCanvasChangePre,
|
||||
cleanUrlAndSetDvId,
|
||||
findAllViewsId,
|
||||
@@ -179,7 +180,7 @@ const saveResource = (checkParams?) => {
|
||||
if (styleChangeTimes.value > 0 || checkParams.withPublish) {
|
||||
eventBus.emit('hideArea-canvas-main')
|
||||
nextTick(() => {
|
||||
canvasSave(() => {
|
||||
canvasSaveWithParams(checkParams, () => {
|
||||
snapshotStore.resetStyleChangeTimes()
|
||||
wsCache.delete('DE-DV-CATCH-' + dvInfo.value.id)
|
||||
let url = window.location.href
|
||||
@@ -498,7 +499,7 @@ const fullScreenPreview = () => {
|
||||
</el-button>
|
||||
<el-dropdown
|
||||
:disabled="dvInfo.status === 0"
|
||||
popper-class="menu-outer-dv_popper"
|
||||
popper-class="menu-outer-dv_popper-toolbar"
|
||||
trigger="hover"
|
||||
>
|
||||
<el-button
|
||||
@@ -698,7 +699,7 @@ const fullScreenPreview = () => {
|
||||
</style>
|
||||
|
||||
<style lang="less">
|
||||
.menu-outer-dv_popper {
|
||||
.menu-outer-dv_popper-toolbar {
|
||||
border: 1px solid rgba(67, 67, 67, 1) !important;
|
||||
background-color: rgba(41, 41, 41, 1) !important;
|
||||
.ed-dropdown-menu {
|
||||
|
||||
@@ -568,6 +568,10 @@ export function checkCanvasChangePre(callBack) {
|
||||
}
|
||||
|
||||
export async function canvasSave(callBack) {
|
||||
await canvasSaveWithParams(null, callBack)
|
||||
}
|
||||
|
||||
export async function canvasSaveWithParams(params, callBack) {
|
||||
dvMainStore.removeGroupArea()
|
||||
const componentDataToSave = cloneDeep(componentData.value)
|
||||
componentDataToSave.forEach(item => {
|
||||
@@ -624,8 +628,9 @@ export async function canvasSave(callBack) {
|
||||
}
|
||||
method(canvasInfo).then(res => {
|
||||
if (method === updateCanvas) {
|
||||
// saveCanvas 为初次保存 状态为0 updateCanvas为二次保存状态为2
|
||||
dvMainStore.updateDvInfoCall(res.data?.status, null, newContentId)
|
||||
// saveCanvas 为初次保存 状态为0 updateCanvas为二次保存状态为2 当存在传入状态时,则修改对应的传入状态
|
||||
const status = params?.status ? params?.status : res.data?.status
|
||||
dvMainStore.updateDvInfoCall(status, null, newContentId)
|
||||
} else {
|
||||
dvMainStore.updateDvInfoCall(0, res.data, newContentId)
|
||||
}
|
||||
|
||||
@@ -687,7 +687,7 @@ defineExpose({
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
|
||||
<el-tooltip :content="newResourceLabel" placement="top">
|
||||
<el-tooltip :content="newResourceLabel" placement="top" effect="dark">
|
||||
<el-dropdown popper-class="menu-outer-dv_popper" trigger="hover">
|
||||
<el-icon class="custom-icon btn" @click="addOperation('newLeaf', null, 'leaf', true)">
|
||||
<Icon name="icon_file-add_outlined"
|
||||
|
||||
Reference in New Issue
Block a user