当前位置:网站首页>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
边栏推荐
- Hyperledger Fabric 2. X custom smart contract
- Devops development, operation and maintenance Basics: using Jenkins to automatically build projects and notify by email
- Will the order of where conditions in MySQL affect the union index? Will where 1 =1 affect the use of the index? Does where 1 =1 affect the use of indexes?
- 嵌入式RTOS
- Skills of writing test cases efficiently
- 2022 recommended high-speed rail industry research report investment strategy industry development prospect market analysis (the attachment is a link to the online disk, and the report is continuously
- 2022 recommended cloud computing industry research report investment strategy industry development prospect market analysis (the attachment is a link to the online disk, and the report is continuously
- Week 10 - task 1- fill in the blank: line class inherits point class
- The most complete machine learning model training process
- Monitor employee turnover dynamics. This system makes employees tremble!
猜你喜欢

Segment in Lucene

Leetcode simple problem building arrays with stack operation

VLAN experiment

HTTP Caching Protocol practice

Problems with MySQL database query

Programming specification and variables of shell script

Modularization and modular specification commonjs
![[C language series] - initial C language (4)](/img/3b/b20d6e0194f2114f8c27a17d58369a.jpg)
[C language series] - initial C language (4)

Blip: conduct multimodal pre training with cleaner and more diverse data, and the performance exceeds clip! Open source code

Tcapulusdb Jun · industry news collection (III)
随机推荐
Summary of redis basic knowledge points
Week 10 - task 3- from point to circle to cylinder
Is there any difference between a=a+b and a+=b?
The simple problem of leetcode is to divide an array into three parts equal to sum
SCM engineering experience - time slice
Manual (functional) test 1
Review of MySQL knowledge points
2-nitro-5,10,15,20-tetra (3,5-dimethoxyphenyl) porphyrin (no2tdmpp) H2) /5,10,15,20-tetra (4-methylphenyl) porphyrin (TMPP) H2) Qiyue porphyrin products
2022 recommended precious metal industry research report industry development prospect market analysis white paper (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
5,10,15,20-tetra (3,5-dimethoxyphenyl) porphyrin ((tdmpp) H2) /2-nitro-5,10,15,20-tetra (3,5-dimethoxyphenyl) porphyrin copper (no2tdmpp) Cu) supplied by Qiyue
β- Tetraphenyl nickel porphyrin with all chlorine substitution| β- Thiocyano tetraphenyl porphyrin copper| β- Dihydroxy tetraphenyl porphyrin 𞓜 2-nitroporphyrin | supplied by Qiyue
Research on heuristic intelligent task scheduling
Signal slot mechanism
Why can't the article be posted?
證券開戶安全麼,有沒有什麼危險呢
Conditional test, if and case conditional test statements of shell script
Problems with MySQL database query
DataX connection MySQL cannot find driver
How to hand over complex legacy systems?