fit2cloud-ui-plus 0.0.1-beta.3 → 0.0.1-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -10
- package/.editorconfig +0 -14
- package/BETA.MD +0 -6
- package/env.d.ts +0 -13
- package/examples/App.vue +0 -65
- package/examples/assets/github.png +0 -0
- package/examples/assets/hidden-code.png +0 -0
- package/examples/assets/iconfont/demo.css +0 -539
- package/examples/assets/iconfont/demo_index.html +0 -257
- package/examples/assets/iconfont/iconfont.css +0 -27
- package/examples/assets/iconfont/iconfont.js +0 -1
- package/examples/assets/iconfont/iconfont.json +0 -30
- package/examples/assets/iconfont/iconfont.ttf +0 -0
- package/examples/assets/iconfont/iconfont.woff +0 -0
- package/examples/assets/iconfont/iconfont.woff2 +0 -0
- package/examples/assets/logo.png +0 -0
- package/examples/components/CodeExample.vue +0 -209
- package/examples/components/DocumentTable.vue +0 -98
- package/examples/components/Markdown.vue +0 -30
- package/examples/layout/components/AppHeader.vue +0 -35
- package/examples/layout/components/Sidebar.vue +0 -73
- package/examples/layout/index.vue +0 -55
- package/examples/layout/layout.scss +0 -75
- package/examples/main.ts +0 -25
- package/examples/markdown/getting-started.md +0 -38
- package/examples/pages/filter-bar/demo/BaseFilterBar.vue +0 -70
- package/examples/pages/filter-bar/demo/SetConditionsDemo.vue +0 -66
- package/examples/pages/filter-bar/demo/SlotDemo.vue +0 -77
- package/examples/pages/filter-bar/index.vue +0 -56
- package/examples/pages/index.ts +0 -11
- package/examples/pages/read-write-switch/demo/BaseDemo.vue +0 -30
- package/examples/pages/read-write-switch/demo/CustomContentDemo.vue +0 -28
- package/examples/pages/read-write-switch/demo/InputRwSwitchDemo.vue +0 -16
- package/examples/pages/read-write-switch/demo/ReadSwitchDemo.vue +0 -54
- package/examples/pages/read-write-switch/demo/SelectRwSwitchDemo.vue +0 -23
- package/examples/pages/read-write-switch/demo/TableInnerEditDemo.vue +0 -73
- package/examples/pages/read-write-switch/demo/WriteSwitchDemo.vue +0 -39
- package/examples/pages/read-write-switch/index.vue +0 -81
- package/examples/pages/speed-dial/demo/BaseSpeedDial.vue +0 -51
- package/examples/pages/speed-dial/demo/SpeedDialCustom.vue +0 -109
- package/examples/pages/speed-dial/demo/SpeedDialPosition.vue +0 -66
- package/examples/pages/speed-dial/demo/SpeedDialTrigger.vue +0 -64
- package/examples/pages/speed-dial/index.vue +0 -61
- package/examples/pages/split-pane/demo/BaseSplit.vue +0 -36
- package/examples/pages/split-pane/demo/CustomResizer.vue +0 -47
- package/examples/pages/split-pane/demo/NestSplit.vue +0 -34
- package/examples/pages/split-pane/demo/ResizerType.vue +0 -60
- package/examples/pages/split-pane/index.vue +0 -61
- package/examples/pages/table/demo/BaseTable.vue +0 -35
- package/examples/pages/table/demo/DropdownColumn.vue +0 -89
- package/examples/pages/table/demo/DropdownColumnSlot.vue +0 -92
- package/examples/pages/table/demo/SaveSelectColumn.vue +0 -41
- package/examples/pages/table/demo/SelectColumn.vue +0 -47
- package/examples/pages/table/demo/TableOperations.vue +0 -95
- package/examples/pages/table/demo/TablePagination.vue +0 -100
- package/examples/pages/table/index.vue +0 -89
- package/examples/pages/tabs/demo/AddCloseTab.vue +0 -73
- package/examples/pages/tabs/index.vue +0 -42
- package/examples/router/doc-routes.ts +0 -52
- package/examples/router/index.ts +0 -56
- package/index.html +0 -13
- package/plugins/example-transform.ts +0 -30
- package/public/favicon.bmp +0 -0
- package/tsconfig.json +0 -24
- package/tsconfig.node.json +0 -9
- package/vite.config.ts +0 -56
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
<demo>嵌套用法</demo>
|
|
2
|
-
<template>
|
|
3
|
-
<div>
|
|
4
|
-
<div class="demo-split">
|
|
5
|
-
<fu-split-pane left="200" direction="horizontal" :resizer-style="{width:'10px'}">
|
|
6
|
-
<template v-slot:left>
|
|
7
|
-
<div style="padding-right:5px">
|
|
8
|
-
Left
|
|
9
|
-
</div>
|
|
10
|
-
</template>
|
|
11
|
-
<template v-slot:resizer>
|
|
12
|
-
<i class="el-icon-d-caret"></i>
|
|
13
|
-
</template>
|
|
14
|
-
<template v-slot:right>
|
|
15
|
-
<div style="padding-left:5px">
|
|
16
|
-
Right
|
|
17
|
-
</div>
|
|
18
|
-
</template>
|
|
19
|
-
</fu-split-pane>
|
|
20
|
-
</div>
|
|
21
|
-
<el-divider></el-divider>
|
|
22
|
-
<div class="demo-split">
|
|
23
|
-
<fu-split-pane top="50%" direction="vertical" :resizer-style="{height:'10px'}">
|
|
24
|
-
<template v-slot:top>
|
|
25
|
-
Top
|
|
26
|
-
</template>
|
|
27
|
-
<template v-slot:resizer>
|
|
28
|
-
<i class="el-icon-d-caret"></i>
|
|
29
|
-
</template>
|
|
30
|
-
<template v-slot:bottom>
|
|
31
|
-
<div style="padding-top:5px">
|
|
32
|
-
Bottom
|
|
33
|
-
</div>
|
|
34
|
-
</template>
|
|
35
|
-
</fu-split-pane>
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
</template>
|
|
39
|
-
|
|
40
|
-
<script setup lang="ts">
|
|
41
|
-
</script>
|
|
42
|
-
<style lang="scss" scoped>
|
|
43
|
-
.demo-split {
|
|
44
|
-
height: 200px;
|
|
45
|
-
border: 1px solid #dcdee2;
|
|
46
|
-
}
|
|
47
|
-
</style>
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<demo>线状分割</demo>
|
|
2
|
-
<template>
|
|
3
|
-
<div class="demo-split">
|
|
4
|
-
<fu-split-pane left="200" direction="horizontal">
|
|
5
|
-
<template v-slot:left>
|
|
6
|
-
<div class="demo-split-child">
|
|
7
|
-
<fu-split-pane top="50%" direction="vertical">
|
|
8
|
-
<template v-slot:top>
|
|
9
|
-
Top
|
|
10
|
-
</template>
|
|
11
|
-
<template v-slot:bottom>
|
|
12
|
-
Bottom
|
|
13
|
-
</template>
|
|
14
|
-
</fu-split-pane>
|
|
15
|
-
</div>
|
|
16
|
-
</template>
|
|
17
|
-
<template v-slot:right>
|
|
18
|
-
Right
|
|
19
|
-
</template>
|
|
20
|
-
</fu-split-pane>
|
|
21
|
-
</div>
|
|
22
|
-
</template>
|
|
23
|
-
|
|
24
|
-
<script setup lang="ts">
|
|
25
|
-
</script>
|
|
26
|
-
<style lang="scss" scoped>
|
|
27
|
-
.demo-split {
|
|
28
|
-
height: 200px;
|
|
29
|
-
border: 1px solid #dcdee2;
|
|
30
|
-
}
|
|
31
|
-
.demo-split-child {
|
|
32
|
-
height: 200px;
|
|
33
|
-
}
|
|
34
|
-
</style>
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
<demo>自定义分割节点</demo>
|
|
2
|
-
<template>
|
|
3
|
-
<div>
|
|
4
|
-
<el-divider content-position="left">线状分割</el-divider>
|
|
5
|
-
<div class="demo-split">
|
|
6
|
-
<fu-split-pane left="200px" resizer-type="line" :resizable="false">
|
|
7
|
-
<template v-slot:left>
|
|
8
|
-
Left
|
|
9
|
-
</template>
|
|
10
|
-
<template v-slot:right>
|
|
11
|
-
Right
|
|
12
|
-
</template>
|
|
13
|
-
</fu-split-pane>
|
|
14
|
-
</div>
|
|
15
|
-
<el-divider content-position="left">定义分割线样式</el-divider>
|
|
16
|
-
<div class="demo-split">
|
|
17
|
-
<fu-split-pane left="200px" resizer-type="line" :resizable="false"
|
|
18
|
-
:resizer-style="{background:'none'}">
|
|
19
|
-
<template v-slot:left>
|
|
20
|
-
<div class="demo-split-child">
|
|
21
|
-
<fu-split-pane top="50%" direction="vertical" resizer-type="line"
|
|
22
|
-
:resizer-style="{background:'none'}">
|
|
23
|
-
<template v-slot:top>
|
|
24
|
-
<div class="pane" style="background: #f9e29a;">
|
|
25
|
-
Top
|
|
26
|
-
</div>
|
|
27
|
-
</template>
|
|
28
|
-
<template v-slot:bottom>
|
|
29
|
-
<div class="pane" style="background: #a8dfd3;">
|
|
30
|
-
Bottom
|
|
31
|
-
</div>
|
|
32
|
-
</template>
|
|
33
|
-
</fu-split-pane>
|
|
34
|
-
</div>
|
|
35
|
-
</template>
|
|
36
|
-
<template v-slot:right>
|
|
37
|
-
<div class="pane" style="background: #fbbbbb;">
|
|
38
|
-
Right
|
|
39
|
-
</div>
|
|
40
|
-
</template>
|
|
41
|
-
</fu-split-pane>
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
</template>
|
|
45
|
-
|
|
46
|
-
<script setup lang="ts">
|
|
47
|
-
|
|
48
|
-
</script>
|
|
49
|
-
<style lang="scss" scoped>
|
|
50
|
-
.demo-split {
|
|
51
|
-
height: 200px;
|
|
52
|
-
border: 1px solid #dcdee2;
|
|
53
|
-
.pane {
|
|
54
|
-
height: 100%;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
.demo-split-child {
|
|
58
|
-
height: 200px;
|
|
59
|
-
}
|
|
60
|
-
</style>
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<!-- 一级标题 -->
|
|
4
|
-
<h1 class="component-h1">SplitPane 分割面板</h1>
|
|
5
|
-
<!-- 一级描述 -->
|
|
6
|
-
<p>可将一片区域,分割为可以拖拽调整宽度或高度的两部分区域。</p>
|
|
7
|
-
<!--内容 -->
|
|
8
|
-
<div class="component-block" v-for="(item, index) in comList" :key="index">
|
|
9
|
-
<h2>{{ item.title }}</h2>
|
|
10
|
-
<p>{{ item.titleDesc }}</p>
|
|
11
|
-
<code-example :component="item.component" />
|
|
12
|
-
</div>
|
|
13
|
-
</div>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script setup lang="ts">
|
|
17
|
-
import BaseSplit from "./demo/BaseSplit.vue";
|
|
18
|
-
import NestSplit from "./demo/NestSplit.vue";
|
|
19
|
-
import ResizerType from "./demo/ResizerType.vue";
|
|
20
|
-
import CustomResizer from "./demo/CustomResizer.vue";
|
|
21
|
-
const comList = [
|
|
22
|
-
{
|
|
23
|
-
title: "基本用法",
|
|
24
|
-
titleDesc: "",
|
|
25
|
-
component: BaseSplit,
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
title: "嵌套用法",
|
|
29
|
-
titleDesc: "",
|
|
30
|
-
component: NestSplit,
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
title: "线状分割",
|
|
34
|
-
titleDesc: "分割线可定义为线状,也可以禁止拖动",
|
|
35
|
-
component: ResizerType,
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
title: "自定义分割节点",
|
|
39
|
-
titleDesc: "分割节点可替换图标,如果发现宽度不合适,可自行调整分割线宽度样式",
|
|
40
|
-
component: CustomResizer,
|
|
41
|
-
},
|
|
42
|
-
]
|
|
43
|
-
|
|
44
|
-
</script>
|
|
45
|
-
|
|
46
|
-
<style lang="scss" scoped>
|
|
47
|
-
.component-block {
|
|
48
|
-
margin-top: 40px;
|
|
49
|
-
|
|
50
|
-
p {
|
|
51
|
-
font-size: 14px;
|
|
52
|
-
color: #5e6d82;
|
|
53
|
-
line-height: 1.5em;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
h2 {
|
|
57
|
-
font-weight: 400;
|
|
58
|
-
color: #1f2f3d;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
</style>
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
<demo>基本用法</demo>
|
|
2
|
-
|
|
3
|
-
<template>
|
|
4
|
-
<fu-table :data="tableData" style="width: 100%">
|
|
5
|
-
<el-table-column type="selection"></el-table-column>
|
|
6
|
-
<el-table-column prop="date" label="日期" width="180"></el-table-column>
|
|
7
|
-
<el-table-column prop="name" label="姓名" width="180"></el-table-column>
|
|
8
|
-
<el-table-column prop="address" label="地址"></el-table-column>
|
|
9
|
-
</fu-table>
|
|
10
|
-
</template>
|
|
11
|
-
|
|
12
|
-
<script setup lang="ts">
|
|
13
|
-
const tableData = [
|
|
14
|
-
{
|
|
15
|
-
date: "2016-05-02",
|
|
16
|
-
name: "张三",
|
|
17
|
-
address: "北京朝阳区财富中心 0室",
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
date: "2016-05-04",
|
|
21
|
-
name: "张三",
|
|
22
|
-
address: "北京朝阳区财富中心 1室",
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
date: "2016-05-01",
|
|
26
|
-
name: "张三",
|
|
27
|
-
address: "北京朝阳区财富中心 2室",
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
date: "2016-05-03",
|
|
31
|
-
name: "张三",
|
|
32
|
-
address: "北京朝阳区财富中心 3室",
|
|
33
|
-
}
|
|
34
|
-
]
|
|
35
|
-
</script>
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
<demo>列组件下拉菜单</demo>
|
|
2
|
-
<template>
|
|
3
|
-
<el-radio-group v-model="showType" style="margin-bottom: 20px">
|
|
4
|
-
<el-radio-button label="always">always</el-radio-button>
|
|
5
|
-
<el-radio-button label="hover">hover</el-radio-button>
|
|
6
|
-
<el-radio-button label="selected">selected</el-radio-button>
|
|
7
|
-
</el-radio-group>
|
|
8
|
-
<fu-table :data="tableData" @selection-change="handleSelectionChange">
|
|
9
|
-
<el-table-column type="selection" />
|
|
10
|
-
<fu-table-column-dropdown :menus="menus" :title="`已选中${selectRows.length}项`" :showType="showType" />
|
|
11
|
-
<el-table-column prop="date" label="日期" min-width="180" />
|
|
12
|
-
<el-table-column prop="name" label="姓名" min-width="180" />
|
|
13
|
-
<el-table-column prop="address" label="地址" min-width="300" />
|
|
14
|
-
</fu-table>
|
|
15
|
-
</template>
|
|
16
|
-
|
|
17
|
-
<script setup lang="ts">
|
|
18
|
-
import { ref } from "vue"
|
|
19
|
-
|
|
20
|
-
interface User {
|
|
21
|
-
id: number
|
|
22
|
-
date: string
|
|
23
|
-
name: string
|
|
24
|
-
address: string
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// *****此处类型争议
|
|
28
|
-
const selectRows = ref([])
|
|
29
|
-
const showType = ref("always")
|
|
30
|
-
const tableData: User[] = [
|
|
31
|
-
{
|
|
32
|
-
id: 1,
|
|
33
|
-
date: "2016-05-01",
|
|
34
|
-
name: "张三",
|
|
35
|
-
address: "北京朝阳区财富中心 0室",
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
id: 2,
|
|
39
|
-
date: "2016-05-02",
|
|
40
|
-
name: "张三",
|
|
41
|
-
address: "北京朝阳区财富中心 1室",
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
id: 3,
|
|
45
|
-
date: "2016-05-01",
|
|
46
|
-
name: "张三",
|
|
47
|
-
address: "北京朝阳区财富中心 2室",
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
id: 4,
|
|
51
|
-
date: "2016-05-03",
|
|
52
|
-
name: "张三",
|
|
53
|
-
address: "北京朝阳区财富中心 3室",
|
|
54
|
-
},
|
|
55
|
-
]
|
|
56
|
-
const menus = [
|
|
57
|
-
{
|
|
58
|
-
label: "批量编辑",
|
|
59
|
-
icon: "Edit",
|
|
60
|
-
click: (row: User) => {
|
|
61
|
-
console.log("编辑:" + row.name);
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
label: "批量移动",
|
|
66
|
-
icon: "Switch",
|
|
67
|
-
click: (row: User) => {
|
|
68
|
-
console.log("移动:" + row.name);
|
|
69
|
-
},
|
|
70
|
-
disabled: (row: User) => {
|
|
71
|
-
if (row.id === 1) {
|
|
72
|
-
return true;
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
label: "批量删除",
|
|
78
|
-
icon: "Delete",
|
|
79
|
-
click: (row: User) => {
|
|
80
|
-
console.log("删除:" + row.name);
|
|
81
|
-
},
|
|
82
|
-
divided: true,
|
|
83
|
-
},
|
|
84
|
-
]
|
|
85
|
-
function handleSelectionChange(value: any) {
|
|
86
|
-
selectRows.value = value;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
</script>
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
<demo>通过slot自定义列组件下拉菜单</demo>
|
|
2
|
-
<template>
|
|
3
|
-
<div>
|
|
4
|
-
<fu-table :data="tableData">
|
|
5
|
-
<el-table-column type="selection" />
|
|
6
|
-
<fu-table-column-dropdown showType="always" width="auto" ref="tableDropRef">
|
|
7
|
-
<!-- 自定义触发图标 -->
|
|
8
|
-
<template #icon>
|
|
9
|
-
<el-icon>
|
|
10
|
-
<setting />
|
|
11
|
-
</el-icon>自定义
|
|
12
|
-
</template>
|
|
13
|
-
<!-- 自定义触发图标 -->
|
|
14
|
-
<template #title>
|
|
15
|
-
<div class="example-title">自定义标题</div>
|
|
16
|
-
</template>
|
|
17
|
-
<!-- 内容 -->
|
|
18
|
-
<template #default="scope">
|
|
19
|
-
<div class="example">
|
|
20
|
-
<el-checkbox-group v-model="checkList">
|
|
21
|
-
<el-checkbox label="复选框 A" />
|
|
22
|
-
<el-checkbox label="复选框 B" />
|
|
23
|
-
<el-checkbox label="复选框 C" />
|
|
24
|
-
</el-checkbox-group>
|
|
25
|
-
<div class="example-button">
|
|
26
|
-
<el-button type="primary" size="small">确认</el-button>
|
|
27
|
-
<el-button type="primary" plain @click="cancel(scope.$index)" size="small">取消</el-button>
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
</template>
|
|
31
|
-
</fu-table-column-dropdown>
|
|
32
|
-
<el-table-column prop="date" label="日期" min-width="180" />
|
|
33
|
-
<el-table-column prop="name" label="姓名" min-width="180" />
|
|
34
|
-
<el-table-column prop="address" label="地址" min-width="300" />
|
|
35
|
-
</fu-table>
|
|
36
|
-
</div>
|
|
37
|
-
</template>
|
|
38
|
-
|
|
39
|
-
<script setup lang="ts">
|
|
40
|
-
import { ref } from 'vue'
|
|
41
|
-
const checkList = ref([])
|
|
42
|
-
const tableDropRef = ref()
|
|
43
|
-
|
|
44
|
-
const tableData = [
|
|
45
|
-
{
|
|
46
|
-
id: 1,
|
|
47
|
-
date: "2016-05-01",
|
|
48
|
-
name: "张三",
|
|
49
|
-
address: "北京朝阳区财富中心 0室",
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
id: 2,
|
|
53
|
-
date: "2016-05-02",
|
|
54
|
-
name: "张三",
|
|
55
|
-
address: "北京朝阳区财富中心 1室",
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
id: 3,
|
|
59
|
-
date: "2016-05-01",
|
|
60
|
-
name: "张三",
|
|
61
|
-
address: "北京朝阳区财富中心 2室",
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
id: 4,
|
|
65
|
-
date: "2016-05-03",
|
|
66
|
-
name: "张三",
|
|
67
|
-
address: "北京朝阳区财富中心 3室",
|
|
68
|
-
},
|
|
69
|
-
]
|
|
70
|
-
|
|
71
|
-
function cancel(index: number) {
|
|
72
|
-
tableDropRef.value?.hide(index);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
</script>
|
|
76
|
-
<style lang="scss" scoped>
|
|
77
|
-
.example-title {
|
|
78
|
-
color: #004a71;
|
|
79
|
-
text-align: center;
|
|
80
|
-
padding: 5px 0;
|
|
81
|
-
font-size: 15px;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.example {
|
|
85
|
-
padding: 10px 20px;
|
|
86
|
-
width: 125px;
|
|
87
|
-
|
|
88
|
-
.example-button {
|
|
89
|
-
margin-top: 10px;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
</style>
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
<demo>选列保存</demo>
|
|
2
|
-
<template>
|
|
3
|
-
<div style="margin-bottom: 20px">
|
|
4
|
-
<fu-table-column-select :columns="columns" />
|
|
5
|
-
</div>
|
|
6
|
-
<fu-table :data="tableData" :columns="columns" localKey="SaveSelectColumn">
|
|
7
|
-
<el-table-column type="selection"></el-table-column>
|
|
8
|
-
<el-table-column prop="date" label="日期" min-width="180"></el-table-column>
|
|
9
|
-
<el-table-column prop="name" label="姓名" min-width="180" fix></el-table-column>
|
|
10
|
-
<el-table-column prop="address" label="地址" :show="false"></el-table-column>
|
|
11
|
-
</fu-table>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<script setup lang="ts">
|
|
15
|
-
import { ref } from 'vue'
|
|
16
|
-
|
|
17
|
-
const columns = ref([])
|
|
18
|
-
|
|
19
|
-
const tableData = [
|
|
20
|
-
{
|
|
21
|
-
date: "2016-05-02",
|
|
22
|
-
name: "张三",
|
|
23
|
-
address: "北京朝阳区财富中心 0室",
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
date: "2016-05-04",
|
|
27
|
-
name: "张三",
|
|
28
|
-
address: "北京朝阳区财富中心 1室",
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
date: "2016-05-01",
|
|
32
|
-
name: "张三",
|
|
33
|
-
address: "北京朝阳区财富中心 2室",
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
date: "2016-05-03",
|
|
37
|
-
name: "张三",
|
|
38
|
-
address: "北京朝阳区财富中心 3室",
|
|
39
|
-
}
|
|
40
|
-
]
|
|
41
|
-
</script>
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
<demo>表格选列</demo>
|
|
2
|
-
<template>
|
|
3
|
-
<div style="margin-bottom: 20px">
|
|
4
|
-
<span>Popover选列(hover):</span>
|
|
5
|
-
<fu-table-column-select :columns="columns" />
|
|
6
|
-
<span style="margin-left: 20px">Popover选列(click):</span>
|
|
7
|
-
<fu-table-column-select :columns="columns" trigger="click" />
|
|
8
|
-
<span style="margin-left: 20px">Dialog选列:</span>
|
|
9
|
-
<fu-table-column-select type="dialog" :columns="columns" />
|
|
10
|
-
</div>
|
|
11
|
-
<fu-table :data="tableData" :columns="columns">
|
|
12
|
-
<el-table-column type="selection"></el-table-column>
|
|
13
|
-
<el-table-column prop="date" label="日期" min-width="180"></el-table-column>
|
|
14
|
-
<el-table-column prop="name" label="姓名" min-width="180"></el-table-column>
|
|
15
|
-
<el-table-column prop="address" label="地址" :show="false"></el-table-column>
|
|
16
|
-
</fu-table>
|
|
17
|
-
|
|
18
|
-
</template>
|
|
19
|
-
|
|
20
|
-
<script setup lang="ts">
|
|
21
|
-
import { ref } from 'vue'
|
|
22
|
-
|
|
23
|
-
const columns = ref([])
|
|
24
|
-
|
|
25
|
-
const tableData = [
|
|
26
|
-
{
|
|
27
|
-
date: "2016-05-02",
|
|
28
|
-
name: "张三",
|
|
29
|
-
address: "北京朝阳区财富中心 0室",
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
date: "2016-05-04",
|
|
33
|
-
name: "张三",
|
|
34
|
-
address: "北京朝阳区财富中心 1室",
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
date: "2016-05-01",
|
|
38
|
-
name: "张三",
|
|
39
|
-
address: "北京朝阳区财富中心 2室",
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
date: "2016-05-03",
|
|
43
|
-
name: "张三",
|
|
44
|
-
address: "北京朝阳区财富中心 3室",
|
|
45
|
-
}
|
|
46
|
-
]
|
|
47
|
-
</script>
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
<demo>操作列</demo>
|
|
2
|
-
<template>
|
|
3
|
-
<div style="margin-bottom: 20px">
|
|
4
|
-
<el-button @click="enableAll">启用全部按钮</el-button>
|
|
5
|
-
<el-button @click="showAll">显示全部按钮</el-button>
|
|
6
|
-
</div>
|
|
7
|
-
<h4>
|
|
8
|
-
laber 按钮
|
|
9
|
-
</h4>
|
|
10
|
-
<fu-table :data="tableData" :columns="columns">
|
|
11
|
-
<el-table-column type="selection"></el-table-column>
|
|
12
|
-
<el-table-column prop="date" label="日期" min-width="180"></el-table-column>
|
|
13
|
-
<el-table-column prop="name" label="姓名" min-width="180" fix></el-table-column>
|
|
14
|
-
<el-table-column prop="address" label="地址" min-width="300" :show="false"></el-table-column>
|
|
15
|
-
<fu-table-operations :ellipsis="2" :buttons="buttons" label="操作" fixed="right" />
|
|
16
|
-
</fu-table>
|
|
17
|
-
<h4>
|
|
18
|
-
icon 按钮
|
|
19
|
-
</h4>
|
|
20
|
-
<fu-table :data="tableData" :columns="columns" style="margin-top: 20px">
|
|
21
|
-
<el-table-column type="selection"></el-table-column>
|
|
22
|
-
<el-table-column prop="date" label="日期" min-width="180"></el-table-column>
|
|
23
|
-
<el-table-column prop="name" label="姓名" min-width="180" fix></el-table-column>
|
|
24
|
-
<el-table-column prop="address" label="地址" min-width="300" :show="false"></el-table-column>
|
|
25
|
-
<fu-table-operations :ellipsis="2" type="icon" :buttons="buttons" label="操作" fixed="right" />
|
|
26
|
-
</fu-table>
|
|
27
|
-
</template>
|
|
28
|
-
|
|
29
|
-
<script setup lang="ts">
|
|
30
|
-
import { ref } from 'vue'
|
|
31
|
-
|
|
32
|
-
interface User {
|
|
33
|
-
date: string
|
|
34
|
-
name: string
|
|
35
|
-
address: string
|
|
36
|
-
}
|
|
37
|
-
const tableData = [{
|
|
38
|
-
date: "2016-05-02",
|
|
39
|
-
name: "张三",
|
|
40
|
-
address: "北京朝阳区财富中心 0室",
|
|
41
|
-
}, {
|
|
42
|
-
date: "2016-05-04",
|
|
43
|
-
name: "张三",
|
|
44
|
-
address: "北京朝阳区财富中心 1室",
|
|
45
|
-
}, {
|
|
46
|
-
date: "2016-05-01",
|
|
47
|
-
name: "张三",
|
|
48
|
-
address: "北京朝阳区财富中心 2室",
|
|
49
|
-
}, {
|
|
50
|
-
date: "2016-05-03",
|
|
51
|
-
name: "张三",
|
|
52
|
-
address: "北京朝阳区财富中心 3室",
|
|
53
|
-
}]
|
|
54
|
-
const columns = ref([])
|
|
55
|
-
|
|
56
|
-
const buttons = [
|
|
57
|
-
{
|
|
58
|
-
label: "查看", icon: "View", click: (row: User) => {
|
|
59
|
-
console.log("查看:" + row.name)
|
|
60
|
-
}, disabled: (row: User) => {
|
|
61
|
-
return row.date === "2016-05-01"
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
label: "编辑", icon: "Edit", click: (row: User) => {
|
|
66
|
-
console.log("编辑:" + row.name)
|
|
67
|
-
}, show: false
|
|
68
|
-
}, {
|
|
69
|
-
label: "执行", icon: "VideoPlay", click: (row: User) => {
|
|
70
|
-
console.log("执行:" + row.name)
|
|
71
|
-
}, disabled: true
|
|
72
|
-
}, {
|
|
73
|
-
label: "删除", icon: "Delete", type: "danger", click: (row: User) => {
|
|
74
|
-
console.log("删除:" + row.name)
|
|
75
|
-
}
|
|
76
|
-
}, {
|
|
77
|
-
label: "复制", icon: "DocumentCopy", click: (row: User) => {
|
|
78
|
-
console.log("复制:" + row.name)
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
]
|
|
82
|
-
|
|
83
|
-
function enableAll() {
|
|
84
|
-
buttons.forEach(b => {
|
|
85
|
-
b.disabled = false
|
|
86
|
-
})
|
|
87
|
-
}
|
|
88
|
-
function showAll() {
|
|
89
|
-
buttons.forEach(b => {
|
|
90
|
-
b.show = true
|
|
91
|
-
})
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
</script>
|