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, () => {
|
watch(handleElement, () => {
|
||||||
if (!handleElement.value || handleElement.value.type !== 'chart') return
|
if (!handleElement.value || handleElement.value.type !== 'chart') return
|
||||||
fill.value = handleElement.value.fill || 'transparent'
|
fill.value = handleElement.value.fill || '#fff'
|
||||||
|
|
||||||
if (handleElement.value.options) {
|
if (handleElement.value.options) {
|
||||||
const {
|
const {
|
||||||
|
@ -176,10 +176,10 @@ export default defineComponent({
|
|||||||
'80px', '88px', '96px', '104px', '112px', '120px',
|
'80px', '88px', '96px', '104px', '112px', '120px',
|
||||||
]
|
]
|
||||||
|
|
||||||
const fill = ref('transparent')
|
const fill = ref('#fff')
|
||||||
const outline = ref<PPTElementOutline>({
|
const outline = ref<PPTElementOutline>({
|
||||||
width: 0,
|
width: 0,
|
||||||
color: 'transparent',
|
color: '#fff',
|
||||||
style: 'solid',
|
style: 'solid',
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -261,7 +261,7 @@ export default defineComponent({
|
|||||||
watch(handleElement, () => {
|
watch(handleElement, () => {
|
||||||
if (!handleElement.value || handleElement.value.type !== 'shape') return
|
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'] }
|
gradient.value = handleElement.value.gradient || { type: 'linear', rotate: 0, color: [fill.value, '#fff'] }
|
||||||
fillType.value = handleElement.value.gradient ? 'gradient' : 'fill'
|
fillType.value = handleElement.value.gradient ? 'gradient' : 'fill'
|
||||||
textAlign.value = handleElement.value?.text?.align || 'middle'
|
textAlign.value = handleElement.value?.text?.align || 'middle'
|
||||||
|
@ -363,7 +363,7 @@ export default defineComponent({
|
|||||||
watch(handleElement, () => {
|
watch(handleElement, () => {
|
||||||
if (!handleElement.value || handleElement.value.type !== 'text') return
|
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
|
lineHeight.value = handleElement.value.lineHeight || 1.5
|
||||||
wordSpace.value = handleElement.value.wordSpace || 0
|
wordSpace.value = handleElement.value.wordSpace || 0
|
||||||
}, { deep: true, immediate: true })
|
}, { deep: true, immediate: true })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user