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 = {
81
81
82
82
## Usage
83
83
84
+ Use pascal case named exports in Vue SFC.
85
+
84
86
``` 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'
88
90
```
89
91
90
92
### Volar
Original file line number Diff line number Diff line change 1
1
import path from 'node:path'
2
- import { camelCase } from 'change-case'
2
+ import { pascalCase } from 'change-case'
3
3
4
4
export function resolveName ( id : string ) {
5
- return camelCase ( path . basename ( id , 'vue' ) )
5
+ return pascalCase ( path . basename ( id , 'vue' ) )
6
6
}
Original file line number Diff line number Diff line change @@ -16,9 +16,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
16
16
}
17
17
} );
18
18
19
- const elCard = /* @__PURE__ */ _export_sfc(_sfc_main, [__FILE__]);
19
+ const ElCard = /* @__PURE__ */ _export_sfc(_sfc_main, [__FILE__]);
20
20
21
- export { elCard } ;
21
+ export { ElCard } ;
22
22
"
23
23
` ;
24
24
@@ -35,9 +35,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
35
35
}
36
36
} );
37
37
38
- const upperCase = /* @__PURE__ */ _export_sfc(_sfc_main, [__FILE__]);
38
+ const UpperCase = /* @__PURE__ */ _export_sfc(_sfc_main, [__FILE__]);
39
39
40
- export { upperCase } ;
40
+ export { UpperCase } ;
41
41
"
42
42
` ;
43
43
@@ -57,9 +57,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
57
57
}
58
58
} );
59
59
60
- const basic = /* @__PURE__ */ _export_sfc(_sfc_main, [__FILE__]);
60
+ const Basic = /* @__PURE__ */ _export_sfc(_sfc_main, [__FILE__]);
61
61
62
- export { basic } ;
62
+ export { Basic } ;
63
63
"
64
64
` ;
65
65
@@ -79,9 +79,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
79
79
}
80
80
} );
81
81
82
- const elButton = /* @__PURE__ */ _export_sfc(_sfc_main, [__FILE__]);
82
+ const ElButton = /* @__PURE__ */ _export_sfc(_sfc_main, [__FILE__]);
83
83
84
- export { elButton } ;
84
+ export { ElButton } ;
85
85
"
86
86
` ;
87
87
@@ -101,8 +101,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
101
101
}
102
102
} );
103
103
104
- const myButton = /* @__PURE__ */ _export_sfc(_sfc_main, [__FILE__]);
104
+ const MyButton = /* @__PURE__ */ _export_sfc(_sfc_main, [__FILE__]);
105
105
106
- export { myButton } ;
106
+ export { MyButton } ;
107
107
"
108
108
` ;
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