Skip to content

Commit

Permalink
voltable自定义排序参数及组件文档。。。
Browse files Browse the repository at this point in the history
  • Loading branch information
jxx committed Dec 13, 2019
1 parent 94aaa2a commit 1e978f5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
8 changes: 4 additions & 4 deletions Vol.Vue/src/components/basic/VolTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
:min-width="column.width"
:formatter="formatter"
:fixed="column.fixed"
:sortable="cindex==0?'custom':false"
:sortable="column.sort||cindex==0?'custom':false"
>
<template slot-scope="scope">
<!-- 启用双击编辑功能,带编辑功能的不会渲染下拉框文本背景颜色 -->
Expand Down Expand Up @@ -583,7 +583,7 @@ export default {
this.columns.forEach(x => {
if (x.edit && x.edit.type == "switch") {
if (!row.hasOwnProperty(x.field)) {
row[x.field] = 0;
row[x.field] = x.type == "bool" ? false : 0;
}
}
});
Expand All @@ -594,8 +594,8 @@ export default {
this.rowData.push(row);
},
viewImg(row, column) {
this.base.priviewImg(row[column.field],this.http.ipAddress);
// window.open(row[column.field]);
this.base.priviewImg(row[column.field], this.http.ipAddress);
// window.open(row[column.field]);
},
link(row, column) {
this.$props.linkView(row, column);
Expand Down
8 changes: 5 additions & 3 deletions Vol.Vue/src/views/document/docApi/doc_tableOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let editTable = {
BindKeyValue: "1",
Enable: 1,
ReallyName: "七秒的记忆",
filetest:"https://imgs-1256993465.cos.ap-chengdu.myqcloud.com/github/wordtest.docx",//也是设置为api服务器的文件,地址如:static/20191206/xx.xlsx
filetest: "https://imgs-1256993465.cos.ap-chengdu.myqcloud.com/github/wordtest.docx",//也是设置为api服务器的文件,地址如:static/20191206/xx.xlsx
CreateDate: "2018-09-18 17:45:54"
},
{
Expand All @@ -28,7 +28,7 @@ let editTable = {
Enable: 0,
ReallyName: "月穿潭底水無痕",
CreateDate: "2018-09-18 17:45:54",
filetest:"https://imgs-1256993465.cos.ap-chengdu.myqcloud.com/github/wordtest.docx,https://imgs-1256993465.cos.ap-chengdu.myqcloud.com/github/exceltest.xlsx" //也是设置为api服务器的文件,地址如:static/20191206/xx.xlsx
filetest: "https://imgs-1256993465.cos.ap-chengdu.myqcloud.com/github/wordtest.docx,https://imgs-1256993465.cos.ap-chengdu.myqcloud.com/github/exceltest.xlsx" //也是设置为api服务器的文件,地址如:static/20191206/xx.xlsx
}
],
columns: [
Expand Down Expand Up @@ -65,7 +65,7 @@ let editTable = {
field: "filetest",
title: "点击文件下载",
width: 190,
type:'file'//指定为file与excel即可下载文件
type: 'file'//指定为file与excel即可下载文件
},
{
field: "LimitNumber",
Expand Down Expand Up @@ -152,11 +152,13 @@ let remoteColumns = [
{
field: "UserName",
title: "申请人帐号",
sort: true,
link: true, //设置link=true后此单元格可以点击获取当前行的数据进行其他操作
width: 120
},
{
field: "UserTrueName",
sort: true,
title: "申请人",
width: 120
},
Expand Down
7 changes: 4 additions & 3 deletions Vol.Vue/src/views/document/docApi/param.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ let param = {
{ name: "field", desc: "字段", type: "string", default: "" },
{ name: "title", desc: "table列名", type: "string", default: "" },
{ name: "width", desc: "列宽度", type: "number", default: "" },
{ name: "sortable", desc: "是否排序,目前只对第一列生效", type: "bool", default: "false" },
{ name: "sort", desc: "是否排序列", type: "bool", default: "false" },
{ name: "hidden", desc: "是否隐藏列", type: "bool", default: "false" },
{ name: "fixed", desc: "是否固定列", type: "bool", default: "false" },
{ name: "type", desc: "目前只有img,其他不需要设置", type: "string", default: "" },
{ name: "type", desc: "目前只有img,file(设置了此属性,点击即可下载文件),其他不需要设置", type: "string", default: "" },
{ name: "required", desc: "是否必填项(设置edit了属性才会生效)", type: "bool", default: "false" },
{ name: "edit{", desc: "表格编辑配置", type: "json", default: "" },
{ name: "type", desc: "编辑创建的标签类型:number、decimal、text、datetime、date、switch、select", type: "", default: "" },
Expand Down Expand Up @@ -199,7 +199,8 @@ let param = {
</div>
<p>&nbsp;</p>`, type: "json", default: "" },
],
methods: [{ name: "refresh", desc: "刷新查询界面的表数据", param: "" },
methods: [{ name: "refresh", desc: "刷新查询界面的表数据,使用:this.refresh()", param: "" },
{ name: "getSelectRows", desc: "查询界面获取选中的行,使用:this.getSelectRows()", param: "" },
{ name: "扩展js方法使用", desc: "扩展js为当前数据库表生成页面扩展js,如:SellOrder.js,文件由代码生成,可自行在js中实现下面列出的方法", param: "" },
{ name: "扩展js方法使用", desc: `<div class="cnblogs_code">
<pre>let extension =<span style="color: #000000;"> {
Expand Down

0 comments on commit 1e978f5

Please sign in to comment.