mirror of
https://github.com/mfish-qf/mfish-nocode-view.git
synced 2026-11-01 05:06:38 +08:00
1 line
1.7 KiB
JavaScript
1 line
1.7 KiB
JavaScript
import{mr as e,xt as t}from"./common.js";import{t as n}from"./TextStyle.js";import{createElementBlock as r,createElementVNode as i,createVNode as a,defineComponent as o,normalizeClass as s,openBlock as c,ref as l,toDisplayString as u,unref as d,watch as f}from"vue";import{useDesign as p}from"@mfish/core/hooks";var m={class:`title`},h=e(o({__name:`TitleConfig`,props:{title:{type:String,default:`文本样式`},hideAlign:{type:Boolean,default:!1}},setup(e){let o=t(),h=l({}),{prefixCls:g}=p(`title-config`);f(()=>o.getCurConfigComponent,e=>{e&&_()},{immediate:!0});function _(){h.value={},h.value.font=o.getCurConfigComponent.chart.options.font?.value,h.value.fontSize=o.getCurConfigComponent.chart.options.fontSize?.value,h.value.hAlignType=o.getCurConfigComponent.chart.options.hAlign?.value,h.value.vAlignType=o.getCurConfigComponent.chart.options.vAlign?.value,h.value.textColor=o.getCurConfigComponent.chart.options.textColor?.value,h.value.fontStyle=o.getCurConfigComponent.chart.options.fontStyle?.value}function v(e){o.getCurConfigComponent.chart.options.font=e}function y(e){o.getCurConfigComponent.chart.options.fontSize=e}function b(e){o.getCurConfigComponent.chart.options.hAlign=e}function x(e){o.getCurConfigComponent.chart.options.vAlign=e}function S(e){o.getCurConfigComponent.chart.options.fontStyle=e}function C(e){o.getCurConfigComponent.chart.options.textColor=e}return(t,o)=>(c(),r(`div`,{class:s(d(g))},[i(`div`,m,u(e.title),1),a(n,{"hide-align":e.hideAlign,"text-style":h.value,onFontChange:v,onSizeChange:y,onHAlignChange:b,onVAlignChange:x,onFontStyleChange:S,onColorChange:C},null,8,[`hide-align`,`text-style`])],2))}}),[[`__scopeId`,`data-v-033080e0`]]);export{h as t}; |