Skip to content

Commit 1d6df36

Browse files
Migrate to vue 3
Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
1 parent c1154b3 commit 1d6df36

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

src/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
export * from './components/index.js'
2424

2525
export * from './composables/index.js'
26-
// Not yet adjusted for vue3
27-
// export * from './functions/index.js'
26+
export * from './functions/index.js'
2827
export * from './directives/index.js'
2928
export * from './mixins/index.js'
3029

src/utils/ValidateChildren.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* along with this program. If not, see <http://www.gnu.org/licenses/>.
2020
*
2121
*/
22-
import Vue from 'vue'
22+
import { warn } from 'vue'
2323

2424
/**
2525
* Validate children of a vue component
@@ -38,7 +38,7 @@ const ValidateChildren = (vm, allowed) => {
3838
// that you import with import myActionWrapper from 'myActionWrapper'
3939
if (!(isChildren || isWrappedChildren)) {
4040
// warn
41-
Vue.util.warn(`${child.$options.name} is not allowed inside the ${vm.$options.name} component`, vm)
41+
warn(`${child.$options.name} is not allowed inside the ${vm.$options.name} component`, vm)
4242

4343
// cleanup
4444
vm.$children.splice(index, 1)

src/utils/ValidateSlot.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* along with this program. If not, see <http://www.gnu.org/licenses/>.
2020
*
2121
*/
22-
import Vue from 'vue'
22+
import { warn } from 'vue'
2323

2424
/**
2525
* Validate children of a vue component
@@ -45,7 +45,7 @@ const ValidateSlot = (slots, allowed, vm) => {
4545
// only warn when html elment or forbidden component
4646
// sometimes text nodes are present which are hardly removeable by the developer and spam the warnings
4747
if (isHtmlElement || isForbiddenComponent) {
48-
Vue.util.warn(`${isHtmlElement ? node.tag : node.componentOptions.tag} is not allowed inside the ${vm.$options.name} component`, vm)
48+
warn(`${isHtmlElement ? node.tag : node.componentOptions.tag} is not allowed inside the ${vm.$options.name} component`, vm)
4949
}
5050

5151
// cleanup

0 commit comments

Comments
 (0)