From 63ceb83ec08c986634c420e6f20b9844bcb1d6ed Mon Sep 17 00:00:00 2001 From: ShawnPhang Date: Fri, 15 Mar 2024 17:37:59 +0800 Subject: [PATCH] merge: recovery some code --- src/components/business/qrcode/index.vue | 7 +- .../modules/layout/designBoard/index.vue | 7 +- .../modules/panel/wrap/ToolsListWrap.vue | 5 +- .../modules/settings/colorSelect.vue | 12 +- .../modules/settings/valueSelect.vue | 2 +- src/components/modules/widgets/pageStyle.vue | 262 +++++++------ .../modules/widgets/wGroup/wGroup.vue | 48 +-- .../modules/widgets/wQrcode/wQrcode.vue | 182 +++++---- .../modules/widgets/wQrcode/wQrcodeSetting.ts | 61 +++ src/components/modules/widgets/wSvg/wSvg.vue | 3 + .../modules/widgets/wText/wText.vue | 353 +++++++++--------- .../modules/widgets/wText/wTextSetting.ts | 101 +++++ src/mixins/methods/dealWithCtrl.ts | 2 +- src/mixins/methods/handlePaste.ts | 2 +- src/types/global.d.ts | 11 + src/types/style.d.ts | 6 + src/views/Psd.vue | 5 +- 17 files changed, 624 insertions(+), 445 deletions(-) create mode 100644 src/components/modules/widgets/wQrcode/wQrcodeSetting.ts create mode 100644 src/components/modules/widgets/wText/wTextSetting.ts create mode 100644 src/types/style.d.ts diff --git a/src/components/business/qrcode/index.vue b/src/components/business/qrcode/index.vue index 5246fcb..f81a154 100644 --- a/src/components/business/qrcode/index.vue +++ b/src/components/business/qrcode/index.vue @@ -11,7 +11,7 @@ diff --git a/src/components/modules/widgets/wGroup/wGroup.vue b/src/components/modules/widgets/wGroup/wGroup.vue index b09ce00..2d8c30d 100644 --- a/src/components/modules/widgets/wGroup/wGroup.vue +++ b/src/components/modules/widgets/wGroup/wGroup.vue @@ -26,7 +26,7 @@ // 组合组件 const NAME = 'w-group' import { nextTick, onBeforeUnmount, onMounted, onUpdated, ref } from 'vue' -import { mapGetters, mapActions, useStore } from 'vuex' +import { useStore } from 'vuex' import { setTransformAttribute } from '@/common/methods/handleTransform' import { useSetupMapGetters } from '@/common/hooks/mapGetters'; @@ -55,26 +55,26 @@ const widget = ref(null) const ratio = ref(0) const temp = ref>({}) const compWidgetsRecord = ref>({}) -const setting = { - name: '组合', - type: NAME, - uuid: -1, - width: 0, - height: 0, - left: 0, - top: 0, - transform: '', - opacity: 1, - parent: '-1', - isContainer: true, - record: { - width: 0, - height: 0, - minWidth: 0, - minHeight: 0, - dir: 'none', - }, -} +// const setting = { +// name: '组合', +// type: NAME, +// uuid: -1, +// width: 0, +// height: 0, +// left: 0, +// top: 0, +// transform: '', +// opacity: 1, +// parent: '-1', +// isContainer: true, +// record: { +// width: 0, +// height: 0, +// minWidth: 0, +// minHeight: 0, +// dir: 'none', +// }, +// } const timer = ref(null) const { dActiveElement, dWidgets } = useSetupMapGetters(['dActiveElement', 'dWidgets']) @@ -235,9 +235,9 @@ function keySetValue(uuid: string, key: keyof TParamsData, value: number) { }, 10) } -defineExpose({ - setting -}) +// defineExpose({ +// setting +// }) diff --git a/src/components/modules/widgets/wQrcode/wQrcode.vue b/src/components/modules/widgets/wQrcode/wQrcode.vue index 849eb26..8ae37a1 100644 --- a/src/components/modules/widgets/wQrcode/wQrcode.vue +++ b/src/components/modules/widgets/wQrcode/wQrcode.vue @@ -7,8 +7,8 @@ --> - diff --git a/src/components/modules/widgets/wQrcode/wQrcodeSetting.ts b/src/components/modules/widgets/wQrcode/wQrcodeSetting.ts new file mode 100644 index 0000000..cf1f5ad --- /dev/null +++ b/src/components/modules/widgets/wQrcode/wQrcodeSetting.ts @@ -0,0 +1,61 @@ +import { DotType } from "qr-code-styling" + +export type TWQrcodeSetting = { + name: string + type: string + uuid: string | number + width: number + height: number + left: number + top: number + zoom: number + transform: string + radius: number + opacity: number + parent: string + url: string + dotType: DotType + dotColorType: string + dotRotation: number + dotColor: string + dotColor2: string + value: string + setting: Record[] + record: { + width: number + height: number + minWidth: number + minHeight: number + dir: string + } +} + +export const wQrcodeSetting: TWQrcodeSetting = { + name: '二维码', + type: 'w-qrcode', + uuid: -1, + width: 300, + height: 300, + left: 0, + top: 0, + zoom: 1, + transform: '', + radius: 0, + opacity: 1, + parent: '-1', + url: '', + dotType: 'classy', + dotColorType: 'single', + dotRotation: 270, + dotColor: '#35495E', + dotColor2: '#35495E', + value: 'https://xp.palxp.cn', + setting: [], + record: { + width: 0, + height: 0, + minWidth: 10, + minHeight: 10, + dir: 'all', + }, +} diff --git a/src/components/modules/widgets/wSvg/wSvg.vue b/src/components/modules/widgets/wSvg/wSvg.vue index 1a2ba3a..5b06ad8 100644 --- a/src/components/modules/widgets/wSvg/wSvg.vue +++ b/src/components/modules/widgets/wSvg/wSvg.vue @@ -1,3 +1,6 @@ +