bri-components 1.0.2 → 1.0.3
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/lib/0.bri-components.min.js +1 -1
- package/lib/1.bri-components.min.js +1 -1
- package/lib/3.bri-components.min.js +1 -1
- package/lib/4.bri-components.min.js +1 -1
- package/lib/5.bri-components.min.js +1 -1
- package/lib/bri-components.min.js +4 -4
- package/package.json +120 -119
- package/src/.DS_Store +0 -0
- package/src/components/controls/base/DshCascader.vue +1 -1
- package/src/components/controls/base/DshCascaderMultiple.vue +1 -1
- package/src/components/controls/base/DshCheckbox.vue +1 -1
- package/src/components/controls/base/DshSelect.vue +1 -1
- package/src/components/form/DshForm.vue +1 -25
- package/src/components/list/DshFlatTable.vue +7 -1
- package/src/components/list/ZTree.vue +5 -2
- package/src/index.js +10 -2
- package/src/utils/index.js +5 -0
- package/src/utils/table.js +1002 -0
- package/src/datas/.DS_Store +0 -0
- package/src/datas/common/region.json +0 -1
- package/src/datas/common/resourceData.json +0 -20
- package/src/datas/index.js +0 -11
package/package.json
CHANGED
|
@@ -1,121 +1,122 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
2
|
+
"name": "bri-components",
|
|
3
|
+
"version": "1.0.3",
|
|
4
|
+
"author": "dengshanghui",
|
|
5
|
+
"description": "a component lib for vue project",
|
|
6
|
+
"main": "src/index.js",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"editor",
|
|
9
|
+
"tinymce"
|
|
10
|
+
],
|
|
11
|
+
"files": [
|
|
12
|
+
"lib",
|
|
13
|
+
"src"
|
|
14
|
+
],
|
|
15
|
+
"license": "ISC",
|
|
16
|
+
"directories": {
|
|
17
|
+
"test": "test"
|
|
18
|
+
},
|
|
19
|
+
"private": false,
|
|
20
|
+
"scripts": {
|
|
21
|
+
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
|
|
22
|
+
"start": "npm run dev",
|
|
23
|
+
"unit": "jest --config test/unit/jest.conf.js --coverage",
|
|
24
|
+
"e2e": "node test/e2e/runner.js",
|
|
25
|
+
"test": "npm run unit && npm run e2e",
|
|
26
|
+
"lint": "eslint --fix --ext .js,.vue src example build config",
|
|
27
|
+
"build": "node build/build.js",
|
|
28
|
+
"lib:style": "gulp --gulpfile build/build-style.js",
|
|
29
|
+
"lib:dev": "webpack --config build/webpack.lib.dev.config.js",
|
|
30
|
+
"lib:prod": "webpack --config build/webpack.lib.prod.config.js"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"axios": "^0.23.0",
|
|
34
|
+
"bri-datas": "^1.0.4",
|
|
35
|
+
"jshint": "^2.12.0",
|
|
36
|
+
"minio": "^7.0.26",
|
|
37
|
+
"stream": "^0.0.2",
|
|
38
|
+
"view-design": "^4.6.0",
|
|
39
|
+
"viewerjs": "^1.10.2",
|
|
40
|
+
"vue-codemirror": "^4.0.6",
|
|
41
|
+
"vue-cropperjs": "^4.1.0",
|
|
42
|
+
"vuedraggable": "^2.24.1",
|
|
43
|
+
"wangeditor": "^4.7.5"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"autoprefixer": "^7.1.2",
|
|
47
|
+
"babel-core": "^6.22.1",
|
|
48
|
+
"babel-eslint": "^8.2.1",
|
|
49
|
+
"babel-helper-vue-jsx-merge-props": "^2.0.3",
|
|
50
|
+
"babel-jest": "^21.0.2",
|
|
51
|
+
"babel-loader": "^7.1.1",
|
|
52
|
+
"babel-plugin-dynamic-import-node": "^1.2.0",
|
|
53
|
+
"babel-plugin-syntax-jsx": "^6.18.0",
|
|
54
|
+
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.0",
|
|
55
|
+
"babel-plugin-transform-runtime": "^6.22.0",
|
|
56
|
+
"babel-plugin-transform-vue-jsx": "^3.5.0",
|
|
57
|
+
"babel-preset-env": "^1.3.2",
|
|
58
|
+
"babel-preset-stage-2": "^6.22.0",
|
|
59
|
+
"babel-register": "^6.22.0",
|
|
60
|
+
"chalk": "^2.0.1",
|
|
61
|
+
"chromedriver": "^2.27.2",
|
|
62
|
+
"compression-webpack-plugin": "^1.1.12",
|
|
63
|
+
"copy-webpack-plugin": "^4.0.1",
|
|
64
|
+
"cross-spawn": "^5.0.1",
|
|
65
|
+
"css": "^3.0.0",
|
|
66
|
+
"css-loader": "^0.28.11",
|
|
67
|
+
"eslint": "^4.15.0",
|
|
68
|
+
"eslint-config-standard": "^10.2.1",
|
|
69
|
+
"eslint-friendly-formatter": "^3.0.0",
|
|
70
|
+
"eslint-loader": "^1.7.1",
|
|
71
|
+
"eslint-plugin-import": "^2.22.1",
|
|
72
|
+
"eslint-plugin-node": "^5.2.0",
|
|
73
|
+
"eslint-plugin-promise": "^3.4.0",
|
|
74
|
+
"eslint-plugin-standard": "^3.0.1",
|
|
75
|
+
"eslint-plugin-vue": "^4.0.0",
|
|
76
|
+
"extract-text-webpack-plugin": "^3.0.0",
|
|
77
|
+
"file-loader": "^1.1.4",
|
|
78
|
+
"friendly-errors-webpack-plugin": "^1.6.1",
|
|
79
|
+
"gulp": "^4.0.2",
|
|
80
|
+
"gulp-clean-css": "^4.3.0",
|
|
81
|
+
"gulp-less": "^5.0.0",
|
|
82
|
+
"gulp-rename": "^2.0.0",
|
|
83
|
+
"html-webpack-plugin": "^2.30.1",
|
|
84
|
+
"jest": "^22.0.4",
|
|
85
|
+
"jest-serializer-vue": "^0.3.0",
|
|
86
|
+
"less": "^3.13.1",
|
|
87
|
+
"less-loader": "^5.0.0",
|
|
88
|
+
"nightwatch": "^0.9.12",
|
|
89
|
+
"node-notifier": "^5.1.2",
|
|
90
|
+
"optimize-css-assets-webpack-plugin": "^3.2.0",
|
|
91
|
+
"ora": "^1.2.0",
|
|
92
|
+
"portfinder": "^1.0.13",
|
|
93
|
+
"postcss-import": "^11.0.0",
|
|
94
|
+
"postcss-loader": "^2.0.8",
|
|
95
|
+
"postcss-url": "^7.2.1",
|
|
96
|
+
"rimraf": "^2.6.0",
|
|
97
|
+
"selenium-server": "^3.0.1",
|
|
98
|
+
"semver": "^5.3.0",
|
|
99
|
+
"shelljs": "^0.7.6",
|
|
100
|
+
"uglifyjs-webpack-plugin": "^1.3.0",
|
|
101
|
+
"url-loader": "^0.5.8",
|
|
102
|
+
"vue": "^2.5.2",
|
|
103
|
+
"vue-jest": "^1.0.2",
|
|
104
|
+
"vue-loader": "^13.3.0",
|
|
105
|
+
"vue-router": "^3.0.1",
|
|
106
|
+
"vue-style-loader": "^3.0.1",
|
|
107
|
+
"vue-template-compiler": "^2.5.2",
|
|
108
|
+
"webpack": "^3.6.0",
|
|
109
|
+
"webpack-bundle-analyzer": "^2.9.0",
|
|
110
|
+
"webpack-dev-server": "^2.9.1",
|
|
111
|
+
"webpack-merge": "^4.1.0"
|
|
112
|
+
},
|
|
113
|
+
"engines": {
|
|
114
|
+
"node": ">= 6.0.0",
|
|
115
|
+
"npm": ">= 3.0.0"
|
|
116
|
+
},
|
|
117
|
+
"browserslist": [
|
|
118
|
+
"> 1%",
|
|
119
|
+
"last 2 versions",
|
|
120
|
+
"not ie <= 8"
|
|
121
|
+
]
|
|
121
122
|
}
|
package/src/.DS_Store
CHANGED
|
Binary file
|
|
@@ -117,9 +117,9 @@
|
|
|
117
117
|
</template>
|
|
118
118
|
|
|
119
119
|
<script>
|
|
120
|
+
import { resourceData } from "bri-datas";
|
|
120
121
|
import controlMixin from "../controlMixin.js";
|
|
121
122
|
import selectMixin from "./selectMixin.js";
|
|
122
|
-
import { resourceData } from "../../../datas/index.js";
|
|
123
123
|
|
|
124
124
|
// optionKind值 'flat'、'dropdown'
|
|
125
125
|
export default {
|
|
@@ -114,9 +114,9 @@
|
|
|
114
114
|
</template>
|
|
115
115
|
|
|
116
116
|
<script>
|
|
117
|
+
import { resourceData } from "bri-datas";
|
|
117
118
|
import controlMixin from "../controlMixin.js";
|
|
118
119
|
import selectMixin from "./selectMixin.js";
|
|
119
|
-
import { resourceData } from "../../../datas/index.js";
|
|
120
120
|
|
|
121
121
|
export default {
|
|
122
122
|
name: "DshSelect",
|
|
@@ -235,31 +235,7 @@
|
|
|
235
235
|
});
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
|
|
239
|
-
if (formItem._displayType === "show") {
|
|
240
|
-
return true;
|
|
241
|
-
} else if (formItem._displayType === "hide") {
|
|
242
|
-
return false;
|
|
243
|
-
} else {
|
|
244
|
-
if (
|
|
245
|
-
(formItem._advRely && formItem._advRely.conditions && formItem._advRely.conditions.length) ||
|
|
246
|
-
(formItem._rely && formItem._rely.length)
|
|
247
|
-
) {
|
|
248
|
-
const isAccord = formItem._advRely && formItem._advRely.conditions && formItem._advRely.conditions.length
|
|
249
|
-
? this.$isAdvRelyAccord(formItem._advRely, formData)
|
|
250
|
-
: this.$isRelyAccord(formItem, formData);
|
|
251
|
-
|
|
252
|
-
formData[formItem._key] = isAccord === true
|
|
253
|
-
? formData[formItem._key] !== undefined
|
|
254
|
-
? formData[formItem._key]
|
|
255
|
-
: this.$deepCopy(formItem._default)
|
|
256
|
-
: undefined;
|
|
257
|
-
|
|
258
|
-
return isAccord;
|
|
259
|
-
} else {
|
|
260
|
-
return true;
|
|
261
|
-
}
|
|
262
|
-
}
|
|
238
|
+
return this.$isAdvRelyShow(formItem, formData);
|
|
263
239
|
},
|
|
264
240
|
getRules (formItem) {
|
|
265
241
|
let rules = [];
|
|
@@ -218,6 +218,12 @@
|
|
|
218
218
|
}
|
|
219
219
|
},
|
|
220
220
|
|
|
221
|
+
outObj: {
|
|
222
|
+
type: Object,
|
|
223
|
+
default () {
|
|
224
|
+
return {};
|
|
225
|
+
}
|
|
226
|
+
},
|
|
221
227
|
propsObj: {
|
|
222
228
|
type: Object,
|
|
223
229
|
default () {
|
|
@@ -328,7 +334,7 @@
|
|
|
328
334
|
: []
|
|
329
335
|
),
|
|
330
336
|
|
|
331
|
-
...this.columns.filter(colItem => colItem._displayType !== "hide"),
|
|
337
|
+
...this.columns.filter(colItem => colItem._displayType !== "hide" && this.$isAdvRelyShow(colItem, this.outObj)),
|
|
332
338
|
|
|
333
339
|
...(
|
|
334
340
|
this.canEdit && operationList.length
|
|
@@ -9,7 +9,10 @@
|
|
|
9
9
|
</div>
|
|
10
10
|
|
|
11
11
|
<div class="ZTree-tree">
|
|
12
|
-
<Tree
|
|
12
|
+
<Tree
|
|
13
|
+
:data="treeData"
|
|
14
|
+
:render="renderContent"
|
|
15
|
+
></Tree>
|
|
13
16
|
</div>
|
|
14
17
|
|
|
15
18
|
<!-- 添加节点弹窗 -->
|
|
@@ -38,7 +41,7 @@
|
|
|
38
41
|
</template>
|
|
39
42
|
|
|
40
43
|
<script>
|
|
41
|
-
import { resourceData } from "
|
|
44
|
+
import { resourceData } from "bri-datas";
|
|
42
45
|
|
|
43
46
|
const loop = (arr) => {
|
|
44
47
|
return arr.map(item => {
|
package/src/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import utilMap from "./utils/index.js";
|
|
2
|
+
|
|
3
|
+
// 组件 -第三方
|
|
2
4
|
import ViewUI from "view-design";
|
|
3
5
|
import DshDraggable from "vuedraggable";
|
|
4
6
|
import DshCropper from "vue-cropperjs";
|
|
@@ -146,7 +148,6 @@ const map = {
|
|
|
146
148
|
DshFileShow
|
|
147
149
|
};
|
|
148
150
|
const install = function (Vue, opts = {}) {
|
|
149
|
-
const { globalMap } = opts;
|
|
150
151
|
ViewUI.LoadingBar.config({
|
|
151
152
|
color: "#2d8cf0",
|
|
152
153
|
failedColor: "red",
|
|
@@ -154,6 +155,13 @@ const install = function (Vue, opts = {}) {
|
|
|
154
155
|
});
|
|
155
156
|
Vue.use(ViewUI);
|
|
156
157
|
|
|
158
|
+
// 挂载方法
|
|
159
|
+
Object.keys(utilMap).forEach(key => {
|
|
160
|
+
Vue.prototype[`$${key}`] = utilMap[key];
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
// 挂载组件
|
|
164
|
+
const { globalMap } = opts;
|
|
157
165
|
const componentMap = {
|
|
158
166
|
...map,
|
|
159
167
|
...(globalMap || {})
|