jufubao-base 1.0.186 → 1.0.187-beta2

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.
@@ -18,8 +18,8 @@
18
18
  <view class="user-center-box" :style="{padding: outMargin}">
19
19
  <view :style="{borderRadius: bodyRadius + 'rpx', backgroundColor:bodyBackgroundColor, padding:outPadding}">
20
20
  <view class="my-card-add__btn">
21
- <view :style="{color: cardNameColor}">我的{{cardName}}</view>
22
- <view :style="{borderColor:btnBoxColor || mainColor,color:btnBoxColor || mainColor}" @click="handleToLink(add_url)">添加{{cardName}}</view>
21
+ <view :style="[titleStyleComp]">我的{{cardName}}</view>
22
+ <view :style="[addBtnStyleComp]" @click="handleToLink(add_url)">添加{{cardName}}</view>
23
23
  </view>
24
24
  <view
25
25
  class="my-card-add__link"
@@ -27,7 +27,9 @@
27
27
  borderRadius: radius + 'rpx',
28
28
  background: backgroundColor,
29
29
  border: borderBox,
30
- marginTop: padding + 'rpx'
30
+ marginTop: rowSpacing + 'rpx',
31
+ padding:contentPaddingComp,
32
+ boxShadow: contShadow
31
33
  }"
32
34
  >
33
35
  <view class="my-card-add__link-num" v-if="0">
@@ -42,7 +44,8 @@
42
44
  :style="{
43
45
  color:btnTextColor,
44
46
  background:btnBgColor,
45
- fontSize: btnFontSize + 'rpx'
47
+ fontSize: btnFontSize + 'rpx',
48
+ borderRadius:btnRadius + 'rpx',
46
49
  }"
47
50
  @click="handleToLink(card_url)"
48
51
  >
@@ -86,38 +89,91 @@
86
89
  return str
87
90
  },
88
91
  borderBox() {
89
- if (this.is_border === 'Y') return `${this.is_border_w}rpx solid ${this.is_border_c}`;
92
+ if (this.is_border === 'Y') return `${this.is_border_w}rpx ${this.is_border_s} ${this.is_border_c}`;
90
93
  else return '0';
91
94
  },
95
+ titleStyleComp(){
96
+ return {
97
+ fontSize: this.titleStyle.fontSize || '28rpx',
98
+ color: `${this.titleStyle.color || '#333'}`,
99
+ fontWeight: `${this.titleStyle.fontWeight || 'normal'}`,
100
+ }
101
+ },
102
+ addBtnStyleComp(){
103
+ let border = {};
104
+ if(this.addBtnBorder && this.addBtnBorder.type === 'Y') {
105
+ let value = this.addBtnBorder.value ||{};
106
+ if(value.width) border['borderWidth'] = value.width + 'rpx';
107
+ if(value.color) border['borderColor'] = value.color;
108
+ if(value.style) border['borderStyle'] = value.style;
109
+ }
110
+ let addBtnShadow = {};
111
+ if(this.addBtnShadow && this.addBtnShadow.type === 'Y') {
112
+ let value = this.addBtnShadow.value || {};
113
+ if(value.color && value.width) {
114
+ addBtnShadow['boxShadow'] = `0 0 ${value.width}rpx ${value.color}`
115
+ }
116
+ }
117
+ return {
118
+ color: this.addBtnStyle.color || this.mainColor,
119
+ fontSize: this.addBtnStyle.fontSize || '26rpx',
120
+ fontWeight: this.addBtnStyle.fontWeight || 'normal',
121
+ borderColor: this.mainColor,
122
+ borderWidth: '2rpx',
123
+ borderStyle:'solid',
124
+ backgroundColor: this.addBtnBgColor || 'rgba(0,0,0,0)',
125
+ borderRadius:this.addBtnRadius + 'rpx',
126
+ ...border,
127
+ ...addBtnShadow
128
+ }
129
+ },
130
+ contentPaddingComp(){
131
+ let str = `${this.checkValue(this.contentPadding.top, 40)}rpx`;
132
+ str = `${str} ${this.checkValue(this.contentPadding.right, 40)}rpx`;
133
+ str = `${str} ${this.checkValue(this.contentPadding.bottom, 40)}rpx`;
134
+ str = `${str} ${this.checkValue(this.contentPadding.left, 40)}rpx`;
135
+ return str
136
+ }
92
137
  },
