如何为多个开发人员设置Java maven项目以便轻松使用(How to setup a Java maven project for multiple developers to use easily)
人们认为设置Java,maven-2 Web项目的最佳方式是什么,以便新开发人员可以轻松加入?
您是否将项目设置,.classpath,.project .settings文件夹等签入源控件并使用变量?
要么
签入代码并使用maven eclipse插件生成项目设置是否更好?
请记住,这些是多模块项目,具有不同的方面,因此项目元数据可能非常复杂
What do people think is the best way of setting up a Java, maven-2 web project so a new developer can come on board easily?
Do you checkin you project settings, .classpath, .project .settings folder etc into source control and use variables?
Or
Is it better to just checkin code and use the maven eclipse plugin to generate project settings?
Keep in mind these are multi module projects, with different facets so the project meta data could be quite complex
原文:https://stackoverflow.com/questions/3915789
最满意答案
你可以在路径定义中设置
props: true
。当道具设置为true时,route.params将被设置为组件道具。
const router = new VueRouter({ routes: [ { path: '/user/:id', component: User, props: true }, ] })
you can set
props: true
in the path definition.When props is set to true, the route.params will be set as the component props.
from https://router.vuejs.org/en/essentials/passing-props.html
const router = new VueRouter({ routes: [ { path: '/user/:id', component: User, props: true }, ] })
相关问答
更多-
罗伊J在评论中回答了一个解决方案: 解决方案是使用动态组件在根组件中创建“占位符”组件,并通过在子组件中发出自定义事件来切换其内容。 Roy J answered a solution in the comments: The solution is to use Dynamic Components to create a "placeholder" component in the root component and switch its content by emiting Custom Event ...
-
我相信这实际上是有效的,你被$http的异步行为误导了。 由于您的$http调用没有立即完成,因此您的console.log正在$http调用完成之前执行。 尝试在组件上对users进行watch ,并在该处理程序中放置console.log 。 喜欢这个: module.exports = { component: { ready: function() { console.log(this.users); }, props ...
-
要使用props访问prop prop:['BASE_URL'],你可以使用this.BASE_URL : axios.get( this.BASE_URL + '/api/jokes').then(/*...*/) To access the prop define with props: ['BASE_URL'], you would use this.BASE_URL: axios.get( this.BASE_URL + '/api/jokes').then(/*...*/)
-
对于那些有趣的人:我们在gitter上找到了它。 解决方案是根本不传递对象,而是将其ID作为URL中的参数传递(例如/details/1827 ),然后从组件中的商店获取该ID的对象。 优点:可以直接从外部源导航到URL,应用程序状态也可以。 For those intersted: We figured it out on gitter. Solution is to not pass the object at all, but pass it's ID as a param in the URL (e ...
-
在Vue.JS 2中,如何在推送呼叫中将道具传递给路由器视图?(In Vue.JS 2, how do I pass props to a router view in a push call?)[2021-12-19]
你可以在路径定义中设置props: true 。 当道具设置为true时,route.params将被设置为组件道具。 从https://router.vuejs.org/en/essentials/passing-props.html const router = new VueRouter({ routes: [ { path: '/user/:id', component: User, props: true }, ] }) you ... -
你的路由器配置好像。 这里的问题是this. 在你的@click ,没有必要(你没有使用$refs :P)。
start Starred -
我如何通过Vue.js中的$ router.push传递活动类(How can i pass active class through $router.push in Vue.js)[2023-05-18]
创建路由器对象时添加linkActiveClass选项。 例如 const router = new VueRouter({linkActiveClass:'active'}); linkActiveClass是路由选项之一。 https://router.vuejs.org/api/#name Add linkActiveClass option while creating router object. For e.g const router = new VueRouter({ linkActiveC ... -
您可以将data对象中的props传递给createElement别名h函数在render选项中使用的第二个参数 render: h => h('app', { props: { test: 'hi!' }}) You can pass props in the data object which is the 2nd argument the createElement alias h function takes in the render option render: h => h('app', { ...
-
在创建组件时,Vue的一些典型语法之间存在细微差别。 例如, 数据必须是一个函数 。 .. data: { reactive: true, } .. 在标准的Vue实例中,上述情况非常好。 但是,在创建组件时,data属性需要是一个返回对象的函数: .. data() { return { reactive: true } } .. 此外,您可以使用道具与data任何其他属性相同。 When you're creating a component there's slight differenc ...
-
没有办法像你想要的那样通过vue-router传递数据。 你只能传递这样的参数: 路线定义: { path: '/products/:id/edit', name: 'products.edit', component: ProductForm }, 然后你可以用this.$route.params.id获取参数 或者你可以这样做: this.$router.push({name: products.index, { params: {id: 1 }}) 我建议你添加一个GET参数,比如?success= ...