更新记录

1.0.4(2024-05-13)

调整

1.0.3(2024-05-13)

优化 rule 提示位置

1.0.2(2024-05-11)

优化界面,引入loadsh,方便后续扩展

查看更多

平台兼容性

Vue2 Vue3
App 快应用 微信小程序 支付宝小程序 百度小程序 字节小程序 QQ小程序
HBuilderX 3.1.0 app-nvue × × × × ×
钉钉小程序 快手小程序 飞书小程序 京东小程序
× × × ×
H5-Safari Android Browser 微信浏览器(Android) QQ浏览器(Android) Chrome IE Edge Firefox PC-Safari

hn-form-page

通过数据驱动生成表单页

<template>
    <formPage  v-model="form" :attrs="config"></formPage>
</template>

<script setup lang="ts">
    import { ref } from "vue";
    import formPage from '@/uni_modules/hn-form-page/components/form-page/form-page.vue'
    import { IFormAttrs } from '@/uni_modules/form-page/types/index'

    uni.setNavigationBarColor({
        frontColor: "#000000",
        backgroundColor: '#f6faff'
    })

    const config = ref<IFormAttrs>({
        isRow: true,
        // hideSubmit:true,
        // hideReset:true,
        form: {
            props: {
                labelWidth: '180rpx',
            }
        },
        submit: async (data, back) => {
            await back({
                title:"", //弹窗提示
                duration:"", // 弹窗时间
                back:()=>{} //不填写默认返回上一级页面
            }) 
        },
        inputs: [
            {
                label: "物品照片",
                type: 'image', // 图片列表
                prop: "photos"
            },
            {
                label: "物品照片",
                type: 'takePhoto', //人像
                prop: "photo"
            },
            {
                label: "商品描述",
                type: 'textarea',
                prop: "remark"
            },
            {
                label: "价格",
                type: 'input',
                prop: "num"
            },
            {
                label: "联系人",
                type: 'input',
                prop: "name"
            },
            {
                label: "联系电话",
                type: 'input',
                prop: "tel"
            },
        ]
    })
    const form = ref<any>({

    })
</script>

<style lang="scss" scoped>

</style>

隐私、权限声明

1. 本插件需要申请的系统权限列表:

相机

2. 本插件采集的数据、发送的服务器地址、以及数据用途说明:

3. 本插件是否包含广告,如包含需详细说明广告表达方式、展示频率:

许可协议

MIT协议

暂无用户评论。

使用中有什么不明白的地方,就向插件作者提问吧~ 我要提问