File tree Expand file tree Collapse file tree 4 files changed +22
-20
lines changed Expand file tree Collapse file tree 4 files changed +22
-20
lines changed Original file line number Diff line number Diff line change @@ -81,10 +81,12 @@ module.exports = {
8181
8282## Usage
8383
84+ Use pascal case named exports in Vue SFC.
85+
8486``` ts
85- import { myComponent } from ' ./MyComponent.vue'
86- import { myCard } from ' ./my-card.vue'
87- import { myFooter } from ' ./my_footer.vue'
87+ import { MyComponent } from ' ./MyComponent.vue'
88+ import { MyCard } from ' ./my-card.vue'
89+ import { MyFooter } from ' ./my_footer.vue'
8890```
8991
9092### Volar
Original file line number Diff line number Diff line change 11import path from 'node:path'
2- import { camelCase } from 'change-case'
2+ import { pascalCase } from 'change-case'
33
44export function resolveName ( id : string ) {
5- return camelCase ( path . basename ( id , 'vue' ) )
5+ return pascalCase ( path . basename ( id , 'vue' ) )
66}
Original file line number Diff line number Diff line change @@ -16,9 +16,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
1616 }
1717} );
1818
19- const elCard = /* @__PURE__ */ _export_sfc(_sfc_main, [__FILE__]);
19+ const ElCard = /* @__PURE__ */ _export_sfc(_sfc_main, [__FILE__]);
2020
21- export { elCard } ;
21+ export { ElCard } ;
2222"
2323` ;
2424
@@ -35,9 +35,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
3535 }
3636} );
3737
38- const upperCase = /* @__PURE__ */ _export_sfc(_sfc_main, [__FILE__]);
38+ const UpperCase = /* @__PURE__ */ _export_sfc(_sfc_main, [__FILE__]);
3939
40- export { upperCase } ;
40+ export { UpperCase } ;
4141"
4242` ;
4343
@@ -57,9 +57,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
5757 }
5858} );
5959
60- const basic = /* @__PURE__ */ _export_sfc(_sfc_main, [__FILE__]);
60+ const Basic = /* @__PURE__ */ _export_sfc(_sfc_main, [__FILE__]);
6161
62- export { basic } ;
62+ export { Basic } ;
6363"
6464` ;
6565
@@ -79,9 +79,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
7979 }
8080} );
8181
82- const elButton = /* @__PURE__ */ _export_sfc(_sfc_main, [__FILE__]);
82+ const ElButton = /* @__PURE__ */ _export_sfc(_sfc_main, [__FILE__]);
8383
84- export { elButton } ;
84+ export { ElButton } ;
8585"
8686` ;
8787
@@ -101,8 +101,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
101101 }
102102} );
103103
104- const myButton = /* @__PURE__ */ _export_sfc(_sfc_main, [__FILE__]);
104+ const MyButton = /* @__PURE__ */ _export_sfc(_sfc_main, [__FILE__]);
105105
106- export { myButton } ;
106+ export { MyButton } ;
107107"
108108` ;
Original file line number Diff line number Diff line change 1- export { basic } from './basic.vue'
2- export { elCard } from './ElCard.vue'
3- export { elButton } from './el-button.vue'
4- export { myButton } from './my_button.vue'
5- export { upperCase } from './UPPER-CASE.vue'
1+ export { Basic } from './basic.vue'
2+ export { ElCard } from './ElCard.vue'
3+ export { ElButton } from './el-button.vue'
4+ export { MyButton } from './my_button.vue'
5+ export { UpperCase } from './UPPER-CASE.vue'
You can’t perform that action at this time.
0 commit comments