分割重命名时默认值填入
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
parent
9da9515930
commit
8db641db16
|
|
@ -26,7 +26,8 @@
|
|||
</div>
|
||||
<div :class="['tool-item', activeTool === 'CircularEraser' && segmentList.length > 0 ? 'tool-item-active' : '']"
|
||||
:style="{ cursor: segmentList.length <= 0 || (curSegment && curSegment.lock) ? 'not-allowed' : 'pointer' }"
|
||||
:title="$t('trials:Segmentations:tools:Eraser')" @click.prevent="setToolActive('CircularEraser')">
|
||||
:title="$t('trials:Segmentations:tools:Eraser')"
|
||||
@click.prevent="setToolActive('CircularEraser')">
|
||||
<svg-icon icon-class="clear" class="svg-icon" />
|
||||
</div>
|
||||
<!-- <div :class="['tool-item']">
|
||||
|
|
@ -870,7 +871,14 @@ export default {
|
|||
if (passive) this.$emit('setToolsPassive')
|
||||
},
|
||||
async rename(key, item) {
|
||||
let name = await this.customPrompt()
|
||||
let value = null
|
||||
if (key === 'segmentGroup') {
|
||||
let group = this.segmentList.find(i => i.segmentationId === this.segmentationId)
|
||||
value = group.name
|
||||
} else {
|
||||
value = item.SegmentLabel
|
||||
}
|
||||
let name = await this.customPrompt(value)
|
||||
if (!name) return false
|
||||
if (key === 'segmentGroup') {
|
||||
let group = this.segmentList.find(i => i.segmentationId === this.segmentationId)
|
||||
|
|
@ -881,7 +889,7 @@ export default {
|
|||
this.addOrUpdateSegment({ name: item.SegmentLabel, color: item.color, segmentIndex: item.segmentIndex, segmentationId: item.segmentationId, segmentJson: JSON.stringify({ stats: item.stats, bidirectional: item.bidirectional }), id: item.id })
|
||||
}
|
||||
},
|
||||
async customPrompt() {
|
||||
async customPrompt(name) {
|
||||
try {
|
||||
const that = this
|
||||
// 请输入标记名称
|
||||
|
|
@ -893,6 +901,7 @@ export default {
|
|||
showCancelButton: true,
|
||||
closeOnClickModal: false,
|
||||
closeOnPressEscape: false,
|
||||
inputValue: name,
|
||||
beforeClose: (action, instance, done) => {
|
||||
if (action === 'confirm') {
|
||||
// const value = instance.inputValue
|
||||
|
|
|
|||
Loading…
Reference in New Issue