bi-element-ui 1.1.96 → 1.1.98

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.
Files changed (49) hide show
  1. package/.browserslistrc +3 -3
  2. package/.eslintignore +1 -1
  3. package/.prettierrc +8 -8
  4. package/.prettierrc.json +8 -8
  5. package/.vscode/extensions.json +3 -3
  6. package/.vscode/settings.json +2 -2
  7. package/README.md +148 -148
  8. package/cypress.json +3 -3
  9. package/lib/bi-element-ui.common.js +134944 -134912
  10. package/lib/bi-element-ui.css +2 -2
  11. package/lib/bi-element-ui.umd.js +134944 -134912
  12. package/lib/bi-element-ui.umd.min.js +47 -47
  13. package/package-lock2.json +17309 -17309
  14. package/package.json +1 -1
  15. package/pnpm-lock.yaml +13329 -0
  16. package/src/App.vue +2 -0
  17. package/src/components/BiDatePicker/datePickerOption.js +163 -163
  18. package/src/components/BiDatePicker/index.vue +59 -59
  19. package/src/components/BiTable/columu.vue +81 -81
  20. package/src/components/BiTable/forced.js +63 -63
  21. package/src/components/BiTable/index.js +6 -6
  22. package/src/components/BiTable/render.vue +13 -13
  23. package/src/components/BiTable/table.vue +179 -179
  24. package/src/components/BiTableColumn/Group.vue +275 -275
  25. package/src/components/BiTableColumn/api.js +16 -16
  26. package/src/components/BiTooltipIcon/index.vue +63 -63
  27. package/src/components/EditBtn.vue +15 -15
  28. package/src/components/FreeButton/index.vue +50 -50
  29. package/src/components/Pagination/index.vue +91 -91
  30. package/src/components/Pagination/scrollTo.js +65 -65
  31. package/src/main.js +3 -1
  32. package/src/router/index.js +49 -44
  33. package/src/store/index.js +11 -11
  34. package/src/utils/auth.js +66 -0
  35. package/src/utils/index.js +296 -0
  36. package/src/utils/request.js +81 -0
  37. package/src/views/Date.vue +96 -96
  38. package/src/views/Home.vue +12 -5
  39. package/src/views/Layout.vue +34 -34
  40. package/src/views/Log.vue +18 -0
  41. package/src/views/Scene.vue +111 -111
  42. package/src/views/showData.vue +2 -2
  43. package/tests/e2e/.eslintrc.js +10 -10
  44. package/tests/e2e/plugins/index.js +25 -25
  45. package/tests/e2e/specs/test.js +8 -8
  46. package/tests/e2e/support/commands.js +25 -25
  47. package/tests/e2e/support/index.js +20 -20
  48. package/tests/unit/example.spec.js +13 -13
  49. package//345/211/215/347/253/257ui/346/240/267/345/274/217/350/247/204/350/214/203.md +101 -101
