
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
el-plus-powerful-table-ts
Advanced tools
## [DOCS](https://peng-xiao-shuai.github.io/vite-vue-admin-docs/zh-CN/component/powerful-table-doc.html)
对于语言方面组件是默认使用 英语 因为 element-plus 默认是使用英语,不引用中文包的主要原因是避免增大体积。
组件内部语言跟随 element-plus。 部分 提示文字 语言,组件内部也支持 中、英 文,如果你需要支持更多语言或者更改组件内部
的语言,可以在 use(PowerfulTable, { local: 您的语言变量 }) 替换。也可以参考我们提供的 demo 实现。
此插件已 el-plus-powerful-table 作为基础,进行重构。部分功能将领先 el-plus-powerful-table 基础版本。
el-plus-powerful-table 的 ts 版本
vue3.0 的 element-plus 二次开发表格组件
packages/components/src 下的组件component-event 事件_TYPE 类型的 key 改为枚举header 时,props 下属性 data 属性在不使用 setData 函数时同样可以获得智能提示。已使用 setData 不受影响const header = [{
label: '性别',
props: {
type: 'text',
prop: 'gender',
data: { // 该类型会被推断为 (SetDataType<"input", Lists> & SetDataType<T, Lists>) | undefined
develop: true,
// 输入 l 时会提示 line 属性
},
}
}]
bugbugresetList、getListData 函数支持传递参数bugheader 配置项中 props 下属性 filters 的情况下,当前的相应的数据存在值的情况则不会被 filters 过滤const list = [{status: 0},{status: 1}]
const header = [{
label: '性别',
props: {
prop:'status',
filters: [
{
text: '男',
value: 1
},
{
text: '女',
value: 0
}
],
}
}]
// [修复]:第二条数据的 status 将不会进行过滤的情况
type = text 时 0 不会显示PowerfulTableHeaderProps 下 render 函数类型支持返回 JSX.Element"image" | "text" | "switch" | "video" | "input" | "iconfont" | "tag" | "rate" | "textarea" 类型中 data 属性下新增 on 可选属性PowerfulTableExpose 类型为只读PowerfulTableExpose 类型下添加 props、injectPropsPowerfulTableExpose 类型下 headerLists 类型 为 ComputedRef<PowerfulTableHeader<Row>[]> 但是实际类型为 PowerfulTableHeader<Row>[]。更改后类型为 PowerfulTableHeader<Row>[]list-request.responseKey 属性默认值 'data.data.result' 为 'data.result'list-request.listsKey 属性默认值 'lists' 为 'rows'BtnList 补充 click 属性type = 'btn' 时,添加 click 属性,需要注意的事,存在 click 属性时将不会触发 beforeClick 属性button 文件中的 class 由原来的 class={item.text ? '' : 'no-margin'} 改成空。emptyElementlistRequest,以及在 Props 属性上添加。PowerfulTableExposebugcomponent-event 自定义事件参数返回更改, 由原来的 { componentName: string, eventType: string } 改为
{ componentName: string, eventType: string, index: number, prop: PowerfulTableHeaderProps<any>[] | PowerfulTableHeaderProps<any>, row: any }bug@element-plus/icons 添加到 es 和 libbtnConfig.Config 以及 InjectProps 中 btnSlot 参数btn-left 以及 btn-right 插槽无效 bugbugtreeProps 为 undefined 问题tag 时,数据为 undefined 报错type = 'text' data 中的 customFilterFun 属性值更改为 formattingPowerfulTableHeaderProps 类型上新增属性 customFilter 自定义过滤element-plus 时引发组件不能使用 buginput 的 onClick 事件, 因为和 onFocus 重合rate 的 onClick 事件,因为 ElRate 上不存在 onClicklib | es 文件夹内 .d.ts 文件中引入的 typings 文件路径找不到btn-plus 文件重构(vue 改成 tsx)btnConfig 新增属性 btnRightList 类型为 BtnList[]BtnList 新增属性 tip beforeClick property删除 btn-plus 组件中 BtnConfig.BtnList 的 type icon showTip tipContent
删除 内部组件 data 部分属性(由于提供的属性不完整和 element-plus 存在差异,全部提供则感觉有点冗余,推荐使用 property 属性。内部组件只会保存部分默认值,但是可以通过 property 传参替换)
image 删除 lazy zIndex style fit 。保留部分默认值 fit = 'cover',lazy, preview-teleported = true(el-image 中 lazy preview-teleported 默认 false)input 删除 type placeholder disabled rows。保留部分默认值 rows = 3href 删除 type placeholder rows disabled。 保留部分默认值 type = 'primary',underline = falserate 删除 max colors iconClass allowHalf showText showScore texts property。 保留部分默认值 disabled = falseswitch 删除 activeColor inactiveColor inactiveText activeText activeValue inactiveValue disabled isConfirmTip confirmTip beforeFunction 保留部分默认值 inactiveValue = '0',activeValue = '1'tag 删除 closable type effect hit 保留部分默认值 type = ''video 删除 poster loop 保留部分默认值 controls = true,loop = falsebutton 删除 icon disabled type emit isTooltip isConfirmTip confirmTip 保留部分默认值 type = 'primary'。添加 beforeClick tipProperty 属性内部组件 property 支持函数类型
componentProps 属性更改为 property
type 类型为 video 新增 property 扩展属性
BtnConfig.BtnList 新增 property 扩展属性
内部组件新增自定义事件,详情看 type == 'XX'(XX 为某个类型), 内部组件传递到 powerful-table 组件由 component-event 抛出
type = 'text' data 中的 customFilterFun 属性值更改
修改 组件 InjectProps 类型中 local 的类型。注入的 local 属性现在主要是用于 替换或者扩展组件内部提示文字
优化 button 在表格中样式
修改 selectable 默认不允许勾选问题
header 表格头部数据属性中 filters 更改为 defaultFilter. hidden 更改为 defaultShow
props 单元格数据 filter 更改为 filters
删除 组件 props 中的 local
使用vite进行构建
es、cjs两种模式element-plus 版本更新到 2.0+
新增 props property
type 为 btn、image、input、rate、switch、tag 的 data 中新增 componentProp 扩展参数
href 类型更改为 link
link 的 data 中新增属性 iconlink 的 data 中 text 没有值时将显示 prop 数据在页面上input 类型新增 type 同 el-input type
修复 rate 类型中 locale 警告
优化 link 的 data 中 target 属性类型固定
修复 Failed to resolve component: PTBtnPlus 警告
PT开头:例如:PTImage,PTButtonpowerful-table-draggable 组件的引用switch、btn 类型新增属性isConfirmTip 是否开启点击时确认框提示isConfirmTip 确认框提示文字el-pagination small属性随组件或全局 size 属性更改btn-left btn-rightheader 新增属性isShowOrFilterColumn 是否开启过滤或者显示隐藏列的开关selectable 行是否可以选中prop 新增属性filtersType 过滤类型filterItem 指定过滤项bugprops 类型从数组 改为 数组或者对象均可emitisTooltip 是否显示提示params,isMore 属性。params 自定义传入数据,将会在点击按钮时返回。例如:{
{
;('update')
}
}
// index.vue
;<powerfulTable v-on:btnClick="handleOperate"></powerfulTable>
// row 当前行数据 params 自定义传入的数据 index 当前行的下标
const handleOperate = ({ row, params, index }) => ({})
isMore 用来判断是否将当前对象数据 显示为 更多按钮
{
;[
{
type: 'btn',
prop: 'btn',
data: [
{
tip: '编辑',
type: 'info',
icon: markRaw(Edit),
text: '编辑',
// showBtn: false,
// isTooltip: true,
params: {
emit: 'update',
},
},
[
{
tip: '更多',
isMore: true,
type: 'success',
icon: markRaw(Edit),
},
{
tip: '编辑',
type: 'text',
icon: markRaw(Edit),
params: 'update',
},
{
tip: '更多a',
isMore: true, // 这个将不会被引用到
type: 'success',
icon: markRaw(Edit),
},
{
tip: '删除',
type: 'text',
icon: markRaw(Delete),
params: 'remove',
},
],
{
tip: '删除',
type: 'danger',
icon: markRaw(Delete),
showBtn: (e: any) => {
return true
},
params: {
emit: 'remove',
},
},
],
},
]
}
child 字段locale 和 sizeFAQs
## [DOCS](https://peng-xiao-shuai.github.io/vite-vue-admin-docs/zh-CN/component/powerful-table-doc.html)
The npm package el-plus-powerful-table-ts receives a total of 37 weekly downloads. As such, el-plus-powerful-table-ts popularity was classified as not popular.
We found that el-plus-powerful-table-ts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.