fds-vue-core 6.2.8 → 6.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -44,12 +44,16 @@ export default {
44
44
  import { createApp } from 'vue'
45
45
  import App from './App.vue'
46
46
  import FdsVueCore from 'fds-vue-core'
47
+ import i18n from './i18n'
47
48
 
48
49
  const app = createApp(App)
49
- app.use(FdsVueCore)
50
+ app.use(i18n)
51
+ app.use(FdsVueCore, { i18n })
50
52
  app.mount('#app')
51
53
  ```
52
54
 
55
+ If your app already installs Vue I18n globally, components can use that directly. Passing `{ i18n }` to `FdsVueCore` additionally makes the i18n instance available via the provided `FDS_VUE_CORE_I18N_KEY` injection key for components/composables inside this library.
56
+
53
57
  ## Usage
54
58
 
55
59
  After registration, you can use components directly in your templates:
@@ -84,12 +88,7 @@ const handleGo = (payload: { route: { routeName: string } }) => {
84
88
  </script>
85
89
 
86
90
  <template>
87
- <FdsWizard
88
- :routes="wizardRoutes"
89
- :activeRouteName="activeRouteName"
90
- :completedTo="0"
91
- @go="handleGo"
92
- >
91
+ <FdsWizard :routes="wizardRoutes" :activeRouteName="activeRouteName" :completedTo="0" @go="handleGo">
93
92
  <template #default="{ currentRoute, currentStepIndex, nextStep, previousStep }">
94
93
  <p>Current step: {{ currentRoute?.name }}</p>
95
94
  <button @click="previousStep">Previous</button>