@bsgoal/common 1.5.11 → 1.6.3

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bsgoal/common",
3
- "version": "1.5.11",
3
+ "version": "1.6.3",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",
@@ -2,7 +2,7 @@
2
2
  * @Author: canlong.shen
3
3
  * @Date: 2023-04-10 14:26:44
4
4
  * @LastEditors: canlong.shen
5
- * @LastEditTime: 2023-05-08 15:15:07
5
+ * @LastEditTime: 2023-05-15 14:50:49
6
6
  * @FilePath: \common\src\components\bsgoal-base-table\demo.vue
7
7
  * @Description: 表格公共组件演示页面
8
8
  *
@@ -213,7 +213,9 @@ const data = ref([
213
213
  const options = ref([
214
214
  {
215
215
  label: '列列列列列列列列列1',
216
- prop: 'prop1'
216
+ prop: 'prop1',
217
+ tooltip: true,
218
+ limit: 3
217
219
  },
218
220
  {
219
221
  label: '列列列列列列列列列2',
@@ -245,21 +247,14 @@ const clearData = () => {
245
247
  <div class="bsgoal-base-table-demo">
246
248
  <!-- <BsgoalBaseSearch :config-options="searchOptions" /> -->
247
249
  <el-button type="primary" @click="clearData">设置为空数据</el-button>
248
- <BsgoalBaseTable
249
- operation
250
- operation-width="200"
251
- selection
252
- :config-options="options"
253
- :data="data"
254
- :auto-height="false"
255
- >
250
+ <BsgoalBaseTable operation-width="200" operation selection :page="false" :config-options="options" :data="data"
251
+ :auto-height="false">
256
252
  <template v-slot:operation="{ row }">
257
253
  <div>
258
254
  <el-button type="primary">操作按钮</el-button>
259
255
  </div>
260
256
  </template>
261
257
  </BsgoalBaseTable>
262
- <hr />
263
258
  </div>
264
259
  </template>
265
260
  <style lang="scss" scoped>
@@ -2,7 +2,7 @@
2
2
  * @Author: canlong.shen
3
3
  * @Date: 2023-04-10 11:29:04
4
4
  * @LastEditors: canlong.shen
5
- * @LastEditTime: 2023-05-08 15:19:02
5
+ * @LastEditTime: 2023-05-15 14:50:19
6
6
  * @FilePath: \common\src\components\bsgoal-base-table\index.vue
7
7
  * @Description:
8
8
  *
@@ -120,6 +120,13 @@ const props = defineProps({
120
120
  height: {
121
121
  type: [Number, String, Boolean],
122
122
  default: ''
123
+ },
124
+ /**
125
+ * 是否显示分页
126
+ */
127
+ page: {
128
+ type: Boolean,
129
+ default: true
123
130
  }
124
131
  })
125
132
 
@@ -223,20 +230,13 @@ defineExpose({
223
230
  <!-- E 表头操作区域 -->
224
231
  <!-- S 表格区域 -->
225
232
  <div ref="EL_TABLE_WRAP_REF">
226
- <el-table
227
- stripe
228
- border
229
- highlight-current-row
230
- style="width: 100%"
231
- v-loading="tableLoading"
232
- :data="tableData"
233
+ <el-table stripe border highlight-current-row style="width: 100%" v-loading="tableLoading" :data="tableData"
233
234
  :header-cell-style="{
234
235
  fontWeight: 'bold',
235
236
  backgroundColor: '#EBEEF5',
236
237
  color: 'rgba(0,0,0,.85)',
237
238
  fontSize: '14px'
238
- }"
239
- >
239
+ }">
240
240
  <!-- / 无数据展示内容 -->
241
241
  <template #empty>
242
242
  <BsgoalBaseTableEmpty />
@@ -246,22 +246,14 @@ defineExpose({
246
246
  <el-table-column v-if="selection" fixed="left" type="selection" width="40" />
247
247
  <!-- / 多选 -->
248
248
  <!-- / 表格内容 -->
249
- <template
250
- v-for="(
251
- { prop = '', label = '', align = 'center', width = '', fixed = false } = {}, index
252
- ) of configOptionsGet"
253
- :key="index"
254
- >
255
- <el-table-column
256
- :label="label"
257
- :align="align"
258
- :width="width"
259
- :fixed="fixed"
260
- :min-width="`${label.length * 14 + 24}px`"
261
- >
249
+ <template v-for="(
250
+ { prop = '', label = '', align = 'center', width = '', fixed = false, tooltip = false, limit = 0 } = {}, index
251
+ ) of configOptionsGet" :key="index">
252
+ <el-table-column :label="label" :align="align" :width="width" :fixed="fixed"
253
+ :min-width="`${label.length * 14 + 24}px`">
262
254
  <template v-slot:default="{ row }">
263
255
  <slot :name="prop" :row="row">
264
- <BsgoalBaseTableContent :data="row[prop]" />
256
+ <BsgoalBaseTableContent :limit="limit" :tooltip="tooltip" :data="row[prop]" />
265
257
  </slot>
266
258
  </template>
267
259
  </el-table-column>
@@ -273,11 +265,8 @@ defineExpose({
273
265
  <!-- E 表格区域 -->
274
266
 
275
267
  <!-- S 分页 -->
276
- <BsgoalBaseTablePagination
277
- :total="total"
278
- @on-current-change="triggerPaginationCurrentChange"
279
- @on-size-change="triggerPaginationSizeChange"
280
- />
268
+ <BsgoalBaseTablePagination v-if="page" :total="total" @on-current-change="triggerPaginationCurrentChange"
269
+ @on-size-change="triggerPaginationSizeChange" />
281
270
  <!-- E 分页 -->
282
271
  </div>
283
272
  </div>
@@ -289,9 +278,11 @@ defineExpose({
289
278
  .base_table {
290
279
  padding: 16px;
291
280
  }
281
+
292
282
  .base_table_menu {
293
283
  margin-bottom: 8px;
294
284
  }
285
+
295
286
  .el-table__body-wrapper {
296
287
  overflow-y: hidden !important;
297
288
  }
@@ -2,7 +2,7 @@
2
2
  * @Author: canlong.shen
3
3
  * @Date: 2023-04-15 13:49:25
4
4
  * @LastEditors: canlong.shen
5
- * @LastEditTime: 2023-04-18 18:12:06
5
+ * @LastEditTime: 2023-05-15 14:26:22
6
6
  * @FilePath: \common\src\components\bsgoal-base-table-content\index.vue
7
7
  * @Description: 表格内容
8
8
  *
@@ -17,26 +17,49 @@ export default {
17
17
  /* setup模板
18
18
  ---------------------------------------------------------------- */
19
19
  import { ref } from 'vue';
20
+ import BsgoalBaseTooltip from '../bsgoal-base-tooltip/index.vue'
20
21
  // props
21
22
  const props = defineProps({
23
+ /**
24
+ * 数据
25
+ */
22
26
  data: {
23
- type: [String,Number,Object,Number,Boolean],
27
+ type: [String, Number, Object, Boolean],
24
28
  default: ''
25
- }
29
+ },
30
+
31
+ /**
32
+ * 内容提示
33
+ */
34
+ tooltip: {
35
+ type: [Boolean, Number],
36
+ default: false
37
+ },
38
+
39
+ /**
40
+ * 内容限定数
41
+ */
42
+ limit: {
43
+ type: [Number],
44
+ default: 10
45
+ },
46
+
26
47
  })
27
48
  </script>
28
49
  <template>
29
50
  <div class="bsgoal-base-table-content">
30
- <div class="bas_tabl_content">
31
- {{ data }}
51
+ <div class="base_table_content">
52
+ <BsgoalBaseTooltip v-if="tooltip" :content="data" :limit="limit" />
53
+ <div v-else class="base_table_table_txt">
54
+ {{ data }}
55
+
56
+ </div>
32
57
  </div>
33
58
  </div>
34
59
  </template>
35
60
  <style lang="scss">
36
61
  /* 覆盖样式
37
62
  ---------------------------------------------------------------- */
38
- .bsgoal-base-table-content {
39
-
40
- }
63
+ .bsgoal-base-table-content {}
41
64
  </style>
42
65
 
package/src/entry.js CHANGED
@@ -5,6 +5,7 @@ import BsgoalBaseSearchTable from '@/components/bsgoal-base-search-table/index.v
5
5
  import BsgoalBaseTree from '@/components/bsgoal-base-tree/index.vue'
6
6
  import BsgoalBaseDialog from '@/components/bsgoal-base-dialog/index.vue'
7
7
  import BsgoalBaseTabs from '@/components/bsgoal-base-tabs/index.vue'
8
+ import BsgoalBaseLink from '@/components/bsgoal-base-link/index.vue'
8
9
  import enumType from '@/enums/enumType.js'
9
10
  import { useFetch } from '@/combines/useFetchs.js'
10
11
 
@@ -23,7 +24,8 @@ export default {
23
24
  BsgoalBaseSearchTable,
24
25
  BsgoalBaseTree,
25
26
  BsgoalBaseDialog,
26
- BsgoalBaseTabs
27
+ BsgoalBaseTabs,
28
+ BsgoalBaseLink
27
29
  }
28
30
 
29
31
  for (const [name, component] of Object.entries(componentsMap)) {