Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

SurveyJS Builder example with VueJS and Bootstrap-Materialhttp://surveyjs.io/Library

NotificationsYou must be signed in to change notification settings

surveyjs/surveyjs-vue-bootstrap-material

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[![Build Status][travis-badge]][travis-badge-url]

How to run this sample application

For detailed explanation on how VueJS things work, checkout theguide anddocs for vue-loader.

Add survey component on your page

index.html

<!DOCTYPE html><html><head><metacharset="utf-8"><metahttp-equiv="X-UA-Compatible"content="IE=edge"><metaname="viewport"content="width=device-width,initial-scale=1.0"><linkrel="icon"href="<%= BASE_URL %>favicon.ico"><title>surveyjs-vue-bootstrap-material</title><scriptsrc="https://unpkg.com/jquery"></script><linkrel="stylesheet"href="https://unpkg.com/bootstrap@3.3.7/dist/css/bootstrap.min.css"><scriptsrc="https://unpkg.com/bootstrap-material-design@0.5.10/dist/js/material.js"></script><scriptsrc="https://unpkg.com/bootstrap-material-design@0.5.10/dist/js/ripples.js"></script><linkrel="stylesheet"href="https://unpkg.com/bootstrap-material-design@0.5.10/dist/css/bootstrap-material-design.css"><linkrel="stylesheet"href="https://unpkg.com/bootstrap-material-design@0.5.10/dist/css/ripples.css"></head><body><noscript><strong>We're sorry but my-project doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><divid="app"></div><!-- built files will be auto injected --></body><script>window.$.material.init();</script></html>

VueJS component

<template><divid="app"><imgsrc="./assets/logo.png">    <!-- If you want to show survey, uncomment the line below -->    <!-- <survey :survey="survey"></survey> -->    <!-- If you want to show survey editor, uncomment the line below -->    <!-- <survey-editor></survey-editor> --><survey-editor></survey-editor></div></template><script>//In your VueJS App.vue or yourComponent.vue file add these lines to importimport SurveyEditor from './components/SurveyEditor'import * as SurveyVue from 'survey-vue'import 'bootstrap/dist/css/bootstrap.css';var Survey = SurveyVue.SurveySurvey.cssType = "bootstrap";//If you want to add custom widgets package//Add these importsimport * as widgets from "surveyjs-widgets";import "inputmask/dist/inputmask/phone-codes/phone.js";//And initialize widgets you are want ti usewidgets.icheck(SurveyVue);widgets.select2(SurveyVue);widgets.inputmask(SurveyVue);widgets.jquerybarrating(SurveyVue);widgets.jqueryuidatepicker(SurveyVue);widgets.nouislider(SurveyVue);widgets.select2tagbox(SurveyVue);widgets.signaturepad(SurveyVue);widgets.sortablejs(SurveyVue);widgets.ckeditor(SurveyVue);widgets.autocomplete(SurveyVue);widgets.bootstrapslider(SurveyVue);export default{name:'app',components:{    Survey,    SurveyEditor},data(){//Define Survey JSON//Here is the simplest Survey with one text questionvar json={elements:[{type:"text",name:"customerName",title:"What is your name?",isRequired:true}]};//Create the model and pass it into VueSJ Survey componentvarmodel=newSurveyVue.Model(json)//You may set model properties// model.mode="display"return{survey:model}}}</script>

About

SurveyJS Builder example with VueJS and Bootstrap-Materialhttp://surveyjs.io/Library

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors3

  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp