1.定义一个变量
2.将变量赋值给 :src
const token=localStorage.get('token');
const ifURL="http://localhost:8085/jmreport/list?token="+token;
</script>
<template>
<iframe :src="ifURL" frameborder="0" width="100%" :style="{height:calHeight}" scrolling="auto"></iframe>
</template>
文章介绍了如何在Vue.js项目中定义变量并从localStorage获取值,然后将该值动态设置到iframe的src属性,实现页面内容的动态加载。
687

被折叠的 条评论
为什么被折叠?



