const routes = [
{
path: '/:year',
component: Nav,
children: [
{ path: '', name: 'test', component: Test }
]
}
];
Run Code Online (Sandbox Code Playgroud)
<!-- /2018/ -->
<router-link :to="{name: 'test', params: {year: 2018}}"></router-link>
Run Code Online (Sandbox Code Playgroud)
如果有孩子,我想删除添加到路由器链接创建的路径的尾部斜杠。
我想要一些关于流程退出的工作.
但是process.on('exit')没有使用express或socket.io或mysql等工作.
process.on('exit', function() {
console.log('Server exit.');
});
Run Code Online (Sandbox Code Playgroud)
只有这段代码正常工作.
var mysql = require('mysql');
var conn = mysql.createConnection();
conn.connect();
process.on('exit', function() {
console.log('Server exit.');
});
Run Code Online (Sandbox Code Playgroud)
这不起作用.