我想在多台电脑上部署我的应用程序,它使用 sqlite for db。有没有办法在我的 env 文件中设置相对路径而不是绝对路径?是否有任何替代 sqlite 的替代方法来拥有可移植的数据库?
无论如何,示例是否可以使用这样的东西:
DB_DATABASE=${ variable/to/database/folder }/database.sqlite
Run Code Online (Sandbox Code Playgroud)
代替:
DB_DATABASE=C:\wamp64\www\JUICE\projects\my-project\database\database.sqlite
Run Code Online (Sandbox Code Playgroud) 嗨,我正在努力解决这个过滤器不起作用的问题:
export default {
props: {
participants: Array,
},
methods: {
filterUsersByCostCenter() {
this.participants.filter(function (participant) {
return (participant.cost_center == 2);
});
}
}
}
</script>
Run Code Online (Sandbox Code Playgroud)
这是参与者的样子:
participants = [
[0] => {
'name': 'Luca',
'surname': 'Rossi',
'cost_center': 1
}
[1] => {
'name': 'Mario',
'surname': 'Rossi',
'cost_center': 2
}
]
Run Code Online (Sandbox Code Playgroud)
我希望只得到第二个索引,但不起作用