vue.js初学笔记--人员管理系统

<router-view></router-view>怎么用


可以这样理解,正常写法中,一层路径(/xxx)对应一个router-view。

比如url: /a/b/c (假设a、b、c都为正常路径,不会作为参数)

那/a对应的就是App.vue中的router-view,/a进入a.vue中 那/a/b对应的就是a.vue中的router-view, /a/b进入b.vue中 以此类推。


我的footer总是浮上去?

.footer{width:100%; height:50px; bottom:0; position: fixed;}


<footer-nav v-bind:class="{isIndex:isNowPage}"></footer-nav> 什么意思

v-bind 对class style等的应用


驼峰式?

App.vue为父,引入componetA组件之后,则可以在template中使用标签(注意驼峰写法要改成componet-a写法,因为html对大小写不敏感,componenta与componentA对于它来说是一样的,不好区分,所以使用小写-小写这种写法)

<template>
    <div>
        Welcome to personal management!
        <footer-nav v-bind:class="{isIndex:isNowPage}"></footer-nav>
    </div>

</template>

<script>
    import FooterNav from @/components/footer.vue
    export default{
        components:{
            FooterNav
        }
    }
</script>

经验分享 程序员 微信小程序 职场和发展