Commit 12bd695a by 赵鹏龙

1.修改列表样式

2.添加上一条,下一条提示
parent 2114de66
<!--
* @Author: your name
* @Date: 2021-11-13 16:32:50
* @LastEditTime: 2021-11-18 09:52:44
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-11-19 14:50:32
* @LastEditors: 赵鹏龙
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \founder_vue\src\components\swiper.vue
-->
......@@ -42,22 +42,55 @@
</el-carousel-item>
</el-carousel>
</div>
<div class="left" @click="btnQiehuan('left')">
<!-- 可以点击上一条的左侧按钮-->
<div v-show="carIndex > 0" class="left" @click="btnQiehuan('left')">
<img
style="transform: rotate(180deg);"
src="@/assets/img/right.png"
alt="暂无图片"
/>
</div>
<!-- 不可点击的上一条左侧按钮 -->
<div v-show="carIndex === 0" class="left" @click="noData('left')">
<img src="@/assets/img/left.png" alt="" />
</div>
<div class="right" @click="btnQiehuan('right')">
<!-- 可以点击的下一条的按钮-->
<div
v-show="carData.length - 1 > carIndex"
class="right"
@click="btnQiehuan('right')"
>
<img src="@/assets/img/right.png" alt="" />
</div>
<!-- 不可以点击的下一条的按钮 -->
<div
v-show="carData.length - 1 === carIndex"
class="right"
@click="noData('right')"
>
<img
style="transform: rotate(180deg);"
src="@/assets/img/left.png"
alt="暂无图片"
/>
</div>
</div>
</template>
<script>
export default {
data() {
return {
carIndex: 0,
carIndex: 0
};
},
methods: {
noData(type) {
if (type === "left") {
this.$message.warning("没有上一条了");
} else if (type === "right") {
this.$message.warning("没有下一条了");
}
},
change(index) {
this.carIndex = index;
},
......@@ -74,14 +107,14 @@ export default {
this.$refs.carousel.next();
this.$emit("next", this.carIndex);
}
},
}
},
props: {
carData: {
type: Array,
default: () => [],
},
},
default: () => []
}
}
};
</script>
<style lang="scss" scoped>
......@@ -220,4 +253,4 @@ export default {
}
}
}
</style>
\ No newline at end of file
</style>
......@@ -831,37 +831,46 @@ export default {
// 获取上一条
last(index) {
debugger;
let i = index;
this.currentQqid = this.sourcedatas[i - 1].qqid;
this.sourcebarcode = this.sourcedatas[i - 1].barcode;
this.fingerLoading = true;
// 指纹图清空
this.clearsource();
this.cleardest();
// 获取源的滚动
this.getSourceRollFingerPrintDetail(this.sourcebarcode);
// 获取源的平面
this.getSourcePlainFingerPrintDetail(this.sourcebarcode);
// 获取候选列表
this.getMatchcandList();
if (index > 0) {
this.currentQqid = this.sourcedatas[i - 1].qqid;
this.sourcebarcode = this.sourcedatas[i - 1].barcode;
this.fingerLoading = true;
// 指纹图清空
this.clearsource();
this.cleardest();
// 获取源的滚动
this.getSourceRollFingerPrintDetail(this.sourcebarcode);
// 获取源的平面
this.getSourcePlainFingerPrintDetail(this.sourcebarcode);
// 获取候选列表
this.getMatchcandList();
} else {
this.$message.warning("没上一条了");
}
},
// 获取下一条
next(index) {
debugger;
let i = index;
this.currentQqid = this.sourcedatas[i + 1].qqid;
this.sourcebarcode = this.sourcedatas[i + 1].barcode;
this.fingerLoading = true;
// 指纹图清空
this.clearsource();
this.cleardest();
// 获取源的滚动
this.getSourceRollFingerPrintDetail(this.sourcebarcode);
// 获取源的平面
this.getSourcePlainFingerPrintDetail(this.sourcebarcode);
// 获取候选列表
this.getMatchcandList();
// 当源数据卡片数量大于一的时候才点击
if (this.sourcedatas.length - 1 > index) {
this.currentQqid = this.sourcedatas[i + 1].qqid;
this.sourcebarcode = this.sourcedatas[i + 1].barcode;
this.fingerLoading = true;
// 指纹图清空
this.clearsource();
this.cleardest();
// 获取源的滚动
this.getSourceRollFingerPrintDetail(this.sourcebarcode);
// 获取源的平面
this.getSourcePlainFingerPrintDetail(this.sourcebarcode);
// 获取候选列表
this.getMatchcandList();
} else {
this.$message.warning("没下一条了");
}
},
// 获取源数据
getSourceList() {
......@@ -1729,9 +1738,15 @@ div {
}
}
}
.dest-data {
.dest-data /deep/ {
width: 340px;
height: 160px;
.current-row {
td {
color: #055fe7;
background: #fff;
}
}
}
}
.imgs {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment