123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- <template>
- <div class="com-player-snapshot">
- <transition
- appear
- name="custom-classes-transition"
- enter-active-class="animated fadeIn faster"
- leave-active-class="animated fadeOut faster"
- >
- <div class="flash" v-if="showFlash"></div>
- </transition>
- <div class="frame show">
- <div class="corner left-top"></div>
- <div class="corner right-top"></div>
- <div class="corner left-bottom"></div>
- <div class="corner right-bottom"></div>
- </div>
- </div>
- </template>
- <script>
- export default {
- data() {
- return {
- showFlash:false
- }
- },
- mounted(){
- this.$bus.on('toggleFlash',data=>{
- this.showFlash=data
- })
- }
- };
- </script>
- <style lang="less" scoped>
- .com-player-snapshot {
- position: absolute;
- left: 0;
- top: 0;
- width: 100%;
- height: calc(100% - 240px);
- pointer-events: none;
- .flash {
- position: absolute;
- left: 0;
- top: 0;
- width: 100%;
- height: calc(100% + 240px);
- background-color: rgba(255, 255, 255, 0.5);
- }
- .frame {
- position: absolute;
- z-index: 100;
- pointer-events: none;
- //opacity: 0;
- transition: opacity 0.3s, border 0.3s;
- &.show {
- width: calc(84% - 36px);
- height: calc(100% - 140px);
- border: 1px dotted rgba(255, 255, 255, 0.8);
- left: calc(8% + 18px);
- bottom: 86px;
- }
- }
- .corner {
- width: 40px;
- height: 40px;
- position: absolute;
- transition: opacity 0.3s;
- opacity: 0.8;
- &.left-top {
- border-top: 4px solid #fff;
- border-left: 4px solid #fff;
- left: -2px;
- top: -2px;
- }
- &.left-bottom {
- border-left: 4px solid #fff;
- border-bottom: 4px solid #fff;
- left: -2px;
- bottom: -2px;
- }
- &.right-top {
- border-top: 4px solid #fff;
- border-right: 4px solid #fff;
- right: -2px;
- top: -2px;
- }
- &.right-bottom {
- border-right: 4px solid #fff;
- border-bottom: 4px solid #fff;
- right: -2px;
- bottom: -2px;
- }
- }
- }
- [edit-mode="mobile"] {
- .com-player-snapshot {
- .frame {
- position: absolute;
- z-index: 100;
- pointer-events: none;
- transition: opacity 0.3s, border 0.3s;
- &.show {
- width: calc(84% - 36px);
- height: calc(100% - 240px);
- border: 1px dotted rgba(255, 255, 255, 0.8);
- left: calc(8% + 18px);
- top: 86px;
- }
- }
- }
- }
- </style>
|