当前位置:网站首页>Case of single file component files
Case of single file component files
2022-06-29 06:03:00 【Lemon summer white】
Single file component The file name of should either always start with a word in uppercase (PascalCase), Or it's always horizontal (kebab-case).
The uppercase beginning of a word is the most friendly for auto completion of the code editor , Because it makes us in JS(X)
As consistent as possible with the way components are referenced in the template . However , Mixing file names sometimes leads to problems with file systems that are not case sensitive , That's why it's equally desirable to name horizontal connections .
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Vue.js Components </title>
</head>
<body>
<!-- Components can be extended HTML Elements , Encapsulate reusable code . -->
<!-- Component system allows us to build large-scale applications with independent and reusable small components , Almost any application interface can be abstracted as a component tree : -->
<div id='app'>
<!-- Component naming horizontal line connection (kebab-case) Or title case -->
<My-Item></My-Item>
<!-- Horizontal line connection : <my-comp></my-comp>-->
</div>
</body>
</html>
<script src="./vue.js"></script>
<script> // register Vue.component('MyItem', {
template: '<h1> Custom components !</h1>' }) // Create a root instance let vm = new Vue({
el: '#app', data: {
} }) </script>
Please refer to Vue.js Official style guide document —>Vue.js
边栏推荐
- HTTP Caching Protocol practice
- Manual (functional) test 1
- Ti Click: quickly set up tidb online laboratory through browser | ti- team interview can be conducted immediately
- Week 10 - task 1- fill in the blank: line class inherits point class
- JS messagechannel transport
- Problems with MySQL database query
- HTTP Caching Protocol practice
- Tcapulusdb Jun · industry news collection (III)
- Review of MySQL knowledge points
- Jenkins operation Chapter 6 mail server sending build results
猜你喜欢

Rearrangement string of leetcode simple question

2022 recommended quantum industry research industry development planning prospect investment market analysis report (the attachment is a link to the online disk, and the report is continuously updated

After nine years of testing, the salary for interviewing Huawei is 10000. Huawei employees: the company doesn't have such a low salary position

What is the "danksharding" of V God Kop on Valentine's day?

2022 recommended RCEP regional comprehensive economic partnership agreement market quotation Investment Analysis Industry Research Report (the attachment is a link to the online disk, and the report i

Analysis report on the investment market of the development planning prospect of the recommended NFT industry research industry in 2022 (the attachment is a link to the online disk, and the report is

What is MES? What does it do?

Regular expressions for shell script values

Research on heuristic intelligent task scheduling

Servlet version conflict causes page 404
随机推荐
ASP. Net core 6 framework unveiling example demonstration [03]:dapr initial experience
Manual (functional) test 1
2022-02 Microsoft vulnerability notification
Plugin
证券开户安全么,有没有什么危险呢
How to choose congestion model and anemia model
Rich material libraries make modeling easy and efficient for developers
The simple problem of leetcode is to divide an array into three parts equal to sum
It turns out that the joys and sorrows of programmers are not interlinked
5- (4-benzoimide phenyl) - 10,15,20-triphenylporphyrin (battph2) and its Zn complex (battpzn) / tetra (4-aminophenyl) porphyrin (tapph2) Qiyue supply
JIRA basic usage sharing
Week 10 - task 1- fill in the blank: line class inherits point class
ES6 Modularization: export /import
SCM engineering experience - time slice
The fresh student who was born in Ali after 2000: it's really fragrant to mend this
Modularization and modular specification commonjs
嵌入式RTOS
Tcapulusdb Jun · industry news collection (V)
How does MySQL implement distributed locks?
HTTP Caching Protocol practice