npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-questionare-generator

v1.0.0

Published

基于element plus的问卷调查组件

Downloads

17

Readme

vue-questionare-generator

问卷设计器的基础模板,基于questionare-generator-core核心校验库封装的一款默认组件

该组件面向不进行大量样式自定义的开发者

如需自定义组件可以单独使用核心校验工具自主设计组件


安装

使用npm进行安装

npm i vue-questionare-generator

使用yarn进行安装

yarn add vue-questionare-generator

引入

完整引入

完整引入提供全部题型的完整组件

import { QuestionareGenerator } from 'vue-questionare-generator'

按需引入

按需引入对应题目组件,配置单位更加轻量

import { BlanksFilling } from 'vue-questionare-generator' // 引入填空题组件
import { MultipleChoice } from 'vue-questionare-generator' // 引入多选题组件
import { SingleChoice } from 'vue-questionare-generator' // 引入单选题组件
import { Proportion } from 'vue-questionare-generator' // 引入比重题组件
import { Ranking } from 'vue-questionare-generator' // 引入排序题组件
import { Scoring } from 'vue-questionare-generator' // 引入打分题组件

使用

完整引入的使用方式

import { QuestionareGenerator } from 'vue-questionare-generator'

const testData = {
  questionImage: '',
  questionTitle: '问卷标题',
  questionRemark: '感谢您能抽出几分钟时间来参加本次答题,现在我们就马上开始吧!',
  isQuestionNumber: true,
  isQuestionType: true,
  data: [
    {
      id: 1,
      title: '请选择一个选项',
      type: 'single-choice',
      must: true,
      options: [{ label: '选项名称', value: 1 }, { label: '选项名称', value: 2 }]
    },
    {
      id: 2,
      title: '请选择一个或多个选项',
      type: 'multiple-choice',
      must: true,
      options: [{ label: '选项名称', value: 1 }, { label: '选项名称', value: 2 }]
    },
    {
      id: 3,
      title: '请选择一个或多个选项',
      type: 'multiple-choice',
      must: true,
      options: [{ label: '选项名称', value: 1 }, { label: '选项名称', value: 2 }]
    },
    {
      id: 4,
      title: '请填写本项内容',
      type: 'blanks-filling',
      must: true
    },
    {
      id: 5,
      title: '请给本项打分',
      type: 'scoring',
      must: true,
      fractionType: 5
    },
    {
      id: 6,
      title: '请给以下选项排序',
      type: 'ranking',
      must: false,
      options: [{ label: '选项名称', value: 1 }, { label: '选项名称', value: 2 }]
    }
  ]
}

return (
  <QuestionareGenerator data={ testData } />
)

按需引入的使用方式

import { BlanksFilling } from 'vue-questionare-generator'

const testData = [{
  id: 4,
  title: '请填写本项内容',
  type: 'blanks-filling',
  must: true
}]

return (
  <BlanksFilling data={ testData } />
)

QuestionareGenerator组件参数

|名称|类型|说明|是否必传|默认值|可选值| |:----|:----|:----|:----|:----|:----| |data|array|问卷数据|true|[]|-| |theme|string|问卷主题|false|default|-| |isOnePageOneQuestion|boolean|是否开启一页一题|false|false|true|