93
138
  data() {
94
139
  return {
95
140
  add_url: '',
96
141
  pwd_url: '',
97
142
  card_url:'',
98
- cardName: '',
143
+ cardName: '卡券',
144
+ bodyPadding: {},
145
+ bodyRadius: 0,
146
+ bodyBackgroundColor: 'rgba(0,0,0,0)',
147
+ bodyMargin:{},
148
+ rowSpacing: 20,
149
+
150
+ //title
151
+ titleStyle:{},
152
+
153
+ //添加按钮
154
+ addBtnBgColor:'rgba(0,0,0,0)',
155
+ addBtnStyle:{},
156
+ addBtnBorder:{},
157
+ addBtnShadow:{},
158
+ addBtnRadius: '40',
99
159
 
100
- //基础
101
- color: '#333',
160
+ //进入
161
+ contentPadding:{},
102
162
  backgroundColor: 'rgba(0,0,0,0)',
103
163
  radius: 0,
104
- padding: 20,
164
+ contShadow:'0 0 0 rgba(0,0,0,0)',
165
+
166
+ //进入按钮样式
105
167
  btnBgColor: '',
106
168
  btnTextColor: '',
107
169
  btnFontSize: 24,
170
+ btnRadius:'40',
108
171
 
109
172
  //边框
110
173
  is_border: 'Y',
111
174
  is_border_w: 0,
112
175
  is_border_c: '',
113
176
 
114
- //整体
115
- bodyPadding: {},
116
- bodyRadius: 0,
117
- bodyBackgroundColor: 'rgba(0,0,0,0)',
118
- bodyMargin:{},
119
- cardNameColor: '#333',
120
- btnBoxColor:'',
121
177
  }
122
178
  },
123
179
  watch: {
@@ -131,6 +187,7 @@
131
187
  },
132
188
  methods: {
133
189
  handleToLink(path, type) {
190
+ if (this.$configProject['isPreview']) return;
134
191
  if(!path) {
135
192
  console.warn(`跳转地址不存在`)
136
193
  }
@@ -144,33 +201,51 @@
144
201
  * @param container {object} 业务组件对象自己
145
202
  */
146
203
  init(container) {
147
-
148
- //整体
204
+ this.cardName = getContainerPropsValue(container, 'content.cardName', '卡券');
149
205
  this.bodyMargin = getContainerPropsValue(container, 'content.bodyMargin', {});
150
206
  this.bodyRadius = getContainerPropsValue(container, 'content.bodyRadius', 0);
151
207
  this.bodyBackgroundColor = getContainerPropsValue(container, 'content.bodyBackgroundColor', 'rgba(0,0,0,0)');
152
208
  this.bodyPadding = getContainerPropsValue(container, 'content.bodyPadding', {});
209
+ this.rowSpacing = getContainerPropsValue(container, 'content.padding', 20);
153
210
 
154
- //基础
211
+ //标题
212
+ this.titleStyle = getContainerPropsValue(container, 'content.titleStyle', {});
213
+
214
+ //添加按钮
215
+ this.addBtnBgColor = getContainerPropsValue(container, 'content.addBtnBgColor', 'rgba(0,0,0,0)');
216
+ this.addBtnStyle = getContainerPropsValue(container, 'content.addBtnStyle', {});
217
+ this.addBtnBorder = getContainerPropsValue(container, 'content.addBtnBorder', {});
218
+ this.addBtnRadius = getContainerPropsValue(container, 'content.addBtnRadius', '40');
219
+ this.addBtnShadow = getContainerPropsValue(container, 'content.addBtnShadow', {});
220
+
221
+ //进入
222
+ this.contentPadding = getContainerPropsValue(container, 'content.contentPadding', {});
155
223
  this.radius = getContainerPropsValue(container, 'content.radius', 0);
156
224
  this.color = getContainerPropsValue(container, 'content.textColor', '#333');
157
225
  this.backgroundColor = getContainerPropsValue(container, 'content.backgroundColor', '#f8f8f8');
158
- this.padding = getContainerPropsValue(container, 'content.padding', 20);
159
- this.btnBgColor = getContainerPropsValue(container, 'content.btnBgColor', this.mainGradient);
226
+ this.contShadow = this.getXdShadow({width:20, color:'rgba(0,0,0,0)'},getContainerPropsValue(container, 'content.contShadow', {}))
227
+
228
+ //进入按钮
229
+ this.btnBgColor = getContainerPropsValue(container, 'content.btnBgColor', this.mainGradient||this.mainColor);
160
230
  this.btnTextColor = getContainerPropsValue(container, 'content.btnTextColor', '#fff');
161
231
  this.btnFontSize = getContainerPropsValue(container, 'content.btnFontSize',26);
162
- this.cardNameColor = getContainerPropsValue(container, 'content.cardNameColor','#333');
163
- this.btnBoxColor = getContainerPropsValue(container, 'content.cardNameColor','');
232
+ this.btnRadius = getContainerPropsValue(container, 'content.btnRadius','40');
233
+ this.contBorder = getContainerPropsValue(container, 'content.contBorder', {});
164
234
  this.is_border = getContainerPropsValue(container, 'content.is_border', 'N');
165
235
  this.is_border_c = getContainerPropsValue(container, 'content.is_border_c', '#fff');
166
236
  this.is_border_w = getContainerPropsValue(container, 'content.is_border_w', 2);
237
+ this.is_border_s = 'solid';
238
+ if(this.contBorder.type === 'Y') {
239
+ this.is_border = 'Y';
240
+ if(this.contBorder.value && this.contBorder.value.width) this.is_border_w = this.contBorder.value.width;
241
+ if(this.contBorder.value && this.contBorder.value.color) this.is_border_c = this.contBorder.value.color;
242
+ if(this.contBorder.value && this.contBorder.value.style) this.is_border_s = this.contBorder.value.style;
167
243
 
168
- //其他
244
+ }
245
+ //链接
169
246
  this.add_url = getContainerPropsValue(container, 'content.add_url', {value: ''}).value;
170
247
  this.pwd_url = getContainerPropsValue(container, 'content.pwd_url', {value: ''}).value;
171
248
  this.card_url = getContainerPropsValue(container, 'content.card_url', {value: ''}).value;
172
- this.cardName = getContainerPropsValue(container, 'content.cardName', '卡券');
173
-
174
249
  },
175
250
  }
176
251
  }
