1.0.1 • Published 11 months ago

simple-elementui-console v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

simple-elementui-console

Simple console component based on elementui

Use step

install

$ npm install simple-elementui-console

Simple example

<template>
  <el-form>
    <el-form-item>
      <el-button type="primary" @click="add">launch</el-button>
    </el-form-item>
    <el-form-item>
      <SimpleElementConsole ref="c"/>
    </el-form-item>
  </el-form>
</template>
<script>
  import SimpleElementConsole from 'simple-elementui-console';
  export default {
    name: 'Documentation',
    components: {
      SimpleElementConsole
    },
    data() {
      return {
        tableData: [],
        height: 200,
        obj: {
          height: '35px',
          tools: [
            {
              icon: 'el-icon-delete',
              type: '',
              size: 'mini',
              callBack: this.callbackA
            }
          ]
        }
      }
    },
    mounted() {
      var arr = [
        {
          prop: 'date',
          label: '时间'
        },
        {
          prop: 'name',
          label: '姓名'
        }
      ]
      this.$refs.c.initLayout(arr)
    },
    methods: {
      callbackA(item, point) {
        point.queue = []
      },
      add() {
        setInterval(() => {
          var obj = {
            date: Math.random(),
            name: '张三',
            content: '2023-06-20 ' + Math.random() + ':xxxxxxxxxxxxxxxxxxx'
          }
          this.$refs.c.instack(obj)
        }, 1);
      }
    }
  }
</script>

options

1.0.1

11 months ago

1.0.0

11 months ago