-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Style] [All] 不使用 vue-router 时,与 tailwindcss 的兼容性问题 #15461
Comments
我猜测是在 createApp 之前,就通过 main.js import 了 提出这个 Issue 的原因是,我似乎暂时没找到方法,在单页面应用中不使用 |
我找到了一个方案,可以让组件正常工作,但控制台会输出一个警告: <template lang="pug">
el-config-provider(:locale="zhCn")
component(:is="homeView")
</template>
<script setup>
import { ref, onMounted } from 'vue'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
const homeView = ref()
onMounted(async () => {
homeView.value = (await import('@/views/home/index.vue')).default
})
</script> |
将 ref 替换为 shallowRef 可以规避警告,似乎这样可以解决组件不正常的问题,但是否,Element-Plus 应该考虑支持没有 vue-router 的环境? |
Releated pr tailwindlabs/tailwindcss#12735. |
我还以为 tailwindcss 不会造成什么问题呢,原来是它与包括 Element-Plus 在内的广泛第三方库的兼容问题😂 其实 pinia 在这种情况下工作也不正常,似乎用 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. 此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。 |
Bug Type:
Style
Environment
3.4.8
2.5.1
Edge/120.0.0.0 / macOS 14.2.1 (23C71)
Vite
Reproduction
Related Component
All
Reproduction Link
Github Repo
Steps to reproduce
What is Expected?
页面正常显示和工作
What is actually happening?
button 的背景色消失,导致看不到按钮上的字
Additional comments
使用 router-view,按钮正常展示和使用
直接引入组件,按钮无法正常使用
The text was updated successfully, but these errors were encountered: