@acrossthecloud/survey-react 中文文档教程

发布于 4年前 浏览 9 项目主页 更新于 3年前

SurveyJS is a JavaScript Survey and Form Library.

SurveyJS 是一种向您的网站添加调查和表格的现代方式。 它有 angular2+、jQuery、knockout、react 和 vue 的版本。

构建状态软件许可使用 TestCafe 测试 Issues 关闭的问题

Documentation

SurveyJS 库文档

Live Examples

SurveyJS 库直播示例

Survey Creator / Form Builder

立即创建您的调查或表格

Survey Creator 来源是 此处

Export Survey to PDF

导出为 pdf 概览

导出为 PDF 源 这里

More info about SurveyJS

alt tag

SurveyJS 是目前可用的功能最丰富的调查/表单库。 它可以很容易地定制和扩展以满足您的需求。

Main Features

A lot of question types with a lot of built-in functionalities.

Multiple Pages Support

您可能会创建一个包含很多页面的非常复杂的表单,例如这个

Dynamically change survey logic and questions content

Localization and Multiple language support

Appearance and custom Rendering

Frequently used functionalities

To find out more about the library go

You can use our quickstart repos:

Getting started

使用 npm 安装库。

Angular2 版本:

npm install survey-angular

jQuery 版本:

npm install survey-jquery

Knockout 版本:

npm install survey-knockout

React 版本:

npm install survey-react

Vue 版本:

npm install survey-vue

或使用 Azure CDN:

  • https://surveyjs.azureedge.net/{version-number}/survey.angular.min.js
  • https://surveyjs.azureedge.net/{version-number}/survey.ko.min.js
  • https://surveyjs.azureedge.net/{version-number}/survey.react.min.js
  • https://surveyjs.azureedge.net/{version-number}/survey.jquery.min.js
  • https://surveyjs.azureedge.net/{version-number}/survey.vue.min.js

您可以在 surveyjs/build repo 中找到所有版本/构建

或者从 Releases 下载一个版本作为 zip 文件

如果你想在另一个脚本中导入它:

import * as Survey from "survey-jquery";

Building survey.js from sources

要自己构建库:

  1. 从 GitHub 克隆存储库

    git clone https://github.com/surveyjs/survey-library.git
    cd survey-library
    
  2. 获取构建依赖项。确保您已安装 Node.js在您的工作站上。 您需要 Node.js 版本高于 6.0.0 且 npm 版本高于 2.7.0。 这只需要从源代码构建 surveyjs。

    npm install -g karma-cli
    npm install
    
  3. 构建库

    npm run build_prod
    

    之后,您应该在“packages”目录中拥有库(angular、jquery、knockout、react 和 vue)。

  4. 运行示例

    npm start
    

    此命令将在 http://localhost:7777 运行本地 http 服务器 可以打开http://localhost:7777/examples/knockout查看KnockoutJS示例,http://localhost:7777/examples/react查看ReactJS示例等等

  5. 运行单元测试 <代码> 业力开始 此命令将使用 Karma

WordPress integration

SurveyJS WordPress 插件

License

麻省理工学院许可证

SurveyJS is a JavaScript Survey and Form Library.

SurveyJS is a modern way to add surveys and forms to your website. It has versions for angular2+, jQuery, knockout, react and vue.

Build StatusSoftware LicenseTested with TestCafe Issues Closed issues

Documentation

SurveyJS Library Documentation

Live Examples

SurveyJS Library Live Examples

Survey Creator / Form Builder

Create your Survey or Form now

Survey Creator sources are here

Export Survey to PDF

Export to pdf overview

Export to PDF sources are here

More info about SurveyJS

alt tag

SurveyJS is the most feature-rich Survey / Form Library available at the current moment. It can be easily customized and extended to suit your needs.

Main Features

A lot of question types with a lot of built-in functionalities.

Multiple Pages Support

You may create a very complex forms with a lot of pages, like this one.

Dynamically change survey logic and questions content

Localization and Multiple language support

Appearance and custom Rendering

Frequently used functionalities

To find out more about the library go

You can use our quickstart repos:

Getting started

Install the library using npm.

Angular2 version:

npm install survey-angular

jQuery version:

npm install survey-jquery

Knockout version:

npm install survey-knockout

React version:

npm install survey-react

Vue version:

npm install survey-vue

Or use Azure CDN:

  • https://surveyjs.azureedge.net/{version-number}/survey.angular.min.js
  • https://surveyjs.azureedge.net/{version-number}/survey.ko.min.js
  • https://surveyjs.azureedge.net/{version-number}/survey.react.min.js
  • https://surveyjs.azureedge.net/{version-number}/survey.jquery.min.js
  • https://surveyjs.azureedge.net/{version-number}/survey.vue.min.js

You find all versions/builds in the surveyjs/build repo.

Or dowload a version as zip file from Releases

If you want to import it in another script:

import * as Survey from "survey-jquery";

Building survey.js from sources

To build library yourself:

  1. Clone the repo from GitHub

    git clone https://github.com/surveyjs/survey-library.git
    cd survey-library
    
  2. Acquire build dependencies. Make sure you have Node.js installed on your workstation. You need a version of Node.js greater than 6.0.0 and npm greater than 2.7.0. This is only needed to build surveyjs from sources.

    npm install -g karma-cli
    npm install
    
  3. Build the library

    npm run build_prod
    

    After that you should have the libraries (angular, jquery, knockout, react and vue) at 'packages' directory.

  4. Run samples

    npm start
    

    This command will run local http server at the http://localhost:7777 You can open http://localhost:7777/examples/knockout to view KnockoutJS samples, http://localhost:7777/examples/react to view ReactJS samples and so on

  5. Run unit tests karma start This command will run unit tests using Karma

WordPress integration

SurveyJS WordPress plugin

License

MIT license

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文