Skip to content

容器


image

介绍

用于多个组件组合排版布局的容器组件,其内部可以拖入组件。

API

Props

参数名描述类型默认值
status状态, "default"|"hide"|"destroy"string'default'
baseStyle自定义样式string-
customClass类名绑定string-
display显示,设置组件的显示布局模式Display-
background背景Background-
boxShadow阴影BoxShadow-
uniqueId唯一标识string-
loading加载状态booleanfalse
data循环数据array[]
paramName迭代变量名stringitem
indexName索引变量名stringindex
key循环keystring-
empty缺省提醒Empty-

Events

事件名描述回调参数
onClick点击时触发ctx, params
onMouseEnter鼠标移入时触发ctx, params
onMouseLeave鼠标移出时触发ctx, params
onMousedown鼠标移出时触发ctx, params
onMouseup鼠标移出时触发ctx, params

Type

js
//样式-显示
type Display = {
  type:"block"|"inline-block"|"inline"|"flex",
  // type选择flex可配置以下属性
  flex:{
    flexDirection:"row"|"column"|"row-reverse"|"column-reverse",
    alignItems:"flex-start"|"center"|"flex-end"|"stretch"|"base-line",
    justifyContent:"flex-start"|"center"|"flex-end"|"space-between"|"space-around"
  }
}

//样式-背景
type Background = {
  color:string, //背景色
  size:"cover"|"contain"|"length" //填充
  // size 为length时可进行以下配置
  width:{           //宽                      
    unit:"px"|"%",  //单位
    value:number    //值
  }
  height:{          //高
    unit:"px"|"%",  //单位
    value:number    //值
  }
  positonY:number,  //横向偏移
  positonX:number,  //纵向偏移
}

// 样式-模糊
type BoxShadow = {
  color:string,   //颜色 
  hShadow:number, //X
  vShadow:number, //Y
  blur:number,    //模糊
}

// 高级-缺省提醒
type Empty = {
  enable:boolean,    //是否开启 
  icon:"null-list",  //缺省图片
  text:string,       //缺省文字
}