2025-03-26 15:53:47 +08:00
|
|
|
|
<template>
|
2025-04-15 13:03:29 +08:00
|
|
|
|
<el-dialog :visible="dialogVisible" @update:visible="handleVisibleChange" width="975px" center
|
|
|
|
|
|
custom-class="custom-dialog" :show-close="false" class="center-dialog">
|
2025-03-27 11:54:05 +08:00
|
|
|
|
<div style="margin: 0 18px; text-align: left; padding: 10px; border-radius: 10px;">
|
|
|
|
|
|
<div style="font-size: 30px; color: #3d4566; margin-top: -10px; margin-bottom: 10px; text-align: center;">
|
|
|
|
|
|
添加模型
|
|
|
|
|
|
</div>
|
2025-04-08 10:53:59 +08:00
|
|
|
|
|
2025-03-27 11:54:05 +08:00
|
|
|
|
<button class="custom-close-btn" @click="handleClose">
|
|
|
|
|
|
×
|
|
|
|
|
|
</button>
|
2025-03-26 15:53:47 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- 模型信息部分 -->
|
2025-03-27 11:54:05 +08:00
|
|
|
|
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;">
|
2025-03-26 15:53:47 +08:00
|
|
|
|
<div style="font-size: 20px; font-weight: bold; color: #3d4566;">模型信息</div>
|
|
|
|
|
|
<div style="display: flex; align-items: center; gap: 20px;">
|
|
|
|
|
|
<div style="display: flex; align-items: center;">
|
|
|
|
|
|
<span style="margin-right: 8px;">是否启用</span>
|
|
|
|
|
|
<el-switch v-model="formData.isEnabled" class="custom-switch"></el-switch>
|
|
|
|
|
|
</div>
|
2025-04-15 13:03:29 +08:00
|
|
|
|
<div style="display: none; align-items: center;">
|
2025-03-26 15:53:47 +08:00
|
|
|
|
<span style="margin-right: 8px;">设为默认</span>
|
|
|
|
|
|
<el-switch v-model="formData.isDefault" class="custom-switch"></el-switch>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2025-03-27 11:54:05 +08:00
|
|
|
|
<div style="height: 2px; background: #e9e9e9; margin-bottom: 22px;"></div>
|
2025-03-26 15:53:47 +08:00
|
|
|
|
<el-form :model="formData" label-width="100px" label-position="left" class="custom-form">
|
2025-03-27 11:54:05 +08:00
|
|
|
|
<div style="display: flex; gap: 20px; margin-bottom: 0;">
|
|
|
|
|
|
<el-form-item label="模型名称" prop="modelName" style="flex: 1;">
|
2025-04-03 14:31:57 +08:00
|
|
|
|
<el-input v-model="formData.modelName" placeholder="请输入模型名称" class="custom-input-bg"></el-input>
|
2025-03-26 15:53:47 +08:00
|
|
|
|
</el-form-item>
|
2025-03-27 11:54:05 +08:00
|
|
|
|
<el-form-item label="模型编码" prop="modelCode" style="flex: 1;">
|
2025-04-03 14:31:57 +08:00
|
|
|
|
<el-input v-model="formData.modelCode" placeholder="请输入模型编码" class="custom-input-bg"></el-input>
|
2025-03-26 15:53:47 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2025-03-27 11:54:05 +08:00
|
|
|
|
<div style="display: flex; gap: 20px; margin-bottom: 0;">
|
|
|
|
|
|
<el-form-item label="供应器" prop="supplier" style="flex: 1;">
|
2025-04-05 21:03:46 +08:00
|
|
|
|
<el-select v-model="formData.supplier" placeholder="请选择" class="custom-select custom-input-bg"
|
|
|
|
|
|
style="width: 100%;" @focus="loadProviders" filterable>
|
|
|
|
|
|
<el-option v-for="item in providers" :key="item.value" :label="item.label" :value="item.value" />
|
2025-03-26 15:53:47 +08:00
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
2025-03-27 11:54:05 +08:00
|
|
|
|
<el-form-item label="排序号" prop="sortOrder" style="flex: 1;">
|
2025-04-16 12:55:07 +08:00
|
|
|
|
<el-input v-model="formData.sort" type="number" placeholder="请输入排序号" class="custom-input-bg"></el-input>
|
2025-03-26 15:53:47 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2025-04-03 14:31:57 +08:00
|
|
|
|
|
2025-03-27 11:54:05 +08:00
|
|
|
|
<el-form-item label="文档地址" prop="docLink" style="margin-bottom: 27px;">
|
2025-04-05 21:03:46 +08:00
|
|
|
|
<el-input v-model="formData.docLink" placeholder="请输入文档地址" class="custom-input-bg"></el-input>
|
2025-03-26 15:53:47 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
2025-03-27 11:54:05 +08:00
|
|
|
|
<el-form-item label="备注" prop="remark" class="prop-remark">
|
2025-04-05 21:03:46 +08:00
|
|
|
|
<el-input v-model="formData.remark" type="textarea" :rows="3" placeholder="请输入模型备注"
|
|
|
|
|
|
class="custom-input-bg"></el-input>
|
2025-03-26 15:53:47 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
|
|
<div style="font-size: 20px; font-weight: bold; color: #3d4566; margin-bottom: 15px;">调用信息</div>
|
2025-04-08 09:38:31 +08:00
|
|
|
|
<div style="height: 2px; background: #e9e9e9; margin-bottom: 22px;"></div>
|
2025-03-26 15:53:47 +08:00
|
|
|
|
|
2025-04-09 14:08:05 +08:00
|
|
|
|
<el-form :model="formData.configJson" label-width="auto" label-position="left" class="custom-form">
|
2025-04-08 09:38:31 +08:00
|
|
|
|
<template v-for="(row, rowIndex) in chunkedCallInfoFields">
|
|
|
|
|
|
<div :key="rowIndex" style="display: flex; gap: 20px; margin-bottom: 0;">
|
2025-04-15 13:03:29 +08:00
|
|
|
|
<el-form-item v-for="field in row" :key="field.prop" :label="field.label" :prop="field.prop"
|
2025-04-08 16:17:56 +08:00
|
|
|
|
style="flex: 1;">
|
2025-04-15 13:03:29 +08:00
|
|
|
|
<el-input v-model="formData.configJson[field.prop]" :placeholder="field.placeholder"
|
|
|
|
|
|
:type="field.type || 'text'" class="custom-input-bg" :show-password="field.type === 'password'">
|
2025-04-08 16:17:56 +08:00
|
|
|
|
</el-input>
|
2025-04-08 09:38:31 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
2025-03-26 15:53:47 +08:00
|
|
|
|
</el-form>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2025-03-27 11:54:05 +08:00
|
|
|
|
<div style="display: flex;justify-content: center;">
|
2025-04-03 14:31:57 +08:00
|
|
|
|
<el-button type="primary" @click="confirm" class="save-btn">
|
2025-03-26 15:53:47 +08:00
|
|
|
|
保存
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2025-04-05 21:03:46 +08:00
|
|
|
|
import Api from '@/apis/api';
|
2025-03-26 15:53:47 +08:00
|
|
|
|
export default {
|
|
|
|
|
|
name: 'AddModelDialog',
|
|
|
|
|
|
props: {
|
2025-04-05 21:03:46 +08:00
|
|
|
|
visible: { type: Boolean, required: true },
|
|
|
|
|
|
modelType: { type: String, required: true }
|
2025-03-26 15:53:47 +08:00
|
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2025-04-03 14:31:57 +08:00
|
|
|
|
providers: [],
|
2025-04-09 14:08:05 +08:00
|
|
|
|
dialogVisible: false,
|
2025-04-03 14:31:57 +08:00
|
|
|
|
providersLoaded: false,
|
2025-04-08 16:17:56 +08:00
|
|
|
|
providerFields: [],
|
|
|
|
|
|
currentProvider: null,
|
2025-03-26 15:53:47 +08:00
|
|
|
|
formData: {
|
|
|
|
|
|
modelName: '',
|
|
|
|
|
|
modelCode: '',
|
|
|
|
|
|
supplier: '',
|
|
|
|
|
|
sort: 1,
|
|
|
|
|
|
docLink: '',
|
|
|
|
|
|
remark: '',
|
|
|
|
|
|
isEnabled: true,
|
|
|
|
|
|
isDefault: true,
|
2025-04-08 09:38:31 +08:00
|
|
|
|
configJson: {}
|
2025-03-26 15:53:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-04-08 09:38:31 +08:00
|
|
|
|
watch: {
|
|
|
|
|
|
visible(val) {
|
2025-04-09 14:08:05 +08:00
|
|
|
|
this.dialogVisible = val;
|
2025-04-15 13:03:29 +08:00
|
|
|
|
if (val) {
|
2025-04-08 09:38:31 +08:00
|
|
|
|
this.initConfigJson();
|
2025-04-09 14:08:05 +08:00
|
|
|
|
} else {
|
|
|
|
|
|
this.resetForm();
|
2025-04-08 09:38:31 +08:00
|
|
|
|
}
|
2025-04-08 16:17:56 +08:00
|
|
|
|
},
|
|
|
|
|
|
'formData.supplier'(newVal) {
|
|
|
|
|
|
this.currentProvider = this.providers.find(p => p.value === newVal);
|
|
|
|
|
|
this.providerFields = this.currentProvider?.fields || [];
|
|
|
|
|
|
this.initDynamicConfig();
|
2025-04-08 09:38:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
computed: {
|
2025-04-08 16:17:56 +08:00
|
|
|
|
dynamicCallInfoFields() {
|
|
|
|
|
|
return this.providerFields;
|
2025-04-08 09:38:31 +08:00
|
|
|
|
},
|
|
|
|
|
|
chunkedCallInfoFields() {
|
|
|
|
|
|
const chunkSize = 2;
|
|
|
|
|
|
const result = [];
|
2025-04-08 16:17:56 +08:00
|
|
|
|
for (let i = 0; i < this.dynamicCallInfoFields.length; i += chunkSize) {
|
|
|
|
|
|
result.push(this.dynamicCallInfoFields.slice(i, i + chunkSize));
|
2025-04-08 09:38:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
return result;
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-03-26 15:53:47 +08:00
|
|
|
|
methods: {
|
2025-04-03 14:31:57 +08:00
|
|
|
|
loadProviders() {
|
|
|
|
|
|
if (this.providersLoaded)
|
|
|
|
|
|
return
|
|
|
|
|
|
|
2025-04-05 21:03:46 +08:00
|
|
|
|
Api.model.getModelProviders(this.modelType, (data) => {
|
2025-04-03 14:31:57 +08:00
|
|
|
|
this.providers = data.map(item => ({
|
|
|
|
|
|
label: item.name,
|
2025-04-08 16:17:56 +08:00
|
|
|
|
value: item.providerCode,
|
|
|
|
|
|
fields: JSON.parse(item.fields || '[]').map(f => ({
|
|
|
|
|
|
label: f.label,
|
|
|
|
|
|
prop: f.key,
|
|
|
|
|
|
type: f.type === 'password' ? 'password' : 'text',
|
|
|
|
|
|
placeholder: `请输入${f.label}`
|
|
|
|
|
|
}))
|
2025-04-03 14:31:57 +08:00
|
|
|
|
}))
|
|
|
|
|
|
this.providersLoaded = true
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2025-04-08 09:38:31 +08:00
|
|
|
|
initConfigJson() {
|
|
|
|
|
|
const defaultConfig = {};
|
2025-04-08 16:17:56 +08:00
|
|
|
|
this.providerFields.forEach(field => {
|
2025-04-08 09:38:31 +08:00
|
|
|
|
defaultConfig[field.prop] = '';
|
|
|
|
|
|
});
|
|
|
|
|
|
this.formData.configJson = { ...defaultConfig };
|
|
|
|
|
|
},
|
2025-04-09 14:08:05 +08:00
|
|
|
|
handleVisibleChange(val) {
|
|
|
|
|
|
this.dialogVisible = val;
|
|
|
|
|
|
this.$emit('update:visible', val);
|
|
|
|
|
|
if (!val) {
|
|
|
|
|
|
this.resetForm();
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
handleClose() {
|
|
|
|
|
|
this.$emit('update:visible', false);
|
|
|
|
|
|
},
|
2025-04-08 16:17:56 +08:00
|
|
|
|
initDynamicConfig() {
|
|
|
|
|
|
const newConfig = {};
|
|
|
|
|
|
this.providerFields.forEach(field => {
|
|
|
|
|
|
newConfig[field.prop] = this.formData.configJson[field.prop] || '';
|
|
|
|
|
|
});
|
|
|
|
|
|
this.formData.configJson = newConfig;
|
|
|
|
|
|
},
|
2025-03-26 15:53:47 +08:00
|
|
|
|
confirm() {
|
2025-04-08 16:17:56 +08:00
|
|
|
|
if (!this.formData.supplier) {
|
|
|
|
|
|
this.$message.error('请选择供应器');
|
2025-03-26 15:53:47 +08:00
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-04-08 09:38:31 +08:00
|
|
|
|
const submitData = {
|
2025-04-08 16:17:56 +08:00
|
|
|
|
modelName: this.formData.modelName || '',
|
|
|
|
|
|
modelCode: this.formData.modelCode || '',
|
2025-04-08 09:38:31 +08:00
|
|
|
|
supplier: this.formData.supplier,
|
2025-04-08 16:17:56 +08:00
|
|
|
|
sort: this.formData.sort || 1,
|
|
|
|
|
|
docLink: this.formData.docLink || '',
|
|
|
|
|
|
remark: this.formData.remark || '',
|
2025-04-08 09:38:31 +08:00
|
|
|
|
isEnabled: this.formData.isEnabled ? 1 : 0,
|
|
|
|
|
|
isDefault: this.formData.isDefault ? 1 : 0,
|
2025-04-07 09:44:48 +08:00
|
|
|
|
provideCode: this.formData.supplier,
|
2025-04-08 09:38:31 +08:00
|
|
|
|
configJson: {
|
|
|
|
|
|
...this.formData.configJson,
|
|
|
|
|
|
type: this.formData.supplier
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
this.$emit('confirm', submitData);
|
2025-03-26 15:53:47 +08:00
|
|
|
|
this.$emit('update:visible', false);
|
|
|
|
|
|
this.resetForm();
|
|
|
|
|
|
},
|
|
|
|
|
|
resetForm() {
|
|
|
|
|
|
this.formData = {
|
|
|
|
|
|
modelName: '',
|
|
|
|
|
|
modelCode: '',
|
|
|
|
|
|
supplier: '',
|
|
|
|
|
|
sort: 1,
|
|
|
|
|
|
docLink: '',
|
|
|
|
|
|
remark: '',
|
|
|
|
|
|
isEnabled: true,
|
|
|
|
|
|
isDefault: true,
|
2025-04-08 09:38:31 +08:00
|
|
|
|
configJson: {}
|
2025-03-26 15:53:47 +08:00
|
|
|
|
};
|
2025-04-03 14:31:57 +08:00
|
|
|
|
// 重置加载状态
|
|
|
|
|
|
this.providers = [];
|
|
|
|
|
|
this.providersLoaded = false;
|
2025-04-08 16:17:56 +08:00
|
|
|
|
// 重置字段配置
|
|
|
|
|
|
this.providerFields = [];
|
|
|
|
|
|
this.currentProvider = null;
|
2025-03-26 15:53:47 +08:00
|
|
|
|
},
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
|
.custom-dialog {
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
border-radius: 20px;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
background: white;
|
2025-03-27 11:54:05 +08:00
|
|
|
|
padding-bottom: 17px;
|
2025-03-26 15:53:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.custom-dialog .el-dialog__header {
|
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
border-bottom: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-03-27 11:54:05 +08:00
|
|
|
|
.center-dialog {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.center-dialog .el-dialog {
|
|
|
|
|
|
margin: 4% 0 auto !important;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-03-26 15:53:47 +08:00
|
|
|
|
.custom-close-btn {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
top: 20px;
|
|
|
|
|
|
right: 20px;
|
|
|
|
|
|
width: 35px;
|
|
|
|
|
|
height: 35px;
|
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
border: 2px solid #cfcfcf;
|
|
|
|
|
|
background: none;
|
|
|
|
|
|
font-size: 30px;
|
|
|
|
|
|
font-weight: lighter;
|
|
|
|
|
|
color: #cfcfcf;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
z-index: 1;
|
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
outline: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.custom-close-btn:hover {
|
|
|
|
|
|
color: #409EFF;
|
|
|
|
|
|
border-color: #409EFF;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.custom-select .el-input__suffix {
|
|
|
|
|
|
background: #e6e8ea;
|
2025-03-27 11:54:05 +08:00
|
|
|
|
right: 6px;
|
|
|
|
|
|
width: 20px;
|
|
|
|
|
|
height: 20px;
|
2025-03-26 15:53:47 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
align-items: center;
|
2025-03-27 11:54:05 +08:00
|
|
|
|
top: 9px;
|
2025-03-26 15:53:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.custom-select .el-input__suffix-inner {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.custom-select .el-icon-arrow-up:before {
|
|
|
|
|
|
content: "";
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
width: 0;
|
|
|
|
|
|
height: 0;
|
2025-03-27 11:54:05 +08:00
|
|
|
|
border-left: 5px solid transparent;
|
|
|
|
|
|
border-right: 5px solid transparent;
|
|
|
|
|
|
border-top: 7px solid #c0c4cc;
|
2025-03-26 15:53:47 +08:00
|
|
|
|
position: relative;
|
2025-03-27 11:54:05 +08:00
|
|
|
|
top: -2px;
|
2025-03-26 15:53:47 +08:00
|
|
|
|
transform: rotate(180deg);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.custom-form .el-form-item {
|
2025-04-03 14:31:57 +08:00
|
|
|
|
margin-bottom: 20px;
|
2025-03-26 15:53:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.custom-form .el-form-item__label {
|
|
|
|
|
|
color: #3d4566;
|
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
|
text-align: right;
|
2025-03-27 11:54:05 +08:00
|
|
|
|
padding-right: 20px;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.custom-form .el-form-item.prop-remark .el-form-item__label {
|
|
|
|
|
|
margin-top: -4px;
|
2025-03-26 15:53:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.custom-input-bg .el-input__inner::-webkit-input-placeholder,
|
|
|
|
|
|
.custom-input-bg .el-textarea__inner::-webkit-input-placeholder {
|
2025-03-27 11:54:05 +08:00
|
|
|
|
color: #9c9f9e;
|
2025-03-26 15:53:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-04-03 14:31:57 +08:00
|
|
|
|
|
2025-03-26 15:53:47 +08:00
|
|
|
|
.custom-input-bg .el-input__inner,
|
|
|
|
|
|
.custom-input-bg .el-textarea__inner {
|
|
|
|
|
|
background-color: #f6f8fc;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.save-btn {
|
|
|
|
|
|
background: #e6f0fd;
|
|
|
|
|
|
color: #237ff4;
|
|
|
|
|
|
border: 1px solid #b3d1ff;
|
|
|
|
|
|
width: 150px;
|
|
|
|
|
|
height: 40px;
|
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
transition: all 0.3s ease;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.save-btn:hover {
|
|
|
|
|
|
background: linear-gradient(to right, #237ff4, #9c40d5);
|
|
|
|
|
|
color: white;
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.custom-switch .el-switch__core {
|
|
|
|
|
|
border-radius: 20px;
|
|
|
|
|
|
height: 23px;
|
|
|
|
|
|
background-color: #c0ccda;
|
|
|
|
|
|
width: 35px;
|
2025-04-03 14:31:57 +08:00
|
|
|
|
padding: 0 20px;
|
2025-03-26 15:53:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.custom-switch .el-switch__core:after {
|
|
|
|
|
|
width: 15px;
|
|
|
|
|
|
height: 15px;
|
|
|
|
|
|
background-color: white;
|
|
|
|
|
|
top: 3px;
|
|
|
|
|
|
left: 4px;
|
|
|
|
|
|
transition: all .3s;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.custom-switch.is-checked .el-switch__core {
|
|
|
|
|
|
border-color: #b5bcf0;
|
|
|
|
|
|
background-color: #cfd7fa;
|
2025-04-03 14:31:57 +08:00
|
|
|
|
padding: 0 20px;
|
2025-03-26 15:53:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.custom-switch.is-checked .el-switch__core:after {
|
|
|
|
|
|
left: 100%;
|
|
|
|
|
|
margin-left: -18px;
|
|
|
|
|
|
background-color: #1b47ee;
|
|
|
|
|
|
}
|
2025-03-27 11:54:05 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[style*="display: flex"] {
|
2025-04-03 14:31:57 +08:00
|
|
|
|
gap: 20px;
|
2025-03-27 11:54:05 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.custom-input-bg .el-input__inner {
|
2025-04-03 14:31:57 +08:00
|
|
|
|
height: 32px;
|
2025-03-27 11:54:05 +08:00
|
|
|
|
}
|
2025-03-26 15:53:47 +08:00
|
|
|
|
</style>
|