mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
perf: Partial style optimization
This commit is contained in:
parent
5901e7fc02
commit
b709de30b9
|
|
@ -53,7 +53,7 @@
|
|||
<el-text type="info" v-if="configType === 'wechat'">
|
||||
{{ $t('views.application.applicationAccess.copyUrl') }}
|
||||
<a
|
||||
class="primary"
|
||||
class="color-primary"
|
||||
href="https://mp.weixin.qq.com/advanced/advanced?action=dev&t=advanced/dev"
|
||||
target="_blank"
|
||||
>{{ $t('views.application.applicationAccess.wechatPlatform') }}</a
|
||||
|
|
@ -62,7 +62,7 @@
|
|||
<el-text type="info" v-if="configType === 'dingtalk'">
|
||||
{{ $t('views.application.applicationAccess.copyUrl') }}
|
||||
<a
|
||||
class="primary"
|
||||
class="color-primary"
|
||||
href="https://open-dev.dingtalk.com/fe/app?hash=%23%2Fcorp%2Fapp#/corp/app"
|
||||
target="_blank"
|
||||
>{{ $t('views.application.applicationAccess.dingtalkPlatform') }}</a
|
||||
|
|
@ -71,7 +71,7 @@
|
|||
<el-text type="info" v-if="configType === 'wecom'">
|
||||
{{ $t('views.application.applicationAccess.copyUrl') }}
|
||||
<a
|
||||
class="primary"
|
||||
class="color-primary"
|
||||
href="https://work.weixin.qq.com/wework_admin/frame#apps"
|
||||
target="_blank"
|
||||
>{{ $t('views.application.applicationAccess.wecomPlatform') }}</a
|
||||
|
|
|
|||
|
|
@ -16,7 +16,9 @@
|
|||
</el-avatar>
|
||||
</div>
|
||||
<div class="content ml-12">
|
||||
<h4 class="text break-all">{{ questionTitle }}</h4>
|
||||
<h4 class="text break-all ellipsis-1" style="width: 66%" :title="questionTitle">
|
||||
{{ questionTitle }}
|
||||
</h4>
|
||||
</div>
|
||||
</div>
|
||||
<el-scrollbar>
|
||||
|
|
@ -95,11 +97,13 @@
|
|||
<div class="hit-test__operate">
|
||||
<el-popover :visible="popoverVisible" placement="right-end" :width="500" trigger="click">
|
||||
<template #reference>
|
||||
<el-button icon="Setting" class="mb-8" @click="settingChange('open')"
|
||||
v-if="! route.path.includes('share/')"
|
||||
>{{
|
||||
$t('common.paramSetting')
|
||||
}}</el-button>
|
||||
<el-button
|
||||
icon="Setting"
|
||||
class="mb-8"
|
||||
@click="settingChange('open')"
|
||||
v-if="!route.path.includes('share/')"
|
||||
>{{ $t('common.paramSetting') }}</el-button
|
||||
>
|
||||
</template>
|
||||
<div class="mb-16">
|
||||
<div class="title mb-8">
|
||||
|
|
@ -190,21 +194,18 @@
|
|||
|
||||
<div class="text-right">
|
||||
<el-button @click="popoverVisible = false">{{ $t('common.cancel') }}</el-button>
|
||||
<el-button type="primary" @click="settingChange('close')"
|
||||
>{{
|
||||
<el-button type="primary" @click="settingChange('close')">{{
|
||||
$t('common.confirm')
|
||||
}}</el-button>
|
||||
</div>
|
||||
</el-popover>
|
||||
<div class="operate-textarea flex"
|
||||
v-if="! route.path.includes('share/')"
|
||||
>
|
||||
<div class="operate-textarea flex" v-if="!route.path.includes('share/')">
|
||||
<el-input
|
||||
ref="quickInputRef"
|
||||
v-model="inputValue"
|
||||
type="textarea"
|
||||
:placeholder="$t('common.inputPlaceholder')"
|
||||
:autosize="{ minRows: 1, maxRows: 8 }"
|
||||
:autosize="{ minRows: 1, maxRows: 1 }"
|
||||
@keydown.enter="sendChatHandle($event)"
|
||||
/>
|
||||
<div class="operate">
|
||||
|
|
|
|||
|
|
@ -180,32 +180,38 @@ const rules = ref<FormRules<LoginRequest>>({
|
|||
})
|
||||
|
||||
const loginHandle = () => {
|
||||
loading.value = true
|
||||
loginFormRef.value
|
||||
?.validate()
|
||||
.then(() => {
|
||||
if (!loginFormRef.value) {
|
||||
return
|
||||
}
|
||||
loginFormRef.value.validate((valid) => {
|
||||
if (valid) {
|
||||
loading.value = true
|
||||
if (loginMode.value === 'LDAP') {
|
||||
login.asyncLdapLogin(loginForm.value).then(() => {
|
||||
locale.value = localStorage.getItem('MaxKB-locale') || getBrowserLang() || 'en-US'
|
||||
loading.value = false
|
||||
router.push({ name: 'home' })
|
||||
}).catch(() => {
|
||||
loading.value = false
|
||||
})
|
||||
login
|
||||
.asyncLdapLogin(loginForm.value)
|
||||
.then(() => {
|
||||
locale.value = localStorage.getItem('MaxKB-locale') || getBrowserLang() || 'en-US'
|
||||
loading.value = false
|
||||
router.push({ name: 'home' })
|
||||
})
|
||||
.catch(() => {
|
||||
loading.value = false
|
||||
})
|
||||
} else {
|
||||
login.asyncLogin(loginForm.value).then(() => {
|
||||
locale.value = localStorage.getItem('MaxKB-locale') || getBrowserLang() || 'en-US'
|
||||
localStorage.setItem('workspace_id', 'default')
|
||||
loading.value = false
|
||||
router.push({ name: 'home' })
|
||||
}).catch(() => {
|
||||
loading.value = false
|
||||
})
|
||||
login
|
||||
.asyncLogin(loginForm.value)
|
||||
.then(() => {
|
||||
locale.value = localStorage.getItem('MaxKB-locale') || getBrowserLang() || 'en-US'
|
||||
localStorage.setItem('workspace_id', 'default')
|
||||
loading.value = false
|
||||
router.push({ name: 'home' })
|
||||
})
|
||||
.catch(() => {
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function makeCode() {
|
||||
|
|
|
|||
|
|
@ -163,13 +163,17 @@
|
|||
</el-table-column>
|
||||
<el-table-column :label="$t('common.operation')" align="left" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-tooltip effect="dark" :content="$t('common.modify')" placement="top">
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
:content="$t('common.modify')"
|
||||
placement="top"
|
||||
v-if="permissionPrecise.modify()"
|
||||
>
|
||||
<span class="mr-8">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
:title="$t('common.modify')"
|
||||
v-if="permissionPrecise.modify()"
|
||||
@click.stop="openEditModel(row)"
|
||||
>
|
||||
<el-icon><EditPen /></el-icon>
|
||||
|
|
@ -180,32 +184,36 @@
|
|||
effect="dark"
|
||||
:content="$t('views.model.modelForm.title.paramSetting')"
|
||||
placement="top"
|
||||
v-if="
|
||||
(row.model_type === 'TTS' ||
|
||||
row.model_type === 'LLM' ||
|
||||
row.model_type === 'IMAGE' ||
|
||||
row.model_type === 'TTI') &&
|
||||
permissionPrecise.paramSetting()
|
||||
"
|
||||
>
|
||||
<span class="mr-8">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
:title="$t('views.model.modelForm.title.paramSetting')"
|
||||
v-if="
|
||||
(row.model_type === 'TTS' ||
|
||||
row.model_type === 'LLM' ||
|
||||
row.model_type === 'IMAGE' ||
|
||||
row.model_type === 'TTI') &&
|
||||
permissionPrecise.paramSetting()
|
||||
"
|
||||
@click.stop="openParamSetting(row)"
|
||||
>
|
||||
<el-icon><Setting /></el-icon>
|
||||
</el-button>
|
||||
</span>
|
||||
</el-tooltip>
|
||||
<el-tooltip effect="dark" :content="$t('common.delete')" placement="top">
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
:content="$t('common.delete')"
|
||||
placement="top"
|
||||
v-if="permissionPrecise.delete()"
|
||||
>
|
||||
<span class="mr-8">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
:title="$t('common.delete')"
|
||||
v-if="permissionPrecise.delete()"
|
||||
@click.stop="deleteModel(row)"
|
||||
>
|
||||
<el-icon><Delete /></el-icon>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="email-setting p-16-24">
|
||||
<h4 class="mb-16">{{ $t('views.system.email.title') }}</h4>
|
||||
<el-card style="--el-card-padding: 16px" v-loading="loading" class="main-calc-height">
|
||||
<el-card style="--el-card-padding: 16px" v-loading="loading">
|
||||
<el-scrollbar>
|
||||
<div class="email-setting__main p-16">
|
||||
<el-form
|
||||
|
|
@ -152,6 +152,7 @@ onMounted(() => {
|
|||
&__main {
|
||||
width: 70%;
|
||||
margin: 0 auto;
|
||||
height: calc(100vh - 200px);
|
||||
}
|
||||
|
||||
:deep(.el-checkbox__label) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue