Socket
Socket
Sign inDemoInstall

hfun-element-plus

Package Overview
Dependencies
0
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    hfun-element-plus


Version published
Maintainers
1
Created

Readme

Source

HFUN-TABLE 组件使用文档

属性

属性说明类型可选值默认值是否必填
mTable当前搜索表格的数据对象Object--
pageData当前页数 每页显示条数Object--
hfun-table-operate点击按钮回调function--


mTable 选项

属性说明类型可选值默认值是否必填示例
tableData表格数据Array--tableData:[]
tableHeader表头数据Array--tableHeader:[]


tableHeader 子属性

属性说明类型可选值默认值是否必填示例
label表头名称String-
param字段名称String--
sortable是否排序String--
type编辑时类型String--


事件

事件名说明回调参数
hfunTableOperate“查询”按钮点击事件-


使用案例

<template>
     <hfunSearchTable :mTable="mTable" :pageData="pageData" @hfun-table-operate="hfunTableOperate"/>
</template>
<script setup>
    import hfunSearchTable from './hfunUI/packages/hfun-table';

    import { ref, reactive, onMounted } from "vue";
    let pageData = reactive({
    pageIndex: 1, //当前页数
    pageNum: 10, //每页显示条数
    });
    let mTable = reactive({
        // 表格数据
        tableData: [
        {productType:'11',productNumber:'22',product:'某某产品',issDate:'2012-02-24'},
        {productType:'3',productNumber:'4',product:'某某产品2',businessStatus:3}
        ],
        // 表格头
        tableHeader: [
        { label: "产品类型", param: "productType", sortable: true ,type:'select',items:[
            {name:'请选择产品类型',value:''},
            {name:'类型1',value:'11'},
            {name:'类型2',value:'3'}
            
        ]},
        { label: "产品号码", param: "productNumber", sortable: true ,type:'input'},
        { label: "产品", param: "product" ,type:'input'},
        { label: "订单号", param: "orderNumber" ,type:'input'},
        { label: "客户名称", param: "customerName" ,type:'input'},
        { label: "业务状态", param: "businessStatus" ,type:'radio',items:[
            {name:'类型1',value:'1'},
            {name:'类型2',value:'3'}]},
        { label: "A-Z端装机位置", param: "azInstallLocation",type:'input' },
        { label: "发单日期", param: "issDate",type:'datePicker' ,type:'input'},
        {
            label: "操作",
            options: [
            {
                label: "详情",
                type: "success",
                methods: "detail",
                icon: "hfun-menubar-search",
            },
            {
                label: "编辑",
                type: "primary",
                methods: "edit",
                icon: "hfun-menubar-search",
            },
            
            {
                label: "删除",
                type: "danger",
                methods: "delete",
                icon: "hfun-menubar-search",
            },
            ],
        },
        ],
        // 表格总数
        totalNum: 0,
        // 当前页
        currentPage: 1,
    });
    /**
    * @Description: 表格组件操作栏事件
    * @Author: yeyanghui
    * @param {*} method 方法名
    * @param {*} val 当前行数据
    */
    const hfunTableOperate = ({ method, val }) => {
    console.log(val)
    };
    

</script>


FAQs

Last updated on 03 Mar 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc