jufubao-base 1.0.0
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/README.md +27 -0
- package/build.json.tpl +103 -0
- package/package.json +117 -0
- package/src/components/JfbBaseBaidu/JfbBaseBaidu.vue +74 -0
- package/src/components/JfbBaseNumber/Api.js +27 -0
- package/src/components/JfbBaseNumber/Attr.js +150 -0
- package/src/components/JfbBaseNumber/JfbBaseNumber.vue +78 -0
- package/src/components/JfbBaseUnit/JfbBaseUnit.vue +74 -0
package/README.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# gxd-uni
|
|
2
|
+
```text
|
|
3
|
+
1、自定义uni-app组件功能,支持h5,mp-weixin平台已自测(竖屏),(文档尚未完善),
|
|
4
|
+
2、根据自己的项目需要持续更新。
|
|
5
|
+
3、提bug或者需要技术交流加:QQ:149648746 微信:15110208397
|
|
6
|
+
4、预览地址:http://uni.e56buy.com/
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## 安装
|
|
11
|
+
```
|
|
12
|
+
npm i gxd-uni-commands --save --registry https://registry.npm.taobao.org
|
|
13
|
+
|
|
14
|
+
#在package.json文件中加入拷贝脚本
|
|
15
|
+
|
|
16
|
+
"scripts": {
|
|
17
|
+
...
|
|
18
|
+
"init.commands": "cp -rf ./node_modules/gxd-uni-commands/build ./",
|
|
19
|
+
"init.entry": "node ./build/commands/entry.init.js"
|
|
20
|
+
...
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
npm run init.commands //拷贝命令行
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
|
package/build.json.tpl
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
{
|
|
2
|
+
"apps": [
|
|
3
|
+
{
|
|
4
|
+
"app_id": "jufubao_base",
|
|
5
|
+
"app_name": "聚福宝业务组件基础插件包",
|
|
6
|
+
"app_version": "1.0.0",
|
|
7
|
+
"parameters": {
|
|
8
|
+
"key1": "value1",
|
|
9
|
+
"key2": "value2"
|
|
10
|
+
},
|
|
11
|
+
"package_json": {
|
|
12
|
+
"dependencies": { },
|
|
13
|
+
"devDependencies": { }
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"app_id": "jufubao_store",
|
|
18
|
+
"app_name": "聚福宝商城业务组件包",
|
|
19
|
+
"app_version": "1.0.0",
|
|
20
|
+
"parameters": {
|
|
21
|
+
"key1": "value1",
|
|
22
|
+
"key2": "value2"
|
|
23
|
+
},
|
|
24
|
+
"package_json": {
|
|
25
|
+
"dependencies": {},
|
|
26
|
+
"devDependencies": {}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"routers": [
|
|
31
|
+
{
|
|
32
|
+
"package": "body",
|
|
33
|
+
"pages": [
|
|
34
|
+
{
|
|
35
|
+
"page_id": "00ebc41e-7db4-4253-b012-dadd752f788c",
|
|
36
|
+
"page_name_en": "index",
|
|
37
|
+
"page_name": "首页",
|
|
38
|
+
"page": "body/index/index",
|
|
39
|
+
"components":[
|
|
40
|
+
{
|
|
41
|
+
"id": "jufubao-01",
|
|
42
|
+
"name": "JfbBaseNumber",
|
|
43
|
+
"attrs": {
|
|
44
|
+
"key1": "value1"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": "jufubao-02",
|
|
49
|
+
"name": "JfbBaseNumber",
|
|
50
|
+
"attrs": {
|
|
51
|
+
"key2": "value2"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"page_id": "00ebc41e-7db4-4253-b012-dadd752f7891",
|
|
58
|
+
"page_name_en": "type",
|
|
59
|
+
"page_name": "产品分类",
|
|
60
|
+
"page": "body/type/type",
|
|
61
|
+
"components": [
|
|
62
|
+
{
|
|
63
|
+
"id": "jufubao-01",
|
|
64
|
+
"name": "JfbBaseNumber",
|
|
65
|
+
"attrs": {
|
|
66
|
+
"key1": "value1"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"id": "jufubao-02",
|
|
71
|
+
"name": "JfbBaseNumber",
|
|
72
|
+
"attrs": {
|
|
73
|
+
"key2": "value2"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"page_id": "00ebc41e-7db4-4253-b012-dadd752f7887",
|
|
80
|
+
"page_name_en": "my",
|
|
81
|
+
"page_name": "我的",
|
|
82
|
+
"page": "body/my/my",
|
|
83
|
+
"components": [
|
|
84
|
+
{
|
|
85
|
+
"id": "jufubao-01",
|
|
86
|
+
"name": "JfbBaseNumber",
|
|
87
|
+
"attrs": {
|
|
88
|
+
"key1": "value1"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"id": "jufubao-02",
|
|
93
|
+
"name": "JfbBaseNumber",
|
|
94
|
+
"attrs": {
|
|
95
|
+
"key2": "value2"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "jufubao-base",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "聚福宝基础框架",
|
|
6
|
+
"main": "index.js",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"serve": "cross-env type=test cross-env NODE_ENV=development UNI_PLATFORM=h5 npm run init.entry && npm run dev:h5",
|
|
9
|
+
"test": "cross-env type=test cross-env NODE_ENV=development UNI_PLATFORM=h5 npm run init.entry && npm run dev:h5",
|
|
10
|
+
"dev": "cross-env type=test cross-env NODE_ENV=development UNI_PLATFORM=h5 npm run init.entry && npm run dev:h5",
|
|
11
|
+
"build": "cross-env type=build cross-env NODE_ENV=production UNI_PLATFORM=h5 npm run init.entry && npm run build:h5",
|
|
12
|
+
"dev:app-plus": "cross-env NODE_ENV=development UNI_PLATFORM=app-plus vue-cli-service uni-build --watch",
|
|
13
|
+
"dev:mp-weixin": "cross-env NODE_ENV=development UNI_PLATFORM=mp-weixin vue-cli-service uni-build --watch --minimize",
|
|
14
|
+
"dev:h5": "cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve",
|
|
15
|
+
"build:app-plus": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus vue-cli-service uni-build",
|
|
16
|
+
"build:mp-weixin": "cross-env NODE_ENV=production UNI_PLATFORM=mp-weixin vue-cli-service uni-build --minimize",
|
|
17
|
+
"build:h5": "cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build",
|
|
18
|
+
"init.commands": "cp -rf ./node_modules/gxd-uni-commands/build ./",
|
|
19
|
+
"init.entry": "node ./build/commands/entry.init.js",
|
|
20
|
+
"init": "node ./build/commands/copy.init.js",
|
|
21
|
+
"copy": "cross-env isOpenDir=true node build/commands/copy.js",
|
|
22
|
+
"oss": "cross-env bucket=xxx region=oss-cn-beijing name=基础项目 node ./build/commands/oss.js",
|
|
23
|
+
"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
|
+
"update.package": "node ./build/commands/update.package.js",
|
|
29
|
+
"publish.package": "node ./commands/npmignore && npm publish",
|
|
30
|
+
"create.pack": "node ./commands/create.pack.js"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@dcloudio/uni-app-plus": "2.0.1-33920220208001",
|
|
34
|
+
"@dcloudio/uni-h5": "2.0.1-33920220208001",
|
|
35
|
+
"@dcloudio/uni-helper-json": "*",
|
|
36
|
+
"@dcloudio/uni-i18n": "2.0.1-33920220208001",
|
|
37
|
+
"@dcloudio/uni-mp-360": "2.0.1-33920220208001",
|
|
38
|
+
"@dcloudio/uni-mp-alipay": "2.0.1-33920220208001",
|
|
39
|
+
"@dcloudio/uni-mp-baidu": "2.0.1-33920220208001",
|
|
40
|
+
"@dcloudio/uni-mp-qq": "2.0.1-33920220208001",
|
|
41
|
+
"@dcloudio/uni-mp-toutiao": "2.0.1-33920220208001",
|
|
42
|
+
"@dcloudio/uni-mp-vue": "2.0.1-33920220208001",
|
|
43
|
+
"@dcloudio/uni-mp-weixin": "2.0.1-33920220208001",
|
|
44
|
+
"@dcloudio/uni-quickapp-native": "2.0.1-33920220208001",
|
|
45
|
+
"@dcloudio/uni-quickapp-webview": "2.0.1-33920220208001",
|
|
46
|
+
"@dcloudio/uni-stat": "2.0.1-33920220208001",
|
|
47
|
+
"@vue/shared": "^3.0.0",
|
|
48
|
+
"color": "^3.1.3",
|
|
49
|
+
"core-js": "^2.6.5",
|
|
50
|
+
"flyio": "^0.6.2",
|
|
51
|
+
"gxd-uni-commands": "1.0.20",
|
|
52
|
+
"gxd-uni-library": "1.0.22",
|
|
53
|
+
"jweixin-module": "^1.6.0",
|
|
54
|
+
"md5": "^2.3.0",
|
|
55
|
+
"qs": "^6.9.6",
|
|
56
|
+
"regenerator-runtime": "^0.12.1",
|
|
57
|
+
"vue": "^2.6.10",
|
|
58
|
+
"vue-clipboard2": "^0.3.1",
|
|
59
|
+
"vuex": "^3.2.0"
|
|
60
|
+
},
|
|
61
|
+
"repository": {
|
|
62
|
+
"type": "git",
|
|
63
|
+
"url": "git@gitee.com:e56buy/xd-uni.git"
|
|
64
|
+
},
|
|
65
|
+
"homepage": "http://uni.e56buy.com/",
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@dcloudio/types": "*",
|
|
68
|
+
"@dcloudio/uni-automator": "2.0.1-33920220208001",
|
|
69
|
+
"@dcloudio/uni-cli-i18n": "2.0.1-33920220208001",
|
|
70
|
+
"@dcloudio/uni-cli-shared": "2.0.1-33920220208001",
|
|
71
|
+
"@dcloudio/uni-migration": "2.0.1-33920220208001",
|
|
72
|
+
"@dcloudio/uni-template-compiler": "2.0.1-33920220208001",
|
|
73
|
+
"@dcloudio/vue-cli-plugin-hbuilderx": "2.0.1-33920220208001",
|
|
74
|
+
"@dcloudio/vue-cli-plugin-uni": "2.0.1-33920220208001",
|
|
75
|
+
"@dcloudio/vue-cli-plugin-uni-optimize": "2.0.1-33920220208001",
|
|
76
|
+
"@dcloudio/webpack-uni-mp-loader": "2.0.1-33920220208001",
|
|
77
|
+
"@dcloudio/webpack-uni-pages-loader": "2.0.1-33920220208001",
|
|
78
|
+
"@types/uni-app": "*",
|
|
79
|
+
"@vue/cli-plugin-babel": "^3.12.0",
|
|
80
|
+
"@vue/cli-service": "^3.12.0",
|
|
81
|
+
"babel-plugin-import": "^1.11.0",
|
|
82
|
+
"cross-env": "^7.0.2",
|
|
83
|
+
"jest": "^25.4.0",
|
|
84
|
+
"less": "^3.12.2",
|
|
85
|
+
"less-loader": "^7.0.1",
|
|
86
|
+
"mini-css-extract-plugin": "^1.1.1",
|
|
87
|
+
"mini-types": "*",
|
|
88
|
+
"miniprogram-api-typings": "*",
|
|
89
|
+
"node-sass": "^4.0.0",
|
|
90
|
+
"postcss-comment": "^2.0.0",
|
|
91
|
+
"require-context": "^1.1.0",
|
|
92
|
+
"sass": "^1.29.0",
|
|
93
|
+
"sass-loader": "^8.0.2",
|
|
94
|
+
"sass-resources-loader": "^2.1.1",
|
|
95
|
+
"scss-loader": "0.0.1",
|
|
96
|
+
"uglifyjs-webpack-plugin": "^1.1.1",
|
|
97
|
+
"vue-template-compiler": "^2.6.10",
|
|
98
|
+
"uni-read-pages": "^1.0.5",
|
|
99
|
+
"webpack": "4.44.2",
|
|
100
|
+
"js-base64": "^2.6.4",
|
|
101
|
+
"progress": "^2.0.3",
|
|
102
|
+
"ali-oss": "^6.16.0",
|
|
103
|
+
"ejs": "^3.1.6",
|
|
104
|
+
"js-beautify": "^1.14.0",
|
|
105
|
+
"art-template": "^4.13.2",
|
|
106
|
+
"mockjs": "1.0.1-beta3",
|
|
107
|
+
"vue-baidu-map": "^0.21.22",
|
|
108
|
+
"copy-webpack-plugin": "5.1.2"
|
|
109
|
+
},
|
|
110
|
+
"browserslist": [
|
|
111
|
+
"Android >= 4",
|
|
112
|
+
"ios >= 8"
|
|
113
|
+
],
|
|
114
|
+
"uni-app": {
|
|
115
|
+
"scripts": {}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="jfb-base-baidu">
|
|
3
|
+
<!--#ifdef H5-->
|
|
4
|
+
<view class="jfb-base-baidu__edit">
|
|
5
|
+
<view class="jfb-base-baidu__edit-icon" @click="showEdit"></view>
|
|
6
|
+
</view>
|
|
7
|
+
<!-- #endif -->
|
|
8
|
+
<view class="jfb-base-baidu__body"></view>
|
|
9
|
+
</view>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
14
|
+
export default {
|
|
15
|
+
name: "JfbBaseBaidu",
|
|
16
|
+
components: {
|
|
17
|
+
XdFontIcon
|
|
18
|
+
},
|
|
19
|
+
data() {
|
|
20
|
+
return {
|
|
21
|
+
|
|
22
|
+
//#ifdef H5
|
|
23
|
+
Attr: {},
|
|
24
|
+
edit: false, //是否开启编辑模式
|
|
25
|
+
contentId: null, //容器ID
|
|
26
|
+
|
|
27
|
+
// #endif
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
created() {
|
|
31
|
+
|
|
32
|
+
//#ifdef H5
|
|
33
|
+
|
|
34
|
+
//监听Editx属性编辑模块视图发送变化接受时间
|
|
35
|
+
this.contentId = this.$xdUniHelper.randomChar(20);
|
|
36
|
+
XdBus.addEvent('attrViewChange', (contentId, data) => {
|
|
37
|
+
if (contentId !== this.contentId) this.edit = false
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
// #endif
|
|
41
|
+
},
|
|
42
|
+
methods: {
|
|
43
|
+
|
|
44
|
+
//#ifdef H5
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @description 点击视图编辑按钮发送Editx属性编辑面板
|
|
48
|
+
*/
|
|
49
|
+
showEdit() {
|
|
50
|
+
if (this.edit) return;
|
|
51
|
+
this.edit = true;
|
|
52
|
+
XdBus.send('attr', {
|
|
53
|
+
Attr: this.$xdUniHelper.cloneDeep(Attr),
|
|
54
|
+
contentId: this.contentId,
|
|
55
|
+
}, false, 'xd-iframe')
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
//#endif
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
</script>
|
|
63
|
+
|
|
64
|
+
<style scoped lang="less">
|
|
65
|
+
.jfb-base-baidu {
|
|
66
|
+
&__edit {
|
|
67
|
+
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&__body{
|
|
71
|
+
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
</style>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
module.exports = [
|
|
4
|
+
{
|
|
5
|
+
title: '获取电影广场列表',
|
|
6
|
+
path: '/api/account/film/list-film-square',
|
|
7
|
+
isRule: false,
|
|
8
|
+
params: {
|
|
9
|
+
last_key: ['当前页', 'Number', '必选'],
|
|
10
|
+
page_size: ['每页数量', 'Number', '必选'],
|
|
11
|
+
},
|
|
12
|
+
isConsole: true,
|
|
13
|
+
disabled: true,
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
title: '获取电影排期时间',
|
|
17
|
+
path: '/api/account/film/paiqi-date',
|
|
18
|
+
isRule: false,
|
|
19
|
+
resultKey: 'result',
|
|
20
|
+
params: {
|
|
21
|
+
film_id: ['电影id', 'Number', '必选'],
|
|
22
|
+
cinema_id: ['影院id', 'Number', '必选'],
|
|
23
|
+
},
|
|
24
|
+
isConsole: true,
|
|
25
|
+
disabled: true,
|
|
26
|
+
},
|
|
27
|
+
]
|
|
@@ -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
|
+
]
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="jfb-base-number">
|
|
3
|
+
<!--#ifdef H5-->
|
|
4
|
+
<view class="jfb-base-number__edit">
|
|
5
|
+
<view class="jfb-base-number__edit-icon" @click="showEdit"></view>
|
|
6
|
+
</view>
|
|
7
|
+
<!-- #endif -->
|
|
8
|
+
<view class="jfb-base-number__body"></view>
|
|
9
|
+
</view>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
// #ifdef H5
|
|
14
|
+
import Attr from "./Attr";
|
|
15
|
+
|
|
16
|
+
// #endif
|
|
17
|
+
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
18
|
+
export default {
|
|
19
|
+
name: "JfbBaseNumber",
|
|
20
|
+
components: {
|
|
21
|
+
XdFontIcon
|
|
22
|
+
},
|
|
23
|
+
data() {
|
|
24
|
+
return {
|
|
25
|
+
|
|
26
|
+
//#ifdef H5
|
|
27
|
+
Attr, //对外开发编辑属性
|
|
28
|
+
edit: false, //是否开启编辑模式
|
|
29
|
+
contentId: null, //容器ID
|
|
30
|
+
|
|
31
|
+
// #endif
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
created() {
|
|
35
|
+
|
|
36
|
+
//#ifdef H5
|
|
37
|
+
|
|
38
|
+
//监听Editx属性编辑模块视图发送变化接受时间
|
|
39
|
+
this.contentId = this.$xdUniHelper.randomChar(20);
|
|
40
|
+
XdBus.addEvent('attrViewChange', (contentId, data) => {
|
|
41
|
+
if (contentId !== this.contentId) this.edit = false
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
// #endif
|
|
45
|
+
},
|
|
46
|
+
methods: {
|
|
47
|
+
|
|
48
|
+
//#ifdef H5
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @description 点击视图编辑按钮发送Editx属性编辑面板
|
|
52
|
+
*/
|
|
53
|
+
showEdit() {
|
|
54
|
+
if (this.edit) return;
|
|
55
|
+
this.edit = true;
|
|
56
|
+
XdBus.send('attr', {
|
|
57
|
+
Attr: this.$xdUniHelper.cloneDeep(Attr),
|
|
58
|
+
contentId: this.contentId,
|
|
59
|
+
}, false, 'xd-iframe')
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
//#endif
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
</script>
|
|
67
|
+
|
|
68
|
+
<style scoped lang="less">
|
|
69
|
+
.jfb-base-number {
|
|
70
|
+
&__edit {
|
|
71
|
+
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&__body{
|
|
75
|
+
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
</style>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="jfb-base-unit">
|
|
3
|
+
<!--#ifdef H5-->
|
|
4
|
+
<view class="jfb-base-unit__edit">
|
|
5
|
+
<view class="jfb-base-unit__edit-icon" @click="showEdit"></view>
|
|
6
|
+
</view>
|
|
7
|
+
<!-- #endif -->
|
|
8
|
+
<view class="jfb-base-unit__body"></view>
|
|
9
|
+
</view>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
14
|
+
export default {
|
|
15
|
+
name: "JfbBaseUnit",
|
|
16
|
+
components: {
|
|
17
|
+
XdFontIcon
|
|
18
|
+
},
|
|
19
|
+
data() {
|
|
20
|
+
return {
|
|
21
|
+
|
|
22
|
+
//#ifdef H5
|
|
23
|
+
Attr: {},
|
|
24
|
+
edit: false, //是否开启编辑模式
|
|
25
|
+
contentId: null, //容器ID
|
|
26
|
+
|
|
27
|
+
// #endif
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
created() {
|
|
31
|
+
|
|
32
|
+
//#ifdef H5
|
|
33
|
+
|
|
34
|
+
//监听Editx属性编辑模块视图发送变化接受时间
|
|
35
|
+
this.contentId = this.$xdUniHelper.randomChar(20);
|
|
36
|
+
XdBus.addEvent('attrViewChange', (contentId, data) => {
|
|
37
|
+
if (contentId !== this.contentId) this.edit = false
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
// #endif
|
|
41
|
+
},
|
|
42
|
+
methods: {
|
|
43
|
+
|
|
44
|
+
//#ifdef H5
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @description 点击视图编辑按钮发送Editx属性编辑面板
|
|
48
|
+
*/
|
|
49
|
+
showEdit() {
|
|
50
|
+
if (this.edit) return;
|
|
51
|
+
this.edit = true;
|
|
52
|
+
XdBus.send('attr', {
|
|
53
|
+
Attr: this.$xdUniHelper.cloneDeep(Attr),
|
|
54
|
+
contentId: this.contentId,
|
|
55
|
+
}, false, 'xd-iframe')
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
//#endif
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
</script>
|
|
63
|
+
|
|
64
|
+
<style scoped lang="less">
|
|
65
|
+
.jfb-base-unit {
|
|
66
|
+
&__edit {
|
|
67
|
+
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&__body{
|
|
71
|
+
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
</style>
|