|
@@ -1,29 +1,32 @@
|
|
|
<template>
|
|
<template>
|
|
|
<Tabs v-model:activeKey="activeKey" width="100%">
|
|
<Tabs v-model:activeKey="activeKey" width="100%">
|
|
|
- <TabPane key="setting" tab="设置">
|
|
|
|
|
|
|
+ <TabPane key="setting" :tab="$t('sys.setting')">
|
|
|
<ui-group borderBottom>
|
|
<ui-group borderBottom>
|
|
|
<ui-group-option>
|
|
<ui-group-option>
|
|
|
- <SignItem label="名称" not-apply>
|
|
|
|
|
|
|
+ <SignItem :label="$t('am.ammodel.name')" not-apply>
|
|
|
<ui-input
|
|
<ui-input
|
|
|
width="100%"
|
|
width="100%"
|
|
|
type="text"
|
|
type="text"
|
|
|
ref="nameInput"
|
|
ref="nameInput"
|
|
|
class="nameInput"
|
|
class="nameInput"
|
|
|
- placeholder="请输入名称"
|
|
|
|
|
|
|
+ :placeholder="$t('am.ammodel.nameplace')"
|
|
|
v-model="am.title"
|
|
v-model="am.title"
|
|
|
:maxlength="100"
|
|
:maxlength="100"
|
|
|
/>
|
|
/>
|
|
|
</SignItem>
|
|
</SignItem>
|
|
|
</ui-group-option>
|
|
</ui-group-option>
|
|
|
<ui-group-option class="item">
|
|
<ui-group-option class="item">
|
|
|
- <span class="label">显示名称</span>
|
|
|
|
|
|
|
+ <span class="label">{{ $t("am.ammodel.nameShow") }}</span>
|
|
|
<span class="oper"> <Switch v-model:checked="am.showTitle" /> </span>
|
|
<span class="oper"> <Switch v-model:checked="am.showTitle" /> </span>
|
|
|
</ui-group-option>
|
|
</ui-group-option>
|
|
|
</ui-group>
|
|
</ui-group>
|
|
|
|
|
|
|
|
<ui-group borderBottom>
|
|
<ui-group borderBottom>
|
|
|
<ui-group-option>
|
|
<ui-group-option>
|
|
|
- <SignItem label="文字大小" @apply-global="$emit('applyGlobal', 'fontSize')">
|
|
|
|
|
|
|
+ <SignItem
|
|
|
|
|
+ :label="$t('am.ammodel.fontsize')"
|
|
|
|
|
+ @apply-global="$emit('applyGlobal', 'fontSize')"
|
|
|
|
|
+ >
|
|
|
<Slider v-model:value="am.fontSize" :min="12" :max="60" :step="0.1" />
|
|
<Slider v-model:value="am.fontSize" :min="12" :max="60" :step="0.1" />
|
|
|
</SignItem>
|
|
</SignItem>
|
|
|
</ui-group-option>
|
|
</ui-group-option>
|
|
@@ -31,7 +34,7 @@
|
|
|
<ui-group borderBottom>
|
|
<ui-group borderBottom>
|
|
|
<ui-group-option>
|
|
<ui-group-option>
|
|
|
<SignItem
|
|
<SignItem
|
|
|
- label="可见范围"
|
|
|
|
|
|
|
+ :label="$t('am.ammodel.range')"
|
|
|
v-if="!am.globalVisibility"
|
|
v-if="!am.globalVisibility"
|
|
|
@apply-global="$emit('applyGlobal', 'visibilityRange')"
|
|
@apply-global="$emit('applyGlobal', 'visibilityRange')"
|
|
|
>
|
|
>
|
|
@@ -41,29 +44,29 @@
|
|
|
<ui-group-option>
|
|
<ui-group-option>
|
|
|
<ui-input
|
|
<ui-input
|
|
|
type="checkbox"
|
|
type="checkbox"
|
|
|
- label="全部范围可视"
|
|
|
|
|
|
|
+ :label="$t('am.ammodel.globalVisibility')"
|
|
|
:modelValue="!!am.globalVisibility"
|
|
:modelValue="!!am.globalVisibility"
|
|
|
@update:modelValue="(v: boolean) => am.globalVisibility = v"
|
|
@update:modelValue="(v: boolean) => am.globalVisibility = v"
|
|
|
/>
|
|
/>
|
|
|
</ui-group-option>
|
|
</ui-group-option>
|
|
|
</ui-group>
|
|
</ui-group>
|
|
|
</TabPane>
|
|
</TabPane>
|
|
|
- <TabPane key="animation" tab="动画">
|
|
|
|
|
|
|
+ <TabPane key="animation" :tab="$t('am.ammodel.am.name')">
|
|
|
<ui-group borderBottom>
|
|
<ui-group borderBottom>
|
|
|
<ui-group-option class="item">
|
|
<ui-group-option class="item">
|
|
|
- <span class="label">加帧</span>
|
|
|
|
|
|
|
+ <span class="label">{{ $t("am.ammodel.am.frame") }}</span>
|
|
|
<span class="oper" @click="$emit('addFrame')">
|
|
<span class="oper" @click="$emit('addFrame')">
|
|
|
<ui-icon type="keys_a" ctrl />
|
|
<ui-icon type="keys_a" ctrl />
|
|
|
</span>
|
|
</span>
|
|
|
</ui-group-option>
|
|
</ui-group-option>
|
|
|
<ui-group-option class="item">
|
|
<ui-group-option class="item">
|
|
|
- <span class="label">路径</span>
|
|
|
|
|
|
|
+ <span class="label">{{ $t("am.ammodel.am.path") }}</span>
|
|
|
<span class="oper">
|
|
<span class="oper">
|
|
|
<ui-icon @click="visibleSelectPath = true" type="add_a" ctrl />
|
|
<ui-icon @click="visibleSelectPath = true" type="add_a" ctrl />
|
|
|
</span>
|
|
</span>
|
|
|
</ui-group-option>
|
|
</ui-group-option>
|
|
|
<ui-group-option class="item">
|
|
<ui-group-option class="item">
|
|
|
- <span class="label">字幕</span>
|
|
|
|
|
|
|
+ <span class="label">{{ $t("am.ammodel.am.subtitle") }}</span>
|
|
|
<span class="oper">
|
|
<span class="oper">
|
|
|
<ui-icon
|
|
<ui-icon
|
|
|
@click="$emit('addSubtitle', { background: '#000' })"
|
|
@click="$emit('addSubtitle', { background: '#000' })"
|
|
@@ -75,7 +78,7 @@
|
|
|
</ui-group>
|
|
</ui-group>
|
|
|
<ui-group borderBottom v-if="amActions.length">
|
|
<ui-group borderBottom v-if="amActions.length">
|
|
|
<ui-group-option class="item">
|
|
<ui-group-option class="item">
|
|
|
- <span class="label">动作库</span>
|
|
|
|
|
|
|
+ <span class="label">{{ $t("am.ammodel.am.actionk") }}</span>
|
|
|
</ui-group-option>
|
|
</ui-group-option>
|
|
|
<ui-group-option class="item action-item" v-for="action in amActions">
|
|
<ui-group-option class="item action-item" v-for="action in amActions">
|
|
|
<span class="label">{{ action.title }}</span>
|
|
<span class="label">{{ action.title }}</span>
|
|
@@ -110,12 +113,12 @@
|
|
|
|
|
|
|
|
<Modal
|
|
<Modal
|
|
|
width="400px"
|
|
width="400px"
|
|
|
- title="选择路径"
|
|
|
|
|
|
|
+ :title="$t('am.ammodel.am.selectpath')"
|
|
|
:open="visibleSelectPath"
|
|
:open="visibleSelectPath"
|
|
|
@ok="selectPathHandler"
|
|
@ok="selectPathHandler"
|
|
|
@cancel="visibleSelectPath = false"
|
|
@cancel="visibleSelectPath = false"
|
|
|
- okText="确定"
|
|
|
|
|
- cancelText="取消"
|
|
|
|
|
|
|
+ :okText="$t('sys.enter')"
|
|
|
|
|
+ :cancelText="$t('sys.cancel')"
|
|
|
class="model-table"
|
|
class="model-table"
|
|
|
>
|
|
>
|
|
|
<div style="margin: 20px 0">
|
|
<div style="margin: 20px 0">
|
|
@@ -123,7 +126,7 @@
|
|
|
width="100%"
|
|
width="100%"
|
|
|
type="select"
|
|
type="select"
|
|
|
:options="options"
|
|
:options="options"
|
|
|
- placeholder="请选择路径"
|
|
|
|
|
|
|
+ :placeholder="$t('am.ammodel.am.selectpathtip')"
|
|
|
v-model="pathId"
|
|
v-model="pathId"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
@@ -140,6 +143,7 @@ import { paths } from "@/store/path";
|
|
|
import Message from "bill/components/message/message.vue";
|
|
import Message from "bill/components/message/message.vue";
|
|
|
import { Modal } from "ant-design-vue";
|
|
import { Modal } from "ant-design-vue";
|
|
|
import { amMap, getAMKey } from "@/sdk/association/animation";
|
|
import { amMap, getAMKey } from "@/sdk/association/animation";
|
|
|
|
|
+import { ui18n } from "@/lang";
|
|
|
|
|
|
|
|
const props = defineProps<{ am: AnimationModel }>();
|
|
const props = defineProps<{ am: AnimationModel }>();
|
|
|
const emit = defineEmits<{
|
|
const emit = defineEmits<{
|
|
@@ -149,27 +153,27 @@ const emit = defineEmits<{
|
|
|
const activeKey = ref("setting");
|
|
const activeKey = ref("setting");
|
|
|
|
|
|
|
|
const actionsMap: Record<string, string> = {
|
|
const actionsMap: Record<string, string> = {
|
|
|
- sit_to_stand: "坐:站起",
|
|
|
|
|
- fist_pump: "坐下",
|
|
|
|
|
- end_bicycle_sit_up: "躺:起来",
|
|
|
|
|
- hit_on_legs: "向后倒下",
|
|
|
|
|
- crawling: "爬",
|
|
|
|
|
- medium_hit_to_head: "挨打",
|
|
|
|
|
- illegal_knee: "左膝盖",
|
|
|
|
|
- death_from_back_headshot: "向前倒地",
|
|
|
|
|
- dying: "向前倒地死掉",
|
|
|
|
|
- standard_walk: "标准走",
|
|
|
|
|
- start_walking: "起步走",
|
|
|
|
|
- left_turn_wbriefcase: "向左转",
|
|
|
|
|
- running: "标准跑",
|
|
|
|
|
- drunk_walk: "醉汉走",
|
|
|
|
|
- mma_kick: "右前踢",
|
|
|
|
|
- standing_jump: "标准向上跳",
|
|
|
|
|
- sitting: "标准坐",
|
|
|
|
|
- a_idel: "站立",
|
|
|
|
|
- peone_forward: "匍匐前行",
|
|
|
|
|
- wall_crash: "松手摔倒",
|
|
|
|
|
- head_hit: "头被击中",
|
|
|
|
|
|
|
+ sit_to_stand: ui18n.t("am.ammodel.am.sit_to_stand"),
|
|
|
|
|
+ fist_pump: ui18n.t("am.ammodel.am.fist_pump"),
|
|
|
|
|
+ end_bicycle_sit_up: ui18n.t("am.ammodel.am.end_bicycle_sit_up"),
|
|
|
|
|
+ hit_on_legs: ui18n.t("am.ammodel.am.hit_on_legs"),
|
|
|
|
|
+ crawling: ui18n.t("am.ammodel.am.crawling"),
|
|
|
|
|
+ medium_hit_to_head: ui18n.t("am.ammodel.am.medium_hit_to_head"),
|
|
|
|
|
+ illegal_knee: ui18n.t("am.ammodel.am.illegal_knee"),
|
|
|
|
|
+ death_from_back_headshot: ui18n.t("am.ammodel.am.death_from_back_headshot"),
|
|
|
|
|
+ dying: ui18n.t("am.ammodel.am.dying"),
|
|
|
|
|
+ standard_walk: ui18n.t("am.ammodel.am.standard_walk"),
|
|
|
|
|
+ start_walking: ui18n.t("am.ammodel.am.start_walking"),
|
|
|
|
|
+ left_turn_wbriefcase: ui18n.t("am.ammodel.am.left_turn_wbriefcase"),
|
|
|
|
|
+ running: ui18n.t("am.ammodel.am.running"),
|
|
|
|
|
+ drunk_walk: ui18n.t("am.ammodel.am.drunk_walk"),
|
|
|
|
|
+ mma_kick: ui18n.t("am.ammodel.am.mma_kick"),
|
|
|
|
|
+ standing_jump: ui18n.t("am.ammodel.am.standing_jump"),
|
|
|
|
|
+ sitting: ui18n.t("am.ammodel.am.sitting"),
|
|
|
|
|
+ a_idel: ui18n.t("am.ammodel.am.a_idel"),
|
|
|
|
|
+ peone_forward: ui18n.t("am.ammodel.am.peone_forward"),
|
|
|
|
|
+ wall_crash: ui18n.t("am.ammodel.am.wall_crash"),
|
|
|
|
|
+ head_hit: ui18n.t("am.ammodel.am.head_hit"),
|
|
|
};
|
|
};
|
|
|
const keys = Object.keys(actionsMap);
|
|
const keys = Object.keys(actionsMap);
|
|
|
const amActions = computed(() => {
|
|
const amActions = computed(() => {
|
|
@@ -190,7 +194,7 @@ const pathId = ref<string>();
|
|
|
const visibleSelectPath = ref(false);
|
|
const visibleSelectPath = ref(false);
|
|
|
const selectPathHandler = () => {
|
|
const selectPathHandler = () => {
|
|
|
if (!pathId.value) {
|
|
if (!pathId.value) {
|
|
|
- Message.error("请选择路径");
|
|
|
|
|
|
|
+ Message.error(ui18n.t("am.ammodel.am.selectpathtip"));
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
const name = options.value.find(({ value }) => value === pathId.value)!.label;
|
|
const name = options.value.find(({ value }) => value === pathId.value)!.label;
|