【修改】STable replace JTable

This commit is contained in:
zer0Black
2021-03-25 17:41:16 +08:00
parent 982310046a
commit bcb0016168
13 changed files with 32 additions and 849 deletions
+205
View File
@@ -0,0 +1,205 @@
<template>
<a-card :bordered="false">
<j-table
:isShowPage="isShowPage"
:isCheck="isCheck"
:isShowDropdown="isShowDropdown"
:dataSource="dataSource"
:columns="columns"
bordered
>
</j-table>
</a-card>
</template>
<script>
import JTable from '@/components/jero/JTable'
export default {
name: 'Jtable',
components: {
JTable,
},
data() {
return {
isShowPage: true, // 是否显示分页
isCheck: false, // 是否多选
isShowDropdown: true, //是否开启下拉功能
dataSource: [
{
key: '1',
name: '胡彦斌1',
age: 35,
address: '西湖区湖底公园1号',
address1: '西湖区湖底公园1号',
address2: '西湖区湖底公园1号',
address3: '西湖区湖底公园1号',
address4: '西湖区湖底公园1号',
address5: '西湖区湖底公园1号',
},
{
key: '2',
name: '胡彦斌2',
age: 32,
address: '西湖区湖底公园3号',
address1: '西湖区湖底公园1号',
address2: '西湖区湖底公园1号',
address3: '西湖区湖底公园1号',
address4: '西湖区湖底公园1号',
address5: '西湖区湖底公园1号',
},
{
key: '3',
name: '胡彦斌3',
age: 32,
address: '西湖区湖底公园5号',
address1: '西湖区湖底公园1号',
address2: '西湖区湖底公园1号',
address3: '西湖区湖底公园1号',
address4: '西湖区湖底公园1号',
address5: '西湖区湖底公园1号',
},
{
key: '4',
name: '胡彦斌4',
age: 32,
address: '西湖区湖底公园7号',
address1: '西湖区湖底公园1号',
address2: '西湖区湖底公园1号',
address3: '西湖区湖底公园1号',
address4: '西湖区湖底公园1号',
address5: '西湖区湖底公园1号',
},
{
key: '5',
name: '胡彦斌5',
age: 38,
address: '西湖区湖底公园9号',
address1: '西湖区湖底公园1号',
address2: '西湖区湖底公园1号',
address3: '西湖区湖底公园1号',
address4: '西湖区湖底公园1号',
address5: '西湖区湖底公园1号',
},
{
key: '6',
name: '胡彦斌6',
age: 32,
address: '西湖区湖底公园11号',
address1: '西湖区湖底公园1号',
address2: '西湖区湖底公园1号',
address3: '西湖区湖底公园1号',
address4: '西湖区湖底公园1号',
address5: '西湖区湖底公园1号',
},
],
columns: [
{
// title: '姓名',
dataIndex: 'name',
key: 1,
width: 200,
slots: {
title: '姓名',
// 冻结列头的参数
// 1为左侧冻结
// 2为右侧冻结
// 3为不冻结或解冻
fixedValue: 3,
},
// fixed: 'right'
},
{
// title: '年龄',
dataIndex: 'age',
key: 2,
width: 200,
slots: {
title: '年龄',
fixedValue: 3,
},
sorter: (a, b) => a.age - b.age,
},
{
// title: '住址',
dataIndex: 'address',
key: 3,
width: 200,
// sorter: true,
slots: {
title: '住址',
fixedValue: 3,
},
sorter: (a, b) => a.address.length - b.address.length,
},
{
// title: '住址1',
dataIndex: 'address1',
key: 4,
width: 200,
slots: {
title: '住址1',
fixedValue: 3,
},
},
{
// title: '住址2',
dataIndex: 'address2',
key: 5,
width: 200,
slots: {
title: '住址2',
fixedValue: 3,
},
},
{
// title: '住址3',
dataIndex: 'address3',
key: 6,
width: 200,
slots: {
title: '住址3',
fixedValue: 3,
},
},
{
// title: '住址4',
dataIndex: 'address4',
key: 7,
width: 200,
slots: {
title: '住址4',
fixedValue: 3,
},
},
{
// title: '住址5',
dataIndex: 'address5',
key: 8,
width: 500,
slots: {
title: '住址5',
fixedValue: 3,
},
},
{
dataIndex: 'address6',
key: 9,
width: 500,
slots: {
title: '操作',
fixedValue: 3,
},
scopedSlots: { customRender: 'action' },
},
],
}
},
mounted() {},
watch: {},
methods: {},
}
</script>
<style scoped>
</style>
@@ -27,7 +27,7 @@
</a-form>
</div>
<s-table :columns="columns" :data="loadData">
<j-table :columns="columns" :data="loadData">
<span slot="actions" slot-scope="text, record">
<a-tag v-for="(action, index) in record.actionList" :key="index">{{ action.describe }}</a-tag>
@@ -57,7 +57,7 @@
</a-menu>
</a-dropdown>
</span>
</s-table>
</j-table>
<a-modal
title="操作"
@@ -134,12 +134,12 @@
</template>
<script>
import STable from '@/components/table/'
import JTable from '@/components/jero/JTable'
export default {
name: "TableList",
components: {
STable
JTable
},
data () {
return {
+4 -4
View File
@@ -27,7 +27,7 @@
</a-form>
</div>
<s-table
<j-table
ref="table"
size="default"
:columns="columns"
@@ -71,7 +71,7 @@
</a-menu>
</a-dropdown>
</span>
</s-table>
</j-table>
<role-modal ref="modal" @ok="handleOk"></role-modal>
@@ -79,13 +79,13 @@
</template>
<script>
import STable from '@/components/table/'
import JTable from '@/components/jero/JTable'
import RoleModal from './modules/RoleModal'
export default {
name: "TableList",
components: {
STable,
JTable,
RoleModal
},
data () {
@@ -75,7 +75,7 @@
</a-dropdown>
</div>
<s-table
<j-table
ref="table"
size="default"
:columns="columns"
@@ -110,7 +110,7 @@
</span>
</div>
</template>
</s-table>
</j-table>
<a-modal title="新建规则" destroyOnClose :visible="visibleCreateModal" @ok="handleCreateModalOk" @cancel="handleCreateModalCancel">
<!---->
<a-form style="margin-top: 8px" :autoFormCreate="(form)=>{this.createForm = form}">
@@ -123,12 +123,12 @@
</template>
<script>
import STable from '@/components/table/'
import JTable from '@/components/jero/JTable'
export default {
name: "TableList",
components: {
STable
JTable
},
data () {
return {
+4 -4
View File
@@ -75,7 +75,7 @@
</a-dropdown>
</div>
<s-table
<j-table
ref="table"
size="default"
:columns="columns"
@@ -103,7 +103,7 @@
</a-menu>
</a-dropdown>
</span>
</s-table>
</j-table>
<a-modal
title="操作"
@@ -188,7 +188,7 @@
</template>
<script>
import STable from '@/components/table/'
import JTable from '@/components/jero/JTable'
import ATextarea from "ant-design-vue/es/input/TextArea"
import AInput from "ant-design-vue/es/input/Input"
import moment from "moment"
@@ -200,7 +200,7 @@
components: {
AInput,
ATextarea,
STable
JTable
},
data () {
return {
+4 -4
View File
@@ -27,7 +27,7 @@
</a-form>
</div>
<s-table
<j-table
size="default"
:columns="columns"
:data="loadData"
@@ -70,7 +70,7 @@
</a-menu>
</a-dropdown>
</span>
</s-table>
</j-table>
<a-modal
title="操作"
@@ -149,13 +149,13 @@
</template>
<script>
import STable from '@/components/table/'
import JTable from '@/components/jero/JTable'
import { getRoleList, getServiceList } from '@/api/manage'
export default {
name: "TableList",
components: {
STable
JTable
},
data () {
return {
+10 -10
View File
@@ -18,17 +18,17 @@
<a-divider style="margin-bottom: 32px"/>
<div class="title">退货商品</div>
<s-table
style="margin-bottom: 24px"
:columns="goodsColumns"
<j-table
style="margin-bottom: 24px"
:columns="goodsColumns"
:data="loadGoodsData">
</s-table>
</j-table>
<div class="title">退货进度</div>
<s-table
style="margin-bottom: 24px"
:columns="scheduleColumns"
<j-table
style="margin-bottom: 24px"
:columns="scheduleColumns"
:data="loadScheduleData">
<template
@@ -37,14 +37,14 @@
<a-badge :status="status" :text="status | statusFilter"/>
</template>
</s-table>
</j-table>
</a-card>
</page-layout>
</template>
<script>
import PageLayout from '@/components/page/PageLayout'
import STable from '@/components/table/'
import JTable from '@/components/jero/JTable'
import DetailList from '@/components/tools/DetailList'
import ABadge from "ant-design-vue/es/badge/Badge"
const DetailListItem = DetailList.Item
@@ -55,7 +55,7 @@
ABadge,
DetailList,
DetailListItem,
STable
JTable
},
data () {
return {