|
|
@@ -0,0 +1,173 @@
|
|
|
+<template>
|
|
|
+ <popup ref="Message" :show="show">
|
|
|
+ <div class="ui-message ui-message-confirm" :style="{backgroundImage:`url(${require(`@/assets/images/${isMobile?'mobile_':''}pwd_bg.png`)})`}">
|
|
|
+ <div class="ui-message-main">
|
|
|
+ <div class="uc-title">请输入密码</div>
|
|
|
+ <input v-model="password" @keydown.enter="onOk" type="text">
|
|
|
+ </div>
|
|
|
+ <div class="ui-message-footer">
|
|
|
+ <button class="ui-button submit" :style="{backgroundImage:`url(${require('@/assets/images/btn_primary.png')})`}" @click="onOk">确定</button>
|
|
|
+ <button class="ui-button cancel" :style="{backgroundImage:`url(${require('@/assets/images/btn_default.png')})`}" @click="onNo">取消</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </popup>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import Popup from "./popup";
|
|
|
+import browser from '@/config/browser.js'
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: "ui-confirm",
|
|
|
+ components: {
|
|
|
+ Popup
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ isMobile:browser.mobile,
|
|
|
+ show: false,
|
|
|
+ duration: 0,
|
|
|
+ title: "提示",
|
|
|
+ tips: "",
|
|
|
+ content: "",
|
|
|
+ okText: "确定",
|
|
|
+ noText: "放弃",
|
|
|
+ ok: null,
|
|
|
+ no: null,
|
|
|
+ password:''
|
|
|
+ };
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ onOk() {
|
|
|
+ if (!this.ok) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ this.ok(this.password)
|
|
|
+ this.onClose();
|
|
|
+ },
|
|
|
+ onNo() {
|
|
|
+ this.no && this.no();
|
|
|
+ this.onClose();
|
|
|
+ },
|
|
|
+ onClose() {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.show = false;
|
|
|
+ document.body.removeChild(this.$el);
|
|
|
+ this.$destroy();
|
|
|
+ }, this.duration);
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+.ui-message{
|
|
|
+ width: 718px;
|
|
|
+ height: 370px;
|
|
|
+ background-size: 100% auto;
|
|
|
+ background-position: 0 0;
|
|
|
+ position: relative;
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ .ui-message-main{
|
|
|
+ position: absolute;
|
|
|
+ top: 40%;
|
|
|
+ left: 50%;
|
|
|
+ transform: translate(-50%,-50%);
|
|
|
+ width: 80%;
|
|
|
+ margin: 0 auto;
|
|
|
+ .uc-title{
|
|
|
+ color: rgba(158, 158, 158, 1);
|
|
|
+ margin-bottom: 20px;
|
|
|
+ }
|
|
|
+ >input{
|
|
|
+ background-color: #fff;
|
|
|
+ border: 1px solid rgba(158, 158, 158, 1);
|
|
|
+ line-height: 50px;
|
|
|
+ height: 50px;
|
|
|
+ width: 100%;
|
|
|
+ font-size: 24px;
|
|
|
+ padding: 0 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .ui-message-footer{
|
|
|
+ position: absolute;
|
|
|
+ bottom: 16%;
|
|
|
+ left: 50%;
|
|
|
+ transform: translateX(-50%);
|
|
|
+ width: 100%;
|
|
|
+ text-align: center;
|
|
|
+ >button{
|
|
|
+ width: 128px;
|
|
|
+ line-height: 48px;
|
|
|
+ border: none;
|
|
|
+ margin: 0 30px;
|
|
|
+ font-size: 18px;
|
|
|
+ letter-spacing: 2px;
|
|
|
+ background-color: rgba(158, 158, 158, 0);
|
|
|
+ outline: none;
|
|
|
+ }
|
|
|
+ .submit{
|
|
|
+ color: rgba(245, 181, 95, 1);
|
|
|
+ }
|
|
|
+ .cancel{
|
|
|
+ color: rgba(158, 158, 158, 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+@media screen and (max-width: 800px) {
|
|
|
+ .ui-message{
|
|
|
+ width: 90%;
|
|
|
+ min-height: 300px;
|
|
|
+ height: auto;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ background-position: 0 0;
|
|
|
+ position: relative;
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ .ui-message-main{
|
|
|
+ position: absolute;
|
|
|
+ top: 40%;
|
|
|
+ left: 50%;
|
|
|
+ transform: translate(-50%,-50%);
|
|
|
+ width: 80%;
|
|
|
+ margin: 0 auto;
|
|
|
+ .uc-title{
|
|
|
+ color: rgba(158, 158, 158, 1);
|
|
|
+ margin-bottom: 20px;
|
|
|
+ }
|
|
|
+ >input{
|
|
|
+ background-color: #fff;
|
|
|
+ border: 1px solid rgba(158, 158, 158, 1);
|
|
|
+ line-height: 50px;
|
|
|
+ height: 50px;
|
|
|
+ width: 100%;
|
|
|
+ font-size: 20px;
|
|
|
+ padding: 0 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .ui-message-footer{
|
|
|
+ bottom: 10%;
|
|
|
+ >button{
|
|
|
+ width: 30%;
|
|
|
+ line-height: 40px;
|
|
|
+ height: 40px;
|
|
|
+ border: none;
|
|
|
+ margin: 0 10px;
|
|
|
+ font-size: 16px;
|
|
|
+ letter-spacing: 2px;
|
|
|
+ background-color: rgba(158, 158, 158, 0);
|
|
|
+ outline: none;
|
|
|
+ text-align: center;
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ .submit{
|
|
|
+ color: rgba(245, 181, 95, 1);
|
|
|
+ }
|
|
|
+ .cancel{
|
|
|
+ color: rgba(158, 158, 158, 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+}
|
|
|
+</style>
|