fix(ui): img组件没有配置url是点击页面刷新

This commit is contained in:
roymondchen 2022-06-06 14:12:54 +08:00 committed by jia000
parent 70292b92c8
commit 5d159ad9d8
3 changed files with 3 additions and 3 deletions

View File

@ -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 (

View File

@ -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;
},
};
},

View File

@ -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;
},
};
},