Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jj_video_practice
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
jj_video_practice
Commits
420c6999
Commit
420c6999
authored
Dec 23, 2025
by
kingweight
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新缓存大小
parent
8aa270b1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
form.component.ts
src/app/form/form.component.ts
+1
-1
No files found.
src/app/form/form.component.ts
View file @
420c6999
...
@@ -278,7 +278,7 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
...
@@ -278,7 +278,7 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
// 尝试保存到 localStorage
// 尝试保存到 localStorage
const
cacheJson
=
JSON
.
stringify
(
existingCache
);
const
cacheJson
=
JSON
.
stringify
(
existingCache
);
const
cacheSize
=
new
Blob
([
cacheJson
]).
size
;
const
cacheSize
=
new
Blob
([
cacheJson
]).
size
;
const
maxSize
=
4
*
1024
*
1024
;
// 4
MB 限制,留一些余量
const
maxSize
=
100
*
1024
*
1024
;
// 100
MB 限制,留一些余量
if
(
cacheSize
>
maxSize
)
{
if
(
cacheSize
>
maxSize
)
{
console
.
warn
(
'
缩略图缓存大小超出限制,跳过保存到 localStorage
'
);
console
.
warn
(
'
缩略图缓存大小超出限制,跳过保存到 localStorage
'
);
...
...
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