You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/cookbook/automatic-global-registration-of-base-components.md
+16-15
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,11 @@
1
-
# Automatic Global Registration of Base Components
1
+
# ベースコンポーネントの自動グローバル登録
2
2
3
-
## Base Example
3
+
## 基本的な例
4
4
5
-
Many of your components will be relatively generic, possibly only wrapping an element like an input or a button. We sometimes refer to these as [base components](../style-guide/#base-component-names-strongly-recommended)and they tend to be used very frequently across your components.
@@ -28,7 +29,7 @@ Just to support relatively little markup in a template:
28
29
</BaseButton>
29
30
```
30
31
31
-
Fortunately, if you're using webpack (or [Vue CLI](https://github.com/vuejs/vue-cli), which uses webpack internally), you can use `require.context`to globally register only these very common base components. Here's an example of the code you might use to globally import base components in your app's entry file (e.g. `src/main.js`):
0 commit comments