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

vue-schema-render

v0.1.2

Published

A Form Render Based on JSON Schema for Vue

Downloads

5

Readme

vue-schema-render

A Form Render Based on JSON Schema for Vue

Features

  • 内置 ElementUI 组件
  • 支持自定义组件
  • 支持自由布局
  • 支持样式覆盖
  • 支持多语言
  • 支持列表组件拖拽
  • 支持无限嵌套表单以及嵌套校验,自定义校验规则
  • 支持组件联动
  • 详尽的文档及示例

安装

npm install -S vue-schema-render

使用

入口文件 index.js

// vue-schema-render 依赖 vue, element-ui,必须先引入
import Vue from 'vue';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import App from './app.vue';

Vue.use(ElementUI);

new Vue({
  el: '#app',
  render: h => h(App),
});

app.vue

<template>
  <schema-render
    :schema="schema"
    ref="schemaRender"
  >
  </schema-render>
</template>

<script>
import { SchemaRender } from 'vue-schema-render';
import schema from './schema.js'; // 组件描述文件

export default {
  components: {
    SchemaRender,
  },
  data () {
    return {
      schema,
    };
  },
  methods: {
    async genData () {
      // 获取表单数据
      const data = await this.$refs.schemaRender.genData();
    }
  }
};
</script>

预览

DEMO: click here

TODO

  • [x] 支持更自由的布局
  • [x] 支持列表组件项拖拽
  • [x] 监听自定义事件
  • [x] 表单填写进度
  • [x] 支持 label tooltip
  • [x] 支持 component tip
  • [ ] 支持添加内置组件
  • [ ] 支持组件 slot
  • [ ] 是否保留 onChange