提交 67cf57ea authored 作者: lidongxu's avatar lidongxu

feat(mobile/plan): 已删除添加灰色背景色_不能长按和左滑

同上
上级 8711424e
......@@ -4,8 +4,10 @@
* @returns boolean true 可编辑/删除,false 不可编辑/删除
*/
export const checkPlanExpire = (row) => {
// 1. 计划日期已经 1 小时后,不可编辑/删除
const date = new Date()
const rowDate = new Date(row.clockInTime)
rowDate.setHours(rowDate.getHours() + 1)
// 2. 计划状态已经开始了,不可编辑/删除
return !(rowDate < date || row.planStatus === 1)
}
\ No newline at end of file
......@@ -25,6 +25,7 @@
v-model="item.checked"
shape="square" />
<van-cell :title="item.storeName"
:class="{'plan-deleted': query.isDeleted}"
@click="clickDetail(item)">
<template #label>
<p class="employee">{{ item.employeeName }}</p>
......@@ -38,7 +39,7 @@
</template>
</van-cell>
<template #right
v-if="!showSelect">
v-if="!showSelect && !query.isDeleted">
<van-button square
type="success"
text="编辑"
......@@ -226,6 +227,7 @@ onMounted(async () => {
// 长按出现全选功能
const showSelect = ref(false)
const onLongPress = () => {
if (query.isDeleted) return // 已删除
showSelect.value = true
}
......@@ -349,6 +351,9 @@ onUnmounted(() => {
}
.van-cell {
&.plan-deleted{
background-color: rgb(235,235,235);
}
.van-cell__label {
font-size: 14px !important;
......
......@@ -220,6 +220,11 @@ defineExpose({
width: 60%;
}
/* 计划状态 */
.van-radio:nth-child(n+2){
margin-top: 20px;
}
.reset-btn {
margin-top: 20px;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论