diff --git a/activitylink/src/views/zhongchou/activity/index.vue b/activitylink/src/views/zhongchou/activity/index.vue index 1f6c9be..ae875d1 100644 --- a/activitylink/src/views/zhongchou/activity/index.vue +++ b/activitylink/src/views/zhongchou/activity/index.vue @@ -79,7 +79,11 @@ > - + @@ -243,6 +247,19 @@ const addActivity = async () => { return; } + // 验证活动名称是否包含空格(双重保险) + if (!activity.value.activityName || activity.value.activityName.trim() === '') { + ElMessage.error('活动名称不能为空'); + return; + } + + // 确保活动名称中没有空格 + const cleanedActivityName = activity.value.activityName.replace(/\s/g, ''); + if (cleanedActivityName !== activity.value.activityName) { + ElMessage.error('活动名称中不能包含空格'); + return; + } + // 表单验证通过,继续提交逻辑 const activityData = { activityName: activity.value.activityName, @@ -317,6 +334,7 @@ const activity = ref({ const rules = { activityName: [ { required: true, message: '请输入活动名称', trigger: 'blur' } + // 移除了自定义验证器,因为清理逻辑在提交时处理 ], marketOne: [ { required: true, message: '请选择市场一', trigger: 'change' } @@ -334,7 +352,6 @@ const rules = { { required: true, message: '请选择结束时间', trigger: 'change' } ] } - // 分页配置 const currentPage = ref(1); const pageSize = ref(10); // 每页显示 10 条 @@ -346,6 +363,13 @@ const currentPageData = computed(() => { return tableData.value.slice(start, end); }); +// 处理活动名称输入,自动清除所有空格 +const handleActivityNameInput = (value) => { + // 清除所有空格 + const cleanedValue = value.replace(/\s/g, ''); + activity.value.activityName = cleanedValue; +}; + // 分页事件处理 const handleSizeChange = (val) => { pageSize.value = val; diff --git a/activitylink/src/views/zhongchou/gift/importuser/index.vue b/activitylink/src/views/zhongchou/gift/importuser/index.vue index 1b84a53..a6d17be 100644 --- a/activitylink/src/views/zhongchou/gift/importuser/index.vue +++ b/activitylink/src/views/zhongchou/gift/importuser/index.vue @@ -3,7 +3,7 @@ 返回 导入抽奖用户 - +
姓名: @@ -18,22 +18,24 @@
- - - - - - - - - - - +
+ + + + + + + + + + + +
批量删除 @@ -256,4 +258,31 @@ onMounted(() => { .el-pagination { margin: 0; } + +.table-container { + height: 650px; /* 设置固定高度 */ + overflow-y: auto; /* 启用垂直滚动条 */ + overflow-x: hidden; /* 隐藏水平滚动条(如果不需要的话) */ + border: 1px solid #ebeef5; /* 可选:添加边框 */ + border-radius: 4px; /* 可选:添加圆角 */ +} + +/* 可选:自定义滚动条样式 */ +.table-container::-webkit-scrollbar { + width: 8px; +} + +.table-container::-webkit-scrollbar-track { + background: #f1f1f1; + border-radius: 4px; +} + +.table-container::-webkit-scrollbar-thumb { + background: #c1c1c1; + border-radius: 4px; +} + +.table-container::-webkit-scrollbar-thumb:hover { + background: #a8a8a8; +} \ No newline at end of file