sh-view 2.8.7 → 2.8.9

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": "sh-view",
3
- "version": "2.8.7",
3
+ "version": "2.8.9",
4
4
  "description": "基于vxe-table二次封装,更包含Alert,Badge,Card,CodeEditor,Col,Corner,CountTo,Drawer,Empty,Form,Header,Icon,List,Loading,Modal,Noticebar,Poptip,Progress,PullRefresh,Query,Result,Row,Split,Grid,Table,Tabs,Tag,Toolbar,Tree,Upload,WaterFall,WaterMark等丰富组件库",
5
5
  "main": "packages/index.js",
6
6
  "typings": "types/index.d.ts",
@@ -127,7 +127,6 @@ export default defineComponent({
127
127
  &-img {
128
128
  width: 100%;
129
129
  height: 100%;
130
- vertical-align: middle;
131
130
  }
132
131
  }
133
132
  </style>
@@ -57,16 +57,16 @@
57
57
  <div v-if="slots.toolbarRight" class="sh-table-toolbar-item">
58
58
  <slot name="toolbarRight"></slot>
59
59
  </div>
60
- <div v-if="tableMoneyConfig.enabled" class="sh-table-toolbar-item">单位:<sh-select v-model="tableMoneyUnit" v-bind="tableMoneyConfig" /></div>
61
- <div v-if="tableGlobalConfig.zoom" class="sh-table-toolbar-item">
62
- <vxe-button v-if="!tableIsFullscreen" v-ripple :size="size" icon="vxe-icon-zoom-out" @click="handleTableZoomBtn(true)">全屏</vxe-button>
63
- <vxe-button v-else v-ripple :size="size" icon="vxe-icon-zoom-in" @click="handleTableZoomBtn(false)">退出全屏</vxe-button>
64
- </div>
65
60
  <template v-for="(tool, toolIndex) in tableTools" :key="toolIndex">
66
61
  <div class="sh-table-toolbar-item">
67
62
  <vxe-button v-ripple :size="size" v-bind="tool" @click="handleTableTool(tool)"></vxe-button>
68
63
  </div>
69
64
  </template>
65
+ <div v-if="tableMoneyConfig.enabled" class="sh-table-toolbar-item">单位:<sh-select v-model="tableMoneyUnit" v-bind="tableMoneyConfig" /></div>
66
+ <div v-if="tableGlobalConfig.zoom" class="sh-table-toolbar-item">
67
+ <vxe-button v-if="!tableIsFullscreen" v-ripple :size="size" icon="vxe-icon-zoom-out" @click="handleTableZoomBtn(true)">全屏</vxe-button>
68
+ <vxe-button v-else v-ripple :size="size" icon="vxe-icon-zoom-in" @click="handleTableZoomBtn(false)">退出全屏</vxe-button>
69
+ </div>
70
70
  </div>
71
71
  </div>
72
72
  </template>
@@ -122,7 +122,7 @@ export default function (props, context, proxy, isGrid) {
122
122
  }
123
123
  })
124
124
  const tableMoneyConfig = computed(() => {
125
- return Object.assign({ enabled: true, options: $vTableSetup.moneyUnitConstants, style: { width: '60px' } }, props.moneyConfig, tableVmConfig.value)
125
+ return Object.assign({ style: { width: '60px' } }, $vTableSetup.moneyConfig, props.moneyConfig, tableVmConfig.value)
126
126
  })
127
127
  const tableExportConfig = computed(() =>
128
128
  Object.assign(
@@ -259,6 +259,17 @@ export default function (props, context, proxy, isGrid) {
259
259
  else if (tableGlobalConfig.value.selectType === 'checkbox' && checkRecords) selections = checkRecords
260
260
  selectionRows.value = selections
261
261
  }
262
+ const updateExpended = () => {
263
+ if (tableRef.value && tableTreeConfig.value.expandAll) {
264
+ setTimeout(() => {
265
+ tableRef.value.setAllTreeExpand(true)
266
+ })
267
+ } else if (tableRef.value && props.expandConfig && props.expandConfig.expandAll) {
268
+ setTimeout(() => {
269
+ tableRef.value.setAllRowExpand(true)
270
+ })
271
+ }
272
+ }
262
273
 
263
274
  // -------- 表格
264
275
  // 当前行变化
@@ -552,6 +563,7 @@ export default function (props, context, proxy, isGrid) {
552
563
  () => props.dataSourse,
553
564
  value => {
554
565
  updateSelection([])
566
+ updateExpended()
555
567
  },
556
568
  {
557
569
  immediate: true
@@ -31,12 +31,12 @@
31
31
  <div v-if="slots.toolbarRight" class="sh-table-toolbar-item">
32
32
  <slot name="toolbarRight"></slot>
33
33
  </div>
34
- <div v-if="tableMoneyConfig.enabled" @click.stop class="sh-table-toolbar-item">单位:<sh-select v-model="tableMoneyUnit" v-bind="tableMoneyConfig" /></div>
35
34
  <template v-for="(tool, toolIndex) in tableTools" :key="toolIndex">
36
35
  <div class="sh-table-toolbar-item">
37
36
  <vxe-button v-ripple :size="size" v-bind="tool" @click="handleTableTool(tool)"></vxe-button>
38
37
  </div>
39
38
  </template>
39
+ <div v-if="tableMoneyConfig.enabled" @click.stop class="sh-table-toolbar-item">单位:<sh-select v-model="tableMoneyUnit" v-bind="tableMoneyConfig" /></div>
40
40
  </div>
41
41
  </div>
42
42
  </slot>
@@ -84,7 +84,7 @@ button:focus, .vxe-button.type--button:not(.is--disabled):focus{
84
84
 
85
85
  // 下拉容器
86
86
  .vxe-pulldown--panel{
87
- .vxe-pulldown--wrapper{
87
+ &-wrapper{
88
88
  box-shadow: 0 0 6px 2px rgba(0,0,0,0.1);
89
89
  padding: 0;
90
90
  border-radius: 4px;
@@ -156,11 +156,14 @@ let vxeOptions = {
156
156
  icon: 'vxe-icon-spinner roll',
157
157
  text: '加载中...'
158
158
  },
159
- moneyUnitConstants: [
160
- { value: 1, label: '元', digits: 2 },
161
- { value: 1000, label: '千元', digits: 4 },
162
- { value: 10000, label: '万元', digits: 6 }
163
- ],
159
+ moneyConfig: {
160
+ enabled: false,
161
+ options: [
162
+ { value: 1, label: '', digits: 2 },
163
+ { value: 1000, label: '千元', digits: 4 },
164
+ { value: 10000, label: '万元', digits: 6 }
165
+ ]
166
+ },
164
167
  cnGroups: [
165
168
  { shortText: '兆', fullText: '兆', value: '' },
166
169
  { shortText: '千', fullText: '千亿', value: '' },
@@ -504,7 +504,7 @@ const filterRenders = {
504
504
  case 'has':
505
505
  return String(rtext).indexOf(valueSt) > -1
506
506
  case 'eq':
507
- return utils.isEqual(rvalue, valueSt)
507
+ return utils.isEqual(String(rvalue), valueSt)
508
508
  case 'gt':
509
509
  return isDate ? utils.getDateDiff(valueSt, rvalue).done : Number(rvalue) > Number(valueSt)
510
510
  case 'lt':