🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

wft-generate-form

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wft-generate-form

基于web端xps-formmaking生成的json在uniapp中动态解析

latest
npmnpm
Version
1.5.2
Version published
Weekly downloads
21
-27.59%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

wft

FAQs

Package last updated on 17 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts