服务详情数据
This commit is contained in:
@@ -16,7 +16,6 @@
|
|||||||
"path": "^0.12.7",
|
"path": "^0.12.7",
|
||||||
"prettier": "^3.1.0",
|
"prettier": "^3.1.0",
|
||||||
"vue": "^3.3.4",
|
"vue": "^3.3.4",
|
||||||
"vue-seamless-scroll": "^1.1.23",
|
|
||||||
"vue3-seamless-scroll": "^2.0.1"
|
"vue3-seamless-scroll": "^2.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
v-for="(item, index) in typeTime"
|
v-for="(item, index) in typeTime"
|
||||||
:key="index"
|
:key="index"
|
||||||
:class="selectIndex === index ? 'select' : 'unSelect'"
|
:class="selectIndex === index ? 'select' : 'unSelect'"
|
||||||
@click="handleSelect(index)"
|
@click="handleSelect(index, item.value)"
|
||||||
>{{ item.name }}</span
|
>{{ item.name }}</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
@@ -28,19 +28,19 @@ import {list} from './left.api';
|
|||||||
const typeTime = ref([
|
const typeTime = ref([
|
||||||
{
|
{
|
||||||
name: '全部',
|
name: '全部',
|
||||||
value: 'all',
|
value: '1',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '本年',
|
name: '本年',
|
||||||
value: 'year',
|
value: '2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '本月',
|
name: '本月',
|
||||||
value: 'month',
|
value: '3',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '本周',
|
name: '本周',
|
||||||
value: 'week',
|
value: '4',
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
const dataLists = ref([
|
const dataLists = ref([
|
||||||
@@ -62,16 +62,22 @@ const dataLists = ref([
|
|||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
const selectIndex = ref(0);
|
const selectIndex = ref(0);
|
||||||
|
const selectVal = ref('1');
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
|
||||||
|
function getList() {
|
||||||
list({
|
list({
|
||||||
condition: '',
|
condition: selectVal.value,
|
||||||
}).then(() => {
|
}).then(() => {});
|
||||||
|
}
|
||||||
|
|
||||||
});
|
function handleSelect(index: number, value: string) {
|
||||||
});
|
|
||||||
|
|
||||||
function handleSelect(index: number) {
|
|
||||||
selectIndex.value = index;
|
selectIndex.value = index;
|
||||||
|
selectVal.value = value;
|
||||||
|
console.log(selectVal.value, value);
|
||||||
|
getList();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
|
|||||||
Reference in New Issue
Block a user