mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-09-11 22:09:47 +08:00
fix(ui): img组件没有配置url是点击页面刷新
This commit is contained in:
parent
70292b92c8
commit
5d159ad9d8
@ -35,7 +35,7 @@ const Img: React.FC<ImgProps> = ({ config }) => {
|
|||||||
if (!app) return null;
|
if (!app) return null;
|
||||||
|
|
||||||
const clickHandler = () => {
|
const clickHandler = () => {
|
||||||
window.location.href = config.url;
|
if (config.url) window.location.href = config.url;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -23,7 +23,7 @@ export default defineComponent({
|
|||||||
useApp(props);
|
useApp(props);
|
||||||
return {
|
return {
|
||||||
clickHandler() {
|
clickHandler() {
|
||||||
window.location.href = props.config.url;
|
if (props.config.url) window.location.href = props.config.url;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -25,7 +25,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
clickHandler() {
|
clickHandler() {
|
||||||
window.location.href = props.config.url;
|
if (props.config.url) window.location.href = props.config.url;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user