vuereact-combined icon indicating copy to clipboard operation
vuereact-combined copied to clipboard

在react项目中使用cloud-ui组件时会增加一层dom、导致样式不生效

Open hhf-ggt opened this issue 1 year ago • 2 comments
trafficstars

问题1

使用方式如下

预期是ULinearlayout组件生效、两个button有间距

import "./styles.css";
import { applyVueInReact } from "vuereact-combined";
import * as CloudUI from "cloud-ui.vusion/dist";
import "cloud-ui.vusion/dist/theme-dark.css";
const ULinearLayout = applyVueInReact(CloudUI.ULinearLayout);
const UButton = applyVueInReact(CloudUI.UButton);
export default function App() {
  return (
    <div className="App">
      <h1>Hello CodeSandbox</h1>
      <ULinearLayout>
        <UButton color="primary">demo1</UButton>
        <UButton color="danger">demo2</UButton>
      </ULinearLayout>
    </div>
  );
}

codesandbox复现链接 image 在react中使用vue组件 为何会增加在vue中使用react组件的包裹层dom、导致样式丢失

期望结果如下

image ### 现状 image ## 问题2 在react组件中使用vue组件、该vue组件中如有依赖其它vue组件时、会提示其它组件未注册、这种应该如何解决、有使用第三方组件库的具体demo么?

hhf-ggt avatar Jan 18 '24 08:01 hhf-ggt

解决了吗 @hhf-ggt

snowFlower110 avatar Mar 08 '24 03:03 snowFlower110

@hhf-ggt 这一层包装是必须的,只能通过自行修改样式解决

devilwjp avatar Mar 08 '24 04:03 devilwjp