mirror of
https://github.com/HangarMC/Hangar.git
synced 2025-02-05 14:40:33 +08:00
switch to lodash-es
This commit is contained in:
parent
18790a48ae
commit
45bfd3290d
@ -24,6 +24,7 @@
|
||||
"highlight.js": "^10.2.0",
|
||||
"jquery": "3.5.1",
|
||||
"lodash": "4.17.20",
|
||||
"lodash-es": "^4.17.15",
|
||||
"moment": "^2.29.0",
|
||||
"popper.js": "^1.16.1",
|
||||
"query-string": "6.13.1",
|
||||
|
@ -94,7 +94,7 @@ import ProjectList from './components/ProjectList';
|
||||
import queryString from 'query-string';
|
||||
import { clearFromDefaults } from './utils';
|
||||
import { Category, Platform, SortOptions } from './enums';
|
||||
import debounce from 'lodash/debounce';
|
||||
import { debounce } from 'lodash-es';
|
||||
|
||||
function defaultData() {
|
||||
return {
|
||||
|
@ -52,7 +52,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import _ from 'lodash';
|
||||
import { difference, remove } from 'lodash-es';
|
||||
import axios from 'axios';
|
||||
|
||||
export default {
|
||||
@ -81,7 +81,7 @@ export default {
|
||||
this.inputs[platform] = '';
|
||||
},
|
||||
removeVersion(versions, version) {
|
||||
_.remove(versions, v => v === version);
|
||||
remove(versions, v => v === version);
|
||||
this.changesMade = true;
|
||||
},
|
||||
save() {
|
||||
@ -89,8 +89,8 @@ export default {
|
||||
const removals = {};
|
||||
for (const platform in this.platforms) {
|
||||
const versions = this.data.find(o => o.platform === platform.toLowerCase()).versions;
|
||||
additions[platform] = _.difference(versions, this.platforms[platform]);
|
||||
removals[platform] = _.difference(this.platforms[platform], versions);
|
||||
additions[platform] = difference(versions, this.platforms[platform]);
|
||||
removals[platform] = difference(this.platforms[platform], versions);
|
||||
}
|
||||
let hasChanges = false;
|
||||
for (const platform in this.platforms) {
|
||||
|
@ -121,7 +121,7 @@ import { clearFromEmpty, numberWithCommas } from '@/utils';
|
||||
import { Category, Platform, Visibility } from '@/enums';
|
||||
import Pagination from './Pagination';
|
||||
import Icon from './Icon';
|
||||
import debounce from 'lodash/debounce';
|
||||
import { debounce } from 'lodash-es';
|
||||
import { API } from '@/api';
|
||||
|
||||
export default {
|
||||
|
@ -1,4 +1,7 @@
|
||||
import { createApp } from 'vue';
|
||||
import $ from 'jquery';
|
||||
import UserProfile from '@/UserProfile';
|
||||
|
||||
$.ajaxSetup(window.ajaxSettings);
|
||||
|
||||
createApp(UserProfile).mount('#user-profile');
|
||||
|
@ -6175,7 +6175,7 @@ locate-path@^5.0.0:
|
||||
dependencies:
|
||||
p-locate "^4.1.0"
|
||||
|
||||
lodash-es@^4.2.1:
|
||||
lodash-es@^4.17.15, lodash-es@^4.2.1:
|
||||
version "4.17.15"
|
||||
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.15.tgz#21bd96839354412f23d7a10340e5eac6ee455d78"
|
||||
integrity sha512-rlrc3yU3+JNOpZ9zj5pQtxnx2THmvRykwL4Xlxoa8I9lHBlVbbyPhgyPMioxVZ4NqyxaVVtaJnzsyOidQIhyyQ==
|
||||
|
Loading…
Reference in New Issue
Block a user