bri-components 1.4.68 → 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
|
@@ -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
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
<
|
|
53
|
-
v-for="(operationItem, index) in rightList"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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
|
-
<
|
|
71
|
-
v-for="(operationItem, index) in flatList"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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
|
-
|
|
96
|
-
:
|
|
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
|
-
|
|
99
|
-
{{ moreBtnOperationObj.name }}
|
|
100
|
-
</span>
|
|
167
|
+
{{ operationItem.name }}
|
|
101
168
|
</bri-button>
|
|
102
|
-
</
|
|
103
|
-
|
|
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>
|