diff --git a/nezha-fronted/src/components/common/rightBox/assetMetaBox.vue b/nezha-fronted/src/components/common/rightBox/assetMetaBox.vue index 6a0cfe05c..3f70b41dd 100644 --- a/nezha-fronted/src/components/common/rightBox/assetMetaBox.vue +++ b/nezha-fronted/src/components/common/rightBox/assetMetaBox.vue @@ -39,6 +39,13 @@ inactive-value="0"> + + + + @@ -48,11 +55,11 @@
{{$t('config.assetLabel.params')}} - - - + + + + -
@@ -108,8 +115,38 @@
- {{$t('config.assetLabel.decimals')}}: - + + {{$t('config.assetLabel.decimals')}}: + + + + {{$t('config.assetLabel.default')}}: + + + +
+
+ + {{$t('config.assetLabel.default')}}: + + +
+
+ + {{$t('config.assetLabel.default')}}: + + +
+
+ + {{$t('config.assetLabel.default')}}: + + +
+
+ + {{$t('config.assetLabel.default')}}: +
@@ -214,6 +251,12 @@ export default { value: 'DOUBLE', name: this.$t('config.assetLabel.double') }, + { + icon: 'nz-icon nz-icon-password', + disabled: true, + value: 'PASSWORD', + name: this.$t('login.pin') + }, { icon: 'nz-icon nz-icon-dingshishijian', disabled: true, @@ -241,6 +284,7 @@ export default { groupId: n.groupId ? Number(n.groupId) : '', search: `${n.search}`, display: `${n.display}`, + required: n.required ? `${n.required}` : '0', param: n.param && ((typeof n.param) === 'string') ? JSON.parse(n.param) : {}, type: n.type.toUpperCase() } @@ -385,6 +429,10 @@ export default { case 'SELECT' : case 'DATETIME' : case 'DOUBLE' : + case 'TEXT' : + case 'TEXTAREA' : + case 'INTEGER' : + case 'PASSWORD' : this.showParam = true break default: @@ -419,7 +467,32 @@ export default { case 'DOUBLE' : this.showParam = true this.editAssetMeta.param = { - decimals: 2 + decimals: 2, + default: undefined + } + break + case 'TEXT' : + this.showParam = true + this.editAssetMeta.param = { + default: '' + } + break + case 'TEXTAREA' : + this.showParam = true + this.editAssetMeta.param = { + default: '' + } + break + case 'INTEGER' : + this.showParam = true + this.editAssetMeta.param = { + default: undefined + } + break + case 'PASSWORD' : + this.showParam = true + this.editAssetMeta.param = { + default: '' } break default: diff --git a/nezha-fronted/src/components/page/config/assetMeta.vue b/nezha-fronted/src/components/page/config/assetMeta.vue index 07c553375..028a34533 100644 --- a/nezha-fronted/src/components/page/config/assetMeta.vue +++ b/nezha-fronted/src/components/page/config/assetMeta.vue @@ -160,6 +160,7 @@ export default { group: {}, search: '0', display: '0', + required: '0', type: 'TEXT', param: {}, remark: ''