mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? feat: generate uuid with human-id #918 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -15,9 +15,9 @@ import React, {
|
||||
useState,
|
||||
} from 'react';
|
||||
import { Node, Position, ReactFlowInstance } from 'reactflow';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
// import { shallow } from 'zustand/shallow';
|
||||
import { useDebounceEffect } from 'ahooks';
|
||||
import { humanId } from 'human-id';
|
||||
import { useParams } from 'umi';
|
||||
import useGraphStore, { RFState } from './store';
|
||||
import { buildDslComponentsByGraph } from './utils';
|
||||
@ -79,7 +79,7 @@ export const useHandleDrop = () => {
|
||||
y: event.clientY,
|
||||
});
|
||||
const newNode = {
|
||||
id: uuidv4(),
|
||||
id: `${type}:${humanId()}`,
|
||||
type: 'textUpdater',
|
||||
position: position || {
|
||||
x: 0,
|
||||
|
||||
Reference in New Issue
Block a user