Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
liyaoting
/
jk-ut-plugin
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit fdcf9779
authored
2023-05-15 13:56:45 +0800
by
fengweida
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
V1.0.8 添加不需要sleep按钮
1 parent
7865882e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
10 deletions
index.html
index.html
View file @
fdcf977
...
...
@@ -29,6 +29,8 @@
<button
type=
"button"
class=
"btn btn-default"
@
click=
"selectAll(2)"
>
全不选
</button>
</div>
<button
type=
"button"
class=
"btn btn-default navbar-btn"
@
click=
"copyNew"
>
复制出来
</button>
<button
type=
"button"
class=
"btn btn-default navbar-btn"
v-if=
"sleepList.length > 0 && needSleep"
@
click=
"switchSleep"
>
不需要sleep
</button>
<button
type=
"button"
class=
"btn btn-default navbar-btn"
v-if=
"sleepList.length > 0 && !needSleep"
@
click=
"switchSleep"
>
需要sleep
</button>
</div>
</div>
</nav>
...
...
@@ -121,6 +123,7 @@
allServiceList
:
[],
//服务列表
sleepList
:
[],
//sleep列表
searchText
:
""
,
//搜索框的值
needSleep
:
true
,
//是否需要sleep
},
created
:
function
()
{
...
...
@@ -289,7 +292,7 @@
//复制出来
copyNew
:
function
()
{
let
{
serviceList
,
allServiceList
,
sourceArr
,
sleepList
}
=
this
;
let
{
serviceList
,
allServiceList
,
sourceArr
,
sleepList
,
needSleep
}
=
this
;
if
(
!
allServiceList
.
length
)
{
alert
(
"你输入的内容不对"
);
}
else
{
...
...
@@ -305,14 +308,17 @@
if
(
buildRow
.
startsWith
(
"//"
))
{
buildRow
=
buildRow
.
split
(
"//"
)[
1
];
}
let
sleepRow
=
item
.
buildRowNo
+
1
;
sleepList
.
forEach
(
item
=>
{
if
(
item
.
rowNo
==
sleepRow
)
{
if
(
item
.
row
.
startsWith
(
"//"
))
{
item
.
row
=
item
.
row
.
split
(
"//"
)[
1
];
}
}
});
//如果需要sleep,才去掉sleep的注释
if
(
needSleep
){
let
sleepRow
=
item
.
buildRowNo
+
1
;
sleepList
.
forEach
(
item
=>
{
if
(
item
.
rowNo
==
sleepRow
)
{
if
(
item
.
row
.
startsWith
(
"//"
))
{
item
.
row
=
item
.
row
.
split
(
"//"
)[
1
];
}
}
});
}
}
else
{
//如果是关闭的 还没有注释的话,就注释掉
if
(
!
uploadRow
.
startsWith
(
"//"
))
{
...
...
@@ -357,7 +363,10 @@
alert
(
"复制成功"
);
}
},
switchSleep
:
function
()
{
this
.
needSleep
=
!
this
.
needSleep
;
},
//dealStr
dealStr
:
function
(
str
)
{
//如果是注释的
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment