plotconfig -> script setup

This commit is contained in:
Matthias 2022-12-13 06:19:25 +01:00
parent 2510b1f2d4
commit bfb594800b

View File

@ -119,24 +119,21 @@
</div>
</template>
<script lang="ts">
<script setup lang="ts">
import { PlotConfig, EMPTY_PLOTCONFIG, IndicatorConfig } from '@/types';
import { getCustomPlotConfig } from '@/shared/storage';
import PlotIndicator from '@/components/charts/PlotIndicator.vue';
import { showAlert } from '@/stores/alerts';
import { defineComponent, computed, ref, onMounted } from 'vue';
import { computed, ref, onMounted } from 'vue';
import { useBotStore } from '@/stores/ftbotwrapper';
import { usePlotConfigStore } from '@/stores/plotConfig';
export default defineComponent({
name: 'PlotConfigurator',
components: { PlotIndicator },
props: {
defineProps({
columns: { required: true, type: Array as () => string[] },
asModal: { required: false, default: true, type: Boolean },
},
setup() {
});
const plotStore = usePlotConfigStore();
const plotConfig = ref<PlotConfig>(EMPTY_PLOTCONFIG);
@ -308,31 +305,6 @@ export default defineComponent({
plotConfig.value = plotStore.plotConfig;
plotConfigNameLoc.value = plotStore.plotConfigName;
});
return {
plotStore,
removeIndicator,
addSubplot,
delSubplot,
loadPlotConfig,
loadConfigFromString,
resetConfig,
loadPlotConfigFromStrategy,
savePlotConfig,
showConfig,
addNewIndicator,
selIndicatorName,
usedColumns,
selSubPlot,
newSubplotName,
subplots,
plotConfigNameLoc,
selIndicator,
plotConfigJson,
tempPlotConfigValid,
};
},
});
</script>
<style scoped>