mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 17:02:38 +00:00
Components added. Build issues fixed
This commit is contained in:
parent
5b66ed1093
commit
18c3721848
344 changed files with 12446 additions and 8758 deletions
|
@ -20,18 +20,9 @@ export default {
|
|||
height: {
|
||||
type: Number,
|
||||
default: 150
|
||||
},
|
||||
},
|
||||
chart: null,
|
||||
mounted() {
|
||||
this.initChart();
|
||||
},
|
||||
beforeUnmount() {
|
||||
if (this.chart) {
|
||||
this.chart.destroy();
|
||||
this.chart = null;
|
||||
}
|
||||
},
|
||||
chart: null,
|
||||
watch: {
|
||||
/*
|
||||
* Use deep watch to enable triggering watch for changes within structure
|
||||
|
@ -50,6 +41,15 @@ export default {
|
|||
this.reinit();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initChart();
|
||||
},
|
||||
beforeUnmount() {
|
||||
if (this.chart) {
|
||||
this.chart.destroy();
|
||||
this.chart = null;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initChart() {
|
||||
import('chart.js/auto').then((module) => {
|
||||
|
@ -93,7 +93,7 @@ export default {
|
|||
const dataset = this.chart.getElementsAtEventForMode(event, 'dataset', { intersect: true }, false);
|
||||
|
||||
if (element && element[0] && dataset) {
|
||||
this.$emit('select', {originalEvent: event, element: element[0], dataset: dataset});
|
||||
this.$emit('select', { originalEvent: event, element: element[0], dataset: dataset });
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -103,7 +103,7 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue