mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 10:02:46 +00:00
fix: improve chat user filtering and update input maxlength
This commit is contained in:
parent
23b835fa19
commit
8f1b0e0da5
|
|
@ -3728,7 +3728,7 @@ msgstr ""
|
|||
#: apps/models_provider/impl/xinference_model_provider/credential/tti.py:14
|
||||
#: apps/models_provider/impl/zhipu_model_provider/credential/tti.py:15
|
||||
msgid "Image size"
|
||||
msgstr "每页大小"
|
||||
msgstr "生成图像的宽高像素"
|
||||
|
||||
#: apps/models_provider/impl/aliyun_bai_lian_model_provider/credential/tti.py:20
|
||||
#: apps/models_provider/impl/azure_model_provider/credential/tti.py:15
|
||||
|
|
|
|||
|
|
@ -3728,7 +3728,7 @@ msgstr ""
|
|||
#: apps/models_provider/impl/xinference_model_provider/credential/tti.py:14
|
||||
#: apps/models_provider/impl/zhipu_model_provider/credential/tti.py:15
|
||||
msgid "Image size"
|
||||
msgstr "每頁大小"
|
||||
msgstr "生成图像的宽高像素"
|
||||
|
||||
#: apps/models_provider/impl/aliyun_bai_lian_model_provider/credential/tti.py:20
|
||||
#: apps/models_provider/impl/azure_model_provider/credential/tti.py:15
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@
|
|||
<div class="flex align-center" style="display: inline-flex">
|
||||
<div class="mr-4">
|
||||
<span>{{ $t('views.model.modelForm.base_model.label') }} </span>
|
||||
<span class="color-danger ml-4">{{
|
||||
<span class="color-danger ml-4" style="color: red">{{
|
||||
$t('views.model.modelForm.base_model.tooltip')
|
||||
}}</span>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -51,23 +51,26 @@ const form = ref<{ user: string[] }>({
|
|||
|
||||
const optionLoading = ref(false)
|
||||
const chatUserList = ref<ChatUserItem[]>([])
|
||||
|
||||
const originalChatUserList = ref<ChatUserItem[]>([]);
|
||||
async function getChatUserList() {
|
||||
try {
|
||||
const res = await loadPermissionApi('chatUser').getChatUserList(optionLoading)
|
||||
chatUserList.value = res.data
|
||||
originalChatUserList.value = res.data;
|
||||
chatUserList.value = [...res.data];
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
|
||||
const filterUser = (query: string, item: ChatUserItem) => {
|
||||
if (!query) return true;
|
||||
const filterUser = (query: string) => {
|
||||
if (!query) {
|
||||
chatUserList.value = originalChatUserList.value;
|
||||
return;
|
||||
}
|
||||
|
||||
const q = query.toLowerCase();
|
||||
return (
|
||||
item.nick_name?.toLowerCase().includes(q) ||
|
||||
item.username?.toLowerCase().includes(q) ||
|
||||
false
|
||||
chatUserList.value = originalChatUserList.value.filter(
|
||||
(item) => item.nick_name?.toLowerCase().includes(q) || item.username?.toLowerCase().includes(q)
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
v-model="dialogVisible" :close-on-click-modal="false" :close-on-press-escape="false" :destroy-on-close="true">
|
||||
<el-form label-position="top" ref="formRef" :rules="rules" :model="form" require-asterisk-position="right" @submit.prevent>
|
||||
<el-form-item :label="$t('views.chatUser.group.name')" prop="name">
|
||||
<el-input v-model="form.name" maxlength="64"
|
||||
<el-input v-model="form.name" maxlength="128" show-word-limit
|
||||
:placeholder="`${$t('common.inputPlaceholder')}${$t('views.chatUser.group.name')}`" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
|
|
|||
Loading…
Reference in New Issue