feat:插件支持渲染弹窗关闭按钮

This commit is contained in:
jxxghp
2024-04-17 21:20:31 +08:00
parent d097c1c17c
commit 6350c7e9e6
3 changed files with 6 additions and 4 deletions

View File

@@ -1,9 +1,9 @@
<script lang="ts" setup>
// 定义触发的自定义事件
const emit = defineEmits(['click'])
const emit = defineEmits(['click', 'update:modelValue'])
// 按钮点击
function onClick() {
emit('update:modelValue', false)
emit('click')
}
</script>

View File

@@ -482,7 +482,7 @@ watch(() => props.plugin?.has_update, (newHasUpdate, oldHasUpdate) => {
:title="`${props.plugin?.plugin_name} - 配置`"
class="rounded-t"
>
<DialogCloseBtn @click="pluginConfigDialog = false" />
<DialogCloseBtn v-model='pluginConfigDialog' />
<VCardText>
<FormRender
v-for="(item, index) in pluginFormItems"
@@ -516,7 +516,7 @@ watch(() => props.plugin?.has_update, (newHasUpdate, oldHasUpdate) => {
:title="`${props.plugin?.plugin_name}`"
class="rounded-t"
>
<DialogCloseBtn @click="pluginInfoDialog = false" />
<DialogCloseBtn v-model='pluginInfoDialog' />
<VCardText>
<PageRender
v-for="(item, index) in pluginPageItems"

View File

@@ -17,6 +17,7 @@ import '@styles/styles.scss'
import 'vue-toast-notification/dist/theme-bootstrap.css'
import { PerfectScrollbarPlugin } from 'vue3-perfect-scrollbar';
import 'vue3-perfect-scrollbar/style.css';
import DialogCloseBtn from '@/@core/components/DialogCloseBtn.vue'
loadFonts()
@@ -26,6 +27,7 @@ const app = createApp(App)
// 注册全局组件
app.component('VAceEditor', VAceEditor)
.component('VApexChart', VueApexCharts)
.component('VDialogCloseBtn', DialogCloseBtn)
// 注册插件
app