mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-06-11 06:29:22 +08:00
fix(ui): 追加 vue2 和 react 的修改
This commit is contained in:
parent
695efc00a8
commit
45be838f20
@ -34,9 +34,9 @@ const Text: React.FC<TextProps> = ({ config }) => {
|
||||
const [displayText] = useState(config.text);
|
||||
|
||||
return (
|
||||
<p ref={ref} className="magic-ui-text" style={app.transformStyle(config.style || {})} id={`${config.id || ''}`}>
|
||||
<div ref={ref} className="magic-ui-text" style={app.transformStyle(config.style || {})} id={`${config.id || ''}`}>
|
||||
{displayText}
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -54,9 +54,9 @@ export default defineComponent({
|
||||
render() {
|
||||
const className = this.config?.multiple ? 'magic-ui-text' : 'magic-ui-text magic-ui-text--single-line';
|
||||
if (typeof this.$slots?.default === 'function') {
|
||||
return h('span', { class: className }, [this.$slots?.default?.() || '']);
|
||||
return h('div', { class: className }, [this.$slots?.default?.() || '']);
|
||||
}
|
||||
return h('span', {
|
||||
return h('div', {
|
||||
class: className,
|
||||
domProps: {
|
||||
innerHTML: this.displayText,
|
||||
|
Loading…
x
Reference in New Issue
Block a user