bi-element-ui 0.1.70 → 0.1.72
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/.eslintrc.js +1 -1
- package/.prettierignore +7 -0
- package/.prettierrc +1 -1
- package/.prettierrc.json +8 -0
- package/.vscode/extensions.json +2 -4
- package/dist/css/about.2c825c53.css +229 -1
- package/dist/css/chunk-vendors.14653146.css +12396 -1
- package/dist/css/index.98810efd.css +895 -1
- package/dist/js/about.2b6c42d7.js +548 -2
- package/dist/js/chunk-vendors.c73b5358.js +45955 -313
- package/dist/js/index.278e3840.js +3461 -2
- package/lib/bi-element-ui.common.js +521 -518
- package/lib/bi-element-ui.css +1 -1
- package/lib/bi-element-ui.umd.js +521 -518
- package/lib/bi-element-ui.umd.min.js +60 -60
- package/package-lock2.json +1 -1
- package/package.json +4 -1
- package/pnpm-lock.yaml +2558 -2559
- package/src/components/BiDatePicker/datePickerOption.js +28 -94
- package/src/components/BiDatePicker/index.vue +2 -17
- package/src/components/BiTable/columu.vue +6 -29
- package/src/components/BiTable/forced.js +10 -23
- package/src/components/BiTable/index.js +1 -1
- package/src/components/BiTable/table.vue +5 -28
- package/src/components/BiTableColumn/Group.vue +10 -12
- package/src/components/BiTableColumn/index.vue +28 -115
- package/src/components/BiTooltipIcon/index.vue +3 -11
- package/src/components/FreeButton/index.vue +6 -25
- package/src/components/Pagination/index.vue +2 -15
- package/src/components/Pagination/scrollTo.js +5 -9
- package/src/main.js +1 -1
- package/src/views/Date.vue +7 -43
- package/src/views/Home.vue +28 -145
- package/src/views/Scene.vue +7 -36
- package/src/views/Table.vue +3 -18
- package/src/views/showData.vue +4 -4
@@ -1,124 +1,63 @@
|
|
1
1
|
<template>
|
2
|
-
|
3
|
-
<el-button
|
4
|
-
type="primary"
|
5
|
-
@click="visible = true"
|
6
|
-
>
|
2
|
+
<el-button type="primary" @click="visible = true">
|
7
3
|
自定义列
|
8
|
-
<el-dialog
|
9
|
-
|
10
|
-
title="自定义列"
|
11
|
-
:visible.sync="visible"
|
12
|
-
width="800px"
|
13
|
-
top="8vh"
|
14
|
-
append-to-body
|
15
|
-
@open="handleOpen"
|
16
|
-
@close="close"
|
17
|
-
>
|
18
|
-
<div
|
19
|
-
class="dialog-body"
|
20
|
-
style="min-height: 160px"
|
21
|
-
>
|
4
|
+
<el-dialog custom-class="bi-column-dialog" title="自定义列" :visible.sync="visible" width="800px" top="8vh" append-to-body @open="handleOpen" @close="close">
|
5
|
+
<div class="dialog-body" style="min-height: 160px">
|
22
6
|
<div class="bi-column-container">
|
23
7
|
<div class="checkbox-container">
|
24
8
|
<el-card class="box-card">
|
25
|
-
<div
|
26
|
-
slot="header"
|
27
|
-
class="clearfix"
|
28
|
-
>
|
9
|
+
<div slot="header" class="clearfix">
|
29
10
|
<span>可操作性的列</span>
|
30
|
-
|
31
11
|
</div>
|
32
|
-
<div
|
33
|
-
v-for="(item, index) in colList"
|
34
|
-
:key="index"
|
35
|
-
class="checkbox-group"
|
36
|
-
>
|
12
|
+
<div v-for="(item, index) in colList" :key="index" class="checkbox-group">
|
37
13
|
<p class="checkbox-title">
|
38
14
|
<el-checkbox
|
39
15
|
v-model="item.status"
|
40
16
|
@change="
|
41
17
|
(val) => {
|
42
|
-
return handleCheckGroupAllChange(val, item)
|
18
|
+
return handleCheckGroupAllChange(val, item)
|
43
19
|
}
|
44
20
|
"
|
45
|
-
|
21
|
+
>{{ item.content }}</el-checkbox
|
22
|
+
>
|
46
23
|
</p>
|
47
24
|
<p>
|
48
|
-
<el-checkbox-group
|
49
|
-
v-
|
50
|
-
:true-label="1"
|
51
|
-
:false-label="0"
|
52
|
-
@change="handleCheckGroupAll(item)"
|
53
|
-
>
|
54
|
-
<el-checkbox
|
55
|
-
v-for="(city, cityIndex) in item.children"
|
56
|
-
:key="cityIndex"
|
57
|
-
:label="city.name"
|
58
|
-
style="width:120px;margin:0 15px 15px 0;"
|
59
|
-
>
|
25
|
+
<el-checkbox-group v-model="checkList" :true-label="1" :false-label="0" @change="handleCheckGroupAll(item)">
|
26
|
+
<el-checkbox v-for="(city, cityIndex) in item.children" :key="cityIndex" :label="city.name" style="width: 120px; margin: 0 15px 15px 0">
|
60
27
|
{{ city.content }}
|
61
28
|
</el-checkbox>
|
62
29
|
</el-checkbox-group>
|
63
30
|
</p>
|
64
31
|
</div>
|
65
32
|
</el-card>
|
66
|
-
|
67
33
|
</div>
|
68
34
|
<div class="column-container">
|
69
35
|
<el-card class="box-card">
|
70
|
-
<div
|
71
|
-
slot="header"
|
72
|
-
class="column-title"
|
73
|
-
>
|
36
|
+
<div slot="header" class="column-title">
|
74
37
|
<span>已选{{ columnLength }}列</span>
|
75
|
-
<el-button
|
76
|
-
type="text"
|
77
|
-
@click="clearAll"
|
78
|
-
>清空全部</el-button>
|
38
|
+
<el-button type="text" @click="clearAll">清空全部</el-button>
|
79
39
|
</div>
|
80
40
|
<p class="column-group-title">左侧固定列</p>
|
81
41
|
<div class="column-configurable">
|
82
|
-
<draggable
|
83
|
-
v-model="leftColumnList"
|
84
|
-
group="column"
|
85
|
-
>
|
42
|
+
<draggable v-model="leftColumnList" group="column">
|
86
43
|
<!-- <transition-group> -->
|
87
|
-
<div
|
88
|
-
v-for="column in leftColumnList"
|
89
|
-
:key="column.prop"
|
90
|
-
class="selected-column-item"
|
91
|
-
>
|
44
|
+
<div v-for="column in leftColumnList" :key="column.prop" class="selected-column-item">
|
92
45
|
<i class="el-icon-menu"></i>
|
93
|
-
<div class="column-name">{{ column.content||column.label }}</div>
|
94
|
-
<i
|
95
|
-
class="el-icon-close column-close"
|
96
|
-
@click="closeColumn(column.prop)"
|
97
|
-
></i>
|
46
|
+
<div class="column-name">{{ column.content || column.label }}</div>
|
47
|
+
<i class="el-icon-close column-close" @click="closeColumn(column.prop)"></i>
|
98
48
|
</div>
|
99
49
|
<!-- </transition-group> -->
|
100
50
|
</draggable>
|
101
|
-
|
102
51
|
</div>
|
103
52
|
|
104
53
|
<p class="column-group-title">中间不固定列</p>
|
105
54
|
<div class="column-configurable">
|
106
|
-
<draggable
|
107
|
-
v-model="columnList"
|
108
|
-
group="column"
|
109
|
-
>
|
55
|
+
<draggable v-model="columnList" group="column">
|
110
56
|
<!-- <transition-group> -->
|
111
|
-
<div
|
112
|
-
v-for="column in columnList"
|
113
|
-
:key="column.prop"
|
114
|
-
class="selected-column-item"
|
115
|
-
>
|
57
|
+
<div v-for="column in columnList" :key="column.prop" class="selected-column-item">
|
116
58
|
<i class="el-icon-menu"></i>
|
117
|
-
<div class="column-name">{{ column.content||column.label }}</div>
|
118
|
-
<i
|
119
|
-
class="el-icon-close column-close"
|
120
|
-
@click="closeColumn(column.prop)"
|
121
|
-
></i>
|
59
|
+
<div class="column-name">{{ column.content || column.label }}</div>
|
60
|
+
<i class="el-icon-close column-close" @click="closeColumn(column.prop)"></i>
|
122
61
|
</div>
|
123
62
|
<!-- </transition-group> -->
|
124
63
|
</draggable>
|
@@ -126,57 +65,31 @@
|
|
126
65
|
|
127
66
|
<p class="column-group-title">右侧固定列</p>
|
128
67
|
<div class="column-configurable">
|
129
|
-
<draggable
|
130
|
-
v-model="rightColumnList"
|
131
|
-
group="column"
|
132
|
-
>
|
68
|
+
<draggable v-model="rightColumnList" group="column">
|
133
69
|
<!-- <transition-group> -->
|
134
|
-
<div
|
135
|
-
v-for="column in rightColumnList"
|
136
|
-
:key="column.prop"
|
137
|
-
class="selected-column-item"
|
138
|
-
>
|
70
|
+
<div v-for="column in rightColumnList" :key="column.prop" class="selected-column-item">
|
139
71
|
<i class="el-icon-menu"></i>
|
140
|
-
<div class="column-name">{{ column.content||column.label }}</div>
|
141
|
-
<i
|
142
|
-
class="el-icon-close column-close"
|
143
|
-
@click="closeColumn(column.prop)"
|
144
|
-
></i>
|
72
|
+
<div class="column-name">{{ column.content || column.label }}</div>
|
73
|
+
<i class="el-icon-close column-close" @click="closeColumn(column.prop)"></i>
|
145
74
|
</div>
|
146
75
|
<!-- </transition-group> -->
|
147
76
|
</draggable>
|
148
|
-
|
149
77
|
</div>
|
150
|
-
|
151
78
|
</el-card>
|
152
79
|
</div>
|
153
80
|
</div>
|
154
81
|
</div>
|
155
|
-
<span
|
156
|
-
slot="footer"
|
157
|
-
class="dialog-footer"
|
158
|
-
style="display: flex; justify-content: space-between"
|
159
|
-
>
|
82
|
+
<span slot="footer" class="dialog-footer" style="display: flex; justify-content: space-between">
|
160
83
|
<span style="display: inline-block; line-height: 32px">
|
161
|
-
<el-checkbox
|
162
|
-
v-model="checkAllData"
|
163
|
-
label="全选"
|
164
|
-
@change="checkAll"
|
165
|
-
>
|
166
|
-
全选
|
167
|
-
</el-checkbox>
|
84
|
+
<el-checkbox v-model="checkAllData" label="全选" @change="checkAll"> 全选 </el-checkbox>
|
168
85
|
</span>
|
169
86
|
<div>
|
170
87
|
<el-button @click="close">关闭</el-button>
|
171
|
-
<el-button
|
172
|
-
type="primary"
|
173
|
-
@click="ok"
|
174
|
-
>生效</el-button>
|
88
|
+
<el-button type="primary" @click="ok">生效</el-button>
|
175
89
|
</div>
|
176
90
|
</span>
|
177
91
|
</el-dialog>
|
178
92
|
</el-button>
|
179
|
-
|
180
93
|
</template>
|
181
94
|
|
182
95
|
<script>
|
@@ -612,4 +525,4 @@ export default {
|
|
612
525
|
overflow-y: auto;
|
613
526
|
}
|
614
527
|
}
|
615
|
-
</style>
|
528
|
+
</style>
|
@@ -12,12 +12,7 @@
|
|
12
12
|
<slot name="tip-label">
|
13
13
|
<span>{{ label }}</span>
|
14
14
|
</slot>
|
15
|
-
<el-tooltip
|
16
|
-
class="tooltip-icon"
|
17
|
-
:effect="effect"
|
18
|
-
:placement="placement"
|
19
|
-
v-bind="$attrs"
|
20
|
-
>
|
15
|
+
<el-tooltip class="tooltip-icon" :effect="effect" :placement="placement" v-bind="$attrs">
|
21
16
|
<template slot="content">
|
22
17
|
<slot name="tip-content">
|
23
18
|
<div v-html="content"></div>
|
@@ -25,14 +20,13 @@
|
|
25
20
|
</template>
|
26
21
|
|
27
22
|
<slot name="tip-icon">
|
28
|
-
<span style="margin-left:5px">
|
23
|
+
<span style="margin-left: 5px">
|
29
24
|
<!-- 这里默认采用的是el-icon的图标 -->
|
30
25
|
<i :class="icon"></i>
|
31
26
|
</span>
|
32
27
|
</slot>
|
33
28
|
</el-tooltip>
|
34
29
|
</span>
|
35
|
-
|
36
30
|
</template>
|
37
31
|
|
38
32
|
<script>
|
@@ -66,6 +60,4 @@ export default {
|
|
66
60
|
}
|
67
61
|
</script>
|
68
62
|
|
69
|
-
<style>
|
70
|
-
</style>
|
71
|
-
|
63
|
+
<style></style>
|
@@ -1,31 +1,12 @@
|
|
1
1
|
<template>
|
2
2
|
<div class="free-button">
|
3
3
|
<slot></slot>
|
4
|
-
<el-button
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
<el-button
|
10
|
-
type="primary"
|
11
|
-
icon="el-icon-edit"
|
12
|
-
>编辑</el-button>
|
13
|
-
<el-button
|
14
|
-
type="success"
|
15
|
-
icon="el-icon-plus"
|
16
|
-
>新增</el-button>
|
17
|
-
<el-button
|
18
|
-
type="info"
|
19
|
-
icon="el-icon-download"
|
20
|
-
>导出</el-button>
|
21
|
-
<el-button
|
22
|
-
type="warning"
|
23
|
-
icon="el-icon-upload2"
|
24
|
-
>导入</el-button>
|
25
|
-
<el-button
|
26
|
-
type="danger"
|
27
|
-
icon="el-icon-delete"
|
28
|
-
>删除</el-button>
|
4
|
+
<el-button type="primary" icon="el-icon-search" @click="search">查询</el-button>
|
5
|
+
<el-button type="primary" icon="el-icon-edit">编辑</el-button>
|
6
|
+
<el-button type="success" icon="el-icon-plus">新增</el-button>
|
7
|
+
<el-button type="info" icon="el-icon-download">导出</el-button>
|
8
|
+
<el-button type="warning" icon="el-icon-upload2">导入</el-button>
|
9
|
+
<el-button type="danger" icon="el-icon-delete">删除</el-button>
|
29
10
|
</div>
|
30
11
|
</template>
|
31
12
|
|
@@ -1,19 +1,6 @@
|
|
1
1
|
<template>
|
2
|
-
<div
|
3
|
-
:
|
4
|
-
class="pagination-container"
|
5
|
-
>
|
6
|
-
<el-pagination
|
7
|
-
:background="background"
|
8
|
-
:current-page.sync="currentPage"
|
9
|
-
:page-size.sync="pageSize"
|
10
|
-
:layout="layout"
|
11
|
-
:page-sizes="pageSizes"
|
12
|
-
:total="total"
|
13
|
-
v-bind="$attrs"
|
14
|
-
@size-change="handleSizeChange"
|
15
|
-
@current-change="handleCurrentChange"
|
16
|
-
/>
|
2
|
+
<div :class="{ hidden: hidden }" class="pagination-container">
|
3
|
+
<el-pagination :background="background" :current-page.sync="currentPage" :page-size.sync="pageSize" :layout="layout" :page-sizes="pageSizes" :total="total" v-bind="$attrs" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
|
17
4
|
</div>
|
18
5
|
</template>
|
19
6
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
Math.easeInOutQuad = function(t, b, c, d) {
|
1
|
+
Math.easeInOutQuad = function (t, b, c, d) {
|
2
2
|
t /= d / 2
|
3
3
|
if (t < 1) {
|
4
4
|
return (c / 2) * t * t + b
|
@@ -8,12 +8,12 @@ Math.easeInOutQuad = function(t, b, c, d) {
|
|
8
8
|
}
|
9
9
|
|
10
10
|
// requestAnimationFrame for Smart Animating http://goo.gl/sx5sts
|
11
|
-
var requestAnimFrame = (function() {
|
11
|
+
var requestAnimFrame = (function () {
|
12
12
|
return (
|
13
13
|
window.requestAnimationFrame ||
|
14
14
|
window.webkitRequestAnimationFrame ||
|
15
15
|
window.mozRequestAnimationFrame ||
|
16
|
-
function(callback) {
|
16
|
+
function (callback) {
|
17
17
|
window.setTimeout(callback, 1000 / 60)
|
18
18
|
}
|
19
19
|
)
|
@@ -30,11 +30,7 @@ function move(amount) {
|
|
30
30
|
}
|
31
31
|
|
32
32
|
function position() {
|
33
|
-
return
|
34
|
-
document.documentElement.scrollTop ||
|
35
|
-
document.body.parentNode.scrollTop ||
|
36
|
-
document.body.scrollTop
|
37
|
-
)
|
33
|
+
return document.documentElement.scrollTop || document.body.parentNode.scrollTop || document.body.scrollTop
|
38
34
|
}
|
39
35
|
|
40
36
|
/**
|
@@ -48,7 +44,7 @@ export function scrollTo(to, duration, callback) {
|
|
48
44
|
const increment = 20
|
49
45
|
let currentTime = 0
|
50
46
|
duration = typeof duration === 'undefined' ? 500 : duration
|
51
|
-
var animateScroll = function() {
|
47
|
+
var animateScroll = function () {
|
52
48
|
// increment the time
|
53
49
|
currentTime += increment
|
54
50
|
// find the value with the quadratic in-out easing function
|
package/src/main.js
CHANGED
package/src/views/Date.vue
CHANGED
@@ -2,65 +2,29 @@
|
|
2
2
|
<div class="free-table">
|
3
3
|
<div class="example-table-box">
|
4
4
|
<p>基础日期-{{ date }}</p>
|
5
|
-
<BiDatePicker
|
6
|
-
v-model="date"
|
7
|
-
type="date"
|
8
|
-
placeholder="选择日期"
|
9
|
-
></BiDatePicker>
|
5
|
+
<BiDatePicker v-model="date" type="date" placeholder="选择日期"></BiDatePicker>
|
10
6
|
</div>
|
11
7
|
<div class="example-table-box">
|
12
8
|
<p>基础周-{{ date1 }}</p>
|
13
|
-
<BiDatePicker
|
14
|
-
v-model="date1"
|
15
|
-
type="week"
|
16
|
-
placeholder="选择周"
|
17
|
-
></BiDatePicker>
|
9
|
+
<BiDatePicker v-model="date1" type="week" placeholder="选择周"></BiDatePicker>
|
18
10
|
</div>
|
19
11
|
<div class="example-table-box">
|
20
12
|
<p>基础月-{{ date2 }}</p>
|
21
|
-
<BiDatePicker
|
22
|
-
v-model="date2"
|
23
|
-
type="month"
|
24
|
-
placeholder="选择周"
|
25
|
-
></BiDatePicker>
|
13
|
+
<BiDatePicker v-model="date2" type="month" placeholder="选择周"></BiDatePicker>
|
26
14
|
</div>
|
27
15
|
<div class="example-table-box">
|
28
16
|
<p>范围日期-{{ date3 }}</p>
|
29
|
-
<BiDatePicker
|
30
|
-
v-model="date3"
|
31
|
-
type="daterange"
|
32
|
-
placeholder="选择日期1"
|
33
|
-
:picker-option="pickerOptions1"
|
34
|
-
></BiDatePicker>
|
17
|
+
<BiDatePicker v-model="date3" type="daterange" placeholder="选择日期1" :picker-option="pickerOptions1"></BiDatePicker>
|
35
18
|
<p>范围日期-{{ date7 }}</p>
|
36
|
-
<BiDatePicker
|
37
|
-
v-model="date7"
|
38
|
-
type="daterange"
|
39
|
-
placeholder="选择日期2"
|
40
|
-
:picker-option="pickerOptions2"
|
41
|
-
></BiDatePicker>
|
19
|
+
<BiDatePicker v-model="date7" type="daterange" placeholder="选择日期2" :picker-option="pickerOptions2"></BiDatePicker>
|
42
20
|
</div>
|
43
21
|
<div class="example-table-box">
|
44
22
|
<p>范围月-{{ date5 }}</p>
|
45
|
-
<BiDatePicker
|
46
|
-
v-model="date5"
|
47
|
-
type="monthrange"
|
48
|
-
placeholder="选择日期"
|
49
|
-
format="yyyy-MM"
|
50
|
-
></BiDatePicker>
|
23
|
+
<BiDatePicker v-model="date5" type="monthrange" placeholder="选择日期" format="yyyy-MM"></BiDatePicker>
|
51
24
|
</div>
|
52
25
|
<div class="example-table-box">
|
53
26
|
<p>范围日期时间-{{ date6 }}</p>
|
54
|
-
<BiDatePicker
|
55
|
-
v-model="date6"
|
56
|
-
type="datetimerange"
|
57
|
-
format="yyyy-MM-dd HH:mm:ss"
|
58
|
-
value-format="yyyy-MM-dd HH:mm:ss"
|
59
|
-
:default-time="['00:00:00','23:59:59']"
|
60
|
-
range-separator="至"
|
61
|
-
start-placeholder="开始日期"
|
62
|
-
end-placeholder="结束日期"
|
63
|
-
></BiDatePicker>
|
27
|
+
<BiDatePicker v-model="date6" type="datetimerange" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" :default-time="['00:00:00', '23:59:59']" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></BiDatePicker>
|
64
28
|
</div>
|
65
29
|
</div>
|
66
30
|
</template>
|