mirror of
https://github.com/palxiao/poster-design.git
synced 2025-07-15 16:02:19 +08:00
fix: remove a util function
This commit is contained in:
parent
a8856b0d68
commit
148bfcadde
@ -69,7 +69,6 @@ import TabPanel from '@palxp/color-picker/comps/TabPanel.vue'
|
|||||||
import { useCanvasStore, useWidgetStore } from '@/store'
|
import { useCanvasStore, useWidgetStore } from '@/store'
|
||||||
import { TPageState } from '@/store/design/canvas/d'
|
import { TPageState } from '@/store/design/canvas/d'
|
||||||
import { storeToRefs } from 'pinia'
|
import { storeToRefs } from 'pinia'
|
||||||
import { proxyToObject } from '@/utils/utils'
|
|
||||||
import { Delete as iconDelete, Download as iconDownload } from '@element-plus/icons-vue'
|
import { Delete as iconDelete, Download as iconDownload } from '@element-plus/icons-vue'
|
||||||
import wImageSetting from '@/components/modules/widgets/wImage/wImageSetting'
|
import wImageSetting from '@/components/modules/widgets/wImage/wImageSetting'
|
||||||
// import setImageData from '@/common/methods/DesignFeatures/setImage'
|
// import setImageData from '@/common/methods/DesignFeatures/setImage'
|
||||||
@ -144,7 +143,7 @@ function onChangeMode(value: string) {
|
|||||||
function change() {
|
function change() {
|
||||||
state.mode = state.modes[0]
|
state.mode = state.modes[0]
|
||||||
state.tag = true
|
state.tag = true
|
||||||
state.innerElement = proxyToObject(dActiveElement.value || {})
|
state.innerElement = dActiveElement.value || {}
|
||||||
state.innerElement.backgroundImage && (state.mode = state.modes[1])
|
state.innerElement.backgroundImage && (state.mode = state.modes[1])
|
||||||
}
|
}
|
||||||
function changeValue() {
|
function changeValue() {
|
||||||
|
@ -2,13 +2,12 @@
|
|||||||
* @Author: Jeremy Yu
|
* @Author: Jeremy Yu
|
||||||
* @Date: 2024-03-18 21:00:00
|
* @Date: 2024-03-18 21:00:00
|
||||||
* @Description:
|
* @Description:
|
||||||
* @LastEditors: Jeremy Yu <https://github.com/JeremyYu-cn>
|
* @LastEditors: ShawnPhang <https://m.palxp.cn>
|
||||||
* @LastEditTime: 2024-03-27 21:00:00
|
* @LastEditTime: 2024-04-02 21:10:53
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { useCanvasStore, useWidgetStore } from "@/store"
|
import { useCanvasStore, useWidgetStore } from "@/store"
|
||||||
import { THistoryStore } from ".."
|
import { THistoryStore } from ".."
|
||||||
import { proxyToObject } from "@/utils/utils"
|
|
||||||
|
|
||||||
/** push操作历史记录 */
|
/** push操作历史记录 */
|
||||||
export function pushHistory(store: THistoryStore, msg: string = "") {
|
export function pushHistory(store: THistoryStore, msg: string = "") {
|
||||||
@ -28,7 +27,7 @@ export function pushHistory(store: THistoryStore, msg: string = "") {
|
|||||||
store.dHistoryParams.index = store.dHistory.length - 1
|
store.dHistoryParams.index = store.dHistory.length - 1
|
||||||
}
|
}
|
||||||
store.dHistory.push(JSON.stringify(widgetStore.dWidgets))
|
store.dHistory.push(JSON.stringify(widgetStore.dWidgets))
|
||||||
store.dPageHistory.push(JSON.stringify(proxyToObject(pageStore.dPage)))
|
store.dPageHistory.push(JSON.stringify(pageStore.dPage))
|
||||||
store.dHistoryParams.index = store.dHistory.length - 1
|
store.dHistoryParams.index = store.dHistory.length - 1
|
||||||
store.dHistoryParams.length = store.dHistory.length
|
store.dHistoryParams.length = store.dHistory.length
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { useControlStore, useHistoryStore, useCanvasStore } from "@/store"
|
import { useControlStore, useHistoryStore, useCanvasStore } from "@/store"
|
||||||
import { TWidgetStore } from ".."
|
import { TWidgetStore } from ".."
|
||||||
import { proxyToObject } from "@/utils/utils"
|
|
||||||
|
|
||||||
export type TSelectWidgetData = {
|
export type TSelectWidgetData = {
|
||||||
uuid: string
|
uuid: string
|
||||||
@ -51,7 +50,7 @@ export function selectWidget(store: TWidgetStore, { uuid }: TSelectWidgetData) {
|
|||||||
store.dActiveElement = pageStore.dPage
|
store.dActiveElement = pageStore.dPage
|
||||||
const pageHistory = historyStore.dPageHistory
|
const pageHistory = historyStore.dPageHistory
|
||||||
if (pageHistory.length === 0) {
|
if (pageHistory.length === 0) {
|
||||||
pageHistory.push(JSON.stringify(proxyToObject(pageStore.dPage)))
|
pageHistory.push(JSON.stringify(pageStore.dPage))
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
store.dSelectWidgets = []
|
store.dSelectWidgets = []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user