bri-components 1.4.71 → 1.4.73

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,6 +1,6 @@
1
1
  {
2
2
  "name": "bri-components",
3
- "version": "1.4.71",
3
+ "version": "1.4.73",
4
4
  "author": "dengshanghui",
5
5
  "description": "a component lib for vue project",
6
6
  "main": "src/index.js",
@@ -1,42 +1,42 @@
1
1
  <template>
2
2
  <div
3
3
  class="DshDivider"
4
- :style="propsObj._tagKind === 'flag' ? { marginRight:'36px' } : {}"
4
+ :style="showMode === 'flag' ? { marginRight:'36px' } : {}"
5
5
  >
6
6
  <!-- <div class="DshDivider-cli">
7
- <p>{{ propsObj._name }}</p>
7
+ <p>{{ controlName }}</p>
8
8
  </div> -->
9
9
 
10
10
  <div
11
- v-if="propsObj._tagKind === 'flag'"
11
+ v-if="showMode === 'flag'"
12
12
  class="DshDivider-flag"
13
13
  >
14
14
  <Icon
15
15
  size="15"
16
16
  style="margin-top: -1px"
17
- :custom="'bico-font ' + propsObj._tagIcon"
17
+ :custom="'bico-font ' + iconType"
18
18
  />
19
- <p>{{ propsObj._name }}</p>
19
+ <p>{{ controlName }}</p>
20
20
  <span class="triangle-topleft"></span>
21
21
  <span class="triangle-topright"></span>
22
22
  </div>
23
23
 
24
24
  <div
25
- v-else-if="propsObj._tagKind === 'line'"
25
+ v-else-if="showMode === 'line'"
26
26
  class="DshDivider-line"
27
27
  >
28
- <p>{{ propsObj._name }}</p>
28
+ <p>{{ controlName }}</p>
29
29
  <span></span>
30
30
  </div>
31
31
 
32
32
  <div
33
- v-else-if="propsObj._tagKind === 'circle'"
33
+ v-else-if="showMode === 'circle'"
34
34
  class="DshDivider-circle"
35
35
  >
36
36
  <span class="DshDivider-circle-icon">
37
- <Icon :custom="'bico-font ' + propsObj._tagIcon" />
37
+ <Icon :custom="'bico-font ' + iconType" />
38
38
  </span>
39
- <p>{{ propsObj._name }}</p>
39
+ <p>{{ controlName }}</p>
40
40
  </div>
41
41
  </div>
42
42
  </template>
@@ -53,7 +53,22 @@
53
53
  data () {
54
54
  return {};
55
55
  },
56
- computed: {},
56
+ computed: {
57
+ selfPropsObj () {
58
+ return {
59
+ _tagKind: "flag", // "flag", "line", "circle"
60
+ _tagIcon: "", // flag、circle下使用
61
+
62
+ ...this.propsObj
63
+ };
64
+ },
65
+ showMode () {
66
+ return this.selfPropsObj._tagKind;
67
+ },
68
+ iconType () {
69
+ return this.selfPropsObj._tagIcon;
70
+ }
71
+ },
57
72
  created () {},
58
73
  methods: {}
59
74
  };
