Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
xuliangzhan committed Dec 30, 2024
1 parent c8c2f4d commit 68cd528
Show file tree
Hide file tree
Showing 22 changed files with 571 additions and 240 deletions.
39 changes: 31 additions & 8 deletions .gitee/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ body:
- type: input
id: issue_link
attributes:
label: "可复现的链接(必须为公开链接,仅包含能复现问题的示例代码):"
description: "一个最小化的重现示例能让我们精确地定位问题,从而快速解决问题。如何创建,点击 v3:[codesandbox](https://codesandbox.io/s/vue-template-916h0)、[jsfiddle](https://jsfiddle.net/86p7Ltny/)、[jsrun](https://jsrun.net/vIyKp/edit) 或 v4:[codesandbox](https://codesandbox.io/s/vxe-table-wentiyanshi-forked-54v2j)、[jsfiddle](https://jsfiddle.net/9qoghkbj/)、[jsrun](https://jsrun.net/K5IKp/edit),将代码示例编辑后保存。"
label: "[可复现的链接](https://vxetable.cn/issues.html)(必须为公开链接,仅包含能复现问题的示例代码):"
description: "一个最小化的重现示例能让我们精确地定位问题,从而快速解决问题。"
validations:
required: true
- type: textarea
Expand All @@ -17,7 +17,7 @@ body:
required: true
- type: markdown
attributes:
value: "在发布问题之前,请仔细阅读所填写的步骤,以确保是详细和清晰的。"
value: "在发布问题之前,请先查阅[最新文档](https://vxetable.cn/)确保使用的是最新版本,并仔细阅读所填写的步骤,以确保是详细和清晰的。"
- type: input
id: issue_expect
attributes:
Expand All @@ -26,27 +26,50 @@ body:
id: issue_os_version
attributes:
label: "操作系统:"
placeholder: "例如:window11"
placeholder: "例如:window10"
validations:
required: true
- type: input
id: issue_browser_version
attributes:
label: "浏览器版本:"
placeholder: "例如:chrome 133.0.6876.4"
placeholder: "例如:chrome 95.0.4638.69"
validations:
required: true
- type: input
id: issue_vue_version
attributes:
label: "vue 版本:"
placeholder: "例如:3.5.0"
placeholder: "例如:3.4.27"
validations:
required: true
- type: input
id: issue_vxe_version
id: issue_vxe_ui_version
attributes:
label: "vxe-pc-ui 版本:"
placeholder: "例如:4.3.51"
validations:
required: true
- type: input
id: issue_vxe_table_version
attributes:
label: "vxe-table 版本:"
placeholder: "例如:3.9.0"
placeholder: "例如:4.9.35"
validations:
required: true
- type: checkboxes
id: issue_confirm_read_agreement
attributes:
label: "反馈?"
description: "官方只维护最新版本,如果不是最新版本,请先更新到[最新版本](https://vxetable.cn/)之后再提!"
options:
- label: "我已确认要求提供复现链接与示例代码"
required: true
- type: checkboxes
id: issue_confirm_latest_version
attributes:
label: "是否使用当前最新版本?"
description: "我已确认是最新版本,仅支持提交最新版本的问题反馈,非最新版本不予处理,一律关闭"
options:
- label: "我已确认是使用最新版本并已按要求提供复现链接与示例代码"
required: true
10 changes: 9 additions & 1 deletion .gitee/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ body:
required: true
- type: markdown
attributes:
value: "请先查看[最新文档](https://xuliangzhan_admin.gitee.io/vxe-table/#/table/api),确定该功能是否已有实现"
value: "请先查阅[最新文档](https://vxetable.cn/),确定该功能是否已有实现"
- type: textarea
id: issue_api_describe
attributes:
Expand All @@ -25,3 +25,11 @@ body:
- type: markdown
attributes:
value: "如果有其他已实现的方案,可以通过链接或截图描述一下"
- type: checkboxes
id: issue_confirm_latest_version
attributes:
label: "是否使用当前最新版本?"
description: "官方只维护最新版本,如果不是最新版本,请先更新到[最新版本](https://vxetable.cn/)之后再反馈问题!"
options:
- label: "我已确认是使用当前的最新版本。"
required: true
18 changes: 13 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ body:
- type: input
id: issue_link
attributes:
label: "可复现的链接(必须为公开链接,仅包含能复现问题的示例代码):"
label: "[可复现的链接](https://vxetable.cn/issues.html)(必须为公开链接,仅包含能复现问题的示例代码):"
description: "一个最小化的重现示例能让我们精确地定位问题,从而快速解决问题。"
validations:
required: true
Expand Down Expand Up @@ -47,21 +47,29 @@ body:
id: issue_vxe_ui_version
attributes:
label: "vxe-pc-ui 版本:"
placeholder: "例如:4.2.2"
placeholder: "例如:4.3.51"
validations:
required: true
- type: input
id: issue_vxe_table_version
attributes:
label: "vxe-table 版本:"
placeholder: "例如:4.7.81"
placeholder: "例如:4.9.35"
validations:
required: true
- type: checkboxes
id: issue_confirm_read_agreement
attributes:
label: "反馈?"
description: "官方只维护最新版本,如果不是最新版本,请先更新到[最新版本](https://vxetable.cn/)之后再提!"
options:
- label: "我已确认要求提供复现链接与示例代码"
required: true
- type: checkboxes
id: issue_confirm_latest_version
attributes:
label: "是否使用当前最新版本?"
description: "官方只维护最新版本,如果不是最新版本,请先更新到[最新版本](https://vxetable.cn/)之后再提!"
description: "我已确认是最新版本,仅支持提交最新版本的问题反馈,非最新版本不予处理,一律关闭"
options:
- label: "我已确认是使用当前的最新版本并已按要求提供复现链接与示例代码。"
- label: "我已确认是使用最新版本并已按要求提供复现链接与示例代码"
required: true
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ body:
id: issue_confirm_latest_version
attributes:
label: "是否使用当前最新版本?"
description: "官方只维护最新版本,如果不是最新版本,请先更新到[最新版本](https://vxetable.cn/)之后再提"
description: "官方只维护最新版本,如果不是最新版本,请先更新到[最新版本](https://vxetable.cn/)之后再反馈问题"
options:
- label: "我已确认是使用当前的最新版本。"
required: true
5 changes: 3 additions & 2 deletions examples/views/table/TableTest8.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
show-footer
height="800"
:loading="loading"
:column-config="{resizable: true}"
:column-config="{resizable: true,drag: true}"
:row-config="{drag: true}"
:scroll-x="{enabled: true, gt: 0}"
:scroll-y="{enabled: true, gt: 0}"
:data="tableData"
:footer-data="footerData">
<vxe-column type="checkbox" width="60" fixed="left"></vxe-column>
<vxe-column type="checkbox" width="80" fixed="left" drag-sort></vxe-column>
<vxe-column field="col0" title="列0" width="100" fixed="left"></vxe-column>
<vxe-column field="imgUrl" title="列1" width="80" fixed="left" :cell-render="imgUrlCellRender"></vxe-column>
<vxe-column field="col2" title="列2" width="90"></vxe-column>
Expand Down
2 changes: 1 addition & 1 deletion examples/views/table/TableTest9.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
:scroll-x="{enabled: true, gt: 0}"
:scroll-y="{enabled: true, gt: 0}"
:data="tableData">
<vxe-column type="checkbox" width="60" drag-sort></vxe-column>
<vxe-column type="checkbox" width="80" drag-sort></vxe-column>
<vxe-column field="col0" title="列0" width="100"></vxe-column>
<vxe-column field="imgUrl" title="列1" width="80" :cell-render="imgUrlCellRender"></vxe-column>
<vxe-column field="col2" title="列2" width="90"></vxe-column>
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vxe-table",
"version": "4.9.35",
"version": "4.10.0-beta.13",
"description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟树、拖拽排序,懒加载、快捷菜单、数据校验、树形结构、打印、导入导出、自定义模板、渲染器、JSON 配置式...",
"scripts": {
"update": "npm install --legacy-peer-deps",
Expand Down Expand Up @@ -28,7 +28,7 @@
"style": "lib/style.css",
"typings": "types/index.d.ts",
"dependencies": {
"vxe-pc-ui": "^4.3.43"
"vxe-pc-ui": "^4.3.51"
},
"devDependencies": {
"@types/resize-observer-browser": "^0.1.11",
Expand Down
17 changes: 7 additions & 10 deletions packages/table/module/custom/panel.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { defineComponent, h, inject, ref, Ref, VNode, PropType, nextTick, TransitionGroup, createCommentVNode } from 'vue'
import { VxeUI } from '../../../ui'
import { formatText } from '../../../ui/src/utils'
import { tpImg, addClass, removeClass } from '../../../ui/src/dom'
import { getTpImg, addClass, removeClass } from '../../../ui/src/dom'
import { errLog } from '../../../ui/src/log'
import XEUtils from 'xe-utils'

Expand Down Expand Up @@ -251,9 +251,7 @@ export default defineComponent({

const sortDragstartEvent = (evnt: DragEvent) => {
if (evnt.dataTransfer) {
const img = new Image()
img.src = tpImg
evnt.dataTransfer.setDragImage(img, 0, 0)
evnt.dataTransfer.setDragImage(getTpImg(), 0, 0)
}
}

Expand Down Expand Up @@ -422,11 +420,7 @@ export default defineComponent({

if (immediate) {
reactData.customColumnList = collectColumn.slice(0)
$xeTable.refreshColumn(true).then(() => {
$xeTable.updateCellAreas()
$xeTable.handleCustom()
$xeTable.saveCustomStore('update:sort')
})
$xeTable.handleColDragSwapColumn()
}
}).catch(() => {
})
Expand Down Expand Up @@ -474,10 +468,13 @@ export default defineComponent({

const renderDragTip = () => {
const dragCol = dragColumnRef.value
const columnDragOpts = computeColumnDragOpts.value
return h('div', {}, [
h('div', {
ref: refDragLineElem,
class: 'vxe-table-custom-popup--drag-line'
class: ['vxe-table-custom-popup--drag-line', {
'is--guides': columnDragOpts.showGuidesStatus
}]
}),
h('div', {
ref: refDragTipElem,
Expand Down
7 changes: 6 additions & 1 deletion packages/table/module/edit/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,12 @@ hooks.add('tableEditModule', {
throw new Error(getI18n('vxe.error.unableInsert'))
}
afterFullData.splice(afIndex, 0, ...newRecords)
tableFullData.splice($xeTable.findRowIndexOf(tableFullData, targetRow), 0, ...newRecords)
const tfIndex = $xeTable.findRowIndexOf(tableFullData, targetRow)
if (tfIndex > -1) {
tableFullData.splice(tfIndex + (isInsertNextRow ? 1 : 0), 0, ...newRecords)
} else {
tableFullData.push(...newRecords)
}
// 刷新单元格合并
mergeList.forEach((mergeItem: any) => {
const { row: mergeRowIndex, rowspan: mergeRowspan } = mergeItem
Expand Down
Loading

0 comments on commit 68cd528

Please sign in to comment.