Commit 10705f77 by haojie

1

parent 581b5739
......@@ -84,13 +84,16 @@
<template v-else-if="it.type == 'select'">
<CustomSelect
:options="it.options"
:name="it.name"
v-model="it.value"
:item="{}"
:align="it.align"
:audio="it.audio"
:audio_list="[]"
:is_watch="it.watch ? it.watch : false"
width="100%"
@change="SelectChange"
@ValueChange="SelectValueChange"
></CustomSelect>
</template>
<template v-else-if="it.type == 'textarea'">
......@@ -191,7 +194,7 @@ import ManualResponseSvg from '@/assets/svg/form/ManualResponse.svg';
import { useRouter } from 'vue-router';
import { show_message } from '@/utils/tdesign_tool';
import { getFormParams } from '@/constants/admin_form';
import { ref } from 'vue';
import { reactive, ref } from 'vue';
const props = defineProps<{
form: any;
}>();
......@@ -273,6 +276,18 @@ const onDelete = async () => {
realDelete();
}
};
// 记录当前语音和语言
const CurrentConfig = reactive({
language: '',
voice: '',
});
// 语音列表
const SelectValueChange = (name: string, value: string) => {
if (name == 'language' || name == 'voice') {
CurrentConfig[name] = value;
}
};
</script>
<style lang="less">
......
......@@ -27,7 +27,7 @@
></t-option>
</TSelect>
<template v-if="audio">
<CustomAudio></CustomAudio>
<CustomAudio :url="audio_list"></CustomAudio>
</template>
</div>
</template>
......@@ -47,6 +47,8 @@ const props = withDefaults(
audio?: boolean;
is_watch?: any;
filterable?: boolean;
audio_list?: string[];
name?: string;
}>(),
{
width: '357px',
......@@ -54,15 +56,17 @@ const props = withDefaults(
audio: false,
is_watch: false,
filterable: false,
audio_list: () => [],
}
);
const emit = defineEmits(['update:modelValue', 'change']);
const emit = defineEmits(['update:modelValue', 'change', 'ValueChange']);
const SelectValue = ref(props.modelValue);
watch(
() => SelectValue.value,
(v) => {
emit('update:modelValue', v);
emit('ValueChange', props.name, v);
if (props.is_watch) {
emit('change', v, props.is_watch);
}
......
......@@ -44,6 +44,8 @@ const ManagementForm = reactive({
// 删除api
delete_api: '1',
submit_api: '1',
// 是否试听
//能否重置
reset: true,
// 是否转换为语音 -- 自定义方法
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment