Skip to content

Commit

Permalink
feat:嵌入发布结果
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 16792
  • Loading branch information
leafage-collb committed Aug 29, 2024
1 parent d34ffec commit 8b1915b
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<template>
<section class="iframe-container" :style="{ height: iframeHeight + 'px' }">
<iframe
id="iframe-embed"
:src="url"
scrolling="no"
frameborder="0"
/>
</section>
</template>

<script>
export default {
name: 'ReleaseResult',
props: {
url: {
type: String,
default: '',
},
},
data() {
return {
iframeHeight: 100,
};
},
created() {
window.addEventListener('message', this.messageEvent);
},
beforeDestroy() {
window.removeEventListener('message', this.messageEvent);
},
methods: {
messageEvent(event) {
if (!event.data || event.data?.type !== 'gray-result-height') return;
this.iframeHeight = event.data.data;
},
},
};
</script>
<style lang="scss" scoped>
.iframe-container {
margin-top: 16px;
width: 100%;
height: 100%;
iframe#iframe-embed {
width: 100%;
height: 100%;
/* resize seems to inherit in at least Firefox */
-webkit-resize: none;
-moz-resize: none;
resize: none;
}
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@
:data="versionData"
step="release"
/>
<!-- 发布结果 -->
<release-result :url="versionData.report_url" />
<section
class="version-tools"
v-if="!isFullReleaseSuccessful"
Expand Down Expand Up @@ -162,6 +164,7 @@ import pluginBaseMixin from '@/mixins/plugin-base-mixin';
import releaseContent from '../create-version/new-version/release-content.vue';
import visibleRange from '../create-version/new-version/visible-range.vue';
import releaseStrategy from '../create-version/new-version/release-strategy.vue';
import releaseResult from '../create-version/new-version/release-result.vue';
import { CODECC_RELEASE_STATUS } from '@/common/constants';
export default {
Expand All @@ -171,6 +174,7 @@ export default {
releaseContent,
visibleRange,
releaseStrategy,
releaseResult,
},
mixins: [pluginBaseMixin],
data() {
Expand Down

0 comments on commit 8b1915b

Please sign in to comment.