vxe-table 4.1.18-beta.0 → 4.1.18
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/README.en.md +3 -1
- package/README.md +3 -1
- package/README.zh-TW.md +3 -1
- package/es/export/src/hook.js +16 -9
- package/es/footer/src/footer.js +12 -10
- package/es/grid/src/grid.js +2 -1
- package/es/header/src/header.js +15 -13
- package/es/modal/src/modal.js +1 -1
- package/es/pulldown/src/pulldown.js +13 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/src/columnInfo.js +1 -0
- package/es/table/src/table.js +4 -4
- package/lib/export/src/hook.js +15 -10
- package/lib/export/src/hook.min.js +1 -1
- package/lib/footer/src/footer.js +11 -9
- package/lib/footer/src/footer.min.js +1 -1
- package/lib/grid/src/grid.js +2 -1
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/header/src/header.js +14 -12
- package/lib/header/src/header.min.js +1 -1
- package/lib/index.umd.js +66 -38
- package/lib/index.umd.min.js +1 -1
- package/lib/modal/src/modal.js +1 -2
- package/lib/modal/src/modal.min.js +1 -1
- package/lib/pulldown/src/pulldown.js +13 -1
- package/lib/pulldown/src/pulldown.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/columnInfo.js +1 -0
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/table.js +8 -4
- package/lib/table/src/table.min.js +1 -1
- package/package.json +3 -3
- package/packages/export/src/hook.ts +26 -19
- package/packages/footer/src/footer.ts +12 -10
- package/packages/grid/src/grid.ts +2 -1
- package/packages/header/src/header.ts +15 -13
- package/packages/modal/src/modal.ts +1 -1
- package/packages/pulldown/src/pulldown.ts +13 -1
- package/packages/table/src/columnInfo.ts +1 -0
- package/packages/table/src/table.ts +5 -4
- package/styles/button.scss +4 -4
- package/styles/modal.scss +14 -13
- package/styles/table.scss +4 -4
- package/styles/variable.scss +8 -0
- package/types/grid.d.ts +1 -0
- package/types/pulldown.d.ts +3 -0
- package/types/table.d.ts +13 -1
package/README.en.md
CHANGED
|
@@ -103,13 +103,15 @@ createApp(App).use(VXETable).mount('#app')
|
|
|
103
103
|
|
|
104
104
|
### CDN
|
|
105
105
|
|
|
106
|
+
It is not recommended to use the public CDN address for production, because the connection may fail at any time, causing the project to hang up;
|
|
107
|
+
Remember to lock the version number by using CDN to avoid being affected by incompatible updates.
|
|
108
|
+
|
|
106
109
|
```HTML
|
|
107
110
|
<!-- Style -->
|
|
108
111
|
<link rel="stylesheet" href="https://unpkg.com/vxe-table@next/lib/style.css">
|
|
109
112
|
<!-- Script -->
|
|
110
113
|
<script src="https://unpkg.com/xe-utils"></script>
|
|
111
114
|
<script src="https://unpkg.com/vxe-table@next"></script>
|
|
112
|
-
<!-- It is recommended that users introduced by CDN lock the version on the link address to avoid the impact of incompatible updates -->
|
|
113
115
|
```
|
|
114
116
|
|
|
115
117
|
## Example
|
package/README.md
CHANGED
|
@@ -108,13 +108,15 @@ createApp(App).use(VXETable).mount('#app')
|
|
|
108
108
|
|
|
109
109
|
### CDN
|
|
110
110
|
|
|
111
|
+
不建议将公共的 CDN 地址用于生产,因为该连接随时都可能会失效,导致项目挂掉;
|
|
112
|
+
使用 CDN 方式记得锁定版本号,避免受到非兼容性更新的影响
|
|
113
|
+
|
|
111
114
|
```HTML
|
|
112
115
|
<!-- 引入样式 -->
|
|
113
116
|
<link rel="stylesheet" href="https://unpkg.com/vxe-table@next/lib/style.css">
|
|
114
117
|
<!-- 引入脚本 -->
|
|
115
118
|
<script src="https://unpkg.com/xe-utils"></script>
|
|
116
119
|
<script src="https://unpkg.com/vxe-table@next"></script>
|
|
117
|
-
<!-- 建议使用 CDN 方式引入的用户在链接地址上锁定版本,避免受到非兼容性更新的影响 -->
|
|
118
120
|
```
|
|
119
121
|
|
|
120
122
|
## 示例
|
package/README.zh-TW.md
CHANGED
|
@@ -106,13 +106,15 @@ createApp(App).use(VXETable).mount('#app')
|
|
|
106
106
|
|
|
107
107
|
### CDN
|
|
108
108
|
|
|
109
|
+
不建議將公共的CDN地址用於生產,因為該連接隨時都可能會失效,導致項目掛掉;
|
|
110
|
+
使用CDN管道記得鎖定版本號,避免受到非相容性更新的影響
|
|
111
|
+
|
|
109
112
|
```HTML
|
|
110
113
|
<!-- 引入樣式 -->
|
|
111
114
|
<link rel="stylesheet" href="https://unpkg.com/vxe-table@next/lib/style.css">
|
|
112
115
|
<!-- 引入腳本 -->
|
|
113
116
|
<script src="https://unpkg.com/xe-utils"></script>
|
|
114
117
|
<script src="https://unpkg.com/vxe-table@next"></script>
|
|
115
|
-
<!-- 建議使用 CDN 管道引入的用戶在連結位址上鎖定版本,避免受到非相容性更新的影響 -->
|
|
116
118
|
```
|
|
117
119
|
|
|
118
120
|
## 示例
|
package/es/export/src/hook.js
CHANGED
|
@@ -265,11 +265,18 @@ var tableExportHook = {
|
|
|
265
265
|
var treeOpts = computeTreeOpts.value;
|
|
266
266
|
return row[treeOpts.children] && row[treeOpts.children].length;
|
|
267
267
|
};
|
|
268
|
-
var getSeq = function (row, rowIndex, column, columnIndex) {
|
|
268
|
+
var getSeq = function (row, $rowIndex, column, $columnIndex) {
|
|
269
269
|
var seqOpts = computeSeqOpts.value;
|
|
270
270
|
var seqMethod = seqOpts.seqMethod || column.seqMethod;
|
|
271
271
|
if (seqMethod) {
|
|
272
|
-
return seqMethod({
|
|
272
|
+
return seqMethod({
|
|
273
|
+
row: row,
|
|
274
|
+
rowIndex: $xetable.getRowIndex(row),
|
|
275
|
+
$rowIndex: $rowIndex,
|
|
276
|
+
column: column,
|
|
277
|
+
columnIndex: $xetable.getColumnIndex(column),
|
|
278
|
+
$columnIndex: $columnIndex
|
|
279
|
+
});
|
|
273
280
|
}
|
|
274
281
|
return $xetable.getRowSeq(row);
|
|
275
282
|
};
|
|
@@ -277,7 +284,7 @@ var tableExportHook = {
|
|
|
277
284
|
return XEUtils.isBoolean(cellValue) ? (cellValue ? 'TRUE' : 'FALSE') : cellValue;
|
|
278
285
|
};
|
|
279
286
|
var getLabelData = function (opts, columns, datas) {
|
|
280
|
-
var isAllExpand = opts.isAllExpand;
|
|
287
|
+
var isAllExpand = opts.isAllExpand, mode = opts.mode;
|
|
281
288
|
var treeConfig = props.treeConfig;
|
|
282
289
|
var radioOpts = computeRadioOpts.value;
|
|
283
290
|
var checkboxOpts = computeCheckboxOpts.value;
|
|
@@ -289,7 +296,7 @@ var tableExportHook = {
|
|
|
289
296
|
// 如果是树表格只允许导出数据源
|
|
290
297
|
var rest_1 = [];
|
|
291
298
|
var expandMaps_1 = new Map();
|
|
292
|
-
XEUtils.eachTree(datas, function (item, rowIndex, items, path, parent, nodes) {
|
|
299
|
+
XEUtils.eachTree(datas, function (item, $rowIndex, items, path, parent, nodes) {
|
|
293
300
|
var row = item._row || item;
|
|
294
301
|
var parentRow = parent && parent._row ? parent._row : parent;
|
|
295
302
|
if ((isAllExpand || !parentRow || (expandMaps_1.has(parentRow) && $xetable.isTreeExpandByRow(parentRow)))) {
|
|
@@ -300,7 +307,7 @@ var tableExportHook = {
|
|
|
300
307
|
_hasChild: hasRowChild,
|
|
301
308
|
_expand: hasRowChild && $xetable.isTreeExpandByRow(row)
|
|
302
309
|
};
|
|
303
|
-
columns.forEach(function (column, columnIndex) {
|
|
310
|
+
columns.forEach(function (column, $columnIndex) {
|
|
304
311
|
var cellValue = '';
|
|
305
312
|
var renderOpts = column.editRender || column.cellRender;
|
|
306
313
|
var exportLabelMethod = column.exportMethod;
|
|
@@ -316,7 +323,7 @@ var tableExportHook = {
|
|
|
316
323
|
else {
|
|
317
324
|
switch (column.type) {
|
|
318
325
|
case 'seq':
|
|
319
|
-
cellValue = getSeq(row, rowIndex, column, columnIndex);
|
|
326
|
+
cellValue = mode === 'all' ? path.map(function (num, i) { return i % 2 === 0 ? (Number(num) + 1) : '.'; }).join('') : getSeq(row, $rowIndex, column, $columnIndex);
|
|
320
327
|
break;
|
|
321
328
|
case 'checkbox':
|
|
322
329
|
cellValue = toBooleanValue($xetable.isCheckedByCheckboxRow(row));
|
|
@@ -355,11 +362,11 @@ var tableExportHook = {
|
|
|
355
362
|
}, treeOpts);
|
|
356
363
|
return rest_1;
|
|
357
364
|
}
|
|
358
|
-
return datas.map(function (row, rowIndex) {
|
|
365
|
+
return datas.map(function (row, $rowIndex) {
|
|
359
366
|
var item = {
|
|
360
367
|
_row: row
|
|
361
368
|
};
|
|
362
|
-
columns.forEach(function (column, columnIndex) {
|
|
369
|
+
columns.forEach(function (column, $columnIndex) {
|
|
363
370
|
var cellValue = '';
|
|
364
371
|
var renderOpts = column.editRender || column.cellRender;
|
|
365
372
|
var exportLabelMethod = column.exportMethod;
|
|
@@ -375,7 +382,7 @@ var tableExportHook = {
|
|
|
375
382
|
else {
|
|
376
383
|
switch (column.type) {
|
|
377
384
|
case 'seq':
|
|
378
|
-
cellValue = getSeq(row, rowIndex, column, columnIndex);
|
|
385
|
+
cellValue = mode === 'all' ? $rowIndex + 1 : getSeq(row, $rowIndex, column, $columnIndex);
|
|
379
386
|
break;
|
|
380
387
|
case 'checkbox':
|
|
381
388
|
cellValue = toBooleanValue($xetable.isCheckedByCheckboxRow(row));
|
package/es/footer/src/footer.js
CHANGED
|
@@ -9,7 +9,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { createCommentVNode, defineComponent, h, ref, inject, nextTick } from 'vue';
|
|
12
|
+
import { createCommentVNode, defineComponent, h, ref, inject, nextTick, onMounted } from 'vue';
|
|
13
13
|
import XEUtils from 'xe-utils';
|
|
14
14
|
import { getPropClass } from '../../table/src/util';
|
|
15
15
|
import { updateCellTitle } from '../../tools/dom';
|
|
@@ -78,15 +78,17 @@ export default defineComponent({
|
|
|
78
78
|
}
|
|
79
79
|
$xetable.dispatchEvent('scroll', { type: renderType, fixed: fixedType, scrollTop: bodyElem.scrollTop, scrollLeft: scrollLeft, isX: isX, isY: false }, evnt);
|
|
80
80
|
};
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
81
|
+
onMounted(function () {
|
|
82
|
+
nextTick(function () {
|
|
83
|
+
var fixedType = props.fixedType;
|
|
84
|
+
var elemStore = tableInternalData.elemStore;
|
|
85
|
+
var prefix = (fixedType || 'main') + "-footer-";
|
|
86
|
+
elemStore[prefix + "wrapper"] = refElem.value;
|
|
87
|
+
elemStore[prefix + "table"] = refFooterTable.value;
|
|
88
|
+
elemStore[prefix + "colgroup"] = refFooterColgroup.value;
|
|
89
|
+
elemStore[prefix + "list"] = refFooterTFoot.value;
|
|
90
|
+
elemStore[prefix + "xSpace"] = refFooterXSpace.value;
|
|
91
|
+
});
|
|
90
92
|
});
|
|
91
93
|
var renderVN = function () {
|
|
92
94
|
var fixedType = props.fixedType, fixedColumn = props.fixedColumn, tableColumn = props.tableColumn, footerTableData = props.footerTableData;
|
package/es/grid/src/grid.js
CHANGED
|
@@ -25,7 +25,7 @@ import tableComponentEmits from '../../table/src/emits';
|
|
|
25
25
|
import { useSize } from '../../hooks/size';
|
|
26
26
|
import { GlobalEvent, hasEventKey, EVENT_KEYS } from '../../tools/event';
|
|
27
27
|
var tableComponentPropKeys = Object.keys(tableComponentProps);
|
|
28
|
-
var tableComponentMethodKeys = ['clearAll', 'syncData', 'updateData', 'loadData', 'reloadData', 'reloadRow', 'loadColumn', 'reloadColumn', 'getRowNode', 'getColumnNode', 'getRowIndex', 'getVTRowIndex', 'getVMRowIndex', 'getColumnIndex', 'getVTColumnIndex', 'getVMColumnIndex', 'createData', 'createRow', 'revertData', 'clearData', 'isInsertByRow', 'isUpdateByRow', 'getColumns', 'getColumnById', 'getColumnByField', 'getTableColumn', 'getData', 'getCheckboxRecords', 'getRowById', 'getRowid', 'getTableData', 'hideColumn', 'showColumn', 'resetColumn', 'refreshColumn', 'refreshScroll', 'recalculate', 'closeTooltip', 'isAllCheckboxChecked', 'isAllCheckboxIndeterminate', 'getCheckboxIndeterminateRecords', 'setCheckboxRow', 'isCheckedByCheckboxRow', 'isIndeterminateByCheckboxRow', 'toggleCheckboxRow', 'setAllCheckboxRow', 'getRadioReserveRecord', 'clearRadioReserve', 'getCheckboxReserveRecords', 'clearCheckboxReserve', 'toggleAllCheckboxRow', 'clearCheckboxRow', 'setCurrentRow', 'isCheckedByRadioRow', 'setRadioRow', 'clearCurrentRow', 'clearRadioRow', 'getCurrentRecord', 'getRadioRecord', 'getCurrentColumn', 'setCurrentColumn', 'clearCurrentColumn', 'sort', 'clearSort', 'isSort', 'getSortColumns', 'closeFilter', 'isFilter', 'isRowExpandLoaded', 'clearRowExpandLoaded', 'reloadRowExpand', 'reloadRowExpand', 'toggleRowExpand', 'setAllRowExpand', 'setRowExpand', 'isExpandByRow', 'clearRowExpand', 'clearRowExpandReserve', 'getRowExpandRecords', 'getTreeExpandRecords', 'isTreeExpandLoaded', 'clearTreeExpandLoaded', 'reloadTreeExpand', 'reloadTreeChilds', 'toggleTreeExpand', 'setAllTreeExpand', 'setTreeExpand', 'isTreeExpandByRow', 'clearTreeExpand', 'clearTreeExpandReserve', 'getScroll', 'scrollTo', 'scrollToRow', 'scrollToColumn', 'clearScroll', 'updateFooter', 'updateStatus', 'setMergeCells', 'removeMergeCells', 'getMergeCells', 'clearMergeCells', 'setMergeFooterItems', 'removeMergeFooterItems', 'getMergeFooterItems', 'clearMergeFooterItems', 'focus', 'blur', 'connect'];
|
|
28
|
+
var tableComponentMethodKeys = ['clearAll', 'syncData', 'updateData', 'loadData', 'reloadData', 'reloadRow', 'loadColumn', 'reloadColumn', 'getRowNode', 'getColumnNode', 'getRowIndex', 'getVTRowIndex', 'getVMRowIndex', 'getColumnIndex', 'getVTColumnIndex', 'getVMColumnIndex', 'createData', 'createRow', 'revertData', 'clearData', 'isInsertByRow', 'isUpdateByRow', 'getColumns', 'getColumnById', 'getColumnByField', 'getTableColumn', 'getData', 'getCheckboxRecords', 'getParentRow', 'getRowSeq', 'getRowById', 'getRowid', 'getTableData', 'hideColumn', 'showColumn', 'resetColumn', 'refreshColumn', 'refreshScroll', 'recalculate', 'closeTooltip', 'isAllCheckboxChecked', 'isAllCheckboxIndeterminate', 'getCheckboxIndeterminateRecords', 'setCheckboxRow', 'isCheckedByCheckboxRow', 'isIndeterminateByCheckboxRow', 'toggleCheckboxRow', 'setAllCheckboxRow', 'getRadioReserveRecord', 'clearRadioReserve', 'getCheckboxReserveRecords', 'clearCheckboxReserve', 'toggleAllCheckboxRow', 'clearCheckboxRow', 'setCurrentRow', 'isCheckedByRadioRow', 'setRadioRow', 'clearCurrentRow', 'clearRadioRow', 'getCurrentRecord', 'getRadioRecord', 'getCurrentColumn', 'setCurrentColumn', 'clearCurrentColumn', 'sort', 'clearSort', 'isSort', 'getSortColumns', 'closeFilter', 'isFilter', 'isRowExpandLoaded', 'clearRowExpandLoaded', 'reloadRowExpand', 'reloadRowExpand', 'toggleRowExpand', 'setAllRowExpand', 'setRowExpand', 'isExpandByRow', 'clearRowExpand', 'clearRowExpandReserve', 'getRowExpandRecords', 'getTreeExpandRecords', 'isTreeExpandLoaded', 'clearTreeExpandLoaded', 'reloadTreeExpand', 'reloadTreeChilds', 'toggleTreeExpand', 'setAllTreeExpand', 'setTreeExpand', 'isTreeExpandByRow', 'clearTreeExpand', 'clearTreeExpandReserve', 'getScroll', 'scrollTo', 'scrollToRow', 'scrollToColumn', 'clearScroll', 'updateFooter', 'updateStatus', 'setMergeCells', 'removeInsertRow', 'removeMergeCells', 'getMergeCells', 'clearMergeCells', 'setMergeFooterItems', 'removeMergeFooterItems', 'getMergeFooterItems', 'clearMergeFooterItems', 'openTooltip', 'focus', 'blur', 'connect'];
|
|
29
29
|
var gridComponentEmits = __spreadArray(__spreadArray([], tableComponentEmits), [
|
|
30
30
|
'page-change',
|
|
31
31
|
'form-submit',
|
|
@@ -689,6 +689,7 @@ export default defineComponent({
|
|
|
689
689
|
}
|
|
690
690
|
sortList = defaultSort.map(function (item) {
|
|
691
691
|
return {
|
|
692
|
+
field: item.field,
|
|
692
693
|
property: item.field,
|
|
693
694
|
order: item.order
|
|
694
695
|
};
|
package/es/header/src/header.js
CHANGED
|
@@ -9,7 +9,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { createCommentVNode, defineComponent, h, ref, inject, nextTick, watch } from 'vue';
|
|
12
|
+
import { createCommentVNode, defineComponent, h, ref, inject, nextTick, watch, onMounted } from 'vue';
|
|
13
13
|
import XEUtils from 'xe-utils';
|
|
14
14
|
import { convertToRows } from './util';
|
|
15
15
|
import { getColMinWidth } from '../../table/src/util';
|
|
@@ -130,18 +130,20 @@ export default defineComponent({
|
|
|
130
130
|
}
|
|
131
131
|
};
|
|
132
132
|
watch(function () { return props.tableColumn; }, uploadColumn);
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
133
|
+
onMounted(function () {
|
|
134
|
+
nextTick(function () {
|
|
135
|
+
var fixedType = props.fixedType;
|
|
136
|
+
var internalData = $xetable.internalData;
|
|
137
|
+
var elemStore = internalData.elemStore;
|
|
138
|
+
var prefix = (fixedType || 'main') + "-header-";
|
|
139
|
+
elemStore[prefix + "wrapper"] = refElem.value;
|
|
140
|
+
elemStore[prefix + "table"] = refHeaderTable.value;
|
|
141
|
+
elemStore[prefix + "colgroup"] = refHeaderColgroup.value;
|
|
142
|
+
elemStore[prefix + "list"] = refHeaderTHead.value;
|
|
143
|
+
elemStore[prefix + "xSpace"] = refHeaderXSpace.value;
|
|
144
|
+
elemStore[prefix + "repair"] = refHeaderBorderRepair.value;
|
|
145
|
+
uploadColumn();
|
|
146
|
+
});
|
|
145
147
|
});
|
|
146
148
|
var renderVN = function () {
|
|
147
149
|
var fixedType = props.fixedType, fixedColumn = props.fixedColumn, tableColumn = props.tableColumn;
|
package/es/modal/src/modal.js
CHANGED
|
@@ -285,7 +285,7 @@ export default defineComponent({
|
|
|
285
285
|
var maximize = function () {
|
|
286
286
|
return nextTick().then(function () {
|
|
287
287
|
if (!reactData.zoomLocat) {
|
|
288
|
-
var marginSize = XEUtils.toNumber(props.marginSize);
|
|
288
|
+
var marginSize = Math.max(0, XEUtils.toNumber(props.marginSize));
|
|
289
289
|
var boxElem = getBox();
|
|
290
290
|
var _a = getDomNode(), visibleHeight = _a.visibleHeight, visibleWidth = _a.visibleWidth;
|
|
291
291
|
reactData.zoomLocat = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, h, Teleport, ref, onUnmounted, reactive, nextTick } from 'vue';
|
|
1
|
+
import { defineComponent, h, Teleport, ref, onUnmounted, reactive, nextTick, watch } from 'vue';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
3
|
import GlobalConfig from '../../v-x-e-table/src/conf';
|
|
4
4
|
import { useSize } from '../../hooks/size';
|
|
@@ -8,6 +8,7 @@ import { GlobalEvent } from '../../tools/event';
|
|
|
8
8
|
export default defineComponent({
|
|
9
9
|
name: 'VxePulldown',
|
|
10
10
|
props: {
|
|
11
|
+
modelValue: Boolean,
|
|
11
12
|
disabled: Boolean,
|
|
12
13
|
placement: String,
|
|
13
14
|
size: { type: String, default: function () { return GlobalConfig.size; } },
|
|
@@ -15,6 +16,7 @@ export default defineComponent({
|
|
|
15
16
|
transfer: Boolean
|
|
16
17
|
},
|
|
17
18
|
emits: [
|
|
19
|
+
'update:modelValue',
|
|
18
20
|
'hide-panel'
|
|
19
21
|
],
|
|
20
22
|
setup: function (props, context) {
|
|
@@ -144,6 +146,7 @@ export default defineComponent({
|
|
|
144
146
|
reactData.animatVisible = true;
|
|
145
147
|
setTimeout(function () {
|
|
146
148
|
reactData.visiblePanel = true;
|
|
149
|
+
emit('update:modelValue', true);
|
|
147
150
|
updatePlacement();
|
|
148
151
|
setTimeout(function () {
|
|
149
152
|
resolve(updatePlacement());
|
|
@@ -161,6 +164,7 @@ export default defineComponent({
|
|
|
161
164
|
*/
|
|
162
165
|
var hidePanel = function () {
|
|
163
166
|
reactData.visiblePanel = false;
|
|
167
|
+
emit('update:modelValue', false);
|
|
164
168
|
return new Promise(function (resolve) {
|
|
165
169
|
if (reactData.animatVisible) {
|
|
166
170
|
hidePanelTimeout = window.setTimeout(function () {
|
|
@@ -228,6 +232,14 @@ export default defineComponent({
|
|
|
228
232
|
hidePanel: hidePanel
|
|
229
233
|
};
|
|
230
234
|
Object.assign($xepulldown, pulldownMethods);
|
|
235
|
+
watch(function () { return props.modelValue; }, function (value) {
|
|
236
|
+
if (value) {
|
|
237
|
+
showPanel();
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
hidePanel();
|
|
241
|
+
}
|
|
242
|
+
});
|
|
231
243
|
nextTick(function () {
|
|
232
244
|
GlobalEvent.on($xepulldown, 'mousewheel', handleGlobalMousewheelEvent);
|
|
233
245
|
GlobalEvent.on($xepulldown, 'mousedown', handleGlobalMousedownEvent);
|