1.4.2 • Published 11 months ago

vue-hooks-charts v1.4.2

Weekly downloads
149
License
ISC
Repository
-
Last release
11 months ago

vue-hooks-charts

基于 ECharts 自定义图表

安装

$ npm install vue-hooks-charts -S
$ yarn add vue-hooks-charts

使用

main.js 文件中引入插件并注册

import HooksCharts from 'vue-hooks-charts'

let options = {
  base: 'http://localhost:8880'
}
Vue.use(HooksCharts, options)

options 全局配置

配置项类型默认值说明备注
baseStringundefined服务器地址如: http://localhost:8880

在项目中使用

<template>
  <div>
    <a-card
      :bordered="false"
      :bodyStyle="{background: '#f0f2f5'}"
    >
      <a-tabs default-active-key="2">
        <a-tab-pane
          key="1"
          tab="HooksCharts"
        >
          <HooksCharts
            :options="options"
            @create="create"
            @edit="edit"
            @remove="remove"
          />
        </a-tab-pane>
        <a-tab-pane
          key="2"
          tab="HooksChartsEdit"
          force-render
        >
          <HooksChartsEdit />
        </a-tab-pane>
        <a-tab-pane
          key="3"
          tab="HooksChartsDetail"
        >
          <HooksChartsDetail />
        </a-tab-pane>
        <a-tab-pane
          key="4"
          tab="HooksReportList"
        >
          <HooksReportList />
        </a-tab-pane>
        <a-tab-pane
          key="5"
          tab="HooksReportEdit"
        >
          <HooksReportEdit />
        </a-tab-pane>
        <a-tab-pane
          key="6"
          tab="HooksReportDetail"
        >
          <HooksReportDetail />
        </a-tab-pane>
      </a-tabs>
    </a-card>

  </div>
</template>

<script>
export default {
  name: "HelloWorld",
  props: {
    msg: String
  },
  data() {
    return {
      // 查询条件
      options: {
        title: "HooksCharts",
        createBtnText: "创建自定义图表"
      }
    };
  },
  mounted() {
    // 自定义图表-详情页
  },
  methods: {
    create() {},
    edit(item) {
      console.log("edit");
      console.log(JSON.stringify(item));
    },
    remove(item) {
      console.log("remove");
      console.log(JSON.stringify(item));
    }
  }
};
</script>

<style>
</style>
1.4.2

11 months ago

0.6.9

3 years ago

0.6.8

3 years ago

0.6.7

3 years ago

0.6.6

3 years ago

0.6.3

3 years ago

0.6.2

3 years ago

0.6.5

3 years ago

0.6.4

3 years ago

0.6.1

3 years ago

0.6.0

3 years ago

0.5.5

3 years ago

0.5.4

3 years ago

0.5.3

3 years ago

0.5.2

3 years ago

0.5.1

3 years ago

0.5.0

3 years ago

0.4.5

4 years ago

0.4.4

4 years ago

0.4.3

4 years ago

0.4.0

4 years ago

0.4.2

4 years ago

0.3.3

4 years ago

0.3.2

4 years ago

0.3.0

4 years ago

0.3.1

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago