jufubao-base 1.0.19 → 1.0.21

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.
Files changed (39) hide show
  1. package/package.json +2 -1
  2. package/src/components/JfbBaseAfterOrderList/Api.js +60 -0
  3. package/src/components/JfbBaseAfterOrderList/Attr.js +154 -0
  4. package/src/components/JfbBaseAfterOrderList/JfbBaseAfterOrderList.vue +203 -0
  5. package/src/components/JfbBaseAfterOrderList/JfbBaseAfterOrderListLess.less +57 -0
  6. package/src/components/JfbBaseAfterOrderList/JfbBaseAfterOrderListMixin.js +222 -0
  7. package/src/components/JfbBaseBlock/JfbBaseBlock.vue +20 -0
  8. package/src/components/JfbBaseBlock/JfbBaseBlockMixin.js +42 -4
  9. package/src/components/JfbBaseCard/JfbBaseCardMixin.js +42 -4
  10. package/src/components/JfbBaseCardBind/JfbBaseCardBindMixin.js +42 -4
  11. package/src/components/JfbBaseCardDetail/JfbBaseCardDetailMixin.js +42 -4
  12. package/src/components/JfbBaseCardInfo/JfbBaseCardInfoMixin.js +42 -4
  13. package/src/components/JfbBaseCardMy/JfbBaseCardMyMixin.js +42 -4
  14. package/src/components/JfbBaseCardShift/JfbBaseCardShiftMixin.js +42 -4
  15. package/src/components/JfbBaseFooter/Attr.js +82 -0
  16. package/src/components/JfbBaseFooter/JfbBaseFooter.vue +111 -40
  17. package/src/components/JfbBaseFooter/JfbBaseFooterMixin.js +49 -3
  18. package/src/components/JfbBaseLine/JfbBaseLineMixin.js +42 -4
  19. package/src/components/JfbBaseLogin/JfbBaseLogin.vue +172 -51
  20. package/src/components/JfbBaseLogin/JfbBaseLoginMixin.js +42 -4
  21. package/src/components/JfbBaseMy/Api.js +60 -0
  22. package/src/components/JfbBaseMy/Attr.js +54 -0
  23. package/src/components/JfbBaseMy/JfbBaseMy.vue +262 -0
  24. package/src/components/JfbBaseMy/JfbBaseMyLess.less +57 -0
  25. package/src/components/JfbBaseMy/JfbBaseMyMixin.js +222 -0
  26. package/src/components/JfbBaseOrderList/Api.js +60 -0
  27. package/src/components/JfbBaseOrderList/Attr.js +154 -0
  28. package/src/components/JfbBaseOrderList/JfbBaseOrderList.vue +285 -0
  29. package/src/components/JfbBaseOrderList/JfbBaseOrderListLess.less +57 -0
  30. package/src/components/JfbBaseOrderList/JfbBaseOrderListMixin.js +222 -0
  31. package/src/components/JfbBaseSetPwd/JfbBaseSetPwdMixin.js +42 -4
  32. package/src/components/JfbBaseSuccess/Attr.js +68 -0
  33. package/src/components/JfbBaseSuccess/JfbBaseSuccess.vue +327 -0
  34. package/src/components/JfbBaseSuccess/JfbBaseSuccessLess.less +57 -0
  35. package/src/components/JfbBaseSuccess/JfbBaseSuccessMixin.js +222 -0
  36. package/src/components/JfbBaseTestApi/JfbBaseTestApiMixin.js +42 -4
  37. package/src/components/JfbBaseTestBody/JfbBaseTestBodyMixin.js +37 -3
  38. package/src/components/JfbBaseTestBottom/JfbBaseTestBottomMixin.js +37 -3
  39. package/src/components/JfbBaseTestTop/JfbBaseTestTopMixin.js +37 -3
