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

jsmom-form

v1.0.36

Published

表单组件

Downloads

22

Readme

表单组件

安装

npm i jsmom-form -S

or

yarn add jsmom-form

使用

  • 引入
    import MyForm from "jsmom-form";
  • 注册
    components: {
        MyForm,
    }
  • 页面
    <MyForm></MyForm>

配置

  • fieldData 字段配置 Array<Object>

    • name string 字段名
    • text string 展示文本
    • formType String 类型 select|cascader|selectData|textarea|datetime|date|calendar|images|file|number|switch|content|text|html|radio
    • enumName string 枚举名
    • formRules Array<Object>|Function 表单验证规则
    • formSpan Number 表单占栅格数 最大 24
    • inputStyle String 表单输入项 style
    • selectMultiple Boolean 多选
    • clearable Boolean 可被清理
    • optionLoading Boolean|Function 选择列表加载中
    • isLazy Boolean 懒加载(级联选择)
    • lazyLoadFunction Function 懒加载函数(级联选择)
    • showAllLevels Function 显示所有级(级联选择)
    • isCheckStrictly Boolean 父子不关联(级联选择)
    • isCollapseTags Boolean 折叠选项
    • selectOption Array<Object>|Function 选择项
    • allowCreate Boolean 手动创建选择项
    • filterable Boolean 是否可搜索 手动创建开启时必须为 true
    • defaultFirstOption Boolean 回车时选择第一个
    • dateType String 日期类型 year|month|date|dates| week|datetime|datetimerange|daterange|monthrange
    • selectTable String 选择表
    • selectParams Object|Function 选择额外的参数(selectData)
    • formEventMaps Object<Function> 表单多动态事件
      • beforeUpload 图片上传前
    • selectBind Object<Function> 关联其他字段(selectData)
    • disabled Boolean|Function 禁用表单
    • valueFormat String 格式化时间值
    • textareaRowNum Number 文本域显示行数
    • limit Number 限制文件图片数量
    • showStepControls Boolean 显示步进控制条
    • numberMin Number|Function 最小数值
    • numberMax Number|Function 最大数值
    • numberPrecision Number 数值精度
    • numberStep Number 步进值
    • switchActiveValue Number|String|Boolean 开关打开时的的值
    • switchinactiveValue Number|String|Boolean 开关关闭时的值
    • uploadUrl String|Function 文件上传 URL
    • checkUrl String|Function 检查服务器文件是上传情况
    • mergeUrl String|Function 请求文件合并 URL
    • fromTable String 文件关联表
    • downloadUrl String|Function 文件下载
    • placeholder String 表单占位符
    • fileList Array<Object> 附件时,文件列表
    • action String|Function 图片文件上传地址
    • imageUrl String|Function 图片预览地址 将替换$id
    • listType String 图片组件类型
    • showFormItem Boolean|Function 显示在表单中
    • showPreviewItem Boolean|Function 显示在预览中
    • initalValue any 初使值
    • formatterFunction Function 格式化方法
    • ~~postFormatterDataFunction Function 添加更新时的数据格式化~~
    • ~~editFormatterDataFunction Function 编辑时的数据格式化~~
    • downloadUrl String 下载链接 替换$id
    • formatTextFunction Function 格式化自定义日历的内容
    • formLabelWidth String|Number 单标签宽度
    • formOnClick Function 点击表单事件
    • formatterFormFunction Function 格式化表单方法 参数 { formData, value }
  • isPreview 预览 Boolean

  • size 组件大小 String medium|small|mini

  • configData Object

    • editLabelWidth String 标签宽度
    • headers Object 请求头信息
    • baseApi String 请求地址