]> git.ipfire.org Git - thirdparty/vuejs/create-vue.git/commitdiff
refactor: use multi-word component names
authorHaoqun Jiang <haoqunjiang@gmail.com>
Thu, 18 Nov 2021 06:34:18 +0000 (14:34 +0800)
committerHaoqun Jiang <haoqunjiang@gmail.com>
Thu, 18 Nov 2021 06:34:18 +0000 (14:34 +0800)
so that it won't encounter lint errors when using eslint-plugin-vue's
recommended ruleset.

12 files changed:
template/code/default/src/App.vue
template/code/default/src/components/TheWelcome.vue [moved from template/code/default/src/components/Welcome.vue with 100% similarity]
template/code/router/src/components/TheWelcome.vue [moved from template/code/router/src/components/Welcome.vue with 100% similarity]
template/code/router/src/router/index.js
template/code/router/src/views/AboutView.vue [moved from template/code/router/src/views/About.vue with 100% similarity]
template/code/router/src/views/HomeView.vue [moved from template/code/router/src/views/Home.vue with 52% similarity]
template/code/typescript-default/src/App.vue
template/code/typescript-default/src/components/TheWelcome.vue [moved from template/code/typescript-default/src/components/Welcome.vue with 100% similarity]
template/code/typescript-router/src/components/TheWelcome.vue [moved from template/code/typescript-router/src/components/Welcome.vue with 100% similarity]
template/code/typescript-router/src/router/index.ts
template/code/typescript-router/src/views/AboutView.vue [moved from template/code/typescript-router/src/views/About.vue with 100% similarity]
template/code/typescript-router/src/views/HomeView.vue [moved from template/code/typescript-router/src/views/Home.vue with 52% similarity]

index 945ae423764811e1eab2e36681859a09e7b3ebe3..b0b6901bf5d8bd252c01b735605f50569c258095 100644 (file)
@@ -1,6 +1,6 @@
 <script setup>
 import HelloWorld from './components/HelloWorld.vue'
-import Welcome from './components/Welcome.vue'
+import TheWelcome from './components/TheWelcome.vue'
 </script>
 
 <template>
@@ -13,7 +13,7 @@ import Welcome from './components/Welcome.vue'
   </header>
 
   <main>
-    <Welcome />
+    <TheWelcome />
   </main>
 </template>
 
index e0434fd07b98c4031e12830fb0b0c087723f8cf0..a49ae507f39bdb792025d7c4bd1573b876e8cc96 100644 (file)
@@ -1,21 +1,21 @@
 import { createRouter, createWebHistory } from 'vue-router'
-import Home from '../views/Home.vue'
+import HomeView from '../views/HomeView.vue'
 
 const router = createRouter({
   history: createWebHistory(import.meta.env.BASE_URL),
   routes: [
     {
       path: '/',
-      name: 'Home',
-      component: Home
+      name: 'home',
+      component: HomeView
     },
     {
       path: '/about',
-      name: 'About',
+      name: 'about',
       // route level code-splitting
       // this generates a separate chunk (About.[hash].js) for this route
       // which is lazy-loaded when the route is visited.
-      component: () => import('../views/About.vue')
+      component: () => import('../views/AboutView.vue')
     }
   ]
 })
similarity index 52%
rename from template/code/router/src/views/Home.vue
rename to template/code/router/src/views/HomeView.vue
index ba9b6dc3de3f8b7df49f87b0b801c6d77f8dd673..6555a646b89847dcefe8d4a0bcb3831898e800dc 100644 (file)
@@ -1,9 +1,9 @@
 <script setup lang="ts">
-import Welcome from '@/components/Welcome.vue'
+import TheWelcome from '@/components/TheWelcome.vue'
 </script>
 
 <template>
   <main>
-    <Welcome />
+    <TheWelcome />
   </main>
 </template>
index adcd6fe7c1c47936b14fe1d19c3e837b3931f780..d91eefc43298580190dd4bd28b96ae9009c540e2 100644 (file)
@@ -1,6 +1,6 @@
 <script setup lang="ts">
 import HelloWorld from './components/HelloWorld.vue'
-import Welcome from './components/Welcome.vue'
+import TheWelcome from './components/TheWelcome.vue'
 </script>
 
 <template>
@@ -13,7 +13,7 @@ import Welcome from './components/Welcome.vue'
   </header>
 
   <main>
-    <Welcome />
+    <TheWelcome />
   </main>
 </template>
 
index e0434fd07b98c4031e12830fb0b0c087723f8cf0..a49ae507f39bdb792025d7c4bd1573b876e8cc96 100644 (file)
@@ -1,21 +1,21 @@
 import { createRouter, createWebHistory } from 'vue-router'
-import Home from '../views/Home.vue'
+import HomeView from '../views/HomeView.vue'
 
 const router = createRouter({
   history: createWebHistory(import.meta.env.BASE_URL),
   routes: [
     {
       path: '/',
-      name: 'Home',
-      component: Home
+      name: 'home',
+      component: HomeView
     },
     {
       path: '/about',
-      name: 'About',
+      name: 'about',
       // route level code-splitting
       // this generates a separate chunk (About.[hash].js) for this route
       // which is lazy-loaded when the route is visited.
-      component: () => import('../views/About.vue')
+      component: () => import('../views/AboutView.vue')
     }
   ]
 })
similarity index 52%
rename from template/code/typescript-router/src/views/Home.vue
rename to template/code/typescript-router/src/views/HomeView.vue
index ba9b6dc3de3f8b7df49f87b0b801c6d77f8dd673..6555a646b89847dcefe8d4a0bcb3831898e800dc 100644 (file)
@@ -1,9 +1,9 @@
 <script setup lang="ts">
-import Welcome from '@/components/Welcome.vue'
+import TheWelcome from '@/components/TheWelcome.vue'
 </script>
 
 <template>
   <main>
-    <Welcome />
+    <TheWelcome />
   </main>
 </template>