jufubao-base 1.0.20 → 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.
- package/package.json +1 -1
- package/src/components/JfbBaseAfterOrderList/Api.js +60 -0
- package/src/components/JfbBaseAfterOrderList/Attr.js +154 -0
- package/src/components/JfbBaseAfterOrderList/JfbBaseAfterOrderList.vue +203 -0
- package/src/components/JfbBaseAfterOrderList/JfbBaseAfterOrderListLess.less +57 -0
- package/src/components/JfbBaseAfterOrderList/JfbBaseAfterOrderListMixin.js +222 -0
- package/src/components/JfbBaseBlock/JfbBaseBlock.vue +20 -0
- package/src/components/JfbBaseBlock/JfbBaseBlockMixin.js +41 -3
- package/src/components/JfbBaseCard/JfbBaseCardMixin.js +41 -3
- package/src/components/JfbBaseCardBind/JfbBaseCardBindMixin.js +41 -3
- package/src/components/JfbBaseCardDetail/JfbBaseCardDetailMixin.js +41 -3
- package/src/components/JfbBaseCardInfo/JfbBaseCardInfoMixin.js +41 -3
- package/src/components/JfbBaseCardMy/JfbBaseCardMyMixin.js +41 -3
- package/src/components/JfbBaseCardShift/JfbBaseCardShiftMixin.js +41 -3
- package/src/components/JfbBaseFooter/JfbBaseFooterMixin.js +41 -3
- package/src/components/JfbBaseLine/JfbBaseLineMixin.js +41 -3
- package/src/components/JfbBaseLogin/JfbBaseLogin.vue +172 -51
- package/src/components/JfbBaseLogin/JfbBaseLoginMixin.js +41 -3
- package/src/components/JfbBaseMy/Api.js +60 -0
- package/src/components/JfbBaseMy/Attr.js +54 -0
- package/src/components/JfbBaseMy/JfbBaseMy.vue +262 -0
- package/src/components/JfbBaseMy/JfbBaseMyLess.less +57 -0
- package/src/components/JfbBaseMy/JfbBaseMyMixin.js +222 -0
- package/src/components/JfbBaseOrderList/Api.js +60 -0
- package/src/components/JfbBaseOrderList/Attr.js +154 -0
- package/src/components/JfbBaseOrderList/JfbBaseOrderList.vue +285 -0
- package/src/components/JfbBaseOrderList/JfbBaseOrderListLess.less +57 -0
- package/src/components/JfbBaseOrderList/JfbBaseOrderListMixin.js +222 -0
- package/src/components/JfbBaseSetPwd/JfbBaseSetPwdMixin.js +41 -3
- package/src/components/JfbBaseSuccess/JfbBaseSuccess.vue +51 -1
- package/src/components/JfbBaseSuccess/JfbBaseSuccessMixin.js +41 -3
- package/src/components/JfbBaseTestApi/JfbBaseTestApiMixin.js +41 -3
- package/src/components/JfbBaseTestBody/JfbBaseTestBodyMixin.js +36 -2
- package/src/components/JfbBaseTestBottom/JfbBaseTestBottomMixin.js +36 -2
- package/src/components/JfbBaseTestTop/JfbBaseTestTopMixin.js +36 -2
|
@@ -54,6 +54,26 @@
|
|
|
54
54
|
if (bgcolor) this.bgcolor = bgcolor;
|
|
55
55
|
if (height) this.height = height;
|
|
56
56
|
},
|
|
57
|
+
onJfbLoad(options) {
|
|
58
|
+
|
|
59
|
+
//#ifdef H5
|
|
60
|
+
//参考地址: https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/JS-SDK.html#0
|
|
61
|
+
jfbRootExec('getH5WxAuthorize', {
|
|
62
|
+
vm: this,
|
|
63
|
+
data: {
|
|
64
|
+
jsApiList: [], //可以不传,不传走系统默认
|
|
65
|
+
url: window.location.href //可以不传
|
|
66
|
+
},
|
|
67
|
+
})
|
|
68
|
+
.then(res => {
|
|
69
|
+
console.log('success', res)
|
|
70
|
+
})
|
|
71
|
+
.catch(error => {
|
|
72
|
+
console.error(error)
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
// #endif
|
|
76
|
+
},
|
|
57
77
|
}
|
|
58
78
|
}
|
|
59
79
|
|
|
@@ -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
|
//设置已绑定数据
|
|
@@ -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
|
//设置已绑定数据
|
|
@@ -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
|
//设置已绑定数据
|
|
@@ -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
|
//设置已绑定数据
|
|
@@ -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
|
//设置已绑定数据
|
|
@@ -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
|
//设置已绑定数据
|
|
@@ -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
|
//设置已绑定数据
|
|
@@ -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
|
//设置已绑定数据
|