refactor(layout): 优化页面布局和滚动体验

- 在 index.vue 和 redirect.vue 中添加 layout-body 类,用于控制内容区域高度和滚动
- 调整 Publish 和 Survey 组件中的样式,以适应新的布局结构
- 优化部分组件的代码格式和逻辑
This commit is contained in:
陈昱达
2025-03-19 14:45:43 +08:00
parent ae5b36d82e
commit 5387155e06
12 changed files with 187 additions and 172 deletions

View File

@@ -134,7 +134,7 @@ const onLoad = () => {
fetchSurveys();
}, 500);
};
const fetchSurveys = async () => {
const fetchSurveys = async() => {
const params = {
page: form.value.page,
per_page: form.value.pageSize,
@@ -172,7 +172,7 @@ const deleteItem = (item) => {
showCancelButton: true,
confirmButtonColor: '#03B03C'
})
.then(async () => {
.then(async() => {
const res = await deleteSurveys(item.sn);
if (res.data.message) {
showToast(res.data.message);
@@ -196,7 +196,7 @@ const copyItem = (item) => {
showCancelButton: true,
confirmButtonColor: '#03B03C'
})
.then(async () => {
.then(async() => {
const res = await copySurveys(item.sn);
if (res.data.code === 200 || res.data.code === 201) {
showSuccessToast('复制成功');
@@ -237,7 +237,7 @@ const editItem = (item) => {
});
};
// 保存为模板
const saveTemplate = async (item) => {
const saveTemplate = async(item) => {
const data = JSON.parse(JSON.stringify(item));
const res = await saveTemplates(item.sn, data);
if (res.data.code === 200 || res.data.code === 201) {
@@ -272,7 +272,7 @@ onMounted(() => {
.survey-search {
position: sticky;
top: var(--sticky-top-height);
top: 0;
z-index: 1000;
width: 100%;
padding: 0;