mirror of
https://gitee.com/dromara/go-view.git
synced 2026-05-30 00:00:05 +08:00
feat: 合并 dev 分支功能
This commit is contained in:
+7
-3
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<n-modal class="go-chart-data-pond-control" v-model:show="modelShow" :mask-closable="false">
|
||||
<n-modal class="go-chart-data-pond-control" v-model:show="modelShowRef" :mask-closable="false">
|
||||
<n-card :bordered="false" role="dialog" size="small" aria-modal="true" style="width: 900px; height: 650px">
|
||||
<template #header></template>
|
||||
<template #header-extra> </template>
|
||||
@@ -37,7 +37,6 @@
|
||||
|
||||
<!-- 请求配置model -->
|
||||
<pond-data-request
|
||||
v-if="requestShow"
|
||||
v-model:modelShow="requestShow"
|
||||
:targetDataRequest="editData"
|
||||
:isEdit="isEdit"
|
||||
@@ -59,7 +58,7 @@ import { icon } from '@/plugins'
|
||||
import { getUUID, goDialog } from '@/utils'
|
||||
import { cloneDeep } from 'lodash'
|
||||
|
||||
defineProps({
|
||||
const props = defineProps({
|
||||
modelShow: Boolean
|
||||
})
|
||||
|
||||
@@ -68,6 +67,7 @@ const { PencilIcon } = icon.ionicons5
|
||||
const { chartEditStore, targetData } = useTargetData()
|
||||
const { requestDataPond } = toRefs(chartEditStore.getRequestGlobalConfig)
|
||||
const requestShow = ref(false)
|
||||
const modelShowRef = ref(false)
|
||||
const loading = ref(false)
|
||||
const isEdit = ref(false)
|
||||
const editData = ref<RequestDataPondItemType>()
|
||||
@@ -82,6 +82,10 @@ const pondData = computed(() => {
|
||||
return data[0]
|
||||
})
|
||||
|
||||
watch(() => props.modelShow, (newValue) => {
|
||||
modelShowRef.value = newValue
|
||||
})
|
||||
|
||||
watch(
|
||||
() => pondData.value,
|
||||
newValue => {
|
||||
|
||||
+13
-2
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<n-modal class="go-chart-data-request" v-model:show="modelShow" :mask-closable="false" :closeOnEsc="false">
|
||||
<n-modal class="go-chart-data-request" v-model:show="modelShowRef" :mask-closable="false" :closeOnEsc="false">
|
||||
<n-card :bordered="false" role="dialog" size="small" aria-modal="true" style="width: 1000px; height: 800px">
|
||||
<template #header></template>
|
||||
<template #header-extra> </template>
|
||||
@@ -29,7 +29,7 @@
|
||||
</template>
|
||||
|
||||
<script script lang="ts" setup>
|
||||
import { toRefs, PropType } from 'vue'
|
||||
import { ref, toRefs, PropType, watch } from 'vue'
|
||||
import { RequestContentTypeEnum } from '@/enums/httpEnum'
|
||||
import { useTargetData } from '../../../hooks/useTargetData.hook'
|
||||
import { RequestGlobalConfig } from './components/RequestGlobalConfig'
|
||||
@@ -50,11 +50,22 @@ const { dataSyncUpdate } = useSync()
|
||||
// 解构基础配置
|
||||
const { chartConfig } = toRefs(props.targetData as CreateComponentType)
|
||||
const { requestContentType } = toRefs((props.targetData as CreateComponentType).request)
|
||||
const modelShowRef = ref(false)
|
||||
const requestContentTypeObj = {
|
||||
[RequestContentTypeEnum.DEFAULT]: '普通请求',
|
||||
[RequestContentTypeEnum.SQL]: 'SQL 请求'
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.modelShow,
|
||||
newValue => {
|
||||
modelShowRef.value = newValue
|
||||
},
|
||||
{
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
|
||||
const closeHandle = () => {
|
||||
emit('update:modelShow', false)
|
||||
}
|
||||
|
||||
+8
-2
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<n-modal class="go-chart-data-request" v-model:show="modelShow" :mask-closable="false" :closeOnEsc="false">
|
||||
<n-modal class="go-chart-data-request" v-model:show="modelShowRef" :mask-closable="false" :closeOnEsc="false">
|
||||
<n-card :bordered="false" role="dialog" size="small" aria-modal="true" style="width: 1000px; height: 800px">
|
||||
<template #header></template>
|
||||
<template #header-extra> </template>
|
||||
@@ -42,7 +42,7 @@
|
||||
</template>
|
||||
|
||||
<script script lang="ts" setup>
|
||||
import { PropType, ref, watchEffect } from 'vue'
|
||||
import { PropType, ref, watch } from 'vue'
|
||||
import { RequestContentTypeEnum } from '@/enums/httpEnum'
|
||||
import { useTargetData } from '../../../hooks/useTargetData.hook'
|
||||
import { RequestGlobalConfig } from './components/RequestGlobalConfig'
|
||||
@@ -60,6 +60,12 @@ const emit = defineEmits(['update:modelShow', 'editSaveHandle'])
|
||||
const { dataSyncUpdate } = useSync()
|
||||
const pondName = ref()
|
||||
const inputInstRef = ref()
|
||||
const modelShowRef = ref(false)
|
||||
|
||||
watch(() => props.modelShow, (newValue) => {
|
||||
modelShowRef.value = newValue
|
||||
})
|
||||
|
||||
|
||||
const closeHandle = () => {
|
||||
emit('update:modelShow', false)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<n-modal v-model:show="modelShow" :mask-closable="true" @afterLeave="closeHandle">
|
||||
<n-modal v-model:show="modelShowRef" :mask-closable="true" @afterLeave="closeHandle">
|
||||
<n-table class="model-content" :bordered="false" :single-line="false">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -31,17 +31,24 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { watch, ref } from 'vue'
|
||||
import { icon } from '@/plugins'
|
||||
import { WinKeyboard, MacKeyboard } from '@/enums/editPageEnum'
|
||||
|
||||
const { CloseIcon } = icon.ionicons5
|
||||
const modelShowRef = ref(false)
|
||||
|
||||
const emit = defineEmits(['update:modelShow'])
|
||||
|
||||
defineProps({
|
||||
const props = defineProps({
|
||||
modelShow: Boolean
|
||||
})
|
||||
|
||||
|
||||
watch(() => props.modelShow, (newValue) => {
|
||||
modelShowRef.value = newValue
|
||||
})
|
||||
|
||||
// 快捷键
|
||||
const shortcutKeyOptions = [
|
||||
{
|
||||
@@ -126,6 +133,7 @@ const shortcutKeyOptions = [
|
||||
mac: `${MacKeyboard.CTRL.toUpperCase()} + ${WinKeyboard.SHIFT.toUpperCase()} + G `
|
||||
}
|
||||
]
|
||||
|
||||
const closeHandle = () => {
|
||||
emit('update:modelShow', false)
|
||||
}
|
||||
|
||||
@@ -87,6 +87,7 @@ import { renderIcon, renderLang, requireErrorImg } from '@/utils'
|
||||
import { icon } from '@/plugins'
|
||||
import { MacOsControlBtn } from '@/components/Tips/MacOsControlBtn'
|
||||
import { Chartype } from '../../index.d'
|
||||
import { log } from 'console'
|
||||
const {
|
||||
EllipsisHorizontalCircleSharpIcon,
|
||||
CopyIcon,
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<!-- model -->
|
||||
<project-items-modal-card
|
||||
v-if="modalData"
|
||||
v-model:modalShow="modalShow"
|
||||
:modalShow="modalShow"
|
||||
:cardData="modalData"
|
||||
@close="closeModal"
|
||||
@edit="editHandle"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<!-- mask-closable 暂时是失效的,不知道为啥 -->
|
||||
<n-modal
|
||||
class="go-modal-box"
|
||||
v-model:show="modalShow"
|
||||
v-model:show="showRef"
|
||||
@afterLeave="closeHandle"
|
||||
>
|
||||
<n-card hoverable size="small">
|
||||
@@ -73,21 +73,42 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { reactive, PropType } from 'vue'
|
||||
import { ref, reactive, PropType, watch } from 'vue'
|
||||
import { renderIcon, renderLang } from '@/utils'
|
||||
import { icon } from '@/plugins'
|
||||
import { MacOsControlBtn } from '@/components/Tips/MacOsControlBtn'
|
||||
import { Chartype } from '../../index.d'
|
||||
|
||||
const { HammerIcon } = icon.ionicons5
|
||||
|
||||
const showRef = ref(false)
|
||||
const emit = defineEmits(['close', 'edit'])
|
||||
|
||||
const props = defineProps({
|
||||
modalShow: Boolean,
|
||||
cardData: Object as PropType<Chartype>
|
||||
modalShow: {
|
||||
required: true,
|
||||
type: Boolean
|
||||
},
|
||||
cardData: {
|
||||
required: true,
|
||||
type: Object
|
||||
}
|
||||
})
|
||||
|
||||
watch(
|
||||
() => props.modalShow,
|
||||
newValue => {
|
||||
showRef.value = newValue
|
||||
},
|
||||
{
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
|
||||
// 处理url获取
|
||||
const requireUrl = (name: string) => {
|
||||
return new URL(`../../../../../assets/images/${name}`, import.meta.url).href
|
||||
}
|
||||
|
||||
const fnBtnList = reactive([
|
||||
{
|
||||
label: renderLang('global.r_edit'),
|
||||
|
||||
+10
-12
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<n-modal v-model:show="show" class="go-create-modal">
|
||||
<n-modal v-model:show="showRef" class="go-create-modal" @afterLeave="closeHandle">
|
||||
<n-space size="large">
|
||||
<n-card class="card-box" hoverable>
|
||||
<template #header>
|
||||
@@ -35,7 +35,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { watch } from 'vue'
|
||||
import { ref, watch, shallowRef } from 'vue'
|
||||
import { icon } from '@/plugins'
|
||||
import { PageEnum, ChartEnum } from '@/enums/pageEnum'
|
||||
import { ResultEnum } from '@/enums/httpEnum'
|
||||
@@ -44,13 +44,14 @@ import { createProjectApi } from '@/api/path'
|
||||
|
||||
const { FishIcon, CloseIcon } = icon.ionicons5
|
||||
const { StoreIcon, ObjectStorageIcon } = icon.carbon
|
||||
const $t = window['$t']
|
||||
const showRef = ref(false)
|
||||
|
||||
const emit = defineEmits(['close'])
|
||||
const props = defineProps({
|
||||
show: Boolean
|
||||
})
|
||||
|
||||
const typeList = [
|
||||
const typeList = shallowRef([
|
||||
{
|
||||
title: renderLang('project.new_project'),
|
||||
key: ChartEnum.CHART_HOME_NAME,
|
||||
@@ -69,13 +70,10 @@ const typeList = [
|
||||
icon: StoreIcon,
|
||||
disabled: true
|
||||
}
|
||||
]
|
||||
])
|
||||
|
||||
// 解决点击模态层不会触发 @on-after-leave 的问题
|
||||
watch(props, newValue => {
|
||||
if (!newValue.show) {
|
||||
closeHandle()
|
||||
}
|
||||
watch(() => props.show, newValue => {
|
||||
showRef.value = newValue
|
||||
})
|
||||
|
||||
// 关闭对话框
|
||||
@@ -115,7 +113,7 @@ const btnHandle = async (key: string) => {
|
||||
<style lang="scss" scoped>
|
||||
$cardWidth: 570px;
|
||||
|
||||
@include go("create-modal") {
|
||||
@include go('create-modal') {
|
||||
position: fixed;
|
||||
top: 200px;
|
||||
left: 50%;
|
||||
@@ -126,7 +124,7 @@ $cardWidth: 570px;
|
||||
border: 1px solid rgba(0, 0, 0, 0);
|
||||
@extend .go-transition;
|
||||
&:hover {
|
||||
@include hover-border-color("hover-border-color");
|
||||
@include hover-border-color('hover-border-color');
|
||||
}
|
||||
&-tite {
|
||||
font-size: 14px;
|
||||
|
||||
Reference in New Issue
Block a user