Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
electron-printer
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
zhuzhequan
electron-printer
Commits
9f39d741
Commit
9f39d741
authored
Jul 17, 2025
by
zhuzhequan
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
ba8ecc99
e8825638
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
77 additions
and
36 deletions
+77
-36
src/store/index.js
+45
-12
src/views/design/data.js
+32
-24
No files found.
src/store/index.js
View file @
9f39d741
...
@@ -30,6 +30,30 @@ export default new Vuex.Store({
...
@@ -30,6 +30,30 @@ export default new Vuex.Store({
gridSpacing
:
10
,
gridSpacing
:
10
,
},
},
grid
:
[
grid
:
[
// {
// label: "7×8",
// value: 4,
// row: 7,
// col: 8,
// h: 0,
// w: 0,
// },
// {
// label: "10×12",
// row: 10,
// value: 3,
// col: 12,
// h: 0,
// w: 0,
// },
// {
// label: "14×16",
// row: 14,
// value: 2,
// col: 16,
// h: 0,
// w: 0,
// },
{
{
label
:
"16×18"
,
label
:
"16×18"
,
value
:
1
,
value
:
1
,
...
@@ -38,14 +62,14 @@ export default new Vuex.Store({
...
@@ -38,14 +62,14 @@ export default new Vuex.Store({
h
:
0
,
h
:
0
,
w
:
0
,
w
:
0
,
},
},
{
//
{
label
:
"18×22
"
,
// label: "16×21
",
value
:
1
,
// value: 0
,
row
:
18
,
// row: 16
,
col
:
22
,
// col: 21
,
h
:
0
,
//
h: 0,
w
:
0
,
//
w: 0,
},
//
},
],
],
},
},
mutations
:
{
mutations
:
{
...
@@ -83,12 +107,21 @@ export default new Vuex.Store({
...
@@ -83,12 +107,21 @@ export default new Vuex.Store({
// state.grid[0].h = h;
// state.grid[0].h = h;
// state.grid[0].w = w;
// state.grid[0].w = w;
state
.
grid
.
forEach
((
el
)
=>
{
state
.
grid
.
forEach
((
el
)
=>
{
if
(
el
.
value
==
1
)
{
if
(
el
.
value
==
0
)
{
el
.
h
=
630
*
(
state
.
WHproportion
-
0.3
);
el
.
w
=
480
*
(
state
.
WHproportion
-
0.3
);
}
else
if
(
el
.
value
==
1
)
{
el
.
h
=
540
*
state
.
WHproportion
;
el
.
h
=
540
*
state
.
WHproportion
;
el
.
w
=
480
*
state
.
WHproportion
;
el
.
w
=
480
*
state
.
WHproportion
;
}
else
{
}
else
if
(
el
.
value
==
2
)
{
el
.
h
=
660
*
state
.
WHproportion
;
el
.
h
=
480
*
state
.
WHproportion
;
el
.
w
=
540
*
state
.
WHproportion
;
el
.
w
=
420
*
state
.
WHproportion
;
}
else
if
(
el
.
value
==
3
)
{
el
.
h
=
360
*
(
state
.
WHproportion
+
1
);
el
.
w
=
300
*
(
state
.
WHproportion
+
1
);
}
else
if
(
el
.
value
==
4
)
{
el
.
h
=
240
*
(
state
.
WHproportion
+
1.8
);
el
.
w
=
210
*
(
state
.
WHproportion
+
1.8
);
}
}
});
});
},
},
...
...
src/views/design/data.js
View file @
9f39d741
export
const
grid
=
[
export
const
grid
=
[
// {
{
// label: '7×8',
label
:
"7×8"
,
// value: 4,
value
:
4
,
// col: 7,
col
:
7
,
// row: 8
row
:
8
,
// },
h
:
0
,
// {
w
:
0
,
// label: '10×12',
},
// col: 10,
{
// value: 3,
label
:
"10×12"
,
// row: 12
col
:
10
,
// },
value
:
3
,
// {
row
:
12
,
// label: '14×16',
h
:
0
,
// col: 14,
w
:
0
,
// value: 2,
},
// row: 16
{
// },
label
:
"14×16"
,
col
:
14
,
value
:
2
,
row
:
16
,
h
:
0
,
w
:
0
,
},
{
{
label
:
"16×18"
,
label
:
"16×18"
,
value
:
1
,
value
:
1
,
...
@@ -27,10 +33,12 @@ export const grid = [
...
@@ -27,10 +33,12 @@ export const grid = [
h
:
0
,
h
:
0
,
w
:
0
,
w
:
0
,
},
},
// {
{
// label: '16×21',#77797a
label
:
"16×21"
,
// value: 0,
value
:
0
,
// col: 16,
col
:
16
,
// row: 21
row
:
21
,
// }
h
:
0
,
w
:
0
,
},
];
];
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