@bsgoal/common 1.5.4 → 1.5.5

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/style.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";.bsgoal-base-form .base_form{padding:16px 6px 8px 16px}.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-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-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-search-operation{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bsgoal-base-search-operation .operation_fold{margin-left:12px;cursor:pointer;min-width:3em}.bsgoal-base-cascader{width:100%}.bsgoal-base-cascader .base_cascader{width: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-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:#409eff}.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-dialog .base_dialog_header{font-weight:500;color:#303133;font-size:16px}.bsgoal-base-dialog .bsgoal_base_dialog_main .el-dialog__header{padding:16px 30px;margin-right:0;background-color:#f5f7fa}.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 30px 30px}
1
+ @charset "UTF-8";.base_tooltip_popper{max-width:20em}.bsgoal-base-form .base_form{padding:16px 6px 8px 16px}.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-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-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-search-operation{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bsgoal-base-search-operation .operation_fold{margin-left:12px;cursor:pointer;min-width:3em}.bsgoal-base-cascader{width:100%}.bsgoal-base-cascader .base_cascader{width: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-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:#409eff}.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-dialog .base_dialog_header{font-weight:500;color:#303133;font-size:16px}.bsgoal-base-dialog .bsgoal_base_dialog_main .el-dialog__header{padding:16px 30px;margin-right:0;background-color:#f5f7fa}.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 30px 30px}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bsgoal/common",
3
- "version": "1.5.4",
3
+ "version": "1.5.5",
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 15:00:00
4
4
  * @LastEditors: canlong.shen
5
- * @LastEditTime: 2023-04-20 17:47:40
5
+ * @LastEditTime: 2023-05-04 14:20:32
6
6
  * @FilePath: \common\src\components\bsgoal-base-form\demo.vue
7
7
  * @Description: 表单公共组件演示组件
8
8
  *
@@ -10,7 +10,7 @@
10
10
 
11
11
  <template>
12
12
  <div class="bsgoal-base-form-demo">
13
- <BsgoalBaseForm ref="BSGOAL_BASE_FORM_REF" :config-options="configOptions" :values="values" />
13
+ <BsgoalBaseForm readonly ref="BSGOAL_BASE_FORM_REF" :limits="10" :config-options="configOptions" :values="values" />
14
14
  <el-button type="primary" @click="confirm">提交</el-button>
15
15
  </div>
16
16
  </template>
@@ -27,7 +27,8 @@ import { ref, computed, toRefs, watch, unref } from 'vue'
27
27
  import EnumType from '../../enums/enumType.js'
28
28
 
29
29
  const values = ref({
30
- prop1:'6666'
30
+ prop1:'66111111111111166',
31
+ prop2:'select1'
31
32
  })
32
33
 
33
34
  const BSGOAL_BASE_FORM_REF = ref(null)
@@ -49,7 +50,8 @@ const configOptions = ref([
49
50
  prop: 'prop1',
50
51
  type: EnumType.INPUT,
51
52
  width: '100px',
52
- rules:true
53
+ rules:true,
54
+ readonly:true
53
55
  },
54
56
  {
55
57
  label: 'prop2',
@@ -73,7 +75,9 @@ const configOptions = ref([
73
75
  label: 'select4',
74
76
  value: 'select5'
75
77
  }
76
- ]
78
+ ],
79
+ readonly:true
80
+
77
81
  },
78
82
  {
79
83
  label: 'prop3',
@@ -2,7 +2,7 @@
2
2
  * @Author: canlong.shen
3
3
  * @Date: 2023-04-17 11:44:29
4
4
  * @LastEditors: canlong.shen
5
- * @LastEditTime: 2023-04-25 09:06:35
5
+ * @LastEditTime: 2023-05-04 14:21:33
6
6
  * @FilePath: \common\src\components\bsgoal-base-form\index.vue
7
7
  * @Description: 表单公共组件
8
8
  *
@@ -16,10 +16,11 @@ export default {
16
16
  <script setup>
17
17
  /* setup模板
18
18
  ---------------------------------------------------------------- */
19
- import { ref, computed, unref, watchEffect, nextTick } from 'vue'
19
+ import { ref, computed, unref, watchEffect } from 'vue'
20
20
  import EnumType from '../../enums/enumType.js'
21
21
  import baseDirective from '../../directives/directiveBase.js'
22
22
  import { ElMessage } from 'element-plus'
23
+ import BsgoalBaseTooltip from '../bsgoal-base-tooltip/index.vue'
23
24
  // props
24
25
  const props = defineProps({
25
26
  /**
@@ -58,6 +59,20 @@ const props = defineProps({
58
59
  values: {
59
60
  type: [Object],
60
61
  default: () => ({})
62
+ },
63
+ /**
64
+ * 全局字数限制
65
+ */
66
+ limits: {
67
+ type: [Number],
68
+ default: 0
69
+ },
70
+ /**
71
+ * 全局只读
72
+ */
73
+ readonlys: {
74
+ type: Boolean,
75
+ default: false
61
76
  }
62
77
  })
63
78
 
@@ -260,7 +275,6 @@ const validateForm = (callback = () => {}) => {
260
275
  } else {
261
276
  callback(false)
262
277
 
263
- console.log('field', field)
264
278
  const firstProp = Object.keys(field)[0]
265
279
  const {
266
280
  [firstProp]: {
@@ -291,14 +305,15 @@ defineExpose({
291
305
  prop = '',
292
306
  type = 'text',
293
307
  placeholder = '',
294
- readonly = false,
308
+ readonly = readonlys,
295
309
  clearable = true,
296
310
  rows = 2,
297
311
  min = 1,
298
312
  max = 10,
299
313
  range = [],
300
314
  format = '',
301
- rules = []
315
+ rules = [],
316
+ limit = limits
302
317
  } = {},
303
318
  index
304
319
  ) of configOptionsGet"
@@ -465,7 +480,7 @@ defineExpose({
465
480
  <!-- S 文本内容 -->
466
481
  <template v-else>
467
482
  <div>
468
- {{ model[prop] }}
483
+ <BsgoalBaseTooltip :content="model[prop]" :limit="limit" />
469
484
  </div>
470
485
  </template>
471
486
  <!-- E 文本内容 -->
@@ -2,7 +2,7 @@
2
2
  * @Author: canlong.shen
3
3
  * @Date: 2023-05-04 10:59:25
4
4
  * @LastEditors: canlong.shen
5
- * @LastEditTime: 2023-05-04 11:21:59
5
+ * @LastEditTime: 2023-05-04 14:17:17
6
6
  * @FilePath: \common\src\components\bsgoal-base-tooltip\index.vue
7
7
  * @Description: 文字提示公共组件
8
8
  *
@@ -16,7 +16,7 @@ export default {
16
16
  <script setup>
17
17
  /* setup模板
18
18
  ---------------------------------------------------------------- */
19
- import { ref, computed } from 'vue'
19
+ import { ref, computed, unref } from 'vue'
20
20
  // props
21
21
  const props = defineProps({
22
22
  /**
@@ -55,12 +55,19 @@ const contentGet = computed(() => {
55
55
  const { content = '', limit = 0 } = props
56
56
  let contentString = content
57
57
  const contentLength = content.length
58
- if (contentLength > limit) {
59
- contentString = `${contentString.substring(0, limit)}...`
58
+ if ( limit && contentLength > limit) {
59
+ contentString = `${content.substring(0, limit)}...`
60
60
  }
61
61
  return contentString
62
62
  })
63
63
  // ---> E 字符数限制 <---
64
+
65
+ // ---> S 禁用tooltip <---
66
+ const disabledGet = computed(() => {
67
+ const { content = '', limit = 0 } = props
68
+ return content.length < limit || !limit
69
+ })
70
+ // ---> E 禁用tooltip <---
64
71
  </script>
65
72
  <template>
66
73
  <div class="bsgoal-base-tooltip">
@@ -70,6 +77,7 @@ const contentGet = computed(() => {
70
77
  popper-class="base_tooltip_popper"
71
78
  placement="top-start"
72
79
  :content="content"
80
+ :disabled="disabledGet"
73
81
  >
74
82
  <slot>
75
83
  {{ contentGet }}