|
@@ -14,7 +14,7 @@
|
|
|
<ui-input
|
|
|
type="text"
|
|
|
:modelValue="record.title"
|
|
|
- @update:modelValue="(title: string) => $emit('updateTitle', title)"
|
|
|
+ @update:modelValue="(title: string) => $emit('updateTitle', title.trim())"
|
|
|
v-show="isEditTitle"
|
|
|
ref="inputRef"
|
|
|
height="28px"
|
|
@@ -50,7 +50,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
-import { defineComponent, ref, computed } from 'vue'
|
|
|
+import { defineComponent, ref, computed, watchEffect } from 'vue'
|
|
|
import { getFileUrl } from '@/utils'
|
|
|
import { useFocus } from 'bill/hook/useFocus'
|
|
|
import { RecordStatus, createRecordFragment, getRecordFragmentBlobs, recordFragments } from '@/store'
|
|
@@ -62,6 +62,7 @@ import Shot from './shot.vue'
|
|
|
import type { PropType } from 'vue'
|
|
|
import type { RecordProcess } from './help'
|
|
|
import { isTemploraryID } from '@/store'
|
|
|
+import { Message } from 'bill/index'
|
|
|
|
|
|
export default defineComponent({
|
|
|
props: {
|
|
@@ -97,6 +98,14 @@ export default defineComponent({
|
|
|
const isShot = ref<boolean>(false)
|
|
|
const inputRef = ref()
|
|
|
const isEditTitle = useFocus(computed(() => inputRef.value?.vmRef.root))
|
|
|
+
|
|
|
+ watchEffect(() => {
|
|
|
+ if (!isEditTitle.value && !props.record.title.length) {
|
|
|
+ isEditTitle.value = true
|
|
|
+ Message.warning('视频名称不可为空')
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
const isPlayVideo = ref(false)
|
|
|
const actions = {
|
|
|
continue: () => isShot.value = true,
|