|
@@ -22,7 +22,7 @@
|
|
|
:width="width"
|
|
:width="width"
|
|
|
:height="height"
|
|
:height="height"
|
|
|
:dialog-height="dialogHeight"
|
|
:dialog-height="dialogHeight"
|
|
|
- :label-key="labelKey"
|
|
|
|
|
|
|
+ :label-key="showLabel"
|
|
|
:toolbars="toolbars"
|
|
:toolbars="toolbars"
|
|
|
:preview="preview"
|
|
:preview="preview"
|
|
|
:temp-search="tempSearch"
|
|
:temp-search="tempSearch"
|
|
@@ -43,7 +43,7 @@ import ButtonsConstants from '@/business/platform/data/constants/buttons'
|
|
|
import TemplateDefault from './types/default'
|
|
import TemplateDefault from './types/default'
|
|
|
import TemplateDialog from './types/dialog'
|
|
import TemplateDialog from './types/dialog'
|
|
|
import TemplateValueSource from './types/value-source'
|
|
import TemplateValueSource from './types/value-source'
|
|
|
-
|
|
|
|
|
|
|
+import { buildLabelTitle } from '../utils'
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
TemplateDefault,
|
|
TemplateDefault,
|
|
@@ -90,7 +90,8 @@ export default {
|
|
|
height: null,
|
|
height: null,
|
|
|
dialogHeight: null,
|
|
dialogHeight: null,
|
|
|
toolbars: [],
|
|
toolbars: [],
|
|
|
- selectedValue: this.multiple ? [] : {}
|
|
|
|
|
|
|
+ selectedValue: this.multiple ? [] : {},
|
|
|
|
|
+ showLabel: this.labelKey
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
@@ -100,6 +101,14 @@ export default {
|
|
|
},
|
|
},
|
|
|
immediate: true
|
|
immediate: true
|
|
|
},
|
|
},
|
|
|
|
|
+ labelKey: {
|
|
|
|
|
+ handler: function (val, oldVal) {
|
|
|
|
|
+ if (val) {
|
|
|
|
|
+ this.showLabel = val
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ immediate: true
|
|
|
|
|
+ },
|
|
|
data: {
|
|
data: {
|
|
|
handler: function (val, oldVal) {
|
|
handler: function (val, oldVal) {
|
|
|
this.initDataTemplate(val)
|
|
this.initDataTemplate(val)
|
|
@@ -138,6 +147,9 @@ export default {
|
|
|
this.dialogHeight = h - 130 - (this.multiple ? 60 : 40) - vh
|
|
this.dialogHeight = h - 130 - (this.multiple ? 60 : 40) - vh
|
|
|
this.toolbars = this.handleToolbars(dialogs.buttons ? dialogs.buttons.dialog_buttons : [])
|
|
this.toolbars = this.handleToolbars(dialogs.buttons ? dialogs.buttons.dialog_buttons : [])
|
|
|
}
|
|
}
|
|
|
|
|
+ if (this.$utils.isEmpty(this.labelKey)) {
|
|
|
|
|
+ this.showLabel = buildLabelTitle(dataTemplate)
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
handleToolbars (buttons) {
|
|
handleToolbars (buttons) {
|
|
|
const toolbars = []
|
|
const toolbars = []
|