sh-view 1.7.1 → 1.7.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/package.json +3 -3
- package/packages/assets/css/theme.scss +13 -9
- package/packages/components/global-components/sh-code-editor/index.vue +0 -1
- package/packages/components/global-components/sh-vxe-table/index.vue +1 -0
- package/packages/components/global-components/sh-vxe-table/js/methods.js +19 -22
- package/packages/components/global-components/sh-vxe-table/js/props.js +4 -2
- package/packages/components/global-components/sh-vxe-tree/components/table-tree.vue +11 -29
- package/packages/components/global-components/sh-vxe-tree/index.vue +1 -1
- package/packages/components/global-components/sh-vxe-tree/js/treeMethods.js +28 -30
- package/packages/components/global-components/sh-vxe-tree/mixin/defaultData.js +7 -1
- package/packages/components/global-components/sh-vxe-tree/vxe-direct-tree.vue +3 -2
- package/packages/components/global-components/sh-vxe-tree/vxe-select-tree.vue +10 -10
- package/packages/vxeTable/css/index.scss +1 -5
- package/packages/vxeTable/css/variable.scss +30 -18
- package/packages/vxeTable/index.js +4 -2
- package/packages/vxeTable/render/mixin/cell-mixin.js +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sh-view",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.5",
|
|
4
4
|
"description": "基于vxe-table、view-ui-plus二次封装",
|
|
5
5
|
"main": "packages/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"file-saver": "^2.0.5",
|
|
29
29
|
"jspdf": "^2.5.1",
|
|
30
30
|
"jszip": "^3.10.1",
|
|
31
|
-
"sh-tools": "^1.2.
|
|
31
|
+
"sh-tools": "^1.2.6",
|
|
32
32
|
"tinymce": "^5.10.5",
|
|
33
33
|
"view-ui-plus": "^1.3.14",
|
|
34
34
|
"vue": "^3.3.4",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"vue-ripple-directive": "^2.0.1",
|
|
38
38
|
"vue-router": "^4.2.2",
|
|
39
39
|
"vuex": "^4.1.0",
|
|
40
|
-
"vxe-table": "^4.5.0-beta.
|
|
40
|
+
"vxe-table": "^4.5.0-beta.20",
|
|
41
41
|
"vxe-table-plugin-export-pdf": "^3.0.4",
|
|
42
42
|
"vxe-table-plugin-export-xlsx": "^3.0.5",
|
|
43
43
|
"xe-clipboard": "^1.10.2",
|
|
@@ -24,7 +24,9 @@
|
|
|
24
24
|
--hover-color : #f5f7fa;
|
|
25
25
|
--title-color : #17233d;
|
|
26
26
|
--text-color : #515a6e;
|
|
27
|
-
--border-color : #
|
|
27
|
+
--border-color : #e0e0e0;
|
|
28
|
+
--disabled-color : #f1f1f1;
|
|
29
|
+
--disabled-background : #f3f3f3;
|
|
28
30
|
--font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
|
|
29
31
|
--border-radius: 0px;
|
|
30
32
|
}
|
|
@@ -41,12 +43,14 @@
|
|
|
41
43
|
.sh-theme-pink{ --theme-color: #ff5d7a; --theme-weak-color: #ffccd6; } // 少女
|
|
42
44
|
|
|
43
45
|
.sh-dark-mode{
|
|
44
|
-
--body-background:
|
|
45
|
-
--main-background:
|
|
46
|
-
--theme-weak-color:
|
|
47
|
-
--header-color:
|
|
48
|
-
--stripe-color:
|
|
49
|
-
--hover-color:
|
|
50
|
-
--border-color:
|
|
51
|
-
--
|
|
46
|
+
--body-background: #141414;
|
|
47
|
+
--main-background: #0a0a0a;
|
|
48
|
+
--theme-weak-color: #222222;
|
|
49
|
+
--header-color: #222222;
|
|
50
|
+
--stripe-color: #040404;
|
|
51
|
+
--hover-color: #555555;
|
|
52
|
+
--border-color: #454545;
|
|
53
|
+
--disabled-color: #212121;
|
|
54
|
+
--disabled-background: #232323;
|
|
55
|
+
--text-color: #999999;
|
|
52
56
|
}
|
|
@@ -18,11 +18,12 @@ const vxeEvents = {
|
|
|
18
18
|
this.isAllChecked = this.tableRef().isAllCheckboxChecked()
|
|
19
19
|
this.isIndeterminate = this.tableRef().isAllCheckboxIndeterminate()
|
|
20
20
|
if (this.tableTreeConfig && this.tableTreeConfig?.transform) {
|
|
21
|
-
let keyField = this.rowConfig.keyField || '_XID'
|
|
21
|
+
let keyField = this.tableTreeConfig?.rowField || this.rowConfig.keyField || '_XID'
|
|
22
|
+
let keyRowChild = '_X_ROW_CHILD'
|
|
22
23
|
let childRowsKeys = []
|
|
23
24
|
this.$vUtils.eachTree(records, row => {
|
|
24
|
-
if (row
|
|
25
|
-
row.
|
|
25
|
+
if (row[keyRowChild] && row[keyRowChild].length > 0) {
|
|
26
|
+
row[keyRowChild].forEach(child => {
|
|
26
27
|
childRowsKeys.push(child[keyField])
|
|
27
28
|
})
|
|
28
29
|
}
|
|
@@ -66,7 +67,7 @@ const vxeEvents = {
|
|
|
66
67
|
let { row, column } = params
|
|
67
68
|
let { property, model, rname, rprops } = column
|
|
68
69
|
if ((model.update || model.change) && rname) {
|
|
69
|
-
let { rvalue, rtext } = that.$vUtils.formatRender(model.value, property, row, rname, rprops, that)
|
|
70
|
+
let { rvalue, rtext } = that.$vUtils.formatRender(model.value, property, row, rname, rprops, that, true)
|
|
70
71
|
that.$vUtils.set(row, column.property, rvalue)
|
|
71
72
|
model.change = false
|
|
72
73
|
}
|
|
@@ -163,23 +164,21 @@ const vxeMethods = {
|
|
|
163
164
|
data = this.getSelectionData()
|
|
164
165
|
} else {
|
|
165
166
|
data = this.$vUtils.clone(this.tableRef().getTableData().fullData, true)
|
|
166
|
-
columns.
|
|
167
|
+
let rnameColumns = columns.map(col => col.rname)
|
|
168
|
+
rnameColumns.forEach(col => {
|
|
167
169
|
let { property, rname, rprops } = col
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}
|
|
174
|
-
}
|
|
170
|
+
data.forEach(row => {
|
|
171
|
+
let cellValue = this.$vUtils.get(row, property)
|
|
172
|
+
if (!this.$vUtils.isNone(cellValue)) {
|
|
173
|
+
let formatValue = this.$vUtils.formatRender(cellValue, property, row, rname, rprops, this)
|
|
174
|
+
this.$vUtils.set(row, property, formatValue)
|
|
175
|
+
}
|
|
176
|
+
})
|
|
175
177
|
})
|
|
176
178
|
}
|
|
177
179
|
options.data = data
|
|
178
180
|
}
|
|
179
|
-
|
|
180
|
-
return content
|
|
181
|
-
}
|
|
182
|
-
return obj
|
|
181
|
+
return type === 'print' ? content : obj
|
|
183
182
|
},
|
|
184
183
|
// 表格导出-自定义工作簿
|
|
185
184
|
exportSheetMethod({ options, workbook, worksheet }) {},
|
|
@@ -565,7 +564,7 @@ const shMethods = {
|
|
|
565
564
|
const that = this
|
|
566
565
|
let tableRowDefaultData = Object.assign({}, that.tableRowDefaultData)
|
|
567
566
|
let addRows = rows ? that.$vUtils.clone(rows, true) : tableRowDefaultData
|
|
568
|
-
if (
|
|
567
|
+
if (typeof that.onToolbarBtnAddBefore === 'function') {
|
|
569
568
|
addRows = await that.onToolbarBtnAddBefore(addRows)
|
|
570
569
|
}
|
|
571
570
|
// 删除主键,以防排序冲突
|
|
@@ -587,13 +586,11 @@ const shMethods = {
|
|
|
587
586
|
let deleteRows = rows
|
|
588
587
|
if (isTool) {
|
|
589
588
|
let selectedRows = that.getSelectionData()
|
|
590
|
-
if (selectedRows.length < 1)
|
|
591
|
-
that.msgwarning('请选择要删除的行!')
|
|
592
|
-
return
|
|
593
|
-
}
|
|
589
|
+
if (selectedRows.length < 1) return that.msgwarning('请选择要删除的行!')
|
|
594
590
|
deleteRows = selectedRows
|
|
595
591
|
await that.msgconfirm({ content: `确定删除吗?` })
|
|
596
|
-
}
|
|
592
|
+
}
|
|
593
|
+
if (typeof that.onToolbarBtnDeleteBefore === 'function') {
|
|
597
594
|
let result = await that.onToolbarBtnDeleteBefore(deleteRows)
|
|
598
595
|
if (!result) return
|
|
599
596
|
}
|
|
@@ -21,6 +21,9 @@ export default {
|
|
|
21
21
|
height: {
|
|
22
22
|
type: [Number, String]
|
|
23
23
|
},
|
|
24
|
+
minHeight: {
|
|
25
|
+
type: [Number, String]
|
|
26
|
+
},
|
|
24
27
|
maxHeight: {
|
|
25
28
|
type: [Number, String]
|
|
26
29
|
},
|
|
@@ -33,8 +36,7 @@ export default {
|
|
|
33
36
|
default: true
|
|
34
37
|
},
|
|
35
38
|
stripe: {
|
|
36
|
-
type: Boolean
|
|
37
|
-
default: true
|
|
39
|
+
type: Boolean
|
|
38
40
|
},
|
|
39
41
|
border: {
|
|
40
42
|
type: [Boolean, String],
|
|
@@ -37,9 +37,6 @@ export default {
|
|
|
37
37
|
return {}
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
|
-
isSelect: {
|
|
41
|
-
type: Boolean
|
|
42
|
-
},
|
|
43
40
|
loading: {
|
|
44
41
|
type: Boolean
|
|
45
42
|
},
|
|
@@ -86,7 +83,7 @@ export default {
|
|
|
86
83
|
return this.parentProps.multiple || false
|
|
87
84
|
},
|
|
88
85
|
tableConfigIn() {
|
|
89
|
-
return Object.assign({
|
|
86
|
+
return Object.assign({ showHeader: !!(this.globalConfig.hasAll && this.multiple) }, this.tableConfigDefault, this.globalConfig.tableConfig)
|
|
90
87
|
},
|
|
91
88
|
pagerConfigIn() {
|
|
92
89
|
return Object.assign({ enabled: false }, this.globalConfig.pagerConfig)
|
|
@@ -104,19 +101,16 @@ export default {
|
|
|
104
101
|
return Object.assign({ rowField: this.parentProps.nodeKey, transform: this.globalConfig.transform }, this.globalConfig.treeConfig)
|
|
105
102
|
},
|
|
106
103
|
tableColumns() {
|
|
107
|
-
let { globalConfig,
|
|
108
|
-
let
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
]
|
|
119
|
-
return defaultColumns.concat(globalConfig.columns || [])
|
|
104
|
+
let { globalConfig, multiple, checkboxConfigIn, radioConfigIn, parentProps } = this
|
|
105
|
+
let defaultColumn = {
|
|
106
|
+
field: multiple ? checkboxConfigIn.labelField : radioConfigIn.labelField,
|
|
107
|
+
title: parentProps.labelTitle || (multiple ? '全部' : ''),
|
|
108
|
+
type: parentProps.disabled ? 'html' : multiple ? 'checkbox' : 'radio',
|
|
109
|
+
treeNode: true,
|
|
110
|
+
width: globalConfig.columns ? globalConfig?.defaultWidth || 150 : '100%',
|
|
111
|
+
slots: { default: 'treeNodeCell' }
|
|
112
|
+
}
|
|
113
|
+
return [defaultColumn].concat(globalConfig.columns || [])
|
|
120
114
|
}
|
|
121
115
|
},
|
|
122
116
|
watch: {
|
|
@@ -151,18 +145,6 @@ export default {
|
|
|
151
145
|
if (that.selectedKeys && that.selectedKeys.length > 0) {
|
|
152
146
|
that.tableRef().scrollToRow({ [nodeKey]: that.selectedKeys[0] })
|
|
153
147
|
}
|
|
154
|
-
// // 初始化单选还是多选
|
|
155
|
-
// if (that.multiple) {
|
|
156
|
-
// let records = that.tableRef().getCheckboxRecords()
|
|
157
|
-
// if (records && records.length > 0) {
|
|
158
|
-
// that.onSelectionChange({ records: records })
|
|
159
|
-
// }
|
|
160
|
-
// } else {
|
|
161
|
-
// let records = that.tableRef().getRadioRecord()
|
|
162
|
-
// if (records) {
|
|
163
|
-
// that.onSelectionChange({ records: [records] })
|
|
164
|
-
// }
|
|
165
|
-
// }
|
|
166
148
|
})
|
|
167
149
|
},
|
|
168
150
|
// 单选框变化
|
|
@@ -40,7 +40,7 @@ export default {
|
|
|
40
40
|
return this.height === '100%' || this.height === 'auto' ? '100%' : 'auto'
|
|
41
41
|
},
|
|
42
42
|
treeGlobalConfig() {
|
|
43
|
-
return Object.assign({ treeFilter: true }, this.globalConfig)
|
|
43
|
+
return Object.assign({ treeFilter: true, initServer: !this.isSelect }, this.globalConfig)
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
watch: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const shMethods = {
|
|
2
2
|
// 加载初始化
|
|
3
3
|
initMounted() {
|
|
4
|
-
if (
|
|
4
|
+
if (this.globalConfig?.initServer) {
|
|
5
5
|
// 初始化获取服务配置数据
|
|
6
6
|
this.getServerConfigDataSourse()
|
|
7
7
|
}
|
|
@@ -68,52 +68,50 @@ const shMethods = {
|
|
|
68
68
|
},
|
|
69
69
|
// 获取请求配置数据
|
|
70
70
|
async getServerConfigDataSourse() {
|
|
71
|
-
const
|
|
72
|
-
if (!
|
|
73
|
-
|
|
71
|
+
const { serverConfig, serverParams, parseParams, queryCacheParams, serverCache, valueData, globalConfig, multiple, nodeKey, labelField, $vUtils, $http } = this
|
|
72
|
+
if (!serverConfig.url) {
|
|
73
|
+
this.treeServerComplate = true
|
|
74
74
|
return
|
|
75
75
|
}
|
|
76
|
-
let
|
|
77
|
-
if (typeof
|
|
78
|
-
|
|
76
|
+
let params = $vUtils.clone(serverParams, true)
|
|
77
|
+
if (parseParams && typeof parseParams === 'function') {
|
|
78
|
+
params = parseParams(params)
|
|
79
79
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
serverParams[key] = that.$vUtils.format(serverParams[key], that.valueData)
|
|
84
|
-
serveFormatConditions += serverParams[key]
|
|
80
|
+
Object.keys(params).forEach(key => {
|
|
81
|
+
if ($vUtils.getFormatKeys(params[key]).length > 0) {
|
|
82
|
+
params[key] = $vUtils.format(params[key], valueData)
|
|
85
83
|
}
|
|
86
84
|
})
|
|
87
|
-
if (
|
|
88
|
-
|
|
85
|
+
if (!$vUtils.isEqual(queryCacheParams, params)) {
|
|
86
|
+
this.treeServerComplate = false
|
|
89
87
|
}
|
|
90
|
-
if (
|
|
88
|
+
if (serverCache && this.treeServerComplate) {
|
|
91
89
|
return
|
|
92
90
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
91
|
+
this.queryErrorText = null
|
|
92
|
+
this.queryCacheParams = params
|
|
93
|
+
this.treeLoading = true
|
|
96
94
|
let reqOptions = {
|
|
97
|
-
baseURL:
|
|
95
|
+
baseURL: serverConfig.baseURL
|
|
98
96
|
}
|
|
99
97
|
try {
|
|
100
|
-
let method =
|
|
101
|
-
let treeRes = await
|
|
102
|
-
if (treeRes &&
|
|
103
|
-
let treeAllNode =
|
|
98
|
+
let method = serverConfig?.type ? serverConfig.type.toLowerCase() : 'post'
|
|
99
|
+
let treeRes = await $http[method](serverConfig.url, params, reqOptions)
|
|
100
|
+
if (treeRes && [10000, 100000].includes(+treeRes.code)) {
|
|
101
|
+
let treeAllNode = globalConfig?.hasAll && !multiple ? [{ [nodeKey]: 0, [labelField]: '全部', isleaf: 1, code: '' }] : []
|
|
104
102
|
let treeData = treeAllNode.concat(treeRes.data)
|
|
105
|
-
if (
|
|
106
|
-
treeData =
|
|
103
|
+
if (globalConfig.transform) {
|
|
104
|
+
treeData = $vUtils.toTreeArray(treeData, { clear: true })
|
|
107
105
|
}
|
|
108
|
-
|
|
106
|
+
this.treeData = treeData
|
|
109
107
|
} else {
|
|
110
108
|
throw new Error(`树节点信息获取失败:${treeRes?.message}`)
|
|
111
109
|
}
|
|
112
110
|
} catch (e) {
|
|
113
|
-
|
|
111
|
+
this.queryErrorText = e.message || e
|
|
114
112
|
}
|
|
115
|
-
|
|
116
|
-
|
|
113
|
+
this.treeLoading = false
|
|
114
|
+
this.treeServerComplate = true
|
|
117
115
|
}
|
|
118
116
|
}
|
|
119
117
|
|
|
@@ -153,7 +151,7 @@ const toolMethods = {
|
|
|
153
151
|
// 根据选中值返回选中节点信息
|
|
154
152
|
getSelectRowsByValue(value) {
|
|
155
153
|
const that = this
|
|
156
|
-
let childKey = (that.globalConfig.treeConfig && that.globalConfig.treeConfig.
|
|
154
|
+
let childKey = (that.globalConfig.treeConfig && that.globalConfig.treeConfig.childrenField) || 'children'
|
|
157
155
|
let records = this.getDataJsonToLine(that.nodeKey, childKey, that.treeData)
|
|
158
156
|
let selectRows = []
|
|
159
157
|
records.forEach(node => {
|
|
@@ -23,7 +23,7 @@ export default {
|
|
|
23
23
|
},
|
|
24
24
|
// 树组件表格全局配置
|
|
25
25
|
tableConfigDefault: {
|
|
26
|
-
autoResize:
|
|
26
|
+
autoResize: true,
|
|
27
27
|
syncResize: true,
|
|
28
28
|
stripe: false,
|
|
29
29
|
size: 'small', // medium / small / mini
|
|
@@ -31,6 +31,12 @@ export default {
|
|
|
31
31
|
showFooter: false,
|
|
32
32
|
showOverflow: true,
|
|
33
33
|
pagerConfig: false,
|
|
34
|
+
resizeConfig: {
|
|
35
|
+
refreshDelay: 50
|
|
36
|
+
},
|
|
37
|
+
columnConfig: {
|
|
38
|
+
width: 120
|
|
39
|
+
},
|
|
34
40
|
scrollX: {
|
|
35
41
|
enabled: true,
|
|
36
42
|
gt: 20
|
|
@@ -134,13 +134,14 @@ export default {
|
|
|
134
134
|
data() {
|
|
135
135
|
return {
|
|
136
136
|
...defaultData,
|
|
137
|
+
// 树公共属性
|
|
137
138
|
treeServerComplate: false,
|
|
138
139
|
treeLoading: false,
|
|
139
140
|
treeData: this.options,
|
|
140
|
-
filterTextIn:
|
|
141
|
+
filterTextIn: this.filterText,
|
|
141
142
|
treeSelectValue: '',
|
|
142
143
|
treeSelectedData: [],
|
|
143
|
-
|
|
144
|
+
queryCacheParams: null,
|
|
144
145
|
queryErrorText: null
|
|
145
146
|
}
|
|
146
147
|
},
|
|
@@ -20,13 +20,12 @@
|
|
|
20
20
|
<div v-if="treeFilterShow && treeServerComplate" class="sh-vxe-tree-select-dropdown-input">
|
|
21
21
|
<vxe-input ref="vxeTreeDropdownFilter" v-model="filterTextIn" class="select-filter-input" v-bind="filterInputConfigIn" :disabled="disabled"></vxe-input>
|
|
22
22
|
</div>
|
|
23
|
-
<div class="sh-vxe-tree-select-dropdown-content"
|
|
23
|
+
<div class="sh-vxe-tree-select-dropdown-content">
|
|
24
24
|
<sh-loading v-if="treeLoading" fix loading></sh-loading>
|
|
25
25
|
<sh-result v-if="queryErrorText" class="sh-vxe-tree-result" type="error" :text="queryErrorText"></sh-result>
|
|
26
26
|
<table-tree
|
|
27
27
|
v-else-if="treeServerComplate"
|
|
28
28
|
ref="vxeTreeTable"
|
|
29
|
-
is-select
|
|
30
29
|
:parent-props="$props"
|
|
31
30
|
:loading="loading"
|
|
32
31
|
:size="size"
|
|
@@ -174,12 +173,10 @@ export default {
|
|
|
174
173
|
filterTextIn: this.filterText,
|
|
175
174
|
treeSelectValue: '',
|
|
176
175
|
treeSelectedData: [],
|
|
177
|
-
|
|
176
|
+
queryCacheParams: null,
|
|
178
177
|
queryErrorText: null,
|
|
179
178
|
// 下拉专属属性
|
|
180
|
-
pulldownDrop: false
|
|
181
|
-
initServer: true,
|
|
182
|
-
selfClientRect: {}
|
|
179
|
+
pulldownDrop: false
|
|
183
180
|
}
|
|
184
181
|
},
|
|
185
182
|
computed: {
|
|
@@ -197,9 +194,6 @@ export default {
|
|
|
197
194
|
},
|
|
198
195
|
filterInputConfigIn() {
|
|
199
196
|
return Object.assign({}, this.filterInputConfigDefault, this.globalConfig.filterInputConfig)
|
|
200
|
-
},
|
|
201
|
-
selectDropContentStyle() {
|
|
202
|
-
return { width: `${this.selfClientRect.width}px` }
|
|
203
197
|
}
|
|
204
198
|
},
|
|
205
199
|
watch: {
|
|
@@ -210,6 +204,13 @@ export default {
|
|
|
210
204
|
deep: true,
|
|
211
205
|
immediate: true
|
|
212
206
|
},
|
|
207
|
+
filterText: {
|
|
208
|
+
handler(newvalue, oldValue) {
|
|
209
|
+
this.filterTextIn = newvalue
|
|
210
|
+
},
|
|
211
|
+
deep: true,
|
|
212
|
+
immediate: true
|
|
213
|
+
},
|
|
213
214
|
options: {
|
|
214
215
|
handler(newvalue, oldValue) {
|
|
215
216
|
this.treeData = newvalue
|
|
@@ -232,7 +233,6 @@ export default {
|
|
|
232
233
|
let windowHeight = window.document.body.clientHeight
|
|
233
234
|
let selfClientRect = this.$refs.vxeTreeSelectInputBox.getBoundingClientRect()
|
|
234
235
|
if (selfClientRect) {
|
|
235
|
-
this.selfClientRect = selfClientRect
|
|
236
236
|
let { bottom } = selfClientRect
|
|
237
237
|
let selfOffsetBottom = windowHeight - bottom
|
|
238
238
|
if (selfOffsetBottom < 265) this.selectConfigDefault.placement = 'top'
|
|
@@ -3,7 +3,7 @@ $theme-color: var(--theme-color);
|
|
|
3
3
|
$theme-weak-color: var(--theme-weak-color);
|
|
4
4
|
|
|
5
5
|
@import "variable.scss";
|
|
6
|
-
@import 'vxe-table/styles/
|
|
6
|
+
@import 'vxe-table/styles/all.scss';
|
|
7
7
|
|
|
8
8
|
input:focus, textarea:focus,
|
|
9
9
|
.vxe-form--item .vxe-input input.vxe-input--inner:focus,
|
|
@@ -232,10 +232,6 @@ button:focus, .vxe-button.type--button:not(.is--disabled):focus{
|
|
|
232
232
|
.vxe-cell--sort{
|
|
233
233
|
font-size: .9em;
|
|
234
234
|
}
|
|
235
|
-
.vxe-body--row.row--new > .vxe-body--column:before{
|
|
236
|
-
top: calc(var(--vxe-table-cell-dirty-width) * -1);
|
|
237
|
-
left: calc(var(--vxe-table-cell-dirty-width) * -1)
|
|
238
|
-
}
|
|
239
235
|
}
|
|
240
236
|
}
|
|
241
237
|
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
$theme-color: var(--theme-color);
|
|
2
|
-
$theme-weak-color: var(--theme-weak-color);
|
|
3
|
-
|
|
4
1
|
/*font*/
|
|
5
2
|
$vxe-font-family: -apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol !default;
|
|
6
|
-
$vxe-font-color: #606266 !default;
|
|
7
3
|
$vxe-font-size: 1rem !default;
|
|
8
4
|
$vxe-font-size-medium: 1rem !default;
|
|
9
5
|
$vxe-font-size-small: 0.9285rem !default;
|
|
@@ -17,25 +13,44 @@ $vxe-icon-font-family: Verdana,Arial,Tahoma !default;
|
|
|
17
13
|
$vxe-icon-background-color: var(--body-background) !default;
|
|
18
14
|
|
|
19
15
|
/*color*/
|
|
16
|
+
$vxe-font-color: #606266 !default;
|
|
20
17
|
$vxe-primary-color: #409eff !default;
|
|
21
18
|
$vxe-success-color: #67c23a !default;
|
|
22
19
|
$vxe-info-color: #909399 !default;
|
|
23
20
|
$vxe-warning-color: #e6a23c !default;
|
|
24
21
|
$vxe-danger-color: #f56c6c !default;
|
|
25
|
-
|
|
26
|
-
$vxe-
|
|
22
|
+
|
|
23
|
+
$vxe-font-lighten-color: lighten($vxe-font-color, 10%) !default;
|
|
24
|
+
$vxe-primary-lighten-color: lighten($vxe-primary-color, 10%) !default;
|
|
25
|
+
$vxe-success-lighten-color: lighten($vxe-success-color, 10%) !default;
|
|
26
|
+
$vxe-info-lighten-color: lighten($vxe-info-color, 10%) !default;
|
|
27
|
+
$vxe-warning-lighten-color: lighten($vxe-warning-color, 10%) !default;
|
|
28
|
+
$vxe-danger-lighten-color: lighten($vxe-danger-color, 10%) !default;
|
|
29
|
+
|
|
30
|
+
$vxe-font-darken-color: darken($vxe-font-color, 10%) !default;
|
|
31
|
+
$vxe-primary-darken-color: darken($vxe-primary-color, 10%) !default;
|
|
32
|
+
$vxe-success-darken-color: darken($vxe-success-color, 10%) !default;
|
|
33
|
+
$vxe-info-darken-color: darken($vxe-info-color, 10%) !default;
|
|
34
|
+
$vxe-warning-darken-color: darken($vxe-warning-color, 10%) !default;
|
|
35
|
+
$vxe-danger-darken-color: darken($vxe-danger-color, 10%) !default;
|
|
36
|
+
|
|
37
|
+
$vxe-font-disabled-color: #BFBFBF !default;
|
|
38
|
+
$vxe-primary-disabled-color: lighten($vxe-primary-color, 20%) !default;
|
|
39
|
+
$vxe-success-disabled-color: lighten($vxe-success-color, 20%) !default;
|
|
40
|
+
$vxe-info-disabled-color: lighten($vxe-info-color, 20%) !default;
|
|
41
|
+
$vxe-warning-disabled-color: lighten($vxe-warning-color, 20%) !default;
|
|
42
|
+
$vxe-danger-disabled-color: lighten($vxe-danger-color, 20%) !default;
|
|
27
43
|
|
|
28
44
|
/*input/radio/checkbox*/
|
|
29
45
|
$vxe-input-border-color: var(--border-color) !default;
|
|
30
|
-
$vxe-input-disabled-color: var(--
|
|
31
|
-
$vxe-input-disabled-background-color:
|
|
46
|
+
$vxe-input-disabled-color: var(--disabled-color) !default;
|
|
47
|
+
$vxe-input-disabled-background-color: var(--disabled-background) !default;
|
|
32
48
|
$vxe-input-placeholder-color: #C0C4CC !default;
|
|
33
49
|
|
|
34
50
|
/*popup*/
|
|
35
51
|
$vxe-table-popup-border-color: var(--border-color) !default;
|
|
36
52
|
|
|
37
53
|
/*table*/
|
|
38
|
-
$vxe-table-font-color: $vxe-font-color !default;
|
|
39
54
|
$vxe-table-header-font-color: $vxe-font-color !default;
|
|
40
55
|
$vxe-table-footer-font-color: $vxe-font-color !default;
|
|
41
56
|
$vxe-table-border-radius: $vxe-border-radius !default;
|
|
@@ -100,8 +115,8 @@ $vxe-table-checkbox-range-border-width: 1px !default;
|
|
|
100
115
|
$vxe-table-checkbox-range-border-color: #006af1 !default;
|
|
101
116
|
$vxe-table-checkbox-range-background-color: rgba(50,128,252,0.2) !default;
|
|
102
117
|
|
|
103
|
-
$vxe-table-fixed-left-scrolling-box-shadow:
|
|
104
|
-
$vxe-table-fixed-right-scrolling-box-shadow: -
|
|
118
|
+
$vxe-table-fixed-left-scrolling-box-shadow: 8px 0px 10px -5px rgba(0, 0, 0, 0.12) !default;
|
|
119
|
+
$vxe-table-fixed-right-scrolling-box-shadow: -8px 0px 10px -5px rgba(0, 0, 0, 0.12) !default;
|
|
105
120
|
|
|
106
121
|
/*filter*/
|
|
107
122
|
$vxe-table-filter-panel-background-color: var(--body-background) !default;
|
|
@@ -111,14 +126,13 @@ $vxe-table-menu-item-width: 178px !default;
|
|
|
111
126
|
$vxe-table-menu-background-color: var(--body-background) !default;
|
|
112
127
|
|
|
113
128
|
/*loading*/
|
|
114
|
-
$vxe-loading-color:
|
|
129
|
+
$vxe-loading-color: var(--theme-color) !default;
|
|
115
130
|
$vxe-loading-background-color: rgba(255, 255, 255, 0.5) !default;
|
|
116
131
|
$vxe-loading-z-index: 999 !default;
|
|
117
132
|
|
|
118
133
|
/*validate*/
|
|
119
134
|
$vxe-table-validate-error-color: #f56c6c !default;
|
|
120
|
-
$vxe-table-validate-
|
|
121
|
-
$vxe-table-validate-tooltip-error-background-color: $vxe-table-validate-error-color !default;
|
|
135
|
+
$vxe-table-validate-error-background-color: $vxe-table-body-background-color !default;
|
|
122
136
|
|
|
123
137
|
/*grid*/
|
|
124
138
|
$vxe-grid-maximize-background-color: var(--body-background) !default;
|
|
@@ -132,8 +146,6 @@ $vxe-toolbar-panel-background-color: var(--body-background) !default;
|
|
|
132
146
|
$vxe-tooltip-dark-color: #fff !default;
|
|
133
147
|
$vxe-tooltip-dark-background-color: #303133 !default;
|
|
134
148
|
$vxe-tooltip-light-background-color: #fff !default;
|
|
135
|
-
$vxe-tooltip-validate-error-color: #fff !default;
|
|
136
|
-
$vxe-tooltip-validate-error-background-color: #f56c6c !default;
|
|
137
149
|
|
|
138
150
|
/*pager*/
|
|
139
151
|
$vxe-pager-background-color: var(--body-background) !default;
|
|
@@ -173,8 +185,8 @@ $vxe-radio-button-default-background-color: var(--body-background) !default;
|
|
|
173
185
|
|
|
174
186
|
/*button*/
|
|
175
187
|
$vxe-button-max-width: 500px !default;
|
|
176
|
-
$vxe-button-default-background-color:
|
|
177
|
-
$vxe-button-dropdown-panel-background-color:
|
|
188
|
+
$vxe-button-default-background-color: var(--body-background) !default;
|
|
189
|
+
$vxe-button-dropdown-panel-background-color: $vxe-button-default-background-color !default;
|
|
178
190
|
$vxe-button-height-default: 34px !default;
|
|
179
191
|
$vxe-button-height-medium: 32px !default;
|
|
180
192
|
$vxe-button-height-small: 30px !default;
|
|
@@ -23,6 +23,7 @@ let vxeOptions = {
|
|
|
23
23
|
border: 'full',
|
|
24
24
|
round: false,
|
|
25
25
|
keepSource: false,
|
|
26
|
+
minHeight: 80,
|
|
26
27
|
rowConfig: {
|
|
27
28
|
useKey: false,
|
|
28
29
|
keyField: '_XID',
|
|
@@ -51,14 +52,15 @@ let vxeOptions = {
|
|
|
51
52
|
},
|
|
52
53
|
treeConfig: {
|
|
53
54
|
indent: 20,
|
|
54
|
-
|
|
55
|
+
showLine: false,
|
|
55
56
|
expandAll: false,
|
|
56
57
|
expandRowKeys: [],
|
|
57
58
|
accordion: true,
|
|
58
59
|
showIcon: true,
|
|
59
|
-
|
|
60
|
+
childrenField: 'children',
|
|
60
61
|
// 若为平行数据结构不是嵌套结构则使用下面配置 transform 需要为true
|
|
61
62
|
transform: false,
|
|
63
|
+
rowField: 'id',
|
|
62
64
|
parentField: 'parentId'
|
|
63
65
|
},
|
|
64
66
|
mouseConfig: {
|
|
@@ -130,7 +130,7 @@ export default {
|
|
|
130
130
|
// form回调赋值
|
|
131
131
|
setFormValue(value) {
|
|
132
132
|
if (['$vMoney'].includes(this.rname) && value !== '') value = this.$vUtils.multiply(value, this.rprops.moneyUnit || 1)
|
|
133
|
-
let { rvalue } = this.formatValueFun(value)
|
|
133
|
+
let { rvalue } = this.formatValueFun(value, true)
|
|
134
134
|
let { data, $form } = this.rparams
|
|
135
135
|
this.$vUtils.set(data, this.rkey, rvalue)
|
|
136
136
|
$form.context.emit('edit-closed', this.rparams, this)
|
|
@@ -144,8 +144,8 @@ export default {
|
|
|
144
144
|
model.value = value
|
|
145
145
|
},
|
|
146
146
|
// 格式化值formatValue
|
|
147
|
-
formatValueFun(value) {
|
|
148
|
-
let rObj = this.$vUtils.formatRender(value, this.rkey, this.rdata, this.rname, this.rprops, this)
|
|
147
|
+
formatValueFun(value, editable) {
|
|
148
|
+
let rObj = this.$vUtils.formatRender(value, this.rkey, this.rdata, this.rname, this.rprops, this, editable)
|
|
149
149
|
this.renderValue = ['$vMoney'].includes(this.rname) ? rObj.rtext : rObj.rvalue
|
|
150
150
|
return rObj
|
|
151
151
|
},
|