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 🙏

© 2025 – Pkg Stats / Ryan Hefner

sun-form-v3

v1.0.201

Published

`sun-form-v3` 是基于 `vue3`+`tailwindcss` 所编写的低代码框架引擎,其中 UI 基于 `element-plus`,表格基于 `vxe-table`。定位为前端开发人员提供快速搭建页面、实现不仅仅是表单的数据交互。

Readme

关于 sun-form-v3

0.简介

sun-form-v3 是基于 vue3+tailwindcss 所编写的低代码框架引擎,其中 UI 基于 element-plus,表格基于 vxe-table。定位为前端开发人员提供快速搭建页面、实现不仅仅是表单的数据交互。

sun-form-v3 由设计器designer和渲染器sunForm两个组件构成。

sun-form-v3 提供了非常丰富的组件属性、表单交互和 api 方法等,可通过拖转或单击生成你想要的页面。

1.安装

 npm i sun-form-v3@latest
 npm i [email protected]
 npm i @element-plus/[email protected]
 npm i [email protected]

2.引入并全局注册sun-form-v3组件

import { createApp } from "vue";

import App from "./App.vue";
import ElementPlus from "element-plus";
import "sun-form-v3/dist/style.css";
import "element-plus/dist/index.css";
import zhCn from "element-plus/dist/locale/zh-cn.mjs";
import sunFormV3 from "sun-form-v3";
import VxeUITable from "vxe-table";

import "vxe-table/lib/style.css";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
const app = createApp(App);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}
app
  .use(sunFormV3)
  .use(ElementPlus, {
    locale: zhCn,
  })
  .use(VxeUITable)
  .mount("#app");

3.在 Vue3 模版中使用设计器组件

<script setup>
import { ref, watch, onMounted } from "vue";
//请求成功回调
const httpSuccessHandle = (res) => {
  console.log(res);
};
//请求失败回调
const httpErrorHandle = (err) => {
  console.log(err);
};
//请求之前发送参数
const httpBeforeSendHandle = () => {
  return {};
};
//每个请求所带的前缀
const baseUrl = "/api";
//请求头
const headers = {
  //比如store中的token放在请求头中
  token: "***",
};
//低代码组件传递的事件,如:低代码中按钮点击事件传递到项目中可以再此接收
const componentEvent = (params) => {
  console.log(params);
};
</script>

<template>
  <div class="h-screen">
    <designer
      ref="des"
      :httpSuccessHandle="httpSuccessHandle"
      :httpErrorHandle="httpErrorHandle"
      :httpBeforeSendHandle="httpBeforeSendHandle"
      :baseUrl="baseUrl"
      :headers="headers"
      @componentEvent="componentEvent"
    >
      <div>我是弹窗插槽内容</div>
    </designer>
  </div>
</template>

<style scoped></style>

4.在 Vue3 模版中使用渲染器组件

<template>
  <sunForm
    :widgetConfig="widgetConfig"
    :httpSuccessHandle="httpSuccessHandle"
    :httpErrorHandle="httpErrorHandle"
    :httpBeforeSendHandle="httpBeforeSendHandle"
    :baseUrl="baseUrl"
    :headers="headers"
    @componentEvent="componentEvent"
    ref="formRef"
  >
  </sunForm>
</template>

<script setup>
import { ref, reactive, nextTick } from "vue";
const widgetConfig = ref(null);
const httpSuccessHandle = (res) => {};
const httpErrorHandle = (err) => {};
const httpBeforeSendHandle = () => {
  return {};
};
const baseUrl = "/api";
const headers = {};
const formRef = ref(null);
//获取低代码所有的方法
const getDesigner = () => {
  return formRef.value.designer;
};
defineExpose({
  getDesigner: getDesigner,
});
getConfig();
</script>

<style scoped lang="scss"></style>