Blame view

ant-design-vue-jeecg/src/views/jeecg/modules/JEditableTable/ReadOnlyTable.vue 1.72 KB
肖超群 authored
1
2
3
4
5
6
7
8
9
10
11
12
<template>
  <j-editable-table
    :columns="columns"
    :dataSource="dataSource"
    :rowNumber="true"
    :rowSelection="true"
    :maxHeight="400"
    :disabled="true"
  />
</template>

<script>
肖超群 authored
13
14
import {FormTypes} from '@/utils/JEditableTableUtil'
import JEditableTable from '@/components/jeecg/JEditableTable'
肖超群 authored
15
肖超群 authored
16
17
18
19
20
export default {
  name: 'ReadOnlyTable',
  components: {JEditableTable},
  data() {
    return {
肖超群 authored
21
肖超群 authored
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
      columns: [
        {
          title: '输入框',
          key: 'input',
          type: FormTypes.input,
          placeholder: '清输入'
        },
        {
          title: '下拉框',
          key: 'select',
          type: FormTypes.select,
          options: [
            {title: 'String', value: 'string'},
            {title: 'Integer', value: 'int'},
            {title: 'Double', value: 'double'},
            {title: 'Boolean', value: 'boolean'}
          ],
          placeholder: '请选择'
        },
        {
          title: '多选框',
          key: 'checkbox',
          type: FormTypes.checkbox,
          customValue: [true, false]
        },
        {
          title: '日期',
          key: 'datetime',
          type: FormTypes.datetime
        }
      ],
      dataSource: [
        {input: 'hello', select: 'int', checkbox: true, datetime: '2019-6-17 14:50:48'},
        {input: 'world', select: 'string', checkbox: false, datetime: '2019-6-16 14:50:48'},
        {input: 'one', select: 'double', checkbox: true, datetime: '2019-6-17 15:50:48'},
        {input: 'two', select: 'boolean', checkbox: false, datetime: '2019-6-14 14:50:48'},
        {input: 'three', select: '', checkbox: false, datetime: '2019-6-13 14:50:48'}
      ]
肖超群 authored
60
    }
肖超群 authored
61
62
63
  },
  mounted() {
肖超群 authored
64
  }
肖超群 authored
65
}
肖超群 authored
66
67
68
69
70
</script>

<style scoped>

</style>