x-extends / vxe-table-plugin-element Goto Github PK
View Code? Open in Web Editor NEW🌲 基于 vxe-table 表格的适配插件,用于兼容 element-ui、element-plus 组件库
License: MIT License
🌲 基于 vxe-table 表格的适配插件,用于兼容 element-ui、element-plus 组件库
License: MIT License
ElSelect option的value如果是数字的话,筛选按钮不能点击
https://codesandbox.io/s/vxe-table-ceshide-demo-pt4wg?file=/src/views/Demo1.vue
option.value为数字时的效果
option.value为字符串时的效果
option.value为数字时的筛选按钮也能正常使用
https://github.com/x-extends/vxe-table-plugin-element/blob/master/index.ts
vxe-table-plugin-element/index.ts:694:41 - error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.
vue-tsc通过
10
版本 104.0.1293.70 (正式版本) (64 位)
3.2.37
4.3.2
说明
点击时间选择器下拉中的时或分、下拉面板会消失、时间没有正确被设置
希望和vxe-table有cdn引入方式使用。不然我这项目用不了这个兼容性插件。哭死😭
No response
No response
I don't know what is the problem but I can't use the cell demo that you provided on the readme.
import Vue from 'vue'
import 'xe-utils'
import VXETable from 'vxe-table'
import 'vxe-table/lib/index.css'
import VXETablePluginElement from 'vxe-table-plugin-element'
import 'vxe-table-plugin-element/dist/style.css'
import VueI18n from 'vue-i18n'
import enUS from 'vxe-table/lib/locale/lang/en-US'
Vue.use(VueI18n)
const messages = {
en_US: {
...enUS
}
}
const i18n = new VueI18n({
locale: 'en_US',
messages
})
Vue.use(VXETable, {
i18n: key => i18n.t(key)
})
VXETable.use(VXETablePluginElement)
Could you please help me? I need to add a multiple select to my modal form and because of that I wanna add element-ui for using that.
请问一下在grid的formConfig里使用这个插件之后 搜索不会联动了是该如何解决的
替代了样式生效了,但是点击查询按钮没任何反应
{ span: 24, align: 'center', collapseNode: true, itemRender: { name: 'ElButtons', children: [{ props: { type: 'submit', content: '查询', status: 'primary'} }, { props: { type: 'reset', content: '重置' } }] } }
No response
No response
ElSwitch 短时间点击两次以上次点击后显示不更新,只有触发另外的点击后才会更新显示,谢谢!
function renderOptions(h, options, optionProps) {
var labelProp = optionProps.label || 'label';
var valueProp = optionProps.value || 'value';
++var disabledProp = optionProps.disabled || 'disabled';
return _xeUtils["default"].map(options, function (item, index) {
return h('el-option', {
props: {
value: item[valueProp],
label: item[labelProp],
++disabled:item[disabledProp]
},
key: index
});
});
}
在编辑表格时,不同的行,允许选择的值可能不同,通过disabled禁用不允许的值
可以兼容ElPopover吗
No response
No response
这个新特性和一个问题相关吗?简单描述下,比如我什么场景下,需要解决什么问题,发现表格不支持这个功能 Is your feature request related to a problem? Please describe.
描述下,你希望得到的什么解决方案 Describe the solution you'd like
是否有不错的替代方案 Describe alternatives you've considered
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch [email protected]
for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/vxe-table-plugin-element/index.ts b/node_modules/vxe-table-plugin-element/index.ts
index d59d00f..ff8ba8c 100644
--- a/node_modules/vxe-table-plugin-element/index.ts
+++ b/node_modules/vxe-table-plugin-element/index.ts
@@ -331,7 +331,7 @@ function getFormItemProps ({ $form }: any, { props }: any, defaultProps?: any) {
}
function getFormEvents (renderOpts: any, params: any) {
- let { events }: any = renderOpts
+ let { name, events }: any = renderOpts
let { $form }: any = params
let type: string = 'change'
switch (name) {
@@ -737,8 +737,11 @@ function handleClearEvent (params: any, evnt: any, context:any) {
export const VXETablePluginElement = {
install (xtable: typeof VXETable) {
let { interceptor, renderer } = xtable
+ // @ts-ignore
renderer.mixin(renderMap)
+ // @ts-ignore
interceptor.add('event.clearFilter', handleClearEvent)
+ // @ts-ignore
interceptor.add('event.clearActived', handleClearEvent)
}
}
This issue body was partially generated by patch-package.
ElSelect 动态修改editRender.options无效,第二次修改才会渲染上一次的数据。
项目中会因业务需求对某些组件进行二次封装,比如说对于 el-input 组件二次封装,能否使该组件能够作为 filterRender 进行配置渲染,filterRender: { name: 'SelfDefineComp', props: { some properties } }
可能不同的行, 需要的option是不同的,比如 table 中的 colA, colB 两列,colB 是select 要根据colA 的值 出现不同的 option
No response
No response
`This dependency was not found:
To install it, you can run: npm install --save xe-utils/methods/xe-utils`
https://stackblitz.com/edit/vue-uqqq6g
日期格式渲染正确
macos
chrome117
3.3.4
4.5.12
这个下拉项时异步向后端请求的,已经取到并存入data的selectArr中,也在options中配置了this.selectArr,但下拉选框无数据。
(必填)这个需求解决了什么问题:
请问支持vxe grid功能吗?需要后端传送有哪些列,请问有相关的demo吗?
这个新特性和一个问题相关吗?简单描述下,比如我什么场景下,需要解决什么问题,发现表格不支持这个功能 Is your feature request related to a problem? Please describe.
year/month/date/dates/ week/datetime/datetimerange/ daterange/monthrange
就差monthrange了
描述下,你希望得到的什么解决方案 Describe the solution you'd like
是否有不错的替代方案 Describe alternatives you've considered
vue 2.6
+ element-ui 2.15.6
应该使用哪个版本?
导入 vxe-table
时 正常运行, 导入 vxe-table-plugin-element
后报错
// src/plugins/vxe-table.js
import Vue from 'vue'
import 'xe-utils'
import VXETable from 'vxe-table'
import VXETablePluginElement from 'vxe-table-plugin-element'
import 'vxe-table-plugin-element/dist/style.css'
// 使用 VXETable
Vue.use(VXETable)
// 使用 VXETablePluginElement
Vue.use(VXETablePluginElement)
我应该下载哪个版本的 vxe-table-plugin-element
,翻阅文档后,暂未找到相关说明,谢谢
由于使用的VUE工程是老项目,前后端未分离的那种,不知道能不能在index上引入的方式使用?
// ...
import VXETable from 'vxe-table'
import VXETablePluginElement from 'vxe-table-plugin-element'
import 'vxe-table-plugin-element/dist/style.css'
// ...
VXETable.use(VXETablePluginElement)
我在main.ts使用了此方法, 但是没有标签并没有渲染处理,是不是好些了什么?
No response
No response
目前主版本已经升级到vue3了,整个vxe-table在vue3中的表现依然完美,但随着第三方组件的升级,目前此插件的版本是稍微略低的,例如,Element-UI-Plus已经发布了,不仅改版为了Vue3的写法,同时添加了多个组件,例如 ElTreeSelect等,希望能够得到更多的支持,谢谢
希望依然能够开箱即用
无
(必填)这个需求解决了什么问题:
请问支持vxe grid功能吗?需要后端传送有哪些列,请问有相关的demo吗?
截图或在线链接:
?
建议的 API 是什么样的:
?
是否已有其他不错的替代方案:
https://xuliangzhan_admin.gitee.io/vxe-table/v3/#/table/plugin/elementConfig
找到了
报错信息如下:
nuxt:typescript 07:08:01e/trunk/9.src/vue-template/node_modules/vxe-table-plugin-element/index.ts(11,3):
11:3 Module '"../vxe-table/lib/vxe-table"' has no exported member 'ColumnFilterParams'. Did you mean to use 'import ColumnFilterParams from "../vxe-table/lib/vxe-table"' instead?
9 | InterceptorParams,
10 | TableRenderParams,
> 11 | ColumnFilterParams,
| ^
12 | ColumnFilterRenderOptions,
13 | ColumnCellRenderOptions,
14 | ColumnEditRenderOptions,
应该是ColumnFilterParams没定义的原因?
1
组件在里面失效
喜欢能够兼容element el-radio和el-radio-group组件
win11
chrome
3.4.0
4.5.22
`This dependency was not found:
To install it, you can run: npm install --save xe-utils/methods/xe-utils`
are there any posibilities to add ElUpload editable row?
无
有的项目本身没有安装dayjs,而vxe-table-plugin-element依赖与dayjs,就提示找不到,建议把dayjs作为dependencies依赖项。
把dayjs放到dependencies中
win11
chrome116
2.6.0
3.7.0-beta.20
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.