mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 13:04:23 +00:00
feat: enhance DraggableWindow component with additional emit events for window control; update hotnews component to handle pending state; modify home link for improved navigation
This commit is contained in:
parent
71aac20c36
commit
57aa0aba18
4 changed files with 17 additions and 7 deletions
|
@ -9,7 +9,9 @@ const props = defineProps<{
|
|||
height?: string;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits(["close"]);
|
||||
const emit = defineEmits(["close", "min", "maximize", "restore"]);
|
||||
const title = computed(() => props.title || 'Draggable Window');
|
||||
|
||||
|
||||
const isDragging = ref(false);
|
||||
const position = ref({
|
||||
|
@ -65,11 +67,17 @@ const stopDrag = () => {
|
|||
<h3 class="font-semibold">{{ title }}</h3>
|
||||
<div class="flex flex-row gap-1">
|
||||
<button
|
||||
@click="emit('close')"
|
||||
@click="emit('min')"
|
||||
class="p-1 hover:bg-gray-300 dark:hover:bg-gray-600 rounded"
|
||||
>
|
||||
━
|
||||
</button>
|
||||
<button
|
||||
@click="emit('maximize')"
|
||||
class="p-1 hover:bg-gray-300 dark:hover:bg-gray-600 rounded"
|
||||
>
|
||||
⬜
|
||||
</button>
|
||||
<button
|
||||
@click="emit('close')"
|
||||
class="p-1 rounded bg-red-500 text-white hover:bg-red-600 transition duration-200"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue