Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sdream-ai-fe
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
侯明涛
sdream-ai-fe
Commits
f5a7fed8
Commit
f5a7fed8
authored
Sep 16, 2025
by
weiw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:处理低版本浏览器无法兼容js的问题
parent
91474132
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
src/index.tsx
+15
-2
No files found.
src/index.tsx
View file @
f5a7fed8
...
@@ -5,13 +5,26 @@ import App from './App'
...
@@ -5,13 +5,26 @@ import App from './App'
import
'./styles/index.less'
import
'./styles/index.less'
import
'github-markdown-css/github-markdown.css'
import
'github-markdown-css/github-markdown.css'
import
'react-photo-view/dist/react-photo-view.css'
import
'react-photo-view/dist/react-photo-view.css'
import
{
printText2Console
}
from
'./utils/console'
const
rootEl
=
document
.
getElementById
(
'root'
)
const
rootEl
=
document
.
getElementById
(
'root'
)
document
.
documentElement
.
classList
.
add
(
'light'
)
document
.
documentElement
.
classList
.
add
(
'light'
)
printText2Console
()
// 添加 Object.hasOwn 的 polyfill
if
(
!
Object
.
hasOwn
)
{
Object
.
defineProperty
(
Object
,
'hasOwn'
,
{
value
(
object
:
any
,
property
:
PropertyKey
)
{
if
(
object
==
null
)
{
throw
new
TypeError
(
'Cannot convert undefined or null to object'
)
}
return
Object
.
prototype
.
hasOwnProperty
.
call
(
Object
(
object
),
property
)
},
configurable
:
true
,
enumerable
:
false
,
writable
:
true
,
})
}
// printText2Console()
if
(
rootEl
)
{
if
(
rootEl
)
{
const
root
=
ReactDOM
.
createRoot
(
rootEl
)
const
root
=
ReactDOM
.
createRoot
(
rootEl
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment