Skip to content

shadowroot中无法加载样式 #8142

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

Open
1 task
rockeralx opened this issue Apr 23, 2025 · 0 comments
Open
1 task

shadowroot中无法加载样式 #8142

rockeralx opened this issue Apr 23, 2025 · 0 comments

Comments

@rockeralx
Copy link

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

4.2.6

Environment

chrome:135.0.7049.114,vue:3.5.13,系统:macos Sequoia 15.3.1

Reproduction link

Edit on CodeSandbox

Steps to reproduce

//mian.ts
let container = document.getElementById('app')
const shadowRoot = container.attachShadow({mode: 'open'})
let root = document.createElement('div')
root.setAttribute('id', 'app')
shadowRoot.appendChild(root)
app.mount(root)
<script setup lang="ts">
//面板容器
let hrpContainer = ref(null)
let visible = ref(false);
</script>
<template>
<div class="hrp-container" v-show="!visible" ref="hrpContainer">
<div class="hrp-button" v-if="hrpContainer">
<a-tooltip placement="left" :get-popup-container="()=>hrpContainer.parentElement" title="网页助手">
<div class="loading-container" key="ball-loading">
<span>加</span>
<span>载</span>
<span>中</span>
</div>
</a-tooltip>
</div>
</div>
</template>

What is expected?

提供相关的配置,能够正确在shadowroot中加载

What is actually happening?

无法加载组件样式

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant