bri-components 1.2.41 → 1.2.43
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/2.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/6.bri-components.min.js +1 -1
- package/lib/bri-components.min.js +17 -19
- package/package.json +4 -3
- package/src/components/controls/controlMixin.js +3 -0
- package/src/components/form/DshAdvSearch.vue +3 -3
- package/src/components/form/DshDefaultSearch.vue +3 -3
- package/src/components/form/DshForm.vue +1 -1
- package/src/components/form/searchMixin.js +2 -2
- package/src/components/list/DshCascaderTable.vue +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bri-components",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.43",
|
|
4
4
|
"author": "dengshanghui",
|
|
5
5
|
"description": "a component lib for vue project",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"lib:prod": "webpack --config build/webpack.lib.prod.config.js"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"axios": "^0.23.0",
|
|
34
33
|
"ali-oss": "^6.13.1",
|
|
35
|
-
"
|
|
34
|
+
"axios": "^0.23.0",
|
|
35
|
+
"bri-datas": "^1.0.41",
|
|
36
36
|
"jshint": "^2.12.0",
|
|
37
37
|
"jsonlint": "^1.6.3",
|
|
38
38
|
"minio": "7.1.0",
|
|
@@ -100,6 +100,7 @@
|
|
|
100
100
|
"selenium-server": "^3.0.1",
|
|
101
101
|
"semver": "^5.3.0",
|
|
102
102
|
"shelljs": "^0.7.6",
|
|
103
|
+
"style-resources-loader": "^1.5.0",
|
|
103
104
|
"uglifyjs-webpack-plugin": "^1.3.0",
|
|
104
105
|
"url-loader": "^0.5.8",
|
|
105
106
|
"vue": "^2.5.2",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="DshAdvSearch">
|
|
3
3
|
<!-- 无可筛选字段 -->
|
|
4
|
-
<template v-if="
|
|
4
|
+
<template v-if="canSearchFormList.length">
|
|
5
5
|
<!-- 筛选逻辑 -->
|
|
6
6
|
<div class="DshAdvSearch-logic">
|
|
7
7
|
<div class="DshAdvSearch-logic-title">筛选逻辑</div>
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
:isInner="true"
|
|
28
28
|
:mode="mode"
|
|
29
29
|
:value="conditionItem"
|
|
30
|
-
:formList="
|
|
30
|
+
:formList="canSearchFormList"
|
|
31
31
|
:dynamicFieldsMap="dynamicFieldsMap"
|
|
32
32
|
@change="change(conditionItem, arguments)"
|
|
33
33
|
></dsh-adv-search>
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
<dsh-dropdown
|
|
159
159
|
class="DshAdvSearch-btns-field"
|
|
160
160
|
menuClass="DshAdvSearch-btns-field-list"
|
|
161
|
-
:list="
|
|
161
|
+
:list="canSearchFormList"
|
|
162
162
|
:useSearch="true"
|
|
163
163
|
trigger="click"
|
|
164
164
|
@click="$dispatchEvent(operationMap.createContion, false, $event)"
|
|
@@ -113,13 +113,13 @@
|
|
|
113
113
|
};
|
|
114
114
|
},
|
|
115
115
|
computed: {
|
|
116
|
-
|
|
116
|
+
canSearchFormList () {
|
|
117
117
|
return this.formList.filter(formItem => this.$formHasAbility(formItem, "canDefaultSearch"));
|
|
118
118
|
},
|
|
119
119
|
|
|
120
120
|
// 总span
|
|
121
121
|
allSpan () {
|
|
122
|
-
return this.
|
|
122
|
+
return this.canSearchFormList.reduce((totalSpan, formItem) => {
|
|
123
123
|
const curSpan = formItem._span || 24;
|
|
124
124
|
|
|
125
125
|
// 有余数,代表不是整行
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
},
|
|
152
152
|
methods: {
|
|
153
153
|
init () {
|
|
154
|
-
this.conditionList = this.
|
|
154
|
+
this.conditionList = this.canSearchFormList.map(formItem => {
|
|
155
155
|
const initConditionItem = this.initValue.find(initItem => initItem.fieldKey === formItem._key);
|
|
156
156
|
return this.createContionFunc(initConditionItem, formItem);
|
|
157
157
|
});
|
|
@@ -29,7 +29,7 @@ export default {
|
|
|
29
29
|
};
|
|
30
30
|
},
|
|
31
31
|
computed: {
|
|
32
|
-
|
|
32
|
+
canSearchFormList () {
|
|
33
33
|
return this.formList.filter(formItem => this.$formHasAbility(formItem, "canSearch"));
|
|
34
34
|
}
|
|
35
35
|
},
|
|
@@ -39,7 +39,7 @@ export default {
|
|
|
39
39
|
// 生成筛选条件的值
|
|
40
40
|
createContionFunc (initContion = { logic: "field" }, curFormItem, fieldKey) {
|
|
41
41
|
if (["field", undefined].includes(initContion.logic)) {
|
|
42
|
-
const formItem = curFormItem || this.
|
|
42
|
+
const formItem = curFormItem || this.canSearchFormList.find(formItem => formItem._key === fieldKey);
|
|
43
43
|
|
|
44
44
|
if (formItem) {
|
|
45
45
|
const fieldData = this.fieldMap[formItem._type];
|