Commit d4aece1f by lijiabin

【需求 17679】 feat: 优化过渡等

parent b4a2bffa
...@@ -12,11 +12,11 @@ import { initWxConfig } from '@/utils/wxUtil/initWXConfig' ...@@ -12,11 +12,11 @@ import { initWxConfig } from '@/utils/wxUtil/initWXConfig'
const locale = ref(zhCn) const locale = ref(zhCn)
onMounted(() => { onMounted(() => {
console.table(__CORE_LIB_VERSION__)
if (import.meta.env.MODE === 'production') { if (import.meta.env.MODE === 'production') {
setTimeout(() => { setTimeout(() => {
initWxConfig() initWxConfig()
}, 3000) }, 3000)
console.table(__CORE_LIB_VERSION__)
} }
}) })
</script> </script>
...@@ -250,7 +250,7 @@ ...@@ -250,7 +250,7 @@
</div> </div>
</div> </div>
<!-- 展示 回复评论的输入框 --> <!-- 展示 回复评论的输入框 -->
<transition name="fade" mode="in-out"> <transition name="fadeToComment" mode="out-in">
<div v-show="showCommentBox(item)" class="flex gap-3 mt-4"> <div v-show="showCommentBox(item)" class="flex gap-3 mt-4">
<img <img
:src="userAvatar" :src="userAvatar"
...@@ -538,12 +538,12 @@ defineExpose({ ...@@ -538,12 +538,12 @@ defineExpose({
}) })
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.fade-enter-from { .fadeToComment-enter-from {
opacity: 0; opacity: 0;
transform: translateY(-10px); transform: translateY(-10px);
} }
.fade-enter-active { .fadeToComment-enter-active {
transition: all 0.5s ease-out; transition: all 0.5s ease-out;
} }
</style> </style>
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
</el-button> --> </el-button> -->
</div> </div>
</div> </div>
<Transition name="fade"> <Transition name="fadeCommentBox" mode="out-in">
<Comment <Comment
v-if="item.showComment" v-if="item.showComment"
:ref="(e) => (commentRefList[index] = e as InstanceType<typeof Comment>)" :ref="(e) => (commentRefList[index] = e as InstanceType<typeof Comment>)"
...@@ -383,14 +383,32 @@ onMounted(() => { ...@@ -383,14 +383,32 @@ onMounted(() => {
}) })
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.fade-enter-from, .fadeCommentBox-enter-from {
.fade-leave-to {
opacity: 0; opacity: 0;
transform: translateY(-10px); transform: translateY(-10px);
filter: blur(4px); filter: blur(4px);
} }
.fade-enter-active,
.fade-leave-active { .fadeCommentBox-enter-to {
opacity: 1;
transform: translateY(0);
filter: blur(0);
}
.fadeCommentBox-leave-from {
opacity: 1;
transform: translateY(0);
filter: blur(0);
}
.fadeCommentBox-leave-to {
opacity: 0;
transform: translateY(-10px);
filter: blur(4px);
}
.fadeCommentBox-enter-active,
.fadeCommentBox-leave-active {
transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
} }
</style> </style>
...@@ -518,13 +518,15 @@ provide(TABS_REF_KEY, tabsRef) ...@@ -518,13 +518,15 @@ provide(TABS_REF_KEY, tabsRef)
.fade-enter-from, .fade-enter-from,
.fade-leave-to { .fade-leave-to {
opacity: 0; opacity: 0;
transform: translateY(10px); transform: translateX(30px);
filter: blur(4px);
} }
.fade-enter-to, .fade-enter-to,
.fade-leave-from { .fade-leave-from {
opacity: 1; opacity: 1;
transform: translateY(0); transform: translateX(0);
filter: blur(0);
} }
.fade-enter-active, .fade-enter-active,
......
...@@ -13,27 +13,14 @@ import pushUpdatePlugin from './src/plugins/pushUpdatePlugin' ...@@ -13,27 +13,14 @@ import pushUpdatePlugin from './src/plugins/pushUpdatePlugin'
import IconsResolver from 'unplugin-icons/resolver' import IconsResolver from 'unplugin-icons/resolver'
import Icons from 'unplugin-icons/vite' import Icons from 'unplugin-icons/vite'
import path from 'node:path' import path from 'node:path'
import fs from 'node:fs'
// 获取到执行脚本的--参数 // 获取到执行脚本的--参数
import pkg from './package.json'
const packageJson = JSON.parse(
fs.readFileSync(path.resolve(process.cwd(), 'package.json'), 'utf-8'),
)
// 核心库版本
const coreLibVersion = {
vue: packageJson.dependencies.vue,
'vue-router': packageJson.dependencies['vue-router'],
'element-plus': packageJson.dependencies['element-plus'],
pinia: packageJson.dependencies.pinia,
unocss: packageJson.devDependencies.unocss,
node: process.versions.node,
}
// https://vite.dev/config/ // https://vite.dev/config/
export default defineConfig(({ mode }) => { export default defineConfig(({ mode }) => {
return { return {
define: { define: {
__CORE_LIB_VERSION__: JSON.stringify(coreLibVersion), __CORE_LIB_VERSION__: JSON.stringify(pkg.dependencies),
}, },
resolve: { resolve: {
//设置别名 //设置别名
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment