bri-components 1.4.67 → 1.4.69

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.67",
3
+ "version": "1.4.69",
4
4
  "author": "dengshanghui",
5
5
  "description": "a component lib for vue project",
6
6
  "main": "src/index.js",
@@ -122,7 +122,7 @@ export default {
122
122
  multipleMode () {
123
123
  return this.isInDftSearch || this.isInSearch
124
124
  ? true
125
- : ["checkbox", "regions", "cascaders", "labels", "refCheckbox"].includes(this.controlType)
125
+ : ["daterange", "checkbox", "regions", "cascaders", "labels", "refCheckbox"].includes(this.controlType)
126
126
  ? true
127
127
  : !!this.selfPropsObj && !!this.selfPropsObj._multiple;
128
128
  },
@@ -19,7 +19,7 @@ export default {
19
19
  return {
20
20
  _dateType: "date", // 子类型5种,"date", "datetime", "year", "month", "time"
21
21
 
22
- _useDynDate: true, // 使用动态时间
22
+ _useDynDate: false, // 使用动态时间
23
23
  _dynDateType: undefined, // 使用什么类型的动态时间,"start","end"
24
24
  _dynDateKeys: [], // 仅使用一些指定的动态时间
25
25
  _dynSearchKeys: [], // 筛选时-仅使用一些指定的动态时间
@@ -149,7 +149,7 @@
149
149
  ...operationItem,
150
150
  ...(
151
151
  operationItem.operationFunc
152
- ? operationItem.operationFunc(operationItem, params.row, params.index)
152
+ ? operationItem.operationFunc(operationItem, params.row, params.index, this.selfOperationList)
153
153
  : {}
154
154
  )
155
155
  };
@@ -160,7 +160,7 @@
160
160
  class: "bri-table-td-operation",
161
161
  props: {
162
162
  list: totalOperationList,
163
- maxFlatNum: this.maxBtnNum - 1,
163
+ maxFlatNum: this.selfOperationList.length > this.maxBtnNum ? this.maxBtnNum - 1 : this.selfOperationList.length,
164
164
  itemClass: "bri-table-td-operation-btn"
165
165
  },
166
166
  on: {
@@ -9,20 +9,47 @@
9
9
  >
10
10
  <!-- 左侧按钮 -->
11
11
  <div class="DshButtons-flex-left">
12
- <bri-button
13
- v-for="(operationItem, index) in leftFlatList"
14
- :key="operationItem._key || operationItem.type"
15
- :style="operationItem.style"
16
- :class="[
17
- index ? 'dsh-margin-left8' : undefined,
18
- !operationItem.loading && !operationItem.customIcon && !operationItem.icon ? 'DshButtons-item' : undefined,
19
- itemClass,
20
- ]"
21
- :propsObj="operationItem"
22
- @click="emit(operationItem)"
23
- >
24
- {{ operationItem.name }}
25
- </bri-button>
12
+ <template v-for="(operationItem, index) in leftFlatList">
13
+ <Poptip
14
+ v-if="operationItem.tipContent"
15
+ :key="(operationItem._key || operationItem.type) + 'poptip'"
16
+ trigger="hover"
17
+ :title="operationItem.tipTitle"
18
+ :content="operationItem.tipContent"
19
+ word-wrap
20
+ width="220"
21
+ :transfer="true"
22
+ >
23
+ <bri-button
24
+ :key="operationItem._key || operationItem.type"
25
+ :style="operationItem.style"
26
+ :class="[
27
+ index ? 'dsh-margin-left8' : undefined,
28
+ !operationItem.loading && !operationItem.customIcon && !operationItem.icon ? 'DshButtons-item' : undefined,
29
+ itemClass,
30
+ ]"
31
+ :propsObj="operationItem"
32
+ @click="emit(operationItem)"
33
+ >
34
+ {{ operationItem.name }}
35
+ </bri-button>
36
+ </Poptip>
37
+
38
+ <bri-button
39
+ v-else
40
+ :key="operationItem._key || operationItem.type"
41
+ :style="operationItem.style"
42
+ :class="[
43
+ index ? 'dsh-margin-left8' : undefined,
44
+ !operationItem.loading && !operationItem.customIcon && !operationItem.icon ? 'DshButtons-item' : undefined,
45
+ itemClass,
46
+ ]"
47
+ :propsObj="operationItem"
48
+ @click="emit(operationItem)"
49
+ >
50
+ {{ operationItem.name }}
51
+ </bri-button>
52
+ </template>
26
53
 
27
54
  <!-- 更多的 下拉按钮-->
28
55
  <dsh-dropdown
@@ -49,58 +76,118 @@
49
76
  <div class="DshButtons-flex-right">
50
77
  <slot></slot>
51
78
 
