1
0
mirror of synced 2025-12-13 09:48:06 +08:00

修复 controls 导致日期类型图标不显示问题

This commit is contained in:
xuliangzhan
2021-01-29 21:36:52 +08:00
parent 3579450cbc
commit 2ac707445d
13 changed files with 82 additions and 67 deletions

View File

@@ -148,15 +148,15 @@ export default defineComponent({
## Docs
[💡 User guide](https://github.com/xuliangzhan/vxe-table-demo)
[👉 View example](https://x-extends.github.io/vxe-table/#/table/base/basic)
[👉 View API](https://x-extends.github.io/vxe-table/#/table/api)
💡 [User guide](https://github.com/xuliangzhan/vxe-table-demo)
👉 [View example](https://x-extends.github.io/vxe-table/#/table/base/basic)
👉 [View API](https://x-extends.github.io/vxe-table/#/table/api)
## Support the author
If the open source software is helpful to you, you can scan the QR code below to support us.☕
[👉 Supports the author💰](https://x-extends.github.io/vxe-table/#/donation/api)
👉 [Supports the author💰](https://x-extends.github.io/vxe-table/#/donation/api)
## License

View File

@@ -148,15 +148,15 @@ export default defineComponent({
## 文档
[💡 使用指南](https://github.com/xuliangzhan/vxe-table-demo)
[👉 查看演示](https://xuliangzhan_admin.gitee.io/vxe-table/#/table/base/basic)
[👉 查看文档](https://xuliangzhan_admin.gitee.io/vxe-table/#/table/api)
💡 [使用指南](https://github.com/xuliangzhan/vxe-table-demo)
👉 [查看演示](https://xuliangzhan_admin.gitee.io/vxe-table/#/table/base/basic) [备用地址](https://x-extends.github.io/vxe-table/#/table/base/basic)
👉 [查看文档](https://xuliangzhan_admin.gitee.io/vxe-table/#/table/api) [备用地址](https://x-extends.github.io/vxe-table/#/table/api)
## 支持作者
如果该开源软件对您有所帮助,可以扫下方二维码支持我们。☕
[👉 支持作者💰](https://xuliangzhan_admin.gitee.io/vxe-table/#/donation/api)
👉 [支持作者💰](https://xuliangzhan_admin.gitee.io/vxe-table/#/donation/api)
## License

View File

@@ -148,15 +148,15 @@ export default defineComponent({
## 檔案
[💡 使用指南](https://github.com/xuliangzhan/vxe-table-demo)
[👉 查看演示](https://xuliangzhan_admin.gitee.io/vxe-table/#/table/base/basic)
[👉 查看檔案](https://xuliangzhan_admin.gitee.io/vxe-table/#/table/api)
💡 [使用指南](https://github.com/xuliangzhan/vxe-table-demo)
👉 [查看演示](https://xuliangzhan_admin.gitee.io/vxe-table/#/table/base/basic) [備用地址](https://x-extends.github.io/vxe-table/#/table/base/basic)
👉 [查看檔案](https://xuliangzhan_admin.gitee.io/vxe-table/#/table/api) [備用地址](https://x-extends.github.io/vxe-table/#/table/api)
## 支持作者
如果該開源軟件對您有所幫助,可以掃下方二維碼支持我們。☕
[👉 支持作者💰](https://xuliangzhan_admin.gitee.io/vxe-table/#/donation/api)
👉 [支持作者💰](https://xuliangzhan_admin.gitee.io/vxe-table/#/donation/api)
## License

View File

@@ -41,14 +41,6 @@
<div class="page-container">
<div class="aside" :class="{visible: appData.showLeft}">
<div class="header">
<div class="sponsors" v-if="appData.sponsorList.length">
<h4>赞助商</h4>
<div v-for="(item, index) in appData.sponsorList" :key="index">
<a :href="item.url" :title="item.title" target="_blank">
<img :src="item.img" height="50" width="200">
</a>
</div>
</div>
<div class="version-list">
<template v-if="appData.stableVersionList.length">
<span class="title">{{ $t('app.body.label.stableVersion')}}</span>
@@ -62,6 +54,15 @@
<vxe-input clearable v-model="appData.filterName" type="search" class="search-input" :placeholder="$t('app.body.search.searchPlaceholder')" @keyup="searchEvent" @clear="searchEvent"></vxe-input>
</div>
<div class="body">
<div class="sponsors" v-if="appData.sponsorList.length">
<h4 class="title">赞助商</h4>
<div v-for="(item, index) in appData.sponsorList" :key="index">
<a :href="item.url" :title="item.title" target="_blank">
<img :src="item.img" :style="{width: item.width, height: item.height}">
</a>
</div>
</div>
<div class="docs">
<template v-if="appData.apiList.length">
<ul class="nav-menu">
<li v-for="(item, index) in appData.apiList" :key="index" :class="{expand: item.expand}">
@@ -83,6 +84,7 @@
</template>
</div>
</div>
</div>
<div class="oper-wrapper" v-show="showOperBtn">
<vxe-button class="oper-btn" :icon="appData.showLeft ? 'vxe-icon--arrow-left' : 'vxe-icon--arrow-right'" @click="appData.showLeft = !appData.showLeft"></vxe-button>
</div>
@@ -2314,16 +2316,6 @@ export default defineComponent({
const group = appData.apiList.find(item => item.value === pageKey.value)
if (group) {
group.expand = true
nextTick(() => {
const navElem: any = document.querySelector('.nav-link.router-link-active')
if (navElem) {
if (navElem.scrollIntoViewIfNeeded) {
navElem.scrollIntoViewIfNeeded()
} else if (navElem.scrollIntoView) {
navElem.scrollIntoView()
}
}
})
}
}

View File

@@ -218,9 +218,6 @@ body,
flex-shrink: 0;
text-align: center;
width: 300px;
.sponsors {
margin-bottom: 10px;
}
.version-list {
font-size: 12px;
margin-bottom: 10px;
@@ -247,6 +244,12 @@ body,
overflow-y: scroll;
overflow-x: hidden;
padding: 0 0 15px 20px;
.sponsors {
margin-bottom: 10px;
.title {
color: #4f5959;
}
}
}
.search-nodata {
text-align: center;
@@ -258,6 +261,11 @@ body,
font-size: 17px;
margin: 0;
padding: 0;
& > li {
& > .nav-link {
color: #111;
}
}
.nav-link {
display: block;
height: 40px;

View File

@@ -56,6 +56,7 @@ export default {
multiSort: 'Multi-field sort',
manualFilter: 'Filtering advanced usage',
filterIcon: 'Custom filter icon',
customFilter: '自定义列头筛选',
span: 'Rowspan and colspan',
spanRow: 'Merge the list of horizontal trees',
mergeCell: 'Merge cells',

View File

@@ -55,6 +55,7 @@ export default {
multiSort: '多字段组合排序',
manualFilter: '筛选高级用法',
filterIcon: '自定义筛选图标',
customFilter: '自定义列头筛选',
span: '合并行或列',
spanRow: '合并横向树列表',
mergeCell: '合并单元格',

View File

@@ -55,6 +55,7 @@ export default {
multiSort: '多字段组合排序',
manualFilter: '筛选高级用法',
filterIcon: '自定义筛选图标',
customFilter: '自定义列头筛选',
span: '合并行或列',
spanRow: '合并横向树列表',
mergeCell: '合并单元格',

View File

@@ -58,8 +58,12 @@ const languages = [
const styleCode = `require('./style.css')`
const commCode = `const VXETableExport = process.env.NODE_ENV === 'production' ? require('./index.common.pro.js') : require('./index.common.dev.js')
VXETableExport.VXETable = VXETableExport
const commCode = `const VXETable = process.env.NODE_ENV === 'production' ? require('./index.common.pro.js') : require('./index.common.dev.js')
const VXETableExport = {
default: VXETable,
VXETable: VXETable
}
Object.defineProperty(VXETableExport, '__esModule', { value: true })
module.exports = VXETableExport
`

View File

@@ -119,8 +119,9 @@ const editHook: VxeGlobalHooksHandles.HookOptions = {
$xetable.updateScrollYSpace()
}
return nextTick().then(() => {
$xetable.recalculate()
$xetable.updateCellAreas()
return $xetable.recalculate()
}).then(() => {
return {
row: newRecords.length ? newRecords[newRecords.length - 1] : null,
rows: newRecords
@@ -210,8 +211,9 @@ const editHook: VxeGlobalHooksHandles.HookOptions = {
$xetable.updateScrollYSpace()
}
return nextTick().then(() => {
$xetable.recalculate()
$xetable.updateCellAreas()
return $xetable.recalculate()
}).then(() => {
return { row: rest.length ? rest[rest.length - 1] : null, rows: rest }
})
},
@@ -285,9 +287,15 @@ const editHook: VxeGlobalHooksHandles.HookOptions = {
*/
getUpdateRecords () {
const { keepSource, treeConfig } = props
const { editStore } = reactData
const { tableFullData } = internalData
const treeOpts = computeTreeOpts.value
if (keepSource) {
const { actived } = editStore
const { row, column } = actived
if (row || column) {
this.clearActived()
}
if (treeConfig) {
return XEUtils.filterTree(tableFullData, row => $xetable.isUpdateByRow(row), treeOpts)
}

View File

@@ -1953,17 +1953,17 @@ export default defineComponent({
const isPawdType = computeIsPawdType.value
const isSearchType = computeIsSearchType.value
let icons
if (controls) {
if (isPawdType) {
icons = renderPasswordIcon()
} else if (isNumType) {
if (controls) {
icons = renderNumberIcon()
}
} else if (isDatePickerType) {
icons = renderDatePickerIcon()
} else if (isSearchType) {
icons = renderSearchIcon()
}
}
return icons ? h('span', {
class: 'vxe-input--extra-suffix'
}, [icons]) : null

View File

@@ -29,7 +29,7 @@
<a href="https://jsrun.net/K5IKp/edit" target="_blank">v4 jsrun</a>
</li>
<li>
<a href="https://codesandbox.io/s/vue-template-916h0" target="_blank">v4 codesandbox支持jsx</a>
<a href="https://codesandbox.io/s/vxe-table-wentiyanshi-forked-54v2j" target="_blank">v4 codesandbox支持jsx</a>
</li>
<li>
<a href="https://jsfiddle.net/n12cbkte/" target="_blank">v4 jsfiddle</a>
@@ -50,7 +50,7 @@
<a href="https://jsrun.net/pRLKp/edit" target="_blank">v3 jsrun集成 ant-design-vue</a>
</li>
<li>
<a href="https://codesandbox.io/s/vxe-table-wentiyanshi-forked-54v2j" target="_blank">v3 codesandbox支持jsx</a>
<a href="https://codesandbox.io/s/vue-template-916h0" target="_blank">v3 codesandbox支持jsx</a>
</li>
<li>
<a href="https://jsfiddle.net/njyxg0mf" target="_blank">v3 jsfiddle</a>

View File

@@ -66,7 +66,7 @@
padding-top: 0.2em;
}
.vxe-table--filter-body {
max-height: 240px;
max-height: 200px;
padding-bottom: 0.2em;
}
& > ul {