jufubao-base 1.0.192 → 1.0.194-beta1

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.192",
3
+ "version": "1.0.194-beta1",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -0,0 +1,111 @@
1
+ <template>
2
+ <view
3
+ class="jfb-base-image-block"
4
+ @click="handleEditxSelect"
5
+ :class="{ editx : isEditx && active }"
6
+ >
7
+ <!--#ifdef H5-->
8
+ <view
9
+ class="jfb-base-image-block__edit"
10
+ :class="{ editx : isEditx && active }"
11
+ v-if="isEditx && active"
12
+ >
13
+ <view class="jfb-base-image-block__edit-icon" @click="delEdit">删除</view>
14
+ </view>
15
+ <!-- #endif -->
16
+ <view class="jfb-base-image-block__body">
17
+ <view>测试插件( {{containerId}} )</view>
18
+ </view>
19
+ </view>
20
+ </template>
21
+
22
+ <script>
23
+ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
24
+ import { jfbRootExec } from "@/utils/xd.event";
25
+ import JfbBaseImageBlockMixin from "./JfbBaseImageBlockMixin";
26
+ import { getContainerPropsValue } from "@/utils/xd.base";
27
+ import componentsMixins from "@/mixins/componentsMixins";
28
+ import extsMixins from "@/mixins/extsMixins";
29
+ export default {
30
+ name: "JfbBaseImageBlock",
31
+ components: {
32
+ XdFontIcon
33
+ },
34
+ mixins: [
35
+ componentsMixins, extsMixins, JfbBaseImageBlockMixin
36
+ ],
37
+ data() {
38
+ return {
39
+
40
+ //todo
41
+ }
42
+ },
43
+ watch: {
44
+ container(value, oldValue) {
45
+ if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
46
+ if (this.$configProject['isPreview']) this.init(value)
47
+ },
48
+ },
49
+ created() {
50
+ this.init(this.container);
51
+
52
+ //todo
53
+ },
54
+ methods: {
55
+ onJfbLoad(options) {
56
+
57
+ // jfbRootExec('baiduUserLogin', {
58
+
59
+ // vm: this,// data: {
60
+
61
+ // account: 'gaoshiyong',// password: '123456789',// type: 3,// ...options
62
+
63
+ // }
64
+
65
+ // }).then().catch()
66
+ },
67
+ /**
68
+ * @description 监听事件变化
69
+ * @param container {object} 业务组件对象自己
70
+ */
71
+ init(container) {
72
+
73
+ //this.bgcolor = getContainerPropsValue(container, 'content.bgcolor', '#fff');
74
+
75
+ //this.height = getContainerPropsValue(container, 'content.height', 10);
76
+ },
77
+ onJfbScroll(options) {
78
+ console.log('event.onJfbScroll', options)
79
+ },
80
+ onJfbReachBottom(options) {
81
+ console.log('event.onJfbReachBottom', options)
82
+ },
83
+ onJfbShow(options) {
84
+ console.log('event.onJfbShow', options)
85
+ },
86
+ onJfbHide(options) {
87
+ console.log('event.onJfbHide', options)
88
+ },
89
+ onJfbBack(options) {
90
+ console.log('event.onJfbBack', options)
91
+ },
92
+ onJfbUpdate(...data) {
93
+ console.log('event.onJfbUpdate', data)
94
+ },
95
+ onJfbCustomEvent(options) {
96
+ console.log('event.onJfbReachBottom', options)
97
+ },
98
+ }
99
+ }
100
+
101
+ </script>
102
+
103
+ <style scoped lang="less">
104
+ @import "./JfbBaseImageBlockLess.less";
105
+
106
+ .jfb-base-image-block {
107
+ &__body{
108
+
109
+ }
110
+ }
111
+ </style>
@@ -0,0 +1,79 @@
1
+ /**
2
+ * @desc 获取绝对路径完整地址
3
+ * @param @path
4
+ **/
5
+ //例如:https://image.jufubao.cn/20220501010108/image/bg/default_gonghui_bg.png
6
+ @basePath: 'business/';
7
+ @doMain: '//sandbox-img.jufubao.cn/';
8
+
9
+ .getBusinessImageUrl(@path, @size: 'size8') {
10
+ @url: "@{doMain}@{basePath}@{path}?x-oss-process=style/@{size}";
11
+ background-image: url(@url);
12
+ }
13
+
14
+ //start
15
+ .jfb-base-image-block {
16
+ box-sizing: border-box;
17
+
18
+ &__body{
19
+ position: relative;
20
+ overflow: hidden;
21
+ z-index: 2
22
+ }
23
+
24
+ &.editx,&.editx:hover {
25
+ position: relative;
26
+ min-height: unit(100, rpx);
27
+ z-index: 3;
28
+ &::after {
29
+ border: 2rpx dashed blue;
30
+ content: " ";
31
+ position: absolute;
32
+ top:0;
33
+ left:0;
34
+ bottom:0;
35
+ right:0;
36
+ z-index: 4;
37
+ cursor: pointer;
38
+ }
39
+
40
+ }
41
+
42
+
43
+ &__edit {
44
+ cursor: pointer;
45
+ position: absolute;
46
+ right: unit(0, rpx);
47
+ top: unit(-52, rpx);
48
+ height: unit(50, rpx);
49
+ line-height: unit(50, rpx);
50
+ display: flex;
51
+ justify-content: center;
52
+ align-items: center;
53
+ background: rgba(0, 0, 0, .6);
54
+ border-radius: unit(10, rpx);
55
+ box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
56
+ color: #fff;
57
+ font-size: unit(22, rpx);
58
+
59
+ &-icon{
60
+ padding: 0 unit(20, rpx);
61
+ }
62
+
63
+ &.editx {
64
+ box-sizing: border-box;
65
+
66
+ }
67
+ }
68
+ }
69
+ //end
70
+
71
+
72
+ /**notPreview**/
73
+ .jfb-base-image-block {
74
+ //&:before {
75
+ //content: " ";
76
+ //display: table;
77
+ //}
78
+ }
79
+ /**endNotPreview**/
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+
3
+
4
+
5
+ export default {
6
+ data() {
7
+ return {
8
+ //#ifdef H5
9
+
10
+ // #endif
11
+ cssRoot: 'jfb-base-image-block'
12
+ }
13
+ },
14
+ created() {
15
+
16
+
17
+ },
18
+ }
@@ -1091,12 +1091,7 @@ export default {
1091
1091
  groupKey:'style',
1092
1092
  ele: 'xd-margin-padding',
1093
1093
  valueKey: 'agreePadding',
1094
- value: data.agreePadding || {
1095
- top: 40,
1096
- left: 20,
1097
- right: 20,
1098
- bottom: 0
1099
- },
1094
+ value: data.agreePadding || null,
1100
1095
  setting: {
1101
1096
  type: 'padding',
1102
1097
  },
@@ -930,12 +930,7 @@ export default {
930
930
  groupKey: 'style',
931
931
  ele: 'xd-margin-padding',
932
932
  valueKey: 'agreePadding',
933
- value: data.agreePadding || {
934
- top: 40,
935
- left: 20,
936
- right: 20,
937
- bottom: 0
938
- },
933
+ value: data.agreePadding || null,
939
934
  setting: {
940
935
  type: 'padding',
941
936
  },
@@ -919,12 +919,7 @@ export default {
919
919
  groupKey: 'style',
920
920
  ele: 'xd-margin-padding',
921
921
  valueKey: 'agreePadding',
922
- value: data.agreePadding || {
923
- top: 40,
924
- left: 20,
925
- right: 20,
926
- bottom: 0
927
- },
922
+ value: data.agreePadding || null,
928
923
  setting: {
929
924
  type: 'padding',
930
925
  },
@@ -355,11 +355,17 @@ export default {
355
355
  {"label": "三行", "value": 3},
356
356
  ]
357
357
  },
358
+ {
359
+ ele: 'title',
360
+ label: '广告样式设置',
361
+ size: 'small',
362
+ groupKey:'content',
363
+ },
358
364
  {
359
365
  label: '广告位边距设置:',
360
366
  ele: 'xd-margin-padding',
361
367
  valueKey: 'margin',
362
- groupKey:'style',
368
+ groupKey:'content',
363
369
  value: params.margin || null,
364
370
  setting: {
365
371
  type: 'margin',
@@ -374,7 +380,7 @@ export default {
374
380
  ele: 'xd-margin-padding',
375
381
  valueKey: 'bgImagePadding',
376
382
  value: params['bgImagePadding'] || null,
377
- groupKey:'style',
383
+ groupKey:'content',
378
384
  setting: {
379
385
  type: 'padding',
380
386
  },
@@ -388,7 +394,7 @@ export default {
388
394
  type: 'number',
389
395
  valueKey: 'padding',
390
396
  value: params.padding || 0,
391
- groupKey:'style',
397
+ groupKey:'content',
392
398
  className: 'input40',
393
399
  placeholder: '请广告内容之间间距设置',
394
400
  notice: '请广告内容之间间距设置。<span style="color: red">单位:像素(px)</span>。默认值:<span style="color: red">0</span>像素',
@@ -398,7 +404,7 @@ export default {
398
404
  label: '广告圆角设置:',
399
405
  ele: 'xd-site-select-list',
400
406
  valueKey: 'radius',
401
- groupKey:'style',
407
+ groupKey:'content',
402
408
  value: params['radius'] || '20',
403
409
  placeholder: '请选择广告圆角设置',
404
410
  multiple: false,
@@ -15,7 +15,7 @@
15
15
  <!-- #endif -->
16
16
  <view class="jfb-base-poster__body" v-if="noData">
17
17
  <view class="x-line"></view>
18
- <view class="jfb-base-poster-cont" :style="getBodyStyle">
18
+ <view class="jfb-base-poster-cont" :style="[getBodyStyle]">
19
19
  <!--一分屏-->
20
20
  <template v-if="posterType === '1'">
21
21
  <view
@@ -106,7 +106,7 @@
106
106
  </view>
107
107
  </view>
108
108
  <!--解决图片缓冲预加载问题-->
109
- <view v-for="(item,index) in info" :key="index" style="position: absolute; top: -19999px; left: -100000px">
109
+ <view v-if="item.image_background_url" v-for="(item,index) in info" :key="index" style="position: absolute; top: -19999px; left: -100000px">
110
110
  <image :src="item.image_background_url" ></image>
111
111
  </view>
112
112
  <!--解决图片缓冲预加载问题-->
@@ -180,9 +180,9 @@
180
180
  }
181
181
  image = Object.assign({},image,{
182
182
  margin: this.margin,
183
- padding: this.outPadding
183
+ padding: this.outPadding,
184
184
  })
185
- return this.styleObjectToString(image)
185
+ return image
186
186
  },
187
187
  getOneWidth(){
188
188
  let margin = this.checkValue(this.mS.left, 0) + this.checkValue(this.mS.right, 0);
@@ -212,6 +212,7 @@
212
212
  carouselTime: this.carouselTime,
213
213
  radius: this.radius,
214
214
  padding: this.padding,
215
+ bgImagePadding: this.bgImagePadding,
215
216
  rows: this.rows,
216
217
  cell,
217
218
  height,
@@ -655,6 +656,7 @@
655
656
  @import "./JfbBasePosterLess.less";
656
657
 
657
658
  .jfb-base-poster {
659
+ min-height: 60rpx!important;
658
660
  &__body{
659
661
  & > view.jfb-base-poster-cont {
660
662
  box-sizing: border-box;
@@ -33,7 +33,7 @@
33
33
  field="content_name"
34
34
  :mode="config.mode"
35
35
  :dots-styles="config.dotStyleData"
36
- :style="{height:(getHeight + 46 * $rpxNum) + 'px', width:'100%'}"
36
+ :style="{height:(outHeight) + 'px', width:'100%'}"
37
37
  >
38
38
  <!--#ifdef MP-WEIXIN-->
39
39
  <swiper
@@ -151,7 +151,13 @@
151
151
  let height = this.height * this.config.rows;
152
152
  let padding = 0;
153
153
  if (this.config.rows >= 2) padding = Number(this.config.padding) * this.$rpxNum * (this.config.rows -1);
154
- return height + padding;
154
+ return height + padding
155
+ },
156
+
157
+ outHeight(){
158
+ let modeHeight = 46 * this.$rpxNum ;
159
+ if(this.config.mode === "normal") modeHeight = 0;
160
+ return this.getHeight + modeHeight;
155
161
  },
156
162
  },
157
163
  watch: {