Skip to content

Commit c53ce04

Browse files
committed
Use uid instead of Math.random
1 parent 0f9a778 commit c53ce04

32 files changed

+67
-90
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vue-data-ui",
33
"private": false,
4-
"version": "1.9.42",
4+
"version": "1.9.43",
55
"type": "module",
66
"description": "A user-empowering data visualization Vue components library",
77
"keywords": [

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3730,7 +3730,7 @@ const moodRadarConfig = ref({
37303730
</template>
37313731
</Box>
37323732

3733-
<Box open @copy="copyConfig(PROD_CONFIG.vue_ui_mood_radar)">
3733+
<Box @copy="copyConfig(PROD_CONFIG.vue_ui_mood_radar)">
37343734
<template #title>
37353735
<BaseIcon name="chartMoodRadar"/>
37363736
VueUiMoodRadar

src/components/vue-ui-age-pyramid.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
<script setup>
22
import { ref, computed, nextTick } from "vue";
3-
import { opacity, makeXls, shiftHue } from '../lib';
3+
import { opacity, makeXls, shiftHue, createUid } from '../lib';
44
import pdf from "../pdf";
55
import img from "../img";
66
import mainConfig from "../default_configs.json";
77
import { useNestedProp } from "../useNestedProp";
88
import Title from "../atoms/Title.vue";
99
import UserOptions from "../atoms/UserOptions.vue";
1010
import Tooltip from "../atoms/Tooltip.vue";
11-
import BaseCheckbox from "../atoms/BaseCheckbox.vue";
1211
1312
const props = defineProps({
1413
config: {
@@ -25,7 +24,7 @@ const props = defineProps({
2524
},
2625
});
2726
28-
const uid = ref(`vue-ui-age-pyramid-${Math.random()}`);
27+
const uid = ref(createUid());
2928
3029
const defaultConfig = ref(mainConfig.vue_ui_age_pyramid);
3130

src/components/vue-ui-candlestick.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
<script setup>
22
import { ref, computed, onMounted, nextTick } from "vue";
3-
import { canShowValue, closestDecimal, shiftHue, opacity, makeXls } from "../lib";
3+
import { canShowValue, closestDecimal, shiftHue, opacity, makeXls, createUid } from "../lib";
44
import mainConfig from "../default_configs.json";
55
import pdf from "../pdf";
66
import img from "../img";
77
import { useNestedProp } from "../useNestedProp";
88
import Title from "../atoms/Title.vue";
99
import UserOptions from "../atoms/UserOptions.vue";
1010
import Tooltip from "../atoms/Tooltip.vue";
11-
import BaseCheckbox from "../atoms/BaseCheckbox.vue";
1211
1312
const props = defineProps({
1413
config: {
@@ -25,7 +24,7 @@ const props = defineProps({
2524
}
2625
});
2726
28-
const uid = ref(`vue-ui-candlestick-${Math.random()}`);
27+
const uid = ref(createUid());
2928
const defaultConfig = ref(mainConfig.vue_ui_candlestick);
3029
3130
const isImaging = ref(false);

src/components/vue-ui-chestnut.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
<script setup>
22
import { ref, computed, onMounted, nextTick } from "vue";
3-
import { calcMarkerOffsetX, calcMarkerOffsetY, calcNutArrowPath, palette, opacity, shiftHue, adaptColorToBackground, makeDonut, convertColorToHex, makeXls } from "../lib";
3+
import { calcMarkerOffsetX, calcMarkerOffsetY, calcNutArrowPath, palette, opacity, shiftHue, adaptColorToBackground, makeDonut, convertColorToHex, makeXls, createUid } from "../lib";
44
import pdf from "../pdf";
55
import img from "../img";
66
import mainConfig from "../default_configs.json";
77
import { useNestedProp } from "../useNestedProp";
88
import UserOptions from "../atoms/UserOptions.vue";
9-
import BaseCheckbox from "../atoms/BaseCheckbox.vue";
109
1110
const props = defineProps({
1211
config: {
@@ -23,7 +22,7 @@ const props = defineProps({
2322
}
2423
});
2524
26-
const uid = ref(`vue-ui-chestnut-${Math.random()}`);
25+
const uid = ref(createUid());
2726
2827
const defaultConfig = ref(mainConfig.vue_ui_chestnut);
2928

src/components/vue-ui-donut-evolution.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const props = defineProps({
2525
},
2626
});
2727
28-
const uid = ref(`vue-ui-donut-evolution-${Math.random()}`);
28+
const uid = ref(createUid());
2929
3030
const defaultConfig = ref(mainConfig.vue_ui_donut_evolution);
3131

src/components/vue-ui-donut.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script setup>
22
import { ref, computed, nextTick } from "vue";
3-
import { calcMarkerOffsetX, calcMarkerOffsetY, calcNutArrowPath, makeDonut, palette, convertColorToHex, opacity, makeXls } from '../lib';
3+
import { calcMarkerOffsetX, calcMarkerOffsetY, calcNutArrowPath, makeDonut, palette, convertColorToHex, opacity, makeXls, createUid } from '../lib';
44
import pdf from "../pdf";
55
import img from "../img";
66
import mainConfig from "../default_configs.json";
@@ -26,7 +26,7 @@ const props = defineProps({
2626
},
2727
});
2828
29-
const uid = ref(`vue-ui-donut-${Math.random()}`);
29+
const uid = ref(createUid());
3030
3131
const defaultConfig = ref(mainConfig.vue_ui_donut);
3232

src/components/vue-ui-gauge.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
<script setup>
22
import { ref, computed, onMounted } from "vue";
3-
import { palette, rotateMatrix, addVector, matrixTimes, opacity, convertColorToHex } from "../lib.js";
3+
import { palette, rotateMatrix, addVector, matrixTimes, opacity, convertColorToHex, createUid } from "../lib.js";
44
import pdf from "../pdf";
55
import img from "../img";
66
import mainConfig from "../default_configs.json";
77
import { useNestedProp } from "../useNestedProp";
88
import UserOptions from "../atoms/UserOptions.vue";
9-
import BaseCheckbox from "../atoms/BaseCheckbox.vue";
109
1110
const props = defineProps({
1211
config:{
@@ -22,7 +21,7 @@ const props = defineProps({
2221
}
2322
}
2423
});
25-
const uid = ref(`vue-ui-gauge-${Math.random()}`);
24+
const uid = ref(createUid());
2625
2726
const defaultConfig = ref(mainConfig.vue_ui_gauge);
2827

src/components/vue-ui-heatmap.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
<script setup>
22
import { ref, computed, nextTick } from "vue";
3-
import { opacity, makeXls } from "../lib";
3+
import { opacity, makeXls, createUid } from "../lib";
44
import mainConfig from "../default_configs.json";
55
import pdf from "../pdf";
66
import img from "../img";
77
import { useNestedProp } from "../useNestedProp";
88
import Title from "../atoms/Title.vue";
99
import UserOptions from "../atoms/UserOptions.vue";
1010
import Tooltip from "../atoms/Tooltip.vue";
11-
import BaseCheckbox from "../atoms/BaseCheckbox.vue";
1211
1312
const props = defineProps({
1413
config: {
@@ -25,7 +24,7 @@ const props = defineProps({
2524
}
2625
});
2726
28-
const uid = ref(`vue-ui-heatmap-${Math.random()}`);
27+
const uid = ref(createUid());
2928
3029
const defaultConfig = ref(mainConfig.vue_ui_heatmap);
3130

0 commit comments

Comments
 (0)