diff --git a/Logistics/V5/web/src/App.vue b/Logistics/V5/web/src/App.vue index c14c7fe..16463a1 100644 --- a/Logistics/V5/web/src/App.vue +++ b/Logistics/V5/web/src/App.vue @@ -3,6 +3,30 @@

物流系统 v5.0

任务配置创建工具

+ + +
+
+
+

项目信息

+ + 📁项目仓库 + +
+ +
+ wget http://git.liulikeji.cn/xingluo/CCTweaked-utils/raw/branch/main/Logistics/V5/startup.lua + +
+
+
@@ -297,7 +321,8 @@ export default { } ] }, - copySuccess: false + copySuccess: false, + copyDownloadSuccess: false } }, computed: { @@ -380,6 +405,10 @@ export default { commandString() { return `add ${this.compressedJson}`; + }, + + downloadCommand() { + return 'wget http://git.liulikeji.cn/xingluo/CCTweaked-utils/raw/branch/main/Logistics/V5/startup.lua'; } }, methods: { @@ -392,11 +421,13 @@ export default { blacklist: [{ name: '' }] }); }, + removeInputContainer(index) { if (this.task.input.length > 1) { this.task.input.splice(index, 1); } }, + addOutputContainer() { this.task.output.push({ containerName: '', @@ -407,27 +438,33 @@ export default { blacklist: [{ name: '' }] }); }, + removeOutputContainer(index) { if (this.task.output.length > 1) { this.task.output.splice(index, 1); } }, + addWhitelistItem(list) { list.push(this.task.type === 'item' ? { name: '', count: null } : { name: '' }); }, + removeWhitelistItem(list, index) { if (list.length > 1) { list.splice(index, 1); } }, + addBlacklistItem(list) { list.push({ name: '' }); }, + removeBlacklistItem(list, index) { if (list.length > 1) { list.splice(index, 1); } }, + copyToClipboard() { const textarea = document.createElement('textarea'); textarea.value = this.commandString; @@ -441,6 +478,21 @@ export default { this.copySuccess = false; }, 3000); }, + + copyDownloadCommand() { + const textarea = document.createElement('textarea'); + textarea.value = this.downloadCommand; + document.body.appendChild(textarea); + textarea.select(); + document.execCommand('copy'); + document.body.removeChild(textarea); + + this.copyDownloadSuccess = true; + setTimeout(() => { + this.copyDownloadSuccess = false; + }, 3000); + }, + resetForm() { this.task = { type: 'item',