bi-element-ui 0.1.50 → 0.1.51
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/.browserslistrc +3 -3
- package/.eslintrc.js +287 -287
- package/.prettierrc +7 -7
- package/README.md +148 -148
- package/cypress.json +3 -3
- package/lib/bi-element-ui.common.js +24625 -24756
- package/lib/bi-element-ui.css +1 -1
- package/lib/bi-element-ui.umd.js +24625 -24756
- package/lib/bi-element-ui.umd.min.js +279 -2
- package/lib/static/img/swiperBg.png +0 -0
- package/package.json +57 -57
- package/src/App.vue +42 -42
- package/src/components/BiDatePicker/datePickerOption.js +229 -229
- package/src/components/BiDatePicker/index.vue +74 -74
- package/src/components/BiTable/columu.vue +104 -104
- package/src/components/BiTable/forced.js +76 -76
- package/src/components/BiTable/index.js +6 -6
- package/src/components/BiTable/render.vue +13 -13
- package/src/components/BiTable/table.vue +202 -202
- package/src/components/BiTableColumn/Group.vue +277 -277
- package/src/components/BiTableColumn/api.js +16 -16
- package/src/components/BiTableColumn/index.vue +614 -614
- package/src/components/BiTooltipIcon/index.vue +71 -71
- package/src/components/EditBtn.vue +15 -15
- package/src/components/FreeButton/index.vue +69 -69
- package/src/components/Pagination/index.vue +104 -104
- package/src/components/Pagination/scrollTo.js +69 -69
- package/src/main.js +18 -18
- package/src/router/index.js +39 -39
- package/src/store/index.js +11 -11
- package/src/table.js +463 -463
- package/src/views/Date.vue +132 -132
- package/src/views/Home.vue +330 -330
- package/src/views/Scene.vue +140 -140
- package/src/views/Table.vue +220 -220
- package/src/views/showData.vue +455 -455
- package/tests/e2e/.eslintrc.js +10 -10
- package/tests/e2e/plugins/index.js +25 -25
- package/tests/e2e/specs/test.js +8 -8
- package/tests/e2e/support/commands.js +25 -25
- package/tests/e2e/support/index.js +20 -20
- package/tests/unit/example.spec.js +13 -13
- package//345/211/215/347/253/257ui/346/240/267/345/274/217/350/247/204/350/214/203.md +101 -0
- package/dist/css/about.2c825c53.css +0 -1
- package/dist/css/chunk-vendors.8140bef9.css +0 -1
- package/dist/css/index.16a68369.css +0 -1
- package/dist/favicon.ico +0 -0
- package/dist/fonts/element-icons.535877f5.woff +0 -0
- package/dist/fonts/element-icons.732389de.ttf +0 -0
- package/dist/index.html +0 -1
- package/dist/js/about.78bcdce4.js +0 -2
- package/dist/js/chunk-vendors.dcba7b0e.js +0 -318
- package/dist/js/index.62a7fbd4.js +0 -2
- package/dist/static/img/swiperBg.png +0 -0
package/src/views/Table.vue
CHANGED
@@ -1,220 +1,220 @@
|
|
1
|
-
<template>
|
2
|
-
<div>
|
3
|
-
<el-button
|
4
|
-
type=""
|
5
|
-
@click="search"
|
6
|
-
>搜索</el-button>
|
7
|
-
<div
|
8
|
-
class="example-table-box"
|
9
|
-
style="padding-top:20px"
|
10
|
-
>
|
11
|
-
<p>sticky表格</p>
|
12
|
-
<bi-table
|
13
|
-
ref="table"
|
14
|
-
border
|
15
|
-
stripe
|
16
|
-
fixed="sticky"
|
17
|
-
:data="data"
|
18
|
-
:column="basicColumn"
|
19
|
-
show-summary
|
20
|
-
:summary-method="getSummaries"
|
21
|
-
></bi-table>
|
22
|
-
</div>
|
23
|
-
|
24
|
-
<!-- <div style="padding-bottom:600px"></div>
|
25
|
-
<div class="example-table-box">
|
26
|
-
<p>普通固定表头</p>
|
27
|
-
<bi-table
|
28
|
-
border
|
29
|
-
stripe
|
30
|
-
fixed="fullscreen"
|
31
|
-
:data="data"
|
32
|
-
:column="fullscreenColumn"
|
33
|
-
max-height="200px"
|
34
|
-
fixed-offset="60"
|
35
|
-
pagination
|
36
|
-
:auto-scroll="false"
|
37
|
-
:total="100"
|
38
|
-
:page.sync="listQuery.page"
|
39
|
-
:limit.sync="listQuery.limit"
|
40
|
-
show-summary
|
41
|
-
@selection-change="selectionChange"
|
42
|
-
@pagination="getList"
|
43
|
-
></bi-table>
|
44
|
-
</div>
|
45
|
-
|
46
|
-
<div class="example-table-box">
|
47
|
-
<p>sticky-tabs表格</p>
|
48
|
-
<el-tabs>
|
49
|
-
<el-tab-pane label="tabs">
|
50
|
-
<div style="height:300px;background:#eee"></div>
|
51
|
-
<bi-table
|
52
|
-
border
|
53
|
-
stripe
|
54
|
-
fixed="sticky"
|
55
|
-
:data="data"
|
56
|
-
:column="fullscreenColumn"
|
57
|
-
:summary-method="getSummaries"
|
58
|
-
show-summary
|
59
|
-
></bi-table>
|
60
|
-
</el-tab-pane>
|
61
|
-
</el-tabs>
|
62
|
-
</div>
|
63
|
-
<div class="example-table-box">
|
64
|
-
<p>tooltipIcon在表格内的组件使用</p>
|
65
|
-
<bi-table
|
66
|
-
border
|
67
|
-
stripe
|
68
|
-
fixed="sticky"
|
69
|
-
:data="minData"
|
70
|
-
:column="renderColumn"
|
71
|
-
>
|
72
|
-
<template v-slot:province="{row}">
|
73
|
-
<BiTooltipIcon
|
74
|
-
:label="row.province"
|
75
|
-
content="这是props继承的写法,<br/>可根据不同需求配置属性"
|
76
|
-
placement="right"
|
77
|
-
icon="el-icon-warning-outline"
|
78
|
-
effect="light"
|
79
|
-
></BiTooltipIcon>
|
80
|
-
</template>
|
81
|
-
<template v-slot:city="{row}">
|
82
|
-
<BiTooltipIcon placement="right">
|
83
|
-
<template slot="tip-label"><span>{{ row.city }}</span></template>
|
84
|
-
<template slot="tip-content"><span>这是slot默认替换的写法,可用自定义的内容配合tooltip使用</span></template>
|
85
|
-
<template slot="tip-icon">
|
86
|
-
<i
|
87
|
-
class="el-icon-chat-dot-round"
|
88
|
-
style="color:#ff6700"
|
89
|
-
></i>
|
90
|
-
</template>
|
91
|
-
</BiTooltipIcon>
|
92
|
-
</template>
|
93
|
-
</bi-table>
|
94
|
-
</div> -->
|
95
|
-
</div>
|
96
|
-
</template>
|
97
|
-
|
98
|
-
<script>
|
99
|
-
// import BiTable from '@/components/BiTable'
|
100
|
-
import TableData from '@/table.js'
|
101
|
-
// import BiTableColumn from '@/components/BiTableColumn'
|
102
|
-
// import BiTooltipIcon from '@/components/BiTooltipIcon'
|
103
|
-
export default {
|
104
|
-
components: {
|
105
|
-
// BiTooltipIcon
|
106
|
-
// BiTable
|
107
|
-
// BiTableColumn
|
108
|
-
},
|
109
|
-
mixins: [TableData],
|
110
|
-
data() {
|
111
|
-
return {
|
112
|
-
basicData2: [],
|
113
|
-
basicColumn: [
|
114
|
-
{ label: '日期', prop: 'date', sortable: true, fixed: true },
|
115
|
-
{ label: '姓名', prop: 'name' },
|
116
|
-
{ label: '省份', prop: 'province' },
|
117
|
-
{ label: '市区', prop: 'city' },
|
118
|
-
{
|
119
|
-
label: '地址',
|
120
|
-
prop: 'address',
|
121
|
-
width: () => {
|
122
|
-
return this.aaWidth
|
123
|
-
}
|
124
|
-
},
|
125
|
-
{
|
126
|
-
label: '地址2',
|
127
|
-
prop: 'address2',
|
128
|
-
minWidth: () => {
|
129
|
-
return '100'
|
130
|
-
}
|
131
|
-
},
|
132
|
-
{ label: '邮编', prop: 'zip' },
|
133
|
-
{
|
134
|
-
label: 'v-model',
|
135
|
-
prop: 'other',
|
136
|
-
fixed: 'right',
|
137
|
-
render: (h, scope) => {
|
138
|
-
return h('input', {
|
139
|
-
on: {
|
140
|
-
input(event) {
|
141
|
-
scope.row.name = event.target.value
|
142
|
-
}
|
143
|
-
},
|
144
|
-
domProps: {
|
145
|
-
value: scope.row.name
|
146
|
-
},
|
147
|
-
style: {
|
148
|
-
width: '100%',
|
149
|
-
minHeight: '30px',
|
150
|
-
color: 'red',
|
151
|
-
border: '1px solid #ddd'
|
152
|
-
}
|
153
|
-
})
|
154
|
-
}
|
155
|
-
}
|
156
|
-
],
|
157
|
-
tableLoading: false,
|
158
|
-
columnsProps: {
|
159
|
-
width: 'auto'
|
160
|
-
},
|
161
|
-
total: 0,
|
162
|
-
listQuery: {
|
163
|
-
page: 2,
|
164
|
-
limit: 20
|
165
|
-
},
|
166
|
-
editForm: {},
|
167
|
-
dialogVisible: false
|
168
|
-
}
|
169
|
-
},
|
170
|
-
computed: {
|
171
|
-
aaWidth() {
|
172
|
-
return 400
|
173
|
-
}
|
174
|
-
},
|
175
|
-
methods: {
|
176
|
-
selectionChange(rows) {
|
177
|
-
console.log('selected', rows)
|
178
|
-
},
|
179
|
-
getList() {},
|
180
|
-
openDialog({ row }) {
|
181
|
-
this.editForm = Object.assign({}, row)
|
182
|
-
this.dialogVisible = true
|
183
|
-
},
|
184
|
-
setTableColumn(column) {
|
185
|
-
// this.tableLoading = true
|
186
|
-
this.$set(this, 'basicColumn', [])
|
187
|
-
setTimeout(() => {
|
188
|
-
this.$set(this, 'basicColumn', column)
|
189
|
-
// this.tableLoading = false
|
190
|
-
}, 10)
|
191
|
-
},
|
192
|
-
|
193
|
-
getSummaries() {
|
194
|
-
return ['合计', '2016-05-03', '王小虎', '上海', '普陀区', '上海市普陀区金沙江路 1518 弄', '上海市普陀区金沙江路 1518 弄', 200333]
|
195
|
-
},
|
196
|
-
search() {
|
197
|
-
const list = JSON.parse(JSON.stringify(this.data))
|
198
|
-
this.data = list.splice(0, 7)
|
199
|
-
// this.tableList2 = this.minData
|
200
|
-
this.$nextTick(() => {
|
201
|
-
this.$refs.table.resetHeaderFooter && this.$refs.table.resetHeaderFooter()
|
202
|
-
// var evt = window.document.createEvent('UIEvents')
|
203
|
-
// evt.initUIEvent('scroll', true, false, window, 0)
|
204
|
-
// window.dispatchEvent(evt)
|
205
|
-
})
|
206
|
-
}
|
207
|
-
}
|
208
|
-
}
|
209
|
-
</script>
|
210
|
-
|
211
|
-
<style lang="scss" scoped>
|
212
|
-
.example-table-box {
|
213
|
-
margin: 25px 50px;
|
214
|
-
|
215
|
-
p {
|
216
|
-
text-align: left;
|
217
|
-
font-weight: 700;
|
218
|
-
}
|
219
|
-
}
|
220
|
-
</style>
|
1
|
+
<template>
|
2
|
+
<div>
|
3
|
+
<el-button
|
4
|
+
type=""
|
5
|
+
@click="search"
|
6
|
+
>搜索</el-button>
|
7
|
+
<div
|
8
|
+
class="example-table-box"
|
9
|
+
style="padding-top:20px"
|
10
|
+
>
|
11
|
+
<p>sticky表格</p>
|
12
|
+
<bi-table
|
13
|
+
ref="table"
|
14
|
+
border
|
15
|
+
stripe
|
16
|
+
fixed="sticky"
|
17
|
+
:data="data"
|
18
|
+
:column="basicColumn"
|
19
|
+
show-summary
|
20
|
+
:summary-method="getSummaries"
|
21
|
+
></bi-table>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<!-- <div style="padding-bottom:600px"></div>
|
25
|
+
<div class="example-table-box">
|
26
|
+
<p>普通固定表头</p>
|
27
|
+
<bi-table
|
28
|
+
border
|
29
|
+
stripe
|
30
|
+
fixed="fullscreen"
|
31
|
+
:data="data"
|
32
|
+
:column="fullscreenColumn"
|
33
|
+
max-height="200px"
|
34
|
+
fixed-offset="60"
|
35
|
+
pagination
|
36
|
+
:auto-scroll="false"
|
37
|
+
:total="100"
|
38
|
+
:page.sync="listQuery.page"
|
39
|
+
:limit.sync="listQuery.limit"
|
40
|
+
show-summary
|
41
|
+
@selection-change="selectionChange"
|
42
|
+
@pagination="getList"
|
43
|
+
></bi-table>
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div class="example-table-box">
|
47
|
+
<p>sticky-tabs表格</p>
|
48
|
+
<el-tabs>
|
49
|
+
<el-tab-pane label="tabs">
|
50
|
+
<div style="height:300px;background:#eee"></div>
|
51
|
+
<bi-table
|
52
|
+
border
|
53
|
+
stripe
|
54
|
+
fixed="sticky"
|
55
|
+
:data="data"
|
56
|
+
:column="fullscreenColumn"
|
57
|
+
:summary-method="getSummaries"
|
58
|
+
show-summary
|
59
|
+
></bi-table>
|
60
|
+
</el-tab-pane>
|
61
|
+
</el-tabs>
|
62
|
+
</div>
|
63
|
+
<div class="example-table-box">
|
64
|
+
<p>tooltipIcon在表格内的组件使用</p>
|
65
|
+
<bi-table
|
66
|
+
border
|
67
|
+
stripe
|
68
|
+
fixed="sticky"
|
69
|
+
:data="minData"
|
70
|
+
:column="renderColumn"
|
71
|
+
>
|
72
|
+
<template v-slot:province="{row}">
|
73
|
+
<BiTooltipIcon
|
74
|
+
:label="row.province"
|
75
|
+
content="这是props继承的写法,<br/>可根据不同需求配置属性"
|
76
|
+
placement="right"
|
77
|
+
icon="el-icon-warning-outline"
|
78
|
+
effect="light"
|
79
|
+
></BiTooltipIcon>
|
80
|
+
</template>
|
81
|
+
<template v-slot:city="{row}">
|
82
|
+
<BiTooltipIcon placement="right">
|
83
|
+
<template slot="tip-label"><span>{{ row.city }}</span></template>
|
84
|
+
<template slot="tip-content"><span>这是slot默认替换的写法,可用自定义的内容配合tooltip使用</span></template>
|
85
|
+
<template slot="tip-icon">
|
86
|
+
<i
|
87
|
+
class="el-icon-chat-dot-round"
|
88
|
+
style="color:#ff6700"
|
89
|
+
></i>
|
90
|
+
</template>
|
91
|
+
</BiTooltipIcon>
|
92
|
+
</template>
|
93
|
+
</bi-table>
|
94
|
+
</div> -->
|
95
|
+
</div>
|
96
|
+
</template>
|
97
|
+
|
98
|
+
<script>
|
99
|
+
// import BiTable from '@/components/BiTable'
|
100
|
+
import TableData from '@/table.js'
|
101
|
+
// import BiTableColumn from '@/components/BiTableColumn'
|
102
|
+
// import BiTooltipIcon from '@/components/BiTooltipIcon'
|
103
|
+
export default {
|
104
|
+
components: {
|
105
|
+
// BiTooltipIcon
|
106
|
+
// BiTable
|
107
|
+
// BiTableColumn
|
108
|
+
},
|
109
|
+
mixins: [TableData],
|
110
|
+
data() {
|
111
|
+
return {
|
112
|
+
basicData2: [],
|
113
|
+
basicColumn: [
|
114
|
+
{ label: '日期', prop: 'date', sortable: true, fixed: true },
|
115
|
+
{ label: '姓名', prop: 'name' },
|
116
|
+
{ label: '省份', prop: 'province' },
|
117
|
+
{ label: '市区', prop: 'city' },
|
118
|
+
{
|
119
|
+
label: '地址',
|
120
|
+
prop: 'address',
|
121
|
+
width: () => {
|
122
|
+
return this.aaWidth
|
123
|
+
}
|
124
|
+
},
|
125
|
+
{
|
126
|
+
label: '地址2',
|
127
|
+
prop: 'address2',
|
128
|
+
minWidth: () => {
|
129
|
+
return '100'
|
130
|
+
}
|
131
|
+
},
|
132
|
+
{ label: '邮编', prop: 'zip' },
|
133
|
+
{
|
134
|
+
label: 'v-model',
|
135
|
+
prop: 'other',
|
136
|
+
fixed: 'right',
|
137
|
+
render: (h, scope) => {
|
138
|
+
return h('input', {
|
139
|
+
on: {
|
140
|
+
input(event) {
|
141
|
+
scope.row.name = event.target.value
|
142
|
+
}
|
143
|
+
},
|
144
|
+
domProps: {
|
145
|
+
value: scope.row.name
|
146
|
+
},
|
147
|
+
style: {
|
148
|
+
width: '100%',
|
149
|
+
minHeight: '30px',
|
150
|
+
color: 'red',
|
151
|
+
border: '1px solid #ddd'
|
152
|
+
}
|
153
|
+
})
|
154
|
+
}
|
155
|
+
}
|
156
|
+
],
|
157
|
+
tableLoading: false,
|
158
|
+
columnsProps: {
|
159
|
+
width: 'auto'
|
160
|
+
},
|
161
|
+
total: 0,
|
162
|
+
listQuery: {
|
163
|
+
page: 2,
|
164
|
+
limit: 20
|
165
|
+
},
|
166
|
+
editForm: {},
|
167
|
+
dialogVisible: false
|
168
|
+
}
|
169
|
+
},
|
170
|
+
computed: {
|
171
|
+
aaWidth() {
|
172
|
+
return 400
|
173
|
+
}
|
174
|
+
},
|
175
|
+
methods: {
|
176
|
+
selectionChange(rows) {
|
177
|
+
console.log('selected', rows)
|
178
|
+
},
|
179
|
+
getList() {},
|
180
|
+
openDialog({ row }) {
|
181
|
+
this.editForm = Object.assign({}, row)
|
182
|
+
this.dialogVisible = true
|
183
|
+
},
|
184
|
+
setTableColumn(column) {
|
185
|
+
// this.tableLoading = true
|
186
|
+
this.$set(this, 'basicColumn', [])
|
187
|
+
setTimeout(() => {
|
188
|
+
this.$set(this, 'basicColumn', column)
|
189
|
+
// this.tableLoading = false
|
190
|
+
}, 10)
|
191
|
+
},
|
192
|
+
|
193
|
+
getSummaries() {
|
194
|
+
return ['合计', '2016-05-03', '王小虎', '上海', '普陀区', '上海市普陀区金沙江路 1518 弄', '上海市普陀区金沙江路 1518 弄', 200333]
|
195
|
+
},
|
196
|
+
search() {
|
197
|
+
const list = JSON.parse(JSON.stringify(this.data))
|
198
|
+
this.data = list.splice(0, 7)
|
199
|
+
// this.tableList2 = this.minData
|
200
|
+
this.$nextTick(() => {
|
201
|
+
this.$refs.table.resetHeaderFooter && this.$refs.table.resetHeaderFooter()
|
202
|
+
// var evt = window.document.createEvent('UIEvents')
|
203
|
+
// evt.initUIEvent('scroll', true, false, window, 0)
|
204
|
+
// window.dispatchEvent(evt)
|
205
|
+
})
|
206
|
+
}
|
207
|
+
}
|
208
|
+
}
|
209
|
+
</script>
|
210
|
+
|
211
|
+
<style lang="scss" scoped>
|
212
|
+
.example-table-box {
|
213
|
+
margin: 25px 50px;
|
214
|
+
|
215
|
+
p {
|
216
|
+
text-align: left;
|
217
|
+
font-weight: 700;
|
218
|
+
}
|
219
|
+
}
|
220
|
+
</style>
|