jufubao-base 1.0.184-beta2 → 1.0.184

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