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

@koala-form/core

v2.0.9

Published

基于Vue3的中后台表单解决方案

Downloads

173

Readme

低代码表单解决方案,让你跟考拉一样“懒”

GitHub issues MIT PRs Welcome Page Views Count

痛点

对于中后台产品的前端开发来说,最常见的场景无非是开发一个表的CURD操作

  • Create:创建表单
  • Update:更新表单
  • Retrieve 查询表单&表格展示
  • Delete:删除

当你开发多个表单页面时,你会发现这些页面除了字段和接口不同,大概有80%的其他逻辑基本一样,但还是少不了那些胶水代码。而Koala Form可以帮你减少这80%的胶水代码

Koala Form 是什么?

Koala Form 是一个表单页面的低代码解决方案。以Vue3为基础,围绕后台产品的表单场景进行封装,使得开发者仅需关注表单页面的字段和接口。

它主要具备以下特点

  • 🚀 高效的 ,从零开发一个完整的表单页面也许需要你花一天或者几个小时,而Koala From也许仅需几分钟,你需要做的就配置字段的展示规则。

  • 🧨 简单的 ,内置基础的表单场景,useScene, useFromuseTableuseModalusePager, 根据传入的字段规则解析,返回场景上下文用于操作场景内容,render函数可以减少了你对UI的关注。

  • 💪 灵活的 ,丰富的场景可以自由组合;所有的字段也支持vueslot; 可扩展自己的插件,render自己的UI。

UI库插件

| 插件 | 介绍 | | ---------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- | | @koala-form/fes-plugin | Fes Design组件库的桥接插件 | | @koala-form/element-plugin | Element Plus组件库的桥接插件 |

Install

npm i @koala-form/core
npm i @koala-form/fes-plugin

Usage

注册全局插件

import '@koala-form/fes-plugin';
import { installPluginPreset } from '@koala-form/core';

// 将依赖的插件安装到全局
installPluginPreset();

写一个简单的表单

<template>
    <KoalaRender :render="render"></KoalaRender>
</template>

<script>
import { KoalaRender, useForm, ComponentType } from '@koala-form/core';

export default {
    components: { KoalaRender },
    setup() {
        const { render } = useForm({
            fields: [
                {
                    name: 'name', // modelRef.value.name可以访问到值
                    label: '姓名', // 表单项的名称
                    defaultValue: '蒙奇·D·路飞', // 默认值
                    components: {
                        name: ComponentType.Input, // 表单组件是输入框
                    },
                },
            ],
        });
        return {
            render
        };
    },
};
</script>

反馈

| Github Issue | KoalaForm社区群 | | ------------------------------------ | ------------------------------------------------------------------------------------------------ | | KoalaForm/issues | 微信添加好友aring_93,邀请进社区群 |

参与共建

我们非常欢迎社区同学能提交 PR:

  1. fork 项目!
  2. 创建你的功能分支: git checkout -b my-new-feature
  3. 本地提交新代码: git commit -am 'Add some feature'
  4. 推送本地到服务器分支: git push origin my-new-feature
  5. 创建一个 PR

如果是发现 Bug 或者期望添加新功能,请提交issue