EOS Low-Code Platform 8 EOS Low-Code Platform 8
产品简介
安装部署
应用开发
专题场景实战案例
低代码(Low-Code)开发参考手册
高开开发参考手册
流程开发参考手册
AFCenter 使用指南
Governor 使用指南
升级手册
FAQ
8.3.2更新说明
  • PmRadio 单选框
  • 静态数据
  • 对接Api
  • Button
  • Attributes

# PmRadio 单选框

继承自 el-radio (opens new window) 并扩展了数据接入方式

# 静态数据

image-20241224151437621
<template>
  <pm-radio :initData="data" v-model="value">
  </pm-radio>
</template>
<script>
export default {
  data () {
    return {
      value: "1",
      data: [
        {
          value: "1",
          label: "火锅"
        },
        {
          value: "2",
          label: "砂锅"
        },
        {
          value: "3",
          label: "地锅鸡"
        }
      ]
    }
  },
  methods: {
  }
}
</script>
显示代码 复制代码 复制代码

# 对接Api

<template>
  <pm-radio v-model="value"
      action="UserController.queryUsers" 
      dataField="data" 
      labelField="name" 
      valueField="id"
      :params="{enable:true}"
  >
  </pm-radio>
</template>
<script>
export default {
  data () {
    return {
      value: "1",
    }
  },
  methods: {
  }
}
</script>
显示代码 复制代码 复制代码

# Button

image-20241224153518314image-20241224153546811

:radioType="button"

<template>
  <p>
    <pm-radio :initData="typeData" v-model="type"/>
  </p>
  <p>
     <div>:radioType="{{type}}"</div>
  </p>
  <p>
    <pm-radio :initData="data" :radioType="type" v-model="value"/>
  </p>
</template>
<script>
export default {
  data () {
    return {
      value: "1",
      type:'button',
      typeData:[
         {
          value: "button",
          label: "普通按钮"
        },
         {
          value: "button1",
          label: "角标按钮"
        },
      ],
      data: [
        {
          value: "1",
          label: "火锅"
        },
        {
          value: "2",
          label: "砂锅"
        },
        {
          value: "3",
          label: "地锅鸡"
        }
      ]
    }
  }
}
</script>
显示代码 复制代码 复制代码

# Attributes

参数 说明 类型 可选值 默认值
radioType 单选框类型 string button/button1 normal
action Api方法 Object - null
dataField Api方法返回值对应的数组字段名,如返回数组则可为空 string - null
params 方法参数 array,object,string - null
valueField value对应的字段 string - value
labelField label对应的字段 string - label
initData 静态数据 array - null

← upload 上传 checkbox 复选框 →