Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
tabulator-another-web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
tabulator-another-web
Commits
980628c0
Commit
980628c0
authored
Jul 08, 2025
by
xiaoye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update api.vue
parent
0868d937
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
55 deletions
+20
-55
src/pages/drawer/api.vue
src/pages/drawer/api.vue
+20
-55
No files found.
src/pages/drawer/api.vue
View file @
980628c0
...
@@ -45,9 +45,9 @@
...
@@ -45,9 +45,9 @@
<
/template
>
<
/template
>
<
/uni-list-item
>
<
/uni-list-item
>
<
uni
-
forms
v
-
show
=
'
api.changing == v
'
>
<
uni
-
forms
v
-
show
=
'
api.changing == v
'
>
<
uni
-
datetime
-
picker
type
=
'
datetime
'
v
-
model
=
'
api.changeInfo.date
'
/>
<
uni
-
datetime
-
picker
type
=
'
datetime
'
v
-
model
=
'
api.changeInfo
[v]
.date
'
/>
<
uni
-
easyinput
type
=
'
text
'
placeholder
=
'
名称
'
v
-
model
=
'
api.changeInfo.name
'
/>
<
uni
-
easyinput
type
=
'
text
'
placeholder
=
'
名称
'
v
-
model
=
'
api.changeInfo
[v]
.name
'
/>
<
uni
-
easyinput
type
=
'
text
'
placeholder
=
'
描述
'
v
-
model
=
'
api.changeInfo.description
'
/>
<
uni
-
easyinput
type
=
'
text
'
placeholder
=
'
描述
'
v
-
model
=
'
api.changeInfo
[v]
.description
'
/>
<
view
<
view
class
=
'
button
'
class
=
'
button
'
@
click
=
'
api.update(i.id, v)
'
@
click
=
'
api.update(i.id, v)
'
...
@@ -90,8 +90,6 @@
...
@@ -90,8 +90,6 @@
<
/template
>
<
/template
>
<
script
setup
lang
=
'
ts
'
>
<
script
setup
lang
=
'
ts
'
>
import
{
ref
,
reactive
,
onMounted
,
onUnmounted
,
onBeforeMount
,
watch
}
from
'
vue
'
;
import
{
ref
,
reactive
,
onMounted
,
onUnmounted
,
onBeforeMount
,
watch
}
from
'
vue
'
;
import
emitter
from
'
../../script/emitter.ts
'
;
import
Const
from
'
../../script/const.ts
'
import
Mycard
from
'
../../script/mycard.ts
'
;
import
Mycard
from
'
../../script/mycard.ts
'
;
import
ApiKey
from
'
../../script/apikey.ts
'
;
import
ApiKey
from
'
../../script/apikey.ts
'
;
import
UniApp
from
'
../../script/uniapp.ts
'
;
import
UniApp
from
'
../../script/uniapp.ts
'
;
...
@@ -133,30 +131,13 @@
...
@@ -133,30 +131,13 @@
UniApp
.
copy
(
i
.
key
);
UniApp
.
copy
(
i
.
key
);
}
,
}
,
change
:
(
v
:
number
)
:
void
=>
{
change
:
(
v
:
number
)
:
void
=>
{
if
(
api
.
changing
==
v
)
{
api
.
changing
=
api
.
changing
==
v
?
-
1
:
v
;
api
.
changing
=
-
1
;
api
.
changeInfo
=
{
date
:
''
,
name
:
''
,
description
:
''
,
expireAt
:
undefined
as
undefined
|
Date
}
;
}
else
{
const
i
=
api
.
list
[
v
];
api
.
changeInfo
=
{
date
:
i
.
expireAt
,
name
:
i
.
name
,
description
:
i
.
description
,
expireAt
:
new
Date
(
i
.
expireAt
)
}
;
api
.
changing
=
v
;
}
}
,
}
,
update
:
async
(
id
:
number
,
v
:
number
)
:
Promise
<
void
>
=>
{
update
:
async
(
id
:
number
,
v
:
number
)
:
Promise
<
void
>
=>
{
if
(
await
Tabulator
.
ApiKey
.
Update
(
Mycard
.
token
,
id
,
{
if
(
await
Tabulator
.
ApiKey
.
Update
(
Mycard
.
token
,
id
,
{
name
:
api
.
changeInfo
.
name
,
name
:
api
.
changeInfo
[
v
]
.
name
,
description
:
api
.
changeInfo
.
description
,
description
:
api
.
changeInfo
[
v
]
.
description
,
expireAt
:
api
.
changeInfo
.
expireAt
expireAt
:
api
.
changeInfo
[
v
].
date
?.
length
??
0
>
0
?
new
Date
(
api
.
changeInfo
[
v
].
date
)
:
undefined
}
as
ApiKeyCreateObject
))
}
as
ApiKeyCreateObject
))
api
.
search
();
api
.
search
();
}
,
}
,
...
@@ -167,44 +148,28 @@
...
@@ -167,44 +148,28 @@
}
as
ApiKeyCreateObject
,
}
as
ApiKeyCreateObject
,
date
:
''
,
date
:
''
,
changing
:
-
1
,
changing
:
-
1
,
changeInfo
:
{
changeInfo
:
[]
as
Array
<
{
date
:
''
,
date
:
string
;
name
:
''
,
name
:
string
;
description
:
''
,
description
:
string
;
expireAt
:
undefined
as
undefined
|
Date
}
>
}
}
);
}
);
watch
(()
=>
{
return
api
.
date
;
}
,
()
=>
{
watch
(()
=>
{
return
api
.
date
;
}
,
()
=>
{
const
toDate
=
()
=>
{
api
.
info
.
expireAt
=
api
.
date
.
length
>
0
?
new
Date
(
api
.
date
)
:
undefined
;
api
.
info
.
expireAt
=
new
Date
(
api
.
date
);
}
;
const
toUndefined
=
()
=>
{
api
.
info
.
expireAt
=
undefined
;
}
;
api
.
date
.
length
>
0
?
toDate
()
:
toUndefined
();
}
);
}
);
watch
(()
=>
{
return
api
.
list
;
}
,
()
=>
{
watch
(()
=>
{
return
api
.
list
;
}
,
()
=>
{
api
.
changing
=
-
1
;
api
.
changing
=
-
1
;
api
.
changeInfo
=
{
api
.
list
.
forEach
(
i
=>
{
date
:
''
,
api
.
changeInfo
.
push
({
name
:
''
,
date
:
i
.
expireAt
,
description
:
''
,
name
:
i
.
name
,
expireAt
:
undefined
as
undefined
|
Date
description
:
i
.
description
,
}
;
}
);
}
);
}
,
{
deep
:
true
}
);
}
,
{
deep
:
true
}
);
watch
(()
=>
{
return
api
.
changeInfo
.
date
;
}
,
()
=>
{
const
toDate
=
()
=>
{
api
.
changeInfo
.
expireAt
=
new
Date
(
api
.
changeInfo
.
date
);
}
;
const
toUndefined
=
()
=>
{
api
.
changeInfo
.
expireAt
=
undefined
;
}
;
api
.
changeInfo
.
date
?.
length
??
0
>
0
?
toDate
()
:
toUndefined
();
}
);
onBeforeMount
(()
:
void
=>
{
onBeforeMount
(()
:
void
=>
{
api
.
search
();
api
.
search
();
}
);
}
);
...
...
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