ZaiZai 2 gadi atpakaļ
vecāks
revīzija
3f96d8bc77
1 mainītis faili ar 45 papildinājumiem un 0 dzēšanām
  1. 45 0
      src/components/table-form/hc-form-checkbox-group.vue

+ 45 - 0
src/components/table-form/hc-form-checkbox-group.vue

@@ -0,0 +1,45 @@
+<template>
+  <div>
+    <el-checkbox-group v-model="isVal" size="large">
+      <template v-for="item in datas">
+        <el-checkbox :label="item" />
+      </template>
+      <template v-for="item in objs">
+        <el-checkbox :label="item.key">{{item.name}}</el-checkbox>
+      </template>
+    </el-checkbox-group>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "HcFormCheckboxGroup",
+  props: {
+    datas: {
+      type: Array,
+      default: () => {
+        return []
+      }
+    },
+    objs: {
+      type: Array,
+      default: () => {
+        return []
+      }
+    },
+    val: {
+      type: [Number,String],
+      default: ''
+    },
+    keyname: {
+      type: [Number,String],
+      default: ''
+    },
+  },
+  data() {
+    return {
+      isVal: []
+    }
+  },
+};
+</script>