From fc4da4d9e8e27b0a998f4e2b79e0a74dee0d8a81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E6=A3=9A?= <849005670@qq.com> Date: Wed, 24 Nov 2021 09:25:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/exchangepage/main/main.js | 28 ++++++--- src/pages/exchangepage/mytemplate/main.js | 3 +- src/pages/exchangepage/template/main.js | 25 +++----- src/pages/exchangepage/template/main.less | 10 +++ src/pages/exchangepage/template/preview.css | 69 +++++++++++++++++++++ src/pages/exchangepage/template/preview.js | 5 +- 6 files changed, 114 insertions(+), 26 deletions(-) create mode 100644 src/pages/exchangepage/template/preview.css diff --git a/src/pages/exchangepage/main/main.js b/src/pages/exchangepage/main/main.js index 1af97a17..e8c82bff 100644 --- a/src/pages/exchangepage/main/main.js +++ b/src/pages/exchangepage/main/main.js @@ -269,13 +269,24 @@ export default class acclist extends React.Component { current, pageSize } = this.state; - return (
- + < + TabPage tabs = { + this.state.tabList + } + tabChange = { (e) => this.tabChange(e) } > -
- + < + Button type = "primary" + icon = "plus" + onClick = { + this.clickFn.bind(this) + } > 我的模板 < /Button> < + Ipt icon = "search" placeholder = { "请输入关键字进行搜索" } @@ -291,9 +302,12 @@ export default class acclist extends React.Component { alignment = { 'left' } - />
+ /> < + /div> < + div > - {this.delFn(e,rowData)}} className = "grid-link" > 删除 < /a> - + < + /span> } }} /> diff --git a/src/pages/exchangepage/template/main.js b/src/pages/exchangepage/template/main.js index 0406e5ab..74428594 100644 --- a/src/pages/exchangepage/template/main.js +++ b/src/pages/exchangepage/template/main.js @@ -6,7 +6,7 @@ import "./main.less" import { Switch ,Swiper,Dropdown,DropdownPosition,DropdownClickTrigger,Icon,MenuItem,DropdownContent,Menu } from 'zent'; import "../../../assets/comm.css" - +import PreviewItem from "./preview.js" import {handelResponse,getSystemTemplate} from "../../../assets/api.js" //
// 行业: @@ -161,8 +161,8 @@ export default class mytemplate extends React.Component{ - - + + @@ -181,18 +181,13 @@ export default class mytemplate extends React.Component{ { - this.state.preview_visible ? ( -
-
-
手机预览
- {this.closePhone()}} /> -
- - - - -
- ) : null +
+ + + + + +
} diff --git a/src/pages/exchangepage/template/main.less b/src/pages/exchangepage/template/main.less index 8b2119e6..1996ee0a 100644 --- a/src/pages/exchangepage/template/main.less +++ b/src/pages/exchangepage/template/main.less @@ -8087,3 +8087,13 @@ textarea::-webkit-input-placeholder { .scroller-page .block-selector-list-label { margin-right: 22px } +.preview-box{ + width: 375px; + height: 600px; + position: fixed; + top: 20%; + left: 50%; + margin-left: -187.5px; + background-color: #FFFFFF; + z-index: 99999; +} \ No newline at end of file diff --git a/src/pages/exchangepage/template/preview.css b/src/pages/exchangepage/template/preview.css new file mode 100644 index 00000000..0fd3bece --- /dev/null +++ b/src/pages/exchangepage/template/preview.css @@ -0,0 +1,69 @@ +#preview{ + + max-height: 600px; + overflow-y: auto; + .top{ + width: 100%; + height: auto; + padding: 0; + margin: 0; + } + img{ + width: 100%; + vertical-align: middle; + } + .center{ + width: 100%; + padding: 0; + margin: 0; + position: relative; + overflow: hidden; + vertical-align: middle; + } + .bottom{ + width: 100%; + height: auto; + vertical-align: middle; + } + + .key{ + position: absolute; + top: 38px; + left: 50%; + width:200px; + height: 30px; + z-index: 2; + margin-left: -90px; + background-color: #f3f5f7; + border: none; + outline: none; + font-size: 14px; + } + .code{ + position: absolute; + top:88px; + left: 50%; + width: 100px; + height: 36px; + z-index: 2; + margin-left: -72px; + background-color: #f3f5f7; + border: none; + outline: none; + font-size: 14px; + } + .submit{ + position: absolute; + top: 1.5rem; + left: 50%; + width: 3rem; + height: 0.4rem; + margin-left: -1.5rem; + z-index: 2; + background-color: transparent; + } + .submit:active{ + background-color: #F3F5F7; + border-radius: 30px; + opacity: 0.2; + } diff --git a/src/pages/exchangepage/template/preview.js b/src/pages/exchangepage/template/preview.js index 3b40d6a4..8dacce71 100644 --- a/src/pages/exchangepage/template/preview.js +++ b/src/pages/exchangepage/template/preview.js @@ -2,7 +2,7 @@ import ReactDOM from 'react-dom'; import React, { Component } from 'react'; import { HashRouter as Router, Route, Link } from "react-router-dom"; import { Button } from 'zent'; -import "./list.less" + import {Input,openDialog ,Notify,Switch ,Swiper,Dropdown,DropdownPosition,DropdownClickTrigger,Icon,MenuItem,DropdownContent,Menu,Sweetalert } from 'zent'; import "../../../assets/comm.css" import _ from "lodash"; @@ -25,8 +25,7 @@ export default class acclist extends React.Component{ return(
- - +