Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-discover
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 702d0c87
authored
Jul 12, 2023
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
车系弹窗添加loading
1 parent
a0b3ab93
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
4 deletions
src/assets/loading.png
src/views/store/components/selectCarDialog.vue
src/assets/loading.png
0 → 100644
View file @
702d0c8
732 Bytes
src/views/store/components/selectCarDialog.vue
View file @
702d0c8
...
@@ -6,7 +6,10 @@
...
@@ -6,7 +6,10 @@
:close-on-click-modal=
"false"
:close-on-click-modal=
"false"
@
onOk=
"handleConfirm"
@
onOk=
"handleConfirm"
@
onCancel=
"handleClose"
>
@
onCancel=
"handleClose"
>
<div
class=
"car-container"
>
<div
v-if=
"loading"
class=
"loading-wrap"
>
<img
class=
"loading-img"
:src=
"url"
alt=
""
>
</div>
<div
class=
"car-container"
v-else
>
<div
class=
"wrap"
>
<div
class=
"wrap"
>
<div
class=
"item son-brand-wrap"
v-for=
"(item, index) in carSeriesData"
:key=
"item.id"
>
<div
class=
"item son-brand-wrap"
v-for=
"(item, index) in carSeriesData"
:key=
"item.id"
>
<el-checkbox
v-if=
"!singleChoice"
:disabled=
"!(item.childs && item.childs.length)"
:indeterminate=
"isIndeterminate(item, 1)"
:value=
"isChecked(item, 1)"
@
change=
"changeBrandStatus($event, item, index)"
></el-checkbox>
<el-checkbox
v-if=
"!singleChoice"
:disabled=
"!(item.childs && item.childs.length)"
:indeterminate=
"isIndeterminate(item, 1)"
:value=
"isChecked(item, 1)"
@
change=
"changeBrandStatus($event, item, index)"
></el-checkbox>
...
@@ -33,11 +36,13 @@
...
@@ -33,11 +36,13 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
url
from
'@/assets/
empty
.png'
import
url
from
'@/assets/
loading
.png'
export
default
{
export
default
{
name
:
'selectStore'
,
name
:
'selectStore'
,
data
()
{
data
()
{
return
{
return
{
url
,
loading
:
true
,
carSeriesData
:
[],
carSeriesData
:
[],
sonBrandList
:
[],
sonBrandList
:
[],
carSeriesList
:
[],
carSeriesList
:
[],
...
@@ -160,7 +165,6 @@
...
@@ -160,7 +165,6 @@
}
else
{
}
else
{
this
.
$set
(
this
.
selectdData
,
rootId
,
{[
parentId
]:
[{
rootId
,
rootName
,
parentId
,
parentName
,
id
:
row
.
id
,
name
:
row
.
name
}]})
this
.
$set
(
this
.
selectdData
,
rootId
,
{[
parentId
]:
[{
rootId
,
rootName
,
parentId
,
parentName
,
id
:
row
.
id
,
name
:
row
.
name
}]})
}
}
console
.
log
(
this
.
selectdData
)
},
},
showSonBrandList
(
row
){
showSonBrandList
(
row
){
if
(
row
.
id
==
this
.
curBrandInfo
.
id
)
return
if
(
row
.
id
==
this
.
curBrandInfo
.
id
)
return
...
@@ -209,10 +213,11 @@
...
@@ -209,10 +213,11 @@
// 获取数据源
// 获取数据源
getCarSeriesData
()
{
getCarSeriesData
()
{
this
.
$apis
.
case
.
getCarSeriesApi
({
needCarSeries
:
true
}).
then
(
res
=>
{
this
.
$apis
.
case
.
getCarSeriesApi
({
needCarSeries
:
true
}).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
?.
length
){
if
(
res
?.
length
){
this
.
carSeriesData
=
res
this
.
carSeriesData
=
res
}
}
}).
finally
(
end
=>
{
this
.
loading
=
false
})
})
},
},
handleConfirm
(){
handleConfirm
(){
...
@@ -227,6 +232,27 @@
...
@@ -227,6 +232,27 @@
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.loading-wrap
{
height
:
200px
;
width
:
100%
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
.loading-img{
width
:
50px
;
height
:
50px
;
animation
:
loading
2s
linear
infinite
;
}
@keyframes
loading
{
from
{
transform
:
rotate
(
0deg
);
}
to
{
transform
:
rotate
(
360deg
);
}
}
}
.car-container
{
.car-container
{
border
:
1px
solid
#E8E8EA
;
border
:
1px
solid
#E8E8EA
;
height
:
476px
;
height
:
476px
;
...
...
Write
Preview
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