首页和工作台添加悬浮球

This commit is contained in:
WindowBird 2025-11-25 16:49:53 +08:00
parent 4c2e009598
commit 5799b3b233
3 changed files with 23 additions and 1 deletions

View File

@ -7,7 +7,7 @@ defineEmits(['click']);
<style scoped lang="scss">
.fab-plus {
position: fixed;
bottom: 100rpx;
bottom: 240rpx;
right: 48rpx;
width: 96rpx;
height: 96rpx;

View File

@ -24,10 +24,14 @@
</view>
</view>
</scroll-view>
<!-- 悬浮球 - 添加任务 -->
<FabPlus @click="goToAddTask" />
</template>
<script setup>
import { ref } from 'vue';
import FabPlus from '@/components/FabPlus.vue';
const items = ref([
{ key: 'verify', text: '审批管理', icon: '/static/workbench/verify.png' },
@ -79,6 +83,13 @@ const handleClick = (item) => {
//
uni.showToast({ title: '开发中', icon: 'none' });
};
//
const goToAddTask = () => {
uni.navigateTo({
url: '/pages/task/add/index'
});
};
</script>
<style lang="scss" scoped>

View File

@ -200,6 +200,9 @@
</view>
</view>
</scroll-view>
<!-- 悬浮球 - 添加任务 -->
<FabPlus @click="goToAddTask" />
</template>
<script setup>
@ -209,6 +212,7 @@ import { getTaskStatusType, getTaskStatusStyle, getStatusText } from '@/utils/ta
import { getDashboardBrief, getTaskList, getNoticeList } from '@/api';
import { useUserStore } from '@/store/user';
import {truncateText} from "@/utils/textSolve/truncateText";
import FabPlus from '@/components/FabPlus.vue';
const userStore = useUserStore();
const { userInfo, privateView } = storeToRefs(userStore);
@ -676,6 +680,13 @@ const getTagCustomStyle = (status) => {
borderColor: styleConfig.borderColor
};
};
//
const goToAddTask = () => {
uni.navigateTo({
url: '/pages/task/add/index'
});
};
</script>
<style lang="scss" scoped>