mirror of
https://github.com/dataease/dataease.git
synced 2025-02-25 03:52:59 +08:00
Merge pull request #10028 from dataease/pr@dev-v2@fix_batch
Pr@dev v2@fix batch
This commit is contained in:
commit
03095dc3cb
@ -1 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg fill="#3370FF" t="1712630540622" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4351" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M885.333333 177.066667C838.4 104.533333 697.6 136.533333 652.8 149.333333c-8.533333 2.133333-19.2 4.266667-32 8.533334-40.533333-17.066667-87.466667-25.6-134.4-25.6-200.533333 0-362.666667 162.133333-362.666667 362.666666 0 51.2 10.666667 98.133333 27.733334 140.8-36.266667 117.333333-29.866667 194.133333 21.333333 234.666667 23.466667 19.2 51.2 25.6 81.066667 25.6 59.733333 0 123.733333-27.733333 157.866666-46.933333 23.466667 4.266667 49.066667 8.533333 74.666667 8.533333 130.133333 0 245.333333-68.266667 309.333333-172.8h-106.666666c-51.2 53.333333-121.6 87.466667-202.666667 87.466667-104.533333 0-194.133333-57.6-241.066667-142.933334 85.333333-241.066667 281.6-343.466667 373.333334-379.733333 68.266667 36.266667 119.466667 100.266667 136.533333 179.2H467.2v85.333333h381.866667v-19.2c0-40.533333-6.4-78.933333-19.2-115.2 49.066667-68.266667 93.866667-147.2 55.466666-202.666666z m-70.4 44.8s4.266667 17.066667-27.733333 66.133333c-17.066667-25.6-38.4-49.066667-61.866667-70.4 44.8-4.266667 81.066667-4.266667 89.6 4.266667zM298.666667 802.133333c-29.866667 8.533333-57.6 10.666667-70.4 0-4.266667-2.133333-17.066667-17.066667-10.666667-68.266666 23.466667 27.733333 51.2 49.066667 81.066667 68.266666zM209.066667 497.066667v-4.266667c0-153.6 123.733333-277.333333 277.333333-277.333333h2.133333c-93.866667 53.333333-202.666667 142.933333-279.466666 281.6z" p-id="4352"></path></svg>
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1712630540622" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4351" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M885.333333 177.066667C838.4 104.533333 697.6 136.533333 652.8 149.333333c-8.533333 2.133333-19.2 4.266667-32 8.533334-40.533333-17.066667-87.466667-25.6-134.4-25.6-200.533333 0-362.666667 162.133333-362.666667 362.666666 0 51.2 10.666667 98.133333 27.733334 140.8-36.266667 117.333333-29.866667 194.133333 21.333333 234.666667 23.466667 19.2 51.2 25.6 81.066667 25.6 59.733333 0 123.733333-27.733333 157.866666-46.933333 23.466667 4.266667 49.066667 8.533333 74.666667 8.533333 130.133333 0 245.333333-68.266667 309.333333-172.8h-106.666666c-51.2 53.333333-121.6 87.466667-202.666667 87.466667-104.533333 0-194.133333-57.6-241.066667-142.933334 85.333333-241.066667 281.6-343.466667 373.333334-379.733333 68.266667 36.266667 119.466667 100.266667 136.533333 179.2H467.2v85.333333h381.866667v-19.2c0-40.533333-6.4-78.933333-19.2-115.2 49.066667-68.266667 93.866667-147.2 55.466666-202.666666z m-70.4 44.8s4.266667 17.066667-27.733333 66.133333c-17.066667-25.6-38.4-49.066667-61.866667-70.4 44.8-4.266667 81.066667-4.266667 89.6 4.266667zM298.666667 802.133333c-29.866667 8.533333-57.6 10.666667-70.4 0-4.266667-2.133333-17.066667-17.066667-10.666667-68.266666 23.466667 27.733333 51.2 49.066667 81.066667 68.266666zM209.066667 497.066667v-4.266667c0-153.6 123.733333-277.333333 277.333333-277.333333h2.133333c-93.866667 53.333333-202.666667 142.933333-279.466666 281.6z" p-id="4352"></path></svg>
|
||||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
@ -1 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1715769658859" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4704" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M1023.853735 948.673618v75.25325H596.248536V948.673618zM511.926868 0.073132a511.926868 511.926868 0 0 1 511.926867 511.926868h-75.253249a436.600486 436.600486 0 1 0-436.600486 436.600486h5.119269v75.253249h-5.119269a511.926868 511.926868 0 1 1 0-1023.853735z m511.926867 803.505785v75.25325H596.248536v-75.180117zM362.590487 290.116269l192.11884 110.941866 192.11884 110.941865-192.11884 110.941865-192.11884 110.941866V290.189402zM1023.853735 658.484217v75.399514H596.248536V658.630481zM437.843737 420.438223v182.831024l79.202399-45.780888 79.2024-45.707756-79.2024-45.707756z" p-id="4705" fill="#3370FF"></path></svg>
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1715769658859" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4704" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M1023.853735 948.673618v75.25325H596.248536V948.673618zM511.926868 0.073132a511.926868 511.926868 0 0 1 511.926867 511.926868h-75.253249a436.600486 436.600486 0 1 0-436.600486 436.600486h5.119269v75.253249h-5.119269a511.926868 511.926868 0 1 1 0-1023.853735z m511.926867 803.505785v75.25325H596.248536v-75.180117zM362.590487 290.116269l192.11884 110.941866 192.11884 110.941865-192.11884 110.941865-192.11884 110.941866V290.189402zM1023.853735 658.484217v75.399514H596.248536V658.630481zM437.843737 420.438223v182.831024l79.202399-45.780888 79.2024-45.707756-79.2024-45.707756z" p-id="4705"></path></svg>
|
||||
|
Before Width: | Height: | Size: 953 B After Width: | Height: | Size: 938 B |
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
@ -61,7 +61,7 @@ const onBackgroundChange = val => {
|
||||
emits('onAttrChange', { custom: 'commonBackground' })
|
||||
}
|
||||
|
||||
const onStyleAttrChange = (value, key) => {
|
||||
const onStyleAttrChange = ({ key, value }) => {
|
||||
snapshotStore.recordSnapshotCache()
|
||||
emits('onAttrChange', { custom: 'style', property: key, value: value })
|
||||
}
|
||||
@ -143,7 +143,11 @@ const stopEvent = e => {
|
||||
name="style"
|
||||
class="common-style-area"
|
||||
>
|
||||
<common-style-set :themes="themes" :element="element"></common-style-set>
|
||||
<common-style-set
|
||||
@onStyleAttrChange="onStyleAttrChange"
|
||||
:themes="themes"
|
||||
:element="element"
|
||||
></common-style-set>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</div>
|
||||
|
@ -114,7 +114,7 @@
|
||||
:effect="themes"
|
||||
v-model="styleForm[styleOptionKey.value]"
|
||||
size="small"
|
||||
@change="changeStyle"
|
||||
@change="changeStylePre(styleOptionKey.value)"
|
||||
>
|
||||
<template #prefix>
|
||||
<el-icon :class="{ 'dark-icon': themes === 'dark' }">
|
||||
@ -279,7 +279,7 @@ const { t } = useI18n()
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
const snapshotStore = snapshotStoreWithOut()
|
||||
|
||||
const { curComponent, canvasStyleData } = storeToRefs(dvMainStore)
|
||||
const { canvasStyleData } = storeToRefs(dvMainStore)
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
@ -294,7 +294,7 @@ const expandIcon = (name: string) => {
|
||||
return h(Icon, { className: '', name })
|
||||
}
|
||||
const { themes, element } = toRefs(props)
|
||||
const emits = defineEmits(['onTextChange'])
|
||||
const emits = defineEmits(['onStyleAttrChange'])
|
||||
const styleMounted = ref({
|
||||
opacity: 1,
|
||||
fontSize: 22,
|
||||
@ -491,24 +491,29 @@ const styleOptionKeyArray = [
|
||||
]
|
||||
|
||||
const styleInit = () => {
|
||||
if (curComponent.value) {
|
||||
if (element.value) {
|
||||
Object.keys(styleMounted.value).forEach(key => {
|
||||
styleMounted.value[key] = Math.round(
|
||||
(curComponent.value.style[key] * 100) / canvasStyleData.value.scale
|
||||
(element.value.style[key] * 100) / canvasStyleData.value.scale
|
||||
)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const sizeChange = key => {
|
||||
curComponent.value.style[key] = Math.round(
|
||||
(styleMounted.value[key] * canvasStyleData.value.scale) / 100
|
||||
)
|
||||
changeStyle()
|
||||
const changeStylePre = key => {
|
||||
changeStyle({ key: key, value: element.value.style[key] })
|
||||
}
|
||||
|
||||
const changeStyle = () => {
|
||||
const sizeChange = key => {
|
||||
element.value.style[key] = Math.round(
|
||||
(styleMounted.value[key] * canvasStyleData.value.scale) / 100
|
||||
)
|
||||
changeStyle({ key: key, value: element.value.style[key] })
|
||||
}
|
||||
|
||||
const changeStyle = params => {
|
||||
snapshotStore.recordSnapshotCache()
|
||||
emits('onStyleAttrChange', params)
|
||||
}
|
||||
|
||||
const checkBold = () => {
|
||||
@ -517,7 +522,7 @@ const checkBold = () => {
|
||||
} else {
|
||||
styleForm.value.fontWeight = 'normal'
|
||||
}
|
||||
changeStyle()
|
||||
changeStyle({ key: 'fontWeight', value: styleForm.value.fontWeight })
|
||||
}
|
||||
|
||||
const checkItalic = () => {
|
||||
@ -526,16 +531,16 @@ const checkItalic = () => {
|
||||
} else {
|
||||
styleForm.value.fontStyle = 'normal'
|
||||
}
|
||||
changeStyle()
|
||||
changeStyle({ key: 'fontStyle', value: styleForm.value.fontStyle })
|
||||
}
|
||||
|
||||
function setPosition(key, p: 'left' | 'center' | 'right') {
|
||||
styleForm.value[key] = p
|
||||
changeStyle()
|
||||
changeStyle({ key: key, p })
|
||||
}
|
||||
|
||||
watch(
|
||||
() => curComponent.value,
|
||||
() => element.value,
|
||||
() => {
|
||||
styleInit()
|
||||
},
|
||||
|
@ -73,6 +73,7 @@ const { icon, name, label, dragInfo, themes } = toRefs(props)
|
||||
.drag-icon {
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
color: #3370ff;
|
||||
}
|
||||
}
|
||||
.label-content {
|
||||
|
Loading…
Reference in New Issue
Block a user