@@ -0,0 +1,222 @@
1
+ 'use strict';
2
+
3
+ //@AttrImport
4
+ import Attr from "./Attr";
5
+ //@EndAttrImport
6
+
7
+ import {getContainerPropsValue} from "@/utils/xd.base";
8
+ export default {
9
+ props: {
10
+ /**
11
+ * @description 插件在页面中到唯一ID
12
+ */
13
+ cid:{
14
+ type: null|String|Number,
15
+ default: null,
16
+ },
17
+ /**
18
+ * @description 业务插件相关数据集合
19
+ */
20
+ container:{
21
+ type: Object,
22
+ default() {
23
+ return {}
24
+ }
25
+ },
26
+ /**
27
+ * @description 页面框架属性
28
+ */
29
+ layoutInfo: {
30
+ type: Object,
31
+ default() {
32
+ return {}
33
+ }
34
+ },
35
+ /**
36
+ * @description 页面属性
37
+ */
38
+ pageAttr: {
39
+ type: Object,
40
+ default() {
41
+ return {}
42
+ }
43
+ },
44
+ /**
45
+ * @description 业务插件元素属性(插件管理时候填写属性)
46
+ */
47
+ componentAttr: {
48
+ type: Object|Array,
49
+ default() {
50
+ return {}
51
+ }
52
+ },
53
+ /**
54
+ * @description 业务插件所属插件库属性(业务插件库)
55
+ */
56
+ appAttr: {
57
+ type: Object|Array,
58
+ default() {
59
+ return {}
60
+ }
61
+ },
62
+ /**
63
+ * @description 项目配置
64
+ */
65
+ settings: {
66
+ type: Object,
67
+ default() {
68
+ return {}
69
+ }
70
+ },
71
+ /**
72
+ * @description 业务插件库所用风格属性
73
+ */
74
+ styles: {
75
+ type: Object || null,
76
+ default() {
77
+ return {}
78
+ }
79
+ },
80
+ /**
81
+ * @description 项目配置文件
82
+ */
83
+ projectAttr: {
84
+ type: Object || null,
85
+ default() {
86
+ return {}
87
+ }
88
+ }
89
+ },
90
+ data() {
91
+ return {
92
+ containerId: null, //容器ID
93
+ //#ifdef H5
94
+
95
+ //@AttrData
96
+ Attr:{}, //对外开发编辑属性
97
+ //@EndAttrData
98
+
99
+ active: false, //是否选择当前状态
100
+ isEditx: true, //当前为Editx模式
101
+ edit: false, //是否开启编辑模式
102
+ // #endif
103
+
104
+ //风格键
105
+ mainColor: '',
106
+ successColor: '',
107
+ warningColor: '',
108
+ subMainColor: '',
109
+ infoColor: '',
110
+ defaultColor: '',
111
+ dangerColor: ''
112
+ }
113
+ },
114
+ created() {
115
+
116
+ //@AttrDataCreated
117
+ this.Attr = this.$xdUniHelper.customClone(Attr);
118
+ //@EndAttrDataCreated
119
+
120
+
121
+ //设置插件cid
122
+ if (this.cid) {
123
+ this.containerId = this.cid;
124
+ } else {
125
+ this.containerId = this.$xdUniHelper.randomChar(20);
126
+ }
127
+
128
+ //初始化风格
129
+ this.initThemesToData();
130
+
131
+ //#ifdef H5
132
+ //监听用户点击状态显示虚框
133
+ XdBus.addEvent('select', ({containerId}) => {
134
+ this.active = containerId === this.containerId;
135
+ });
136
+
137
+ //业务面板选中插件操作
138
+ XdBus.addEvent('onBoardSelect', ({containerId}) => {
139
+ if (containerId === this.containerId) {
140
+ this.handleSelect()
141
+ }
142
+ });
143
+ // #endif
144
+ },
145
+ methods: {
146
+
147
+ /**
148
+ * 检查插件是否加载成功
149
+ */
150
+ onCheck() {
151
+ },
152
+
153
+ /***
154
+ * @description 业务组件风格map到data中
155
+ */
156
+ initThemesToData() {
157
+ Object.keys(this.styles).map(key => {
158
+ let k = key.replace('$', '');
159
+ if (this[k] !== undefined) this[k] = this.styles[key];
160
+ });
161
+ console.log('initThemesToData',this)
162
+ },
163
+
164
+ /**
165
+ * @description 其子级插件获取当前插件的业务组件风格列表
166
+ * @returns {*}
167
+ */
168
+ getParentThemes(){
169
+ return this.styles;
170
+ },
171
+
172
+
173
+ //#ifdef H5
174
+ /**
175
+ * @description 点击删除操作按钮
176
+ */
177
+ delEdit(){
178
+ XdBus.send('onDelPackage', {
179
+ containerId: this.containerId,
180
+ componentAtrr: this.componentAtrr,
181
+ cid: this.cid,
182
+ container: this.container
183
+ })
184
+ },
185
+ //#endif
186
+
187
+ /**
188
+ * @description 点击选择插件显示边框
189
+ */
190
+ handleSelect() {
191
+ //#ifdef H5
192
+ if (this.active) return;
193
+ this.active = true;
194
+ let AttrObj = this.$xdUniHelper.checkVarType(this.Attr) === 'object' ?
195
+ this.Attr : { style: [], advanced: [], content: []};
196
+ console.log('handleSelect.Attr', AttrObj);
197
+
198
+ //设置已绑定数据
199
+ Object.keys(AttrObj).map(type=>{
200
+ AttrObj[type].map(item=>{
201
+ if(item.value !== undefined) item.value = getContainerPropsValue(this.container, `${type}.${item.valueKey}`, item.value);
202
+ if(item.defaultValue !== undefined) item.defaultValue = getContainerPropsValue(this.container, `${type}.${item.valueKey}`, item.value);
203
+ })
204
+ });
205
+
206
+ //发送点击组件事件
207
+ XdBus.send('onSelectPackage', {
208
+ containerId: this.containerId,
209
+ Attr: AttrObj,
210
+ container: this.$xdUniHelper.cloneDeep(this.container)
211
+ });
212
+
213
+ //绑定选中插件事件
214
+ XdBus.message('select', {
215
+ containerId: this.containerId,
216
+ })
217
+ //#endif
218
+ },
219
+
220
+
221
+ }
222
+ }
@@ -93,16 +93,31 @@ export default {
93
93
  //#ifdef H5
94
94
 
95
95
  //@AttrData
96
- Attr, //对外开发编辑属性
96
+ Attr:{}, //对外开发编辑属性
97
97
  //@EndAttrData
98
98
 
99
99
  active: false, //是否选择当前状态
100
100
  isEditx: true, //当前为Editx模式
101
101
  edit: false, //是否开启编辑模式
102
102
  // #endif
103
+
104
+ //风格键
105
+ mainColor: '',
106
+ successColor: '',
107
+ warningColor: '',
108
+ subMainColor: '',
109
+ infoColor: '',
110
+ defaultColor: '',
111
+ dangerColor: ''
103
112
  }
