123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180 |
- <template>
- <view class="popup" v-show="show">
- <view class="popup-info">
- <view class="popup-title"> {{titleText}}
- <view @click="close()"
- style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;width: 15px;height: 15px;">
- <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;"></image>
- </view>
- </view>
- <view class="popup-text">{{popupText}}</view>
- <view class="popup-btn">
- <view class="btn-left" @click="cancel">{{cancelText}}</view>
- <view class="btn-right" @click="confirm">{{confirmText}}</view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- name: "my-popup",
- props: {
- show: {
- type: Boolean
- },
- popupText: {
- type: String
- },
- titleText: {
- type: String
- },
- cancelText: {
- type: String
- },
- confirmText: {
- type: String
- }
- },
- watch: {
- oldshow: function(newVal, oldVal) {
- this.show = newVal;
- }
- },
- data() {
- return {};
- },
- methods: {
- close() {
- this.$parent.show_loding = false
- },
- cancel() {
- this.$emit('close')
- },
- confirm() {
- this.$emit('confirm')
- }
- }
- }
- </script>
- <style lang="scss">
- .popup {
- position: fixed;
- left: 0;
- right: 0;
- top: 0;
- height: 100vh;
- background-color: rgba(0, 0, 0, 0.4) !important;
- z-index: 9998;
- }
- .popup-info {
- position: fixed;
- width: 320px;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- font-size: 30upx;
- box-shadow: 0px 1px 13px -6px rgba(0, 0, 0, 0.25);
- background-color: #fff;
- z-index: 9999;
- border-radius: 8px;
- display: flex;
- flex-direction: column;
- align-items: center;
- .popup-title {
- width: 320px;
- height: 56px;
- background: linear-gradient(95.13deg, #5DA4F7 3.75%, #3285E4 95.95%);
- border-radius: 8px 8px 0px 0px;
- display: flex;
- justify-content: center;
- align-items: center;
- font-family: 'PingFang SC';
- font-style: normal;
- font-weight: 500;
- font-size: 17px;
- line-height: 24px;
- /* identical to box height, or 140% */
- color: #FFFFFF;
- }
- .popup-text {
- width: 262px;
- display: flex;
- justify-content: center;
- margin-top: 23px;
- text-align: center;
- font-family: 'PingFang SC';
- font-style: normal;
- font-weight: 500;
- font-size: 17px;
- line-height: 24px;
- }
- .popup-btn {
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- width: 250px;
- height: 42px;
- border-top-color: #f5f5f5;
- margin: 0 auto;
- margin-top: 22px;
- margin-bottom: 20px;
- .btn-left {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- width: 107px;
- height: 42px;
- border: 0.5px solid #569FF4;
- border-radius: 35px;
- justify-content: center;
- align-items: center;
- font-family: 'PingFang SC';
- font-style: normal;
- font-weight: 500;
- font-size: 16px;
- line-height: 22px;
- letter-spacing: -0.2176px;
- color: #569FF4;
- }
- .btn-right {
- display: flex;
- align-items: center;
- width: 107px;
- height: 42px;
- background: linear-gradient(95.13deg, #5DA4F7 3.75%, #3285E4 95.95%);
- border-radius: 35px;
- justify-content: center;
- align-items: center;
- font-color: #FFFFFF;
- font-family: 'PingFang SC';
- font-style: normal;
- font-weight: 500;
- font-size: 16px;
- line-height: 22px;
- letter-spacing: -0.2176px;
- color: #FFFFFF;
- }
- }
- }
- </style>
|