123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- <template>
- <transition
- appear
- name="custom-classes-transition"
- enter-active-class="animated fadeIn faster"
- leave-active-class="animated fadeOut faster"
- >
- <popup v-if="show" :is-pass="true">
- <div class="ui-message-tips">
- <!-- <img class="ui-bg" :src="require(`@/assets/images/project/icon/tips.png`)" alt=""> -->
- <div class="brightness"></div>
- <span v-html="content"></span>
- </div>
- </popup>
- </transition>
- </template>
- <script>
- import Popup from "./popup";
- export default {
- name: "ui-tips",
- components: {
- Popup
- },
- data() {
- return {
- show: false,
- duration: 2000,
- content: ""
- };
- },
- mounted() {
- setTimeout(() => {
- this.show = false;
- this.$nextTick(function() {
- document.body.removeChild(this.$el);
- this.$destroy(true);
- });
- }, this.duration);
- }
- };
- </script>
- <style lang="less" scoped>
- .ui-message-tips {
- position: absolute;
- left: 50%;
- top: 50%;
- color: #fff;
- padding: 20px 50px;
- transform: translate(-50%, -50%);
- border-radius: 10px;
- overflow: hidden;
- text-align: center;
- pointer-events: none;
- width: 402px;
- height: 132px;
- background: linear-gradient(180deg, rgba(166,192,232,0.4) 0%, rgba(16,25,38,0.7) 3%, #171F2A 39%, rgba(19,28,40,0.85) 39%, rgba(54,58,64,0.91) 85%, rgba(80,81,83,0.47) 99%, rgba(230,236,245,0.14) 100%);
- box-shadow: inset 0px 2px 2px 1px rgba(255,255,255,0.4);
- opacity: 1;
- backdrop-filter: blur(10px);
- .ui-bg{
- width: 100%;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%,-50%);
- width: 100%;
- }
- .brightness{
- width: 100%;
- height: 100%;
- &::before{
- content: '';
- backdrop-filter: blur(20px) brightness(90%);
- }
- }
- >span{
- font-size: 26px;
- letter-spacing: 2px;
- position: absolute;
- left: 50%;
- top: 50%;
- transform: translate(-50%,-50%);
- display: inline-block;
- width: 100%;
- }
- }
- @media screen and (max-width: 600px) {
- .ui-message-tips {
- max-width: 80%;
- .ui-bg{
- width: 100%;
- height: 100%;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%,-50%);
- width: 100%;
- }
- }
- }
- </style>
|