diff --git a/core/core-frontend/src/components/visualization/component-background/BackgroundOverallCommon.vue b/core/core-frontend/src/components/visualization/component-background/BackgroundOverallCommon.vue index db133a1fbf..1da362b3f6 100644 --- a/core/core-frontend/src/components/visualization/component-background/BackgroundOverallCommon.vue +++ b/core/core-frontend/src/components/visualization/component-background/BackgroundOverallCommon.vue @@ -303,7 +303,7 @@ const init = () => { } queryBackground() const commitStyle = () => { - snapshotStore.recordSnapshotCache() + snapshotStore.recordSnapshotCacheToMobile('commonBackground') } const handleRemove = () => { @@ -325,7 +325,7 @@ const upload = file => { } const onBackgroundChange = () => { - snapshotStore.recordSnapshotCache() + snapshotStore.recordSnapshotCacheToMobile('commonBackground') emits('onBackgroundChange', state.commonBackground) } diff --git a/core/core-frontend/src/custom-component/common/CommonAttr.vue b/core/core-frontend/src/custom-component/common/CommonAttr.vue index 0b08343771..8e32042318 100644 --- a/core/core-frontend/src/custom-component/common/CommonAttr.vue +++ b/core/core-frontend/src/custom-component/common/CommonAttr.vue @@ -37,26 +37,13 @@ const props = withDefaults( const { themes, element, showStyle } = toRefs(props) const dvMainStore = dvMainStoreWithOut() -const { dvInfo, batchOptStatus } = storeToRefs(dvMainStore) +const { dvInfo, batchOptStatus, mobileInPc } = storeToRefs(dvMainStore) const activeName = ref(element.value.collapseName) -const styleKeys = computed(() => { - if (element.value) { - const curComponentStyleKeys = Object.keys(element.value.style) - return styleData.filter(item => curComponentStyleKeys.includes(item.key)) - } else { - return [] - } -}) - const onChange = () => { element.value.collapseName = activeName } -const isIncludesColor = str => { - return str.toLowerCase().includes('color') -} - const positionComponentShow = computed(() => { return !batchOptStatus.value && !dashboardActive.value }) @@ -71,31 +58,13 @@ const onBackgroundChange = val => { } const onStyleAttrChange = ({ key, value }) => { - snapshotStore.recordSnapshotCache() + snapshotStore.recordSnapshotCacheToMobile('style') emits('onAttrChange', { custom: 'style', property: key, value: value }) } const containerRef = ref() const containerWidth = ref() -const colSpan = computed(() => { - if (containerWidth.value <= 240) { - return 24 - } else { - return 12 - } -}) - -const colorPickerWidth = computed(() => { - if (containerWidth.value <= 280) { - return 125 - } else if (containerWidth.value <= 240) { - return 108 - } else { - return 197 - } -}) - const borderSettingShow = computed(() => { return !!element.value.style['borderStyle'] }) @@ -110,7 +79,7 @@ const eventsShow = computed(() => { }) const carouselShow = computed(() => { - return element.value.component === 'DeTabs' && element.value.carousel + return element.value.component === 'DeTabs' && element.value.carousel && !mobileInPc.value }) const backgroundCustomShow = computed(() => { @@ -129,12 +98,6 @@ onMounted(() => { }) }) }) -const stopEvent = e => { - if (e && e.code === 'Enter') { - e.stopPropagation() - e.preventDefault() - } -}