fl-web-component 0.1.1 → 1.0.1
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/dist/fl-web-component.common.js +14751 -54489
- package/dist/fl-web-component.common.js.map +1 -1
- package/dist/fl-web-component.css +1 -1
- package/dist/fl-web-component.umd.js +14751 -54489
- package/dist/fl-web-component.umd.js.map +1 -1
- package/dist/fl-web-component.umd.min.js +3 -3
- package/dist/fl-web-component.umd.min.js.map +1 -1
- package/package.json +28 -5
- package/packages/components/button/index.vue +18 -17
- package/packages/components/com-card/card-page.vue +51 -49
- package/packages/components/com-card/index.vue +20 -21
- package/packages/components/com-dialogWrapper/index.vue +18 -21
- package/packages/components/com-flcanvas/components/bspline.js +91 -0
- package/packages/components/com-flcanvas/components/entityFormatting.js +503 -0
- package/packages/components/com-flcanvas/components/round10.js +24 -0
- package/packages/components/com-flcanvas/index.vue +259 -0
- package/packages/components/com-formDialog/index.vue +76 -75
- package/packages/components/com-graphics/index.vue +1057 -226
- package/packages/components/com-graphics/per-control.vue +109 -0
- package/packages/components/com-graphics/pid.vue +168 -0
- package/packages/components/com-page/index.vue +33 -33
- package/packages/components/com-selectTree/index.vue +61 -63
- package/packages/components/com-table/column-default.vue +9 -14
- package/packages/components/com-table/column-dynamic.vue +4 -8
- package/packages/components/com-table/column-menu.vue +8 -8
- package/packages/components/com-table/column-slot.vue +4 -4
- package/packages/components/com-table/column.vue +7 -15
- package/packages/components/com-table/config.js +9 -9
- package/packages/components/com-table/index.vue +35 -35
- package/packages/components/com-table/table-page.vue +17 -17
- package/packages/components/com-tabs/index.vue +19 -19
- package/packages/components/com-treeDynamic/index.vue +45 -45
- package/packages/components/model/api/index.js +59 -67
- package/packages/components/model/api/mock/detecttree.js +38 -38
- package/packages/components/model/api/mock/getmodel-line.js +15830 -79332
- package/packages/components/model/api/mock/init.js +1 -1
- package/packages/components/model/api/mock/pbstree.js +486 -495
- package/packages/components/model/components/TextOverTooltip/index.vue +3 -3
- package/packages/components/model/components/annotation-toolbar.vue +4 -19
- package/packages/components/model/components/check-proofing-model.vue +26 -29
- package/packages/components/model/components/clipping-type.vue +22 -14
- package/packages/components/model/components/com-dialogWrapper/index.vue +22 -25
- package/packages/components/model/components/detect-panel.vue +38 -26
- package/packages/components/model/components/detect-tree.vue +9 -24
- package/packages/components/model/components/firstPer-panel.vue +23 -25
- package/packages/components/model/components/header-button.vue +31 -107
- package/packages/components/model/components/imageViewer/index.vue +34 -35
- package/packages/components/model/components/import-model.vue +127 -127
- package/packages/components/model/components/location-panel.vue +25 -29
- package/packages/components/model/components/measure-type.vue +15 -15
- package/packages/components/model/components/pbs-tree.vue +139 -144
- package/packages/components/model/components/proof-config.vue +2 -10
- package/packages/components/model/components/proof-for-pc.vue +35 -32
- package/packages/components/model/components/proof-history.vue +136 -154
- package/packages/components/model/components/proof-panel-detail.vue +166 -165
- package/packages/components/model/components/proof-panel.vue +281 -205
- package/packages/components/model/components/proof-project-user.vue +13 -50
- package/packages/components/model/components/proof-publish.vue +130 -130
- package/packages/components/model/components/proof-role.vue +93 -124
- package/packages/components/model/components/props-panel.vue +63 -54
- package/packages/components/model/index.vue +3225 -3213
- package/packages/components/model/utils/annotation-tool.js +75 -82
- package/packages/components/model/utils/cursor.js +15 -10
- package/packages/components/model/utils/detect-v1.js +23 -35
- package/packages/components/model/utils/index.js +25 -25
- package/packages/components/model/utils/threejs/measure-angle.js +180 -180
- package/packages/components/model/utils/threejs/measure-area.js +196 -184
- package/packages/components/model/utils/threejs/measure-distance.js +154 -152
- package/packages/components/model/utils/threejs/measure-volume.js +64 -61
- package/src/assets/test.png +0 -0
- package/src/assets/worker.glb +0 -0
- package/src/main.js +11 -8
- package/src/utils/flgltf-parser.js +141 -0
- package/src/utils/instance-parser.js +402 -0
- package/src/utils/mock.js +84746 -0
- package/src/utils/threejs/measure-angle.js +240 -0
- package/src/utils/threejs/measure-area.js +249 -0
- package/src/utils/threejs/measure-distance.js +195 -0
|
@@ -5,9 +5,7 @@
|
|
|
5
5
|
<component
|
|
6
6
|
:is="comTable.tableColumnName"
|
|
7
7
|
v-if="comTable.tableOption.selection"
|
|
8
|
-
:fixed="
|
|
9
|
-
vaildData(comTable.tableOption.selectionFixed, config.selectionFixed)
|
|
10
|
-
"
|
|
8
|
+
:fixed="vaildData(comTable.tableOption.selectionFixed, config.selectionFixed)"
|
|
11
9
|
type="selection"
|
|
12
10
|
key="selection"
|
|
13
11
|
:selectable="comTable.tableOption.selectable"
|
|
@@ -29,11 +27,11 @@
|
|
|
29
27
|
</template>
|
|
30
28
|
|
|
31
29
|
<script>
|
|
32
|
-
import config from
|
|
33
|
-
import base from
|
|
30
|
+
import config from './config.js';
|
|
31
|
+
import base from '../../utils/base.js';
|
|
34
32
|
|
|
35
33
|
export default {
|
|
36
|
-
name:
|
|
34
|
+
name: 'comTable',
|
|
37
35
|
mixins: [base()],
|
|
38
36
|
components: {},
|
|
39
37
|
data() {
|
|
@@ -41,7 +39,7 @@ export default {
|
|
|
41
39
|
config: config,
|
|
42
40
|
};
|
|
43
41
|
},
|
|
44
|
-
inject: [
|
|
42
|
+
inject: ['comTable'],
|
|
45
43
|
mounted() {
|
|
46
44
|
this.setSort();
|
|
47
45
|
},
|
|
@@ -50,8 +48,7 @@ export default {
|
|
|
50
48
|
return (
|
|
51
49
|
index +
|
|
52
50
|
1 +
|
|
53
|
-
((this.comTable.page.currentPage || 1) - 1) *
|
|
54
|
-
(this.comTable.page.pageSize || 10)
|
|
51
|
+
((this.comTable.page.currentPage || 1) - 1) * (this.comTable.page.pageSize || 10)
|
|
55
52
|
);
|
|
56
53
|
},
|
|
57
54
|
setSort() {
|
|
@@ -59,15 +56,13 @@ export default {
|
|
|
59
56
|
},
|
|
60
57
|
rowDrop() {
|
|
61
58
|
if (!this.comTable.$refs.table) return;
|
|
62
|
-
const el = this.comTable.$refs.table.$el.querySelectorAll(
|
|
63
|
-
|
|
64
|
-
)[0];
|
|
65
|
-
this.comTable.tableDrop("row", el, (evt) => {
|
|
59
|
+
const el = this.comTable.$refs.table.$el.querySelectorAll(this.config.dropRowClass)[0];
|
|
60
|
+
this.comTable.tableDrop('row', el, (evt) => {
|
|
66
61
|
const oldIndex = evt.oldIndex;
|
|
67
62
|
const newIndex = evt.newIndex;
|
|
68
63
|
const targetRow = this.comTable.list.splice(oldIndex, 1)[0];
|
|
69
64
|
this.comTable.list.splice(newIndex, 0, targetRow);
|
|
70
|
-
this.comTable.$emit(
|
|
65
|
+
this.comTable.$emit('sortable-change', oldIndex, newIndex);
|
|
71
66
|
this.comTable.refreshTable(() => this.rowDrop());
|
|
72
67
|
});
|
|
73
68
|
},
|
|
@@ -14,24 +14,20 @@
|
|
|
14
14
|
:columnOption="column"
|
|
15
15
|
>
|
|
16
16
|
</column-dynamic>
|
|
17
|
-
<column-slot
|
|
18
|
-
v-else
|
|
19
|
-
:column="column"
|
|
20
|
-
:column-option="columnOption.children"
|
|
21
|
-
>
|
|
17
|
+
<column-slot v-else :column="column" :column-option="columnOption.children" :key="column.id">
|
|
22
18
|
</column-slot>
|
|
23
19
|
</template>
|
|
24
20
|
</component>
|
|
25
21
|
</template>
|
|
26
22
|
|
|
27
23
|
<script>
|
|
28
|
-
import columnSlot from
|
|
24
|
+
import columnSlot from './column-slot';
|
|
29
25
|
export default {
|
|
30
|
-
name:
|
|
26
|
+
name: 'column-dynamic',
|
|
31
27
|
components: {
|
|
32
28
|
columnSlot,
|
|
33
29
|
},
|
|
34
|
-
inject: [
|
|
30
|
+
inject: ['comTable'],
|
|
35
31
|
props: {
|
|
36
32
|
columnOption: Object,
|
|
37
33
|
},
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
:header-align="comTable.tableOption.menuHeaderAlign || config.menuHeaderAlign"
|
|
12
12
|
:width="comTable.tableOption.menuWidth || config.menuWidth"
|
|
13
13
|
>
|
|
14
|
-
<template slot="header"
|
|
15
|
-
<span>{{ comTable.tableOption.menuTitle ||
|
|
14
|
+
<template slot="header">
|
|
15
|
+
<span>{{ comTable.tableOption.menuTitle || '操作' }}</span>
|
|
16
16
|
</template>
|
|
17
17
|
<template slot-scope="{ row, column: tableColumn, $index }">
|
|
18
18
|
<div>
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
@click.stop="comTable.rowEdit(row, $index)"
|
|
26
26
|
v-if="vaildData(comTable.tableOption.editBtn, config.editBtn)"
|
|
27
27
|
>
|
|
28
|
-
{{
|
|
28
|
+
{{ '编 辑' }}
|
|
29
29
|
</el-button>
|
|
30
30
|
<el-button
|
|
31
31
|
:type="`text`"
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
@click.stop="comTable.rowDel(row, $index)"
|
|
36
36
|
v-if="vaildData(comTable.tableOption.delBtn, config.delBtn)"
|
|
37
37
|
>
|
|
38
|
-
{{
|
|
38
|
+
{{ '删 除' }}
|
|
39
39
|
</el-button>
|
|
40
40
|
</template>
|
|
41
41
|
<slot
|
|
@@ -53,11 +53,11 @@
|
|
|
53
53
|
</template>
|
|
54
54
|
|
|
55
55
|
<script>
|
|
56
|
-
import config from
|
|
57
|
-
import base from
|
|
56
|
+
import config from './config.js';
|
|
57
|
+
import base from '../../utils/base.js';
|
|
58
58
|
|
|
59
59
|
export default {
|
|
60
|
-
name:
|
|
60
|
+
name: 'comTable',
|
|
61
61
|
mixins: [base()],
|
|
62
62
|
components: {},
|
|
63
63
|
data() {
|
|
@@ -65,7 +65,7 @@ export default {
|
|
|
65
65
|
config: config,
|
|
66
66
|
};
|
|
67
67
|
},
|
|
68
|
-
inject: [
|
|
68
|
+
inject: ['comTable'],
|
|
69
69
|
mounted: function () {},
|
|
70
70
|
};
|
|
71
71
|
</script>
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
</template>
|
|
30
30
|
|
|
31
31
|
<script>
|
|
32
|
-
import base from
|
|
33
|
-
import config from
|
|
32
|
+
import base from '../../utils/base.js';
|
|
33
|
+
import config from './config.js';
|
|
34
34
|
|
|
35
35
|
export default {
|
|
36
|
-
name:
|
|
36
|
+
name: 'column-slot',
|
|
37
37
|
mixins: [base()],
|
|
38
|
-
inject: [
|
|
38
|
+
inject: ['comTable'],
|
|
39
39
|
data: function () {
|
|
40
40
|
return {
|
|
41
41
|
config: config,
|
|
@@ -2,23 +2,15 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<slot name="header"></slot>
|
|
4
4
|
<!-- 动态列 -->
|
|
5
|
-
<template v-for="
|
|
5
|
+
<template v-for="column in columnOption">
|
|
6
6
|
<column-dynamic
|
|
7
7
|
v-if="column.children && column.children.length > 0"
|
|
8
8
|
:columnOption="column"
|
|
9
9
|
:key="column.label"
|
|
10
10
|
>
|
|
11
11
|
</column-dynamic>
|
|
12
|
-
<column-slot
|
|
13
|
-
v-
|
|
14
|
-
:column="column"
|
|
15
|
-
:column-option="columnOption"
|
|
16
|
-
>
|
|
17
|
-
<template
|
|
18
|
-
v-for="item in comTable.mainSlot"
|
|
19
|
-
slot-scope="scope"
|
|
20
|
-
:slot="item"
|
|
21
|
-
>
|
|
12
|
+
<column-slot v-else :column="column" :column-option="columnOption" :key="column.id">
|
|
13
|
+
<template v-for="item in comTable.mainSlot" slot-scope="scope" :slot="item">
|
|
22
14
|
<slot v-bind="scope" :name="item"></slot>
|
|
23
15
|
</template>
|
|
24
16
|
</column-slot>
|
|
@@ -28,10 +20,10 @@
|
|
|
28
20
|
</template>
|
|
29
21
|
|
|
30
22
|
<script>
|
|
31
|
-
import columnDynamic from
|
|
32
|
-
import columnSlot from
|
|
23
|
+
import columnDynamic from './column-dynamic';
|
|
24
|
+
import columnSlot from './column-slot';
|
|
33
25
|
export default {
|
|
34
|
-
name:
|
|
26
|
+
name: 'comTable',
|
|
35
27
|
data() {
|
|
36
28
|
return {};
|
|
37
29
|
},
|
|
@@ -39,7 +31,7 @@ export default {
|
|
|
39
31
|
columnSlot,
|
|
40
32
|
columnDynamic,
|
|
41
33
|
},
|
|
42
|
-
inject: [
|
|
34
|
+
inject: ['comTable'],
|
|
43
35
|
props: {
|
|
44
36
|
columnOption: Array,
|
|
45
37
|
},
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
// 配置文件
|
|
2
2
|
export default {
|
|
3
3
|
menuWidth: 220,
|
|
4
|
-
menuFixed:
|
|
5
|
-
menuAlign:
|
|
6
|
-
menuHeaderAlign:
|
|
4
|
+
menuFixed: 'right',
|
|
5
|
+
menuAlign: 'center',
|
|
6
|
+
menuHeaderAlign: 'center',
|
|
7
7
|
// 显隐
|
|
8
8
|
editBtn: true,
|
|
9
9
|
delBtn: true,
|
|
10
10
|
selectClearBtn: true,
|
|
11
11
|
tip: true,
|
|
12
12
|
menu: true,
|
|
13
|
-
indexLabel:
|
|
14
|
-
indexFixed:
|
|
15
|
-
selectionFixed:
|
|
13
|
+
indexLabel: '#',
|
|
14
|
+
indexFixed: 'left',
|
|
15
|
+
selectionFixed: 'left',
|
|
16
16
|
columnFixed: null,
|
|
17
|
-
width:
|
|
18
|
-
dropRowClass:
|
|
17
|
+
width: '100%',
|
|
18
|
+
dropRowClass: '.el-table__body-wrapper > table > tbody',
|
|
19
19
|
showOverflowTooltip: true,
|
|
20
|
-
rowKey:
|
|
20
|
+
rowKey: 'id',
|
|
21
21
|
};
|
|
@@ -6,16 +6,16 @@
|
|
|
6
6
|
v-if="vaildData(tableOption.tip, config.tip) && tableOption.selection"
|
|
7
7
|
>
|
|
8
8
|
<span class="com-table__tip-name">
|
|
9
|
-
{{
|
|
9
|
+
{{ '当前表格已选择' }}
|
|
10
10
|
<span class="com-table__tip-count">{{ selectLen }}</span>
|
|
11
|
-
{{
|
|
11
|
+
{{ '项' }}
|
|
12
12
|
</span>
|
|
13
13
|
<el-button
|
|
14
14
|
type="text"
|
|
15
15
|
size="small"
|
|
16
16
|
@click="clearSelection"
|
|
17
17
|
v-if="vaildData(tableOption.selectClearBtn, config.selectClearBtn) && tableOption.selection"
|
|
18
|
-
>{{
|
|
18
|
+
>{{ '清 空' }}</el-button
|
|
19
19
|
>
|
|
20
20
|
</el-tag>
|
|
21
21
|
<!-- 表格主体 -->
|
|
@@ -61,17 +61,17 @@
|
|
|
61
61
|
</div>
|
|
62
62
|
</template>
|
|
63
63
|
<script>
|
|
64
|
-
import init from
|
|
65
|
-
import tablePage from
|
|
66
|
-
import column from
|
|
67
|
-
import columnMenu from
|
|
68
|
-
import columnDefault from
|
|
69
|
-
import config from
|
|
70
|
-
import { getColumn } from
|
|
71
|
-
import sortable from
|
|
64
|
+
import init from '../../utils/init.js';
|
|
65
|
+
import tablePage from './table-page';
|
|
66
|
+
import column from './column';
|
|
67
|
+
import columnMenu from './column-menu';
|
|
68
|
+
import columnDefault from './column-default';
|
|
69
|
+
import config from './config.js';
|
|
70
|
+
import { getColumn } from '../../utils/util.js';
|
|
71
|
+
import sortable from 'sortablejs';
|
|
72
72
|
|
|
73
73
|
export default {
|
|
74
|
-
name:
|
|
74
|
+
name: 'comTable',
|
|
75
75
|
mixins: [init()],
|
|
76
76
|
provide() {
|
|
77
77
|
return {
|
|
@@ -110,13 +110,13 @@ export default {
|
|
|
110
110
|
return this.tableOption.rowKey;
|
|
111
111
|
},
|
|
112
112
|
tableColumnName() {
|
|
113
|
-
return
|
|
113
|
+
return 'elTableColumn';
|
|
114
114
|
},
|
|
115
115
|
isRowSort() {
|
|
116
116
|
return this.tableOption.rowSort;
|
|
117
117
|
},
|
|
118
118
|
isAutoHeight() {
|
|
119
|
-
return this.tableOption.height ===
|
|
119
|
+
return this.tableOption.height === 'auto';
|
|
120
120
|
},
|
|
121
121
|
mainSlot() {
|
|
122
122
|
let result = [];
|
|
@@ -205,7 +205,7 @@ export default {
|
|
|
205
205
|
},
|
|
206
206
|
// 刷新表格
|
|
207
207
|
refreshTable(callback) {
|
|
208
|
-
console.log(
|
|
208
|
+
console.log('refreshTable');
|
|
209
209
|
this.reload = Math.random();
|
|
210
210
|
this.$nextTick(() => {
|
|
211
211
|
callback && callback();
|
|
@@ -213,59 +213,59 @@ export default {
|
|
|
213
213
|
},
|
|
214
214
|
// 清除多选
|
|
215
215
|
clearSelection() {
|
|
216
|
-
console.log(
|
|
217
|
-
this.$emit(
|
|
216
|
+
console.log('clearSelection');
|
|
217
|
+
this.$emit('selection-clear', this.deepClone(this.tableSelect));
|
|
218
218
|
this.$refs.table.clearSelection();
|
|
219
219
|
},
|
|
220
220
|
// 初始化
|
|
221
221
|
dataInit() {
|
|
222
|
-
console.log(
|
|
222
|
+
console.log('dataInit');
|
|
223
223
|
this.list = this.data;
|
|
224
224
|
this.list.forEach((ele, index) => {
|
|
225
|
-
this.$set(ele,
|
|
225
|
+
this.$set(ele, '$index', index);
|
|
226
226
|
});
|
|
227
227
|
},
|
|
228
228
|
//设置单选
|
|
229
229
|
currentRowChange(currentRow, oldCurrentRow) {
|
|
230
|
-
console.log(
|
|
231
|
-
this.$emit(
|
|
230
|
+
console.log('currentRowChange');
|
|
231
|
+
this.$emit('current-row-change', currentRow, oldCurrentRow);
|
|
232
232
|
},
|
|
233
233
|
// 选择回调
|
|
234
234
|
selectionChange(val) {
|
|
235
|
-
console.log(
|
|
235
|
+
console.log('selectionChange');
|
|
236
236
|
this.tableSelect = val;
|
|
237
|
-
this.$emit(
|
|
237
|
+
this.$emit('selection-change', this.tableSelect);
|
|
238
238
|
},
|
|
239
239
|
// 单个选择回调
|
|
240
240
|
select(selection, row) {
|
|
241
|
-
console.log(
|
|
242
|
-
this.$emit(
|
|
241
|
+
console.log('select');
|
|
242
|
+
this.$emit('select', selection, row);
|
|
243
243
|
},
|
|
244
244
|
// 点击勾选全选 Checkbox
|
|
245
245
|
selectAll(selection) {
|
|
246
|
-
console.log(
|
|
247
|
-
this.$emit(
|
|
246
|
+
console.log('selectAll');
|
|
247
|
+
this.$emit('select-all', selection);
|
|
248
248
|
},
|
|
249
249
|
// 行点击
|
|
250
250
|
rowClick(row, event, column) {
|
|
251
|
-
console.log(
|
|
252
|
-
this.$emit(
|
|
251
|
+
console.log('rowClick');
|
|
252
|
+
this.$emit('row-click', row, event, column);
|
|
253
253
|
},
|
|
254
254
|
// 编辑
|
|
255
255
|
rowEdit(row, index) {
|
|
256
|
-
console.log(
|
|
257
|
-
this.$emit(
|
|
256
|
+
console.log('rowEdit', row, index);
|
|
257
|
+
this.$emit('row-edit', row, index, () => {});
|
|
258
258
|
},
|
|
259
259
|
// 删除
|
|
260
260
|
rowDel(row, index) {
|
|
261
|
-
console.log(
|
|
262
|
-
this.$emit(
|
|
261
|
+
console.log('rowDel', row, index);
|
|
262
|
+
this.$emit('row-del', row, index, () => {});
|
|
263
263
|
},
|
|
264
264
|
// 拖拽
|
|
265
265
|
tableDrop(type, el, callback) {
|
|
266
|
-
console.log(
|
|
266
|
+
console.log('tableDrop');
|
|
267
267
|
if (this.isSortable !== true) {
|
|
268
|
-
if (type ==
|
|
268
|
+
if (type == 'row' && !this.isRowSort) {
|
|
269
269
|
return;
|
|
270
270
|
}
|
|
271
271
|
}
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
</template>
|
|
21
21
|
|
|
22
22
|
<script>
|
|
23
|
-
import base from
|
|
23
|
+
import base from '../../utils/base.js';
|
|
24
24
|
|
|
25
25
|
export default {
|
|
26
|
-
name:
|
|
27
|
-
inject: [
|
|
26
|
+
name: 'comTable',
|
|
27
|
+
inject: ['comTable'],
|
|
28
28
|
mixins: [base()],
|
|
29
29
|
data() {
|
|
30
30
|
return {
|
|
@@ -35,17 +35,17 @@ export default {
|
|
|
35
35
|
currentPage: 1, // 当前页数
|
|
36
36
|
pageSize: 10, // 每页显示多少条
|
|
37
37
|
pageSizes: [10, 20, 30, 40, 50, 100],
|
|
38
|
-
layout:
|
|
38
|
+
layout: 'total, sizes, prev, pager, next, jumper',
|
|
39
39
|
background: true, // 背景颜色
|
|
40
40
|
},
|
|
41
41
|
};
|
|
42
42
|
},
|
|
43
43
|
created() {
|
|
44
44
|
this.pageInit();
|
|
45
|
-
this.comTable.$emit(
|
|
45
|
+
this.comTable.$emit('on-load', this.defaultPage);
|
|
46
46
|
},
|
|
47
47
|
watch: {
|
|
48
|
-
|
|
48
|
+
'comTable.page': {
|
|
49
49
|
handler() {
|
|
50
50
|
this.pageInit();
|
|
51
51
|
},
|
|
@@ -66,33 +66,33 @@ export default {
|
|
|
66
66
|
this.updateValue();
|
|
67
67
|
},
|
|
68
68
|
updateValue() {
|
|
69
|
-
console.log(
|
|
70
|
-
this.comTable.$emit(
|
|
69
|
+
console.log('updateValue defaultPage', this.defaultPage);
|
|
70
|
+
this.comTable.$emit('update:page', this.defaultPage);
|
|
71
71
|
},
|
|
72
72
|
//下一页事件
|
|
73
73
|
nextClick(val) {
|
|
74
|
-
console.log(
|
|
75
|
-
this.comTable.$emit(
|
|
74
|
+
console.log('nextClick', val);
|
|
75
|
+
this.comTable.$emit('next-click', val);
|
|
76
76
|
},
|
|
77
77
|
//上一页事件
|
|
78
78
|
prevClick(val) {
|
|
79
|
-
console.log(
|
|
80
|
-
this.comTable.$emit(
|
|
79
|
+
console.log('prevClick', val);
|
|
80
|
+
this.comTable.$emit('prev-click', val);
|
|
81
81
|
},
|
|
82
82
|
// 页大小回调
|
|
83
83
|
sizeChange(val) {
|
|
84
84
|
this.defaultPage.currentPage = 1;
|
|
85
85
|
this.defaultPage.pageSize = val;
|
|
86
86
|
this.updateValue();
|
|
87
|
-
console.log(
|
|
88
|
-
this.comTable.$emit(
|
|
89
|
-
this.comTable.$emit(
|
|
87
|
+
console.log('sizeChange', val);
|
|
88
|
+
this.comTable.$emit('on-load', this.defaultPage);
|
|
89
|
+
this.comTable.$emit('size-change', val);
|
|
90
90
|
},
|
|
91
91
|
// 页码回调
|
|
92
92
|
currentChange(val) {
|
|
93
93
|
this.updateValue();
|
|
94
|
-
this.comTable.$emit(
|
|
95
|
-
this.comTable.$emit(
|
|
94
|
+
this.comTable.$emit('on-load', this.defaultPage);
|
|
95
|
+
this.comTable.$emit('current-change', val);
|
|
96
96
|
},
|
|
97
97
|
},
|
|
98
98
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
2
|
+
<el-tabs
|
|
3
|
+
v-model="active"
|
|
4
|
+
:before-leave="option.beforeLeave"
|
|
5
|
+
:tab-position="option.position"
|
|
6
|
+
:type="option.type"
|
|
7
|
+
>
|
|
8
|
+
<el-tab-pane
|
|
9
|
+
:name="index + ''"
|
|
10
|
+
:disabled="column.disabled"
|
|
11
|
+
:label="column.label"
|
|
12
|
+
v-for="(column, index) in columnOption"
|
|
13
|
+
:key="index"
|
|
14
|
+
>
|
|
15
|
+
</el-tab-pane>
|
|
16
|
+
</el-tabs>
|
|
17
17
|
</template>
|
|
18
18
|
|
|
19
|
-
<script>
|
|
19
|
+
<script>
|
|
20
20
|
export default {
|
|
21
|
-
name:
|
|
21
|
+
name: 'comTabs',
|
|
22
22
|
props: {
|
|
23
23
|
option: {
|
|
24
24
|
type: Object,
|
|
@@ -30,12 +30,12 @@ export default {
|
|
|
30
30
|
},
|
|
31
31
|
data() {
|
|
32
32
|
return {
|
|
33
|
-
active:
|
|
33
|
+
active: '0',
|
|
34
34
|
};
|
|
35
35
|
},
|
|
36
36
|
watch: {
|
|
37
37
|
active() {
|
|
38
|
-
this.$emit(
|
|
38
|
+
this.$emit('change', this.tabsObj);
|
|
39
39
|
},
|
|
40
40
|
},
|
|
41
41
|
computed: {
|