# gg-info 不可编辑的输入框

gg-info

不可编辑的输入框,一般和表单配合使用展示键名和键值,默认为实心白色背景。

script 中引用组件

若使用uni-app的 easycom 引入方式,则无需在script中重复引用

import ggInfo from '@/components/gg-info/gg-info.vue'
export default {
    components: {ggInfo}
}
1
2
3
4

template 中使用组件

<gg-info label="姓名" :info="info1" :infoAlign="infoAlign"/>
1
  • type属性为text的input

script

export default {
  data() {
    return {
      info1: '输入框这是一个内容输入框',
      infoAlign: 'right'//默认值:right,可选值:left right center
    };
  }
}
1
2
3
4
5
6
7
8

# 属性说明

属性名 类型 默认值 说明
label String - 标题
info String - 键值,显示内容
rtip String - 右侧(单位)
infoAlign String right info对其位置[left,right,center],文本始终左对齐
labelWidth Number 60 字段区域宽度,上下排列无效
layout String row 排列方式 ['row','col']
tip String - 字段提示/说明

# 插件预览地址