mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 23:56:42 +08:00
Merge pull request #400 from wikrin/cursor-move
This commit is contained in:
@@ -245,13 +245,21 @@ const props = defineProps({
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="dashboard-widget">
|
<div class="dashboard-widget">
|
||||||
<!-- 仪表板内容 -->
|
<v-hover>
|
||||||
<v-card>
|
<!-- 仪表板内容 -->
|
||||||
<v-card-title>{{ config.title || '仪表板组件' }}</v-card-title>
|
<template #default="{ isHovering, props: hoverProps }">
|
||||||
<v-card-text>
|
<v-card v-bind="hoverProps">
|
||||||
<!-- 组件内容 -->
|
<v-card-title>{{ config.title || '仪表板组件' }}</v-card-title>
|
||||||
</v-card-text>
|
<v-card-text>
|
||||||
</v-card>
|
<!-- 组件内容 -->
|
||||||
|
</v-card-text>
|
||||||
|
<!-- 只在悬停时显示拖拽图标 -->
|
||||||
|
<div v-show="isHovering" class="absolute right-5 top-5">
|
||||||
|
<v-icon class="cursor-move">mdi-drag</v-icon>
|
||||||
|
</div>
|
||||||
|
</v-card>
|
||||||
|
</template>
|
||||||
|
</v-hover>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -91,10 +91,6 @@ onUnmounted(() => {
|
|||||||
<!-- Vue 渲染模式 -->
|
<!-- Vue 渲染模式 -->
|
||||||
<div v-if="pluginRenderMode === 'vue'">
|
<div v-if="pluginRenderMode === 'vue'">
|
||||||
<component :is="dynamicPluginComponent" :config="props.config" :allow-refresh="props.allowRefresh" :api="api" />
|
<component :is="dynamicPluginComponent" :config="props.config" :allow-refresh="props.allowRefresh" :api="api" />
|
||||||
<!-- Vue 模式下也可以显示拖拽句柄 -->
|
|
||||||
<div class="absolute right-5 top-5">
|
|
||||||
<VIcon class="cursor-move">mdi-drag</VIcon>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- Vuetify 渲染模式 -->
|
<!-- Vuetify 渲染模式 -->
|
||||||
<VHover v-else-if="pluginRenderMode === 'vuetify'">
|
<VHover v-else-if="pluginRenderMode === 'vuetify'">
|
||||||
|
|||||||
Reference in New Issue
Block a user