mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
refactor: 调整lodash引入方式
This commit is contained in:
parent
2b18c36f84
commit
bc9193e6b5
@ -21,8 +21,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { computed, defineComponent, onUnmounted, PropType, ref } from 'vue'
|
import { computed, defineComponent, onUnmounted, PropType, ref } from 'vue'
|
||||||
import tinycolor, { ColorFormats } from 'tinycolor2'
|
import tinycolor, { ColorFormats } from 'tinycolor2'
|
||||||
import throttle from 'lodash/throttle'
|
import { throttle, clamp } from 'lodash'
|
||||||
import clamp from 'lodash/clamp'
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'saturation',
|
name: 'saturation',
|
||||||
|
@ -73,7 +73,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
|
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
|
||||||
import tinycolor, { ColorFormats } from 'tinycolor2'
|
import tinycolor, { ColorFormats } from 'tinycolor2'
|
||||||
import debounce from 'lodash/debounce'
|
import { debounce } from 'lodash'
|
||||||
|
|
||||||
import Alpha from './Alpha.vue'
|
import Alpha from './Alpha.vue'
|
||||||
import Checkboard from './Checkboard.vue'
|
import Checkboard from './Checkboard.vue'
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import debounce from 'lodash/debounce'
|
import { debounce, throttle} from 'lodash'
|
||||||
import throttle from 'lodash/throttle'
|
|
||||||
import { ActionTypes, useStore } from '@/store'
|
import { ActionTypes, useStore } from '@/store'
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { MutationTree } from 'vuex'
|
import { MutationTree } from 'vuex'
|
||||||
import omit from 'lodash/omit'
|
import { omit } from 'lodash'
|
||||||
import { MutationTypes } from './constants'
|
import { MutationTypes } from './constants'
|
||||||
import { State } from './state'
|
import { State } from './state'
|
||||||
import { Slide, PPTElement, SlideTheme } from '@/types/slides'
|
import { Slide, PPTElement, SlideTheme } from '@/types/slides'
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import padStart from 'lodash/padStart'
|
import { padStart } from 'lodash'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成随机码
|
* 生成随机码
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import startsWith from 'lodash/startsWith'
|
import { startsWith, endsWith } from 'lodash'
|
||||||
import endsWith from 'lodash/endsWith'
|
|
||||||
import { Token } from './types'
|
import { Token } from './types'
|
||||||
import { childlessTags } from './tags'
|
import { childlessTags } from './tags'
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Ref, computed } from 'vue'
|
import { Ref, computed } from 'vue'
|
||||||
import uniq from 'lodash/uniq'
|
import { uniq } from 'lodash'
|
||||||
import { MutationTypes, useStore } from '@/store'
|
import { MutationTypes, useStore } from '@/store'
|
||||||
import { PPTElement } from '@/types/slides'
|
import { PPTElement } from '@/types/slides'
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { computed, defineComponent, provide, ref, watch, watchEffect } from 'vue'
|
import { computed, defineComponent, provide, ref, watch, watchEffect } from 'vue'
|
||||||
import throttle from 'lodash/throttle'
|
import { throttle } from 'lodash'
|
||||||
import { MutationTypes, useStore } from '@/store'
|
import { MutationTypes, useStore } from '@/store'
|
||||||
import { ContextmenuItem } from '@/components/Contextmenu/types'
|
import { ContextmenuItem } from '@/components/Contextmenu/types'
|
||||||
import { PPTElement, Slide } from '@/types/slides'
|
import { PPTElement, Slide } from '@/types/slides'
|
||||||
|
@ -133,7 +133,7 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { computed, defineComponent, ref, watch } from 'vue'
|
import { computed, defineComponent, ref, watch } from 'vue'
|
||||||
import round from 'lodash/round'
|
import { round } from 'lodash'
|
||||||
import { MutationTypes, useStore } from '@/store'
|
import { MutationTypes, useStore } from '@/store'
|
||||||
import { PPTElement } from '@/types/slides'
|
import { PPTElement } from '@/types/slides'
|
||||||
import { MIN_SIZE } from '@/configs/element'
|
import { MIN_SIZE } from '@/configs/element'
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { computed, defineComponent, onMounted, onUnmounted, provide, ref } from 'vue'
|
import { computed, defineComponent, onMounted, onUnmounted, provide, ref } from 'vue'
|
||||||
import throttle from 'lodash/throttle'
|
import { throttle } from 'lodash'
|
||||||
import { MutationTypes, useStore } from '@/store'
|
import { MutationTypes, useStore } from '@/store'
|
||||||
import { Slide } from '@/types/slides'
|
import { Slide } from '@/types/slides'
|
||||||
import { VIEWPORT_SIZE } from '@/configs/canvas'
|
import { VIEWPORT_SIZE } from '@/configs/canvas'
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent, inject, onMounted, PropType, ref, Ref, watch } from 'vue'
|
import { defineComponent, inject, onMounted, PropType, ref, Ref, watch } from 'vue'
|
||||||
import upperFirst from 'lodash/upperFirst'
|
import { upperFirst } from 'lodash'
|
||||||
import tinycolor from 'tinycolor2'
|
import tinycolor from 'tinycolor2'
|
||||||
import Chartist, {
|
import Chartist, {
|
||||||
IChartistLineChart,
|
IChartistLineChart,
|
||||||
|
@ -72,8 +72,7 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { computed, defineComponent, nextTick, onMounted, onUnmounted, PropType, ref, watch } from 'vue'
|
import { computed, defineComponent, nextTick, onMounted, onUnmounted, PropType, ref, watch } from 'vue'
|
||||||
import debounce from 'lodash/debounce'
|
import { debounce, isEqual } from 'lodash'
|
||||||
import isEqual from 'lodash/isEqual'
|
|
||||||
import { useStore } from '@/store'
|
import { useStore } from '@/store'
|
||||||
import { PPTElementOutline, TableCell, TableTheme } from '@/types/slides'
|
import { PPTElementOutline, TableCell, TableTheme } from '@/types/slides'
|
||||||
import { ContextmenuItem } from '@/components/Contextmenu/types'
|
import { ContextmenuItem } from '@/components/Contextmenu/types'
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { computed, defineComponent, onMounted, onUnmounted, PropType, ref, watch } from 'vue'
|
import { computed, defineComponent, onMounted, onUnmounted, PropType, ref, watch } from 'vue'
|
||||||
import debounce from 'lodash/debounce'
|
import { debounce } from 'lodash'
|
||||||
import { MutationTypes, useStore } from '@/store'
|
import { MutationTypes, useStore } from '@/store'
|
||||||
import { EditorView } from 'prosemirror-view'
|
import { EditorView } from 'prosemirror-view'
|
||||||
import { toggleMark, wrapIn, selectAll } from 'prosemirror-commands'
|
import { toggleMark, wrapIn, selectAll } from 'prosemirror-commands'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user