Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nuxt에서 flicking-plugins 사용 시 에러발생 #821

Open
emthrology opened this issue Jul 28, 2023 · 2 comments
Open

nuxt에서 flicking-plugins 사용 시 에러발생 #821

emthrology opened this issue Jul 28, 2023 · 2 comments
Assignees
Labels
🔖4.x v4.x~ related issue 🐛Bug Bugs

Comments

@emthrology
Copy link

emthrology commented Jul 28, 2023

Description

<template>
    <Flicking :options="options" :plugins="autoplay">
      <slot></slot>
  </Flicking>
</template>

<script>
import { Autoplay } from "@egjs/flicking-plugins";
import common from '@/utils/common.js'
export default {
  name: 'flicking-slide',
  mixins: [common],
  props: {
    options: {
      type: Object,
      default: {}
    },
  },
  computed: {
    plugins() {
      return [new Autoplay({
        duration: 3000,
        direction: "NEXT",
        easing: function (x) {
          return 1 - Math.pow(1 - x, 3);
        },
      })]
    }
  },
  created () {
    this.autoplay = plugins;
  },
  data() {
    return {
      autoplay: null,
    }
  },


}
</script>

Flicking은 nuxt plugins 폴더에 선언해서 쓰고있습니다.
위와 같이 컴포넌트를 구성하여 화면에 쓰려고 했는데
flicking.esm.js 파일에서 에러가 발생합니다

Steps to check or reproduce

@malangfox
Copy link
Contributor

안녕하세요 @emthrology 님.

남겨주신 현상과 관련하여 어떠한 에러 메시지가 표시되는지 저희가 확인해볼 수 있을까요?

@emthrology
Copy link
Author

emthrology commented Jul 28, 2023

안녕하세요 @emthrology 님.

남겨주신 현상과 관련하여 어떠한 에러 메시지가 표시되는지 저희가 확인해볼 수 있을까요?

TypeError: Cannot convert undefined or null to object
    at slice (<anonymous>)
    at __proto.update (list-differ.esm.js:385:1)
    at VueComponent._checkPlugins (flicking.esm.js:506:1)
    at VueComponent.updated (flicking.esm.js:440:1)
    at invokeWithErrorHandling (vue.runtime.esm.js:3017:1)
    at callHook$1 (vue.runtime.esm.js:4031:1)
    at callUpdatedHooks (vue.runtime.esm.js:4154:1)
    at flushSchedulerQueue (vue.runtime.esm.js:4140:1)
    at Array.eval (vue.runtime.esm.js:3143:1)
    at flushCallbacks (vue.runtime.esm.js:3065:1)

이렇게 드려도 될까요

@malangfox malangfox self-assigned this Jul 28, 2023
@malangfox malangfox added 🐛Bug Bugs 🔖4.x v4.x~ related issue labels Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔖4.x v4.x~ related issue 🐛Bug Bugs
Projects
None yet
Development

No branches or pull requests

2 participants