From 269eb0bf506761901ac1422dd4bc156fa25e59b2 Mon Sep 17 00:00:00 2001 From: sugar1569 Date: Sat, 4 Mar 2023 09:57:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B7=BB=E5=8A=A0=E8=AF=AD?= =?UTF-8?q?=E8=A8=80=E5=9C=B0=E5=8C=BA=EF=BC=8C=E8=AF=86=E5=88=AB=E7=A0=81?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E6=B5=8F=E8=A7=88=E5=99=A8=E8=AF=86=E5=88=AB?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../services/system/lang/LangCountryServices.php | 14 +++++++++++--- .../app/services/system/lang/LangTypeServices.php | 8 ++++++-- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/crmeb/app/services/system/lang/LangCountryServices.php b/crmeb/app/services/system/lang/LangCountryServices.php index b1f5736ab..d7c062f63 100644 --- a/crmeb/app/services/system/lang/LangCountryServices.php +++ b/crmeb/app/services/system/lang/LangCountryServices.php @@ -57,12 +57,16 @@ class LangCountryServices extends BaseServices { if ($id) $info = $this->dao->get($id); $field = []; - $field[] = Form::input('name', '所属地区', $info['name'] ?? '')->required('请填写所属地区'); + $field[] = Form::input('name', '所属地区', $info['name'] ?? '')->required('请填写所属地区')->appendRule('suffix', [ + 'type' => 'div', + 'class' => 'tips-info', + 'domProps' => ['innerHTML' => '例如:中国、香港、德国'] + ]); $field[] = Form::input('code', '语言识别码', $info['code'] ?? '')->required('请填写浏览器语言识别码')->appendRule('suffix', [ 'type' => 'div', 'class' => 'tips-info', 'domProps' => ['innerHTML' => '浏览器语言识别码'] - ]);; + ]); /** @var LangTypeServices $langTypeServices */ $langTypeServices = app()->make(LangTypeServices::class); $list = $langTypeServices->getColumn(['is_del' => 0, 'status' => 1], 'language_name,file_name,id', 'id'); @@ -73,7 +77,11 @@ class LangCountryServices extends BaseServices } return $menus; }; - $field[] = Form::select('type_id', '语言类型', $info['type_id'] ?? 0)->setOptions(Form::setOptions($setOption))->filterable(true); + $field[] = Form::select('type_id', '关联语言', $info['type_id'] ?? 0)->setOptions(Form::setOptions($setOption))->filterable(true)->appendRule('suffix', [ + 'type' => 'div', + 'class' => 'tips-info', + 'domProps' => ['innerHTML' => '请选择关联语言,语言类型是由您自行添加的'] + ]); return create_form($id ? '修改语言地区' : '新增语言地区', $field, Url::buildUrl('/setting/lang_country/save/' . $id), 'POST'); } diff --git a/crmeb/app/services/system/lang/LangTypeServices.php b/crmeb/app/services/system/lang/LangTypeServices.php index 2b7d77a4e..a1d65bc7a 100644 --- a/crmeb/app/services/system/lang/LangTypeServices.php +++ b/crmeb/app/services/system/lang/LangTypeServices.php @@ -46,7 +46,11 @@ class LangTypeServices extends BaseServices if ($id) $info = $this->dao->get($id); $field = []; $field[] = Form::input('language_name', '语言名称', $info['language_name'] ?? '')->required('请填写语言名称'); - $field[] = Form::input('file_name', '语言标识', $info['file_name'] ?? '')->required('请填写语言标识'); + $field[] = Form::input('file_name', '语言标识', $info['file_name'] ?? '')->required('请填写语言标识')->appendRule('suffix', [ + 'type' => 'div', + 'class' => 'tips-info', + 'domProps' => ['innerHTML' => '请选择或输入浏览器标识'] + ]); $field[] = Form::radio('is_default', '是否默认', $info['is_default'] ?? 0)->options([['label' => '开启', 'value' => 1], ['label' => '关闭', 'value' => 0]]); $field[] = Form::radio('status', '状态', $info['status'] ?? 1)->options([['label' => '开启', 'value' => 1], ['label' => '关闭', 'value' => 0]]); return create_form($id ? '修改语言类型' : '新增语言类型', $field, Url::buildUrl('/setting/lang_type/save/' . $id), 'POST'); @@ -128,4 +132,4 @@ class LangTypeServices extends BaseServices $this->setDefaultLangName(); return true; } -} \ No newline at end of file +}