热门标签 | HotTags
当前位置:  开发笔记 > 开发工具 > 正文

vue动态配置模板'componentis'代码

这篇文章主要介绍了vue动态配置模板componentis代码,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下

实现代码如下



//1.0=============unit-type.js所有模板配置文件 =======================
export default {
 tablePartMerge: {//表格合并模板xtype
   componentName: "tablePartMerge",//组件名称
   fileName: "table-partInfo-merge"//文件所在路径
 },
 tablePartInfo: {
   componentName: "tablePartInfo",
   fileName: "table-partInfo"
 },
 ueditorUnit: {
   componentName: "ueditorUnit",
   fileName: "unit-ueditor"
 },
 filesUnit: {
   componentName: "filesUnit",
   fileName: "unit-files"
 },
 approves: {  // 正文信息(审批记录)
   componentName: "approves",
   fileName: "approves-unit"
 },
 requiredDate:{ // 要求完成日期
  componentName: "requiredDate",
  fileName: "required-date"
 },
}
//2.0====== table-partInfo-merge.js =========
module.exports = {
 "columns":[{
  "id": "partNumber",
  "disabled": false,
  "name":"物料编码",
  "placeholder": "",
  "required": true,
  "selectDetail": [],
  "show": false,
  "span": 24,
  "width":"150",
  "xtype": "select"//组件内用的表格
 }]
}

//=============父级传过来的 object =======================
module.exports = [
  {
    title: '正文信息',
    name: '1',
    id:"",
    child:[
      {
        id:'partInfoData',//id
        show:'true',//是否显示
        fileName:'tablePartInfo',//文件路径名
        xtype:'tablePartMerge'//表格模块
      },
      {
        id:'mainAttachements',//文本编辑器
        show:'true',
        fileName:'',
        xtype:'filesUnit'
      },
      {
        id:'vivo_RequestCompletionTime',//时间选择模块
        show:'true',
        fileName:'',
        xtype:'requiredDate'
      },
      {
        id:'approves',
        show:'true',
        fileName:'approval',
        xtype:'approves'
      }
    ]
  }
];

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。


推荐阅读
author-avatar
谁是我我2010
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有