Download the PHP package quansitech/cus-form without Composer

On this page you can find all versions of the php package quansitech/cus-form. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cus-form

qs-cusform 自定义表单

提示: v2版与v1无法平滑升级,v2版会废弃v1的数据表(不会删除),请确认数据无需继承的场景下再执行升级操作 v1版本文档

v2版本是基于alibaba/formilyalibaba/designable开发的零代码自定义表单扩展,大大简化原来designable对于用户不优化的操作界面,仅留下必须的部分组件和控制选项,降低用户的使用和学习门槛,并与qscmf无缝整合。

效果图

用法

1.安装及执行迁移

2. 配置

在根目录的PackageConfig.php文件添加配置项,配置项说明看注释

3.表单管理页

地址 http://[host]:[port]/admin/Form/index

API说明

自定义验证器

  1. 在Schema\Validator 新增新的验证类
  2. 继承BaseValidator基类
  3. 实现validate 和 errorMsg方法, validate负责对数据进行验证, errorMsg返回验证失败时的错误提示

用例

1. 后台获取用户提交的表单数据

2. 生成自定义表单的jsonSchema

3. 保存表单内容

4. 生成用户提交的内容 jsonSchema

5. 固定字段与自定义字段结合

6.前台获取自定义表单

安装扩展

开发步骤

node 18.19.0

  1. clone 本仓库到本地

  2. clone quansitech/qs-formily (github.com)到js/packages

  3. clone alibaba/formily: Alibaba Group Unified Form Solution -- Support React/ReactNative/Vue2/Vue3 (github.com)将packages改名formilySrc,并移到js文件夹下(仅调试formily的源码时才需要)

  4. 在js目录下执行npm i

  5. cd js/formily/antd npm run start 进入开发调试模式;npm run build:playground 编译打包js

编译步骤

node 18.19.0

  1. clone 本仓库到本地

  2. 在js目录下执行npm i

  3. cd js/formily/antd npm run build:playground 编译打包js

如何自定义组件

  1. 自定义组件分两种情况

    • 组件需要与formitem进行属性映射

      需要通过 @formily/react 的connect和mapRrops接口进行属性映射,可参考@formily相关文档及@formily/antd 的源码

    • 无需与formitem属性映射

      定义普通的react组件即可

  2. 在js/formily/antd/src/components下新增组件文件夹,增加behavior和resource接口,用于定义组件在designable的展示及预置行为。 如果需要给组件添加固定属性,可以在createResource方法中传入固定属性参数;

    如组件中需要用到Config配置,可定义init方法,并将组件通过addInitComponent注册进初始化列表。

  3. 在js/formily/antd/src/schemas添加组件的配置选项

  4. 在js/formily/antd/src/locales中添加中英对照

  5. 如需要添加自定义属性组件,可在js/formily/setters/src/components下新增组件

v3升级

think-core v13升级后,builder的display方法启用,以及上传接口的改变,旧oss模块弃用,改用新的qscmf-formitem-object-storage来代替,v3做了这方便的兼容处理

v3会删除v1的废弃数据表,需要自行处理数据备份。


All versions of cus-form with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2.0
tiderjian/think-core Version >=11.0
quansitech/qscmf-formitem-aliyun-oss Version ^1.6.0
quansitech/qscmf-utils Version >=1.5.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package quansitech/cus-form contains the following files

Loading the files please wait ....