mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
perf: 属性栏默认值优化
This commit is contained in:
parent
6fe17bc6d8
commit
d31b8e6b3c
@ -212,7 +212,7 @@ export default defineComponent({
|
||||
|
||||
watch(handleElement, () => {
|
||||
if (!handleElement.value || handleElement.value.type !== 'chart') return
|
||||
fill.value = handleElement.value.fill || 'transparent'
|
||||
fill.value = handleElement.value.fill || '#fff'
|
||||
|
||||
if (handleElement.value.options) {
|
||||
const {
|
||||
|
@ -176,10 +176,10 @@ export default defineComponent({
|
||||
'80px', '88px', '96px', '104px', '112px', '120px',
|
||||
]
|
||||
|
||||
const fill = ref('transparent')
|
||||
const fill = ref('#fff')
|
||||
const outline = ref<PPTElementOutline>({
|
||||
width: 0,
|
||||
color: 'transparent',
|
||||
color: '#fff',
|
||||
style: 'solid',
|
||||
})
|
||||
|
||||
|
@ -261,7 +261,7 @@ export default defineComponent({
|
||||
watch(handleElement, () => {
|
||||
if (!handleElement.value || handleElement.value.type !== 'shape') return
|
||||
|
||||
fill.value = handleElement.value.fill || 'transparent'
|
||||
fill.value = handleElement.value.fill || '#fff'
|
||||
gradient.value = handleElement.value.gradient || { type: 'linear', rotate: 0, color: [fill.value, '#fff'] }
|
||||
fillType.value = handleElement.value.gradient ? 'gradient' : 'fill'
|
||||
textAlign.value = handleElement.value?.text?.align || 'middle'
|
||||
|
@ -363,7 +363,7 @@ export default defineComponent({
|
||||
watch(handleElement, () => {
|
||||
if (!handleElement.value || handleElement.value.type !== 'text') return
|
||||
|
||||
fill.value = handleElement.value.fill || 'transparent'
|
||||
fill.value = handleElement.value.fill || '#fff'
|
||||
lineHeight.value = handleElement.value.lineHeight || 1.5
|
||||
wordSpace.value = handleElement.value.wordSpace || 0
|
||||
}, { deep: true, immediate: true })
|
||||
|
Loading…
x
Reference in New Issue
Block a user