Files
safePower/dist/assets/087AC4D233B64EB0themeColorPicker.KBM6p9y4.js
xiaozhiyong 9c5961efe9 更新
2026-04-29 09:15:49 +08:00

5 lines
3.8 KiB
JavaScript

/*!
Build based on gin-vue-admin
Time : 1776662816000 */
import{a as e,a1 as r,g as a,c as o,o as l,b as s,F as d,J as t,f as n,K as c,t as i,n as g,d as m,w as b,x as u,au as y}from"./087AC4D233B64EB0index.D-00lXMX.js";import{_ as x}from"./087AC4D233B64EB0_plugin-vue_export-helper.BCo6x5W8.js";const p={class:"font-inter"},f={class:"bg-gray-50 dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-8 shadow-sm"},k={class:"mb-8"},v={class:"grid grid-cols-3 gap-4"},h=["onClick"],w={key:0,class:"absolute inset-0 flex items-center justify-center text-white text-base",style:{"text-shadow":"0 1px 2px rgba(0, 0, 0, 0.3)"}},V={class:"min-w-0 flex-1"},C={class:"block text-sm font-semibold text-gray-900 dark:text-white"},_={class:"flex items-center justify-between p-5 bg-white dark:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-xl mb-6 shadow-sm"},j={class:"bg-white dark:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-xl p-5 shadow-sm"},E={class:"flex items-center justify-between"},B={class:"flex items-center gap-3"},A={class:"text-sm font-mono bg-gray-100 dark:bg-gray-600 text-gray-700 dark:text-gray-300 px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-500"},D=x(Object.assign({name:"ThemeColorPicker"},{__name:"themeColorPicker",props:{modelValue:{type:String,default:"#3b82f6"}},emits:["update:modelValue"],setup(x,{emit:D}){const P=x,z=D,F=e(P.modelValue),I=[{color:"#4E80EE",name:"默认"},{color:"#8bb5d1",name:"晨雾蓝"},{color:"#a8c8a8",name:"薄荷绿"},{color:"#d4a5a5",name:"玫瑰粉"},{color:"#c8a8d8",name:"薰衣草"},{color:"#f0c674",name:"暖阳黄"},{color:"#b8b8b8",name:"月光银"},{color:"#d8a8a8",name:"珊瑚橙"},{color:"#a8d8d8",name:"海雾青"},{color:"#c8c8a8",name:"橄榄绿"},{color:"#d8c8a8",name:"奶茶棕"},{color:"#a8a8d8",name:"梦幻紫"},{color:"#c8d8a8",name:"抹茶绿"}],J=e=>{e&&z("update:modelValue",e)};return r(()=>P.modelValue,e=>{F.value=e}),(e,r)=>{const D=a("el-icon"),P=a("el-color-picker");return l(),o("div",p,[s("div",f,[s("div",k,[r[1]||(r[1]=s("p",{class:"text-base font-semibold text-gray-700 dark:text-gray-300 mb-5"},"精选色彩",-1)),s("div",v,[(l(),o(d,null,t(I,e=>s("div",{key:e.color,class:g(["flex items-center gap-4 p-4 bg-white dark:bg-gray-700 border-2 border-gray-200 dark:border-gray-600 rounded-xl cursor-pointer transition-all duration-150 ease-in-out hover:transform hover:-translate-y-1 hover:shadow-lg",{"ring-2 ring-offset-2 ring-offset-gray-50 dark:ring-offset-gray-800 transform -translate-y-1 shadow-lg":x.modelValue===e.color}]),style:c(x.modelValue===e.color?{borderColor:e.color,ringColor:e.color+"40"}:{}),onClick:r=>{return a=e.color,F.value=a,void z("update:modelValue",a);var a}},[s("div",{class:"relative w-10 h-10 rounded-lg border border-gray-300 dark:border-gray-500 flex-shrink-0 shadow-sm",style:c({backgroundColor:e.color})},[x.modelValue===e.color?(l(),o("div",w,[n(D,null,{default:b(()=>[n(u(y))]),_:1})])):m("",!0)],4),s("div",V,[s("span",C,i(e.name),1)])],14,h)),64))])]),s("div",_,[r[2]||(r[2]=s("div",{class:"flex-1"},[s("h4",{class:"text-base font-semibold text-gray-900 dark:text-white"},"自定义颜色"),s("p",{class:"text-sm text-gray-500 dark:text-gray-400 mt-1"},"选择任意颜色作为主题色")],-1)),n(P,{modelValue:F.value,"onUpdate:modelValue":r[0]||(r[0]=e=>F.value=e),size:"large",predefine:I.map(e=>e.color),onChange:J,class:"custom-color-picker"},null,8,["modelValue","predefine"])]),s("div",j,[s("div",E,[r[3]||(r[3]=s("span",{class:"text-base font-semibold text-gray-700 dark:text-gray-300"},"当前主题色",-1)),s("div",B,[s("div",{class:"w-6 h-6 rounded-lg border border-gray-300 dark:border-gray-500 shadow-sm",style:c({backgroundColor:x.modelValue})},null,4),s("code",A,i(x.modelValue),1)])])])])])}}}),[["__scopeId","data-v-3e46e213"]]);export{D as default};