StrategySelect -> script setup

This commit is contained in:
Matthias 2022-12-10 13:39:06 +01:00
parent 1cc8f910c2
commit e2624cea54

View File

@ -20,18 +20,15 @@
</div> </div>
</template> </template>
<script lang="ts"> <script setup lang="ts">
import { useBotStore } from '@/stores/ftbotwrapper'; import { useBotStore } from '@/stores/ftbotwrapper';
import { defineComponent, computed, onMounted } from 'vue'; import { computed, onMounted } from 'vue';
export default defineComponent({ const props = defineProps({
name: 'StrategySelect',
props: {
modelValue: { type: String, required: true }, modelValue: { type: String, required: true },
showDetails: { default: false, required: false, type: Boolean }, showDetails: { default: false, required: false, type: Boolean },
}, });
emits: ['update:modelValue'], const emit = defineEmits(['update:modelValue']);
setup(props, { emit }) {
const botStore = useBotStore(); const botStore = useBotStore();
const strategyCode = computed((): string => botStore.activeBot.strategy?.code); const strategyCode = computed((): string => botStore.activeBot.strategy?.code);
@ -50,13 +47,6 @@ export default defineComponent({
botStore.activeBot.getStrategyList(); botStore.activeBot.getStrategyList();
} }
}); });
return {
botStore,
strategyCode,
locStrategy,
};
},
});
</script> </script>
<style></style> <style></style>