Skip to content

Commit

Permalink
Migrate to vue 3
Browse files Browse the repository at this point in the history
Signed-off-by: Raimund Schlüßler <[email protected]>
  • Loading branch information
raimund-schluessler committed Dec 21, 2023
1 parent c1154b3 commit 1d6df36
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
export * from './components/index.js'

export * from './composables/index.js'
// Not yet adjusted for vue3
// export * from './functions/index.js'
export * from './functions/index.js'
export * from './directives/index.js'
export * from './mixins/index.js'

Expand Down
4 changes: 2 additions & 2 deletions src/utils/ValidateChildren.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
import Vue from 'vue'
import { warn } from 'vue'

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

// cleanup
vm.$children.splice(index, 1)
Expand Down
4 changes: 2 additions & 2 deletions src/utils/ValidateSlot.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
import Vue from 'vue'
import { warn } from 'vue'

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

// cleanup
Expand Down

0 comments on commit 1d6df36

Please sign in to comment.