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

@94ai-plus/nf-form-item

v1.0.0

Published

Vue 3 form-item component for CommonUI Plus

Readme

@94ai-plus/nf-form-item

HomePage

官网 · 项目仓库

配套表单项,保留 Element Plus 字段校验、标签与错误插槽,并接入表单折叠。

安装

yarn add @94ai-plus/nf-form-item vue element-plus
import { createApp } from 'vue'
import App from './App.vue'
import NfFormItem from '@94ai-plus/nf-form-item'
import 'element-plus/dist/index.css'
import '@94ai-plus/nf-form-item/style.css'

const app = createApp(App)
app.use(NfFormItem)

也可从 @94ai-plus/common-ui 具名导入 NfFormItem,或使用 @94ai-plus/common-ui-resolver 自动导入组件和主题样式。 OEM 主题使用 @94ai-plus/nf-theme-oem/nf-form-item.css 替代默认组件样式,不要重复引入两份主题总样式。

示例

以下示例采用总包演示,需安装 @94ai-plus/common-ui;单包使用时按上面的方式导入组件和样式。

<script setup>
import { reactive, ref } from 'vue'
import { ElInput } from 'element-plus'
import { NfConfigProvider, NfForm, NfFormItem, NfButton } from '@94ai-plus/common-ui'
const form = ref()
const model = reactive({ name: '', email: '', city: '', team: '' })
const result = ref('')
const rules = { name: [{ required: true, message: 'Name is required', trigger: 'blur' }] }
async function validate() { try { await form.value.validate(); result.value = 'valid' } catch { result.value = 'invalid' } }
</script>

<template>
  <NfConfigProvider theme="chalk" locale="zh-CN">
    <NfForm ref="form" :model="model" :rules="rules" label-width="80px" :columns="3" @is-collapse-change="expanded => result = 'expanded: ' + expanded">
      <NfFormItem v-for="key in Object.keys(model)" :key="key" :label="key" :prop="key"><ElInput v-model="model[key]" /></NfFormItem>
      <NfFormItem>
        <NfButton type="primary" @click="validate">Validate</NfButton>
        <NfButton @click="form.resetFields()">Reset</NfButton>
      </NfFormItem>
    </NfForm>
    <output>{{ result }}</output>
  </NfConfigProvider>
</template>

迁移说明

搭配 NfForm 使用;hidden 表示不参与折叠,不是隐藏。使用 Vue 3 的 v-model 和 Element Plus 校验规则,不能沿用 Element UI 的私有实例属性。

提供 ESM、CJS、browser ES、UMD、声明文件和独立 CSS;浏览器产物仅外置 Vue / Element Plus。 完整属性、事件、插槽和方法见组件文档。

全局默认配置

通过总包的 NfConfigProvider 的 nfFormItem 配置项设置默认属性。支持响应式更新和嵌套继承,优先级为组件显式属性 → 最近一层配置 → 外层配置 → 组件原有默认值。undefined 继续继承,false、0 和空字符串保留;按属性合并,数组、对象和函数整体替换,不深度合并。初始化选项仍按组件原有生命周期生效,事件、插槽和原生 attributes 在组件上设置,必填业务数据仍需显式提供。详见全局配置文档。

Contributors

感谢每一位参与项目建设的贡献者!

最近三个月的贡献者气泡图

最近三个月的贡献者头像墙(使用姓名首字母)

以上为随本版本发布的贡献者统计快照,统计日期与分支见图中说明;仅统计 Git 非合并提交,头像使用姓名首字母,不是 GitLab 个人照片。

License

本项目采用 MIT License 开源许可。

Copyright (c) 2026-present Jiahe Zou, 94 Intelligent Technology Co., Ltd.