jufubao-base 1.0.1 → 1.0.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -0,0 +1,74 @@
1
+ <template>
2
+ <view class="jfb-base-bottom">
3
+ <!--#ifdef H5-->
4
+ <view class="jfb-base-bottom__edit">
5
+ <view class="jfb-base-bottom__edit-icon" @click="showEdit"></view>
6
+ </view>
7
+ <!-- #endif -->
8
+ <view class="jfb-base-bottom__body"></view>
9
+ </view>
10
+ </template>
11
+
12
+ <script>
13
+ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
14
+ export default {
15
+ name: "JfbBaseBottom",
16
+ components: {
17
+ XdFontIcon
18
+ },
19
+ data() {
20
+ return {
21
+
22
+ //#ifdef H5
23
+ Attr: {},
24
+ edit: false, //是否开启编辑模式
25
+ contentId: null, //容器ID
26
+
27
+ // #endif
28
+ }
29
+ },
30
+ created() {
31
+
32
+ //#ifdef H5
33
+
34
+ //监听Editx属性编辑模块视图发送变化接受时间
35
+ this.contentId = this.$xdUniHelper.randomChar(20);
36
+ XdBus.addEvent('attrViewChange', (contentId, data) => {
37
+ if (contentId !== this.contentId) this.edit = false
38
+ });
39
+
40
+ // #endif
41
+ },
42
+ methods: {
43
+
44
+ //#ifdef H5
45
+
46
+ /**
47
+ * @description 点击视图编辑按钮发送Editx属性编辑面板
48
+ */
49
+ showEdit() {
50
+ if (this.edit) return;
51
+ this.edit = true;
52
+ XdBus.send('attr', {
53
+ Attr: this.$xdUniHelper.cloneDeep(Attr),
54
+ contentId: this.contentId,
55
+ }, false, 'xd-iframe')
56
+ }
57
+
58
+ //#endif
59
+ }
60
+ }
61
+
62
+ </script>
63
+
64
+ <style scoped lang="less">
65
+ .jfb-base-bottom {
66
+ &__edit {
67
+
68
+ }
69
+
70
+ &__body{
71
+
72
+ }
73
+ }
74
+ </style>
@@ -0,0 +1,74 @@
1
+ <template>
2
+ <view class="jfb-base-top">
3
+ <!--#ifdef H5-->
4
+ <view class="jfb-base-top__edit">
5
+ <view class="jfb-base-top__edit-icon" @click="showEdit"></view>
6
+ </view>
7
+ <!-- #endif -->
8
+ <view class="jfb-base-top__body"></view>
9
+ </view>
10
+ </template>
11
+
12
+ <script>
13
+ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
14
+ export default {
15
+ name: "JfbBaseTop",
16
+ components: {
17
+ XdFontIcon
18
+ },
19
+ data() {
20
+ return {
21
+
22
+ //#ifdef H5
23
+ Attr: {},
24
+ edit: false, //是否开启编辑模式
25
+ contentId: null, //容器ID
26
+
27
+ // #endif
28
+ }
29
+ },
30
+ created() {
31
+
32
+ //#ifdef H5
33
+
34
+ //监听Editx属性编辑模块视图发送变化接受时间
35
+ this.contentId = this.$xdUniHelper.randomChar(20);
36
+ XdBus.addEvent('attrViewChange', (contentId, data) => {
37
+ if (contentId !== this.contentId) this.edit = false
38
+ });
39
+
40
+ // #endif
41
+ },
42
+ methods: {
43
+
44
+ //#ifdef H5
45
+
46
+ /**
47
+ * @description 点击视图编辑按钮发送Editx属性编辑面板
48
+ */
49
+ showEdit() {
50
+ if (this.edit) return;
51
+ this.edit = true;
52
+ XdBus.send('attr', {
53
+ Attr: this.$xdUniHelper.cloneDeep(Attr),
54
+ contentId: this.contentId,
55
+ }, false, 'xd-iframe')
56
+ }
57
+
58
+ //#endif
59
+ }
60
+ }
61
+
62
+ </script>
63
+
64
+ <style scoped lang="less">
65
+ .jfb-base-top {
66
+ &__edit {
67
+
68
+ }
69
+
70
+ &__body{
71
+
72
+ }
73
+ }
74
+ </style>