vue assembly naming and naming props

<! DOCTYPE HTML> 
<HTML> 
<head> 
<Meta charset = "UTF-. 8"> 
<Meta HTTP-equiv = "X--the UA-Compatible" Content = "IEs = Edge, Chrome =. 1"> 
<title> Examples </ title> 
<Script the src = "https://cdn.jsdelivr.net/npm/vue/dist/vue.js"> </ Script> 
</ head> 
<body> 
    <div ID = "App"> 
        < ! - post-title use camel named postTitle will complain blog-post instead blogPost will complain -> 
        <POST-blog-post title = "! the Hello"> </ blog-post> 
    </ div> 



    <Script> 
        Vue .component ( 'POST-Blog', { // name can be used when horizontal 
          props: [ 'postTitle'                 ], // the error if used herein cable-title POST 
          Template: '<H3> posttitle {{}} </ H3>'
        })

        new Vue({
            el:"#app",

        })
    </script>

</body>
</html>
    
Summary props can be used in camel named but not with a line, if props will use horizontal components using the hump
vue name can be used to form the hump and horizontal lines, if set up using the hump will use horizontal use

Guess you like

Origin www.cnblogs.com/yangjie-space/p/11441728.html