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 🙏

© 2026 – Pkg Stats / Ryan Hefner

k-form-design-ext

v3.7.4

Published

基于k-form-design进行的儿此扩展

Readme

表单设计器 k-form-design

简介

本扩展是在k-form-design基础上做了部分扩展修改, 扩展属性有:appendAttr,notAppendAttr 扩展方法有:getJson()

使用方式

<template>
  <div>
    <k-form-design ref="kdf" :appendAttr="appendAttr" />
    <div @click="getData()">
      点击我获取JSON
    </div>
  </div>
</template>
<script>
export default {
  name: "Index",
  props: {
    val: {
      default: null,
      type: String
    }
  },
  data() {
    return {
      appendAttr: [
        {
          /* 键名 */
          key: "unit",
          /* 渲染组件 */
          rend: require("./unit").default,
          /* true代表所有控件追加,数组代表指定那些控件追加 */
          field: true
        }
      ]
    };
  },
  watch: {},
  mounted() {},
  methods: {
    getData() {
      const data = this.$refs["kdf"].getJson();
      console.log(data);
      /* {
        "list": [
          {
            "type": "input",
            "label": "输入框",
            "options": {
              "type": "text",
              "width": "100%",
              "defaultValue": "",
              "placeholder": "请输入",
              "clearable": false,
              "maxLength": null,
              "hidden": false,
              "disabled": false
            },
            "model": "input_1612430608558",
            "key": "input_1612430608558",
            "rules": [
              {
                "required": false,
                "message": "必填项"
              }
            ],
            "unit": "我是单位"
          }
        ],
        "config": {
          "layout": "horizontal",
          "labelCol": {
            "xs": 4,
            "sm": 4,
            "md": 4,
            "lg": 4,
            "xl": 4,
            "xxl": 4
          },
          "wrapperCol": {
            "xs": 18,
            "sm": 18,
            "md": 18,
            "lg": 18,
            "xl": 18,
            "xxl": 18
          },
          "hideRequiredMark": false,
          "customStyle": ""
        }
      }
      */
    }
  }
};
</script>

扩展属性如何编写组件,以下是一个组件是实例

<template>
  <div>
    单位:
    <input v-model="value" />
  </div>
</template>
<script>
export default {
  name: "Unit",
  props: {
    val: {
      default: "",
      type: String
    }
  },
  data() {
    return {
      value: ""
    };
  },
  watch: {
    value: function(val) {
      this.$emit("update:val", val);
    },
    val: function(val) {
      if (val !== this.value) {
        this.value = val;
      }
    }
  },
  mounted() {
    this.$emit("update:val", this.value);
  },
  methods: {}
};
</script>

如何安装与引用请前往k-form-design原组件进行查阅文档。