mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 16:29:17 +08:00
fix: 解决创建网站 切换应用报错的BUG
This commit is contained in:
parent
cb281b2513
commit
3260f56bb6
@ -88,7 +88,7 @@
|
|||||||
<el-form-item :label="$t('app.app')" prop="appinstall.appId">
|
<el-form-item :label="$t('app.app')" prop="appinstall.appId">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-select v-model="website.appinstall.appId" @change="getApp()">
|
<el-select v-model="website.appinstall.appId" @change="changeApp()">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(app, index) in apps"
|
v-for="(app, index) in apps"
|
||||||
:key="index"
|
:key="index"
|
||||||
@ -275,6 +275,15 @@ const searchApp = () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const changeApp = () => {
|
||||||
|
apps.value.forEach((app) => {
|
||||||
|
if (app.id === website.value.appinstall.appId) {
|
||||||
|
website.value.appinstall.appkey = app.key;
|
||||||
|
getApp();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const getApp = () => {
|
const getApp = () => {
|
||||||
GetApp(website.value.appinstall.appkey).then((res) => {
|
GetApp(website.value.appinstall.appkey).then((res) => {
|
||||||
appVersions.value = res.data.versions;
|
appVersions.value = res.data.versions;
|
||||||
@ -298,9 +307,7 @@ const acceptParams = async (installPath: string) => {
|
|||||||
if (websiteForm.value) {
|
if (websiteForm.value) {
|
||||||
websiteForm.value.resetFields();
|
websiteForm.value.resetFields();
|
||||||
}
|
}
|
||||||
console.log(installPath);
|
|
||||||
staticPath.value = installPath + '/www/sites/';
|
staticPath.value = installPath + '/www/sites/';
|
||||||
|
|
||||||
await ListGroups().then((res) => {
|
await ListGroups().then((res) => {
|
||||||
groups.value = res.data;
|
groups.value = res.data;
|
||||||
website.value.webSiteGroupId = res.data[0].id;
|
website.value.webSiteGroupId = res.data[0].id;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user