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/package.json CHANGED
@@ -1,121 +1,122 @@
1
1
  {
2
- "name": "bri-components",
3
- "version": "1.0.2",
4
- "author": "dengshanghui",
5
- "description": "a component lib for vue project",
6
- "main": "lib/bri-components.min.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
- "jshint": "^2.12.0",
35
- "minio": "^7.0.26",
36
- "stream": "^0.0.2",
37
- "view-design": "^4.6.0",
38
- "viewerjs": "^1.10.2",
39
- "vue-codemirror": "^4.0.6",
40
- "vue-cropperjs": "^4.1.0",
41
- "vuedraggable": "^2.24.1",
42
- "wangeditor": "^4.7.5"
43
- },
44
- "devDependencies": {
45
- "autoprefixer": "^7.1.2",
46
- "babel-core": "^6.22.1",
47
- "babel-eslint": "^8.2.1",
48
- "babel-helper-vue-jsx-merge-props": "^2.0.3",
49
- "babel-jest": "^21.0.2",
50
- "babel-loader": "^7.1.1",
51
- "babel-plugin-dynamic-import-node": "^1.2.0",
52
- "babel-plugin-syntax-jsx": "^6.18.0",
53
- "babel-plugin-transform-es2015-modules-commonjs": "^6.26.0",
54
- "babel-plugin-transform-runtime": "^6.22.0",
55
- "babel-plugin-transform-vue-jsx": "^3.5.0",
56
- "babel-preset-env": "^1.3.2",
57
- "babel-preset-stage-2": "^6.22.0",
58
- "babel-register": "^6.22.0",
59
- "chalk": "^2.0.1",
60
- "chromedriver": "^2.27.2",
61
- "compression-webpack-plugin": "^1.1.12",
62
- "copy-webpack-plugin": "^4.0.1",
63
- "cross-spawn": "^5.0.1",
64
- "css": "^3.0.0",
65
- "css-loader": "^0.28.11",
66
- "eslint": "^4.15.0",
67
- "eslint-config-standard": "^10.2.1",
68
- "eslint-friendly-formatter": "^3.0.0",
69
- "eslint-loader": "^1.7.1",
70
- "eslint-plugin-import": "^2.22.1",
71
- "eslint-plugin-node": "^5.2.0",
72
- "eslint-plugin-promise": "^3.4.0",
73
- "eslint-plugin-standard": "^3.0.1",
74
- "eslint-plugin-vue": "^4.0.0",
75
- "extract-text-webpack-plugin": "^3.0.0",
76
- "file-loader": "^1.1.4",
77
- "friendly-errors-webpack-plugin": "^1.6.1",
78
- "gulp": "^4.0.2",
79
- "gulp-clean-css": "^4.3.0",
80
- "gulp-less": "^5.0.0",
81
- "gulp-rename": "^2.0.0",
82
- "html-webpack-plugin": "^2.30.1",
83
- "jest": "^22.0.4",
84
- "jest-serializer-vue": "^0.3.0",
85
- "less": "^3.13.1",
86
- "less-loader": "^5.0.0",
87
- "nightwatch": "^0.9.12",
88
- "node-notifier": "^5.1.2",
89
- "optimize-css-assets-webpack-plugin": "^3.2.0",
90
- "ora": "^1.2.0",
91
- "portfinder": "^1.0.13",
92
- "postcss-import": "^11.0.0",
93
- "postcss-loader": "^2.0.8",
94
- "postcss-url": "^7.2.1",
95
- "rimraf": "^2.6.0",
96
- "selenium-server": "^3.0.1",
97
- "semver": "^5.3.0",
98
- "shelljs": "^0.7.6",
99
- "uglifyjs-webpack-plugin": "^1.3.0",
100
- "url-loader": "^0.5.8",
101
- "vue": "^2.5.2",
102
- "vue-jest": "^1.0.2",
103
- "vue-loader": "^13.3.0",
104
- "vue-router": "^3.0.1",
105
- "vue-style-loader": "^3.0.1",
106
- "vue-template-compiler": "^2.5.2",
107
- "webpack": "^3.6.0",
108
- "webpack-bundle-analyzer": "^2.9.0",
109
- "webpack-dev-server": "^2.9.1",
110
- "webpack-merge": "^4.1.0"
111
- },
112
- "engines": {
113
- "node": ">= 6.0.0",
114
- "npm": ">= 3.0.0"
115
- },
116
- "browserslist": [
117
- "> 1%",
118
- "last 2 versions",
119
- "not ie <= 8"
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
@@ -134,7 +134,7 @@
134
134
  </template>
135
135
 
136
136
  <script>
137
- import { regionData } from "../../../datas/index.js";
137
+ import { regionData } from "bri-datas";
138
138
  import controlMixin from "../controlMixin.js";
139
139
  import InfoCascader from "../../other/InfoCascader";
140
140
 
@@ -28,7 +28,7 @@
28
28
  </template>
29
29
 
30
30
  <script>
31
- import { regionData } from "../../../datas/index.js";
31
+ import { regionData } from "bri-datas";
32
32
  import controlMixin from "../controlMixin.js";
33
33
 
34
34
  const loop = function (data = [], level, parentCode, filterVals = []) {
@@ -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 :data="treeData" :render="renderContent"></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 "../../datas/index.js";
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 || {})
@@ -0,0 +1,5 @@
1
+ import tableUtil from "./table.js";
2
+
3
+ export default {
4
+ ...tableUtil
5
+ };