mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-07 14:09:59 +00:00
[lint] Fix remaining vue lint warnings (#3435)
This commit is contained in:
@@ -38,12 +38,15 @@
|
||||
>
|
||||
<template #node="{ node }">
|
||||
<TreeExplorerTreeNode :node="node">
|
||||
<template #before-label="{ node }">
|
||||
<span v-if="node.data.isModified || !node.data.isPersisted"
|
||||
<template #before-label="{ node: treeNode }">
|
||||
<span
|
||||
v-if="
|
||||
treeNode.data?.isModified || !treeNode.data?.isPersisted
|
||||
"
|
||||
>*</span
|
||||
>
|
||||
</template>
|
||||
<template #actions="{ node }">
|
||||
<template #actions="{ node: treeNode }">
|
||||
<Button
|
||||
class="close-workflow-button"
|
||||
icon="pi pi-times"
|
||||
@@ -52,7 +55,9 @@
|
||||
workspaceStore.shiftDown ? 'danger' : 'secondary'
|
||||
"
|
||||
size="small"
|
||||
@click.stop="handleCloseWorkflow(node.data)"
|
||||
@click.stop="
|
||||
handleCloseWorkflow(treeNode.data as ComfyWorkflow)
|
||||
"
|
||||
/>
|
||||
</template>
|
||||
</TreeExplorerTreeNode>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<template>
|
||||
<TreeExplorerTreeNode :node="node">
|
||||
<template #actions="{ node }">
|
||||
<template #actions>
|
||||
<Button
|
||||
:icon="isBookmarked ? 'pi pi-bookmark-fill' : 'pi pi-bookmark'"
|
||||
text
|
||||
severity="secondary"
|
||||
size="small"
|
||||
@click.stop="workflowBookmarkStore.toggleBookmarked(node.data.path)"
|
||||
@click.stop="handleBookmarkClick"
|
||||
/>
|
||||
</template>
|
||||
</TreeExplorerTreeNode>
|
||||
@@ -28,4 +28,10 @@ const workflowBookmarkStore = useWorkflowBookmarkStore()
|
||||
const isBookmarked = computed(
|
||||
() => node.data && workflowBookmarkStore.isBookmarked(node.data.path)
|
||||
)
|
||||
|
||||
const handleBookmarkClick = async () => {
|
||||
if (node.data) {
|
||||
await workflowBookmarkStore.toggleBookmarked(node.data.path)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user