npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

dd-form-render

v1.1.4

Published

XDK低代码量表渲染器

Downloads

6

Readme

XDK低代码平台量表渲染器

基本信息

  • 作者:XDK-湛亚磊
  • 版本:1.1.4
  • 描述:
      1. 为了方便XDK平台的量表开发,开发了一套低代码的量表。其中dd-form-render是量表渲染器,用于将量表渲染成页面。
      1. 借鉴了VForm的思路,在开发过程中VFrom只是做了拖拽和渲染这些。但是,我们业务需要组件关联数据,并计算和分析结果。所以,我们在VForm的基础上,开发了dd-form-render,用于快速生成量表。
      1. VForm使用了Vue3+vite。但是作者在代码开发过程中,使用了大量的vue2的用法。所以,我们对此进行了vue3的改造重写。后续的话可能会考虑使用TS重写。

使用方法

    1. 安装
    • npm install dd-form-render
    • yarn add dd-form-render
    1. 使用
    import ElementPlus from 'element-plus'  //引入element-plus库
    import 'element-plus/dist/index.css'  //引入element-plus样式
    import 'dd-form-render/dist/render.style.css'  //引入VFormRender样式
    import DdFormRender from 'dd-form-render'
    app.use(DdFormRender)
    1. 页面引用
    <template>
      <div>
        <dd-form-render :form-json="formJson" :form-data="formData" :option-data="optionData"
                       ref="vFormRef">
        </dd-form-render>
        <el-button type="primary" @click="submitForm">Submit</el-button>
      </div>
    </template>
      
    <script setup>
    import {ref, reactive} from 'vue'
    import {ElMessage} from 'element-plus'
      
    /* 注意:formJson是指表单设计器导出的json,此处演示的formJson只是一个空白表单json!! */
    const formJson = reactive({
      "widgetList": [],
      "formConfig": {
        "modelName": "formData",
        "refName": "vForm",
        "rulesName": "rules",
        "labelWidth": 80,
        "labelPosition": "left",
        "size": "",
        "labelAlign": "label-left-align",
        "cssCode": "",
        "customClass": "",
        "functions": "",
        "layoutType": "PC",
        "jsonVersion": 3,
        "onFormCreated": "",
        "onFormMounted": "",
        "onFormDataChange": "",
        "onFormValidate": ""
      }
    })
    const formData = reactive({})
    const optionData = reactive({})
    const vFormRef = ref(null)
      
    const submitForm = () => {
      vFormRef.value.getFormData().then(formData => {
        // Form Validation OK
        alert(JSON.stringify(formData))
      }).catch(error => {
        // Form Validation failed
        ElMessage.error(error)
      })
    }
    </script>