优化热更插件.
This commit is contained in:
@@ -56,11 +56,11 @@
|
||||
<el-form ref="ftpCfg" :model="ftpCfg" label-width="100px">
|
||||
<el-tooltip effect="dark" :content="tip.ip" placement="top" open-delay=500>
|
||||
<el-form-item label="IP:">
|
||||
<el-col :span="18">
|
||||
<el-col :span="15">
|
||||
<el-input type="text" v-model="ftpCfg.host" placeholder="127.0.0.1"></el-input>
|
||||
</el-col>
|
||||
<el-col class="line" :span="2">-</el-col>
|
||||
<el-col :span="4">
|
||||
<el-col class="line" :span="1">-</el-col>
|
||||
<el-col :span="6">
|
||||
<el-input type="number" v-model="ftpCfg.port" placeholder="端口号"></el-input>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
@@ -68,16 +68,16 @@
|
||||
|
||||
<el-tooltip effect="dark" :content="tip.user" open-delay=500 placement="top">
|
||||
<el-form-item label="登录帐号:">
|
||||
<el-col :span="11">
|
||||
<el-col :span="12">
|
||||
<el-input type="text" v-model="ftpCfg.user" placeholder="登录帐号"></el-input>
|
||||
</el-col>
|
||||
<el-col class="line" :span="2">-</el-col>
|
||||
<el-col class="line" :span="1">-</el-col>
|
||||
<el-col :span="11">
|
||||
<el-input type="password" v-model="ftpCfg.password" placeholder="密码"></el-input>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
</el-tooltip>
|
||||
<el-tooltip effect="dark" content="FTP长连接持续心跳时间" open-delay=500 placement="top">
|
||||
<el-tooltip effect="dark" content="FTP长连接持续心跳时间,一般情况下忽略此选项" open-delay=500 placement="top">
|
||||
<el-form-item label="KeepAlive:">
|
||||
<el-input type="number" v-model="ftpCfg.keepalive" placeholder="10000"></el-input>
|
||||
</el-form-item>
|
||||
@@ -85,7 +85,7 @@
|
||||
<el-tooltip effect="dark" content="FTP同时上传文件数,数量越大,上传效率越高<br/>受限于带宽性能,并非越大越好,推荐5~10" open-delay=500
|
||||
placement="top">
|
||||
<el-form-item label="并发数量:">
|
||||
<el-input type="number" v-model="ftpCfg.maxThread" placeholder="5"></el-input>
|
||||
<el-input type="number" v-model="ftpCfg.maxThread" placeholder="同时上传文件数"></el-input>
|
||||
</el-form-item>
|
||||
</el-tooltip>
|
||||
<el-tooltip effect="dark" :content="tip.rootPath" open-delay=500 placement="top">
|
||||
@@ -114,7 +114,8 @@
|
||||
<el-step title="版本配置"
|
||||
description="使用前需要先配置版本信息,并点击保存配置."></el-step>
|
||||
<el-step title="构建版本"
|
||||
description="开始构建版本,构建完成后会在构建目录中生成remote文件夹以及update-dev.json更新描述文件"></el-step>
|
||||
description="开始构建版本,构建完成后会在构建目录中生成remote文件夹以及update-dev.json更新描述文件
|
||||
注:不需要设置Bundle为远程包,插件将自动调整远程包设置"></el-step>
|
||||
<el-step title="上传更新包"
|
||||
description="构建完成时,如需发布新版本,则需要点击[上传更新包],更新包会向游戏代码中注入热更逻辑."></el-step>
|
||||
</el-steps>
|
||||
@@ -142,6 +143,7 @@
|
||||
<script>
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
@@ -163,7 +165,7 @@
|
||||
rootPath: "",
|
||||
keepalive: 100000,
|
||||
onlyJson: false,
|
||||
maxThread: 5
|
||||
maxThread: 1
|
||||
},
|
||||
tip: {
|
||||
versionCode: "递增版本号,如果与旧版本号相同,则会替换线上版本包.",
|
||||
@@ -184,10 +186,11 @@
|
||||
if (data) {
|
||||
Object.assign(this, JSON.parse(data));
|
||||
}
|
||||
|
||||
this.projectPath = Editor.url('packages://update-manager');
|
||||
this.projectPath = this.projectPath.substring(0, this.projectPath.length - 'packages/update-manager'.length)
|
||||
Editor.log('当前项目路径:', this.projectPath);
|
||||
//Bugfix: simple类型的面板无法在渲染进程中拿到项目路径.
|
||||
const self = this;
|
||||
Editor.Ipc.sendToMain('update-manager:getProjectPath', function (arg) {
|
||||
self.projectPath = arg;
|
||||
});
|
||||
},
|
||||
|
||||
methods: {
|
||||
@@ -261,6 +264,6 @@
|
||||
return true;
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
</html>
|
Reference in New Issue
Block a user