104
113
  },
105
114
  created() {
115
+
116
+ //@AttrDataCreated
117
+ this.Attr = this.$xdUniHelper.customClone(Attr);
118
+ //@EndAttrDataCreated
119
+
120
+
106
121
  //设置插件cid
107
122
  if (this.cid) {
108
123
  this.containerId = this.cid;
@@ -110,6 +125,9 @@ export default {
110
125
  this.containerId = this.$xdUniHelper.randomChar(20);
111
126
  }
112
127
 
128
+ //初始化风格
129
+ this.initThemesToData();
130
+
113
131
  //#ifdef H5
114
132
  //监听用户点击状态显示虚框
115
133
  XdBus.addEvent('select', ({containerId}) => {
@@ -132,6 +150,26 @@ export default {
132
150
  onCheck() {
133
151
  },
134
152
 
153
+ /***
154
+ * @description 业务组件风格map到data中
155
+ */
156
+ initThemesToData() {
157
+ Object.keys(this.styles).map(key => {
158
+ let k = key.replace('$', '');
159
+ if (this[k] !== undefined) this[k] = this.styles[key];
160
+ });
161
+ console.log('initThemesToData',this)
162
+ },
163
+
164
+ /**
165
+ * @description 其子级插件获取当前插件的业务组件风格列表
166
+ * @returns {*}
167
+ */
168
+ getParentThemes(){
169
+ return this.styles;
170
+ },
171
+
172
+
135
173
  //#ifdef H5
136
174
  /**
137
175
  * @description 点击删除操作按钮
@@ -153,8 +191,8 @@ export default {
153
191
  //#ifdef H5
154
192
  if (this.active) return;
155
193
  this.active = true;
156
- let AttrObj = this.$xdUniHelper.checkVarType(Attr) === 'object' ?
157
- Attr: { style: [], advanced: [], content: []};
194
+ let AttrObj = this.$xdUniHelper.checkVarType(this.Attr) === 'object' ?
195
+ this.Attr : { style: [], advanced: [], content: []};
158
196
  console.log('handleSelect.Attr', AttrObj);
159
197
 
160
198
  //设置已绑定数据
@@ -169,7 +207,7 @@ export default {
169
207
  XdBus.send('onSelectPackage', {
170
208
  containerId: this.containerId,
171
209
  Attr: AttrObj,
172
- container: this.container
210
+ container: this.$xdUniHelper.cloneDeep(this.container)
173
211
  });
174
212
 
175
213
  //绑定选中插件事件
@@ -92,9 +92,20 @@ export default {
92
92
  isEditx: true, //当前为Editx模式
93
93
  edit: false, //是否开启编辑模式
94
94
  // #endif
95
+
96
+ //风格键
97
+ mainColor: '',
98
+ successColor: '',
99
+ warningColor: '',
100
+ subMainColor: '',
101
+ infoColor: '',
102
+ defaultColor: '',
103
+ dangerColor: ''
95
104
  }
96
105
  },
97
106
  created() {
107
+
108
+
98
109
  //设置插件cid
99
110
  if (this.cid) {
100
111
  this.containerId = this.cid;
@@ -102,6 +113,9 @@ export default {
102
113
  this.containerId = this.$xdUniHelper.randomChar(20);
103
114
  }
104
115
 
116
+ //初始化风格
117
+ this.initThemesToData();
118
+
105
119
  //#ifdef H5
106
120
  //监听用户点击状态显示虚框
107
121
  XdBus.addEvent('select', ({containerId}) => {
@@ -124,6 +138,26 @@ export default {
124
138
  onCheck() {
125
139
  },
126
140
 
141
+ /***
142
+ * @description 业务组件风格map到data中
143
+ */
144
+ initThemesToData() {
145
+ Object.keys(this.styles).map(key => {
146
+ let k = key.replace('$', '');
147
+ if (this[k] !== undefined) this[k] = this.styles[key];
148
+ });
149
+ console.log('initThemesToData',this)
150
+ },
151
+
152
+ /**
153
+ * @description 其子级插件获取当前插件的业务组件风格列表
154
+ * @returns {*}
155
+ */
156
+ getParentThemes(){
157
+ return this.styles;
158
+ },
159
+
160
+
127
161
  //#ifdef H5
128
162
  /**
129
163
  * @description 点击删除操作按钮
@@ -145,8 +179,8 @@ export default {
145
179
  //#ifdef H5
146
180
  if (this.active) return;
147
181
  this.active = true;
148
- let AttrObj = this.$xdUniHelper.checkVarType(Attr) === 'object' ?
149
- Attr: { style: [], advanced: [], content: []};
182
+ let AttrObj = this.$xdUniHelper.checkVarType(this.Attr) === 'object' ?
183
+ this.Attr : { style: [], advanced: [], content: []};
150
184
  console.log('handleSelect.Attr', AttrObj);
151
185
 
152
186
  //设置已绑定数据
@@ -161,7 +195,7 @@ export default {
161
195
  XdBus.send('onSelectPackage', {
162
196
  containerId: this.containerId,
163
197
  Attr: AttrObj,
164
- container: this.container
198
+ container: this.$xdUniHelper.cloneDeep(this.container)
165
199
  });
166
200
 
167
201
  //绑定选中插件事件
@@ -92,9 +92,20 @@ export default {
92
92
  isEditx: true, //当前为Editx模式
93
93
  edit: false, //是否开启编辑模式
94
94
  // #endif
95
+
96
+ //风格键
97
+ mainColor: '',
98
+ successColor: '',
99
+ warningColor: '',
100
+ subMainColor: '',
101
+ infoColor: '',
102
+ defaultColor: '',
103
+ dangerColor: ''
95
104
  }
96
105
  },
97
106
  created() {
107
+
108
+
98
109
  //设置插件cid
99
110
  if (this.cid) {
100
111
  this.containerId = this.cid;
@@ -102,6 +113,9 @@ export default {
102
113
  this.containerId = this.$xdUniHelper.randomChar(20);
103
114
  }
104
115
 
116
+ //初始化风格
117
+ this.initThemesToData();
118
+
105
119
  //#ifdef H5
106
120
  //监听用户点击状态显示虚框
107
121
  XdBus.addEvent('select', ({containerId}) => {
@@ -124,6 +138,26 @@ export default {
124
138
  onCheck() {
125
139
  },
126
140
 
141
+ /***
142
+ * @description 业务组件风格map到data中
143
+ */
144
+ initThemesToData() {
145
+ Object.keys(this.styles).map(key => {
146
+ let k = key.replace('$', '');
147
+ if (this[k] !== undefined) this[k] = this.styles[key];
148
+ });
149
+ console.log('initThemesToData',this)
150
+ },
151
+
152
+ /**
153
+ * @description 其子级插件获取当前插件的业务组件风格列表
154
+ * @returns {*}
155
+ */
156
+ getParentThemes(){
157
+ return this.styles;
158
+ },
159
+
160
+
127
161
  //#ifdef H5
128
162
  /**
129
163
  * @description 点击删除操作按钮
@@ -145,8 +179,8 @@ export default {
145
179
  //#ifdef H5
146
180
  if (this.active) return;
147
181
  this.active = true;
148
- let AttrObj = this.$xdUniHelper.checkVarType(Attr) === 'object' ?
149
- Attr: { style: [], advanced: [], content: []};
182
+ let AttrObj = this.$xdUniHelper.checkVarType(this.Attr) === 'object' ?
183
+ this.Attr : { style: [], advanced: [], content: []};
150
184
  console.log('handleSelect.Attr', AttrObj);
151
185
 
152
186
  //设置已绑定数据
@@ -161,7 +195,7 @@ export default {
161
195
  XdBus.send('onSelectPackage', {
162
196
  containerId: this.containerId,
163
197
  Attr: AttrObj,
164
- container: this.container
198
+ container: this.$xdUniHelper.cloneDeep(this.container)
165
199
  });
166
200
 
167
201
  //绑定选中插件事件
@@ -92,9 +92,20 @@ export default {
92
92
  isEditx: true, //当前为Editx模式
93
93
  edit: false, //是否开启编辑模式
94
94
  // #endif
95
+
96
+ //风格键
97
+ mainColor: '',
98
+ successColor: '',
99
+ warningColor: '',
100
+ subMainColor: '',
101
+ infoColor: '',
102
+ defaultColor: '',
103
+ dangerColor: ''
95
104
  }
96
105
  },
97
106
  created() {
107
+
108
+
98
109
  //设置插件cid
99
110
  if (this.cid) {
100
111
  this.containerId = this.cid;
@@ -102,6 +113,9 @@ export default {
102
113
  this.containerId = this.$xdUniHelper.randomChar(20);
103
114
  }
104
115
 
116
+ //初始化风格
117
+ this.initThemesToData();
118
+
105
119
  //#ifdef H5
106
120
  //监听用户点击状态显示虚框
107
121
  XdBus.addEvent('select', ({containerId}) => {
@@ -124,6 +138,26 @@ export default {
124
138
  onCheck() {
125
139
  },
126
140
 
141
+ /***
142
+ * @description 业务组件风格map到data中
143
+ */
144
+ initThemesToData() {
145
+ Object.keys(this.styles).map(key => {
146
+ let k = key.replace('$', '');
147
+ if (this[k] !== undefined) this[k] = this.styles[key];
148
+ });
149
+ console.log('initThemesToData',this)
150
+ },
151
+
152
+ /**
153
+ * @description 其子级插件获取当前插件的业务组件风格列表
154
+ * @returns {*}
155
+ */
156
+ getParentThemes(){
157
+ return this.styles;
158
+ },
159
+
160
+
127
161
  //#ifdef H5
128
162
  /**
129
163
  * @description 点击删除操作按钮
@@ -145,8 +179,8 @@ export default {
145
179
  //#ifdef H5
146
180
  if (this.active) return;
147
181
  this.active = true;
148
- let AttrObj = this.$xdUniHelper.checkVarType(Attr) === 'object' ?
149
- Attr: { style: [], advanced: [], content: []};
182
+ let AttrObj = this.$xdUniHelper.checkVarType(this.Attr) === 'object' ?
183
+ this.Attr : { style: [], advanced: [], content: []};
150
184
  console.log('handleSelect.Attr', AttrObj);
151
185
 
152
186
  //设置已绑定数据
@@ -161,7 +195,7 @@ export default {
161
195
  XdBus.send('onSelectPackage', {
162
196
  containerId: this.containerId,
163
197
  Attr: AttrObj,
164
- container: this.container
198
+ container: this.$xdUniHelper.cloneDeep(this.container)
165
199
  });
166
200
 
167
201
  //绑定选中插件事件