Commit a24d7435f8603b6ea685c4f202c1e5f2d7d232bc

Authored by ly525
1 parent fd75f972

update preview modal style

front-end/h5/package.json
... ... @@ -5,7 +5,7 @@
5 5 "scripts": {
6 6 "serve": "vue-cli-service serve",
7 7 "build": "vue-cli-service build",
8   - "lint": "vue-cli-service lint",
  8 + "lint": "vue-cli-service lint --fix",
9 9 "test:e2e": "vue-cli-service test:e2e",
10 10 "test:unit": "vue-cli-service test:unit",
11 11 "deploy": "rm -rf dist && npm run build && ./deploy.sh"
... ...
front-end/h5/src/components/core/editor/canvas/edit.js
... ... @@ -203,7 +203,6 @@ export default {
203 203 }}
204 204 >
205 205 {h(element.name, data)}
206   - {element.commonStyle.zindex}
207 206 </Shape>
208 207 )
209 208 })
... ...
front-end/h5/src/components/core/editor/modals/preview.vue
... ... @@ -14,52 +14,52 @@ export default {
14 14 },
15 15 computed: {
16 16 ...mapState('editor', {
17   - work: state => state.work,
  17 + work: state => state.work
18 18 }),
19 19 releaseUrl () {
20 20 return `//localhost:1337/works/preview/${this.work.id}`
21 21 }
22 22 },
23   - data() {
  23 + data () {
24 24 return {
25 25 confirmLoading: false,
26   - qrcodeSize: 500,
  26 + qrcodeSize: 500
27 27 }
28 28 },
29 29 watch: {
30 30 visible (val) {
31   - if (!val) return;
32   - this.$nextTick(() => this.drawQRcode());
33   - },
  31 + if (!val) return
  32 + this.$nextTick(() => this.drawQRcode())
  33 + }
34 34 },
35 35 methods: {
36 36 ...mapActions('editor', [
37 37 'saveWork',
38 38 'updateWork'
39 39 ]),
40   - handleOk(e) {
41   - this.confirmLoading = true;
  40 + handleOk (e) {
  41 + this.confirmLoading = true
42 42 this.saveWork().then(res => {
43 43 this.handleClose()
44   - this.confirmLoading = false;
  44 + this.confirmLoading = false
45 45 })
46 46 // setTimeout(() => {
47 47 // }, 2000);
48 48 },
49   - handleCancel(e) {
50   - console.log('Clicked cancel button');
  49 + handleCancel (e) {
  50 + console.log('Clicked cancel button')
51 51 this.handleClose()
52 52 },
53 53 drawQRcode () {
54   - var canvas = document.getElementById('qrcode-container');
  54 + var canvas = document.getElementById('qrcode-container')
55 55 QRCode.toCanvas(canvas, this.releaseUrl, { scale: 4 }, err => {
56   - console.log(err);
57   - });
  56 + console.log(err)
  57 + })
58 58 },
59 59 postMessage2Iframe (message) {
60 60 let iframeWin = document.getElementById('iframe-for-preview').contentWindow
61 61 // iframeWin.postMessage('next', window.location.origin);
62   - iframeWin.postMessage(message, 'http://localhost:1337');
  62 + iframeWin.postMessage(message, 'http://localhost:1337')
63 63 }
64 64 },
65 65 render (h) {
... ... @@ -71,11 +71,11 @@ export default {
71 71 onCancel={this.handleCancel}
72 72 width="70%"
73 73 okText="保存"
74   - >
  74 + >
75 75 <div class="preview-wrapper">
76 76 <a-row gutter={20}>
77 77 <a-col span={8}>
78   - <div class="phone-wrapper" style={{ transform: 'scale(0.8)'}}>
  78 + <div class="phone-wrapper" style={{ transform: 'scale(0.8)' }}>
79 79 <div class="phone">
80 80 <div class="float-ctrl-panel">
81 81 <a class="page-controller" onClick={(e) => { this.postMessage2Iframe('prev') }}>上一页</a>
... ... @@ -104,14 +104,14 @@ export default {
104 104 <a-input
105 105 class="input"
106 106 value={this.work.title}
107   - onChange={e => this.updateWork({ title: e.target.value})}
  107 + onChange={e => this.updateWork({ title: e.target.value })}
108 108 // onBlur={this.saveTitle}
109 109 placeholder="请输入标题"
110 110 ></a-input>
111 111 <a-input
112 112 class="input"
113 113 value={this.work.description}
114   - onChange={e => this.updateWork({ description: e.target.value})}
  114 + onChange={e => this.updateWork({ description: e.target.value })}
115 115 // v-model="description"
116 116 // onBlur={this.saveDescription}
117 117 placeholder="请输入描述"
... ... @@ -122,7 +122,7 @@ export default {
122 122 <div class="label">手机扫码分享给好友</div>
123 123 <div class="code">
124 124 <canvas style="float: left" id="qrcode-container"></canvas>
125   - <a-radio-group class="radios" value={this.qrcodeSize} onChange={e => {this.qrcodeSize = e.target.value}}>
  125 + <a-radio-group class="radios" value={this.qrcodeSize} onChange={e => { this.qrcodeSize = e.target.value }}>
126 126 <a-radio label={500} value={500}>500x500</a-radio>
127 127 <a-radio label={1000} value={1000}>1000x1000</a-radio>
128 128 <a-radio label={2000} value={2000}>2000x2000</a-radio>
... ... @@ -141,7 +141,6 @@ export default {
141 141 }
142 142 </script>
143 143  
144   -
145 144 <style lang="scss">
146 145 .preview-wrapper {
147 146 position: relative;
... ... @@ -234,4 +233,4 @@ export default {
234 233 }
235 234 }
236 235  
237   -</style>
238 236 \ No newline at end of file
  237 +</style>
... ...
front-end/h5/src/components/core/styles/index.scss
... ... @@ -18,7 +18,8 @@
18 18  
19 19 .shortcut-button {
20 20 width: 100%;
21   - height: 40px;
  21 + height: 30px;
  22 + font-size: 14px;
22 23  
23 24 .shortcut-icon {
24 25 padding-right: 4px;
... ...
front-end/h5/src/components/plugins/lbp-text.js
... ... @@ -10,7 +10,7 @@ export default {
10 10 } = this
11 11  
12 12 const style = {
13   - color,
  13 + color: `${color} !important`,
14 14 textAlign,
15 15 backgroundColor: 'transparent',
16 16 fontSize: fontSize,
... ...
front-end/h5/src/store/modules/editor.js
1 1 // initial state
2   -import strapi from '../../utils/strapi'
3 2 import Work from '../../components/core/models/work'
4 3 import { actions as pageActions, mutations as pageMutations } from './page'
5 4 import { actions as elementActions, mutations as elementMutations } from './element'
... ...
front-end/h5/src/views/Editor.vue
1 1 <script>
2   -import Vue from 'vue'
3 2 import CoreEditor from '../components/core/editor/index.js'
4 3 import loadPluginMixin from '../mixins/load-plugins.js'
5 4  
6 5 export default {
7 6 extends: CoreEditor,
8   - mixins: [loadPluginMixin],
  7 + mixins: [loadPluginMixin]
9 8 }
10 9 </script>
11 10 <style lang="scss">
... ...