Files
BlackFruit-UI/clientarea/hgcloud/components/hostStatus/hostStatus.js
yiqiu 3b41cffbc9
All checks were successful
continuous-integration/drone/push Build is passing
feat: 会员中心 hgcloud 主题初始化 + drone 部署步骤
- 解压官方默认主题 default_yfMBA.tar.gz 到 clientarea/hgcloud/
- .gitignore 排除压缩包和临时解压目录
- drone 新增步骤: 同步 hgcloud 到 /clientarea/template/pc/
2026-03-19 17:56:44 +08:00

48 lines
1.1 KiB
JavaScript

/* 处理产品转移中的状态 */
const hostStatus = {
template:
`
<div>
<div class="host-is-transfer" v-if="isTransferring">{{lang.host_transferring}}</div>
<slot v-else></slot>
</div>
`,
data () {
return {
isTransferring: false,
};
},
props: {
id: {
type: Number | String,
required: true,
default: null,
},
status: {
type: String,
required: true,
default: '',
}
},
methods: {
async getHostTransferStatus () {
try {
const res = await hostIsTransfer({ id: this.id * 1 });
const transferring = res.data.data.status;
// 状态为 Active 且 transferring === 1 的时候显示转移中
this.isTransferring = transferring && this.status === 'Active';
} catch (error) {
this.$message.error(error.data.msg);
}
}
},
mounted () {
const arr = JSON.parse(
document.querySelector("#addons_js").getAttribute("addons_js")
).map((item) => {
return item.name;
});
arr.includes("HostTransfer") && this.getHostTransferStatus();
}
};