Commit ca2518f6 authored by zhengke's avatar zhengke

优化颜色新增

parent 4bd3c16e
<template>
<div class="q-mt-xs bg-white q-pa-xs rounded ElementTemplateData">
<div class="bg-white rounded ElementTemplateData">
<div class="column text-mdall">
<div class="column">
<template v-if="CoverImg&&!isCoverImg">
......@@ -501,6 +501,9 @@
})
return
}
let color = datas.addColor.Name.slice(0,1)
let colorList = ColorList.value.filter(x=>{ return x.Name.toLowerCase().includes(color.toLowerCase())})
if(colorList.length>0&&!datas.addColor.Code) datas.addColor.Code = colorList[0].ID
if(datas.addColor.Content.indexOf('#')==-1){
ElMessage({
showClose: true,
......
......@@ -365,22 +365,25 @@
message: '请完善颜色名称',
type: 'warning',
})
if(!datas.params.Content){
ElMessage({
showClose: true,
message: '请完善颜色的16进制',
type: 'warning',
})
return
}
if(datas.params.Content.indexOf('#')==-1){
ElMessage({
showClose: true,
message: "色号需要在最前面加 # 号",
type: 'warning',
})
return
}
let color = datas.params.Name.slice(0,1)
let colorList = ColorList.value.filter(x=>{ return x.Name.toLowerCase().includes(color.toLowerCase())})
if(colorList.length>0&&!datas.params.Code) datas.addColor.Code = colorList[0].ID
if(!datas.params.Content){
ElMessage({
showClose: true,
message: '请完善颜色的16进制',
type: 'warning',
})
return
}
if(datas.params.Content.indexOf('#')==-1){
ElMessage({
showClose: true,
message: "色号需要在最前面加 # 号",
type: 'warning',
})
return
}
datas.requestLoading = true
if(datas.type==2) datas.params.Code = ''
const result = await ConfigService.SetTemplateConfigData(datas.params)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment