diff --git a/fe/config/index.js b/fe/config/index.js index 6c25a32..86e3578 100644 --- a/fe/config/index.js +++ b/fe/config/index.js @@ -54,7 +54,7 @@ module.exports = { // Paths assetsRoot: path.resolve(__dirname, '../dist'), assetsSubDirectory: 'static', - assetsPublicPath: '/dw-tool-ner/v1.2.3/', + assetsPublicPath: '/dw-tool-ner/v1.2.4/', /** * Source Maps diff --git a/fe/src/components/NER/index.vue b/fe/src/components/NER/index.vue index 382d4dd..a4f252b 100644 --- a/fe/src/components/NER/index.vue +++ b/fe/src/components/NER/index.vue @@ -29,12 +29,12 @@ @mouseover="setFocus(type)" @mouseleave="setFocus('')" > - + {{ type }} {{ fastTypeKey[type] ? `【${fastTypeKey[type]}】` : '' }} - + - + @@ -81,10 +81,6 @@
-
@@ -154,6 +150,7 @@ export default { name: 'NER', data () { return { + configCanCtlType: false, // 是否支持实体类型的调整 pageNumber: 1, pageSize: 20, inputType: '', @@ -291,6 +288,7 @@ export default { this.$set(this, 'nowType', type) }, delType: function (type, ev) { + if (!this.configCanCtlType) return false const that = this ev && ev.preventDefault() // 取消默认的右键菜单事件 // 右键删除对应的类型 @@ -310,6 +308,7 @@ export default { updateType2Server(that.projectName, that.typeList, that.types) }, checkDelType: function (type, ev) { + if (!this.configCanCtlType) return false ev && ev.stopPropagation() const isDel = window.confirm(`确定删除标签【${type}】么?`) if (isDel) { @@ -387,6 +386,7 @@ export default { ners.splice(i, 1) this.$set(this, 'ners', ners) this.flushWordsType() + this.save() // 删除时实时保存 return true } } @@ -419,6 +419,7 @@ export default { this.$set(this, 'nowNer', undefined) this.flushWordsType() this.startIdx = -1 + this.save() // 添加时实时保存 }, stopPrev: function (event) { event.preventDefault() @@ -557,9 +558,6 @@ export default { } else if (type === 'page-down') { // 快捷下一个 that.changeIdx(+1) - } else if (type === 'save') { - // 保存 - that.save() } else { // 快捷选择类型 const type = that.fastKeyType[key] @@ -817,8 +815,8 @@ export default { pointer-events: none; } .color-icon { + display: block; float: right; - display: inline-block; margin-top: 6px; } .close-icon { diff --git a/fe/src/components/home/index.vue b/fe/src/components/home/index.vue index cc60e28..6355f05 100644 --- a/fe/src/components/home/index.vue +++ b/fe/src/components/home/index.vue @@ -12,8 +12,8 @@
暂无
-

{{project.projectName}}

-

{{project.projectType}}

+

{{project.projectName}}

+

{{project.projectType}}

@@ -22,12 +22,32 @@
-

名称:

+

名称:

类型: -

+
+ 选择标签: +
+
+ + + + {{ type }} + + + + + + +
+

@@ -38,9 +58,29 @@