Blame view

src/components/ColumnSettings/index.vue 1.18 KB
be009217   monkeyhouyi   处理,通知公告,任务中心
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
  <template>
    <el-tooltip :content="$t('common.columnSettings')" placement="top">
      <el-popover width="200" popper-class="columnSetting-popover">
        <el-link icon="icon-ym icon-ym-options NCC-common-head-icon" :underline="false"
          slot="reference" />
        <NCC-table :data="data" class="columnTable" :hasNO="false" size="mini" ref="columnTable"
          @selection-change="columnSelectionChange" @row-click="handleRowClick">
          <el-table-column prop="label" label="列表字段" />
          <el-table-column type="selection" width="50" align="center" />
        </NCC-table>
      </el-popover>
    </el-tooltip>
  </template>
  
  <script>
  export default {
    name: 'ColumnSettings',
    model: {
      prop: 'value',
      event: 'change'
    },
    props: {
      value: Array,
      data: {
        type: Array,
        default: () => []
      }
    },
    mounted() {
      this.$refs.columnTable.$refs.NCCTable.toggleAllSelection()
    },
    methods: {
      handleRowClick(row) {
        this.$refs.columnTable.$refs.NCCTable.toggleRowSelection(row)
      },
      columnSelectionChange(val) {
        this.$emit('change', val)
      }
    }
  }
  </script>
9eed2161   monkeyhouyi   修改线上消息提示失败
42
  <style lang="scss" scoped>
be009217   monkeyhouyi   处理,通知公告,任务中心
43
44
45
46
  .columnSetting-popover {
    padding: 0 !important;
  }
  </style>