Skip to content

Commit fdd3d68

Browse files
Merge pull request #47 from Quentium-Forks/fix/watch-props
fix(render): watch props
2 parents 0af83d4 + ee0230c commit fdd3d68

22 files changed

+157
-24
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ import { defineCustomElement } from 'vue';
4747

4848
import NewChart from '@/components/NewChart.vue';
4949

50-
const NewChartElement = defineCustomElement(NewChart);
50+
const NewChartElement = defineCustomElement(NewChart, { shadowRoot: false });
5151

52-
customElements.define('bar-line-chart', NewChartElement, { shadowRoot: false });
52+
customElements.define('bar-line-chart', NewChartElement);
5353
```
5454

5555
Il est également important de rajouter cela dans le fichier `src/charts/main.js` qui permet de l'inclure dans la compilation de tous les web-components ainsi que dans le fichier `src/main.js` pour l'utiliser dans la documentation du `index.html`.

src/charts/BarChart.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ import '@/styles/style.scss';
44

55
import BarChart from '@/components/BarChart.vue';
66

7-
const BarChartElement = defineCustomElement(BarChart);
7+
const BarChartElement = defineCustomElement(BarChart, { shadowRoot: false });
88

9-
customElements.define('bar-chart', BarChartElement, { shadowRoot: false });
9+
customElements.define('bar-chart', BarChartElement);

src/charts/BarLineChart.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ import '@/styles/style.scss';
44

55
import BarLineChart from '@/components/BarLineChart.vue';
66

7-
const BarLineChartElement = defineCustomElement(BarLineChart);
7+
const BarLineChartElement = defineCustomElement(BarLineChart, { shadowRoot: false });
88

9-
customElements.define('bar-line-chart', BarLineChartElement, { shadowRoot: false });
9+
customElements.define('bar-line-chart', BarLineChartElement);

src/charts/DataBox.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ import '@/styles/DataBox.scss';
55

66
import DataBox from '@/components/DataBox.vue';
77

8-
const DataBoxElement = defineCustomElement(DataBox);
8+
const DataBoxElement = defineCustomElement(DataBox, { shadowRoot: false });
99

10-
customElements.define('data-box', DataBoxElement, { shadowRoot: false });
10+
customElements.define('data-box', DataBoxElement);

src/charts/GaugeChart.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ import '@/styles/GaugeChart.scss';
55

66
import GaugeChart from '@/components/GaugeChart.vue';
77

8-
const GaugeChartElement = defineCustomElement(GaugeChart);
8+
const GaugeChartElement = defineCustomElement(GaugeChart, { shadowRoot: false });
99

10-
customElements.define('gauge-chart', GaugeChartElement, { shadowRoot: false });
10+
customElements.define('gauge-chart', GaugeChartElement);

src/charts/LineChart.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ import '@/styles/style.scss';
44

55
import LineChart from '@/components/LineChart.vue';
66

7-
const LineChartElement = defineCustomElement(LineChart);
7+
const LineChartElement = defineCustomElement(LineChart, { shadowRoot: false });
88

9-
customElements.define('line-chart', LineChartElement, { shadowRoot: false });
9+
customElements.define('line-chart', LineChartElement);

src/charts/MapChart.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ import '@/styles/MapChart.scss';
55

66
import MapChart from '@/components/MapChart.vue';
77

8-
const MapChartElement = defineCustomElement(MapChart);
8+
const MapChartElement = defineCustomElement(MapChart, { shadowRoot: false });
99

10-
customElements.define('map-chart', MapChartElement, { shadowRoot: false });
10+
customElements.define('map-chart', MapChartElement);

src/charts/MapChartReg.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ import '@/styles/MapChart.scss';
55

66
import MapChartReg from '@/components/MapChartReg.vue';
77

8-
const MapChartRegElement = defineCustomElement(MapChartReg);
8+
const MapChartRegElement = defineCustomElement(MapChartReg, { shadowRoot: false });
99

10-
customElements.define('map-chart-reg', MapChartRegElement, { shadowRoot: false });
10+
customElements.define('map-chart-reg', MapChartRegElement);

src/charts/PieChart.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ import '@/styles/style.scss';
44

55
import PieChart from '@/components/PieChart.vue';
66

7-
const PieChartElement = defineCustomElement(PieChart);
7+
const PieChartElement = defineCustomElement(PieChart, { shadowRoot: false });
88

9-
customElements.define('pie-chart', PieChartElement, { shadowRoot: false });
9+
customElements.define('pie-chart', PieChartElement);

src/charts/RadarChart.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ import '@/styles/style.scss';
44

55
import RadarChart from '@/components/RadarChart.vue';
66

7-
const RadarChartElement = defineCustomElement(RadarChart);
7+
const RadarChartElement = defineCustomElement(RadarChart, { shadowRoot: false });
88

9-
customElements.define('radar-chart', RadarChartElement, { shadowRoot: false });
9+
customElements.define('radar-chart', RadarChartElement);

0 commit comments

Comments
 (0)