diff --git a/app/admin/model/Config.php b/app/admin/model/Config.php
index 7a0aca5a..40e8c23e 100644
--- a/app/admin/model/Config.php
+++ b/app/admin/model/Config.php
@@ -12,6 +12,7 @@ class Config extends Model
'value',
'content',
'extend',
+ 'input_extend',
];
protected $jsonDecodeType = ['checkbox', 'array', 'selects'];
@@ -27,8 +28,11 @@ class Config extends Model
if (is_array($model->rule)) {
$model->rule = implode(',', $model->rule);
}
- if ($model->getData('extend')) {
- $model->extend = json_encode($model->handleTextAreaData($model->getData('extend')));
+ if ($model->getData('extend') || $model->getData('inputExtend')) {
+ $extend = $model->handleTextAreaData($model->getData('extend'));
+ $inputExtend = $model->handleTextAreaData($model->getData('inputExtend'));
+ if ($inputExtend) $extend['baInputExtend'] = $inputExtend;
+ if ($extend) $model->extend = json_encode($extend);
}
$model->allow_del = 1;
}
@@ -104,9 +108,22 @@ class Config extends Model
{
if ($value) {
$arr = json_decode($value, true);
- return $arr ?: [];
+ if ($arr) {
+ unset($arr['baInputExtend']);
+ return $arr;
+ }
}
+ return [];
+ }
+ public function getInputExtendAttr($value, $row)
+ {
+ if ($row['extend']) {
+ $arr = json_decode($row['extend'], true);
+ if ($arr && isset($arr['baInputExtend'])) {
+ return $arr['baInputExtend'];
+ }
+ }
return [];
}
}
\ No newline at end of file
diff --git a/web/src/views/backend/routine/config/add.vue b/web/src/views/backend/routine/config/add.vue
index c2025de4..3ab25d11 100644
--- a/web/src/views/backend/routine/config/add.vue
+++ b/web/src/views/backend/routine/config/add.vue
@@ -12,8 +12,8 @@
@keyup.enter="onAddSubmit(formRef)"
:rules="rules"
:model="{ ...state.addConfig, ...state.formItemData }"
- :label-position="'left'"
- :label-width="120"
+ label-position="right"
+ :label-width="160"
>