feat(flows): 新增流程编辑器基础功能与相关组件
feat(backend): 添加流程模型与服务支持 feat(frontend): 实现流程编辑器UI与交互 feat(assets): 添加流程节点图标资源 feat(plugins): 实现上下文菜单和运行时插件 feat(components): 新增基础节点和侧边栏组件 feat(routes): 添加流程相关路由配置 feat(models): 创建流程和运行日志数据模型 feat(services): 实现流程服务层逻辑 feat(migration): 添加流程相关数据库迁移 feat(config): 更新前端配置支持流程编辑器 feat(utils): 增强axios错误处理和工具函数
This commit is contained in:
@ -1,9 +1,46 @@
|
||||
import 'reflect-metadata'
|
||||
import React from 'react'
|
||||
import ReactDOM from 'react-dom/client'
|
||||
import { HashRouter } from 'react-router-dom'
|
||||
import App from './App'
|
||||
import 'antd/dist/reset.css'
|
||||
import '@douyinfe/semi-ui/dist/css/semi.min.css'
|
||||
import './styles/global.css'
|
||||
// 导入 React 18 兼容性补丁
|
||||
import { setupReact18Polyfill, setupDevSanitizeDOMProps } from './utils/react18-polyfill'
|
||||
|
||||
// 应用 React 18 兼容性补丁
|
||||
setupReact18Polyfill()
|
||||
// 开发期:剔除会透传到原生 DOM 的非标准属性(localeCode/defaultCurrency/showCurrencySymbol)
|
||||
setupDevSanitizeDOMProps()
|
||||
|
||||
// 仅在开发环境过滤特定第三方库产生的已知无害告警
|
||||
if (import.meta.env.DEV) {
|
||||
const shouldSuppress = (msg: unknown) => {
|
||||
if (typeof msg !== 'string') return false
|
||||
// semi-ui 某些组件链路在 React 18 下把非标准属性透传到 DOM,触发告警
|
||||
if (msg.includes('React does not recognize the `localeCode` prop on a DOM element')) return true
|
||||
if (msg.includes('React does not recognize the `defaultCurrency` prop on a DOM element')) return true
|
||||
if (msg.includes('React does not recognize the `showCurrencySymbol` prop on a DOM element')) return true
|
||||
// 浏览器建议表单自动填充
|
||||
if (msg.includes('[DOM] Input elements should have autocomplete attributes')) return true
|
||||
return false
|
||||
}
|
||||
|
||||
const origError = console.error
|
||||
console.error = (...args: any[]) => {
|
||||
const msg = args?.[0]
|
||||
if (shouldSuppress(msg)) return
|
||||
origError(...args)
|
||||
}
|
||||
|
||||
const origWarn = console.warn
|
||||
console.warn = (...args: any[]) => {
|
||||
const msg = args?.[0]
|
||||
if (shouldSuppress(msg)) return
|
||||
origWarn(...args)
|
||||
}
|
||||
}
|
||||
|
||||
ReactDOM.createRoot(document.getElementById('root')!).render(
|
||||
<HashRouter>
|
||||
|
||||
Reference in New Issue
Block a user