| | |
| | | <template> |
| | | <NodeResizer /> |
| | | <div |
| | | class="order-2 rounded-lg border-solid border-gray-100 bg-white p-3 shadow-md relative hover:border-blue-500 group" |
| | | :style="{ maxWidth: `${maxWidth}px` }" |
| | | :style="{ maxHeight: `${maxHeight}px`, maxWidth: `${maxWidth}px`, minHeight: `${minHeight}px`, minWidth: minWidth }" |
| | | class="order-2 rounded-lg border-solid border-gray-100 bg-white p-3 shadow-md relative hover:border-blue-500 group h-fit" |
| | | > |
| | | <div |
| | | class="group-hover:visible invisible flex absolute divide-y-[1.5px] divide-solid divide-gray-100 rounded-lg right-0 -top-0.5 translate-y-[-100%]" |
| | |
| | | :class="VueFlowConfig.nodeStyleMap.get(type).class" |
| | | /> |
| | | <p v-if="!titleIsEdit" class="text-medium font-bold" @click="titleIsEdit = true">{{ title }}</p> |
| | | <el-input v-elInputFocus="false" v-else v-model="title" @blur="() => (titleIsEdit = false)"></el-input> |
| | | <el-input v-elInputFocus="false" class="nodrag" v-else v-model="title" @blur="() => (titleIsEdit = false)"></el-input> |
| | | </div> |
| | | <p v-if="description" class="text-extra-small text-secondary"> |
| | | {{ description }} |
| | |
| | | import { useNode, useVueFlow } from '@vue-flow/core'; |
| | | import { ref } from 'vue'; |
| | | |
| | | import { NodeResizer } from '@vue-flow/node-resizer'; |
| | | import type { PropType } from 'vue'; |
| | | import { VueFlowHelper } from '../../../VueFlowHelper'; |
| | | import type { NodeType } from '../../../vueFlowEnum'; |
| | | import { VueFlowConfig } from '../../VueFlowConfig'; |
| | | import { deepClone } from '/@/utils/other'; |
| | | |
| | | // defineOptions({ |
| | | // inheritAttrs: false, |
| | | // }); |
| | | const titleIsEdit = ref(false); |
| | | |
| | | const props = defineProps({ |
| | | maxWidth: { type: String, default: '520' }, |
| | | maxWidth: { type: Number }, |
| | | maxHeight: { type: Number }, |
| | | minWidth: { type: Number }, |
| | | minHeight: { type: Number }, |
| | | type: { type: String as PropType<NodeType>, required: true }, |
| | | description: { type: String }, |
| | | showOffset: { |