Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
founder_vue
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
常超
founder_vue
Commits
4a807ba4
Commit
4a807ba4
authored
Oct 31, 2023
by
gao_yingdong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update car_compontents.vue
parent
f2478698
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
src/views/ryda/carDa/car_compontents.vue
+18
-0
No files found.
src/views/ryda/carDa/car_compontents.vue
View file @
4a807ba4
...
@@ -342,6 +342,24 @@ export default {
...
@@ -342,6 +342,24 @@ export default {
this
.
page_size
=
val
;
this
.
page_size
=
val
;
this
.
doQuery
(
"yes"
);
this
.
doQuery
(
"yes"
);
},
},
getNeedArr
(
array
,
size
)
{
const
length
=
array
.
length
;
if
(
!
length
||
!
size
||
size
<
1
)
{
return
[];
}
let
index
=
0
;
//用来表示切割元素的范围start
let
resIndex
=
0
;
//用来递增表示输出数组的下标
//根据length和size算出输出数组的长度,并且创建它。
let
result
=
new
Array
(
Math
.
ceil
(
length
/
size
));
//进行循环
while
(
index
<
length
)
{
//循环过程中设置result[0]和result[1]的值。该值根据array.slice切割得到。
result
[
resIndex
++
]
=
array
.
slice
(
index
,
(
index
+=
size
));
}
//输出新数组
return
result
;
},
handleCurrentChange
(
val
)
{
handleCurrentChange
(
val
)
{
let
self
=
this
let
self
=
this
this
.
currentPage1
=
val
;
this
.
currentPage1
=
val
;
...
...
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