|
@@ -243,6 +243,39 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <!-- 文本中有括号 -->
|
|
|
+ <div
|
|
|
+ v-else-if="column.type === 'textBrackets'"
|
|
|
+ :key="`column-${i}-${j}`"
|
|
|
+ :class="[
|
|
|
+ `textBrackets-${themeColor}`,
|
|
|
+ (selectCell.row === i && selectCell.column === j) ||
|
|
|
+ (selectedLine.type === 'column' &&
|
|
|
+ selectedLine.index === j) ||
|
|
|
+ (selectedLine.type === 'row' && selectedLine.index === i)
|
|
|
+ ? 'selected'
|
|
|
+ : '',
|
|
|
+ playing &&
|
|
|
+ column.lrc_data.begin_time / 1000 <= curTime &&
|
|
|
+ (curTime < column.lrc_data.end_time / 1000 ||
|
|
|
+ column.lrc_data.end_time === -1)
|
|
|
+ ? 'playing'
|
|
|
+ : '',
|
|
|
+ column.isTitle ? 'title' : ''
|
|
|
+ ]"
|
|
|
+ @click="matrixCellClick(i, j)"
|
|
|
+ >
|
|
|
+ <span>
|
|
|
+ <span class="brackets-text">{{
|
|
|
+ column.text_brackets.brackets_outer
|
|
|
+ }}</span>
|
|
|
+ <span class="brackets"> [ </span>
|
|
|
+ <span class="brackets-text">{{
|
|
|
+ column.text_brackets.brackets_inner
|
|
|
+ }}</span>
|
|
|
+ <span class="brackets"> ]</span>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -447,11 +480,15 @@ export default {
|
|
|
type,
|
|
|
text,
|
|
|
sentence_data,
|
|
|
- pinyin_english_data
|
|
|
+ pinyin_english_data,
|
|
|
+ text_brackets
|
|
|
} = this.curQue.voiceMatrix.matrix[row][column];
|
|
|
if (type === "text") this.fileName = text;
|
|
|
if (type === "SentenceSegwordChs") this.fileName = sentence_data.sentence;
|
|
|
if (type === "PinyinEnglish") this.fileName = pinyin_english_data.pinyin;
|
|
|
+ if (type === "textBrackets") {
|
|
|
+ this.fileName = `${text_brackets.brackets_outer}[${text_brackets.brackets_inner}]`;
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
checkboxMouseenter(isSelected, type) {
|
|
@@ -494,22 +531,9 @@ export default {
|
|
|
let { type, index } = this.selectedLine;
|
|
|
if (type.length > 0 && index >= 0 && type === "row") {
|
|
|
this.curQue.voiceMatrix.matrix[index].forEach(
|
|
|
- ({ type, text, lrc_data }) => {
|
|
|
- if (
|
|
|
- type === "SentenceSegwordChs" ||
|
|
|
- type === "PinyinEnglish" ||
|
|
|
- (type === "text" && text.length > 0)
|
|
|
- ) {
|
|
|
- if (lrc_data.end_time === -1) {
|
|
|
- this.lrcArray.push({
|
|
|
- begin_time: lrc_data.begin_time,
|
|
|
- end_time: this.mp3Duration,
|
|
|
- text: lrc_data.text
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
- this.lrcArray.push(lrc_data);
|
|
|
- }
|
|
|
+ item => {
|
|
|
+ let data = this.getLrcData(item);
|
|
|
+ if (data) this.lrcArray.push(data);
|
|
|
}
|
|
|
);
|
|
|
if (this.lrcArray.length > 0) this.lrcPlay(this.lrcArray[0], 0);
|
|
@@ -518,22 +542,8 @@ export default {
|
|
|
|
|
|
if (type.length > 0 && index >= 0 && type === "column") {
|
|
|
this.curQue.voiceMatrix.matrix.forEach(item => {
|
|
|
- let { type, text, lrc_data } = item[index];
|
|
|
- if (
|
|
|
- type === "SentenceSegwordChs" ||
|
|
|
- type === "PinyinEnglish" ||
|
|
|
- (type === "text" && text.length > 0)
|
|
|
- ) {
|
|
|
- if (lrc_data.end_time === -1) {
|
|
|
- this.lrcArray.push({
|
|
|
- begin_time: lrc_data.begin_time,
|
|
|
- end_time: this.mp3Duration,
|
|
|
- text: lrc_data.text
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
- this.lrcArray.push(lrc_data);
|
|
|
- }
|
|
|
+ let data = this.getLrcData(item[index]);
|
|
|
+ if (data) this.lrcArray.push(data);
|
|
|
});
|
|
|
if (this.lrcArray.length > 0) this.lrcPlay(this.lrcArray[0], 0);
|
|
|
return;
|
|
@@ -597,26 +607,13 @@ export default {
|
|
|
},
|
|
|
|
|
|
getSelectData({ type, index, row, column }) {
|
|
|
- if (type === '') return;
|
|
|
+ if (type === "") return;
|
|
|
let arr = [];
|
|
|
if (type.length > 0 && index >= 0 && type === "row") {
|
|
|
this.curQue.voiceMatrix.matrix[index].forEach(
|
|
|
- ({ type, text, lrc_data }) => {
|
|
|
- if (
|
|
|
- type === "SentenceSegwordChs" ||
|
|
|
- type === "PinyinEnglish" ||
|
|
|
- (type === "text" && text.length > 0)
|
|
|
- ) {
|
|
|
- if (lrc_data.end_time === -1) {
|
|
|
- arr.push({
|
|
|
- begin_time: lrc_data.begin_time,
|
|
|
- end_time: this.mp3Duration,
|
|
|
- text: lrc_data.text
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
- arr.push(lrc_data);
|
|
|
- }
|
|
|
+ item => {
|
|
|
+ let data = this.getLrcData(item);
|
|
|
+ if (data) arr.push(data);
|
|
|
}
|
|
|
);
|
|
|
this.matrixSelectLrc = arr;
|
|
@@ -625,22 +622,8 @@ export default {
|
|
|
|
|
|
if (type.length > 0 && index >= 0 && type === "column") {
|
|
|
this.curQue.voiceMatrix.matrix.forEach(item => {
|
|
|
- let { type, text, lrc_data } = item[index];
|
|
|
- if (
|
|
|
- type === "SentenceSegwordChs" ||
|
|
|
- type === "PinyinEnglish" ||
|
|
|
- (type === "text" && text.length > 0)
|
|
|
- ) {
|
|
|
- if (lrc_data.end_time === -1) {
|
|
|
- arr.push({
|
|
|
- begin_time: lrc_data.begin_time,
|
|
|
- end_time: this.mp3Duration,
|
|
|
- text: lrc_data.text
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
- arr.push(lrc_data);
|
|
|
- }
|
|
|
+ let data = this.getLrcData(item[index]);
|
|
|
+ if (data) arr.push(data);
|
|
|
});
|
|
|
this.matrixSelectLrc = arr;
|
|
|
return;
|
|
@@ -653,6 +636,25 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
+ getLrcData({ type, text, lrc_data }) {
|
|
|
+ if (
|
|
|
+ type === "SentenceSegwordChs" ||
|
|
|
+ type === "PinyinEnglish" ||
|
|
|
+ type === "textBrackets" ||
|
|
|
+ (type === "text" && text.length > 0)
|
|
|
+ ) {
|
|
|
+ if (lrc_data.end_time === -1) {
|
|
|
+ return {
|
|
|
+ begin_time: lrc_data.begin_time,
|
|
|
+ end_time: this.mp3Duration,
|
|
|
+ text: lrc_data.text
|
|
|
+ };
|
|
|
+ }
|
|
|
+ return lrc_data;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ },
|
|
|
+
|
|
|
sentPause(isRecord) {
|
|
|
this.isRecord = isRecord;
|
|
|
},
|
|
@@ -1090,6 +1092,47 @@ $select-color-brown-active: #a37557;
|
|
|
background-color: $select-color-brown-hover;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ %textBrackets,
|
|
|
+ .textBrackets-,
|
|
|
+ .textBrackets-red {
|
|
|
+ @extend %column;
|
|
|
+
|
|
|
+ .brackets-text {
|
|
|
+ font-family: "GB-PINYINOK-B";
|
|
|
+ }
|
|
|
+
|
|
|
+ .brackets {
|
|
|
+ font-size: 16px;
|
|
|
+ font-family: "FZJCGFKTK";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .textBrackets-green {
|
|
|
+ @extend %textBrackets;
|
|
|
+
|
|
|
+ &.selected {
|
|
|
+ color: $select-color-green;
|
|
|
+ border-color: $select-color-green;
|
|
|
+ }
|
|
|
+
|
|
|
+ &.playing {
|
|
|
+ background-color: $select-color-green-hover;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .textBrackets-brown {
|
|
|
+ @extend %textBrackets;
|
|
|
+
|
|
|
+ &.selected {
|
|
|
+ color: $select-color-brown;
|
|
|
+ border-color: $select-color-brown;
|
|
|
+ }
|
|
|
+
|
|
|
+ &.playing {
|
|
|
+ background-color: $select-color-brown-hover;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|