Skip to content

Commit

Permalink
chore(docs,crud-table): @0.3.2 修改README文档,新增dialogWidth,epmtyText属性,修…
Browse files Browse the repository at this point in the history
…复已知Bug
  • Loading branch information
BoBoooooo committed Nov 27, 2020
1 parent 0748286 commit 7dcc25a
Show file tree
Hide file tree
Showing 7 changed files with 147 additions and 20 deletions.
109 changes: 109 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
## 0.3.2 (2020-11-27)

### 🌟 新功能
范围|描述|commitId
--|--|--
- | [@0](https://github.com/0).2.4,修复表单设计器getData 多选情况下bug | [a8ec788](https://github.com/BoBoooooo/Element-Pro-Crud/commit/a8ec788)
- | 文本组件新增对齐方式/字体大小配置项 | [78388ac](https://github.com/BoBoooooo/Element-Pro-Crud/commit/78388ac)
FormDesign | 初步提交一版表单设计器 | [0161f67](https://github.com/BoBoooooo/Element-Pro-Crud/commit/0161f67)
FormDesigner | 级联选择器新增支持配置父子级联关系,version update to 0.2.2 | [40cd7d1](https://github.com/BoBoooooo/Element-Pro-Crud/commit/40cd7d1)
index | fix eslint bug | [a09ae6b](https://github.com/BoBoooooo/Element-Pro-Crud/commit/a09ae6b)


### 🎨 代码样式
范围|描述|commitId
--|--|--
- | 目录调整 | [05b3cca](https://github.com/BoBoooooo/Element-Pro-Crud/commit/05b3cca)
- | 修改文件注释 | [915255a](https://github.com/BoBoooooo/Element-Pro-Crud/commit/915255a)
- | code style perf | [6c45fa1](https://github.com/BoBoooooo/Element-Pro-Crud/commit/6c45fa1)
- | code style perf | [8f285dd](https://github.com/BoBoooooo/Element-Pro-Crud/commit/8f285dd)
- | code style perf | [06051ef](https://github.com/BoBoooooo/Element-Pro-Crud/commit/06051ef)
- | lint fix | [8422cc5](https://github.com/BoBoooooo/Element-Pro-Crud/commit/8422cc5)


### 🏠 构建系统
范围|描述|commitId
--|--|--
deps | bump http-proxy from 1.18.0 to 1.18.1 | [20151ba](https://github.com/BoBoooooo/Element-Pro-Crud/commit/20151ba)


### 🐛 Bug 修复
范围|描述|commitId
--|--|--
- | 修复查询时间清空bug,版本升级至0.2.6 | [8bba911](https://github.com/BoBoooooo/Element-Pro-Crud/commit/8bba911)
- | 修复component name bug,版本升级至0.3.0 | [e6b5ef2](https://github.com/BoBoooooo/Element-Pro-Crud/commit/e6b5ef2)
- | 修复core-js版本Bug | [3e1f919](https://github.com/BoBoooooo/Element-Pro-Crud/commit/3e1f919)
- | 修复name漏写bug | [776a683](https://github.com/BoBoooooo/Element-Pro-Crud/commit/776a683)
- | 修复vue-class-component组件导出name属性为undefined bug | [570e6db](https://github.com/BoBoooooo/Element-Pro-Crud/commit/570e6db)
- | fix icons url bug | [46cd289](https://github.com/BoBoooooo/Element-Pro-Crud/commit/46cd289)
- | update version to 0.2.1 , fix bug | [03451a6](https://github.com/BoBoooooo/Element-Pro-Crud/commit/03451a6)
- | version update to 0.0.1-2, fix bug | [e51fae1](https://github.com/BoBoooooo/Element-Pro-Crud/commit/e51fae1)


### 📝 文档
范围|描述|commitId
--|--|--
- | update docs | [aaaa01a](https://github.com/BoBoooooo/Element-Pro-Crud/commit/aaaa01a)
- | update docs | [5e60d42](https://github.com/BoBoooooo/Element-Pro-Crud/commit/5e60d42)
- | update README | [20a1f7c](https://github.com/BoBoooooo/Element-Pro-Crud/commit/20a1f7c)


### 📦 持续集成
范围|描述|commitId
--|--|--
- | 修改eslint rule | [03fe86b](https://github.com/BoBoooooo/Element-Pro-Crud/commit/03fe86b)
- | add keywords | [cbb3488](https://github.com/BoBoooooo/Element-Pro-Crud/commit/cbb3488)
- | update version to 0.1.0-1 | [e5cf3c1](https://github.com/BoBoooooo/Element-Pro-Crud/commit/e5cf3c1)
- | update version to 0.1.0-1 | [070beed](https://github.com/BoBoooooo/Element-Pro-Crud/commit/070beed)


### 🔨 代码重构
范围|描述|commitId
--|--|--
- | 调整目录结构,加入types声明文件 | [ab896f3](https://github.com/BoBoooooo/Element-Pro-Crud/commit/ab896f3)
- | refactor some details | [742f6a6](https://github.com/BoBoooooo/Element-Pro-Crud/commit/742f6a6)


### 🚀 性能优化
范围|描述|commitId
--|--|--
- | [@0](https://github.com/0).2.3 优化表单设计器组件交互性能 | [7651aa8](https://github.com/BoBoooooo/Element-Pro-Crud/commit/7651aa8)
- | 版本升级至[@0](https://github.com/0).2.9 | [9c6659d](https://github.com/BoBoooooo/Element-Pro-Crud/commit/9c6659d)
- | 补充eslint依赖 | [1523e3a](https://github.com/BoBoooooo/Element-Pro-Crud/commit/1523e3a)
- | 采用v-bind $attrs v-on $listeners 处理多级props下发问题 | [cc10d54](https://github.com/BoBoooooo/Element-Pro-Crud/commit/cc10d54)
- | 更改插件名称为: multifunction-crud | [8fe3018](https://github.com/BoBoooooo/Element-Pro-Crud/commit/8fe3018)
- | 同步本地最新代码 | [8f51560](https://github.com/BoBoooooo/Element-Pro-Crud/commit/8f51560)
- | 完善readme文档,优化lint文档 | [992d0c9](https://github.com/BoBoooooo/Element-Pro-Crud/commit/992d0c9)
- | 修改高级查询表单宽度,避免横向滚动 | [40d8dbe](https://github.com/BoBoooooo/Element-Pro-Crud/commit/40d8dbe)
- | 移除element-ui css 引入 | [766b0b5](https://github.com/BoBoooooo/Element-Pro-Crud/commit/766b0b5)
- | 优化本地调试,支持直接进入umd.js | [99af656](https://github.com/BoBoooooo/Element-Pro-Crud/commit/99af656)
- | 组件销毁时解绑eventBus | [2daa028](https://github.com/BoBoooooo/Element-Pro-Crud/commit/2daa028)
- | code perf | [436a18d](https://github.com/BoBoooooo/Element-Pro-Crud/commit/436a18d)
- | lodash按需引入 | [94f00e3](https://github.com/BoBoooooo/Element-Pro-Crud/commit/94f00e3)
- | some change | [8d2fe54](https://github.com/BoBoooooo/Element-Pro-Crud/commit/8d2fe54)
- | some perf | [2b5cdeb](https://github.com/BoBoooooo/Element-Pro-Crud/commit/2b5cdeb)
- | update package.json | [90d7463](https://github.com/BoBoooooo/Element-Pro-Crud/commit/90d7463)
- | update version code | [0597d8c](https://github.com/BoBoooooo/Element-Pro-Crud/commit/0597d8c)
- | update version to 0.1.1 | [eb43c9f](https://github.com/BoBoooooo/Element-Pro-Crud/commit/eb43c9f)
- | update version to 0.2.0 | [336300a](https://github.com/BoBoooooo/Element-Pro-Crud/commit/336300a)
- | update vue-expand.d.ts | [411cc10](https://github.com/BoBoooooo/Element-Pro-Crud/commit/411cc10)
- | version update to 0.2.5 | [211ab70](https://github.com/BoBoooooo/Element-Pro-Crud/commit/211ab70)


### chore
范围|描述|commitId
--|--|--
- | 由于是umd打包发布,依赖全部并入devDependencies | [cf2ece3](https://github.com/BoBoooooo/Element-Pro-Crud/commit/cf2ece3)
- | version update to 0.3.1 | [0748286](https://github.com/BoBoooooo/Element-Pro-Crud/commit/0748286)


范围|描述|commitId
--|--|--
- | 0.1.6 | [44bae78](https://github.com/BoBoooooo/Element-Pro-Crud/commit/44bae78)
- | 0.1.5 | [3b98e14](https://github.com/BoBoooooo/Element-Pro-Crud/commit/3b98e14)
- | 0.1.4 | [de2b378](https://github.com/BoBoooooo/Element-Pro-Crud/commit/de2b378)
- | 0.1.3 | [fb3b5f9](https://github.com/BoBoooooo/Element-Pro-Crud/commit/fb3b5f9)
- | Create .npmrc | [3ecfee9](https://github.com/BoBoooooo/Element-Pro-Crud/commit/3ecfee9)
- | Update README.md | [c69ba5b](https://github.com/BoBoooooo/Element-Pro-Crud/commit/c69ba5b)
- | [feat](bobo-npm-plugin-test): 初始化项目,结合bobo-npm-plugin-test发布 | [c003a89](https://github.com/BoBoooooo/Element-Pro-Crud/commit/c003a89)

14 changes: 3 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,18 +139,17 @@ npm i element-pro-crud -S

| 参数 | 说明 | 类型 | 可选值 | 默认值 |
| :--------------------: | :---------------------------------------------------------------: | :-------------: | :-------------------------------------: | :-------: |
| expandRowKeys | 展开行 | Array | - | - |
| `el-table props` | el-table原生属性见文档 | https://element.eleme.cn/#/zh-CN/component/table |
| listField | response 中数据位置 | String | data/data.list | data.list |
| setReadOnly | GenerateFormDialog 中的表单禁用.null 表示均可编辑;{}表示全部只读; | Object | null/{}/{whiteList:{},blackList:{}} | null | |
| isMultiple | 是否开启多选 | Boolean | true,false | false |
| emptyText | 列表数据为空时显示文字 | String | - | 暂无数据 |
| prefill | 表单预填项(赋值初始值) | Object | - | null |
| appendToBody | 表单对话框是否插入至 body 元素上 | Boolean | true/false | false |
| dialogAppendToBody | 表单对话框是否插入至 body 元素上 | Boolean | true/false | false |
| tableName | 表名 | String | - | '' |
| tableDesignerName | 用于请求表格设计 json 的 name,不传则默认读取 tableName | String | - | null |
| dialogFormDesignerName | 对话框内加载 FormDesigner 的表名,,不传则默认读取 tableName | String | - | null |
| orderCondition | 排序条件 | String | - | null |
| columns | 自定义列配置项,会和 tableDesignerName 请求到的配置项合并 | Array | - | [] |
| visibleList | 内部元素显示控制(详情见下方) | Object | - | {} |
| tableTitle | 表格标题 | String | - | '' |
| tableParams | 表格请求参数(带查询参数请求) | Object,Array | - | {} |
Expand All @@ -166,23 +165,16 @@ npm i element-pro-crud -S
| btnDetailVisibleFunc | 表格行中的查看按钮是否显示事件 | Function | Function(row) | - |
| showPagination | 自定义列表 config 请求 | Boolean | true/false | true |
| remoteFuncs | 远程数据方法(用于表单内远端数据请求) | Object | - | {} |
| allResponse | 直接传入表头和表体,表格不用再发起任何请求 | Object | - | null |
| rowClassName | 行的 className 的回调方法 | String,Function | 见官网 | null |
| pageSize | 动态传入分页 | Array | - | [10,50,100] |
| maxHeightMinus | 表格自适应高度需要减去的高度值 | Number | - | 285 |
| fullHeight | 是否自适应屏幕高度(配置MaxHeightMinus) | Boolean | - | false |
| selectableFunc | 选择框动态判断是否显示 | Function | - | null |
| dialogFullscreen | 表单是否全屏 | Boolean | - | false |
| dialogCloseOnClickModal | 表单点击阴影是否可以关闭 | Boolean | - | false |
| showColumnIndex | 是否显示序号列 | Boolean | - | false |
| showOperator | 查询区域是否显示查询条件(默认不显示,查询条件为like) | Boolean | - | false |
| border | 是否有边框 | Boolean | - | true |
| formTableConfig | 表单中表格的tableConfig | Object | - | 详情看GenerateFormItem中解释 |
| formValuesAsync | 异步更新表单数据 | Object | - | 外层异步传入数据更新表单,注意不能直接修改formValues |
| editInlineMode | 是否开启行内编辑模式 | Boolean | - | false |
| actionColumnWidth | 操作列宽度(有时需要直接指定列宽) | Number | - | null |
| stripe | 斑马纹 | Boolean | - | false |
| border | 是否有边框 | Boolean | - | true |
| paginationLayout | 分页显示 | String | 见官网 | total, prev, pager, next, jumper, sizes |

#### Props 补充说明
Expand Down Expand Up @@ -224,11 +216,11 @@ npm i element-pro-crud -S

| 事件名称 | 说明 | 回调参数 |
| :-------: | :--------------------------: | :------------------------------------------------: |
| `el-table events` | el-table原生事件见文档 | https://element.eleme.cn/#/zh-CN/component/table |
| done | 表格数据请求完成 | 整个 CrudTable 组件对象 |
| selection-change | 多选事件 | 选中的行 (params: Array) |
| form-change | 监听 dialog 中 form 对象改变 | 返回当前表单对象以及当前表单 json (params: Object) |
| form-btn-on-click | 表单内按钮组件点击回调 | widget(表单组件json) |
| `el-table events` | 所有el-table其他事件见官网文档 | https://element.eleme.cn/#/zh-CN/component/table |


#### Slots
Expand Down
3 changes: 3 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['./node_modules/vue-cli-plugin-commitlint/lib/lint'],
};
18 changes: 15 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "element-pro-crud",
"version": "0.3.1",
"version": "0.3.2",
"main": "lib/ProCrud.umd.min.js",
"files": [
"lib",
Expand Down Expand Up @@ -35,7 +35,9 @@
"fix": "eslint --ext .ts,.vue packages --fix",
"report": "cross-env IS_REPORT=true vue-cli-service build",
"lib": "vue-cli-service build --target lib --name ProCrud --dest lib src/index.ts",
"deploy": "npm run lib && npm publish"
"deploy": "npm run lib && npm publish",
"log": "conventional-changelog --config ./node_modules/vue-cli-plugin-commitlint/lib/log -i CHANGELOG.md -s -r 0",
"cz": "npm run log && git add . && git cz"
},
"devDependencies": {
"@babel/plugin-transform-modules-umd": "^7.12.1",
Expand All @@ -53,6 +55,7 @@
"babel-eslint": "^10.0.2",
"babel-plugin-component": "^1.1.1",
"chai": "^4.2.0",
"conventional-changelog-cli": "^2.1.0",
"core-js": "2.6.5",
"cross-env": "^7.0.2",
"dayjs": "1.8.20",
Expand All @@ -65,9 +68,11 @@
"inquirer": "^6.5.2",
"lint-staged": "^9.2.0",
"lodash": "^4.17.14",
"longest": "^2.0.1",
"node-sass": "^4.12.0",
"path": "^0.12.7",
"pinyin-match": "^1.0.9",
"right-pad": "^1.0.1",
"sass-loader": "^7.1.0",
"svg-sprite-loader": "^4.1.6",
"svgo-loader": "2.2.1",
Expand All @@ -76,6 +81,7 @@
"vue-awesome": "^3.5.4",
"vue-class-component": "^7.2.3",
"vue-cli-plugin-axios": "0.0.4",
"vue-cli-plugin-commitlint": "^1.0.12",
"vue-property-decorator": "^8.5.0",
"vue-template-compiler": "2.6.11",
"vuedraggable": "^2.23.2",
Expand All @@ -84,7 +90,8 @@
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
"pre-commit": "lint-staged",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"lint-staged": {
Expand All @@ -94,6 +101,11 @@
"git add"
]
},
"config": {
"commitizen": {
"path": "./node_modules/vue-cli-plugin-commitlint/lib/cz"
}
},
"postcss": {
"plugins": {
"autoprefixer": {}
Expand Down
15 changes: 14 additions & 1 deletion packages/crud-table/src/CrudTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<template slot='empty'>
<SvgIcon icon-class='table_empty'
class="empty_icon"></SvgIcon>
<span>暂无数据</span>
<span>{{this.emptyText}}</span>
</template>
<el-table-column v-if="isMultiple || view.btnDel"
type="selection"
Expand Down Expand Up @@ -184,6 +184,7 @@
:dialogFormDesignerName="dialogFormDesignerName"
:tableParams="tableParams"
@afterSave="tableReload"
:textMap="text"
@change="formChange"
:formValuesAsync="formValuesAsync"
:formTableConfig="formTableConfig"
Expand All @@ -193,6 +194,7 @@
:append-to-body="dialogAppendToBody"
:close_on_click_modal="dialogCloseOnClickModal"
:fullscreen="dialogFullscreen"
:width='dialogWidth'
@btnonclick="formBtnOnClick">
<template #dialogFooter>
<slot name="dialogFooter"></slot>
Expand Down Expand Up @@ -288,6 +290,9 @@ export default class CrudTable extends Vue {
// 弹出表单appendToBody
@Prop({ default: false, type: Boolean }) dialogAppendToBody!: boolean;

// 弹出表单width
@Prop({ default: '1000px', type: String }) dialogWidth!: string;

// 用于请求表格设计json的name
@Prop({
type: String,
Expand Down Expand Up @@ -442,6 +447,14 @@ export default class CrudTable extends Vue {
// 是否懒加载
@Prop(Boolean) lazy!: boolean;

// empty-text
@Prop({
type: String,
default: '暂无数据',
})
emptyText!: string;


// 分页
get pagination() {
return {
Expand Down
6 changes: 2 additions & 4 deletions packages/form-designer/src/GenerateFormItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,9 @@
:disabled="widget.options.disabled">
<el-radio :style="{display: widget.options.inline ? 'inline-block' : 'block'}"
:label="item.value"
v-for="(item, index) in (widget.options.remote
? widget.options.remoteOptions : widget.options.options)"
v-for="(item, index) in optionsList"
:key="index">
<template v-if="widget.options.remote">{{item.label}}</template>
<template v-else>{{widget.options.showLabel ? item.label : item.value}}</template>
<template v-if="widget.options.showLabel">{{ item.label }}</template>
</el-radio>
</el-radio-group>
</template>
Expand Down
2 changes: 1 addition & 1 deletion packages/form-designer/src/WidgetConfig.vue
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
v-bind="getDraggableOptions()">
<li v-for="(item, index) in data.options.options"
:key="index">
<el-radio :value="item.value"
<el-radio :label="item.value"
style="margin-right: 5px;">
<el-input :style="{'width': data.options.showLabel? '90px': '190px' }"
size="mini"
Expand Down

0 comments on commit 7dcc25a

Please sign in to comment.