当前位置:网站首页>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
边栏推荐
- Hustoj SPJ example
- What if the hard disk fails to recognize how to recover data
- There are two ways for golang to develop mobile applications
- ICLR is going to have a big discussion on the deep generation model. Max welling and the winner of the AAAI million dollar award are here. Bengio is one of the organizers
- [C language series] - initial C language (4)
- New d reflection generates ABI of C for class
- Week 10 - task 1- fill in the blank: line class inherits point class
- Leetcode notes on question brushing (XIV) -- related topics of binary tree attributes in binary tree chapter
- The easiest GUI to compile: dgui
- Servlet version conflict causes page 404
猜你喜欢

Modularization and modular specification commonjs
![[high concurrency] deeply analyze the callable interface](/img/17/93056547aa1a2b342e1b159b7c41c2.jpg)
[high concurrency] deeply analyze the callable interface

2022 recommended trend toy blind box industry research report industry development prospect market analysis white paper (the attachment is a link to the network disk, and the report is continuously up

PCI Verilog IP

Design risc-v processor from scratch -- data adventure of five stage pipeline

Kubernetes backup disaster recovery service product experience tutorial

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

Internet enterprises need CRM software to help

There are two ways for golang to develop mobile applications

Design of leetcode simple problem goal parser
随机推荐
Agile invincible event
Establishing the development environment of esp8266
VLAN experiment
Tcapulusdb Jun · industry news collection (VI)
证券开户安全么,有没有什么危险呢
Meta metauniverse female safety problems occur frequently. How to solve the relevant problems in the metauniverse?
Use of sed in shell script
Week 10 - task 1- fill in the blank: line class inherits point class
Benign competition will promote each other
SCM engineering experience - time slice
[C language series] - initial C language (4)
[high concurrency] deeply analyze the callable interface
QT writing map comprehensive application 58 compatible with multi browser kernel
3 frequently tested SQL data analysis questions (including data and code)
Analysis of ArrayList set in teacher Yang's class
[C language series] - branch and loop statements
JS messagechannel transport
DANGER! V** caught climbing over the wall!
ASP. Net core 6 framework unveiling example demonstration [03]:dapr initial experience
2022 recommended trend toy blind box industry research report industry development prospect market analysis white paper (the attachment is a link to the network disk, and the report is continuously up