52
- <bri-button
53
- v-for="(operationItem, index) in rightList"
54
- :key="operationItem._key || operationItem.type"
55
- :style="operationItem.style"
56
- :class="[
57
- index ? 'dsh-margin-left8' : undefined,
58
- !operationItem.loading && !operationItem.customIcon && !operationItem.icon ? 'DshButtons-item' : undefined,
59
- itemClass,
60
- ]"
61
- :propsObj="operationItem"
62
- @click="emit(operationItem)"
63
- >
64
- {{ operationItem.name }}
65
- </bri-button>
79
+ <div class="DshButtons-flex-left">
80
+ <template v-for="(operationItem, index) in rightList">
81
+ <Poptip
82
+ v-if="operationItem.tipContent"
83
+ :key="(operationItem._key || operationItem.type) + 'poptip'"
84
+ trigger="hover"
85
+ :title="operationItem.tipTitle"
86
+ :content="operationItem.tipContent"
87
+ word-wrap
88
+ width="220"
89
+ :transfer="true"
90
+ >
91
+ <bri-button
92
+ :key="operationItem._key || operationItem.type"
93
+ :style="operationItem.style"
94
+ :class="[
95
+ index ? 'dsh-margin-left8' : undefined,
96
+ !operationItem.loading && !operationItem.customIcon && !operationItem.icon ? 'DshButtons-item' : undefined,
97
+ itemClass,
98
+ ]"
99
+ :propsObj="operationItem"
100
+ @click="emit(operationItem)"
101
+ >
102
+ {{ operationItem.name }}
103
+ </bri-button>
104
+ </Poptip>
105
+
106
+ <bri-button
107
+ v-else
108
+ :key="operationItem._key || operationItem.type"
109
+ :style="operationItem.style"
110
+ :class="[
111
+ index ? 'dsh-margin-left8' : undefined,
112
+ !operationItem.loading && !operationItem.customIcon && !operationItem.icon ? 'DshButtons-item' : undefined,
113
+ itemClass,
114
+ ]"
115
+ :propsObj="operationItem"
116
+ @click="emit(operationItem)"
117
+ >
118
+ {{ operationItem.name }}
119
+ </bri-button>
120
+ </template>
121
+ </div>
66
122
  </div>
67
123
  </div>
68
124
 
69
125
  <template v-else>
70
- <bri-button
71
- v-for="(operationItem, index) in flatList"
72
- :key="operationItem._key || operationItem.type"
73
- :style="operationItem.style"
74
- :class="[
75
- index ? 'dsh-margin-left8' : undefined,
76
- !operationItem.loading && !operationItem.customIcon && !operationItem.icon ? 'DshButtons-item' : undefined,
77
- itemClass,
78
- ...(Array.isArray(operationItem.class) ? operationItem.class : [operationItem.class])
79
- ]"
80
- :propsObj="operationItem"
81
- @click="emit(operationItem)"
82
- >
83
- {{ operationItem.name }}
84
- </bri-button>
85
-
86
- <dsh-dropdown
87
- v-if="moreList.length"
88
- class="DshButtons-dropdown"
89
- :list="moreList"
90
- trigger="hover"
91
- @click="emit($event)"
92
- >
93
- <slot name="more">
126
+ <div class="DshButtons-flex-left">
127
+ <template v-for="(operationItem, index) in flatList">
128
+ <Poptip
129
+ v-if="operationItem.tipContent"
130
+ :key="(operationItem._key || operationItem.type) + 'poptip'"
131
+ trigger="hover"
132
+ :title="operationItem.tipTitle"
133
+ :content="operationItem.tipContent"
134
+ word-wrap
135
+ width="220"
136
+ popper-class="DshButtons-poptip"
137
+ :transfer="true"
138
+ >
139
+ <bri-button
140
+ :key="operationItem._key || operationItem.type"
141
+ :style="operationItem.style"
142
+ :class="[
143
+ index ? 'dsh-margin-left8' : undefined,
144
+ !operationItem.loading && !operationItem.customIcon && !operationItem.icon ? 'DshButtons-item' : undefined,
145
+ itemClass,
146
+ ]"
147
+ :propsObj="operationItem"
148
+ @click="emit(operationItem)"
149
+ >
150
+ {{ operationItem.name }}
151
+ </bri-button>
152
+ </Poptip>
153
+
94
154
  <bri-button
95
- class="DshButtons-dropdown-more"
96
- :propsObj="moreBtnOperationObj"
155
+ v-else
156
+ :key="operationItem._key || operationItem.type"
157
+ :style="operationItem.style"
158
+ :class="[
159
+ index ? 'dsh-margin-left8' : undefined,
160
+ !operationItem.loading && !operationItem.customIcon && !operationItem.icon ? 'DshButtons-item' : undefined,
161
+ itemClass,
162
+ ...(Array.isArray(operationItem.class) ? operationItem.class : [operationItem.class])
163
+ ]"
164
+ :propsObj="operationItem"
165
+ @click="emit(operationItem)"
97
166
  >
98
- <span class="DshButtons-dropdown-more-name">
99
- {{ moreBtnOperationObj.name }}
100
- </span>
167
+ {{ operationItem.name }}
101
168
  </bri-button>
102
- </slot>
103
- </dsh-dropdown>
169
+ </template>
170
+
171
+ <!-- 更多 -->
172
+ <dsh-dropdown
173
+ v-if="moreList.length"
174
+ class="DshButtons-dropdown"
175
+ :list="moreList"
176
+ trigger="hover"
177
+ @click="emit($event)"
178
+ >
179
+ <slot name="more">
180
+ <bri-button
181
+ class="DshButtons-dropdown-more"
182
+ :propsObj="moreBtnOperationObj"
183
+ >
184
+ <span class="DshButtons-dropdown-more-name">
185
+ {{ moreBtnOperationObj.name }}
186
+ </span>
187
+ </bri-button>
188
+ </slot>
189
+ </dsh-dropdown>
190
+ </div>
104
191
  </template>
105
192
  </div>
106
193
  </template>
@@ -208,3 +295,28 @@
208
295
  }
209
296
  }
210
297
  </style>
298
+ <style lang="less">
299
+ .DshButtons {
300
+ &-poptip {
301
+ .ivu-poptip-content {
302
+ .ivu-poptip-arrow {
303
+ &:after {
304
+ border-top-color: @textColor;
305
+ }
306
+ }
307
+
308
+ .ivu-poptip-inner {
309
+ background-color: @textColor;
310
+
311
+ .ivu-poptip-body {
312
+ &-content {
313
+ &-inner {
314
+ color: @textWhColor;
315
+ }
316
+ }
317
+ }
318
+ }
319
+ }
320
+ }
321
+ }
322
+ </style>