This commit is contained in:
lzp
2026-03-02 13:51:14 +08:00
parent d49c00376d
commit 13e3e5dcc5
8 changed files with 62 additions and 19 deletions

View File

@@ -1,7 +1,5 @@
import { createId } from '../../tools/tools'
import card from '../components/cards/index.vue'
import resultImage from '../components/result/result-image.vue'
import { NODE_DATATYPE } from '../tools/index.d'
import { NODE_DATATYPE, NODE_COMPONENT } from '../tools/index.d'
interface NodeOptions {
id?: string
position?: { x: number, y: number }
@@ -51,7 +49,7 @@ export class NodeManager {
createResultNode(options?: NodeOptions) {
const options_ = {
...(options ? options : {}),
component: resultImage,
component: NODE_COMPONENT.RESULT_IMAGE,
data: {
tier: 0,
type: NODE_DATATYPE.RESULT_IMAGE,
@@ -65,7 +63,7 @@ export class NodeManager {
createCardsSelect(options?: NodeOptions) {
const options_ = {
...(options ? options : {}),
component: card,
component: NODE_COMPONENT.CARD,
positionY: 50,
data: {
tier: 1,
@@ -79,7 +77,7 @@ export class NodeManager {
createCardNode(options?: NodeOptions) {
const options_ = {
...(options ? options : {}),
component: card,
component: NODE_COMPONENT.CARD,
}
return this.createNode(options_)
}