cnhis-design-vue 3.0.0 → 3.0.1
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/CHANGELOG.md +13 -4
- package/env.d.ts +2 -0
- package/es/big-table/index.css +1 -1
- package/es/big-table/index.js +152 -140
- package/es/button-print/index.css +17 -17
- package/es/drag-layout/index.css +17 -17
- package/es/grid/index.css +17 -17
- package/es/index.css +1 -1
- package/es/index.js +148 -141
- package/package.json +1 -3
- package/packages/big-table/src/BigTable.vue +32 -18
- package/packages/big-table/src/bigTableEmits.ts +2 -1
- package/packages/big-table/src/components/edit-form/edit-select-table.vue +2 -2
- package/packages/big-table/src/components/svg/index.vue +49 -0
- package/packages/big-table/src/hooks/useEdit.ts +10 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
|
+
|
|
5
|
+
### [3.0.1](http://120.25.59.85:3000/cnhis-frontend/cnhis-design-vue/compare/v3.0.0...v3.0.1) (2022-05-17)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* 部分警告容错处理 ([b5f16ed](http://120.25.59.85:3000/cnhis-frontend/cnhis-design-vue/commit/b5f16ed0a9884a515ebe2729a0f460e2ab170f08))
|
|
11
|
+
* 打包前删除旧包 ([1559071](http://120.25.59.85:3000/cnhis-frontend/cnhis-design-vue/commit/1559071bdd9c6faa7e9f6d5d0c49fff5ffe034bd))
|
|
12
|
+
* rollup打包jsx编译和一些其他优化 ([6625d47](http://120.25.59.85:3000/cnhis-frontend/cnhis-design-vue/commit/6625d473523595bb3479ca444a37ed06bffb55aa))
|
|
13
|
+
|
|
5
14
|
## 3.0.0 (2022-05-12)
|
|
6
15
|
|
|
7
16
|
|
package/env.d.ts
CHANGED
package/es/big-table/index.css
CHANGED
package/es/big-table/index.js
CHANGED
|
@@ -1,102 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { computed, watch, defineComponent, openBlock, createElementBlock, unref, createCommentVNode, createElementVNode, toDisplayString, ref, createVNode, withCtx, normalizeClass, renderSlot, createTextVNode, mergeProps, h, resolveComponent, inject, nextTick, reactive, createApp, Teleport, provide, onMounted, onUnmounted, getCurrentInstance, onBeforeUnmount, onActivated, onDeactivated, isVNode, useAttrs, normalizeStyle, withDirectives, vShow, Fragment, createBlock, vModelSelect, vModelText, pushScopeId, popScopeId } from 'vue';
|
|
2
2
|
import axios from 'axios';
|
|
3
3
|
import { SettingsSharp, CaretDown, CaretForward, CopyOutline, SyncOutline } from '@vicons/ionicons5';
|
|
4
4
|
import { NTooltip, NSelect, NPagination, NEmpty, NSpin, NSpace, NInput, useMessage, NIcon, NPopconfirm, NButton, NInputGroup, NCheckbox, NCheckboxGroup, NProgress, NDropdown, NSwitch, NPopover } from 'naive-ui';
|
|
5
5
|
import draggable from 'vuedraggable';
|
|
6
6
|
|
|
7
|
-
/*!
|
|
8
|
-
* vue-router v4.0.13
|
|
9
|
-
* (c) 2022 Eduardo San Martin Morote
|
|
10
|
-
* @license MIT
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
const hasSymbol = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
|
|
14
|
-
const PolySymbol = (name) =>
|
|
15
|
-
// vr = vue router
|
|
16
|
-
hasSymbol
|
|
17
|
-
? Symbol((process.env.NODE_ENV !== 'production') ? '[vue-router]: ' + name : name)
|
|
18
|
-
: ((process.env.NODE_ENV !== 'production') ? '[vue-router]: ' : '_vr_') + name;
|
|
19
|
-
// rvlm = Router View Location Matched
|
|
20
|
-
/**
|
|
21
|
-
* RouteRecord being rendered by the closest ancestor Router View. Used for
|
|
22
|
-
* `onBeforeRouteUpdate` and `onBeforeRouteLeave`. rvlm stands for Router View
|
|
23
|
-
* Location Matched
|
|
24
|
-
*
|
|
25
|
-
* @internal
|
|
26
|
-
*/
|
|
27
|
-
/*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'router view location matched' : 'rvlm');
|
|
28
|
-
/**
|
|
29
|
-
* Allows overriding the router view depth to control which component in
|
|
30
|
-
* `matched` is rendered. rvd stands for Router View Depth
|
|
31
|
-
*
|
|
32
|
-
* @internal
|
|
33
|
-
*/
|
|
34
|
-
/*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'router view depth' : 'rvd');
|
|
35
|
-
/**
|
|
36
|
-
* Allows overriding the router instance returned by `useRouter` in tests. r
|
|
37
|
-
* stands for router
|
|
38
|
-
*
|
|
39
|
-
* @internal
|
|
40
|
-
*/
|
|
41
|
-
/*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'router' : 'r');
|
|
42
|
-
/**
|
|
43
|
-
* Allows overriding the current route returned by `useRoute` in tests. rl
|
|
44
|
-
* stands for route location
|
|
45
|
-
*
|
|
46
|
-
* @internal
|
|
47
|
-
*/
|
|
48
|
-
const routeLocationKey = /*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'route location' : 'rl');
|
|
49
|
-
/**
|
|
50
|
-
* Allows overriding the current route used by router-view. Internally this is
|
|
51
|
-
* used when the `route` prop is passed.
|
|
52
|
-
*
|
|
53
|
-
* @internal
|
|
54
|
-
*/
|
|
55
|
-
/*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'router view location' : 'rvl');
|
|
56
|
-
|
|
57
|
-
var NavigationType;
|
|
58
|
-
(function (NavigationType) {
|
|
59
|
-
NavigationType["pop"] = "pop";
|
|
60
|
-
NavigationType["push"] = "push";
|
|
61
|
-
})(NavigationType || (NavigationType = {}));
|
|
62
|
-
var NavigationDirection;
|
|
63
|
-
(function (NavigationDirection) {
|
|
64
|
-
NavigationDirection["back"] = "back";
|
|
65
|
-
NavigationDirection["forward"] = "forward";
|
|
66
|
-
NavigationDirection["unknown"] = "";
|
|
67
|
-
})(NavigationDirection || (NavigationDirection = {}));
|
|
68
|
-
|
|
69
|
-
/*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'navigation failure' : 'nf');
|
|
70
|
-
/**
|
|
71
|
-
* Enumeration with all possible types for navigation failures. Can be passed to
|
|
72
|
-
* {@link isNavigationFailure} to check for specific failures.
|
|
73
|
-
*/
|
|
74
|
-
var NavigationFailureType;
|
|
75
|
-
(function (NavigationFailureType) {
|
|
76
|
-
/**
|
|
77
|
-
* An aborted navigation is a navigation that failed because a navigation
|
|
78
|
-
* guard returned `false` or called `next(false)`
|
|
79
|
-
*/
|
|
80
|
-
NavigationFailureType[NavigationFailureType["aborted"] = 4] = "aborted";
|
|
81
|
-
/**
|
|
82
|
-
* A cancelled navigation is a navigation that failed because a more recent
|
|
83
|
-
* navigation finished started (not necessarily finished).
|
|
84
|
-
*/
|
|
85
|
-
NavigationFailureType[NavigationFailureType["cancelled"] = 8] = "cancelled";
|
|
86
|
-
/**
|
|
87
|
-
* A duplicated navigation is a navigation that failed because it was
|
|
88
|
-
* initiated while already being at the exact same location.
|
|
89
|
-
*/
|
|
90
|
-
NavigationFailureType[NavigationFailureType["duplicated"] = 16] = "duplicated";
|
|
91
|
-
})(NavigationFailureType || (NavigationFailureType = {}));
|
|
92
|
-
/**
|
|
93
|
-
* Returns the current route location. Equivalent to using `$route` inside
|
|
94
|
-
* templates.
|
|
95
|
-
*/
|
|
96
|
-
function useRoute() {
|
|
97
|
-
return inject(routeLocationKey);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
7
|
const bigTableState = {
|
|
101
8
|
curAbleCheckedLen: 0,
|
|
102
9
|
showButtonTop: 0,
|
|
@@ -304,7 +211,8 @@ const bigTableEmits = [
|
|
|
304
211
|
"setNestLastClickTable",
|
|
305
212
|
"selectionChangeLocal",
|
|
306
213
|
"switchBtnOnChange",
|
|
307
|
-
"asyncTableChange"
|
|
214
|
+
"asyncTableChange",
|
|
215
|
+
"clickSelectTable"
|
|
308
216
|
];
|
|
309
217
|
|
|
310
218
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -13424,7 +13332,7 @@ const useNestTable = (props, state, emit) => {
|
|
|
13424
13332
|
|
|
13425
13333
|
const useEdit = (props, state, emit, xGrid) => {
|
|
13426
13334
|
const initEditTable = async () => {
|
|
13427
|
-
const { isEdit, fieldList } = props.columnConfig;
|
|
13335
|
+
const { isEdit, fieldList = [] } = props.columnConfig;
|
|
13428
13336
|
if (!isEdit)
|
|
13429
13337
|
return;
|
|
13430
13338
|
const hasSelectTable = fieldList.find((v) => v.formType === "selectTable");
|
|
@@ -13470,6 +13378,7 @@ const useEdit = (props, state, emit, xGrid) => {
|
|
|
13470
13378
|
}
|
|
13471
13379
|
};
|
|
13472
13380
|
const onClickSelectTable = async (row) => {
|
|
13381
|
+
emit("clickSelectTable", { row });
|
|
13473
13382
|
const record = {
|
|
13474
13383
|
initRow: false,
|
|
13475
13384
|
row: JSON.parse(JSON.stringify(row))
|
|
@@ -13644,42 +13553,43 @@ var script$6 = /* @__PURE__ */ defineComponent({
|
|
|
13644
13553
|
script$6.__scopeId = "data-v-6633a934";
|
|
13645
13554
|
script$6.__file = "packages/big-table/src/components/TextOverTooltip.vue";
|
|
13646
13555
|
|
|
13647
|
-
const _hoisted_1$2 = { key: 0 };
|
|
13648
|
-
const _hoisted_2$2 = ["xlink:href"];
|
|
13649
|
-
const __default__$2 = {
|
|
13650
|
-
|
|
13651
|
-
};
|
|
13652
|
-
var script$5 = /* @__PURE__ */ defineComponent({
|
|
13653
|
-
|
|
13654
|
-
|
|
13655
|
-
|
|
13656
|
-
|
|
13657
|
-
|
|
13658
|
-
|
|
13659
|
-
|
|
13660
|
-
|
|
13661
|
-
|
|
13662
|
-
|
|
13663
|
-
|
|
13664
|
-
|
|
13665
|
-
|
|
13666
|
-
|
|
13667
|
-
|
|
13668
|
-
|
|
13669
|
-
|
|
13670
|
-
|
|
13671
|
-
|
|
13672
|
-
|
|
13673
|
-
|
|
13674
|
-
|
|
13675
|
-
|
|
13676
|
-
|
|
13677
|
-
|
|
13678
|
-
|
|
13556
|
+
const _hoisted_1$2 = { key: 0 };
|
|
13557
|
+
const _hoisted_2$2 = ["xlink:href"];
|
|
13558
|
+
const __default__$2 = {
|
|
13559
|
+
name: "SvgIcon"
|
|
13560
|
+
};
|
|
13561
|
+
var script$5 = /* @__PURE__ */ defineComponent({
|
|
13562
|
+
...__default__$2,
|
|
13563
|
+
props: {
|
|
13564
|
+
iconClass: { type: String, required: true, default: "" },
|
|
13565
|
+
title: { type: String, required: true, default: "" },
|
|
13566
|
+
className: { type: String, required: false }
|
|
13567
|
+
},
|
|
13568
|
+
setup(__props) {
|
|
13569
|
+
const props = __props;
|
|
13570
|
+
const iconName = computed(() => `#icon-${props.iconClass}`);
|
|
13571
|
+
const svgClass = computed(() => {
|
|
13572
|
+
if (props.className) {
|
|
13573
|
+
return "svg-icon " + props.className;
|
|
13574
|
+
}
|
|
13575
|
+
else {
|
|
13576
|
+
return "svg-icon";
|
|
13577
|
+
}
|
|
13578
|
+
});
|
|
13579
|
+
return (_ctx, _cache) => {
|
|
13580
|
+
return openBlock(), createElementBlock("svg", mergeProps({
|
|
13581
|
+
class: unref(svgClass),
|
|
13582
|
+
"aria-hidden": "true"
|
|
13583
|
+
}, _ctx.$attrs), [
|
|
13584
|
+
__props.title ? (openBlock(), createElementBlock("title", _hoisted_1$2, toDisplayString(__props.title), 1)) : createCommentVNode("v-if", true),
|
|
13585
|
+
createElementVNode("use", { "xlink:href": unref(iconName) }, null, 8, _hoisted_2$2)
|
|
13586
|
+
], 16);
|
|
13587
|
+
};
|
|
13588
|
+
}
|
|
13679
13589
|
});
|
|
13680
13590
|
|
|
13681
|
-
script$5.__scopeId = "data-v-
|
|
13682
|
-
script$5.__file = "src/
|
|
13591
|
+
script$5.__scopeId = "data-v-7e176a4b";
|
|
13592
|
+
script$5.__file = "packages/big-table/src/components/svg/index.vue";
|
|
13683
13593
|
|
|
13684
13594
|
var iconPrefix = 'vxe-icon--';
|
|
13685
13595
|
var GlobalConfig = {
|
|
@@ -38834,9 +38744,9 @@ var Grid = defineComponent(create({
|
|
|
38834
38744
|
}
|
|
38835
38745
|
}));
|
|
38836
38746
|
|
|
38837
|
-
Grid.install = function(app) {
|
|
38838
|
-
|
|
38839
|
-
|
|
38747
|
+
Grid.install = function (app) {
|
|
38748
|
+
app.component(Grid.name, Grid);
|
|
38749
|
+
app.use(VXETableExport);
|
|
38840
38750
|
};
|
|
38841
38751
|
|
|
38842
38752
|
var script$4 = defineComponent({
|
|
@@ -38910,7 +38820,7 @@ var script$4 = defineComponent({
|
|
|
38910
38820
|
showHeaderOverflow: true,
|
|
38911
38821
|
highlightHoverRow: true,
|
|
38912
38822
|
highlightCurrentRow: true,
|
|
38913
|
-
maxHeight:
|
|
38823
|
+
maxHeight: props.col.tableHeight || 200,
|
|
38914
38824
|
align: "center",
|
|
38915
38825
|
columns: state.columns,
|
|
38916
38826
|
data: state.data
|
|
@@ -39698,7 +39608,6 @@ var script$1 = /* @__PURE__ */ defineComponent({
|
|
|
39698
39608
|
let _beforeSearchConvert = [];
|
|
39699
39609
|
let addInlineEditPrimaryKey = "";
|
|
39700
39610
|
const GROUP_TITLE_KEY = "group-show-title";
|
|
39701
|
-
const route = useRoute();
|
|
39702
39611
|
window.$message = useMessage();
|
|
39703
39612
|
const xGrid = ref(null);
|
|
39704
39613
|
const state = reactive(bigTableState);
|
|
@@ -39897,7 +39806,7 @@ var script$1 = /* @__PURE__ */ defineComponent({
|
|
|
39897
39806
|
};
|
|
39898
39807
|
const formatColumns = (map) => {
|
|
39899
39808
|
let { selectType } = getOtherConfigInit() || {};
|
|
39900
|
-
let { isBatchSelect, fieldList, showButtonTop, isScanMultiTable: isScanMultiTable2, isEdit = false, editConfig = {} } = map;
|
|
39809
|
+
let { isBatchSelect, fieldList = [], showButtonTop, isScanMultiTable: isScanMultiTable2, isEdit = false, editConfig = {} } = map;
|
|
39901
39810
|
if (isEdit) {
|
|
39902
39811
|
state.editConfig = Object.assign(state.editConfig, editConfig, {
|
|
39903
39812
|
mode: "cell",
|
|
@@ -39979,6 +39888,19 @@ var script$1 = /* @__PURE__ */ defineComponent({
|
|
|
39979
39888
|
treeNode = false;
|
|
39980
39889
|
type = "";
|
|
39981
39890
|
}
|
|
39891
|
+
const getDefaultValue = (params) => {
|
|
39892
|
+
const value = params.row[item.columnName];
|
|
39893
|
+
if (item.formType === "select") {
|
|
39894
|
+
if (item.options) {
|
|
39895
|
+
return item.options.find((v) => v.value === value)?.label || "";
|
|
39896
|
+
}
|
|
39897
|
+
if (item.queryOptions) {
|
|
39898
|
+
return value;
|
|
39899
|
+
}
|
|
39900
|
+
return value;
|
|
39901
|
+
}
|
|
39902
|
+
return value;
|
|
39903
|
+
};
|
|
39982
39904
|
const col = Object.assign(item, {
|
|
39983
39905
|
visible: item.columnName == "operatorColumn" ? showButtonTop == 0 : item.isShow == 1,
|
|
39984
39906
|
field: item.columnName,
|
|
@@ -40004,7 +39926,7 @@ var script$1 = /* @__PURE__ */ defineComponent({
|
|
|
40004
39926
|
return formatter(params, item);
|
|
40005
39927
|
}
|
|
40006
39928
|
else {
|
|
40007
|
-
return createVNode("span", null, [params
|
|
39929
|
+
return createVNode("span", null, [getDefaultValue(params)]);
|
|
40008
39930
|
}
|
|
40009
39931
|
}
|
|
40010
39932
|
},
|
|
@@ -41636,9 +41558,6 @@ var script$1 = /* @__PURE__ */ defineComponent({
|
|
|
41636
41558
|
removeInlineAddRow();
|
|
41637
41559
|
handleClickCancelBtnByInline();
|
|
41638
41560
|
});
|
|
41639
|
-
watch(() => route, (val) => {
|
|
41640
|
-
resetTableInlineEditStatus();
|
|
41641
|
-
});
|
|
41642
41561
|
watch(() => props.tableRefreshCache, (val, oldVal) => {
|
|
41643
41562
|
if (props.isNestTable)
|
|
41644
41563
|
return;
|
|
@@ -41806,6 +41725,99 @@ var script$1 = /* @__PURE__ */ defineComponent({
|
|
|
41806
41725
|
|
|
41807
41726
|
script$1.__file = "packages/big-table/src/BigTable.vue";
|
|
41808
41727
|
|
|
41728
|
+
/*!
|
|
41729
|
+
* vue-router v4.0.13
|
|
41730
|
+
* (c) 2022 Eduardo San Martin Morote
|
|
41731
|
+
* @license MIT
|
|
41732
|
+
*/
|
|
41733
|
+
|
|
41734
|
+
const hasSymbol = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
|
|
41735
|
+
const PolySymbol = (name) =>
|
|
41736
|
+
// vr = vue router
|
|
41737
|
+
hasSymbol
|
|
41738
|
+
? Symbol((process.env.NODE_ENV !== 'production') ? '[vue-router]: ' + name : name)
|
|
41739
|
+
: ((process.env.NODE_ENV !== 'production') ? '[vue-router]: ' : '_vr_') + name;
|
|
41740
|
+
// rvlm = Router View Location Matched
|
|
41741
|
+
/**
|
|
41742
|
+
* RouteRecord being rendered by the closest ancestor Router View. Used for
|
|
41743
|
+
* `onBeforeRouteUpdate` and `onBeforeRouteLeave`. rvlm stands for Router View
|
|
41744
|
+
* Location Matched
|
|
41745
|
+
*
|
|
41746
|
+
* @internal
|
|
41747
|
+
*/
|
|
41748
|
+
/*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'router view location matched' : 'rvlm');
|
|
41749
|
+
/**
|
|
41750
|
+
* Allows overriding the router view depth to control which component in
|
|
41751
|
+
* `matched` is rendered. rvd stands for Router View Depth
|
|
41752
|
+
*
|
|
41753
|
+
* @internal
|
|
41754
|
+
*/
|
|
41755
|
+
/*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'router view depth' : 'rvd');
|
|
41756
|
+
/**
|
|
41757
|
+
* Allows overriding the router instance returned by `useRouter` in tests. r
|
|
41758
|
+
* stands for router
|
|
41759
|
+
*
|
|
41760
|
+
* @internal
|
|
41761
|
+
*/
|
|
41762
|
+
/*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'router' : 'r');
|
|
41763
|
+
/**
|
|
41764
|
+
* Allows overriding the current route returned by `useRoute` in tests. rl
|
|
41765
|
+
* stands for route location
|
|
41766
|
+
*
|
|
41767
|
+
* @internal
|
|
41768
|
+
*/
|
|
41769
|
+
const routeLocationKey = /*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'route location' : 'rl');
|
|
41770
|
+
/**
|
|
41771
|
+
* Allows overriding the current route used by router-view. Internally this is
|
|
41772
|
+
* used when the `route` prop is passed.
|
|
41773
|
+
*
|
|
41774
|
+
* @internal
|
|
41775
|
+
*/
|
|
41776
|
+
/*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'router view location' : 'rvl');
|
|
41777
|
+
|
|
41778
|
+
var NavigationType;
|
|
41779
|
+
(function (NavigationType) {
|
|
41780
|
+
NavigationType["pop"] = "pop";
|
|
41781
|
+
NavigationType["push"] = "push";
|
|
41782
|
+
})(NavigationType || (NavigationType = {}));
|
|
41783
|
+
var NavigationDirection;
|
|
41784
|
+
(function (NavigationDirection) {
|
|
41785
|
+
NavigationDirection["back"] = "back";
|
|
41786
|
+
NavigationDirection["forward"] = "forward";
|
|
41787
|
+
NavigationDirection["unknown"] = "";
|
|
41788
|
+
})(NavigationDirection || (NavigationDirection = {}));
|
|
41789
|
+
|
|
41790
|
+
/*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'navigation failure' : 'nf');
|
|
41791
|
+
/**
|
|
41792
|
+
* Enumeration with all possible types for navigation failures. Can be passed to
|
|
41793
|
+
* {@link isNavigationFailure} to check for specific failures.
|
|
41794
|
+
*/
|
|
41795
|
+
var NavigationFailureType;
|
|
41796
|
+
(function (NavigationFailureType) {
|
|
41797
|
+
/**
|
|
41798
|
+
* An aborted navigation is a navigation that failed because a navigation
|
|
41799
|
+
* guard returned `false` or called `next(false)`
|
|
41800
|
+
*/
|
|
41801
|
+
NavigationFailureType[NavigationFailureType["aborted"] = 4] = "aborted";
|
|
41802
|
+
/**
|
|
41803
|
+
* A cancelled navigation is a navigation that failed because a more recent
|
|
41804
|
+
* navigation finished started (not necessarily finished).
|
|
41805
|
+
*/
|
|
41806
|
+
NavigationFailureType[NavigationFailureType["cancelled"] = 8] = "cancelled";
|
|
41807
|
+
/**
|
|
41808
|
+
* A duplicated navigation is a navigation that failed because it was
|
|
41809
|
+
* initiated while already being at the exact same location.
|
|
41810
|
+
*/
|
|
41811
|
+
NavigationFailureType[NavigationFailureType["duplicated"] = 16] = "duplicated";
|
|
41812
|
+
})(NavigationFailureType || (NavigationFailureType = {}));
|
|
41813
|
+
/**
|
|
41814
|
+
* Returns the current route location. Equivalent to using `$route` inside
|
|
41815
|
+
* templates.
|
|
41816
|
+
*/
|
|
41817
|
+
function useRoute() {
|
|
41818
|
+
return inject(routeLocationKey);
|
|
41819
|
+
}
|
|
41820
|
+
|
|
41809
41821
|
const _withScopeId = (n) => (pushScopeId("data-v-5cd39776"), n = n(), popScopeId(), n);
|
|
41810
41822
|
const _hoisted_1 = { class: "fields-set-content" };
|
|
41811
41823
|
const _hoisted_2 = { class: "fields-table" };
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
|
|
2
|
+
.popver-content {
|
|
3
|
+
height: 400px;
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
overflow-y: auto;
|
|
6
|
+
}
|
|
7
|
+
.popver-ul {
|
|
8
|
+
margin-bottom: 10px;
|
|
9
|
+
}
|
|
10
|
+
.ul-title {
|
|
11
|
+
font-size: 14px;
|
|
12
|
+
font-weight: 400;
|
|
13
|
+
color: rgba(145, 159, 190, 1);
|
|
14
|
+
line-height: 20px;
|
|
15
|
+
}
|
|
16
|
+
|
|
1
17
|
ul[data-v-5cd39776] {
|
|
2
18
|
margin: 0;
|
|
3
19
|
padding: 0;
|
|
@@ -180,22 +196,6 @@ ul[data-v-5cd39776] {
|
|
|
180
196
|
text-overflow: ellipsis;
|
|
181
197
|
}
|
|
182
198
|
|
|
183
|
-
|
|
184
|
-
.popver-content {
|
|
185
|
-
height: 400px;
|
|
186
|
-
overflow: hidden;
|
|
187
|
-
overflow-y: auto;
|
|
188
|
-
}
|
|
189
|
-
.popver-ul {
|
|
190
|
-
margin-bottom: 10px;
|
|
191
|
-
}
|
|
192
|
-
.ul-title {
|
|
193
|
-
font-size: 14px;
|
|
194
|
-
font-weight: 400;
|
|
195
|
-
color: rgba(145, 159, 190, 1);
|
|
196
|
-
line-height: 20px;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
199
|
body > .vxe-table--tooltip-wrapper {
|
|
200
200
|
display: none !important;
|
|
201
201
|
}
|
|
@@ -771,7 +771,7 @@ body > .vxe-table--tooltip-wrapper {
|
|
|
771
771
|
}
|
|
772
772
|
|
|
773
773
|
|
|
774
|
-
.svg-icon[data-v-
|
|
774
|
+
.svg-icon[data-v-7e176a4b] {
|
|
775
775
|
width: 1em;
|
|
776
776
|
height: 1em;
|
|
777
777
|
vertical-align: -0.15em;
|
package/es/drag-layout/index.css
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
|
|
2
|
+
.popver-content {
|
|
3
|
+
height: 400px;
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
overflow-y: auto;
|
|
6
|
+
}
|
|
7
|
+
.popver-ul {
|
|
8
|
+
margin-bottom: 10px;
|
|
9
|
+
}
|
|
10
|
+
.ul-title {
|
|
11
|
+
font-size: 14px;
|
|
12
|
+
font-weight: 400;
|
|
13
|
+
color: rgba(145, 159, 190, 1);
|
|
14
|
+
line-height: 20px;
|
|
15
|
+
}
|
|
16
|
+
|
|
1
17
|
ul[data-v-5cd39776] {
|
|
2
18
|
margin: 0;
|
|
3
19
|
padding: 0;
|
|
@@ -180,22 +196,6 @@ ul[data-v-5cd39776] {
|
|
|
180
196
|
text-overflow: ellipsis;
|
|
181
197
|
}
|
|
182
198
|
|
|
183
|
-
|
|
184
|
-
.popver-content {
|
|
185
|
-
height: 400px;
|
|
186
|
-
overflow: hidden;
|
|
187
|
-
overflow-y: auto;
|
|
188
|
-
}
|
|
189
|
-
.popver-ul {
|
|
190
|
-
margin-bottom: 10px;
|
|
191
|
-
}
|
|
192
|
-
.ul-title {
|
|
193
|
-
font-size: 14px;
|
|
194
|
-
font-weight: 400;
|
|
195
|
-
color: rgba(145, 159, 190, 1);
|
|
196
|
-
line-height: 20px;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
199
|
body > .vxe-table--tooltip-wrapper {
|
|
200
200
|
display: none !important;
|
|
201
201
|
}
|
|
@@ -771,7 +771,7 @@ body > .vxe-table--tooltip-wrapper {
|
|
|
771
771
|
}
|
|
772
772
|
|
|
773
773
|
|
|
774
|
-
.svg-icon[data-v-
|
|
774
|
+
.svg-icon[data-v-7e176a4b] {
|
|
775
775
|
width: 1em;
|
|
776
776
|
height: 1em;
|
|
777
777
|
vertical-align: -0.15em;
|
package/es/grid/index.css
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
|
|
2
|
+
.popver-content {
|
|
3
|
+
height: 400px;
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
overflow-y: auto;
|
|
6
|
+
}
|
|
7
|
+
.popver-ul {
|
|
8
|
+
margin-bottom: 10px;
|
|
9
|
+
}
|
|
10
|
+
.ul-title {
|
|
11
|
+
font-size: 14px;
|
|
12
|
+
font-weight: 400;
|
|
13
|
+
color: rgba(145, 159, 190, 1);
|
|
14
|
+
line-height: 20px;
|
|
15
|
+
}
|
|
16
|
+
|
|
1
17
|
ul[data-v-5cd39776] {
|
|
2
18
|
margin: 0;
|
|
3
19
|
padding: 0;
|
|
@@ -180,22 +196,6 @@ ul[data-v-5cd39776] {
|
|
|
180
196
|
text-overflow: ellipsis;
|
|
181
197
|
}
|
|
182
198
|
|
|
183
|
-
|
|
184
|
-
.popver-content {
|
|
185
|
-
height: 400px;
|
|
186
|
-
overflow: hidden;
|
|
187
|
-
overflow-y: auto;
|
|
188
|
-
}
|
|
189
|
-
.popver-ul {
|
|
190
|
-
margin-bottom: 10px;
|
|
191
|
-
}
|
|
192
|
-
.ul-title {
|
|
193
|
-
font-size: 14px;
|
|
194
|
-
font-weight: 400;
|
|
195
|
-
color: rgba(145, 159, 190, 1);
|
|
196
|
-
line-height: 20px;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
199
|
body > .vxe-table--tooltip-wrapper {
|
|
200
200
|
display: none !important;
|
|
201
201
|
}
|
|
@@ -771,7 +771,7 @@ body > .vxe-table--tooltip-wrapper {
|
|
|
771
771
|
}
|
|
772
772
|
|
|
773
773
|
|
|
774
|
-
.svg-icon[data-v-
|
|
774
|
+
.svg-icon[data-v-7e176a4b] {
|
|
775
775
|
width: 1em;
|
|
776
776
|
height: 1em;
|
|
777
777
|
vertical-align: -0.15em;
|
package/es/index.css
CHANGED
package/es/index.js
CHANGED
|
@@ -30827,99 +30827,6 @@ Grid.install = function (app) {
|
|
|
30827
30827
|
app.use(VXETableExport);
|
|
30828
30828
|
};
|
|
30829
30829
|
|
|
30830
|
-
/*!
|
|
30831
|
-
* vue-router v4.0.13
|
|
30832
|
-
* (c) 2022 Eduardo San Martin Morote
|
|
30833
|
-
* @license MIT
|
|
30834
|
-
*/
|
|
30835
|
-
|
|
30836
|
-
const hasSymbol = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
|
|
30837
|
-
const PolySymbol = (name) =>
|
|
30838
|
-
// vr = vue router
|
|
30839
|
-
hasSymbol
|
|
30840
|
-
? Symbol((process.env.NODE_ENV !== 'production') ? '[vue-router]: ' + name : name)
|
|
30841
|
-
: ((process.env.NODE_ENV !== 'production') ? '[vue-router]: ' : '_vr_') + name;
|
|
30842
|
-
// rvlm = Router View Location Matched
|
|
30843
|
-
/**
|
|
30844
|
-
* RouteRecord being rendered by the closest ancestor Router View. Used for
|
|
30845
|
-
* `onBeforeRouteUpdate` and `onBeforeRouteLeave`. rvlm stands for Router View
|
|
30846
|
-
* Location Matched
|
|
30847
|
-
*
|
|
30848
|
-
* @internal
|
|
30849
|
-
*/
|
|
30850
|
-
/*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'router view location matched' : 'rvlm');
|
|
30851
|
-
/**
|
|
30852
|
-
* Allows overriding the router view depth to control which component in
|
|
30853
|
-
* `matched` is rendered. rvd stands for Router View Depth
|
|
30854
|
-
*
|
|
30855
|
-
* @internal
|
|
30856
|
-
*/
|
|
30857
|
-
/*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'router view depth' : 'rvd');
|
|
30858
|
-
/**
|
|
30859
|
-
* Allows overriding the router instance returned by `useRouter` in tests. r
|
|
30860
|
-
* stands for router
|
|
30861
|
-
*
|
|
30862
|
-
* @internal
|
|
30863
|
-
*/
|
|
30864
|
-
/*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'router' : 'r');
|
|
30865
|
-
/**
|
|
30866
|
-
* Allows overriding the current route returned by `useRoute` in tests. rl
|
|
30867
|
-
* stands for route location
|
|
30868
|
-
*
|
|
30869
|
-
* @internal
|
|
30870
|
-
*/
|
|
30871
|
-
const routeLocationKey = /*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'route location' : 'rl');
|
|
30872
|
-
/**
|
|
30873
|
-
* Allows overriding the current route used by router-view. Internally this is
|
|
30874
|
-
* used when the `route` prop is passed.
|
|
30875
|
-
*
|
|
30876
|
-
* @internal
|
|
30877
|
-
*/
|
|
30878
|
-
/*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'router view location' : 'rvl');
|
|
30879
|
-
|
|
30880
|
-
var NavigationType;
|
|
30881
|
-
(function (NavigationType) {
|
|
30882
|
-
NavigationType["pop"] = "pop";
|
|
30883
|
-
NavigationType["push"] = "push";
|
|
30884
|
-
})(NavigationType || (NavigationType = {}));
|
|
30885
|
-
var NavigationDirection;
|
|
30886
|
-
(function (NavigationDirection) {
|
|
30887
|
-
NavigationDirection["back"] = "back";
|
|
30888
|
-
NavigationDirection["forward"] = "forward";
|
|
30889
|
-
NavigationDirection["unknown"] = "";
|
|
30890
|
-
})(NavigationDirection || (NavigationDirection = {}));
|
|
30891
|
-
|
|
30892
|
-
/*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'navigation failure' : 'nf');
|
|
30893
|
-
/**
|
|
30894
|
-
* Enumeration with all possible types for navigation failures. Can be passed to
|
|
30895
|
-
* {@link isNavigationFailure} to check for specific failures.
|
|
30896
|
-
*/
|
|
30897
|
-
var NavigationFailureType;
|
|
30898
|
-
(function (NavigationFailureType) {
|
|
30899
|
-
/**
|
|
30900
|
-
* An aborted navigation is a navigation that failed because a navigation
|
|
30901
|
-
* guard returned `false` or called `next(false)`
|
|
30902
|
-
*/
|
|
30903
|
-
NavigationFailureType[NavigationFailureType["aborted"] = 4] = "aborted";
|
|
30904
|
-
/**
|
|
30905
|
-
* A cancelled navigation is a navigation that failed because a more recent
|
|
30906
|
-
* navigation finished started (not necessarily finished).
|
|
30907
|
-
*/
|
|
30908
|
-
NavigationFailureType[NavigationFailureType["cancelled"] = 8] = "cancelled";
|
|
30909
|
-
/**
|
|
30910
|
-
* A duplicated navigation is a navigation that failed because it was
|
|
30911
|
-
* initiated while already being at the exact same location.
|
|
30912
|
-
*/
|
|
30913
|
-
NavigationFailureType[NavigationFailureType["duplicated"] = 16] = "duplicated";
|
|
30914
|
-
})(NavigationFailureType || (NavigationFailureType = {}));
|
|
30915
|
-
/**
|
|
30916
|
-
* Returns the current route location. Equivalent to using `$route` inside
|
|
30917
|
-
* templates.
|
|
30918
|
-
*/
|
|
30919
|
-
function useRoute() {
|
|
30920
|
-
return inject(routeLocationKey);
|
|
30921
|
-
}
|
|
30922
|
-
|
|
30923
30830
|
const bigTableState = {
|
|
30924
30831
|
curAbleCheckedLen: 0,
|
|
30925
30832
|
showButtonTop: 0,
|
|
@@ -31127,7 +31034,8 @@ const bigTableEmits = [
|
|
|
31127
31034
|
"setNestLastClickTable",
|
|
31128
31035
|
"selectionChangeLocal",
|
|
31129
31036
|
"switchBtnOnChange",
|
|
31130
|
-
"asyncTableChange"
|
|
31037
|
+
"asyncTableChange",
|
|
31038
|
+
"clickSelectTable"
|
|
31131
31039
|
];
|
|
31132
31040
|
|
|
31133
31041
|
var moment$1 = {exports: {}};
|
|
@@ -38582,7 +38490,7 @@ const useNestTable = (props, state, emit) => {
|
|
|
38582
38490
|
|
|
38583
38491
|
const useEdit = (props, state, emit, xGrid) => {
|
|
38584
38492
|
const initEditTable = async () => {
|
|
38585
|
-
const { isEdit, fieldList } = props.columnConfig;
|
|
38493
|
+
const { isEdit, fieldList = [] } = props.columnConfig;
|
|
38586
38494
|
if (!isEdit)
|
|
38587
38495
|
return;
|
|
38588
38496
|
const hasSelectTable = fieldList.find((v) => v.formType === "selectTable");
|
|
@@ -38628,6 +38536,7 @@ const useEdit = (props, state, emit, xGrid) => {
|
|
|
38628
38536
|
}
|
|
38629
38537
|
};
|
|
38630
38538
|
const onClickSelectTable = async (row) => {
|
|
38539
|
+
emit("clickSelectTable", { row });
|
|
38631
38540
|
const record = {
|
|
38632
38541
|
initRow: false,
|
|
38633
38542
|
row: JSON.parse(JSON.stringify(row))
|
|
@@ -38802,47 +38711,43 @@ var script$b = /* @__PURE__ */ defineComponent({
|
|
|
38802
38711
|
script$b.__scopeId = "data-v-6633a934";
|
|
38803
38712
|
script$b.__file = "packages/big-table/src/components/TextOverTooltip.vue";
|
|
38804
38713
|
|
|
38805
|
-
const _hoisted_1$6 = { key: 0 };
|
|
38806
|
-
const _hoisted_2$6 = ["xlink:href"];
|
|
38807
|
-
const __default__$7 = {
|
|
38808
|
-
|
|
38809
|
-
};
|
|
38810
|
-
var script$a = /* @__PURE__ */ defineComponent({
|
|
38811
|
-
|
|
38812
|
-
|
|
38813
|
-
|
|
38814
|
-
|
|
38815
|
-
|
|
38816
|
-
|
|
38817
|
-
|
|
38818
|
-
|
|
38819
|
-
|
|
38820
|
-
|
|
38821
|
-
|
|
38822
|
-
|
|
38823
|
-
|
|
38824
|
-
|
|
38825
|
-
|
|
38826
|
-
|
|
38827
|
-
|
|
38828
|
-
|
|
38829
|
-
|
|
38830
|
-
|
|
38831
|
-
|
|
38832
|
-
|
|
38833
|
-
|
|
38834
|
-
|
|
38835
|
-
|
|
38836
|
-
|
|
38714
|
+
const _hoisted_1$6 = { key: 0 };
|
|
38715
|
+
const _hoisted_2$6 = ["xlink:href"];
|
|
38716
|
+
const __default__$7 = {
|
|
38717
|
+
name: "SvgIcon"
|
|
38718
|
+
};
|
|
38719
|
+
var script$a = /* @__PURE__ */ defineComponent({
|
|
38720
|
+
...__default__$7,
|
|
38721
|
+
props: {
|
|
38722
|
+
iconClass: { type: String, required: true, default: "" },
|
|
38723
|
+
title: { type: String, required: true, default: "" },
|
|
38724
|
+
className: { type: String, required: false }
|
|
38725
|
+
},
|
|
38726
|
+
setup(__props) {
|
|
38727
|
+
const props = __props;
|
|
38728
|
+
const iconName = computed(() => `#icon-${props.iconClass}`);
|
|
38729
|
+
const svgClass = computed(() => {
|
|
38730
|
+
if (props.className) {
|
|
38731
|
+
return "svg-icon " + props.className;
|
|
38732
|
+
}
|
|
38733
|
+
else {
|
|
38734
|
+
return "svg-icon";
|
|
38735
|
+
}
|
|
38736
|
+
});
|
|
38737
|
+
return (_ctx, _cache) => {
|
|
38738
|
+
return openBlock(), createElementBlock("svg", mergeProps({
|
|
38739
|
+
class: unref(svgClass),
|
|
38740
|
+
"aria-hidden": "true"
|
|
38741
|
+
}, _ctx.$attrs), [
|
|
38742
|
+
__props.title ? (openBlock(), createElementBlock("title", _hoisted_1$6, toDisplayString(__props.title), 1)) : createCommentVNode("v-if", true),
|
|
38743
|
+
createElementVNode("use", { "xlink:href": unref(iconName) }, null, 8, _hoisted_2$6)
|
|
38744
|
+
], 16);
|
|
38745
|
+
};
|
|
38746
|
+
}
|
|
38837
38747
|
});
|
|
38838
38748
|
|
|
38839
|
-
script$a.__scopeId = "data-v-
|
|
38840
|
-
script$a.__file = "src/
|
|
38841
|
-
|
|
38842
|
-
Grid.install = function(app) {
|
|
38843
|
-
app.component(Grid.name, Grid);
|
|
38844
|
-
app.use(VXETableExport);
|
|
38845
|
-
};
|
|
38749
|
+
script$a.__scopeId = "data-v-7e176a4b";
|
|
38750
|
+
script$a.__file = "packages/big-table/src/components/svg/index.vue";
|
|
38846
38751
|
|
|
38847
38752
|
var script$9 = defineComponent({
|
|
38848
38753
|
name: "EditSelectTable",
|
|
@@ -38915,7 +38820,7 @@ var script$9 = defineComponent({
|
|
|
38915
38820
|
showHeaderOverflow: true,
|
|
38916
38821
|
highlightHoverRow: true,
|
|
38917
38822
|
highlightCurrentRow: true,
|
|
38918
|
-
maxHeight:
|
|
38823
|
+
maxHeight: props.col.tableHeight || 200,
|
|
38919
38824
|
align: "center",
|
|
38920
38825
|
columns: state.columns,
|
|
38921
38826
|
data: state.data
|
|
@@ -39703,7 +39608,6 @@ var script$6 = /* @__PURE__ */ defineComponent({
|
|
|
39703
39608
|
let _beforeSearchConvert = [];
|
|
39704
39609
|
let addInlineEditPrimaryKey = "";
|
|
39705
39610
|
const GROUP_TITLE_KEY = "group-show-title";
|
|
39706
|
-
const route = useRoute();
|
|
39707
39611
|
window.$message = useMessage();
|
|
39708
39612
|
const xGrid = ref(null);
|
|
39709
39613
|
const state = reactive(bigTableState);
|
|
@@ -39902,7 +39806,7 @@ var script$6 = /* @__PURE__ */ defineComponent({
|
|
|
39902
39806
|
};
|
|
39903
39807
|
const formatColumns = (map) => {
|
|
39904
39808
|
let { selectType } = getOtherConfigInit() || {};
|
|
39905
|
-
let { isBatchSelect, fieldList, showButtonTop, isScanMultiTable: isScanMultiTable2, isEdit = false, editConfig = {} } = map;
|
|
39809
|
+
let { isBatchSelect, fieldList = [], showButtonTop, isScanMultiTable: isScanMultiTable2, isEdit = false, editConfig = {} } = map;
|
|
39906
39810
|
if (isEdit) {
|
|
39907
39811
|
state.editConfig = Object.assign(state.editConfig, editConfig, {
|
|
39908
39812
|
mode: "cell",
|
|
@@ -39984,6 +39888,19 @@ var script$6 = /* @__PURE__ */ defineComponent({
|
|
|
39984
39888
|
treeNode = false;
|
|
39985
39889
|
type = "";
|
|
39986
39890
|
}
|
|
39891
|
+
const getDefaultValue = (params) => {
|
|
39892
|
+
const value = params.row[item.columnName];
|
|
39893
|
+
if (item.formType === "select") {
|
|
39894
|
+
if (item.options) {
|
|
39895
|
+
return item.options.find((v) => v.value === value)?.label || "";
|
|
39896
|
+
}
|
|
39897
|
+
if (item.queryOptions) {
|
|
39898
|
+
return value;
|
|
39899
|
+
}
|
|
39900
|
+
return value;
|
|
39901
|
+
}
|
|
39902
|
+
return value;
|
|
39903
|
+
};
|
|
39987
39904
|
const col = Object.assign(item, {
|
|
39988
39905
|
visible: item.columnName == "operatorColumn" ? showButtonTop == 0 : item.isShow == 1,
|
|
39989
39906
|
field: item.columnName,
|
|
@@ -40009,7 +39926,7 @@ var script$6 = /* @__PURE__ */ defineComponent({
|
|
|
40009
39926
|
return formatter(params, item);
|
|
40010
39927
|
}
|
|
40011
39928
|
else {
|
|
40012
|
-
return createVNode("span", null, [params
|
|
39929
|
+
return createVNode("span", null, [getDefaultValue(params)]);
|
|
40013
39930
|
}
|
|
40014
39931
|
}
|
|
40015
39932
|
},
|
|
@@ -41641,9 +41558,6 @@ var script$6 = /* @__PURE__ */ defineComponent({
|
|
|
41641
41558
|
removeInlineAddRow();
|
|
41642
41559
|
handleClickCancelBtnByInline();
|
|
41643
41560
|
});
|
|
41644
|
-
watch(() => route, (val) => {
|
|
41645
|
-
resetTableInlineEditStatus();
|
|
41646
|
-
});
|
|
41647
41561
|
watch(() => props.tableRefreshCache, (val, oldVal) => {
|
|
41648
41562
|
if (props.isNestTable)
|
|
41649
41563
|
return;
|
|
@@ -41811,6 +41725,99 @@ var script$6 = /* @__PURE__ */ defineComponent({
|
|
|
41811
41725
|
|
|
41812
41726
|
script$6.__file = "packages/big-table/src/BigTable.vue";
|
|
41813
41727
|
|
|
41728
|
+
/*!
|
|
41729
|
+
* vue-router v4.0.13
|
|
41730
|
+
* (c) 2022 Eduardo San Martin Morote
|
|
41731
|
+
* @license MIT
|
|
41732
|
+
*/
|
|
41733
|
+
|
|
41734
|
+
const hasSymbol = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
|
|
41735
|
+
const PolySymbol = (name) =>
|
|
41736
|
+
// vr = vue router
|
|
41737
|
+
hasSymbol
|
|
41738
|
+
? Symbol((process.env.NODE_ENV !== 'production') ? '[vue-router]: ' + name : name)
|
|
41739
|
+
: ((process.env.NODE_ENV !== 'production') ? '[vue-router]: ' : '_vr_') + name;
|
|
41740
|
+
// rvlm = Router View Location Matched
|
|
41741
|
+
/**
|
|
41742
|
+
* RouteRecord being rendered by the closest ancestor Router View. Used for
|
|
41743
|
+
* `onBeforeRouteUpdate` and `onBeforeRouteLeave`. rvlm stands for Router View
|
|
41744
|
+
* Location Matched
|
|
41745
|
+
*
|
|
41746
|
+
* @internal
|
|
41747
|
+
*/
|
|
41748
|
+
/*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'router view location matched' : 'rvlm');
|
|
41749
|
+
/**
|
|
41750
|
+
* Allows overriding the router view depth to control which component in
|
|
41751
|
+
* `matched` is rendered. rvd stands for Router View Depth
|
|
41752
|
+
*
|
|
41753
|
+
* @internal
|
|
41754
|
+
*/
|
|
41755
|
+
/*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'router view depth' : 'rvd');
|
|
41756
|
+
/**
|
|
41757
|
+
* Allows overriding the router instance returned by `useRouter` in tests. r
|
|
41758
|
+
* stands for router
|
|
41759
|
+
*
|
|
41760
|
+
* @internal
|
|
41761
|
+
*/
|
|
41762
|
+
/*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'router' : 'r');
|
|
41763
|
+
/**
|
|
41764
|
+
* Allows overriding the current route returned by `useRoute` in tests. rl
|
|
41765
|
+
* stands for route location
|
|
41766
|
+
*
|
|
41767
|
+
* @internal
|
|
41768
|
+
*/
|
|
41769
|
+
const routeLocationKey = /*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'route location' : 'rl');
|
|
41770
|
+
/**
|
|
41771
|
+
* Allows overriding the current route used by router-view. Internally this is
|
|
41772
|
+
* used when the `route` prop is passed.
|
|
41773
|
+
*
|
|
41774
|
+
* @internal
|
|
41775
|
+
*/
|
|
41776
|
+
/*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'router view location' : 'rvl');
|
|
41777
|
+
|
|
41778
|
+
var NavigationType;
|
|
41779
|
+
(function (NavigationType) {
|
|
41780
|
+
NavigationType["pop"] = "pop";
|
|
41781
|
+
NavigationType["push"] = "push";
|
|
41782
|
+
})(NavigationType || (NavigationType = {}));
|
|
41783
|
+
var NavigationDirection;
|
|
41784
|
+
(function (NavigationDirection) {
|
|
41785
|
+
NavigationDirection["back"] = "back";
|
|
41786
|
+
NavigationDirection["forward"] = "forward";
|
|
41787
|
+
NavigationDirection["unknown"] = "";
|
|
41788
|
+
})(NavigationDirection || (NavigationDirection = {}));
|
|
41789
|
+
|
|
41790
|
+
/*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'navigation failure' : 'nf');
|
|
41791
|
+
/**
|
|
41792
|
+
* Enumeration with all possible types for navigation failures. Can be passed to
|
|
41793
|
+
* {@link isNavigationFailure} to check for specific failures.
|
|
41794
|
+
*/
|
|
41795
|
+
var NavigationFailureType;
|
|
41796
|
+
(function (NavigationFailureType) {
|
|
41797
|
+
/**
|
|
41798
|
+
* An aborted navigation is a navigation that failed because a navigation
|
|
41799
|
+
* guard returned `false` or called `next(false)`
|
|
41800
|
+
*/
|
|
41801
|
+
NavigationFailureType[NavigationFailureType["aborted"] = 4] = "aborted";
|
|
41802
|
+
/**
|
|
41803
|
+
* A cancelled navigation is a navigation that failed because a more recent
|
|
41804
|
+
* navigation finished started (not necessarily finished).
|
|
41805
|
+
*/
|
|
41806
|
+
NavigationFailureType[NavigationFailureType["cancelled"] = 8] = "cancelled";
|
|
41807
|
+
/**
|
|
41808
|
+
* A duplicated navigation is a navigation that failed because it was
|
|
41809
|
+
* initiated while already being at the exact same location.
|
|
41810
|
+
*/
|
|
41811
|
+
NavigationFailureType[NavigationFailureType["duplicated"] = 16] = "duplicated";
|
|
41812
|
+
})(NavigationFailureType || (NavigationFailureType = {}));
|
|
41813
|
+
/**
|
|
41814
|
+
* Returns the current route location. Equivalent to using `$route` inside
|
|
41815
|
+
* templates.
|
|
41816
|
+
*/
|
|
41817
|
+
function useRoute() {
|
|
41818
|
+
return inject(routeLocationKey);
|
|
41819
|
+
}
|
|
41820
|
+
|
|
41814
41821
|
const _withScopeId$1 = (n) => (pushScopeId("data-v-5cd39776"), n = n(), popScopeId(), n);
|
|
41815
41822
|
const _hoisted_1$4 = { class: "fields-set-content" };
|
|
41816
41823
|
const _hoisted_2$4 = { class: "fields-table" };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.1",
|
|
5
5
|
"main": "es/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
7
7
|
"scripts": {
|
|
@@ -50,12 +50,10 @@
|
|
|
50
50
|
"rollup-plugin-delete": "^2.0.0",
|
|
51
51
|
"rollup-plugin-esbuild": "^4.9.1",
|
|
52
52
|
"rollup-plugin-external-globals": "^0.6.1",
|
|
53
|
-
"rollup-plugin-jsx": "^1.0.3",
|
|
54
53
|
"rollup-plugin-postcss": "^4.0.2",
|
|
55
54
|
"rollup-plugin-terser": "^7.0.2",
|
|
56
55
|
"rollup-plugin-typescript2": "^0.31.2",
|
|
57
56
|
"rollup-plugin-vue": "^6.0.0",
|
|
58
|
-
"rollup-plugin-vue-jsx-compat": "0.0.6",
|
|
59
57
|
"standard-version": "^9.3.2",
|
|
60
58
|
"typescript": "^4.5.4",
|
|
61
59
|
"vite": "^2.8.0",
|
|
@@ -163,7 +163,7 @@ export default create({
|
|
|
163
163
|
|
|
164
164
|
<script lang="tsx" setup>
|
|
165
165
|
import { computed, nextTick, onMounted, reactive, ref, useAttrs, watch, isReactive, shallowReactive, onActivated, onUnmounted } from "vue";
|
|
166
|
-
import { useRoute } from 'vue-router';
|
|
166
|
+
// import { useRoute } from 'vue-router';
|
|
167
167
|
import bigTableState from "./bigTableState";
|
|
168
168
|
import bigTableProps from "./bigTableProps";
|
|
169
169
|
import bigTableEmits from "./bigTableEmits";
|
|
@@ -175,9 +175,8 @@ import { useEdit } from './hooks/useEdit';
|
|
|
175
175
|
import { SettingsSharp, SyncOutline, CopyOutline, CaretDown, CaretForward } from "@vicons/ionicons5";
|
|
176
176
|
import NoData from "./components/NoData.vue";
|
|
177
177
|
import TextOverTooltip from "./components/TextOverTooltip.vue";
|
|
178
|
-
import SvgIcon from '@/component/svg/index.vue';
|
|
179
|
-
|
|
180
|
-
// import EditForm from './components/edit-form/EditForm.vue';
|
|
178
|
+
// import SvgIcon from '@/component/svg/index.vue';
|
|
179
|
+
import SvgIcon from './components/svg/index.vue'
|
|
181
180
|
import EditSelectTable from './components/edit-form/edit-select-table.vue'
|
|
182
181
|
import EditInput from './components/edit-form/edit-input.vue'
|
|
183
182
|
import EditSelect from './components/edit-form/edit-select.vue'
|
|
@@ -195,13 +194,10 @@ import {
|
|
|
195
194
|
NSwitch,
|
|
196
195
|
NPopover,
|
|
197
196
|
NDropdown,
|
|
198
|
-
NPopconfirm
|
|
199
|
-
NSelect,
|
|
200
|
-
NPagination,
|
|
201
|
-
NEmpty
|
|
197
|
+
NPopconfirm
|
|
202
198
|
} from "naive-ui";
|
|
203
199
|
import { useMessage } from 'naive-ui'
|
|
204
|
-
import CGrid from '~/grid
|
|
200
|
+
import CGrid from '~/grid';
|
|
205
201
|
import vexutils from '@/utils/vexutils.js';
|
|
206
202
|
import {
|
|
207
203
|
getEvaluate,
|
|
@@ -248,7 +244,7 @@ let addInlineEditPrimaryKey: any = '';
|
|
|
248
244
|
|
|
249
245
|
const GROUP_TITLE_KEY = "group-show-title";
|
|
250
246
|
|
|
251
|
-
const route = useRoute();
|
|
247
|
+
// const route = useRoute();
|
|
252
248
|
|
|
253
249
|
(window as any).$message = useMessage()
|
|
254
250
|
|
|
@@ -521,7 +517,7 @@ const formatColumns = (map: any) => {
|
|
|
521
517
|
*/
|
|
522
518
|
// 配置列表
|
|
523
519
|
let { selectType } = getOtherConfigInit() || {};
|
|
524
|
-
let { isBatchSelect, fieldList, showButtonTop, isScanMultiTable, isEdit = false, editConfig = {} } = map;
|
|
520
|
+
let { isBatchSelect, fieldList = [], showButtonTop, isScanMultiTable, isEdit = false, editConfig = {} } = map;
|
|
525
521
|
if (isEdit) {
|
|
526
522
|
state.editConfig = Object.assign(state.editConfig, editConfig, {
|
|
527
523
|
mode: 'cell',
|
|
@@ -631,6 +627,24 @@ const formatColumns = (map: any) => {
|
|
|
631
627
|
type = "";
|
|
632
628
|
}
|
|
633
629
|
|
|
630
|
+
const getDefaultValue = (params: any) => {
|
|
631
|
+
const value = params.row[item.columnName]
|
|
632
|
+
if (item.formType === 'select') {
|
|
633
|
+
// console.log('rowrowrow', params.row, value, item)
|
|
634
|
+
if (item.options) {
|
|
635
|
+
return item.options.find((v: any) => v.value === value)?.label || ''
|
|
636
|
+
}
|
|
637
|
+
if (item.queryOptions) {
|
|
638
|
+
return value
|
|
639
|
+
// setTimeout(() => {
|
|
640
|
+
// return (params.row[`${col.columnName}_options`]?.find((v: any) => v.value === value)?.label) || ''
|
|
641
|
+
// }, 1500)
|
|
642
|
+
}
|
|
643
|
+
return value
|
|
644
|
+
}
|
|
645
|
+
return value
|
|
646
|
+
}
|
|
647
|
+
|
|
634
648
|
const col = Object.assign(item, {
|
|
635
649
|
visible: item.columnName == "operatorColumn" ? showButtonTop == 0 : item.isShow == 1,
|
|
636
650
|
field: item.columnName,
|
|
@@ -664,7 +678,7 @@ const formatColumns = (map: any) => {
|
|
|
664
678
|
if(!isEdit || item.columnName === 'operatorColumn' || !item.isEdit) {
|
|
665
679
|
return formatter(params, item)
|
|
666
680
|
} else {
|
|
667
|
-
return <span>{params
|
|
681
|
+
return <span>{getDefaultValue(params)}</span>
|
|
668
682
|
}
|
|
669
683
|
}
|
|
670
684
|
},
|
|
@@ -2514,12 +2528,12 @@ watch(
|
|
|
2514
2528
|
handleClickCancelBtnByInline();
|
|
2515
2529
|
}
|
|
2516
2530
|
)
|
|
2517
|
-
watch(
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
)
|
|
2531
|
+
// watch(
|
|
2532
|
+
// () => route,
|
|
2533
|
+
// val => {
|
|
2534
|
+
// resetTableInlineEditStatus();
|
|
2535
|
+
// }
|
|
2536
|
+
// )
|
|
2523
2537
|
watch(
|
|
2524
2538
|
() => props.tableRefreshCache,
|
|
2525
2539
|
(val, oldVal) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="tsx">
|
|
2
2
|
import { defineComponent, ref, reactive } from 'vue'
|
|
3
3
|
import { NSelect, NPagination, NEmpty, NSpin, NSpace } from 'naive-ui'
|
|
4
|
-
import CGrid from '~/grid
|
|
4
|
+
import CGrid from '~/grid'
|
|
5
5
|
import vexutils from '@/utils/vexutils.js'
|
|
6
6
|
|
|
7
7
|
export default defineComponent({
|
|
@@ -77,7 +77,7 @@ export default defineComponent({
|
|
|
77
77
|
showHeaderOverflow: true,
|
|
78
78
|
highlightHoverRow: true,
|
|
79
79
|
highlightCurrentRow: true,
|
|
80
|
-
maxHeight:
|
|
80
|
+
maxHeight: (props.col.tableHeight || 200),
|
|
81
81
|
align: 'center',
|
|
82
82
|
columns: state.columns,
|
|
83
83
|
data: state.data
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg :class="svgClass" aria-hidden="true" v-bind="$attrs">
|
|
3
|
+
<title v-if="title">{{ title }}</title>
|
|
4
|
+
<use :xlink:href="iconName" />
|
|
5
|
+
</svg>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
export default {
|
|
10
|
+
name: "SvgIcon"
|
|
11
|
+
}
|
|
12
|
+
</script>
|
|
13
|
+
<script lang="ts" setup>
|
|
14
|
+
import { ref, computed } from 'vue'
|
|
15
|
+
// svg图标组件 使用方式
|
|
16
|
+
// 将svg图片放入 /assets/icons/svg/图片名称.svg
|
|
17
|
+
// vue页面中 <svg-icon icon-class="图片名称"></svg-icon>
|
|
18
|
+
|
|
19
|
+
const props = withDefaults(defineProps<{
|
|
20
|
+
iconClass: string
|
|
21
|
+
title: string
|
|
22
|
+
className?: string
|
|
23
|
+
}>(), {
|
|
24
|
+
iconClass: '',
|
|
25
|
+
title: '',
|
|
26
|
+
default: ''
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
const iconName = computed(() => `#icon-${props.iconClass}`)
|
|
30
|
+
|
|
31
|
+
const svgClass = computed(() => {
|
|
32
|
+
if (props.className) {
|
|
33
|
+
return "svg-icon " + props.className;
|
|
34
|
+
} else {
|
|
35
|
+
return "svg-icon";
|
|
36
|
+
}
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<style scoped>
|
|
42
|
+
.svg-icon {
|
|
43
|
+
width: 1em;
|
|
44
|
+
height: 1em;
|
|
45
|
+
vertical-align: -0.15em;
|
|
46
|
+
fill: currentColor;
|
|
47
|
+
overflow: hidden;
|
|
48
|
+
}
|
|
49
|
+
</style>
|
|
@@ -2,7 +2,7 @@ import { computed, ref, reactive, watch, onMounted } from 'vue'
|
|
|
2
2
|
|
|
3
3
|
export const useEdit = (props: any, state: any, emit: any, xGrid: any) => {
|
|
4
4
|
const initEditTable = async () => {
|
|
5
|
-
const { isEdit, fieldList } = props.columnConfig
|
|
5
|
+
const { isEdit, fieldList = [] } = props.columnConfig
|
|
6
6
|
if (!isEdit) return
|
|
7
7
|
const hasSelectTable = fieldList.find((v: any) => v.formType === 'selectTable')
|
|
8
8
|
if (!hasSelectTable) return
|
|
@@ -47,6 +47,7 @@ export const useEdit = (props: any, state: any, emit: any, xGrid: any) => {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
const onClickSelectTable = async (row: any) => {
|
|
50
|
+
emit('clickSelectTable', { row })
|
|
50
51
|
const record: any = {
|
|
51
52
|
initRow: false,
|
|
52
53
|
row: JSON.parse(JSON.stringify(row))
|
|
@@ -60,8 +61,15 @@ export const useEdit = (props: any, state: any, emit: any, xGrid: any) => {
|
|
|
60
61
|
}
|
|
61
62
|
})
|
|
62
63
|
const getInsertRecords = xGrid.value.getInsertRecords()
|
|
63
|
-
await xGrid.value.insertAt(record, getInsertRecords.at(-1))
|
|
64
|
+
const { row: newRow } = await xGrid.value.insertAt(record, getInsertRecords.at(-1))
|
|
64
65
|
xGrid.value.clearActived()
|
|
66
|
+
// xGrid.value.setActiveRow(newRow)
|
|
67
|
+
// props.columnConfig.fieldList.forEach((col: any) => {
|
|
68
|
+
// console.log('--------------2', col.columnName, col.columnName !== 'operatorColumn' && col.isShow && col.isEdit && col.formType !== 'selectTable')
|
|
69
|
+
// if (col.columnName !== 'operatorColumn' && col.isShow && col.isEdit && col.formType !== 'selectTable') {
|
|
70
|
+
// xGrid.value.setActiveRow(newRow)
|
|
71
|
+
// }
|
|
72
|
+
// })
|
|
65
73
|
}
|
|
66
74
|
|
|
67
75
|
return {
|