Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
groupPurchase-miniapp
Project
Project
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
彭佳妮(贵阳日报)
groupPurchase-miniapp
Commits
dbdf5ec5
Commit
dbdf5ec5
authored
Aug 15, 2024
by
张娇(东信)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
乡村旅居智能排序修改
parent
e3cfe12b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
Sort.vue
src/Components/assistingAgriculture/index/Sort.vue
+9
-5
No files found.
src/Components/assistingAgriculture/index/Sort.vue
View file @
dbdf5ec5
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
v-for=
"(item, index) in items"
v-for=
"(item, index) in items"
:key=
"index"
:key=
"index"
:class=
"
{ active: selectedItem === index }"
:class=
"
{ active: selectedItem === index }"
@
tap
="selectItem(index, item)"
@
click
="selectItem(index, item)"
>
>
{{
item
.
name
}}
{{
item
.
name
}}
</li>
</li>
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
import
{
defineProps
}
from
'vue'
;
import
{
ref
}
from
'vue'
;
const
items
=
ref
([
const
items
=
ref
([
{
name
:
'距离优先'
,
sortMode
:
1
},
{
name
:
'距离优先'
,
sortMode
:
1
},
{
name
:
'好评优先'
,
sortMode
:
2
},
{
name
:
'好评优先'
,
sortMode
:
2
},
...
@@ -31,8 +31,13 @@ const props = defineProps({
...
@@ -31,8 +31,13 @@ const props = defineProps({
},
},
});
});
const
selectItem
=
(
index
,
item
)
=>
{
const
selectItem
=
(
index
,
item
)
=>
{
if
(
selectedItem
.
value
===
index
)
{
selectedItem
.
value
=
null
;
emit
(
'sortParams'
,
null
);
}
else
{
selectedItem
.
value
=
index
;
selectedItem
.
value
=
index
;
emit
(
'sortParams'
,
item
);
emit
(
'sortParams'
,
item
);
}
};
};
const
reset
=
()
=>
{
const
reset
=
()
=>
{
selectedItem
.
value
=
null
;
selectedItem
.
value
=
null
;
...
@@ -44,8 +49,6 @@ defineExpose({ reset });
...
@@ -44,8 +49,6 @@ defineExpose({ reset });
.sort
{
.sort
{
position
:
absolute
;
position
:
absolute
;
top
:
100%
;
top
:
100%
;
// width: 100%;
// min-height: 212rpx;
border-radius
:
0rpx
0rpx
16rpx
16rpx
;
border-radius
:
0rpx
0rpx
16rpx
16rpx
;
background
:
#ffffff
;
background
:
#ffffff
;
box-shadow
:
0rpx
16rpx
16rpx
0rpx
rgba
(
73
,
73
,
73
,
0
.14
);
box-shadow
:
0rpx
16rpx
16rpx
0rpx
rgba
(
73
,
73
,
73
,
0
.14
);
...
@@ -55,12 +58,13 @@ defineExpose({ reset });
...
@@ -55,12 +58,13 @@ defineExpose({ reset });
padding-bottom
:
20rpx
;
padding-bottom
:
20rpx
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
.ul
{
.ul
{
padding-left
:
6
0rpx
;
padding-left
:
3
0rpx
;
li
{
li
{
list-style-type
:
none
;
list-style-type
:
none
;
font-size
:
22rpx
;
font-size
:
22rpx
;
color
:
#3d3d3d
;
color
:
#3d3d3d
;
margin-top
:
20rpx
;
margin-top
:
20rpx
;
cursor
:
pointer
;
}
}
.active
{
.active
{
color
:
#fa5151
;
color
:
#fa5151
;
...
...
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