sh-view 2.10.9 → 2.10.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sh-view",
3
- "version": "2.10.9",
3
+ "version": "2.10.11",
4
4
  "description": "基于vxe-table二次封装,更包含Alert,Badge,Card,CodeEditor,Col,Corner,CountTo,Drawer,Empty,Form,Header,Icon,List,Loading,Modal,Noticebar,Poptip,Progress,PullRefresh,Query,Result,Row,Split,Grid,Table,Tabs,Tag,Toolbar,Tree,Upload,WaterFall,WaterMark等丰富组件库",
5
5
  "main": "packages/index.js",
6
6
  "typings": "types/index.d.ts",
@@ -38,11 +38,11 @@
38
38
  "lunar-typescript": "^1.8.6",
39
39
  "popper.js": "^1.16.1",
40
40
  "sh-tools": "^2.3.12",
41
- "vue": "^3.5.20",
41
+ "vue": "^3.5.29",
42
42
  "vue-masonry": "^0.16.0",
43
43
  "vue-router": "^4.6.4",
44
- "vxe-pc-ui": "^4.12.31",
45
- "vxe-table": "^4.17.48"
44
+ "vxe-pc-ui": "^4.13.0",
45
+ "vxe-table": "^4.17.49"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@typescript-eslint/eslint-plugin": "^6.21.0",
@@ -6,7 +6,7 @@
6
6
  </template>
7
7
 
8
8
  <script>
9
- import { defineComponent, ref, computed, watch, onMounted, onUnmounted, nextTick, getCurrentInstance } from 'vue'
9
+ import { defineComponent, ref, computed, watch, onMounted, onUnmounted, nextTick, getCurrentInstance, reactive } from 'vue'
10
10
  import { basicSetup } from 'codemirror'
11
11
  import { keymap, placeholder, EditorView } from '@codemirror/view'
12
12
  import { Compartment, EditorState, StateEffect } from '@codemirror/state'
