Skip to content

Commit de9e7f0

Browse files
authored
refactor: 优化 lodash 导入方式,使用按需导入以减小打包体积 (#939)
1 parent 491216f commit de9e7f0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/layouts/components/SideNav.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323
</div>
2424
</template>
2525
<script setup lang="ts">
26-
import { difference, remove, union } from 'lodash';
26+
import difference from 'lodash/difference';
27+
import remove from 'lodash/remove';
28+
import union from 'lodash/union';
2729
import type { MenuValue } from 'tdesign-vue-next';
2830
import type { PropType } from 'vue';
2931
import { computed, onMounted, onUnmounted, ref, watch } from 'vue';

0 commit comments

Comments
 (0)