diff --git a/.eslintrc.js b/.eslintrc.js index 50bb0e29d3..b3f6f5a712 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -25,6 +25,17 @@ module.exports = { endOfLine: "auto", }, ], + "vue/no-restricted-syntax": [ + "error", + { + selector: "LogicalExpression[operator=??]", + message: `template内で"??"を使うとgithubのsyntax highlightが崩れるので\n三項演算子等を使って書き換えてください`, + }, + { + selector: "MemberExpression[optional=true]", + message: `template内で"?."を使うとgithubのsyntax highlightが崩れるので\n三項演算子等を使って書き換えてください`, + }, + ], "@typescript-eslint/no-unused-vars": [ "warn", { diff --git a/src/components/AudioInfo.vue b/src/components/AudioInfo.vue index e35a7cbea8..07346a7fa7 100644 --- a/src/components/AudioInfo.vue +++ b/src/components/AudioInfo.vue @@ -170,7 +170,12 @@ :class="{ disabled: speedScaleSlider.qSliderProps.disable.value, }" - >話速 {{ speedScaleSlider.state.currentValue.value?.toFixed(2) }}話速 + {{ + speedScaleSlider.state.currentValue.value + ? speedScaleSlider.state.currentValue.value.toFixed(2) + : undefined + }} 音高 {{ pitchScaleSlider.state.currentValue.value?.toFixed(2) }}音高 + {{ + pitchScaleSlider.state.currentValue.value + ? pitchScaleSlider.state.currentValue.value.toFixed(2) + : undefined + }} 抑揚 - {{ intonationScaleSlider.state.currentValue.value?.toFixed(2) }} 音量 {{ volumeScaleSlider.state.currentValue.value?.toFixed(2) }}音量 + {{ + volumeScaleSlider.state.currentValue.value + ? volumeScaleSlider.state.currentValue.value.toFixed(2) + : undefined + }} 開始無音 - {{ prePhonemeLengthSlider.state.currentValue.value?.toFixed(2) }} 終了無音 - {{ postPhonemeLengthSlider.state.currentValue.value?.toFixed(2) }} - {{ previewSlider.state.currentValue.value?.toFixed(precisionComputed) }} + {{ + previewSlider.state.currentValue.value + ? previewSlider.state.currentValue.value.toFixed(precisionComputed) + : undefined + }}