@@ -147,6 +147,10 @@ export default defineComponent({
147
147
  const codeEditor = ref(null)
148
148
  const codeError = ref(null)
149
149
  const codeRef = ref()
150
+ const reactData = reactive({
151
+ isComposed: false,
152
+ isActivated: false
153
+ })
150
154
 
151
155
  const styles = computed(() => {
152
156
  return {
@@ -247,7 +251,8 @@ export default defineComponent({
247
251
  tabSize.of(EditorState.tabSize.of(props.indent)),
248
252
  EditorState.allowMultipleSelections.of(props.multipleSelection),
249
253
  EditorView.editable.of(!disabled),
250
- customKeymap()
254
+ customKeymap(),
255
+ domEventHandlers
251
256
  ]
252
257
  // 括号自动补全
253
258
  if (autoclose) innerExtensions.push(closeBrackets())
@@ -283,10 +288,9 @@ export default defineComponent({
283
288
 
284
289
  const codeRender = async () => {
285
290
  const docValue = getTransformValue(props.modelValue)
286
- let editExtensions = [EditorView.focusChangeEffect.of(focusListener), EditorView.updateListener.of(updateListener)].concat(codeExtensions.value)
287
291
  const codeState = EditorState.create({
288
292
  doc: docValue,
289
- extensions: editExtensions
293
+ extensions: codeExtensions.value
290
294
  })
291
295
  codeEditor.value = new EditorView({
292
296
  parent: codeRef.value,
@@ -296,21 +300,42 @@ export default defineComponent({
296
300
  dispatchEvent('loaded', props.modelValue)
297
301
  }
298
302
 
299
- const focusListener = (state, focusing) => {
300
- const valueStr = state.doc.toString()
301
- if (focusing) {
303
+ const domEventHandlers = EditorView.domEventHandlers({
304
+ focus: (event, view) => {
305
+ reactData.isActivated = true
306
+ const valueStr = view.state.doc.toString()
302
307
  dispatchEvent('focus', valueStr)
303
- } else {
308
+ return false
309
+ },
310
+ blur: (event, view) => {
311
+ reactData.isActivated = false
312
+ const valueStr = view.state.doc.toString()
304
313
  dispatchValue(valueStr)
305
314
  dispatchEvent('blur', valueStr)
315
+ return false
316
+ },
317
+ input: (event, view) => {
318
+ if (reactData.isComposed) {
319
+ return
320
+ }
321
+ const valueStr = view.state.doc.toString()
322
+ dispatchEvent('change', valueStr)
323
+ return false
324
+ },
325
+ compositionstart: (event, view) => {
326
+ reactData.isComposed = true
327
+ return false
328
+ },
329
+ compositionend: (event, view) => {
330
+ if (!reactData.isComposed) {
331
+ return
332
+ }
333
+ reactData.isComposed = false
334
+ const valueStr = view.state.doc.toString()
335
+ dispatchEvent('change', valueStr)
336
+ return false
306
337
  }
307
- }
308
-
309
- const updateListener = ({ state, changes, docChanged }) => {
310
- if (changes.empty || !docChanged) return
311
- const valueStr = state.doc.toString()
312
- dispatchEvent('change', valueStr)
313
- }
338
+ })
314
339
 
315
340
  const focus = () => {
316
341
  codeEditor.value && codeEditor.value.focus()
@@ -84,9 +84,9 @@ export default {
84
84
  return {}
85
85
  }
86
86
  },
87
- preventsubmit: {
87
+ preventSubmit: {
88
88
  type: Boolean,
89
- default: null
89
+ default: false
90
90
  },
91
91
  validConfig: {
92
92
  type: Object,
@@ -1,3 +1,6 @@
1
+ @use "./default/icons" as default-icons;
2
+ @use "./font/icons" as font-icons;
3
+
1
4
  @font-face {
2
5
  font-family: 'Ionicons';
3
6
  src: url("./default/ionicons.woff2") format("woff2"),
@@ -24,8 +27,6 @@
24
27
  text-align: center;
25
28
  }
26
29
 
27
- @import "./default/icons";
28
-
29
30
  @font-face {
30
31
  font-family: "iconfont";
31
32
  src: url('./font/iconfont.woff2?t=1661513291946') format('woff2'),
@@ -39,6 +40,4 @@
39
40
  font-style: normal;
40
41
  -webkit-font-smoothing: antialiased;
41
42
  -moz-osx-font-smoothing: grayscale;
42
- }
43
-
44
- @import "./font/icons";
43
+ }
@@ -159,6 +159,9 @@ export default defineComponent({
159
159
  triggerEvent(evnt)
160
160
  }
161
161
  const compositionEnd = evnt => {
162
+ if (!reactData.isComposed) {
163
+ return
164
+ }
162
165
  reactData.isComposed = false
163
166
  const inputElem = evnt.target
164
167
  const value = inputElem.value
@@ -28,12 +28,10 @@ export default {
28
28
  type: [Number, String]
29
29
  },
30
30
  autoResize: {
31
- type: Boolean,
32
- default: false
31
+ type: Boolean
33
32
  },
34
33
  syncResize: {
35
- type: [Boolean, String, Number],
36
- default: true
34
+ type: [Boolean, String, Number]
37
35
  },
38
36
  stripe: {
39
37
  type: Boolean,
@@ -461,11 +461,7 @@ export default function (props, context, proxy, isGrid) {
461
461
  // -------- 搜索
462
462
  // 表单展开全部/收起切换事件
463
463
  const onFormCollapsed = value => {
464
- if (isGrid) {
465
- setTimeout(() => {
466
- tableRef.value.recalculate(true)
467
- })
468
- }
464
+ tableRef.value.recalculate(true)
469
465
  }
470
466
  const onFormSubmit = () => {
471
467
  emit('form-submit', props.queryData)
@@ -704,8 +700,8 @@ export default function (props, context, proxy, isGrid) {
704
700
  updateSelection()
705
701
  return newRow
706
702
  }
707
- // 复制行按钮
708
- const handleToolCopy = async (rows, index) => {
703
+ // 复制行按钮 isNext复制到目标行的 上面还是下面,默认到下面
704
+ const handleToolCopy = async (rows, isNext = true) => {
709
705
  let selectedRows = getSelectionData()
710
706
  let copyRows = $vUtils.clone(rows || selectedRows, true)
711
707
  if (copyRows.length < 1) {
@@ -715,7 +711,8 @@ export default function (props, context, proxy, isGrid) {
715
711
  if (typeof props.onToolbarCopyBefore === 'function') {
716
712
  copyRows = await props.onToolbarCopyBefore(copyRows)
717
713
  }
718
- let insertList = copyRows.map(row => tableRef.value.insertAt(Object.assign(row, { [keyField.value]: undefined }), index ? index : row))
714
+ let insertType = isNext ? 'insertNextAt' : 'insertAt'
715
+ let insertList = copyRows.map(row => tableRef.value[insertType](Object.assign({}, row, { [keyField.value]: undefined }), row))
719
716
  let insertRes = await Promise.all(insertList)
720
717
  let insertRows = insertRes.map(item => item.row)
721
718
  updateSelection()
@@ -1,16 +1,14 @@
1
1
  <template>
2
2
  <vxe-table
3
3
  ref="tableRef"
4
- v-resize="offetChangeDebounce"
5
4
  :class="{ 'sh-vxe-tree-table': true, 'is--hidecheck': globalConfig.checkHide }"
6
5
  v-bind="tableConfigIn"
7
- :syncResize="syncResize"
8
6
  @radio-change="onRadioChange"
9
7
  @checkbox-change="onSelectionChange"
10
8
  @checkbox-all="onSelectionChange">
11
9
  <vxe-column :field="labelField" :title="labelTitle || multiple ? '全部' : ''" :width="checkWidth" :type="multiple ? 'checkbox' : 'radio'" treeNode>
12
10
  <template #default="scoped">
13
- <span>{{ getTreeNodeCellContent(scoped) }}</span>
11
+ <span>{{ treeNodeContent(scoped) }}</span>
14
12
  </template>
15
13
  </vxe-column>
16
14
  <template v-if="globalConfig.columns && globalConfig.columns.length > 0">
@@ -59,7 +57,7 @@ export default defineComponent({
59
57
  rowConfig: { keyField: treeNodeKey.value },
60
58
  radioConfig: { labelField: props.labelField, checkMethod: tableCheckMethods },
61
59
  checkboxConfig: { labelField: props.labelField, checkMethod: tableCheckMethods },
62
- treeConfig: { rowField: treeNodeKey.value },
60
+ treeConfig: { rowField: treeNodeKey.value, expandAll: props.globalConfig?.expandAll },
63
61
  editConfig: { enabled: false }
64
62
  }
65
63
  if (props.multiple && props.globalConfig.hasAll) resultConfig.showHeader = true
@@ -150,7 +148,7 @@ export default defineComponent({
150
148
  searchData = $vUtils.searchTree(
151
149
  tableTreeData,
152
150
  row => {
153
- let cellText = getTreeNodeCellContent({ row, column: tableTreeColumn })
151
+ let cellText = treeNodeContent({ row, column: tableTreeColumn })
154
152
  return $vUtils.trim(cellText).indexOf(filterText) > -1
155
153
  },
156
154
  { isEvery: true, children: treeChildKey.value }
@@ -165,32 +163,21 @@ export default defineComponent({
165
163
  filterData.value = searchData
166
164
  tableRef.value.setAllTreeExpand(true)
167
165
  }
168
- // 获取选中的数据
169
- const getSelectionData = () => {
170
- return tableRef.value.getCheckboxRecords()
171
- }
172
166
  const tableCheckMethods = ({ row, $table }) => {
173
167
  if (props.isLeaf && !props.multiple) {
174
168
  return (row[treeChildKey.value] || []).length < 1
175
169
  }
176
170
  return true
177
171
  }
178
- const getTreeNodeCellContent = ({ row, column }) => {
172
+ const treeNodeContent = ({ row, column }) => {
179
173
  if (props.labelFormat) {
180
174
  return $vUtils.format(props.labelFormat, row)
181
175
  }
182
176
  return $vUtils.get(row, column.property)
183
177
  }
184
- const handleOffsetChange = () => {
185
- syncResize.value = true
186
- setTimeout(() => {
187
- syncResize.value = false
188
- })
189
- }
190
178
 
191
179
  const initChangeDebounce = $vUtils.debounce(initSelection, 200)
192
180
  const filterChangeDebounce = $vUtils.debounce(handleMyTableFilter, 500)
193
- const offetChangeDebounce = $vUtils.debounce(handleOffsetChange, tableConfigIn.value.resizeConfig?.refreshDelay || 300)
194
181
 
195
182
  onMounted(() => {
196
183
  initChangeDebounce()
@@ -217,10 +204,8 @@ export default defineComponent({
217
204
  tableConfigIn,
218
205
  onRadioChange,
219
206
  onSelectionChange,
220
- getTreeNodeCellContent,
221
- getSelectionData,
222
- initSelection,
223
- offetChangeDebounce
207
+ treeNodeContent,
208
+ initSelection
224
209
  }
225
210
  }
226
211
  })
@@ -108,11 +108,7 @@ export default defineComponent({
108
108
  return Object.assign({ transfer: true }, propsConfig.value.globalConfig?.selectConfig, checkConfig.value)
109
109
  })
110
110
  const selectInputConfigIn = computed(() => {
111
- return Object.assign(
112
- { clearable: true, controls: false, transfer: false, editable: false, suffixIcon: 'vxe-icon-caret-down', placeholder: props.placeholder },
113
- propsConfig.value.globalConfig?.inputConfig,
114
- checkConfig.value
115
- )
111
+ return Object.assign({ clearable: true, readonly: true, suffixIcon: 'vxe-icon-caret-down', placeholder: props.placeholder }, propsConfig.value.globalConfig?.inputConfig, checkConfig.value)
116
112
  })
117
113
  const filterInputConfigIn = computed(() => {
118
114
  return Object.assign({ prefixIcon: 'vxe-icon-search', placeholder: '搜索', clearable: true }, propsConfig.value.globalConfig?.filterInputConfig)
@@ -205,15 +201,14 @@ export default defineComponent({
205
201
  // 树节点获取焦点事件
206
202
  const onFocus = async obj => {
207
203
  emitFocus()
208
- treeSelectInputRef.value.blur()
209
204
  await treeSelectRef.value.togglePanel()
210
205
  pulldownDrop.value = true
211
- if (filterInputRef.value) filterInputRef.value.focus()
206
+ if (filterInputRef.value) {
207
+ filterInputRef.value.focus()
208
+ }
212
209
  // 初始化获取服务配置数据
213
210
  await getServerConfigDataSourse()
214
- if (tableTreeRef.value) {
215
- tableTreeRef.value.initSelection(true)
216
- }
211
+ tableTreeRef.value && tableTreeRef.value.initSelection(true)
217
212
  }
218
213
  // 树节点选择变换事件
219
214
  const onChange = async (keys, rows, obj) => {
@@ -18,7 +18,7 @@ import '@vxe-ui/plugin-menu/dist/style.css'
18
18
  import VxeUIPluginRenderWangEditor from '@vxe-ui/plugin-render-wangeditor'
19
19
 
20
20
  import { utils } from 'sh-tools'
21
- import { publicRenders, extraRenders, filterRenders } from './render/globalRenders.jsx'
21
+ import { publicRenders, extraRenders, filterRenders } from './render/globalRenders.js'
22
22
  import renderUtils from './render/utils'
23
23
 
24
24
  utils.mixin(renderUtils)
@@ -99,7 +99,6 @@ let uiOptions = {
99
99
  showHeader: false,
100
100
  showFooter: false,
101
101
  showOverflow: true,
102
- resizeConfig: { refreshDelay: 300 },
103
102
  cellConfig: { padding: false, height: 32, verticalAlign: 'center' },
104
103
  columnConfig: { width: 120 },
105
104
  virtualXConfig: { enabled: true, gt: 20 },
@@ -160,7 +159,8 @@ let tableOptions = {
160
159
  stripe: false,
161
160
  border: 'full',
162
161
  round: false,
163
- autoResize: false,
162
+ autoResize: true,
163
+ syncResize: true,
164
164
  keepSource: false,
165
165
  minHeight: 30,
166
166
  rowConfig: {
@@ -267,7 +267,7 @@ let tableOptions = {
267
267
  startIndex: 1
268
268
  },
269
269
  resizeConfig: {
270
- refreshDelay: 200
270
+ refreshDelay: 100
271
271
  },
272
272
  exportConfig: {
273
273
  mode: 'current',
@@ -7,7 +7,7 @@
7
7
  :size="rsize"
8
8
  :data-sourse="renderValue"
9
9
  @edit-closed="vxeTableCallback"
10
- @toolbar-btn-click="onToolbaroption"></sh-table>
10
+ @toolbar-btn-click="onToolbarBtnClick"></sh-table>
11
11
  </span>
12
12
  </template>
13
13
 
@@ -27,7 +27,7 @@ export default defineComponent({
27
27
  const vxeTableCallback = params => {}
28
28
 
29
29
  // 新增、删除行回调
30
- const onToolbaroption = (code, data, $table) => {
30
+ const onToolbarBtnClick = (code, data, $table) => {
31
31
  driveBackData()
32
32
  }
33
33
 
@@ -41,7 +41,7 @@ export default defineComponent({
41
41
  ...useCell,
42
42
  shTableRef,
43
43
  vxeTableCallback,
44
- onToolbaroption
44
+ onToolbarBtnClick
45
45
  }
46
46
  }
47
47
  })
@@ -1,4 +1,5 @@
1
1
  import { utils } from 'sh-tools'
2
+ import { h } from 'vue'
2
3
 
3
4
  // 渲染器组件封装
4
5
  import vxeRenderInput from './cell/vxe-render-input.vue'
@@ -39,284 +40,284 @@ const publicRenders = {
39
40
  autofocus: '.vxe-input--inner',
40
41
  autoselect: true,
41
42
  renderDefault(renderOpts, params) {
42
- return [<vxeRenderInput rparams={params} roptions={renderOpts} />]
43
+ return [h(vxeRenderInput, { rparams: params, roptions: renderOpts })]
43
44
  },
44
45
  renderCell(renderOpts, params) {
45
- return [<vxeRenderInput rparams={params} roptions={renderOpts} />]
46
+ return [h(vxeRenderInput, { rparams: params, roptions: renderOpts })]
46
47
  },
47
48
  renderEdit(renderOpts, params) {
48
- return [<vxeRenderInput rparams={params} roptions={renderOpts} redit />]
49
+ return [h(vxeRenderInput, { rparams: params, roptions: renderOpts, redit: true })]
49
50
  },
50
51
  renderItemContent(renderOpts, params) {
51
- return [<vxeRenderInput rparams={params} roptions={renderOpts} redit />]
52
+ return [h(vxeRenderInput, { rparams: params, roptions: renderOpts, redit: true })]
52
53
  }
53
54
  },
54
55
  $vNumber: {
55
56
  autofocus: '.vxe-number-input--input',
56
57
  autoselect: true,
57
58
  renderDefault(renderOpts, params) {
58
- return [<vxeRenderNumber rparams={params} roptions={renderOpts} />]
59
+ return [h(vxeRenderNumber, { rparams: params, roptions: renderOpts })]
59
60
  },
60
61
  renderCell(renderOpts, params) {
61
- return [<vxeRenderNumber rparams={params} roptions={renderOpts} />]
62
+ return [h(vxeRenderNumber, { rparams: params, roptions: renderOpts })]
62
63
  },
63
64
  renderEdit(renderOpts, params) {
64
- return [<vxeRenderNumber rparams={params} roptions={renderOpts} redit />]
65
+ return [h(vxeRenderNumber, { rparams: params, roptions: renderOpts, redit: true })]
65
66
  },
66
67
  renderItemContent(renderOpts, params) {
67
- return [<vxeRenderNumber rparams={params} roptions={renderOpts} redit />]
68
+ return [h(vxeRenderNumber, { rparams: params, roptions: renderOpts, redit: true })]
68
69
  },
69
70
  renderFooter(renderOpts, params) {
70
- return [<vxeFooterNumber rparams={params} roptions={renderOpts} />]
71
+ return [h(vxeFooterNumber, { rparams: params, roptions: renderOpts })]
71
72
  }
72
73
  },
73
74
  $vTextArea: {
74
75
  autofocus: '.vxe-textarea--inner',
75
76
  autoselect: true,
76
77
  renderDefault(renderOpts, params) {
77
- return [<vxeRenderTextarea rparams={params} roptions={renderOpts} />]
78
+ return [h(vxeRenderTextarea, { rparams: params, roptions: renderOpts })]
78
79
  },
79
80
  renderCell(renderOpts, params) {
80
- return [<vxeRenderTextarea rparams={params} roptions={renderOpts} />]
81
+ return [h(vxeRenderTextarea, { rparams: params, roptions: renderOpts })]
81
82
  },
82
83
  renderEdit(renderOpts, params) {
83
- return [<vxeRenderTextarea rparams={params} roptions={renderOpts} redit />]
84
+ return [h(vxeRenderTextarea, { rparams: params, roptions: renderOpts, redit: true })]
84
85
  },
85
86
  renderItemContent(renderOpts, params) {
86
- return [<vxeRenderTextarea rparams={params} roptions={renderOpts} redit />]
87
+ return [h(vxeRenderTextarea, { rparams: params, roptions: renderOpts, redit: true })]
87
88
  }
88
89
  },
89
90
  $vSelect: {
90
91
  autofocus: '.vxe-input--inner',
91
92
  autoselect: true,
92
93
  renderDefault(renderOpts, params) {
93
- return [<vxeRenderSelect rparams={params} roptions={renderOpts} />]
94
+ return [h(vxeRenderSelect, { rparams: params, roptions: renderOpts })]
94
95
  },
95
96
  renderCell(renderOpts, params) {
96
- return [<vxeRenderSelect rparams={params} roptions={renderOpts} />]
97
+ return [h(vxeRenderSelect, { rparams: params, roptions: renderOpts })]
97
98
  },
98
99
  renderEdit(renderOpts, params) {
99
- return [<vxeRenderSelect rparams={params} roptions={renderOpts} redit />]
100
+ return [h(vxeRenderSelect, { rparams: params, roptions: renderOpts, redit: true })]
100
101
  },
101
102
  renderItemContent(renderOpts, params) {
102
- return [<vxeRenderSelect rparams={params} roptions={renderOpts} redit />]
103
+ return [h(vxeRenderSelect, { rparams: params, roptions: renderOpts, redit: true })]
103
104
  }
104
105
  },
105
106
  $vTree: {
106
107
  autofocus: '.vxe-input--inner',
107
108
  autoselect: true,
108
109
  renderDefault(renderOpts, params) {
109
- return [<vxeRenderTree rparams={params} roptions={renderOpts} />]
110
+ return [h(vxeRenderTree, { rparams: params, roptions: renderOpts })]
110
111
  },
111
112
  renderCell(renderOpts, params) {
112
- return [<vxeRenderTree rparams={params} roptions={renderOpts} />]
113
+ return [h(vxeRenderTree, { rparams: params, roptions: renderOpts })]
113
114
  },
114
115
  renderEdit(renderOpts, params) {
115
- return [<vxeRenderTree rparams={params} roptions={renderOpts} redit />]
116
+ return [h(vxeRenderTree, { rparams: params, roptions: renderOpts, redit: true })]
116
117
  },
117
118
  renderItemContent(renderOpts, params) {
118
- return [<vxeRenderTree rparams={params} roptions={renderOpts} redit />]
119
+ return [h(vxeRenderTree, { rparams: params, roptions: renderOpts, redit: true })]
119
120
  }
120
121
  },
121
122
  $vTime: {
122
123
  autofocus: '.vxe-date-picker--inner',
123
124
  autoselect: true,
124
125
  renderDefault(renderOpts, params) {
125
- return [<vxeRenderTime rparams={params} roptions={renderOpts} />]
126
+ return [h(vxeRenderTime, { rparams: params, roptions: renderOpts })]
126
127
  },
127
128
  renderCell(renderOpts, params) {
128
- return [<vxeRenderTime rparams={params} roptions={renderOpts} />]
129
+ return [h(vxeRenderTime, { rparams: params, roptions: renderOpts })]
129
130
  },
130
131
  renderEdit(renderOpts, params) {
131
- return [<vxeRenderTime rparams={params} roptions={renderOpts} redit />]
132
+ return [h(vxeRenderTime, { rparams: params, roptions: renderOpts, redit: true })]
132
133
  },
133
134
  renderItemContent(renderOpts, params) {
134
- return [<vxeRenderTime rparams={params} roptions={renderOpts} redit />]
135
+ return [h(vxeRenderTime, { rparams: params, roptions: renderOpts, redit: true })]
135
136
  }
136
137
  },
137
138
  $vProgress: {
138
139
  autofocus: '.vxe-number-input--input',
139
140
  autoselect: true,
140
141
  renderDefault(renderOpts, params) {
141
- return [<vxeRenderProgress rparams={params} roptions={renderOpts} />]
142
+ return [h(vxeRenderProgress, { rparams: params, roptions: renderOpts })]
142
143
  },
143
144
  renderCell(renderOpts, params) {
144
- return [<vxeRenderProgress rparams={params} roptions={renderOpts} />]
145
+ return [h(vxeRenderProgress, { rparams: params, roptions: renderOpts })]
145
146
  },
146
147
  renderEdit(renderOpts, params) {
147
- return [<vxeRenderProgress rparams={params} roptions={renderOpts} redit />]
148
+ return [h(vxeRenderProgress, { rparams: params, roptions: renderOpts, redit: true })]
148
149
  },
149
150
  renderItemContent(renderOpts, params) {
150
- return [<vxeRenderProgress rparams={params} roptions={renderOpts} redit />]
151
+ return [h(vxeRenderProgress, { rparams: params, roptions: renderOpts, redit: true })]
151
152
  }
152
153
  },
153
154
  $vSwitch: {
154
155
  autoselect: true,
155
156
  renderDefault(renderOpts, params) {
156
- return [<vxeRenderSwitch rparams={params} roptions={renderOpts} />]
157
+ return [h(vxeRenderSwitch, { rparams: params, roptions: renderOpts })]
157
158
  },
158
159
  renderCell(renderOpts, params) {
159
- return [<vxeRenderSwitch rparams={params} roptions={renderOpts} />]
160
+ return [h(vxeRenderSwitch, { rparams: params, roptions: renderOpts })]
160
161
  },
161
162
  renderEdit(renderOpts, params) {
162
- return [<vxeRenderSwitch rparams={params} roptions={renderOpts} redit />]
163
+ return [h(vxeRenderSwitch, { rparams: params, roptions: renderOpts, redit: true })]
163
164
  },
164
165
  renderItemContent(renderOpts, params) {
165
- return [<vxeRenderSwitch rparams={params} roptions={renderOpts} redit />]
166
+ return [h(vxeRenderSwitch, { rparams: params, roptions: renderOpts, redit: true })]
166
167
  }
167
168
  },
168
169
  $vMoney: {
169
170
  autofocus: '.vxe-number-input--input',
170
171
  autoselect: true,
171
172
  renderDefault(renderOpts, params) {
172
- return [<vxeRenderMoney rparams={params} roptions={renderOpts} />]
173
+ return [h(vxeRenderMoney, { rparams: params, roptions: renderOpts })]
173
174
  },
174
175
  renderCell(renderOpts, params) {
175
- return [<vxeRenderMoney rparams={params} roptions={renderOpts} />]
176
+ return [h(vxeRenderMoney, { rparams: params, roptions: renderOpts })]
176
177
  },
177
178
  renderEdit(renderOpts, params) {
178
- return [<vxeRenderMoney rparams={params} roptions={renderOpts} redit />]
179
+ return [h(vxeRenderMoney, { rparams: params, roptions: renderOpts, redit: true })]
179
180
  },
180
181
  renderItemContent(renderOpts, params) {
181
- return [<vxeRenderMoney rparams={params} roptions={renderOpts} redit />]
182
+ return [h(vxeRenderMoney, { rparams: params, roptions: renderOpts, redit: true })]
182
183
  },
183
184
  renderHeader(renderOpts, params) {
184
- return [<vxeHeaderMoney rparams={params} roptions={renderOpts} />]
185
+ return [h(vxeHeaderMoney, { rparams: params, roptions: renderOpts })]
185
186
  },
186
187
  renderFooter(renderOpts, params) {
187
- return [<vxeFooterMoney rparams={params} roptions={renderOpts} />]
188
+ return [h(vxeFooterMoney, { rparams: params, roptions: renderOpts })]
188
189
  }
189
190
  },
190
191
  $vCheckbox: {
191
192
  autoselect: true,
192
193
  renderDefault(renderOpts, params) {
193
- return [<vxeRenderCheckbox rparams={params} roptions={renderOpts} />]
194
+ return [h(vxeRenderCheckbox, { rparams: params, roptions: renderOpts })]
194
195
  },
195
196
  renderCell(renderOpts, params) {
196
- return [<vxeRenderCheckbox rparams={params} roptions={renderOpts} />]
197
+ return [h(vxeRenderCheckbox, { rparams: params, roptions: renderOpts })]
197
198
  },
198
199
  renderEdit(renderOpts, params) {
199
- return [<vxeRenderCheckbox rparams={params} roptions={renderOpts} redit />]
200
+ return [h(vxeRenderCheckbox, { rparams: params, roptions: renderOpts, redit: true })]
200
201
  },
201
202
  renderItemContent(renderOpts, params) {
202
- return [<vxeRenderCheckbox rparams={params} roptions={renderOpts} redit />]
203
+ return [h(vxeRenderCheckbox, { rparams: params, roptions: renderOpts, redit: true })]
203
204
  }
204
205
  },
205
206
  $vCheckgroup: {
206
207
  autoselect: true,
207
208
  renderDefault(renderOpts, params) {
208
- return [<vxeRenderCheckgroup rparams={params} roptions={renderOpts} />]
209
+ return [h(vxeRenderCheckgroup, { rparams: params, roptions: renderOpts })]
209
210
  },
210
211
  renderCell(renderOpts, params) {
211
- return [<vxeRenderCheckgroup rparams={params} roptions={renderOpts} />]
212
+ return [h(vxeRenderCheckgroup, { rparams: params, roptions: renderOpts })]
212
213
  },
213
214
  renderEdit(renderOpts, params) {
214
- return [<vxeRenderCheckgroup rparams={params} roptions={renderOpts} redit />]
215
+ return [h(vxeRenderCheckgroup, { rparams: params, roptions: renderOpts, redit: true })]
215
216
  },
216
217
  renderItemContent(renderOpts, params) {
217
- return [<vxeRenderCheckgroup rparams={params} roptions={renderOpts} redit />]
218
+ return [h(vxeRenderCheckgroup, { rparams: params, roptions: renderOpts, redit: true })]
218
219
  }
219
220
  },
220
221
  $vRadio: {
221
222
  autoselect: true,
222
223
  renderDefault(renderOpts, params) {
223
- return [<vxeRenderRadio rparams={params} roptions={renderOpts} />]
224
+ return [h(vxeRenderRadio, { rparams: params, roptions: renderOpts })]
224
225
  },
225
226
  renderCell(renderOpts, params) {
226
- return [<vxeRenderRadio rparams={params} roptions={renderOpts} />]
227
+ return [h(vxeRenderRadio, { rparams: params, roptions: renderOpts })]
227
228
  },
228
229
  renderEdit(renderOpts, params) {
229
- return [<vxeRenderRadio rparams={params} roptions={renderOpts} redit />]
230
+ return [h(vxeRenderRadio, { rparams: params, roptions: renderOpts, redit: true })]
230
231
  },
231
232
  renderItemContent(renderOpts, params) {
232
- return [<vxeRenderRadio rparams={params} roptions={renderOpts} redit />]
233
+ return [h(vxeRenderRadio, { rparams: params, roptions: renderOpts, redit: true })]
233
234
  }
234
235
  },
235
236
  $vRadiogroup: {
236
237
  autoselect: true,
237
238
  renderDefault(renderOpts, params) {
238
- return [<vxeRenderRadiogroup rparams={params} roptions={renderOpts} />]
239
+ return [h(vxeRenderRadiogroup, { rparams: params, roptions: renderOpts })]
239
240
  },
240
241
  renderCell(renderOpts, params) {
241
- return [<vxeRenderRadiogroup rparams={params} roptions={renderOpts} />]
242
+ return [h(vxeRenderRadiogroup, { rparams: params, roptions: renderOpts })]
242
243
  },
243
244
  renderEdit(renderOpts, params) {
244
- return [<vxeRenderRadiogroup rparams={params} roptions={renderOpts} redit />]
245
+ return [h(vxeRenderRadiogroup, { rparams: params, roptions: renderOpts, redit: true })]
245
246
  },
246
247
  renderItemContent(renderOpts, params) {
247
- return [<vxeRenderRadiogroup rparams={params} roptions={renderOpts} redit />]
248
+ return [h(vxeRenderRadiogroup, { rparams: params, roptions: renderOpts, redit: true })]
248
249
  }
249
250
  },
250
251
  $vTable: {
251
252
  renderExpand(renderOpts, params) {
252
- return [<vxeRenderTable rparams={params} roptions={renderOpts} />]
253
+ return [h(vxeRenderTable, { rparams: params, roptions: renderOpts })]
253
254
  },
254
255
  renderItemContent(renderOpts, params) {
255
- return [<vxeRenderTable rparams={params} roptions={renderOpts} redit />]
256
+ return [h(vxeRenderTable, { rparams: params, roptions: renderOpts, redit: true })]
256
257
  }
257
258
  },
258
259
  $vImg: {
259
260
  renderDefault(renderOpts, params) {
260
- return [<vxeRenderImg rparams={params} roptions={renderOpts} />]
261
+ return [h(vxeRenderImg, { rparams: params, roptions: renderOpts })]
261
262
  },
262
263
  renderCell(renderOpts, params) {
263
- return [<vxeRenderImg rparams={params} roptions={renderOpts} />]
264
+ return [h(vxeRenderImg, { rparams: params, roptions: renderOpts })]
264
265
  },
265
266
  renderEdit(renderOpts, params) {
266
- return [<vxeRenderImg rparams={params} roptions={renderOpts} redit />]
267
+ return [h(vxeRenderImg, { rparams: params, roptions: renderOpts, redit: true })]
267
268
  }
268
269
  },
269
270
  $vHref: {
270
271
  autoselect: true,
271
272
  renderDefault(renderOpts, params) {
272
- return [<vxeRenderHref rparams={params} roptions={renderOpts} />]
273
+ return [h(vxeRenderHref, { rparams: params, roptions: renderOpts })]
273
274
  },
274
275
  renderCell(renderOpts, params) {
275
- return [<vxeRenderHref rparams={params} roptions={renderOpts} />]
276
+ return [h(vxeRenderHref, { rparams: params, roptions: renderOpts })]
276
277
  },
277
278
  renderEdit(renderOpts, params) {
278
- return [<vxeRenderHref rparams={params} roptions={renderOpts} redit />]
279
+ return [h(vxeRenderHref, { rparams: params, roptions: renderOpts, redit: true })]
279
280
  }
280
281
  },
281
282
  $vUpload: {
282
283
  autoselect: true,
283
284
  renderDefault(renderOpts, params) {
284
- return [<vxeRenderUpload rparams={params} roptions={renderOpts} />]
285
+ return [h(vxeRenderUpload, { rparams: params, roptions: renderOpts })]
285
286
  },
286
287
  renderCell(renderOpts, params) {
287
- return [<vxeRenderUpload rparams={params} roptions={renderOpts} />]
288
+ return [h(vxeRenderUpload, { rparams: params, roptions: renderOpts })]
288
289
  },
289
290
  renderEdit(renderOpts, params) {
290
- return [<vxeRenderUpload rparams={params} roptions={renderOpts} redit />]
291
+ return [h(vxeRenderUpload, { rparams: params, roptions: renderOpts, redit: true })]
291
292
  },
292
293
  renderItemContent(renderOpts, params) {
293
- return [<vxeRenderUpload rparams={params} roptions={renderOpts} redit />]
294
+ return [h(vxeRenderUpload, { rparams: params, roptions: renderOpts, redit: true })]
294
295
  }
295
296
  },
296
297
  $vOparate: {
297
298
  renderDefault(renderOpts, params) {
298
- return [<vxeRenderOparate rparams={params} roptions={renderOpts} />]
299
+ return [h(vxeRenderOparate, { rparams: params, roptions: renderOpts })]
299
300
  },
300
301
  renderCell(renderOpts, params) {
301
- return [<vxeRenderOparate rparams={params} roptions={renderOpts} />]
302
+ return [h(vxeRenderOparate, { rparams: params, roptions: renderOpts })]
302
303
  },
303
304
  renderEdit(renderOpts, params) {
304
- return [<vxeRenderOparate rparams={params} roptions={renderOpts} redit />]
305
+ return [h(vxeRenderOparate, { rparams: params, roptions: renderOpts, redit: true })]
305
306
  }
306
307
  },
307
308
  $vCode: {
308
309
  autoselect: true,
309
310
  renderDefault(renderOpts, params) {
310
- return [<vxeRenderCode rparams={params} roptions={renderOpts} />]
311
+ return [h(vxeRenderCode, { rparams: params, roptions: renderOpts })]
311
312
  },
312
313
  renderCell(renderOpts, params) {
313
- return [<vxeRenderCode rparams={params} roptions={renderOpts} />]
314
+ return [h(vxeRenderCode, { rparams: params, roptions: renderOpts })]
314
315
  },
315
316
  renderEdit(renderOpts, params) {
316
- return [<vxeRenderCode rparams={params} roptions={renderOpts} redit />]
317
+ return [h(vxeRenderCode, { rparams: params, roptions: renderOpts, redit: true })]
317
318
  },
318
319
  renderItemContent(renderOpts, params) {
319
- return [<vxeRenderCode rparams={params} roptions={renderOpts} redit />]
320
+ return [h(vxeRenderCode, { rparams: params, roptions: renderOpts, redit: true })]
320
321
  }
321
322
  }
322
323
  }
@@ -351,7 +352,7 @@ const extraRenders = {
351
352
  const filterRenders = {
352
353
  $vFilterInput: {
353
354
  renderFilter(renderOpts, params) {
354
- return [<vxeFilterInput rparams={params} roptions={renderOpts} />]
355
+ return [h(vxeFilterInput, { rparams: params, roptions: renderOpts })]
355
356
  },
356
357
  filterResetMethod({ options, column }) {
357
358
  options.forEach(option => {
@@ -370,7 +371,7 @@ const filterRenders = {
370
371
  },
371
372
  $vFilterComplex: {
372
373
  renderFilter(renderOpts, params) {
373
- return [<vxeFilterComplex rparams={params} roptions={renderOpts} />]
374
+ return [h(vxeFilterComplex, { rparams: params, roptions: renderOpts })]
374
375
  },
375
376
  filterResetMethod({ options, column }) {
376
377
  options.forEach(option => {
@@ -407,7 +408,7 @@ const filterRenders = {
407
408
  },
408
409
  $vFilterTime: {
409
410
  renderFilter(renderOpts, params) {
410
- return [<vxeFilterTime rparams={params} roptions={renderOpts} />]
411
+ return [h(vxeFilterTime, { rparams: params, roptions: renderOpts })]
411
412
  },
412
413
  filterResetMethod({ options, column }) {
413
414
  options.forEach(option => {
@@ -65,7 +65,8 @@ export default function (props, context, proxy) {
65
65
  // 初始化数据
66
66
  const initData = () => {
67
67
  let keyValue = $vUtils.get(rdata.value, rkey.value)
68
- formatValueFun(keyValue)
68
+ let formatFuncMethod = proxy.formatValueFun || formatValueFun
69
+ formatFuncMethod(keyValue)
69
70
  }
70
71
 
71
72
  // 输入框前缀点击事件