feat: 会员中心 hgcloud 主题初始化 + drone 部署步骤
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
- 解压官方默认主题 default_yfMBA.tar.gz 到 clientarea/hgcloud/ - .gitignore 排除压缩包和临时解压目录 - drone 新增步骤: 同步 hgcloud 到 /clientarea/template/pc/
This commit is contained in:
39
clientarea/hgcloud/components/shadowContent/shadowContent.js
Normal file
39
clientarea/hgcloud/components/shadowContent/shadowContent.js
Normal file
@@ -0,0 +1,39 @@
|
||||
const shadowContent = {
|
||||
template: /* html*/ `
|
||||
<div ref="shadow"></div>
|
||||
`,
|
||||
props: {
|
||||
content: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
shadowRoot: null,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.shadowRoot = this.$refs.shadow.attachShadow({mode: "open"});
|
||||
this.renderShadow();
|
||||
},
|
||||
// 内容变动时更新 Shadow DOM
|
||||
watch: {
|
||||
content() {
|
||||
this.renderShadow();
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
renderShadow() {
|
||||
this.shadowRoot.innerHTML = `
|
||||
<style>
|
||||
img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
||||
${this.content}
|
||||
`;
|
||||
},
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user