refactor: clean up styles, configs and home page
- Migrate inline styles for ChatMainList, AigcPhotoCard and SpriteAnimator, delete unused SCSS files - Update development proxy target in vite.config.ts and env variables including client ID and token - Fix prop references and styling in ChatInputArea and Welcome components - Enable and refactor Calender component integration with proper event handling - Add tabbed layout to ChatMainList with Discovery and chat message sections - Update Vue 3 component patterns for better maintainability - Temporarily comment out ChatInputArea in ChatMainList
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="sprite-animator" :style="spriteStyle" />
|
||||
<div v-if="hasSpriteConfig" class="sprite-animator" :style="spriteStyle" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
@@ -7,17 +7,23 @@ import { computed, ref, onMounted, onUnmounted } from "vue";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
src: string;
|
||||
frameWidth: number;
|
||||
frameHeight: number;
|
||||
totalFrames: number;
|
||||
columns: number;
|
||||
displayWidth: number;
|
||||
src?: string;
|
||||
frameWidth?: number;
|
||||
frameHeight?: number;
|
||||
totalFrames?: number;
|
||||
columns?: number;
|
||||
displayWidth?: number;
|
||||
fps?: number;
|
||||
autoplay?: boolean;
|
||||
loop?: boolean;
|
||||
}>(),
|
||||
{
|
||||
src: "",
|
||||
frameWidth: 0,
|
||||
frameHeight: 0,
|
||||
totalFrames: 0,
|
||||
columns: 0,
|
||||
displayWidth: 0,
|
||||
fps: 12,
|
||||
autoplay: true,
|
||||
loop: true,
|
||||
@@ -66,6 +72,16 @@ onMounted(() => {
|
||||
|
||||
onUnmounted(() => stop());
|
||||
|
||||
const hasSpriteConfig = computed(() => {
|
||||
return (
|
||||
!!props.src &&
|
||||
Number(props.frameWidth) > 0 &&
|
||||
Number(props.frameHeight) > 0 &&
|
||||
Number(props.totalFrames) > 0 &&
|
||||
Number(props.columns) > 0
|
||||
);
|
||||
});
|
||||
|
||||
const spriteStyle = computed(() => {
|
||||
const {
|
||||
src,
|
||||
|
||||
Reference in New Issue
Block a user