mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-06-11 14:45:10 +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;
|
||||
|
||||
const clickHandler = () => {
|
||||
window.location.href = config.url;
|
||||
if (config.url) window.location.href = config.url;
|
||||
}
|
||||
|
||||
return (
|
||||
|
@ -23,7 +23,7 @@ export default defineComponent({
|
||||
useApp(props);
|
||||
return {
|
||||
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 {
|
||||
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