|
@@ -18,7 +18,8 @@
|
|
|
type="text"
|
|
|
:modelValue="guide.title"
|
|
|
:maxlength="15"
|
|
|
- @update:modelValue="(title: string) => $emit('updateTitle', title.trim())"
|
|
|
+ @update:modelValue="(title: string) => $emit('updateTitle', title)"
|
|
|
+ @blur="() => $emit('updateTitle', guide.title.trim())"
|
|
|
v-show="isEditTitle"
|
|
|
ref="inputRef"
|
|
|
height="28px"
|
|
@@ -53,9 +54,9 @@ const props = withDefaults(defineProps<{ guide: Guide; edit?: boolean }>(), {
|
|
|
const inputRef = ref();
|
|
|
const isEditTitle = useFocus(computed(() => inputRef.value?.vmRef.root));
|
|
|
watchEffect(() => {
|
|
|
- if (!isEditTitle.value && !props.guide.title.length) {
|
|
|
+ if (!isEditTitle.value && !props.guide.title.trim().length) {
|
|
|
isEditTitle.value = true;
|
|
|
- Message.warning(ui18n.t('guide.nameErr'));
|
|
|
+ Message.warning(ui18n.t("guide.nameErr"));
|
|
|
}
|
|
|
});
|
|
|
|
|
@@ -67,9 +68,9 @@ const emit = defineEmits<{
|
|
|
}>();
|
|
|
|
|
|
const menus = [
|
|
|
- { label: ui18n.t('sys.rename'), value: "editTitle" },
|
|
|
- { label: ui18n.t('sys.edit'), value: "edit" },
|
|
|
- { label: ui18n.t('sys.del'), value: "delete" },
|
|
|
+ { label: ui18n.t("sys.rename"), value: "editTitle" },
|
|
|
+ { label: ui18n.t("sys.edit"), value: "edit" },
|
|
|
+ { label: ui18n.t("sys.del"), value: "delete" },
|
|
|
];
|
|
|
const actions = {
|
|
|
edit: () => emit("edit"),
|
|
@@ -108,7 +109,9 @@ const actions = {
|
|
|
|
|
|
videoRecorder.on("record", (blob) => {
|
|
|
saveAs(
|
|
|
- new File([blob], ui18n.t('record.vName') + ".mp4", { type: "video/mp4; codecs=h264" }),
|
|
|
+ new File([blob], ui18n.t("record.vName") + ".mp4", {
|
|
|
+ type: "video/mp4; codecs=h264",
|
|
|
+ }),
|
|
|
props.guide.title + ".mp4"
|
|
|
);
|
|
|
});
|