1.5.2 • Published 1 year ago

wft-generate-form v1.5.2

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

wft-generate-form

适用于uniapp, 该插件将xps-formmaking动态生成的json在uniapp中动态解析出来,大部分功能已处理,部分属性、细节还可以按需进行扩展优化. 依赖于uview-ui,请自行安装

Installation

$ npm install wft-generate-form --save

Usage

<template>
  <view class="index">
    <wft-generate-form ref="wft-generate-form" :data="myJson" />
    <button @tap="submit">提交一下</button>
  </view>
</template>
import { WftGenerateForm, testJson } from "wft-generate-form";
export default {
  data() {
    return {
      myJson: {},
    };
  },
  components: { WftGenerateForm },
  onLoad() {
    setTimeout(() => {
      this.myJson = testJson;
    }, 100);
  },
  methods: {
    submit() {
      this.$refs["wft-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.5.2

1 year ago

1.5.1

1 year ago

1.5.0

1 year ago

1.4.2

1 year ago

1.4.1

1 year ago

1.4.0

1 year ago

1.3.0

1 year ago

1.2.0

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago