jufubao-base 1.0.9 → 1.0.11
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/commands.js +23 -0
- package/package.json +15 -13
- package/src/business/12121.png +0 -0
- package/src/business/base_download.png +0 -0
- package/src/business/base_icon_vip_3x.png +0 -0
- package/src/business/base_qr.png +0 -0
- package/src/components/JfbBaseBlock/Attr.js +42 -46
- package/src/components/JfbBaseBlock/JfbBaseBlock.vue +19 -34
- package/src/components/JfbBaseBlock/JfbBaseBlockLess.less +57 -0
- package/src/components/JfbBaseBlock/JfbBaseBlockMixin.js +66 -9
- package/src/components/JfbBaseCard/Api.js +34 -0
- package/src/components/JfbBaseCard/Attr.js +150 -0
- package/src/components/JfbBaseCard/JfbBaseCard.vue +473 -0
- package/src/components/JfbBaseCard/JfbBaseCardLess.less +57 -0
- package/src/components/JfbBaseCard/JfbBaseCardMixin.js +174 -0
- package/src/components/JfbBaseCardBind/Api.js +13 -0
- package/src/components/JfbBaseCardBind/Attr.js +150 -0
- package/src/components/JfbBaseCardBind/JfbBaseCardBind.vue +151 -0
- package/src/components/JfbBaseCardBind/JfbBaseCardBindLess.less +57 -0
- package/src/components/JfbBaseCardBind/JfbBaseCardBindMixin.js +174 -0
- package/src/components/JfbBaseCardDetail/Api.js +47 -0
- package/src/components/JfbBaseCardDetail/Attr.js +150 -0
- package/src/components/JfbBaseCardDetail/JfbBaseCardDetail.vue +546 -0
- package/src/components/JfbBaseCardDetail/JfbBaseCardDetailLess.less +57 -0
- package/src/components/JfbBaseCardDetail/JfbBaseCardDetailMixin.js +174 -0
- package/src/components/JfbBaseCardInfo/Api.js +71 -0
- package/src/components/JfbBaseCardInfo/Attr.js +150 -0
- package/src/components/JfbBaseCardInfo/JfbBaseCardInfo.vue +263 -0
- package/src/components/JfbBaseCardInfo/JfbBaseCardInfoLess.less +57 -0
- package/src/components/JfbBaseCardInfo/JfbBaseCardInfoMixin.js +174 -0
- package/src/components/JfbBaseCardMy/Api.js +60 -0
- package/src/components/JfbBaseCardMy/Attr.js +150 -0
- package/src/components/JfbBaseCardMy/JfbBaseCardMy.vue +220 -0
- package/src/components/JfbBaseCardMy/JfbBaseCardMyLess.less +57 -0
- package/src/components/JfbBaseCardMy/JfbBaseCardMyMixin.js +174 -0
- package/src/components/JfbBaseCardShift/Api.js +25 -0
- package/src/components/JfbBaseCardShift/Attr.js +150 -0
- package/src/components/JfbBaseCardShift/JfbBaseCardShift.vue +244 -0
- package/src/components/JfbBaseCardShift/JfbBaseCardShiftLess.less +57 -0
- package/src/components/JfbBaseCardShift/JfbBaseCardShiftMixin.js +174 -0
- package/src/components/JfbBaseLine/Attr.js +57 -114
- package/src/components/JfbBaseLine/JfbBaseLine.vue +32 -41
- package/src/components/JfbBaseLine/JfbBaseLineLess.less +57 -0
- package/src/components/JfbBaseLine/JfbBaseLineMixin.js +66 -9
- package/src/components/JfbBaseLogin/Api.js +124 -0
- package/src/components/JfbBaseLogin/Attr.js +21 -0
- package/src/components/JfbBaseLogin/JfbBaseLogin.vue +540 -0
- package/src/components/JfbBaseLogin/JfbBaseLoginLess.less +57 -0
- package/src/components/JfbBaseLogin/JfbBaseLoginMixin.js +174 -0
- package/src/components/JfbBaseSetPwd/Api.js +60 -0
- package/src/components/JfbBaseSetPwd/Attr.js +150 -0
- package/src/components/JfbBaseSetPwd/JfbBaseSetPwd.vue +207 -0
- package/src/components/JfbBaseSetPwd/JfbBaseSetPwdLess.less +57 -0
- package/src/components/JfbBaseSetPwd/JfbBaseSetPwdMixin.js +174 -0
- package/src/components/JfbBaseTestApi/Api.js +57 -0
- package/src/components/JfbBaseTestApi/Attr.js +45 -0
- package/src/components/JfbBaseTestApi/JfbBaseTestApi.vue +73 -0
- package/src/components/JfbBaseTestApi/JfbBaseTestApiLess.less +57 -0
- package/src/components/JfbBaseTestApi/JfbBaseTestApiMixin.js +174 -0
- package/src/components/JfbBaseTestBody/JfbBaseTestBody.vue +60 -0
- package/src/components/JfbBaseTestBody/JfbBaseTestBodyLess.less +57 -0
- package/src/components/JfbBaseTestBody/JfbBaseTestBodyMixin.js +166 -0
- package/src/components/JfbBaseTestBottom/JfbBaseTestBottom.vue +80 -0
- package/src/components/JfbBaseTestBottom/JfbBaseTestBottomLess.less +57 -0
- package/src/components/JfbBaseTestBottom/JfbBaseTestBottomMixin.js +166 -0
- package/src/components/JfbBaseTestTop/JfbBaseTestTop.vue +80 -0
- package/src/components/JfbBaseTestTop/JfbBaseTestTopLess.less +57 -0
- package/src/components/JfbBaseTestTop/JfbBaseTestTopMixin.js +166 -0
package/commands.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const path = require('path');
|
|
4
|
+
const clog = require('./build/clog');
|
|
5
|
+
const fileHelper = require('./build/fileHepler');
|
|
6
|
+
const fromBuildPath = path.resolve('./node_modules/gxd-uni-commands/build');
|
|
7
|
+
const toBuildPath = path.resolve('./build');
|
|
8
|
+
const fromCommandsPath = path.resolve('./node_modules/gxd-uni-commands/commands');
|
|
9
|
+
const toCommandsPath = path.resolve('./commands');
|
|
10
|
+
const utils = require('./build/lib/utils');
|
|
11
|
+
|
|
12
|
+
const init = ()=>{
|
|
13
|
+
utils.logsLine(clog, 'start');
|
|
14
|
+
fileHelper.copySync(fromBuildPath, toBuildPath);
|
|
15
|
+
fileHelper.copySync(fromCommandsPath, toCommandsPath);
|
|
16
|
+
clog(`拷贝命令行操作成功,目录:${toBuildPath}`, 'green');
|
|
17
|
+
clog(`拷贝命令行操作成功,目录:${toCommandsPath}`, 'green');
|
|
18
|
+
utils.logsLine(clog);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
init();
|
|
22
|
+
|
|
23
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jufubao-base",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "聚福宝业务组件基础插件包",
|
|
6
6
|
"main": "index.js",
|
|
@@ -9,6 +9,13 @@
|
|
|
9
9
|
"test": "cross-env type=test cross-env NODE_ENV=development UNI_PLATFORM=h5 npm run init.entry && npm run dev:h5",
|
|
10
10
|
"dev": "cross-env type=test cross-env NODE_ENV=development UNI_PLATFORM=h5 npm run init.entry && npm run dev:h5",
|
|
11
11
|
"build": "cross-env type=build cross-env NODE_ENV=production UNI_PLATFORM=h5 npm run init.entry && npm run build:h5",
|
|
12
|
+
"update": "node ./commands/update.pack.js",
|
|
13
|
+
"create": "node ./commands/create.pack.js",
|
|
14
|
+
"commands": "npm i && node ./commands.js",
|
|
15
|
+
"release": "node ./commands/npmignore && npm publish",
|
|
16
|
+
"upload.bus.static": "node ./build/commands/upload.business.static.js",
|
|
17
|
+
"init.entry": "node ./build/commands/entry.init.js",
|
|
18
|
+
"init": "node ./build/commands/copy.init.js",
|
|
12
19
|
"dev:app-plus": "cross-env NODE_ENV=development UNI_PLATFORM=app-plus vue-cli-service uni-build --watch",
|
|
13
20
|
"dev:mp-weixin": "cross-env NODE_ENV=development UNI_PLATFORM=mp-weixin vue-cli-service uni-build --watch --minimize",
|
|
14
21
|
"dev:h5": "cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve",
|
|
@@ -16,18 +23,11 @@
|
|
|
16
23
|
"build:mp-weixin": "cross-env NODE_ENV=production UNI_PLATFORM=mp-weixin vue-cli-service uni-build --minimize",
|
|
17
24
|
"build:h5": "cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build",
|
|
18
25
|
"init.commands": "cp -rf ./node_modules/gxd-uni-commands/build ./",
|
|
19
|
-
"init.
|
|
20
|
-
"init": "node ./build/commands/copy.init.js",
|
|
26
|
+
"init.editx": "node ./build/commands/editx.init.js",
|
|
21
27
|
"copy": "cross-env isOpenDir=true node build/commands/copy.js",
|
|
22
28
|
"oss": "cross-env bucket=xxx region=oss-cn-beijing name=基础项目 node ./build/commands/oss.js",
|
|
23
29
|
"oss.dev": "cross-env bucket=dev-xxx region=oss-cn-qingdao name=基础项目 node ./build/commands/oss.js",
|
|
24
|
-
"oss.test": "cross-env bucket=test-xxx region=oss-cn-qingdao name=基础项目 node ./build/commands/oss.js"
|
|
25
|
-
"coder": "node ./build/commands/coder.js",
|
|
26
|
-
"coder:page": "node ./build/commands/coder.page.js",
|
|
27
|
-
"init.editx": "node ./build/commands/editx.init.js",
|
|
28
|
-
"publish": "node ./commands/npmignore && npm publish",
|
|
29
|
-
"update.package": "node ./commands/update.pack.js",
|
|
30
|
-
"create.package": "node ./commands/create.pack.js"
|
|
30
|
+
"oss.test": "cross-env bucket=test-xxx region=oss-cn-qingdao name=基础项目 node ./build/commands/oss.js"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@dcloudio/uni-app-plus": "2.0.1-33920220208001",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"color": "^3.1.3",
|
|
49
49
|
"core-js": "^2.6.5",
|
|
50
50
|
"flyio": "^0.6.2",
|
|
51
|
-
"gxd-uni-commands": "1.0.
|
|
52
|
-
"gxd-uni-library": "1.0.
|
|
51
|
+
"gxd-uni-commands": "1.0.29",
|
|
52
|
+
"gxd-uni-library": "1.0.39",
|
|
53
53
|
"jweixin-module": "^1.6.0",
|
|
54
54
|
"md5": "^2.3.0",
|
|
55
55
|
"qs": "^6.9.6",
|
|
@@ -105,7 +105,9 @@
|
|
|
105
105
|
"art-template": "^4.13.2",
|
|
106
106
|
"mockjs": "1.0.1-beta3",
|
|
107
107
|
"vue-baidu-map": "^0.21.22",
|
|
108
|
-
"copy-webpack-plugin": "5.1.2"
|
|
108
|
+
"copy-webpack-plugin": "5.1.2",
|
|
109
|
+
"copy-dir": "^1.3.0",
|
|
110
|
+
"md5": "^2.3.0"
|
|
109
111
|
},
|
|
110
112
|
"browserslist": [
|
|
111
113
|
"Android >= 4",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,48 +1,44 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
export default
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
disabled: true,
|
|
46
|
-
backValueType: 2,
|
|
47
|
-
},
|
|
48
|
-
]
|
|
3
|
+
export default {
|
|
4
|
+
style: [],
|
|
5
|
+
advanced: [],
|
|
6
|
+
content: [
|
|
7
|
+
{
|
|
8
|
+
label: '背景颜色:', //label
|
|
9
|
+
ele: 'xd-board-color', //package 名称
|
|
10
|
+
valueKey: 'bgcolor', //form[valueKey]
|
|
11
|
+
value: '', //v-model
|
|
12
|
+
placeholder: '请输入占位框背景颜色',
|
|
13
|
+
classNmae: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
|
|
14
|
+
rules: [
|
|
15
|
+
{
|
|
16
|
+
required: true,
|
|
17
|
+
message: '请输入占位框背景颜色',
|
|
18
|
+
trigger: 'blur'
|
|
19
|
+
},
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
label: '高度:', //label
|
|
24
|
+
ele: 'el-input', //package 名称
|
|
25
|
+
type: 'number',
|
|
26
|
+
valueKey: 'height', //form[valueKey]
|
|
27
|
+
value: null, //v-model
|
|
28
|
+
placeholder: '请输入占位框高度,单位像素,默认:10px',
|
|
29
|
+
classNmae: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
|
|
30
|
+
rules: [
|
|
31
|
+
{
|
|
32
|
+
required: true,
|
|
33
|
+
message: '请输入占位框高度',
|
|
34
|
+
trigger: 'blur'
|
|
35
|
+
},
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
label: '', //label
|
|
40
|
+
ele: 'slot', //package 名称
|
|
41
|
+
slot: 'is_reference',
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
};
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
</view>
|
|
15
15
|
<!-- #endif -->
|
|
16
16
|
<view class="jfb-base-block__body">
|
|
17
|
-
<view :style="{height: height * 2 + 'rpx', background:
|
|
17
|
+
<view :style="{height: height * 2 + 'rpx', background: bgcolor}"></view>
|
|
18
18
|
</view>
|
|
19
19
|
</view>
|
|
20
20
|
</template>
|
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
24
24
|
import { jfbRootExec } from "@/utils/xd.event";
|
|
25
25
|
import JfbBaseBlockMixin from "./JfbBaseBlockMixin";
|
|
26
|
+
import {getContainerPropsValue} from "@/utils/xd.base";
|
|
27
|
+
|
|
26
28
|
export default {
|
|
27
29
|
name: "JfbBaseBlock",
|
|
28
30
|
components: {
|
|
@@ -33,51 +35,34 @@
|
|
|
33
35
|
],
|
|
34
36
|
data() {
|
|
35
37
|
return {
|
|
36
|
-
height:
|
|
37
|
-
|
|
38
|
+
height: 10,
|
|
39
|
+
bgcolor: '#fff'
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
watch: {
|
|
43
|
+
container(value) {
|
|
44
|
+
this.init(value)
|
|
38
45
|
}
|
|
39
46
|
},
|
|
40
47
|
created() {
|
|
48
|
+
this.init(this.container);
|
|
41
49
|
},
|
|
42
50
|
methods: {
|
|
51
|
+
init(value) {
|
|
52
|
+
let bgcolor = getContainerPropsValue(value, 'content.bgcolor');
|
|
53
|
+
let height = getContainerPropsValue(value, 'content.height');
|
|
54
|
+
if (bgcolor) this.bgcolor = bgcolor;
|
|
55
|
+
if (height) this.height = height;
|
|
56
|
+
},
|
|
43
57
|
}
|
|
44
58
|
}
|
|
45
59
|
|
|
46
60
|
</script>
|
|
47
61
|
|
|
48
62
|
<style scoped lang="less">
|
|
49
|
-
.
|
|
50
|
-
border: 1px dashed rgba(0,0,0,0);
|
|
51
|
-
box-sizing: border-box;
|
|
52
|
-
|
|
53
|
-
&.editx {
|
|
54
|
-
position: relative;
|
|
55
|
-
border: 1px dashed red;
|
|
56
|
-
box-sizing: border-box;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
&__edit {
|
|
60
|
-
position: absolute;
|
|
61
|
-
right: unit(0, rpx);
|
|
62
|
-
top: unit(-52, rpx);
|
|
63
|
-
height: unit(50, rpx);
|
|
64
|
-
line-height: unit(50, rpx);
|
|
65
|
-
padding: 0 unit(20,rpx);
|
|
66
|
-
display: flex;
|
|
67
|
-
justify-content: center;
|
|
68
|
-
align-items: center;
|
|
69
|
-
background: rgba(0,0,0,.6);
|
|
70
|
-
border-radius: unit(10,rpx);
|
|
71
|
-
box-shadow: 0 0 10px rbga(0,0,0,0.3);
|
|
72
|
-
color: #fff;
|
|
73
|
-
font-size: unit(22,rpx);
|
|
63
|
+
@import "./JfbBaseBlockLess.less";
|
|
74
64
|
|
|
75
|
-
|
|
76
|
-
&.editx {
|
|
77
|
-
box-sizing: border-box;
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
}
|
|
65
|
+
.jfb-base-block {
|
|
81
66
|
|
|
82
67
|
&__body{
|
|
83
68
|
|
|
@@ -0,0 +1,57 @@
|
|
|
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-block {
|
|
16
|
+
border: 1px dashed rgba(0, 0, 0, 0);
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
|
|
19
|
+
&.editx {
|
|
20
|
+
position: relative;
|
|
21
|
+
border: 1px dashed blue;
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&:hover {
|
|
27
|
+
border: 1px dashed blue;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
&__edit {
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
position: absolute;
|
|
34
|
+
right: unit(0, rpx);
|
|
35
|
+
top: unit(-52, rpx);
|
|
36
|
+
height: unit(50, rpx);
|
|
37
|
+
line-height: unit(50, rpx);
|
|
38
|
+
display: flex;
|
|
39
|
+
justify-content: center;
|
|
40
|
+
align-items: center;
|
|
41
|
+
background: rgba(0, 0, 0, .6);
|
|
42
|
+
border-radius: unit(10, rpx);
|
|
43
|
+
box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
|
|
44
|
+
color: #fff;
|
|
45
|
+
font-size: unit(22, rpx);
|
|
46
|
+
|
|
47
|
+
&-icon{
|
|
48
|
+
padding: 0 unit(20, rpx);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&.editx {
|
|
52
|
+
box-sizing: border-box;
|
|
53
|
+
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
//end
|
|
@@ -4,52 +4,89 @@
|
|
|
4
4
|
import Attr from "./Attr";
|
|
5
5
|
//@EndAttrImport
|
|
6
6
|
|
|
7
|
+
import {getContainerPropsValue} from "@/utils/xd.base";
|
|
7
8
|
export default {
|
|
8
9
|
props: {
|
|
10
|
+
/**
|
|
11
|
+
* @description 插件在页面中到唯一ID
|
|
12
|
+
*/
|
|
9
13
|
cid:{
|
|
10
14
|
type: null|String|Number,
|
|
11
15
|
default: null,
|
|
12
16
|
},
|
|
17
|
+
/**
|
|
18
|
+
* @description 业务插件相关数据集合
|
|
19
|
+
*/
|
|
20
|
+
container:{
|
|
21
|
+
type: Object,
|
|
22
|
+
default() {
|
|
23
|
+
return {}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
/**
|
|
27
|
+
* @description 页面框架属性
|
|
28
|
+
*/
|
|
13
29
|
layoutInfo: {
|
|
14
30
|
type: Object,
|
|
15
31
|
default() {
|
|
16
32
|
return {}
|
|
17
33
|
}
|
|
18
34
|
},
|
|
19
|
-
|
|
35
|
+
/**
|
|
36
|
+
* @description 页面属性
|
|
37
|
+
*/
|
|
38
|
+
pageAttr: {
|
|
20
39
|
type: Object,
|
|
21
40
|
default() {
|
|
22
41
|
return {}
|
|
23
42
|
}
|
|
24
43
|
},
|
|
25
|
-
|
|
44
|
+
/**
|
|
45
|
+
* @description 业务插件元素属性(插件管理时候填写属性)
|
|
46
|
+
*/
|
|
47
|
+
componentAttr: {
|
|
26
48
|
type: Object|Array,
|
|
27
49
|
default() {
|
|
28
50
|
return {}
|
|
29
51
|
}
|
|
30
52
|
},
|
|
31
|
-
|
|
53
|
+
/**
|
|
54
|
+
* @description 业务插件所属插件库属性(业务插件库)
|
|
55
|
+
*/
|
|
56
|
+
appAttr: {
|
|
32
57
|
type: Object|Array,
|
|
33
58
|
default() {
|
|
34
59
|
return {}
|
|
35
60
|
}
|
|
36
61
|
},
|
|
62
|
+
/**
|
|
63
|
+
* @description 项目配置
|
|
64
|
+
*/
|
|
37
65
|
settings: {
|
|
38
66
|
type: Object,
|
|
39
67
|
default() {
|
|
40
68
|
return {}
|
|
41
69
|
}
|
|
70
|
+
},
|
|
71
|
+
/**
|
|
72
|
+
* @description 业务插件库所用风格属性
|
|
73
|
+
*/
|
|
74
|
+
styles: {
|
|
75
|
+
type: Object || null,
|
|
76
|
+
default() {
|
|
77
|
+
return {}
|
|
78
|
+
}
|
|
42
79
|
}
|
|
43
80
|
},
|
|
44
81
|
data() {
|
|
45
82
|
return {
|
|
46
83
|
containerId: null, //容器ID
|
|
47
84
|
//#ifdef H5
|
|
48
|
-
|
|
85
|
+
|
|
49
86
|
//@AttrData
|
|
50
87
|
Attr, //对外开发编辑属性
|
|
51
88
|
//@EndAttrData
|
|
52
|
-
|
|
89
|
+
|
|
53
90
|
active: false, //是否选择当前状态
|
|
54
91
|
isEditx: true, //当前为Editx模式
|
|
55
92
|
edit: false, //是否开启编辑模式
|
|
@@ -63,13 +100,19 @@ export default {
|
|
|
63
100
|
} else {
|
|
64
101
|
this.containerId = this.$xdUniHelper.randomChar(20);
|
|
65
102
|
}
|
|
66
|
-
console.log('created',this.containerId, this.cid)
|
|
67
103
|
|
|
68
104
|
//#ifdef H5
|
|
69
105
|
//监听用户点击状态显示虚框
|
|
70
106
|
XdBus.addEvent('select', ({containerId}) => {
|
|
71
107
|
this.active = containerId === this.containerId;
|
|
72
108
|
});
|
|
109
|
+
|
|
110
|
+
//业务面板选中插件操作
|
|
111
|
+
XdBus.addEvent('onBoardSelect', ({containerId}) => {
|
|
112
|
+
if (containerId === this.containerId) {
|
|
113
|
+
this.handleSelect()
|
|
114
|
+
}
|
|
115
|
+
});
|
|
73
116
|
// #endif
|
|
74
117
|
},
|
|
75
118
|
methods: {
|
|
@@ -88,7 +131,8 @@ export default {
|
|
|
88
131
|
XdBus.send('onDelPackage', {
|
|
89
132
|
containerId: this.containerId,
|
|
90
133
|
componentAtrr: this.componentAtrr,
|
|
91
|
-
cid: this.cid
|
|
134
|
+
cid: this.cid,
|
|
135
|
+
container: this.container
|
|
92
136
|
})
|
|
93
137
|
},
|
|
94
138
|
//#endif
|
|
@@ -100,12 +144,25 @@ export default {
|
|
|
100
144
|
//#ifdef H5
|
|
101
145
|
if (this.active) return;
|
|
102
146
|
this.active = true;
|
|
103
|
-
|
|
147
|
+
let AttrObj = this.$xdUniHelper.checkVarType(Attr) === 'object' ?
|
|
148
|
+
Attr: { style: [], advanced: [], content: []};
|
|
149
|
+
console.log('handleSelect.Attr', AttrObj);
|
|
150
|
+
|
|
151
|
+
//设置已绑定数据
|
|
152
|
+
Object.keys(AttrObj).map(type=>{
|
|
153
|
+
AttrObj[type].map(item=>{
|
|
154
|
+
item.value = getContainerPropsValue(this.container, `${type}.${item.valueKey}`, item.value);
|
|
155
|
+
})
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
//发送点击组件事件
|
|
104
159
|
XdBus.send('onSelectPackage', {
|
|
105
160
|
containerId: this.containerId,
|
|
106
|
-
Attr:
|
|
161
|
+
Attr: AttrObj,
|
|
162
|
+
container: this.container
|
|
107
163
|
});
|
|
108
164
|
|
|
165
|
+
//绑定选中插件事件
|
|
109
166
|
XdBus.message('select', {
|
|
110
167
|
containerId: this.containerId,
|
|
111
168
|
})
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @description API模型
|
|
5
|
+
* 建议:Ffff=>模块 Xxxx=>自定义名字
|
|
6
|
+
* 获取单记录(getByIdFfffXxxx)
|
|
7
|
+
* 获取列表记录(getByListFfffXxxx)
|
|
8
|
+
* 添加列表记录(addFfffXxxxx)
|
|
9
|
+
* 删除列表记录(removeFfffXxxxx|deleteFfffXxxx)
|
|
10
|
+
* 更新列表记录(updateFfffXxxxx)
|
|
11
|
+
* @type {*[]}
|
|
12
|
+
*/
|
|
13
|
+
module.exports = [
|
|
14
|
+
{
|
|
15
|
+
mapFnName: 'getListCardBind', //自定义方法名字(必选)
|
|
16
|
+
isRule: false,
|
|
17
|
+
title: '获得绑定卡',
|
|
18
|
+
prefix: 'list',
|
|
19
|
+
path: '/card/v1/card-bind/list-bind-card',
|
|
20
|
+
params: {},
|
|
21
|
+
disabled: true,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
mapFnName: 'loginCardBind', //自定义方法名字(必选)
|
|
25
|
+
isRule: false,
|
|
26
|
+
title: '登录卡',
|
|
27
|
+
prefix: 'login',
|
|
28
|
+
path: '/card/v1/card-bind/login-card',
|
|
29
|
+
data: {
|
|
30
|
+
card_number: ['卡号', 'String', '必选'],
|
|
31
|
+
},
|
|
32
|
+
disabled: true,
|
|
33
|
+
},
|
|
34
|
+
];
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
export default [
|
|
4
|
+
//文本信息
|
|
5
|
+
{
|
|
6
|
+
label: '标题名称:', //label
|
|
7
|
+
ele: 'el-input', //package 名称
|
|
8
|
+
type: 'text',
|
|
9
|
+
valueKey: 'title', //form[valueKey]
|
|
10
|
+
value: '', //v-model
|
|
11
|
+
placeholder: '请输入标题名称',
|
|
12
|
+
classNmae: 'input40', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
|
|
13
|
+
disabled: true,
|
|
14
|
+
rules: [
|
|
15
|
+
{
|
|
16
|
+
required: true,
|
|
17
|
+
type: 'url',
|
|
18
|
+
message: '请输入域名地址',
|
|
19
|
+
trigger: 'blur'
|
|
20
|
+
},
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
//远程获取内容选择
|
|
25
|
+
{
|
|
26
|
+
label: '跳转路径:', //label
|
|
27
|
+
ele: 'xd-select-list', //package 名称
|
|
28
|
+
valueKey: 'jumpToLink', //form[valueKey]
|
|
29
|
+
value: '', //v-model
|
|
30
|
+
placeholder: '请选择加盟商',
|
|
31
|
+
multiple: false, //多选
|
|
32
|
+
collapseTags: false,
|
|
33
|
+
remoteApi: '/api/editx/pages',
|
|
34
|
+
remote: true,
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
//本地固定内容选择
|
|
38
|
+
{
|
|
39
|
+
label: '选择内容:', //label
|
|
40
|
+
ele: 'xd-select-list', //package 名称
|
|
41
|
+
valueKey: 'select', //form[valueKey]
|
|
42
|
+
value: '', //v-model
|
|
43
|
+
placeholder: '请选择选择内容',
|
|
44
|
+
multiple: false, //多选
|
|
45
|
+
remote: false,
|
|
46
|
+
list: [
|
|
47
|
+
{"label": "订单详情", "value": '/main/order/order'},
|
|
48
|
+
{"label": "购物车详情", "value": '/main/cart/cart'},
|
|
49
|
+
{"label": "商品详情", "value": '/main/product/product'},
|
|
50
|
+
{"label": "商品分类", "value": '/main/producttype/producttype'},
|
|
51
|
+
],
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
//本地固定单选选择
|
|
55
|
+
{
|
|
56
|
+
label: '单选列表(固定):', //label
|
|
57
|
+
ele: 'xd-radio', //package 名称
|
|
58
|
+
valueKey: 'radio_status_list', //form[valueKey]
|
|
59
|
+
value: 6, //v-model
|
|
60
|
+
disabled: true,
|
|
61
|
+
rules: [
|
|
62
|
+
{required: true, message: '请选择', trigger: ['blur', 'change']}
|
|
63
|
+
],
|
|
64
|
+
list: [
|
|
65
|
+
{"label": "万利达集团", "value": 4},
|
|
66
|
+
{"label": "中国联通", "value": 5},
|
|
67
|
+
{"label": "中国移动", "value": 6},
|
|
68
|
+
{"label": "味多美", "value": 7},
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
//远程固定单选选择
|
|
73
|
+
{
|
|
74
|
+
label: '单选列表(固定):', //label
|
|
75
|
+
ele: 'xd-radio', //package 名称
|
|
76
|
+
valueKey: 'radio_status_list', //form[valueKey]
|
|
77
|
+
value: 6, //v-model
|
|
78
|
+
disabled: false,
|
|
79
|
+
remoteApi: '/api/editx/pages',
|
|
80
|
+
remote: true,
|
|
81
|
+
rules: [
|
|
82
|
+
{required: true, message: '请选择', trigger: ['blur', 'change']}
|
|
83
|
+
],
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
//本地固定多选选择
|
|
87
|
+
{
|
|
88
|
+
label: '多选列表(固定):', //label
|
|
89
|
+
ele: 'xd-check', //package 名称
|
|
90
|
+
valueKey: 'xd-check_list', //form[valueKey]
|
|
91
|
+
value: 6, //v-model
|
|
92
|
+
disabled: true,
|
|
93
|
+
rules: [
|
|
94
|
+
{required: true, message: '请选择', trigger: ['blur', 'change']}
|
|
95
|
+
],
|
|
96
|
+
list: [
|
|
97
|
+
{"label": "万利达集团", "value": 4},
|
|
98
|
+
{"label": "中国联通", "value": 5},
|
|
99
|
+
{"label": "中国移动", "value": 6},
|
|
100
|
+
{"label": "味多美", "value": 7},
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
|
|
104
|
+
//远程多选选选择
|
|
105
|
+
{
|
|
106
|
+
label: '多选列表:', //label
|
|
107
|
+
ele: 'xd-check', //package 名称
|
|
108
|
+
valueKey: 'xd-check_remote-list', //form[valueKey]
|
|
109
|
+
value: 6, //v-model
|
|
110
|
+
disabled: false,
|
|
111
|
+
remoteApi: '/api/editx/pages',
|
|
112
|
+
remote: true,
|
|
113
|
+
rules: [
|
|
114
|
+
{required: true, message: '请选择', trigger: ['blur', 'change']}
|
|
115
|
+
],
|
|
116
|
+
},
|
|
117
|
+
|
|
118
|
+
//状态(二选一)单选选择
|
|
119
|
+
{
|
|
120
|
+
label: '状态(二选一):', //label
|
|
121
|
+
ele: 'xd-radio-status', //package 名称
|
|
122
|
+
valueKey: 'radio_status', //form[valueKey]
|
|
123
|
+
value: 'Y', //v-model
|
|
124
|
+
isall: true,
|
|
125
|
+
disabled: true,
|
|
126
|
+
backValueType: '', //返回值类型 1=>返回(Y,N)2=> [true|false] 3=>[1,0] 4=>[1,2]
|
|
127
|
+
placeholder: '请选择',
|
|
128
|
+
list: 'status', //status=>状态 best=>推荐 associate=>关联 yes=>是否 open=> 是否开启 check=>审核
|
|
129
|
+
},
|
|
130
|
+
|
|
131
|
+
//文本信息
|
|
132
|
+
{
|
|
133
|
+
label: '标题名称:', //label
|
|
134
|
+
ele: 'el-input', //package 名称
|
|
135
|
+
type: 'text',
|
|
136
|
+
valueKey: 'title', //form[valueKey]
|
|
137
|
+
value: '', //v-model
|
|
138
|
+
placeholder: '请输入标题名称',
|
|
139
|
+
classNmae: 'input40', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
|
|
140
|
+
disabled: true,
|
|
141
|
+
rules: [
|
|
142
|
+
{
|
|
143
|
+
required: true,
|
|
144
|
+
type: 'url',
|
|
145
|
+
message: '请输入域名地址',
|
|
146
|
+
trigger: 'blur'
|
|
147
|
+
},
|
|
148
|
+
]
|
|
149
|
+
},
|
|
150
|
+
]
|