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

How to use this stepper in a Vue project? #76

Open
ghost opened this issue May 31, 2019 · 2 comments
Open

How to use this stepper in a Vue project? #76

ghost opened this issue May 31, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented May 31, 2019

I have a project built using Vue Cli. Vuetify has a stepper component, but it has some builtin styles like textarea I don't want to use. So I found this Materialize-stepper.

I want to use it in a component, there is no guide for Vue I don't know how to use it. ..

I added these two lines in index.html

 <script src="https://unpkg.com/[email protected]/dist/js/mstepper.min.js"></script>
 <link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/css/mstepper.min.css">

Then I make a new text.vue file like this, but it's not working. What to do?

<template>
  <div class="test">
      <ul class="stepper linear">
        <li class="step active">
          <div class="step-title waves-effect">E-mail</div>
          <div class="step-content">
            <!-- Your step content goes here (like inputs or so) -->
            <div class="step-actions">
              <!-- Here goes your actions buttons -->
              <button class="waves-effect waves-dark btn next-step">CONTINUE</button>
            </div>
          </div>
        </li>
      </ul>
  </div>
</template>

<script>
var stepper = document.querySelector(".stepper");
var stepperInstace = new MStepper(stepper, {
  // options
  firstActive: 0 // this is the default
});
</script>
<style scoped>
</style>

Then it shows this error, what to do?

mstepper.min.js:10 Uncaught TypeError: Cannot read property 'children' of null
    at mstepper.min.js:10
    at E._init (mstepper.min.js:10)
    at new E (mstepper.min.js:10)
    at eval (test.vue?1174:178)
    at Object../node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/components/test.vue (app.js:774)
    at __webpack_require__ (app.js:679)
    at fn (app.js:89)
    at eval (test.vue?edbc:1)
    at Object../src/components/test.vue (app.js:2019)
    at __webpack_require__ (app.js:679)
@ghost ghost changed the title How to use this stepper in Vue project? How to use this stepper in a Vue project? Jun 2, 2019
@JuanxCursed
Copy link

+1

@Kinark
Copy link
Owner

Kinark commented Jul 4, 2019

Unfortunately there's currently no plans to support Vue. I'm sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants