mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-10 10:21:55 +00:00
Implement defineModel where applicable
This commit is contained in:
parent
f943385ce3
commit
da15452d30
|
@ -32,26 +32,18 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import { Pairlist } from '@/types';
|
||||
import { computed, ref } from 'vue';
|
||||
import PairlistConfigParameter from '../general/PairlistConfigParameter.vue';
|
||||
import { ref } from 'vue';
|
||||
import PairlistConfigParameter from './PairlistConfigParameter.vue';
|
||||
|
||||
const props = defineProps<{
|
||||
modelValue: Pairlist;
|
||||
defineProps<{
|
||||
index: number;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits(['update:modelValue', 'remove']);
|
||||
const emit = defineEmits(['remove']);
|
||||
|
||||
const visible = ref(false);
|
||||
|
||||
const pairlist = computed({
|
||||
get() {
|
||||
return props.modelValue;
|
||||
},
|
||||
set(value: Pairlist) {
|
||||
emit('update:modelValue', value);
|
||||
},
|
||||
});
|
||||
const pairlist = defineModel<Pairlist>({ required: true });
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
|
|
@ -25,21 +25,10 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import { PairlistParameter, PairlistParamType } from '@/types';
|
||||
import { computed } from 'vue';
|
||||
|
||||
const props = defineProps<{
|
||||
defineProps<{
|
||||
param: PairlistParameter;
|
||||
modelValue: string | undefined;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits(['update:modelValue']);
|
||||
|
||||
const paramValue = computed({
|
||||
get() {
|
||||
return props.modelValue;
|
||||
},
|
||||
set(value) {
|
||||
emit('update:modelValue', value);
|
||||
},
|
||||
});
|
||||
const paramValue = defineModel<string>();
|
||||
</script>
|
|
@ -9,7 +9,11 @@ import { BootstrapVueNextResolver } from 'unplugin-vue-components/resolvers';
|
|||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
createVuePlugin({}),
|
||||
createVuePlugin({
|
||||
script: {
|
||||
defineModel: true,
|
||||
},
|
||||
}),
|
||||
Components({
|
||||
resolvers: [IconsResolve(), BootstrapVueNextResolver()],
|
||||
dirs: [],
|
||||
|
|
Loading…
Reference in New Issue
Block a user