我正在使用Jenkins和email-ext发送构建通知.Build生成在out目录中存储为简单HTML的小型自定义报告.现在我可以轻松地将此报告附加到电子邮件中,但我想要的是将此报告呈现给电子邮件正文本身.我知道我可以编写自己的果冻模板,但这需要访问构建服务器(安装果冻脚本),我也想避免这种情况.所以我的问题是:
我目前将Vue应用渲染为Vue应用。我是通过将子应用程序的index.html文件嵌入到主应用程序的div容器中来实现的。
<template>
<div id="customAppContainer"></div>
</template>
<script>
export default {
mounted() {
this.updateCustomAppContainer();
},
methods: {
updateCustomAppContainer() {
const fullRoute = this.$router.currentRoute.fullPath;
const routeSegments = fullRoute.split("/");
const appsIndex = routeSegments.indexOf("apps");
const appKey = routeSegments[appsIndex + 1];
document.getElementById(
"customAppContainer"
).innerHTML = `<object style="width: 100%; height:100%;" data="http://localhost:3000/subApps/${appKey}"></object>`;
}
},
watch: {
$route(to, from) {
this.updateCustomAppContainer();
}
}
};
</script>
Run Code Online (Sandbox Code Playgroud)
如果您想了解更多信息,请在这里看看
我对这个问题的回答
我的子应用在的object标记中呈现,customAppContainer具有自己的路线,基本路线是
export default new Router({
base: '/my-first-custom-app/',
mode: 'history',
routes: [
{
path: '/',
component: PageOne, …Run Code Online (Sandbox Code Playgroud) 我喜欢在 Windows 10 上的 PowerShell 中使用几个别名。
我希望它们在会话之间保持不变,因此我将它们放在 C:\Users{username}\Documents\WindowsPowerShell 下的 profile.ps1 文件中。
我收到这个烦人的“无法加载,因为在此系统上禁用了运行脚本。” 错误消息,并找到了有关如何摆脱它的页面:https : //social.technet.microsoft.com/Forums/en-US/3e4a9006-d47d-4e19-96f4-10327ae0c5b1/not-able-to- run-script-in-windows-10?forum=winserverpowershell
在这里有人说这条线会有所帮助:
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force -Verbose
Run Code Online (Sandbox Code Playgroud)
但是,将执行策略设置为对我的用户不受限制是否危险?
email-ext ×1
html ×1
javascript ×1
jenkins ×1
powershell ×1
security ×1
vue.js ×1
windows-10 ×1