@bsgoal/common 2.14.6 → 2.15.0
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/dist/index.mjs +3025 -2919
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +13 -13
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/bsgoal-base-sizes/demo.vue +34 -0
- package/src/components/bsgoal-base-sizes/index.vue +169 -0
- package/src/components/bsgoal-base-table-pagination/demo.vue +35 -0
- package/src/components/bsgoal-base-table-pagination/index.vue +9 -5
- package/src/components/bsgoal-base-tree-table/index.vue +15 -1
- package/src/router/index.js +11 -1
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.base_tooltip_popper{max-width:20em}.bsgoal-base-form .base_form .el-form-item{margin-right:10px}.bsgoal-base-form .base_form div.el-input,.bsgoal-base-form .base_form div.el-select{width:100%}.bsgoal-base-form .base_form--visible{width:0px;height:0px;overflow:hidden}.bsgoal-base-table-pagination{text-align:right}.bsgoal-base-table-pagination .base_table_pagination{display:inline-block;margin-top:16px}.bsgoal-base-table-empty .base_table_empty{text-align:center}.bsgoal-base-table-empty .base_table_empty_img{padding-top:16px;line-height:initial}.bsgoal-base-table-empty .base_table_empty_text{display:inline-block}.bsgoal-base-table .base_table{padding:16px}.bsgoal-base-table .base_table_menu{margin-bottom:8px}.bsgoal-base-table .el-table__body-wrapper{overflow-y:hidden!important}.bsgoal-base-table .el-scrollbar__view{height:100%}.bsgoal-base-table .base_table--tree{margin-top:10px}.bsgoal-base-table th>div.cell{white-space:nowrap}.bsgoal-base-line .base_line{height:10px;background-color:#f0f2f5}.bsgoal-base-line .bsgoal-base-line__vertical{display:inline-block;height:100%}.bsgoal-base-line .base_line__vertical{width:10px;height:100%}.bsgoal-base-line .bsgoal-base-line__fill{position:absolute;left:0;right:0}.bsgoal-base-search-operation{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:33.5px}.bsgoal-base-search-operation .operation_fold{margin-left:12px;cursor:pointer;min-width:3em}.bsgoal-base-cascader{height:100%;width:100%}.bsgoal-base-cascader .base_cascader{width:inherit;height:inherit}.bsgoal-base-search .base_search{padding:16px 6px 8px 16px}.bsgoal-base-search .base_search .el-form-item{margin-bottom:8px;margin-right:10px}.bsgoal-base-search .base_search div.el-input,.bsgoal-base-search .base_search div.el-select{width:100%}.bsgoal-base-search .el-col{margin-bottom:0!important}.bsgoal-base-tree-fold .base_tree_fold{position:absolute;top:0;bottom:0;right:10px;margin:auto;width:14px;height:38px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:10px;background-color:var(--el-color-primary)}.bsgoal-base-tree-fold .base_tree_fold--hide{right:0px}.bsgoal-base-tree{display:inline-block}.bsgoal-base-tree .base_tree{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;min-width:14px}.bsgoal-base-tree .base_tree_main{width:221px;padding:16px;scrollbar-width:none;-ms-overflow-style:none;overflow-x:hidden;overflow-y:auto}.bsgoal-base-tree .base_tree_main::-webkit-scrollbar{width:6px;height:6px}.bsgoal-base-tree .base_tree_main::-webkit-scrollbar-thumb{border-radius:10px;background:rgba(0,0,0,.2);width:20px}.bsgoal-base-tree .base_tree_main::-webkit-scrollbar-track{background-color:#fff}.bsgoal-base-tree .base_tree_main_input{margin-bottom:10px}.bsgoal-base-tree .base_tree .el-tree-node__content>i.el-tree-node__expand-icon{padding-left:0}.bsgoal-base-tree .base_tree_node{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1;flex:1}.bsgoal-base-tree .base_tree_node_label{-webkit-box-flex:1;-ms-flex:1;flex:1}.bsgoal-base-tree .base_tree_node_icon{-webkit-box-flex:0;-ms-flex:none;flex:none}.bsgoal-base-button,.bsgoal-base-button .base_button{display:inline-block}.bsgoal-base-dialog .base_dialog_header{font-weight:500;color:#303133;font-size:16px}.bsgoal-base-dialog .bsgoal-dialog__footer--conceal .el-dialog__footer{display:none}.bsgoal-base-dialog .el-dialog__footer{height:initial;line-height:initial}.bsgoal-base-dialog .el-dialog__footer .el-button{margin-left:initial}.bsgoal-base-dialog .bsgoal_base_dialog_main .el-dialog__header{padding:16px 30px;margin-right:0;background-color:#f5f7fa;height:initial!important}.bsgoal-base-dialog .bsgoal_base_dialog_main .el-dialog__header .el-dialog__headerbtn{top:0px;right:8px}.bsgoal-base-dialog .bsgoal_base_dialog_main .el-dialog__body{padding:0}.bsgoal-base-dialog .bsgoal_base_dialog_main .base_dialog_content{padding:30px}.bsgoal-base-dialog .bsgoal_base_dialog_main .base_dialog_content--form{padding:0 0 0 30px}.bsgoal-base-dialog .bsgoal_base_dialog_main .base_dialog_content--form .bsgoal-base-form .base_form{padding:initial;padding-top:16px}.bsgoal-base-dialog .bsgoal_base_dialog_main .base_dialog_content--blank{padding-top:0}.bsgoal-base-dialog .base_dialog_footer_cancel{margin-right:16px}.bsgoal-base-tabs .base_tabs--fill{position:absolute;top:8px;bottom:0;left:16px;right:16px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.bsgoal-base-tabs .base_tabs--fill>div.el-tabs__content{-webkit-box-flex:1;-ms-flex:1;flex:1;position:relative}.bsgoal-base-alert .el-alert,.bsgoal-base-item .base_item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bsgoal-base-item .base_item_label{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:14px;color:#606266;height:32px;line-height:32px;padding-right:12px}.bsgoal-base-tree-table .base_tree_table{display:-webkit-box;display:-ms-flexbox;display:flex}.bsgoal-base-tree-table .base_tree_table--table{overflow:hidden}.bsgoal-base-viewer{display:inline-block}.bsgoal-base-viewer .base_viewer{margin:4px 8px}
|
|
1
|
+
@charset "UTF-8";.base_tooltip_popper{max-width:20em}.bsgoal-base-form .base_form .el-form-item{margin-right:10px}.bsgoal-base-form .base_form div.el-input,.bsgoal-base-form .base_form div.el-select{width:100%}.bsgoal-base-form .base_form--visible{width:0px;height:0px;overflow:hidden}.bsgoal-base-sizes{display:inline-block}.bsgoal-base-sizes .base_sizes_input{cursor:pointer;margin-left:16px}.bsgoal-base-sizes .base_sizes_item{text-align:center;font-size:14px;padding:0 20px;color:#606266;height:34px;line-height:34px;cursor:pointer}.bsgoal-base-sizes .base_sizes_item:hover{background-color:#f5f7fa}.bsgoal-base-sizes .base_sizes_item--selected{color:#409eff;font-weight:700}.bsgoal-base-table-pagination{text-align:right}.bsgoal-base-table-pagination .base_table_pagination{display:inline-block;margin-top:16px}.bsgoal-base-table-empty .base_table_empty{text-align:center}.bsgoal-base-table-empty .base_table_empty_img{padding-top:16px;line-height:initial}.bsgoal-base-table-empty .base_table_empty_text{display:inline-block}.bsgoal-base-table .base_table{padding:16px}.bsgoal-base-table .base_table_menu{margin-bottom:8px}.bsgoal-base-table .el-table__body-wrapper{overflow-y:hidden!important}.bsgoal-base-table .el-scrollbar__view{height:100%}.bsgoal-base-table .base_table--tree{margin-top:10px}.bsgoal-base-table th>div.cell{white-space:nowrap}.bsgoal-base-line .base_line{height:10px;background-color:#f0f2f5}.bsgoal-base-line .bsgoal-base-line__vertical{display:inline-block;height:100%}.bsgoal-base-line .base_line__vertical{width:10px;height:100%}.bsgoal-base-line .bsgoal-base-line__fill{position:absolute;left:0;right:0}.bsgoal-base-search-operation{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:33.5px}.bsgoal-base-search-operation .operation_fold{margin-left:12px;cursor:pointer;min-width:3em}.bsgoal-base-cascader{height:100%;width:100%}.bsgoal-base-cascader .base_cascader{width:inherit;height:inherit}.bsgoal-base-search .base_search{padding:16px 6px 8px 16px}.bsgoal-base-search .base_search .el-form-item{margin-bottom:8px;margin-right:10px}.bsgoal-base-search .base_search div.el-input,.bsgoal-base-search .base_search div.el-select{width:100%}.bsgoal-base-search .el-col{margin-bottom:0!important}.bsgoal-base-tree-fold .base_tree_fold{position:absolute;top:0;bottom:0;right:10px;margin:auto;width:14px;height:38px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:10px;background-color:var(--el-color-primary)}.bsgoal-base-tree-fold .base_tree_fold--hide{right:0px}.bsgoal-base-tree{display:inline-block}.bsgoal-base-tree .base_tree{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;min-width:14px}.bsgoal-base-tree .base_tree_main{width:221px;padding:16px;scrollbar-width:none;-ms-overflow-style:none;overflow-x:hidden;overflow-y:auto}.bsgoal-base-tree .base_tree_main::-webkit-scrollbar{width:6px;height:6px}.bsgoal-base-tree .base_tree_main::-webkit-scrollbar-thumb{border-radius:10px;background:rgba(0,0,0,.2);width:20px}.bsgoal-base-tree .base_tree_main::-webkit-scrollbar-track{background-color:#fff}.bsgoal-base-tree .base_tree_main_input{margin-bottom:10px}.bsgoal-base-tree .base_tree .el-tree-node__content>i.el-tree-node__expand-icon{padding-left:0}.bsgoal-base-tree .base_tree_node{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1;flex:1}.bsgoal-base-tree .base_tree_node_label{-webkit-box-flex:1;-ms-flex:1;flex:1}.bsgoal-base-tree .base_tree_node_icon{-webkit-box-flex:0;-ms-flex:none;flex:none}.bsgoal-base-button,.bsgoal-base-button .base_button{display:inline-block}.bsgoal-base-dialog .base_dialog_header{font-weight:500;color:#303133;font-size:16px}.bsgoal-base-dialog .bsgoal-dialog__footer--conceal .el-dialog__footer{display:none}.bsgoal-base-dialog .el-dialog__footer{height:initial;line-height:initial}.bsgoal-base-dialog .el-dialog__footer .el-button{margin-left:initial}.bsgoal-base-dialog .bsgoal_base_dialog_main .el-dialog__header{padding:16px 30px;margin-right:0;background-color:#f5f7fa;height:initial!important}.bsgoal-base-dialog .bsgoal_base_dialog_main .el-dialog__header .el-dialog__headerbtn{top:0px;right:8px}.bsgoal-base-dialog .bsgoal_base_dialog_main .el-dialog__body{padding:0}.bsgoal-base-dialog .bsgoal_base_dialog_main .base_dialog_content{padding:30px}.bsgoal-base-dialog .bsgoal_base_dialog_main .base_dialog_content--form{padding:0 0 0 30px}.bsgoal-base-dialog .bsgoal_base_dialog_main .base_dialog_content--form .bsgoal-base-form .base_form{padding:initial;padding-top:16px}.bsgoal-base-dialog .bsgoal_base_dialog_main .base_dialog_content--blank{padding-top:0}.bsgoal-base-dialog .base_dialog_footer_cancel{margin-right:16px}.bsgoal-base-tabs .base_tabs--fill{position:absolute;top:8px;bottom:0;left:16px;right:16px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.bsgoal-base-tabs .base_tabs--fill>div.el-tabs__content{-webkit-box-flex:1;-ms-flex:1;flex:1;position:relative}.bsgoal-base-alert .el-alert,.bsgoal-base-item .base_item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bsgoal-base-item .base_item_label{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:14px;color:#606266;height:32px;line-height:32px;padding-right:12px}.bsgoal-base-tree-table .base_tree_table{display:-webkit-box;display:-ms-flexbox;display:flex}.bsgoal-base-tree-table .base_tree_table--table{overflow:hidden}.bsgoal-base-viewer{display:inline-block}.bsgoal-base-viewer .base_viewer{margin:4px 8px}
|
package/package.json
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: canlong.shen
|
|
3
|
+
* @Date: 2023-06-27 17:10:41
|
|
4
|
+
* @LastEditors: canlong.shen
|
|
5
|
+
* @LastEditTime: 2023-06-28 09:12:38
|
|
6
|
+
* @FilePath: \common\src\components\bsgoal-base-sizes\demo.vue
|
|
7
|
+
* @Description: 页数切换
|
|
8
|
+
*
|
|
9
|
+
-->
|
|
10
|
+
<script setup>
|
|
11
|
+
/* setup模板
|
|
12
|
+
---------------------------------------------------------------- */
|
|
13
|
+
import { ref } from 'vue'
|
|
14
|
+
import BsgoalBaseSizes from './index.vue'
|
|
15
|
+
defineOptions({
|
|
16
|
+
name: 'BsgoalBaseSizesDemo'
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
const props = defineProps({})
|
|
20
|
+
|
|
21
|
+
const triggerSizeChange = (params = '') => {
|
|
22
|
+
console.log(params)
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
<template>
|
|
26
|
+
<div class="bsgoal-base-sizes-demo">
|
|
27
|
+
<div style="height: 400px; background-color: red"></div>
|
|
28
|
+
<BsgoalBaseSizes :page-size="20" @on-size-change="triggerSizeChange" />
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
31
|
+
<style lang="scss">
|
|
32
|
+
.bsgoal-base-sizes-demo {
|
|
33
|
+
}
|
|
34
|
+
</style>
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: canlong.shen
|
|
3
|
+
* @Date: 2023-06-27 16:52:31
|
|
4
|
+
* @LastEditors: canlong.shen
|
|
5
|
+
* @LastEditTime: 2023-06-28 10:15:08
|
|
6
|
+
* @FilePath: \common\src\components\bsgoal-base-sizes\index.vue
|
|
7
|
+
* @Description: 页数切换 公共组件
|
|
8
|
+
*
|
|
9
|
+
-->
|
|
10
|
+
<script setup>
|
|
11
|
+
/* setup模板
|
|
12
|
+
---------------------------------------------------------------- */
|
|
13
|
+
import { ref, watch, watchEffect } from 'vue'
|
|
14
|
+
import { ArrowDown, ArrowUp } from '@element-plus/icons-vue'
|
|
15
|
+
defineOptions({
|
|
16
|
+
name: 'BsgoalBaseSizes'
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
const props = defineProps({
|
|
20
|
+
/**
|
|
21
|
+
* 每页显示个数选择器的选项设置
|
|
22
|
+
*/
|
|
23
|
+
pageSizes: {
|
|
24
|
+
type: [Array],
|
|
25
|
+
default: () => [10, 20, 30, 40, 50, 100]
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* 每页显示条目个数
|
|
30
|
+
*/
|
|
31
|
+
pageSize: {
|
|
32
|
+
type: [Number],
|
|
33
|
+
default: 0
|
|
34
|
+
},
|
|
35
|
+
/**
|
|
36
|
+
* width 宽度
|
|
37
|
+
*/
|
|
38
|
+
width: {
|
|
39
|
+
type: [String, Number],
|
|
40
|
+
default: '100'
|
|
41
|
+
}
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
const emits = defineEmits(['on-size-change'])
|
|
45
|
+
|
|
46
|
+
// ---> S popover <---
|
|
47
|
+
const visible = ref(false)
|
|
48
|
+
const suffixIcon = ref(ArrowDown)
|
|
49
|
+
|
|
50
|
+
const showPopover = () => {
|
|
51
|
+
suffixIcon.value = ArrowUp
|
|
52
|
+
}
|
|
53
|
+
const hidePopover = () => {
|
|
54
|
+
suffixIcon.value = ArrowDown
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const selectedIndex = ref(-1)
|
|
58
|
+
const selectedSize = ref(10)
|
|
59
|
+
|
|
60
|
+
watch(
|
|
61
|
+
() => props.pageSize,
|
|
62
|
+
() => {
|
|
63
|
+
const { pageSize = 0, pageSizes = [] } = props
|
|
64
|
+
|
|
65
|
+
const curIndex = pageSizes.findIndex((fi) => fi === pageSize)
|
|
66
|
+
|
|
67
|
+
if (curIndex !== -1) {
|
|
68
|
+
selectedIndex.value = curIndex
|
|
69
|
+
selectedSize.value = pageSize
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
immediate: true
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @Author: canlong.shen
|
|
79
|
+
* @description: 单击单项
|
|
80
|
+
* @param {*} size
|
|
81
|
+
* @param {*} key
|
|
82
|
+
* @default:
|
|
83
|
+
* @return {*}
|
|
84
|
+
*/
|
|
85
|
+
const handleSizeItem = (size = 0, index = 0) => {
|
|
86
|
+
selectedIndex.value = index
|
|
87
|
+
selectedSize.value = size
|
|
88
|
+
emits('on-size-change', size)
|
|
89
|
+
visible.value = false
|
|
90
|
+
}
|
|
91
|
+
// ---> E popover <---
|
|
92
|
+
|
|
93
|
+
// ---> S input <---
|
|
94
|
+
const content = ref('')
|
|
95
|
+
|
|
96
|
+
watchEffect(() => {
|
|
97
|
+
const curPageSize = selectedSize.value
|
|
98
|
+
content.value = `${curPageSize}条/页`
|
|
99
|
+
})
|
|
100
|
+
|
|
101
|
+
// ---> E input <---
|
|
102
|
+
</script>
|
|
103
|
+
<template>
|
|
104
|
+
<div class="bsgoal-base-sizes">
|
|
105
|
+
<el-popover
|
|
106
|
+
class="base_sizes"
|
|
107
|
+
placement="top"
|
|
108
|
+
trigger="click"
|
|
109
|
+
:width="`${width}px`"
|
|
110
|
+
v-model:visible="visible"
|
|
111
|
+
:teleported="false"
|
|
112
|
+
@show="showPopover"
|
|
113
|
+
@hide="hidePopover"
|
|
114
|
+
>
|
|
115
|
+
<template #reference>
|
|
116
|
+
<el-input
|
|
117
|
+
v-model="content"
|
|
118
|
+
readonly
|
|
119
|
+
class="base_sizes_input"
|
|
120
|
+
placeholder="Please input"
|
|
121
|
+
:style="{ width: `${width}px` }"
|
|
122
|
+
:suffix-icon="suffixIcon"
|
|
123
|
+
>
|
|
124
|
+
</el-input>
|
|
125
|
+
</template>
|
|
126
|
+
|
|
127
|
+
<template #default>
|
|
128
|
+
<template v-for="(size, key) of pageSizes" :key="key">
|
|
129
|
+
<div
|
|
130
|
+
class="base_sizes_item"
|
|
131
|
+
:class="{ 'base_sizes_item--selected': selectedIndex === key }"
|
|
132
|
+
@click="handleSizeItem(size, key)"
|
|
133
|
+
>
|
|
134
|
+
{{ `${size}条/页` }}
|
|
135
|
+
</div>
|
|
136
|
+
</template>
|
|
137
|
+
</template>
|
|
138
|
+
</el-popover>
|
|
139
|
+
</div>
|
|
140
|
+
</template>
|
|
141
|
+
<style lang="scss">
|
|
142
|
+
/* 覆盖样式
|
|
143
|
+
---------------------------------------------------------------- */
|
|
144
|
+
.bsgoal-base-sizes {
|
|
145
|
+
display: inline-block;
|
|
146
|
+
.base_sizes_input {
|
|
147
|
+
cursor: pointer;
|
|
148
|
+
margin-left: 16px;
|
|
149
|
+
}
|
|
150
|
+
.base_sizes_item {
|
|
151
|
+
text-align: center;
|
|
152
|
+
font-size: 14px;
|
|
153
|
+
padding: 0 20px;
|
|
154
|
+
color: #606266;
|
|
155
|
+
height: 34px;
|
|
156
|
+
line-height: 34px;
|
|
157
|
+
cursor: pointer;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.base_sizes_item:hover {
|
|
161
|
+
background-color: #f5f7fa;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.base_sizes_item--selected {
|
|
165
|
+
color: #409eff;
|
|
166
|
+
font-weight: 700;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
</style>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: canlong.shen
|
|
3
|
+
* @Date: 2023-06-27 16:30:46
|
|
4
|
+
* @LastEditors: canlong.shen
|
|
5
|
+
* @LastEditTime: 2023-06-28 10:02:50
|
|
6
|
+
* @FilePath: \common\src\components\bsgoal-base-table-pagination\demo.vue
|
|
7
|
+
* @Description: 分页公共组件 demo
|
|
8
|
+
*
|
|
9
|
+
-->
|
|
10
|
+
|
|
11
|
+
<script setup>
|
|
12
|
+
/* setup模板
|
|
13
|
+
---------------------------------------------------------------- */
|
|
14
|
+
import { ref } from 'vue'
|
|
15
|
+
import BsgoalBaseTablePagination from './index.vue'
|
|
16
|
+
defineOptions({
|
|
17
|
+
name: 'BsgoalBaseTablePaginationDemo'
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
const props = defineProps({})
|
|
21
|
+
</script>
|
|
22
|
+
<template>
|
|
23
|
+
<div class="bsgoal-base-table-pagination-demo">
|
|
24
|
+
<div style="height: 300px; background-color: red;"></div>
|
|
25
|
+
<BsgoalBaseTablePagination />
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
<style lang="scss" scoped>
|
|
29
|
+
/* 自定义样式
|
|
30
|
+
---------------------------------------------------------------- */
|
|
31
|
+
</style>
|
|
32
|
+
<style lang="scss">
|
|
33
|
+
/* 覆盖样式
|
|
34
|
+
---------------------------------------------------------------- */
|
|
35
|
+
</style>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-04-15 16:34:57
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-06-
|
|
5
|
+
* @LastEditTime: 2023-06-28 10:12:16
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-table-pagination\index.vue
|
|
7
7
|
* @Description: 表格的分页按钮
|
|
8
8
|
*
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
---------------------------------------------------------------- */
|
|
14
14
|
import { ref, computed, inject, unref } from 'vue'
|
|
15
15
|
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
|
16
|
-
|
|
16
|
+
import BsgoalBaseSizes from '../bsgoal-base-sizes/index.vue'
|
|
17
17
|
defineOptions({
|
|
18
18
|
name: 'BsgoalBaseTablePagination'
|
|
19
19
|
})
|
|
@@ -77,7 +77,7 @@ const page = ref(1)
|
|
|
77
77
|
<el-config-provider :locale="zhCn">
|
|
78
78
|
<el-pagination
|
|
79
79
|
background
|
|
80
|
-
layout="total,
|
|
80
|
+
layout="total, slot, prev, pager, next, jumper"
|
|
81
81
|
v-model:current-page="page"
|
|
82
82
|
:page-sizes="pageSizes"
|
|
83
83
|
:page-size="pageSize"
|
|
@@ -85,8 +85,12 @@ const page = ref(1)
|
|
|
85
85
|
@size-change="triggerSizeChange"
|
|
86
86
|
@current-change="triggerCurrentChange"
|
|
87
87
|
>
|
|
88
|
-
<template
|
|
89
|
-
<
|
|
88
|
+
<template #default="">
|
|
89
|
+
<BsgoalBaseSizes
|
|
90
|
+
:page-sizes="pageSizes"
|
|
91
|
+
:page-size="pageSize"
|
|
92
|
+
@on-size-change="triggerSizeChange"
|
|
93
|
+
/>
|
|
90
94
|
</template>
|
|
91
95
|
</el-pagination>
|
|
92
96
|
</el-config-provider>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-06-20 09:20:44
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-06-27
|
|
5
|
+
* @LastEditTime: 2023-06-27 13:54:17
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-tree-table\index.vue
|
|
7
7
|
* @Description: 树结构 + 列表
|
|
8
8
|
*
|
|
@@ -154,6 +154,20 @@ const props = defineProps({
|
|
|
154
154
|
pageSize: {
|
|
155
155
|
type: [Number],
|
|
156
156
|
default: 20
|
|
157
|
+
},
|
|
158
|
+
/**
|
|
159
|
+
* 节点的 key
|
|
160
|
+
*/
|
|
161
|
+
nodeKey: {
|
|
162
|
+
type: [String],
|
|
163
|
+
default: 'key'
|
|
164
|
+
},
|
|
165
|
+
/**
|
|
166
|
+
* 默认展开的节点
|
|
167
|
+
*/
|
|
168
|
+
expandedKeys: {
|
|
169
|
+
type: [Array],
|
|
170
|
+
default: () => []
|
|
157
171
|
}
|
|
158
172
|
})
|
|
159
173
|
|
package/src/router/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-04-10 10:41:52
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-06-
|
|
5
|
+
* @LastEditTime: 2023-06-27 17:17:30
|
|
6
6
|
* @FilePath: \common\src\router\index.js
|
|
7
7
|
* @Description: 路由配置
|
|
8
8
|
*
|
|
@@ -18,6 +18,16 @@ const router = createRouter({
|
|
|
18
18
|
name: 'home',
|
|
19
19
|
component: LayoutHome,
|
|
20
20
|
children: [
|
|
21
|
+
{
|
|
22
|
+
path: '/bsgoal-base-sizes-demo',
|
|
23
|
+
name: '页数切换',
|
|
24
|
+
component: import('@/components/bsgoal-base-sizes/demo.vue')
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
path: '/bsgoal-base-table-pagination-demo',
|
|
28
|
+
name: '表格分页',
|
|
29
|
+
component: import('@/components/bsgoal-base-table-pagination/demo.vue')
|
|
30
|
+
},
|
|
21
31
|
{
|
|
22
32
|
path: '/bsgoal-base-viewer-demo',
|
|
23
33
|
name: '图片预览',
|