mirror of
https://github.com/palxiao/poster-design.git
synced 2025-07-15 16:02:19 +08:00
code: remove some invalid code
This commit is contained in:
parent
ff0763cd07
commit
79039c901f
14
package-lock.json
generated
14
package-lock.json
generated
@ -34,8 +34,7 @@
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vue": "3.4.19",
|
||||
"vue-router": "^4.0.0-0",
|
||||
"vuedraggable": "^4.1.0",
|
||||
"vuex": "^4.0.0-0"
|
||||
"vuedraggable": "^4.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/cropperjs": "^1.3.0",
|
||||
@ -4206,17 +4205,6 @@
|
||||
"vue": "^3.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/vuex": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/vuex/-/vuex-4.1.0.tgz",
|
||||
"integrity": "sha512-hmV6UerDrPcgbSy9ORAtNXDr9M4wlNP4pEFKye4ujJF8oqgFFuxDCdOLS3eNoRTtq5O3hoBDh9Doj1bQMYHRbQ==",
|
||||
"dependencies": {
|
||||
"@vue/devtools-api": "^6.0.0-beta.11"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vue": "^3.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/webpack-sources": {
|
||||
"version": "3.2.3",
|
||||
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz",
|
||||
|
@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
// import { ComputedRef, computed } from 'vue'
|
||||
// import { useStore } from 'vuex'
|
||||
|
||||
|
||||
// export function useSetupMapGetters<T extends string>(strList: T[]) {
|
||||
// const mapData: Partial<{[x in T]: ComputedRef}> = {}
|
||||
|
@ -23,7 +23,6 @@
|
||||
import api from '@/api'
|
||||
import { ElDialog } from 'element-plus'
|
||||
import { ref, defineComponent, toRefs, reactive, nextTick } from 'vue'
|
||||
// import { useStore } from 'vuex'
|
||||
import 'cropperjs/dist/cropper.css'
|
||||
import Cropper from 'cropperjs'
|
||||
import { useControlStore } from '@/store'
|
||||
@ -32,7 +31,6 @@ export default defineComponent({
|
||||
components: { ElDialog },
|
||||
emits: ['done'],
|
||||
setup(props, context) {
|
||||
// const store = useStore()
|
||||
const state = reactive({
|
||||
loading: false,
|
||||
url: '',
|
||||
|
@ -23,7 +23,6 @@
|
||||
import api from '@/api'
|
||||
import { ElDialog } from 'element-plus'
|
||||
import { ref, reactive, nextTick, toRefs } from 'vue'
|
||||
// import { useStore } from 'vuex'
|
||||
import 'cropperjs/dist/cropper.css'
|
||||
import Cropper from 'cropperjs'
|
||||
import { useControlStore } from '@/store'
|
||||
@ -41,7 +40,6 @@ type TOpenItem = {
|
||||
imgUrl: string
|
||||
}
|
||||
|
||||
// const store = useStore()
|
||||
const controlStore = useControlStore()
|
||||
const state = reactive({
|
||||
loading: false,
|
||||
|
@ -41,7 +41,6 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { reactive, nextTick, ref } from 'vue'
|
||||
// import { useStore } from 'vuex'
|
||||
import { ElProgress } from 'element-plus'
|
||||
import { UploadFilled } from '@element-plus/icons-vue'
|
||||
import uploader from '@/components/common/Uploader/index.vue'
|
||||
@ -62,7 +61,6 @@ export type TImageCutoutState = {
|
||||
loading: boolean;
|
||||
}
|
||||
|
||||
// const store = useStore()
|
||||
const controlStore = useControlStore()
|
||||
const state = reactive<TImageCutoutState>({
|
||||
show: false,
|
||||
|
@ -13,14 +13,11 @@ import { nextTick, onMounted, watch } from 'vue'
|
||||
|
||||
import Moveable, { EVENTS } from 'moveable' // PROPERTIES, METHODS,
|
||||
import MoveableHelper from 'moveable-helper'
|
||||
// import { mapGetters, mapActions, useStore } from 'vuex'
|
||||
// import { setTransformAttribute } from '@/common/methods/handleTransform'
|
||||
import useSelecto from './Selecto'
|
||||
// import { useSetupMapGetters } from '@/common/hooks/mapGetters'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useCanvasStore, useControlStore, useWidgetStore, useForceStore, useHistoryStore } from '@/store'
|
||||
|
||||
// const store = useStore()
|
||||
const widgetStore = useWidgetStore()
|
||||
const controlStore = useControlStore()
|
||||
const forceStore = useForceStore()
|
||||
|
@ -32,7 +32,6 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { reactive } from 'vue'
|
||||
// import { useStore } from 'vuex'
|
||||
import { ElTabPane, ElTabs, TabPaneName } from 'element-plus'
|
||||
import api from '@/api'
|
||||
import { TGetImageListResult } from '@/api/material'
|
||||
@ -50,7 +49,6 @@ type TState = {
|
||||
|
||||
const emits = defineEmits<TEmits>()
|
||||
|
||||
// const store = useStore()
|
||||
const controlStore = useControlStore()
|
||||
|
||||
const state = reactive<TState>({
|
||||
|
@ -15,7 +15,6 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, onMounted, ref } from 'vue'
|
||||
// import { useStore } from 'vuex'
|
||||
import {
|
||||
widgetMenu as widget,
|
||||
pageMenu as page,
|
||||
@ -27,7 +26,6 @@ import { getTarget } from '@/common/methods/target'
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useControlStore, useWidgetStore } from '@/store';
|
||||
|
||||
// const store = useStore()
|
||||
const menuListData = ref<TMenuItemData>({...menu})
|
||||
const showMenuBg = ref<boolean>(false)
|
||||
const widgetMenu = ref<TWidgetItemData[]>({...widget})
|
||||
|
@ -10,14 +10,12 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
// import { useStore } from 'vuex'
|
||||
import html2canvas from 'html2canvas'
|
||||
import Qiniu from '@/common/methods/QiNiu'
|
||||
// import { useSetupMapGetters } from '@/common/hooks/mapGetters'
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useCanvasStore, useWidgetStore } from '@/store';
|
||||
|
||||
// const store = useStore();
|
||||
// const { dZoom } = useSetupMapGetters(['dZoom'])
|
||||
|
||||
const canvasStore = useCanvasStore()
|
||||
|
@ -76,9 +76,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted } from 'vue'
|
||||
// import {useStore } from 'vuex'
|
||||
import { getTarget } from '@/common/methods/target'
|
||||
// import { ElScrollbar } from 'element-plus'
|
||||
import setWidgetData from '@/common/methods/DesignFeatures/setWidgetData'
|
||||
import PointImg from '@/utils/plugins/pointImg'
|
||||
import getComponentsData from '@/common/methods/DesignFeatures/setComponents'
|
||||
@ -99,7 +97,6 @@ type TParentData = {
|
||||
|
||||
type TSetting = Partial<TPageState>
|
||||
|
||||
// const store = useStore()
|
||||
const controlStore = useControlStore()
|
||||
const widgetStore = useWidgetStore()
|
||||
const canvasStore = useCanvasStore()
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { watch } from 'vue'
|
||||
// import { useStore } from 'vuex'
|
||||
|
||||
import Guides, { GuideOptions } from '@scena/guides'
|
||||
import { useCanvasStore } from '@/store';
|
||||
|
||||
@ -35,7 +35,7 @@ const props = withDefaults(defineProps<TProps>(), {
|
||||
show: false
|
||||
})
|
||||
|
||||
// const store = useStore()
|
||||
|
||||
const canvasStore = useCanvasStore()
|
||||
const container = 'page-design' // page-design out-page
|
||||
let guidesTop: TGuidesData | null = null
|
||||
|
@ -20,7 +20,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
// import { useStore } from 'vuex'
|
||||
import { nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'
|
||||
import addMouseWheel from '@/common/methods/addMouseWheel'
|
||||
import { OtherList, TZoomData, ZoomList } from './data';
|
||||
@ -30,7 +29,6 @@ import { storeToRefs } from 'pinia';
|
||||
import { useCanvasStore, useForceStore, usePageStore } from '@/store';
|
||||
|
||||
const route = useRoute()
|
||||
// const store = useStore()
|
||||
|
||||
// 组件大小控制器
|
||||
let holder: number | undefined
|
||||
|
@ -42,7 +42,7 @@
|
||||
import { useWidgetStore } from '@/store'
|
||||
import { TdWidgetData } from '@/store/design/widget'
|
||||
import { defineComponent, computed, reactive, ref, toRefs } from 'vue'
|
||||
// import { useStore } from 'vuex'
|
||||
|
||||
import draggable from 'vuedraggable'
|
||||
|
||||
export default defineComponent({
|
||||
@ -64,7 +64,7 @@ export default defineComponent({
|
||||
}
|
||||
})
|
||||
|
||||
// const store = useStore()
|
||||
|
||||
// const dPage = computed(() => {
|
||||
// return store.getters.dPage
|
||||
// })
|
||||
|
@ -20,7 +20,6 @@
|
||||
<script setup lang="ts">
|
||||
// 样式设置面板
|
||||
// const NAME = 'style-panel'
|
||||
// import { useStore } from 'vuex'
|
||||
import alignIconList, { AlignListData } from '@/assets/data/AlignListData'
|
||||
import iconItemSelect, { TIconItemSelectData } from '../settings/iconItemSelect.vue'
|
||||
import { ref, watch } from 'vue';
|
||||
@ -30,7 +29,6 @@ import { storeToRefs } from 'pinia';
|
||||
import { TdWidgetData } from '@/store/design/widget';
|
||||
import type { TUpdateAlignData } from '@/store/design/widget/actions/align'
|
||||
|
||||
// const store = useStore();
|
||||
const widgetStore = useWidgetStore()
|
||||
const controlStore = useControlStore()
|
||||
const groupStore = useGroupStore()
|
||||
|
@ -28,10 +28,8 @@
|
||||
// const NAME = 'widget-panel'
|
||||
import widgetClassifyListData from '@/assets/data/WidgetClassifyList'
|
||||
import { reactive, onMounted, watch, nextTick, } from 'vue'
|
||||
// import { useStore } from 'vuex'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
// const store = useStore()
|
||||
const route = useRoute()
|
||||
const state = reactive({
|
||||
widgetClassifyList: widgetClassifyListData,
|
||||
|
@ -25,7 +25,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { reactive, computed } from 'vue'
|
||||
import api from '@/api'
|
||||
// import { useStore } from 'vuex'
|
||||
|
||||
import { ElImage } from 'element-plus'
|
||||
import { TGetImageListResult } from '@/api/material';
|
||||
import { usePageStore, useWidgetStore } from '@/store';
|
||||
@ -56,7 +56,7 @@ type TState = {
|
||||
const { model } = defineProps<TProps>()
|
||||
|
||||
|
||||
// const store = useStore()
|
||||
|
||||
const pageStore = usePageStore()
|
||||
const widgetStore = useWidgetStore()
|
||||
|
||||
|
@ -55,7 +55,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { reactive, onMounted } from 'vue'
|
||||
import api from '@/api'
|
||||
// import { useStore } from 'vuex'
|
||||
|
||||
import getComponentsData from '@/common/methods/DesignFeatures/setComponents'
|
||||
import DragHelper from '@/common/hooks/dragHelper'
|
||||
import setItem2Data from '@/common/methods/DesignFeatures/setImage'
|
||||
@ -88,7 +88,7 @@ const state = reactive<TState>({
|
||||
types: [],
|
||||
showList: [],
|
||||
})
|
||||
// const store = useStore()
|
||||
|
||||
const controlStore = useControlStore()
|
||||
const widgetStore = useWidgetStore()
|
||||
const dPage = usePageStore().dPage
|
||||
|
@ -45,7 +45,7 @@ import api from '@/api'
|
||||
import wImageSetting from '../../widgets/wImage/wImageSetting'
|
||||
import { wSvgSetting } from '../../widgets/wSvg/wSvgSetting'
|
||||
// import wSvg from '../../widgets/wSvg/wSvg.vue'
|
||||
// import { useStore } from 'vuex'
|
||||
|
||||
import setImageData from '@/common/methods/DesignFeatures/setImage'
|
||||
import DragHelper from '@/common/hooks/dragHelper'
|
||||
import { TGetListData } from '@/api/material'
|
||||
@ -83,7 +83,7 @@ const props = defineProps<TProps>()
|
||||
|
||||
const colors = ['#f8704b', '#5b89ff', '#2cc4cc', '#a8ba73', '#f8704b']
|
||||
|
||||
// const store = useStore()
|
||||
|
||||
const controlStore = useControlStore()
|
||||
const widgetStore = useWidgetStore()
|
||||
|
||||
|
@ -31,7 +31,7 @@ import { toRefs, reactive, computed, onMounted } from 'vue'
|
||||
// import wImage from '../../widgets/wImage/wImage.vue'
|
||||
import wImageSetting from '../../widgets/wImage/wImageSetting'
|
||||
import api from '@/api'
|
||||
// import { useStore } from 'vuex'
|
||||
|
||||
import setImageData from '@/common/methods/DesignFeatures/setImage'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useControlStore, usePageStore, useWidgetStore } from '@/store'
|
||||
@ -57,7 +57,7 @@ type TCurrentCategory = {
|
||||
|
||||
const props = defineProps<TProps>()
|
||||
|
||||
// const store = useStore()
|
||||
|
||||
const controlStore = useControlStore()
|
||||
const widgetStore = useWidgetStore()
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { reactive, ref } from 'vue'
|
||||
import api from '@/api'
|
||||
// import { useStore } from 'vuex'
|
||||
|
||||
import { LocationQueryValue, useRoute, useRouter } from 'vue-router'
|
||||
// import chooseType from './components/chooseType.vue'
|
||||
// import editModel from './components/editModel.vue'
|
||||
@ -54,7 +54,7 @@ const listRef = ref<HTMLElement | null>(null)
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
|
||||
// const store = useStore()
|
||||
|
||||
const controlStore = useControlStore()
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
@ -28,7 +28,7 @@ import { storeToRefs } from 'pinia';
|
||||
// import wText from '../../widgets/wText/wText.vue'
|
||||
import { wTextSetting } from '../../widgets/wText/wTextSetting'
|
||||
|
||||
// import { useStore } from 'vuex'
|
||||
|
||||
import { useControlStore, usePageStore, useWidgetStore } from '@/store';
|
||||
|
||||
type TBasicTextData = {
|
||||
@ -37,7 +37,7 @@ type TBasicTextData = {
|
||||
fontWeight: string
|
||||
}
|
||||
|
||||
// const store = useStore()
|
||||
|
||||
const controlStore = useControlStore()
|
||||
const widgetStore = useWidgetStore()
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
// const NAME = 'tool-list-wrap'
|
||||
// import api from '@/api'
|
||||
import { ref, onMounted } from 'vue'
|
||||
// import { useStore } from 'vuex'
|
||||
|
||||
import { useRoute } from 'vue-router'
|
||||
// import wQrcode from '../../widgets/wQrcode/wQrcode.vue'
|
||||
import imageCutout from '@/components/business/image-cutout'
|
||||
@ -35,7 +35,7 @@ import { wQrcodeSetting } from '../../widgets/wQrcode/wQrcodeSetting'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useControlStore, usePageStore, useWidgetStore } from '@/store'
|
||||
|
||||
// const store = useStore()
|
||||
|
||||
const controlStore = useControlStore()
|
||||
|
||||
const route = useRoute()
|
||||
|
@ -39,7 +39,7 @@
|
||||
import { reactive, toRefs, watch, nextTick, ref, onMounted } from 'vue'
|
||||
import { ElTabPane, ElTabs, TabPaneName } from 'element-plus'
|
||||
import { useRouter } from 'vue-router'
|
||||
// import { useStore } from 'vuex'
|
||||
|
||||
import uploader from '@/components/common/Uploader'
|
||||
import api from '@/api'
|
||||
// import wImage from '../../widgets/wImage/wImage.vue'
|
||||
@ -73,7 +73,7 @@ const props = defineProps<TProps>()
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
// const store = useStore()
|
||||
|
||||
const controlStore = useControlStore()
|
||||
const widgetStore = useWidgetStore()
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {reactive, onMounted, watch } from 'vue'
|
||||
// import { useStore } from 'vuex'
|
||||
|
||||
import colorPicker from '@palxp/color-picker'
|
||||
import { useControlStore } from '@/store';
|
||||
|
||||
@ -53,7 +53,7 @@ const props = withDefaults(defineProps<TProps>(), {
|
||||
|
||||
const emit = defineEmits<TEmits>()
|
||||
|
||||
// const store = useStore()
|
||||
|
||||
const controlStore = useControlStore()
|
||||
|
||||
const state = reactive<TState>({
|
||||
|
@ -56,7 +56,7 @@
|
||||
// 画布组件样式
|
||||
// const NAME = 'page-style'
|
||||
import { nextTick, onMounted, reactive, watch } from 'vue'
|
||||
// import { mapGetters, mapActions, useStore } from 'vuex'
|
||||
|
||||
import numberInput from '../settings/numberInput.vue'
|
||||
import colorSelect, { colorChangeData } from '../settings/colorSelect.vue'
|
||||
import uploader, { TUploadDoneData } from '@/components/common/Uploader/index.vue'
|
||||
@ -85,7 +85,7 @@ type TState = {
|
||||
showBgLib: boolean
|
||||
}
|
||||
|
||||
// const store = useStore()
|
||||
|
||||
const pageStore = usePageStore()
|
||||
const widgetStore = useWidgetStore()
|
||||
const state = reactive<TState>({
|
||||
|
@ -26,7 +26,7 @@
|
||||
// 组合组件
|
||||
const NAME = 'w-group'
|
||||
import { nextTick, onBeforeUnmount, onMounted, onUpdated, ref } from 'vue'
|
||||
// import { useStore } from 'vuex'
|
||||
|
||||
import { setTransformAttribute } from '@/common/methods/handleTransform'
|
||||
import { useWidgetStore } from '@/store';
|
||||
import { storeToRefs } from 'pinia';
|
||||
@ -52,7 +52,7 @@ const props = withDefaults(defineProps<TProps>(), {
|
||||
params: () => ({}),
|
||||
parent: () => ({})
|
||||
})
|
||||
// const store = useStore();
|
||||
;
|
||||
const widgetStore = useWidgetStore()
|
||||
|
||||
const widget = ref<HTMLElement | null>(null)
|
||||
|
@ -37,7 +37,7 @@
|
||||
// 组合组件样式
|
||||
// const NAME = 'w-group-style'
|
||||
import { reactive, watch } from 'vue'
|
||||
// import { mapGetters, mapActions, useStore } from 'vuex'
|
||||
|
||||
import numberInput from '../../settings/numberInput.vue'
|
||||
import iconItemSelect, { TIconItemSelectData } from '../../settings/iconItemSelect.vue'
|
||||
import numberSlider from '../../settings/numberSlider.vue'
|
||||
@ -70,7 +70,7 @@ const state = reactive<TState>({
|
||||
layerIconList,
|
||||
alignIconList,
|
||||
})
|
||||
// const store = useStore()
|
||||
|
||||
const widgetStore = useWidgetStore()
|
||||
// const { dActiveElement } = useSetupMapGetters(['dActiveElement'])
|
||||
const { dActiveElement } = storeToRefs(widgetStore)
|
||||
|
@ -35,7 +35,7 @@
|
||||
// 图片组件
|
||||
// const NAME = 'w-image'
|
||||
import { CSSProperties, StyleValue, computed, nextTick, onBeforeUnmount, onMounted, onUpdated, reactive, ref, watch } from 'vue'
|
||||
// import { mapGetters, mapActions, useStore } from 'vuex'
|
||||
|
||||
import { getMatrix } from '@/common/methods/handleTransform'
|
||||
import setting from "./wImageSetting"
|
||||
import PointImg from '@/utils/plugins/pointImg'
|
||||
@ -83,7 +83,7 @@ const state = reactive<TState>({
|
||||
})
|
||||
const route = useRoute()
|
||||
|
||||
// const store = useStore()
|
||||
|
||||
const controlStore = useControlStore()
|
||||
const widgetStore = useWidgetStore()
|
||||
const forceStore = useForceStore()
|
||||
|
@ -71,7 +71,7 @@
|
||||
// 图片组件样式
|
||||
// const NAME = 'w-image-style'
|
||||
import { nextTick, reactive, ref, watch, onBeforeUnmount } from 'vue'
|
||||
// import { useStore } from 'vuex'
|
||||
|
||||
import numberInput from '../../settings/numberInput.vue'
|
||||
import iconItemSelect, { TIconItemSelectData } from '../../settings/iconItemSelect.vue'
|
||||
import numberSlider from '../../settings/numberSlider.vue'
|
||||
@ -134,7 +134,7 @@ const state = reactive<TState>({
|
||||
const picBoxRef = ref<typeof picBox | null>(null)
|
||||
const imageCutoutRef = ref<typeof imageCutout | null>(null)
|
||||
|
||||
// const store = useStore()
|
||||
|
||||
const widgetStore = useWidgetStore()
|
||||
const forceStore = useForceStore()
|
||||
const canvasStore = useCanvasStore()
|
||||
|
@ -35,7 +35,7 @@
|
||||
// 图片组件
|
||||
// const NAME = 'w-qrcode'
|
||||
|
||||
// import { mapGetters, mapActions, useStore } from 'vuex'
|
||||
|
||||
import QRCode from '@/components/business/qrcode'
|
||||
import { TWQrcodeSetting } from './wQrcodeSetting';
|
||||
import { computed, nextTick, onMounted, onUpdated, reactive, ref, watch } from 'vue';
|
||||
@ -59,7 +59,7 @@ type TState = {
|
||||
qrCodeOptions: Options
|
||||
}
|
||||
|
||||
// const store = useStore()
|
||||
|
||||
const forceStore = useForceStore()
|
||||
const widgetStore = useWidgetStore()
|
||||
const props = defineProps<TProps>()
|
||||
|
@ -58,7 +58,7 @@
|
||||
// 图片组件样式
|
||||
// const NAME = 'w-image-style'
|
||||
import { nextTick, reactive, watch } from 'vue'
|
||||
// import { useStore } from 'vuex'
|
||||
|
||||
import { ElSelect, ElOption } from 'element-plus'
|
||||
import numberInput from '../../settings/numberInput.vue'
|
||||
import iconItemSelect, { TIconItemSelectData } from '../../settings/iconItemSelect.vue'
|
||||
@ -98,7 +98,7 @@ const state = reactive<TState>({
|
||||
localization,
|
||||
})
|
||||
|
||||
// const store = useStore()
|
||||
|
||||
const controlStore = useControlStore()
|
||||
const widgetStore = useWidgetStore()
|
||||
const forceStore = useForceStore()
|
||||
|
@ -20,7 +20,7 @@
|
||||
<script lang="ts" setup>
|
||||
// svg
|
||||
// const NAME = 'w-svg'
|
||||
// import { mapGetters, mapActions, useStore } from 'vuex'
|
||||
|
||||
import { useCanvasStore, useForceStore, useWidgetStore } from '@/store';
|
||||
import { TWSvgSetting } from './wSvgSetting'
|
||||
import { CSSProperties, computed, nextTick, onBeforeMount, onMounted, onUpdated, reactive, ref, watch } from 'vue';
|
||||
@ -58,7 +58,7 @@ const state = reactive<TState>({
|
||||
attrRecord: {}, // 记录可更改的属性
|
||||
svgImg: null
|
||||
})
|
||||
// const store = useStore()
|
||||
|
||||
const widgetStore = useWidgetStore()
|
||||
const canvasStore = useCanvasStore()
|
||||
const forceStore = useForceStore()
|
||||
|
@ -37,7 +37,7 @@
|
||||
// 图片组件样式
|
||||
// const NAME = 'w-image-style'
|
||||
import { reactive, watch } from 'vue'
|
||||
// import { mapGetters, mapActions, useStore } from 'vuex'
|
||||
|
||||
import numberInput from '../../settings/numberInput.vue'
|
||||
import iconItemSelect, { TIconItemSelectData } from '../../settings/iconItemSelect.vue'
|
||||
import numberSlider from '../../settings/numberSlider.vue'
|
||||
@ -68,7 +68,7 @@ const state = reactive<TState>({
|
||||
layerIconList,
|
||||
alignIconList,
|
||||
})
|
||||
// const store = useStore()
|
||||
|
||||
const widgetStore = useWidgetStore()
|
||||
// const {
|
||||
// dActiveElement
|
||||
|
@ -60,7 +60,6 @@
|
||||
// const NAME = 'w-text'
|
||||
|
||||
import { reactive, toRefs, computed, onUpdated, watch, onMounted, ref } from 'vue'
|
||||
// import { useStore } from 'vuex'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { fontWithDraw } from '@/utils/widgets/loadFontRule'
|
||||
import getGradientOrImg from './getGradientOrImg'
|
||||
@ -83,8 +82,6 @@ type TProps = {
|
||||
}
|
||||
|
||||
const props = defineProps<TProps>()
|
||||
|
||||
// const store = useStore()
|
||||
const widgetStore = useWidgetStore()
|
||||
const forceStore = useForceStore()
|
||||
const historyStore = useHistoryStore()
|
||||
|
@ -52,7 +52,6 @@
|
||||
// 文本组件样式
|
||||
const NAME = 'w-text-style'
|
||||
import { defineComponent, reactive, toRefs, computed, watch, nextTick, onMounted } from 'vue'
|
||||
// import { useStore } from 'vuex'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { styleIconList1, styleIconList2, alignIconList, TStyleIconData, TStyleIconData2 } from '@/assets/data/TextIconsData'
|
||||
import layerIconList from '@/assets/data/LayerIconList'
|
||||
@ -86,7 +85,6 @@ type TState = {
|
||||
alignIconList: TIconItemSelectData[],
|
||||
}
|
||||
|
||||
// const store = useStore()
|
||||
const widgetStore = useWidgetStore()
|
||||
const forceStore = useForceStore()
|
||||
const route = useRoute()
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
import keyCodeOptions from './methods/keyCodeOptions'
|
||||
import dealWithCtrl from './methods/dealWithCtrl'
|
||||
import { useStore, Store } from 'vuex'
|
||||
import { TControlStore } from '@/store/design/control'
|
||||
|
||||
const ignoreNode = ['INPUT', 'TEXTAREA']
|
||||
|
5
src/types/vuex-shim.d.ts
vendored
5
src/types/vuex-shim.d.ts
vendored
@ -1,13 +1,8 @@
|
||||
import { ComponentCustomProperties } from 'vue'
|
||||
import { Store } from 'vuex'
|
||||
|
||||
declare module '@vue/runtime-core' {
|
||||
// Declare your own store states.
|
||||
interface State {
|
||||
count: number
|
||||
}
|
||||
|
||||
interface ComponentCustomProperties {
|
||||
$store: Store<State>
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,6 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { StyleValue, onMounted, reactive, nextTick } from 'vue'
|
||||
// import { useStore } from 'vuex'
|
||||
import api from '@/api'
|
||||
// import wGroup from '@/components/modules/widgets/wGroup/wGroup.vue'
|
||||
import Preload from '@/utils/plugins/preload'
|
||||
@ -28,7 +27,6 @@ type TState = {
|
||||
style: StyleValue
|
||||
}
|
||||
|
||||
// const store = useStore()
|
||||
const route = useRoute()
|
||||
const state = reactive<TState>({
|
||||
style: {
|
||||
|
@ -58,7 +58,6 @@ import {
|
||||
CSSProperties, computed, nextTick,
|
||||
onBeforeUnmount, onMounted, reactive, ref,
|
||||
} from 'vue'
|
||||
// import { useStore } from 'vuex'
|
||||
import RightClickMenu from '@/components/business/right-click-menu/RcMenu.vue'
|
||||
import Moveable from '@/components/business/moveable/Moveable.vue'
|
||||
import designBoard from '@/components/modules/layout/designBoard/index.vue'
|
||||
@ -108,7 +107,6 @@ const state = reactive<TState>({
|
||||
})
|
||||
const optionsRef = ref<typeof HeaderOptions | null>(null)
|
||||
const zoomControlRef = ref<typeof zoomControl | null>(null)
|
||||
// const store = useStore()
|
||||
const controlStore = useControlStore()
|
||||
const route = useRoute()
|
||||
|
||||
|
@ -56,7 +56,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { reactive, onMounted, nextTick, onBeforeMount, ref, getCurrentInstance } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
// import { useStore } from 'vuex'
|
||||
import RightClickMenu from '@/components/business/right-click-menu/RcMenu.vue'
|
||||
import Moveable from '@/components/business/moveable/Moveable.vue'
|
||||
import shortcuts from '@/mixins/shortcuts'
|
||||
@ -92,7 +91,6 @@ const state = reactive<TState>({
|
||||
downloadMsg: '',
|
||||
cancelText: '',
|
||||
})
|
||||
// const store = useStore()
|
||||
const widgetStore = useWidgetStore()
|
||||
const controlStore = useControlStore()
|
||||
|
||||
|
@ -29,7 +29,6 @@
|
||||
<script lang="ts" setup>
|
||||
import api from '@/api'
|
||||
import { reactive, toRefs, ref } from 'vue'
|
||||
// import { mapGetters, mapActions, useStore } from 'vuex'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import _dl from '@/common/methods/download'
|
||||
import useNotification from '@/common/methods/notification'
|
||||
@ -62,7 +61,6 @@ const props = defineProps<TProps>()
|
||||
const emit = defineEmits<TEmits>()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
// const store = useStore()
|
||||
const userStore = useUserStore()
|
||||
const widgetStore = useWidgetStore()
|
||||
|
||||
|
@ -14,7 +14,6 @@
|
||||
<script lang="ts" setup>
|
||||
import api from '@/api'
|
||||
import { reactive, ref } from 'vue'
|
||||
// import { useStore } from 'vuex'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import useNotification from '@/common/methods/notification'
|
||||
import SaveImage from '@/components/business/save-download/CreateCover.vue'
|
||||
@ -58,7 +57,6 @@ const emit = defineEmits<TEmits>()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
|
||||
// const store = useStore()
|
||||
const widgetStore = useWidgetStore()
|
||||
const controlStore = useControlStore()
|
||||
const { dWidgets } = storeToRefs(widgetStore)
|
||||
|
Loading…
x
Reference in New Issue
Block a user