列车报错修改
This commit is contained in:
parent
12fcb7d1a6
commit
40c2583b12
@ -57,7 +57,7 @@ import { ref } from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
dev: {
|
||||
type: Section || Turnout,
|
||||
type: [Section, Turnout],
|
||||
required: true,
|
||||
},
|
||||
kmLength: {
|
||||
|
@ -421,6 +421,9 @@ export class Train extends JlGraphic {
|
||||
}
|
||||
allLength = Math.abs(B - A);
|
||||
}
|
||||
if (allLength == 0) {
|
||||
allLength = 1;
|
||||
}
|
||||
if (this.states.headOffset > allLength) {
|
||||
console.error('偏移长度超出最大长度');
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user