@@ -1,63 +1,63 @@
1
- <!--
2
- * @Author:gjh
3
- * @Date: 2021-12-30 14:27:46
4
- * @LastEditTime: 2021-12-30 16:15:22
5
- * @LastEditors: Please set LastEditors
6
- * @Description: 基于bi项目表格图标提示的需求
7
- * @FilePath: \bi-element-ui\packages\TooltipIcon\src\index.vue
8
- -->
9
- <template>
10
- <span>
11
- <!-- 支持属性props的写法和插槽替换的写法 -->
12
- <slot name="tip-label">
13
- <span>{{ label }}</span>
14
- </slot>
15
- <el-tooltip class="tooltip-icon" :effect="effect" :placement="placement" v-bind="$attrs">
16
- <template slot="content">
17
- <slot name="tip-content">
18
- <div v-html="content"></div>
19
- </slot>
20
- </template>
21
-
22
- <slot name="tip-icon">
23
- <span style="margin-left: 5px">
24
- <!-- 这里默认采用的是el-icon的图标 -->
25
- <i :class="icon"></i>
26
- </span>
27
- </slot>
28
- </el-tooltip>
29
- </span>
30
- </template>
31
-
32
- <script>
33
- export default {
34
- name: 'BiTooltipIcon',
35
- props: {
36
- label: {
37
- type: String,
38
- default: '头部标题'
39
- },
40
- icon: {
41
- type: String,
42
- default: 'el-icon-warning-outline'
43
- },
44
- content: {
45
- type: String,
46
- default: '提示内容'
47
- },
48
- placement: {
49
- type: String,
50
- default: 'bottom'
51
- },
52
- effect: {
53
- type: String,
54
- default: 'dark'
55
- }
56
- },
57
- data() {
58
- return {}
59
- }
60
- }
61
- </script>
62
-
63
- <style></style>
1
+ <!--
2
+ * @Author:gjh
3
+ * @Date: 2021-12-30 14:27:46
4
+ * @LastEditTime: 2021-12-30 16:15:22
5
+ * @LastEditors: Please set LastEditors
6
+ * @Description: 基于bi项目表格图标提示的需求
7
+ * @FilePath: \bi-element-ui\packages\TooltipIcon\src\index.vue
8
+ -->
9
+ <template>
10
+ <span>
11
+ <!-- 支持属性props的写法和插槽替换的写法 -->
12
+ <slot name="tip-label">
13
+ <span>{{ label }}</span>
14
+ </slot>
15
+ <el-tooltip class="tooltip-icon" :effect="effect" :placement="placement" v-bind="$attrs">
16
+ <template slot="content">
17
+ <slot name="tip-content">
18
+ <div v-html="content"></div>
19
+ </slot>
20
+ </template>
21
+
22
+ <slot name="tip-icon">
23
+ <span style="margin-left: 5px">
24
+ <!-- 这里默认采用的是el-icon的图标 -->
25
+ <i :class="icon"></i>
26
+ </span>
27
+ </slot>
28
+ </el-tooltip>
29
+ </span>
30
+ </template>
31
+
32
+ <script>
33
+ export default {
34
+ name: 'BiTooltipIcon',
35
+ props: {
36
+ label: {
37
+ type: String,
38
+ default: '头部标题'
39
+ },
40
+ icon: {
41
+ type: String,
42
+ default: 'el-icon-warning-outline'
43
+ },
44
+ content: {
45
+ type: String,
46
+ default: '提示内容'
47
+ },
48
+ placement: {
49
+ type: String,
50
+ default: 'bottom'
51
+ },
52
+ effect: {
53
+ type: String,
54
+ default: 'dark'
55
+ }
56
+ },
57
+ data() {
58
+ return {}
59
+ }
60
+ }
61
+ </script>
62
+
63
+ <style></style>
@@ -1,15 +1,15 @@
1
- <template>
2
- <el-button size="mini" @click="todo">编辑</el-button>
3
- </template>
4
-
5
- <script>
6
- export default {
7
- props: ['row', 'column'],
8
-
9
- methods: {
10
- todo() {
11
- this.$emit('row-edit', this.row)
12
- }
13
- }
14
- }
15
- </script>
1
+ <template>
2
+ <el-button size="mini" @click="todo">编辑</el-button>
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ props: ['row', 'column'],
8
+
9
+ methods: {
10
+ todo() {
11
+ this.$emit('row-edit', this.row)
12
+ }
13
+ }
14
+ }
15
+ </script>
@@ -1,50 +1,50 @@
1
- <template>
2
- <div class="free-button">
3
- <slot></slot>
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>
10
- </div>
11
- </template>
12
-
13
- <script>
14
- const EVENT_NAMES = ['search', 'add', 'edit', 'delete', 'import', 'exprot']
15
-
16
- const methods = {}
17
- // const capitalizeFirstLetter = str => str.charAt(0).toUpperCase() + str.slice(1)
18
-
19
- EVENT_NAMES.forEach((name) => {
20
- methods[name] = function () {
21
- this.$emit(name)
22
- }
23
- })
24
-
25
- export default {
26
- name: 'FreeButton',
27
- props: {
28
- btnsCol: {
29
- type: Array,
30
- default: () => {
31
- return [
32
- { type: 'search', label: '查询', event: 'onSearch' },
33
- { type: 'delete', label: '删除', event: 'onDelete' }
34
- ]
35
- }
36
- },
37
- btnsProps: Object
38
- },
39
- methods: {
40
- bindEvents(name) {
41
- this.$emit(name)
42
- }
43
- }
44
- }
45
- </script>
46
- <style>
47
- .free-button {
48
- margin: 10px 0;
49
- }
50
- </style>
1
+ <template>
2
+ <div class="free-button">
3
+ <slot></slot>
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>
10
+ </div>
11
+ </template>
12
+
13
+ <script>
14
+ const EVENT_NAMES = ['search', 'add', 'edit', 'delete', 'import', 'exprot']
15
+
16
+ const methods = {}
17
+ // const capitalizeFirstLetter = str => str.charAt(0).toUpperCase() + str.slice(1)
18
+
19
+ EVENT_NAMES.forEach((name) => {
20
+ methods[name] = function () {
21
+ this.$emit(name)
22
+ }
23
+ })
24
+
25
+ export default {
26
+ name: 'FreeButton',
27
+ props: {
28
+ btnsCol: {
29
+ type: Array,
30
+ default: () => {
31
+ return [
32
+ { type: 'search', label: '查询', event: 'onSearch' },
33
+ { type: 'delete', label: '删除', event: 'onDelete' }
34
+ ]
35
+ }
36
+ },
37
+ btnsProps: Object
38
+ },
39
+ methods: {
40
+ bindEvents(name) {
41
+ this.$emit(name)
42
+ }
43
+ }
44
+ }
45
+ </script>
46
+ <style>
47
+ .free-button {
48
+ margin: 10px 0;
49
+ }
50
+ </style>
@@ -1,91 +1,91 @@
1
- <template>
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" />
4
- </div>
5
- </template>
6
-
7
- <script>
8
- import { scrollTo } from './scrollTo'
9
-
10
- export default {
11
- name: 'Pagination',
12
- props: {
13
- total: {
14
- required: true,
15
- type: Number
16
- },
17
- page: {
18
- type: Number,
19
- default: 1
20
- },
21
- limit: {
22
- type: Number,
23
- default: 20
24
- },
25
- pageSizes: {
26
- type: Array,
27
- default() {
28
- return [10, 20, 30, 50]
29
- }
30
- },
31
- layout: {
32
- type: String,
33
- default: 'total, sizes, prev, pager, next, jumper'
34
- },
35
- background: {
36
- type: Boolean,
37
- default: true
38
- },
39
- autoScroll: {
40
- type: Boolean,
41
- default: true
42
- },
43
- hidden: {
44
- type: Boolean,
45
- default: false
46
- }
47
- },
48
- computed: {
49
- currentPage: {
50
- get() {
51
- return this.page
52
- },
53
- set(val) {
54
- this.$emit('update:page', val)
55
- }
56
- },
57
- pageSize: {
58
- get() {
59
- return this.limit
60
- },
61
- set(val) {
62
- this.$emit('update:limit', val)
63
- }
64
- }
65
- },
66
- methods: {
67
- handleSizeChange(val) {
68
- this.$emit('pagination', { page: this.currentPage, limit: val })
69
- if (this.autoScroll) {
70
- scrollTo(0, 800)
71
- }
72
- },
73
- handleCurrentChange(val) {
74
- this.$emit('pagination', { page: val, limit: this.pageSize })
75
- if (this.autoScroll) {
76
- scrollTo(0, 800)
77
- }
78
- }
79
- }
80
- }
81
- </script>
82
-
83
- <style scoped>
84
- .pagination-container {
85
- background: #fff;
86
- padding: 20px 16px;
87
- }
88
- .pagination-container.hidden {
89
- display: none;
90
- }
91
- </style>
1
+ <template>
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" />
4
+ </div>
5
+ </template>
6
+
7
+ <script>
8
+ import { scrollTo } from './scrollTo'
9
+
10
+ export default {
11
+ name: 'Pagination',
12
+ props: {
13
+ total: {
14
+ required: true,
15
+ type: Number
16
+ },
17
+ page: {
18
+ type: Number,
19
+ default: 1
20
+ },
21
+ limit: {
22
+ type: Number,
23
+ default: 20
24
+ },
25
+ pageSizes: {
26
+ type: Array,
27
+ default() {
28
+ return [10, 20, 30, 50]
29
+ }
30
+ },
31
+ layout: {
32
+ type: String,
33
+ default: 'total, sizes, prev, pager, next, jumper'
34
+ },
35
+ background: {
36
+ type: Boolean,
37
+ default: true
38
+ },
39
+ autoScroll: {
40
+ type: Boolean,
41
+ default: true
42
+ },
43
+ hidden: {
44
+ type: Boolean,
45
+ default: false
46
+ }
47
+ },
48
+ computed: {
49
+ currentPage: {
50
+ get() {
51
+ return this.page
52
+ },
53
+ set(val) {
54
+ this.$emit('update:page', val)
55
+ }
56
+ },
57
+ pageSize: {
58
+ get() {
59
+ return this.limit
60
+ },
61
+ set(val) {
62
+ this.$emit('update:limit', val)
63
+ }
64
+ }
65
+ },
66
+ methods: {
67
+ handleSizeChange(val) {
68
+ this.$emit('pagination', { page: this.currentPage, limit: val })
69
+ if (this.autoScroll) {
70
+ scrollTo(0, 800)
71
+ }
72
+ },
73
+ handleCurrentChange(val) {
74
+ this.$emit('pagination', { page: val, limit: this.pageSize })
75
+ if (this.autoScroll) {
76
+ scrollTo(0, 800)
77
+ }
78
+ }
79
+ }
80
+ }
81
+ </script>
82
+
83
+ <style scoped>
84
+ .pagination-container {
85
+ background: #fff;
86
+ padding: 20px 16px;
87
+ }
88
+ .pagination-container.hidden {
89
+ display: none;
90
+ }
91
+ </style>
@@ -1,65 +1,65 @@
1
- Math.easeInOutQuad = function (t, b, c, d) {
2
- t /= d / 2
3
- if (t < 1) {
4
- return (c / 2) * t * t + b
5
- }
6
- t--
7
- return (-c / 2) * (t * (t - 2) - 1) + b
8
- }
9
-
10
- // requestAnimationFrame for Smart Animating http://goo.gl/sx5sts
11
- var requestAnimFrame = (function () {
12
- return (
13
- window.requestAnimationFrame ||
14
- window.webkitRequestAnimationFrame ||
15
- window.mozRequestAnimationFrame ||
16
- function (callback) {
17
- window.setTimeout(callback, 1000 / 60)
18
- }
19
- )
20
- })()
21
-
22
- /**
23
- * Because it's so fucking difficult to detect the scrolling element, just move them all
24
- * @param {number} amount
25
- */
26
- function move(amount) {
27
- document.documentElement.scrollTop = amount
28
- document.body.parentNode.scrollTop = amount
29
- document.body.scrollTop = amount
30
- }
31
-
32
- function position() {
33
- return document.documentElement.scrollTop || document.body.parentNode.scrollTop || document.body.scrollTop
34
- }
35
-
36
- /**
37
- * @param {number} to
38
- * @param {number} duration
39
- * @param {Function} callback
40
- */
41
- export function scrollTo(to, duration, callback) {
42
- const start = position()
43
- const change = to - start
44
- const increment = 20
45
- let currentTime = 0
46
- duration = typeof duration === 'undefined' ? 500 : duration
47
- var animateScroll = function () {
48
- // increment the time
49
- currentTime += increment
50
- // find the value with the quadratic in-out easing function
51
- var val = Math.easeInOutQuad(currentTime, start, change, duration)
52
- // move the document.body
53
- move(val)
54
- // do the animation unless its over
55
- if (currentTime < duration) {
56
- requestAnimFrame(animateScroll)
57
- } else {
58
- if (callback && typeof callback === 'function') {
59
- // the animation is done so lets callback
60
- callback()
61
- }
62
- }
63
- }
64
- animateScroll()
65
- }
1
+ Math.easeInOutQuad = function (t, b, c, d) {
2
+ t /= d / 2
3
+ if (t < 1) {
4
+ return (c / 2) * t * t + b
5
+ }
6
+ t--
7
+ return (-c / 2) * (t * (t - 2) - 1) + b
8
+ }
9
+
10
+ // requestAnimationFrame for Smart Animating http://goo.gl/sx5sts
11
+ var requestAnimFrame = (function () {
12
+ return (
13
+ window.requestAnimationFrame ||
14
+ window.webkitRequestAnimationFrame ||
15
+ window.mozRequestAnimationFrame ||
16
+ function (callback) {
17
+ window.setTimeout(callback, 1000 / 60)
18
+ }
19
+ )
20
+ })()
21
+
22
+ /**
23
+ * Because it's so fucking difficult to detect the scrolling element, just move them all
24
+ * @param {number} amount
25
+ */
26
+ function move(amount) {
27
+ document.documentElement.scrollTop = amount
28
+ document.body.parentNode.scrollTop = amount
29
+ document.body.scrollTop = amount
30
+ }
31
+
32
+ function position() {
33
+ return document.documentElement.scrollTop || document.body.parentNode.scrollTop || document.body.scrollTop
34
+ }
35
+
36
+ /**
37
+ * @param {number} to
38
+ * @param {number} duration
39
+ * @param {Function} callback
40
+ */
41
+ export function scrollTo(to, duration, callback) {
42
+ const start = position()
43
+ const change = to - start
44
+ const increment = 20
45
+ let currentTime = 0
46
+ duration = typeof duration === 'undefined' ? 500 : duration
47
+ var animateScroll = function () {
48
+ // increment the time
49
+ currentTime += increment
50
+ // find the value with the quadratic in-out easing function
51
+ var val = Math.easeInOutQuad(currentTime, start, change, duration)
52
+ // move the document.body
53
+ move(val)
54
+ // do the animation unless its over
55
+ if (currentTime < duration) {
56
+ requestAnimFrame(animateScroll)
57
+ } else {
58
+ if (callback && typeof callback === 'function') {
59
+ // the animation is done so lets callback
60
+ callback()
61
+ }
62
+ }
63
+ }
64
+ animateScroll()
65
+ }
package/src/main.js CHANGED
@@ -6,12 +6,14 @@ import App from './App.vue'
6
6
  import router from './router'
7
7
  import store from './store'
8
8
  import BiUi from '../packages'
9
+ import request from './utils/request'
9
10
 
10
11
  Vue.use(ElementUI)
11
12
  Vue.use(BiUi, {
13
+ request,
12
14
  dev: process.env.NODE_ENV !== 'production',
13
15
  env: process.env.NODE_ENV,
14
- system: 'pigeon'
16
+ system: 'zhangquan'
15
17
  })
16
18
 
17
19
  Vue.config.productionTip = false