@@ -197,9 +272,6 @@
197
272
  width: unit(200, rpx);
198
273
  height: unit(60, rpx);
199
274
  line-height: unit(60, rpx);
200
- border-radius: unit(30, rpx);
201
- border: 1px solid #FF5733;
202
- color: #FF5733;
203
275
  text-align: center;
204
276
  }
205
277
  }
@@ -235,7 +307,6 @@
235
307
  height: unit(80, rpx);
236
308
  line-height: unit(80, rpx);
237
309
  border-radius: unit(100, rpx);
238
- font-size: unit(24, rpx);
239
310
  text-align: center;
240
311
  margin-top: unit(30, rpx);
241
312
  }
@@ -6,12 +6,6 @@ export default {
6
6
  style: [],
7
7
  content: (data)=>{
8
8
  return [
9
- {
10
- label: '',
11
- ele: 'slot',
12
- slot: 'is_reference_title',
13
- groupKey:'advanced',
14
- },
15
9
  {
16
10
  label: '内容排版:',
17
11
  ele: 'xd-radio',
@@ -27,30 +21,39 @@ export default {
27
21
  ]
28
22
  },
29
23
  {
30
- label: '内容文字颜色:',
31
- ele: 'xd-color',
32
- valueKey: 'textColor',
33
- groupKey:'style',
34
- value: data.textColor || '',
35
- placeholder: '请选择内容文字颜色',
36
- classNmae: 'input80',
24
+ label: '退出登录自定义名称:',
25
+ ele: 'el-input',
26
+ type: 'text',
27
+ groupKey:'content',
28
+ valueKey: 'logoutName',
29
+ value: data['logoutName'] || '',
30
+ notice: '退出登录自定义名称设置,默认值:<span style="color:red">[退出登录]</span>',
31
+ inline: false,
32
+ className: 'input60',
33
+ },
34
+
35
+ {
36
+ ele: 'title',
37
+ label: '用户图像设置',
38
+ size: 'small',
39
+ groupKey:'content',
37
40
  },
38
41
  {
39
- label: '内容背景颜色:',
42
+ label: '边框颜色:',
40
43
  ele: 'xd-color',
41
- valueKey: 'backgroundColor',
42
- groupKey:'style',
43
- value: data.backgroundColor || '',
44
- placeholder: '请选择内容背景颜色',
44
+ groupKey:'content',
45
+ valueKey: 'imageColor',
46
+ value: data['imageColor'] || '',
47
+ placeholder: '请选择背景颜色',
45
48
  classNmae: 'input80',
46
49
  },
47
50
  {
48
- label: '内容圆角设置:',
51
+ label: '圆角设置:',
49
52
  ele: 'xd-site-select-list',
50
- valueKey: 'radius',
51
- value: data['radius'] || '',
52
- groupKey:'style',
53
- placeholder: '请选择内容圆角设置',
53
+ valueKey: 'imageRadius',
54
+ value: data['imageRadius'] || '50%',
55
+ groupKey:'content',
56
+ placeholder: '请选择圆角设置',
54
57
  multiple: false,
55
58
  className: 'input60',
56
59
  handleCustom({action, data}) {
@@ -59,15 +62,21 @@ export default {
59
62
  key: Date.now()
60
63
  })
61
64
  .then(res => {
62
- data.cb(res.list)
65
+ data.cb(res.list.map(item=>{
66
+ return {
67
+ ...item,
68
+ value: item.value + 'rpx'
69
+ }
70
+ }).concat({label: '圆角', value:'50%'}))
63
71
  })
64
72
  .catch(error => {
65
73
  console.error(error);
66
74
  });
67
75
  },
68
76
  },
77
+
69
78
  {
70
- label: '内容设置外边距:',
79
+ label: '设置外边距:',
71
80
  ele: 'xd-margin-padding',
72
81
  valueKey: 'margin',
73
82
  groupKey:'style',
@@ -75,12 +84,11 @@ export default {
75
84
  setting: {
76
85
  type: 'margin',
77
86
  },
78
- placeholder: '请设置外边距',
79
87
  inline: false,
80
- notice: '设置外边距,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">0</span>像素',
88
+ notice: '设置外边距,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">20</span>像素',
81
89
  },
82
90
  {
83
- label: '内容设置内边距:',
91
+ label: '设置填充:',
84
92
  groupKey:'style',
85
93
  ele: 'xd-margin-padding',
86
94
  valueKey: 'padding',
@@ -88,15 +96,127 @@ export default {
88
96
  setting: {
89
97
  type: 'padding',
90
98
  },
91
- placeholder: '请设置边距',
99
+ placeholder: '设置填充',
92
100
  inline: false,
93
- notice: '设置内边距,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">20</span>像素',
101
+ notice: '设置填充,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">20</span>像素',
102
+ },
103
+ {
104
+ label: '背景颜色:',
105
+ ele: 'xd-color',
106
+ valueKey: 'backgroundColor',
107
+ groupKey:'style',
108
+ value: data.backgroundColor || '',
109
+ placeholder: '请选择背景颜色',
110
+ classNmae: 'input80',
111
+ },
112
+ {
113
+ label: '圆角设置:',
114
+ ele: 'xd-site-select-list',
115
+ valueKey: 'radius',
116
+ value: data['radius'] || '0',
117
+ groupKey:'style',
118
+ placeholder: '请选择圆角设置',
119
+ multiple: false,
120
+ className: 'input60',
121
+ handleCustom({action, data}) {
122
+ XdBus.getParentApi('getOptionsSettingList')({
123
+ setting_id: 'edtix_style_radius',
124
+ key: Date.now()
125
+ })
126
+ .then(res => {
127
+ data.cb(res.list)
128
+ })
129
+ .catch(error => {
130
+ console.error(error);
131
+ });
132
+ },
133
+ },
134
+ {
135
+ label: '投影设置:',
136
+ ele: 'xd-shadow',
137
+ groupKey:'style',
138
+ valueKey: 'contShadow',
139
+ value: data['contShadow'] || '',
140
+ setting: {
141
+ selected: 'N'
142
+ },
143
+ handleCustom({action, data}) {
144
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
145
+ .then(res => {
146
+ data.cb(res.list)
147
+ })
148
+ .catch(error => {
149
+ console.error(error);
150
+ data.cb([])
151
+ });
152
+ },
153
+ },
154
+ {
155
+ label: '边框设置:',
156
+ ele: 'xd-border',
157
+ groupKey:'style',
158
+ valueKey: 'contBorder',
159
+ value: data['contBorder'] || '',
160
+ setting: {
161
+ selected:'N'
162
+ },
94
163
  },
164
+ {
165
+ label: "昵称字体样式设置",
166
+ ele: "xd-text-and-bgc",
167
+ groupKey:'style',
168
+ valueKey: 'nickStyle',
169
+ value: data['nickStyle'] || null,
170
+ setting: {
171
+ fontSize: true,
172
+ color: true,
173
+ bgColor: false,
174
+ weight: true,
175
+ selected:false
176
+ },
177
+ handleCustom({action, data}) {
178
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_font_size'})
179
+ .then(res => {
180
+ data.cb(res.list)
181
+ })
182
+ .catch(error => {
183
+ console.error(error);
184
+ data.cb([])
185
+ });
186
+ },
187
+ },
188
+ {
189
+ label: "退出字体样式设置",
190
+ ele: "xd-text-and-bgc",
191
+ groupKey:'style',
192
+ valueKey: 'logoutStyle',
193
+ value: data['logoutStyle'] || null,
194
+ setting: {
195
+ fontSize: true,
196
+ color: true,
197
+ bgColor: false,
198
+ weight: true,
199
+ selected:false
200
+ },
201
+ handleCustom({action, data}) {
202
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_font_size'})
203
+ .then(res => {
204
+ data.cb(res.list)
205
+ })
206
+ .catch(error => {
207
+ console.error(error);
208
+ data.cb([])
209
+ });
210
+ },
211
+ },
212
+
213
+ //=====属性已废弃(不能删除,已隐藏)====
95
214
  {
96
215
  ele: 'title',
97
216
  label: '投影设置',
98
217
  size: 'small',
99
218
  groupKey:'style',
219
+ hidden: true,
100
220
  },
101
221
  {
102
222
  label: '是否有投影:',
@@ -107,6 +227,7 @@ export default {
107
227
  placeholder: '请选择是否投影',
108
228
  multiple: false,
109
229
  className: 'input80',
230
+ hidden: true,
110
231
  list: [
111
232
  {label: '是', value: 'Y'},
112
233
  {label: '否', value: 'N'},
@@ -120,6 +241,7 @@ export default {
120
241
  value: data['is_shadow_bg'] || '',
121
242
  placeholder: '请选择投影颜色',
122
243
  classNmae: 'input80',
244
+ hidden: true,
123
245
  },
124
246
  data['is_shadow'] === 'Y' && {
125
247
  label: '投影范围:',
@@ -142,16 +264,19 @@ export default {
142
264
  console.error(error);
143
265
  });
144
266
  },
267
+ hidden: true,
145
268
  },
146
269
  {
147
270
  ele: 'title',
148
271
  label: '边框设置',
149
272
  size: 'small',
150
273
  groupKey:'style',
274
+ hidden: true,
151
275
  },
152
276
  {
153
277
  label: '是否有边框:',
154
278
  ele: 'xd-radio',
279
+ hidden: true,
155
280
  valueKey: 'is_border',
156
281
  groupKey:'style',
157
282
  value: data['is_border'] || 'N',
@@ -165,6 +290,7 @@ export default {
165
290
  },
166
291
  data['is_border'] === 'Y' && {
167
292
  label: '边框颜色:',
293
+ hidden: true,
168
294
  ele: 'xd-color',
169
295
  groupKey:'style',
170
296
  valueKey: 'is_border_c',
@@ -173,6 +299,7 @@ export default {
173
299
  classNmae: 'input80',
174
300
  },
175
301
  data['is_border'] === 'Y' && {
302
+ hidden: true,
176
303
  label: '边框大小:',
177
304
  ele: 'el-input',
178
305
  type: 'number',
@@ -182,6 +309,28 @@ export default {
182
309
  placeholder: '请输入边框颜色',
183
310
  className: 'input80',
184
311
  },
312
+ //=====属性已废弃====
313
+
314
+ 0&&{
315
+ label: '是否显示设置:',
316
+ ele: 'xd-radio',
317
+ valueKey: 'isSetting',
318
+ value: data['isSetting'] || 'N',
319
+ groupKey:'advanced',
320
+ placeholder: '是否显示设置',
321
+ multiple: false,
322
+ className: 'input80',
323
+ list: [
324
+ {label: '不显示', value: 'N'},
325
+ {label: '显示', value: 'Y'},
326
+ ]
327
+ },
328
+ {
329
+ label: '',
330
+ ele: 'slot',
331
+ slot: 'is_reference_title',
332
+ groupKey:'advanced',
333
+ },
185
334
  {
186
335
  label: '',
187
336
  ele: 'slot',