更新记录

1.4.25(2023-06-30)

增加子表单添加校验

1.4.24(2023-06-29)

xps-upload增加width、height属性

1.4.23(2023-06-13)

xps-picker-radio组件优化

查看更多

平台兼容性

xps-generate-form

适用于uniapp 该插件将formMaking动态生成的json在uniapp中动态解析出来,大部分功能已处理。部分细节可能还得优化。 注意:里面用的组件依赖于uView,请自行安装uView第三方库

Installation

使用DCLOUD导入使用即可

Usage

<template>
  <view class="index">
    <xps-generate-form ref="xps-generate-form" :data="myJson" />
    <button @tap="submit">提交一下</button>
  </view>
</template>
export default {
  data() {
    return {
      myJson: {},
    };
  },
  components: { XpsGenerateForm },
  onLoad() {
    setTimeout(() => {
      // testjson是xps-formmaking动态生成的json
      this.myJson = testJson;
    }, 100);
  },
  methods: {
    submit() {
      this.$refs["xps-generate-form"].getData().then((data) => {
        console.log(data);
      });
    },
  },
};

store/index.js

import Vue from "vue"
import Vuex from 'vuex'
import validate from './modules/validate.js'

Vue.use(Vuex)

export default new Vuex.Store({
    modules: {
        validate
    }
})

store/modules/validate.js

export default {
  namespaced: true,
  state: {
    status: false
  },
  mutations: {
    UPDATE_STATUS(state, status) {
            state.status = status
        }
  }
}

gitee

https://gitee.com/wang-futai/dynamic-form-app

隐私、权限声明

1. 本插件需要申请的系统权限列表:

2. 本插件采集的数据、发送的服务器地址、以及数据用途说明:

插件不采集任何数据

3. 本插件是否包含广告,如包含需详细说明广告表达方式、展示频率:

许可协议

MIT协议

使用中有什么不明白的地方,就向插件作者提问吧~ 我要提问