wave-ui 2.41.0 → 2.42.0
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/dist/wave-ui.cjs.js +1 -1
- package/dist/wave-ui.es.js +4 -3
- package/dist/wave-ui.umd.js +1 -1
- package/package.json +1 -1
- package/src/wave-ui/core.js +6 -2
- package/src/wave-ui/index.js +1 -1
package/package.json
CHANGED
package/src/wave-ui/core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { reactive } from 'vue'
|
|
1
|
+
import { reactive, inject } from 'vue'
|
|
2
2
|
import config, { mergeConfig } from './utils/config'
|
|
3
3
|
import NotificationManager from './utils/notification-manager'
|
|
4
4
|
import colors from './utils/colors'
|
|
@@ -116,6 +116,7 @@ export default class WaveUI {
|
|
|
116
116
|
|
|
117
117
|
// Make waveui reactive and expose the single instance in Vue.
|
|
118
118
|
app.config.globalProperties.$waveui = reactive(this)
|
|
119
|
+
app.provide('$waveui', WaveUI.instance)
|
|
119
120
|
}
|
|
120
121
|
}
|
|
121
122
|
|
|
@@ -124,4 +125,7 @@ export default class WaveUI {
|
|
|
124
125
|
}
|
|
125
126
|
}
|
|
126
127
|
|
|
127
|
-
|
|
128
|
+
/**
|
|
129
|
+
* Returns the WaveUI instance. Equivalent to using `$waveui` inside templates.
|
|
130
|
+
*/
|
|
131
|
+
export const useWaveUI = () => inject('$waveui')
|
package/src/wave-ui/index.js
CHANGED