@@ -159,8 +159,8 @@ export default {
159
159
 
160
160
  return !this.$isEmptyData(val)
161
161
  ? {
162
- name: obj[this.nameKey], // 查看状态时tag用
163
162
  ...obj,
163
+ name: obj[this.nameKey] || obj.name || obj._name, // 查看状态时tag用
164
164
  style: {
165
165
  ...this.tagStyle,
166
166
  ...this.getItemColorStyle(obj),
@@ -37,7 +37,7 @@
37
37
  <!-- loading -->
38
38
  <bri-loading
39
39
  class="bri-table-empty"
40
- :value="isLoading ? 1 : data.length? 0 : 2"
40
+ :value="isLoading ? 1 : data.length ? 0 : 2"
41
41
  >
42
42
  <template slot="nodata">
43
43
  {{ noDataText }}
@@ -179,7 +179,7 @@
179
179
  .reduce((obj, attr) => {
180
180
  return { sortType: params[attr], field: attr };
181
181
  }, {});
182
- this.$emit("sort-change", sortObj);
182
+ this.$emit("changeSort", sortObj);
183
183
  },
184
184
  ...(this.propsObj.sortOption || {})
185
185
  };
@@ -14,7 +14,7 @@
14
14
  :isLoading="isLoading ? isLoading : listPropsObj && listPropsObj.isLoading"
15
15
  :noDataText="listPropsObj && listPropsObj.noDataText || '暂无数据…'"
16
16
  @clickRow="clickRow"
17
- @sortChange="changeSort"
17
+ @changeSort="changeSort"
18
18
  @changeSelect="changeSelect"
19
19
  @selectAll="selectAll"
20
20
  @select="select"
@@ -9,7 +9,7 @@
9
9
  @changeSelect="changeSelect"
10
10
  @selectAll="changeSelect"
11
11
  @click-row="clickRow"
12
- @sort-change="changeSort"
12
+ @changeSort="changeSort"
13
13
  ></bri-table>
14
14
  </div>
15
15
  </template>
@@ -189,7 +189,7 @@
189
189
 
190
190
  // 改变选择项
191
191
  changeSort (...params) {
192
- this.$emit("sortChange", ...params);
192
+ this.$emit("changeSort", ...params);
193
193
  },
194
194
  // 改变选择项
195
195
  changeSelect (...params) {
@@ -13,6 +13,9 @@
13
13
  <Poptip
14
14
  v-if="operationItem.tipContent"
15
15
  :key="(operationItem._key || operationItem.type) + 'poptip'"
16
+ :class="[
17
+ index ? 'dsh-margin-left8' : undefined
18
+ ]"
16
19
  trigger="hover"
17
20
  :title="operationItem.tipTitle"
18
21
  :content="operationItem.tipContent"
@@ -24,7 +27,6 @@
24
27
  :key="operationItem._key || operationItem.type"
25
28
  :style="operationItem.style"
26
29
  :class="[
27
- index ? 'dsh-margin-left8' : undefined,
28
30
  !operationItem.loading && !operationItem.customIcon && !operationItem.icon ? 'DshButtons-item' : undefined,
29
31
  itemClass,
30
32
  ]"
@@ -80,6 +82,9 @@
80
82
  <Poptip
81
83
  v-if="operationItem.tipContent"
82
84
  :key="(operationItem._key || operationItem.type) + 'poptip'"
85
+ :class="[
86
+ index ? 'dsh-margin-left8' : undefined
87
+ ]"
83
88
  trigger="hover"
84
89
  :title="operationItem.tipTitle"
85
90
  :content="operationItem.tipContent"
@@ -91,7 +96,6 @@
91
96
  :key="operationItem._key || operationItem.type"
92
97
  :style="operationItem.style"
93
98
  :class="[
94
- index ? 'dsh-margin-left8' : undefined,
95
99
  !operationItem.loading && !operationItem.customIcon && !operationItem.icon ? 'DshButtons-item' : undefined,
96
100
  itemClass,
97
101
  ]"
@@ -125,6 +129,9 @@
125
129
  <Poptip
126
130
  v-if="operationItem.tipContent"
127
131
  :key="(operationItem._key || operationItem.type) + 'poptip'"
132
+ :class="[
133
+ index ? 'dsh-margin-left8' : undefined
134
+ ]"
128
135
  trigger="hover"
129
136
  :title="operationItem.tipTitle"
130
137
  :content="operationItem.tipContent"
@@ -137,7 +144,6 @@
137
144
  :key="operationItem._key || operationItem.type"
138
145
  :style="operationItem.style"
139
146
  :class="[
140
- index ? 'dsh-margin-left8' : undefined,
141
147
  !operationItem.loading && !operationItem.customIcon && !operationItem.icon ? 'DshButtons-item' : undefined,
142
148
  itemClass,
143
149
  ]"
@@ -88,7 +88,7 @@ const transformToColumns = function (form, {
88
88
  isMultiple: true,
89
89
  maxHeight: 250,
90
90
  filterList: (
91
- col._selectFilterVals.length
91
+ col._selectFilterVals && col._selectFilterVals.length
92
92
  ? col._data.filter(item =>
93
93
  col._reverseFilter
94
94
  ? !col._selectFilterVals.includes(item._key)