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

Add CDN example #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,74 @@ components: {
}
```

**or**

from CDN

<a href='https://cdn.jsdelivr.net/npm/vue-good-wizard@latest/dist/vue-good-wizard.min.js'>https://cdn.jsdelivr.net/npm/vue-good-wizard@latest/dist/vue-good-wizard.min.js</a>

```html
<div id="app">
<vue-good-wizard
:steps="steps"
:onNext="nextClicked"
:onBack="backClicked">
<div slot="page1">
<h4>Step 1</h4>
<p>This is step 1</p>
</div>
<div slot="page2">
<h4>Step 2</h4>
<p>This is step 2</p>
</div>
<div slot="page3">
<h4>Step 3</h4>
<p>This is step 3</p>
</div>
<div slot="page4">
<h4>Step 4</h4>
<p>This is step 4</p>
</div>
</vue-good-wizard>
</div>

<script>

new Vue({
el: '#app',
data: {
steps: [
{
label: 'Select Items',
slot: 'page1',
},
{
label: 'Add Constraints',
slot: 'page2',
},
{
label: 'Review',
slot: 'page3',
},
],
},
methods: {
nextClicked(currentPage) {
console.log('next clicked', currentPage)
return true; //return false if you want to prevent moving to next page
},
backClicked(currentPage) {
console.log('back clicked', currentPage);
return true; //return false if you want to prevent moving to previous page
}
},
})

</script>

```


## Example Usage

```html
Expand Down