vue2-client 1.2.42 → 1.2.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Change Log
2
2
  > 所有关于本项目的变化都在该文档里。
3
3
 
4
- **##1.2.41 - 1.2.42 -2022-04-24 @江超**
4
+ **##1.2.41 - 1.2.43 -2022-04-24 @江超**
5
5
  - 功能修改:
6
6
  - 全局滚动条样式替换
7
7
  - 问题修复:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.2.42",
3
+ "version": "1.2.43",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -1,70 +1,72 @@
1
- <template>
2
- <page-toggle-transition :disabled="animate.disabled" :animate="animate.name" :direction="animate.direction">
3
- <template v-if="login">
4
- <iframe
5
- ref="singlepage"
6
- :src="iframeSrc"
7
- class="single-page-iframe"
8
- @load="load">
9
- </iframe>
10
- </template>
11
- </page-toggle-transition>
12
- </template>
13
-
14
- <script>
15
- import PageToggleTransition from '@vue2-client/components/transition/PageToggleTransition'
16
- import { ACCESS_TOKEN } from '@vue2-client/store/mutation-types'
17
- import { mapState, mapMutations } from 'vuex'
18
-
19
- export default {
20
- name: 'SinglePageView',
21
- components: { PageToggleTransition },
22
- props: {
23
- singlePageUrl: {
24
- type: String,
25
- default: ''
26
- }
27
- },
28
- data () {
29
- return {
30
- iframeSrc: '../singlepage/page.html',
31
- iframe: null
32
- }
33
- },
34
- computed: {
35
- ...mapState('setting', ['animate']),
36
- ...mapState('account', ['login'])
37
- },
38
- mounted () {
39
- if (!this.login) {
40
- this.setLogin(JSON.parse(sessionStorage.getItem(process.env.VUE_APP_LOGIN_KEY)))
41
- }
42
- this.iframe = this.$refs.singlepage.contentWindow
43
- },
44
- methods: {
45
- ...mapMutations('account', ['setLogin']),
46
- load () {
47
- const appdata = {
48
- singleValues: this.$appdata.getSingleValues(),
49
- params: this.$appdata.getParams()
50
- }
51
- const data = {
52
- token: localStorage.getItem(ACCESS_TOKEN),
53
- login: this.login,
54
- appdata: appdata,
55
- page: this.singlePageUrl
56
- }
57
- console.log('发送参数', data)
58
- this.iframe?.postMessage(data, '*')
59
- }
60
- }
61
- }
62
- </script>
63
-
64
- <style lang="less">
65
- .single-page-iframe {
66
- width: 100%;
67
- height: calc(100vh - 117px);
68
- border: none;
69
- }
70
- </style>
1
+ <template>
2
+ <page-toggle-transition :disabled="animate.disabled" :animate="animate.name" :direction="animate.direction">
3
+ <template v-if="login">
4
+ <iframe
5
+ ref="singlepage"
6
+ :src="iframeSrc"
7
+ class="single-page-iframe"
8
+ @load="load">
9
+ </iframe>
10
+ </template>
11
+ </page-toggle-transition>
12
+ </template>
13
+
14
+ <script>
15
+ import PageToggleTransition from '@vue2-client/components/transition/PageToggleTransition'
16
+ import { ACCESS_TOKEN } from '@vue2-client/store/mutation-types'
17
+ import { mapState, mapMutations } from 'vuex'
18
+
19
+ export default {
20
+ name: 'SinglePageView',
21
+ components: { PageToggleTransition },
22
+ props: {
23
+ singlePageUrl: {
24
+ type: String,
25
+ default: ''
26
+ }
27
+ },
28
+ data () {
29
+ return {
30
+ iframeSrc: '../singlepage/page.html',
31
+ iframe: null
32
+ }
33
+ },
34
+ computed: {
35
+ ...mapState('setting', ['animate']),
36
+ ...mapState('account', ['login'])
37
+ },
38
+ mounted () {
39
+ if (!this.login) {
40
+ this.setLogin(JSON.parse(sessionStorage.getItem(process.env.VUE_APP_LOGIN_KEY)))
41
+ }
42
+ this.iframe = this.$refs.singlepage.contentWindow
43
+ },
44
+ methods: {
45
+ ...mapMutations('account', ['setLogin']),
46
+ load () {
47
+ const appdata = {
48
+ singleValues: this.$appdata.getSingleValues(),
49
+ params: this.$appdata.getParams()
50
+ }
51
+ const data = {
52
+ token: localStorage.getItem(ACCESS_TOKEN),
53
+ login: this.login,
54
+ appdata: appdata,
55
+ page: this.singlePageUrl
56
+ }
57
+ console.log('发送参数', data)
58
+ if (this.iframe) {
59
+ this.iframe.postMessage(data, '*')
60
+ }
61
+ }
62
+ }
63
+ }
64
+ </script>
65
+
66
+ <style lang="less">
67
+ .single-page-iframe {
68
+ width: 100%;
69
+ height: calc(100vh - 117px);
70
+ border: none;
71
+ }
72
+ </style>