mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2026-02-27 17:44:05 +08:00
弃用lodash
This commit is contained in:
@@ -437,7 +437,7 @@ export default {
|
||||
if (this.currentCommand.features.mainPush) return ["text"];
|
||||
switch (this.$parent.quickcommandInfo.program) {
|
||||
case "quickcommand":
|
||||
return _.without(this.outputTypesOptions, "terminal");
|
||||
return window.lodashM.without(this.outputTypesOptions, "terminal");
|
||||
case "html":
|
||||
return ["html"];
|
||||
default:
|
||||
@@ -476,7 +476,14 @@ export default {
|
||||
this.cmdMatch = currentQuickCommandCmds.match;
|
||||
Object.assign(
|
||||
this.currentCommand,
|
||||
_.cloneDeep(_.pick(this.quickcommandInfo, "tags", "output", "features"))
|
||||
window.lodashM.cloneDeep(
|
||||
window.lodashM.pick(
|
||||
this.quickcommandInfo,
|
||||
"tags",
|
||||
"output",
|
||||
"features"
|
||||
)
|
||||
)
|
||||
);
|
||||
this.setIcon(this.quickcommandInfo.program);
|
||||
this.platformVerify();
|
||||
|
||||
@@ -103,18 +103,18 @@ export default defineComponent({
|
||||
},
|
||||
created() {
|
||||
// 初始化本地配置
|
||||
this.localConfigs = _.cloneDeep(this.configs);
|
||||
this.localConfigs = window.lodashM.cloneDeep(this.configs);
|
||||
},
|
||||
methods: {
|
||||
updateConfigs() {
|
||||
this.$emit("update:configs", _.cloneDeep(this.localConfigs));
|
||||
this.$emit("update:configs", window.lodashM.cloneDeep(this.localConfigs));
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
configs: {
|
||||
deep: true,
|
||||
handler(newConfigs) {
|
||||
this.localConfigs = _.cloneDeep(newConfigs);
|
||||
this.localConfigs = window.lodashM.cloneDeep(newConfigs);
|
||||
},
|
||||
},
|
||||
selectedUA(value) {
|
||||
|
||||
@@ -87,7 +87,7 @@ export default defineComponent({
|
||||
return {
|
||||
step: 1,
|
||||
selectedActions: [],
|
||||
configs: _.cloneDeep(defaultUBrowserConfigs),
|
||||
configs: window.lodashM.cloneDeep(defaultUBrowserConfigs),
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -181,20 +181,20 @@ export default defineComponent({
|
||||
emits: ["update:configs"],
|
||||
data() {
|
||||
return {
|
||||
localConfigs: _.cloneDeep(this.configs),
|
||||
localConfigs: window.lodashM.cloneDeep(this.configs),
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
updateConfig(key, value) {
|
||||
this.localConfigs.run[key] = value;
|
||||
this.$emit("update:configs", _.cloneDeep(this.localConfigs));
|
||||
this.$emit("update:configs", window.lodashM.cloneDeep(this.localConfigs));
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
configs: {
|
||||
deep: true,
|
||||
handler(newConfigs) {
|
||||
this.localConfigs = _.cloneDeep(newConfigs);
|
||||
this.localConfigs = window.lodashM.cloneDeep(newConfigs);
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user