Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
84e802fe
authored
Mar 06, 2023
by
puhui999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
使用const let替换掉var
parent
0c34ce19
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
src/components/XTable/src/XTable.vue
+9
-9
No files found.
src/components/XTable/src/XTable.vue
View file @
84e802fe
...
...
@@ -26,12 +26,12 @@ const prefixCls = getPrefixCls('x-vxe-table')
const
attrs
=
useAttrs
()
const
emit
=
defineEmits
([
'register'
])
const
removeStyles
=
()
=>
{
var
filename
=
'cssTheme'
const
filename
=
'cssTheme'
//移除引入的文件名
var
targetelement
=
'style'
var
targetattr
=
'id'
var
allsuspects
=
document
.
getElementsByTagName
(
targetelement
)
for
(
var
i
=
allsuspects
.
length
;
i
>=
0
;
i
--
)
{
const
targetelement
=
'style'
const
targetattr
=
'id'
const
allsuspects
=
document
.
getElementsByTagName
(
targetelement
)
for
(
let
i
=
allsuspects
.
length
;
i
>=
0
;
i
--
)
{
if
(
allsuspects
[
i
]
&&
allsuspects
[
i
].
getAttribute
(
targetattr
)
!=
null
&&
...
...
@@ -43,8 +43,8 @@ const removeStyles = () => {
}
}
const
reImport
=
()
=>
{
var
head
=
document
.
getElementsByTagName
(
'head'
)[
0
]
var
style
=
document
.
createElement
(
'style'
)
const
head
=
document
.
getElementsByTagName
(
'head'
)[
0
]
const
style
=
document
.
createElement
(
'style'
)
style
.
innerText
=
styleCss
style
.
id
=
'cssTheme'
head
.
appendChild
(
style
)
...
...
@@ -52,10 +52,10 @@ const reImport = () => {
watch
(
()
=>
appStore
.
getIsDark
,
()
=>
{
if
(
appStore
.
getIsDark
==
true
)
{
if
(
appStore
.
getIsDark
)
{
reImport
()
}
if
(
appStore
.
getIsDark
==
false
)
{
if
(
!
appStore
.
getIsDark
)
{
removeStyles
()
}
},
...
...
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