我想复制 Vue.js 生成的 dist 文件夹并在 symfony 路由上提供它,我尝试过:
路线.yaml
vue:
path: /{path}
controller: App\Controller\ApiController::vue
methods: [GET]
requirements:
path: .*
Run Code Online (Sandbox Code Playgroud)
ApiController.php
public function vue()
{
$vuepath = __DIR__.'/../../public/dist/index.html';
return new Response(file_get_contents($vuepath));
}
Run Code Online (Sandbox Code Playgroud)
它启动时index.html不会加载 javascript 文件。我该如何送达我的申请?
我可以给出一个例子:
.nightly{
z-index: 9000;
position: fixed;
height: 100%;
width: 100%;
background-color: rgba(0,0,0,0.5);
}Run Code Online (Sandbox Code Playgroud)
<div class="nightly">
</div>
<div class="body">
<button>Test</button>
<a href="#">Test 1</a>
</div>Run Code Online (Sandbox Code Playgroud)
想知道div.nightly点击的"透明" 怎么样,或者可以点击下面的按钮,链接等?