mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-12-20 02:47:30 +08:00
弃用lodash
This commit is contained in:
@@ -93,7 +93,8 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
cronConverted() {
|
||||
return _.values(this.cronDetail)
|
||||
return window.lodashM
|
||||
.values(this.cronDetail)
|
||||
.map((x) => x.value)
|
||||
.join(" ");
|
||||
},
|
||||
@@ -129,7 +130,7 @@ export default {
|
||||
window.showUb.help("#Q0e7s");
|
||||
},
|
||||
initValue() {
|
||||
this.cronDetail = _.cloneDeep(this.default);
|
||||
this.cronDetail = window.lodashM.cloneDeep(this.default);
|
||||
if (!this.cronExp) return;
|
||||
let splited = this.cronExp.split(" ");
|
||||
Object.keys(this.cronDetail).forEach((key, index) => {
|
||||
@@ -149,7 +150,7 @@ export default {
|
||||
},
|
||||
delCrontab() {
|
||||
this.$emit("delCrontab");
|
||||
this.cronDetail = _.cloneDeep(this.default);
|
||||
this.cronDetail = window.lodashM.cloneDeep(this.default);
|
||||
quickcommand.showMessageBox("禁用成功");
|
||||
},
|
||||
},
|
||||
|
||||
@@ -47,12 +47,12 @@ export default {
|
||||
if (item === null) return "null";
|
||||
if (typeof item === "undefined") return "undefined";
|
||||
if (typeof item === "string")
|
||||
return _.truncate(item, { length: maxSize.txt });
|
||||
return window.lodashM.truncate(item, { length: maxSize.txt });
|
||||
if (typeof item === "number") return item;
|
||||
if (typeof item === "function")
|
||||
return `f ${item.name ? item.name + "()" : "anonymous()"}`;
|
||||
if (typeof item !== "object") return item.toString();
|
||||
if (_.isBuffer(item)) {
|
||||
if (window.lodashM.isBuffer(item)) {
|
||||
var bufferString = `[Buffer ${item
|
||||
.slice(0, maxSize.buff)
|
||||
.toString("hex")
|
||||
|
||||
@@ -71,7 +71,9 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
markTag() {
|
||||
this.$root.utools.whole.setFeature(_.cloneDeep(this.features));
|
||||
this.$root.utools.whole.setFeature(
|
||||
window.lodashM.cloneDeep(this.features)
|
||||
);
|
||||
this.$root.$refs.view.activatedQuickPanels.push(this.currentTag);
|
||||
quickcommand.showMessageBox(
|
||||
`主输入框输入『${this.features.cmds.join("、")}』即可直接进入『${
|
||||
|
||||
@@ -170,7 +170,10 @@ export default {
|
||||
return this.$root.utools.getDB("cfg_extraInfo");
|
||||
},
|
||||
saveYuQueInfo() {
|
||||
this.$root.utools.putDB(_.cloneDeep(this.yuQueInfo), "cfg_extraInfo");
|
||||
this.$root.utools.putDB(
|
||||
window.lodashM.cloneDeep(this.yuQueInfo),
|
||||
"cfg_extraInfo"
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user