UNPKG

binu

Version:

This is an easier platfrom with custom component for vue.

121 lines (96 loc) 3.31 kB
"use strict"; ((typeof self !== 'undefined' ? self : this)["webpackChunkbine"] = (typeof self !== 'undefined' ? self : this)["webpackChunkbine"] || []).push([[889],{ /***/ 4889: /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "default": function() { return /* binding */ histogram; } }); ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/epfm/charts/histogram.vue?vue&type=template&id=1feff484& var render = function render() { var _vm = this, _c = _vm._self._c; return _c('div', { ref: 'histogram_' + _vm.stamp, staticStyle: { "width": "100%", "height": "100%" } }); }; var staticRenderFns = []; // EXTERNAL MODULE: ./src/components/epfm/utils/pubsub.js + 1 modules var pubsub = __webpack_require__(426); ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/epfm/charts/histogram.vue?vue&type=script&lang=js& /* harmony default export */ var histogramvue_type_script_lang_js_ = ({ name: "histogram-chart", data() { return { stamp: Date.now(), option: {}, myChart: null }; }, props: ["name", "move", "time"], mounted() { this.$nextTick(() => { this.updateOption(); this.loaddata(); }); }, watch: { move: { handler(val) { if (val) { this.updateOption(); this.$nextTick(() => { this.loaddata(); }); } } }, time: { handler(val) { if (val) { this.myChart.resize(); } } } }, methods: { loaddata() { this.myChart = this.$echarts.init(this.$refs["histogram_" + this.stamp]); this.myChart.setOption({ ...this.option }); }, updateOption() { const store = (0,pubsub/* default */.Z)(); const id = Number(this.name.split("_")[1]); const modal = store.getter("modals").find(item => item.id === id); const option = store.getter("options")[modal.optionName]; this.option = option ? option : {}; } } }); ;// CONCATENATED MODULE: ./src/components/epfm/charts/histogram.vue?vue&type=script&lang=js& /* harmony default export */ var charts_histogramvue_type_script_lang_js_ = (histogramvue_type_script_lang_js_); // EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(1001); ;// CONCATENATED MODULE: ./src/components/epfm/charts/histogram.vue /* normalize component */ ; var component = (0,componentNormalizer/* default */.Z)( charts_histogramvue_type_script_lang_js_, render, staticRenderFns, false, null, null, null ) /* harmony default export */ var histogram = (component.exports); /***/ }) }]); //# sourceMappingURL=bine.umd.889.js.map