cnhis-design-vue 0.3.6-beta → 0.3.7-beta
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/es/big-table/index.css +3 -2
- package/es/big-table/index.js +267 -41
- package/es/button-print/index.css +4 -3
- package/es/drag-layout/index.css +4 -3
- package/es/grid/index.css +5 -4
- package/es/index.css +3 -2
- package/es/index.js +267 -41
- package/package.json +2 -1
- package/packages/big-table/src/BigTable.vue +84 -22
- package/packages/big-table/src/assets/style/table-base.less +6 -0
- package/packages/big-table/src/assets/style/table-global.less +9 -1
- package/packages/big-table/src/bigTableProps.ts +5 -0
- package/packages/big-table/src/bigTableState.ts +1 -0
- package/packages/big-table/src/components/edit-form/edit-input.vue +19 -0
- package/packages/big-table/src/components/edit-form/edit-select-table.vue +127 -0
- package/packages/big-table/src/components/edit-form/edit-select.vue +36 -0
- /package/packages/big-table/src/components/{edit-form → edit-form3}/EditForm.vue +0 -0
- /package/packages/big-table/src/components/{edit-form → edit-form3}/edit-component/edit-date-picker/edit-date-picker.vue +0 -0
- /package/packages/big-table/src/components/{edit-form → edit-form3}/edit-component/edit-digital/edit-digital.vue +0 -0
- /package/packages/big-table/src/components/{edit-form → edit-form3}/edit-component/edit-input/edit-input.vue +0 -0
- /package/packages/big-table/src/components/{edit-form → edit-form3}/edit-component/edit-input-password/edit-input-password.vue +0 -0
- /package/packages/big-table/src/components/{edit-form → edit-form3}/edit-component/edit-month-picker/edit-month-picker.vue +0 -0
- /package/packages/big-table/src/components/{edit-form → edit-form3}/edit-component/edit-search/edit-search.vue +0 -0
- /package/packages/big-table/src/components/{edit-form → edit-form3}/edit-component/edit-search-more/edit-search-more.vue +0 -0
- /package/packages/big-table/src/components/{edit-form → edit-form3}/edit-component/edit-select/edit-select.vue +0 -0
- /package/packages/big-table/src/components/{edit-form → edit-form3}/edit-component/edit-select-multiple/edit-select-multiple.vue +0 -0
- /package/packages/big-table/src/components/{edit-form → edit-form3}/edit-component/edit-textarea/edit-textarea.vue +0 -0
- /package/packages/big-table/src/components/{edit-form → edit-form3}/edit-component/edit-time-picker/edit-time-picker.vue +0 -0
- /package/packages/big-table/src/components/{edit-form → edit-form3}/edit-component/editFormProps.ts +0 -0
- /package/packages/big-table/src/components/{edit-form → edit-form3}/edit-component/register-com.ts +0 -0
- /package/packages/big-table/src/components/{edit-form → edit-form3}/hooks/useConfigData.ts +0 -0
- /package/packages/big-table/src/components/{edit-form → edit-form3}/hooks/useDateType.ts +0 -0
- /package/packages/big-table/src/components/{edit-form → edit-form3}/hooks/useFormCommon.ts +0 -0
- /package/packages/big-table/src/components/{edit-form → edit-form3}/hooks/useItemDefault.ts +0 -0
- /package/packages/big-table/src/components/{edit-form → edit-form3}/hooks/useSearch.ts +0 -0
- /package/packages/big-table/src/components/{edit-form → edit-form3}/hooks/useValidateRules.ts +0 -0
- /package/packages/big-table/src/components/{edit-form → edit-form3}/interface.ts +0 -0
- /package/packages/big-table/src/components/{edit-form → edit-form3}/types.ts +0 -0
- /package/packages/big-table/src/components/{edit-form → edit-form3}/utils.ts +0 -0
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
:scroll-x="{ enabled: false }"
|
|
88
88
|
:scroll-y="{ gt: 50 }"
|
|
89
89
|
:row-style="getRowStyle"
|
|
90
|
-
:edit-config="
|
|
90
|
+
:edit-config="state.editConfig"
|
|
91
91
|
:expand-config="{
|
|
92
92
|
lazy: true,
|
|
93
93
|
accordion: columnConfig && columnConfig.accordion,
|
|
@@ -162,7 +162,7 @@ export default create({
|
|
|
162
162
|
</script>
|
|
163
163
|
|
|
164
164
|
<script lang="tsx" setup>
|
|
165
|
-
import { computed, nextTick, onMounted, reactive, ref, useAttrs, watch,
|
|
165
|
+
import { computed, nextTick, onMounted, reactive, ref, useAttrs, watch, isReactive, shallowReactive, onActivated, onUnmounted } from "vue";
|
|
166
166
|
import { useRoute } from 'vue-router';
|
|
167
167
|
import bigTableState from "./bigTableState";
|
|
168
168
|
import bigTableProps from "./bigTableProps";
|
|
@@ -177,6 +177,9 @@ import TextOverTooltip from "./components/TextOverTooltip.vue";
|
|
|
177
177
|
// import SvgIcon from '@/component/svg/index.vue';
|
|
178
178
|
import SvgIcon from "./components/SvgIcon.vue";
|
|
179
179
|
// import EditForm from './components/edit-form/EditForm.vue';
|
|
180
|
+
import EditSelectTable from './components/edit-form/edit-select-table.vue'
|
|
181
|
+
import EditInput from './components/edit-form/edit-input.vue'
|
|
182
|
+
import EditSelect from './components/edit-form/edit-select.vue'
|
|
180
183
|
import {
|
|
181
184
|
NButton,
|
|
182
185
|
NCheckbox,
|
|
@@ -191,7 +194,10 @@ import {
|
|
|
191
194
|
NSwitch,
|
|
192
195
|
NPopover,
|
|
193
196
|
NDropdown,
|
|
194
|
-
NPopconfirm
|
|
197
|
+
NPopconfirm,
|
|
198
|
+
NSelect,
|
|
199
|
+
NPagination,
|
|
200
|
+
NEmpty
|
|
195
201
|
} from "naive-ui";
|
|
196
202
|
import { useMessage } from 'naive-ui'
|
|
197
203
|
import CGrid from '~/grid';
|
|
@@ -351,6 +357,7 @@ const treeConfig = computed(() => {
|
|
|
351
357
|
}
|
|
352
358
|
return result;
|
|
353
359
|
});
|
|
360
|
+
|
|
354
361
|
const hideAllWrap = (e: any) => {
|
|
355
362
|
const path = e.path || (e.composedPath && e.composedPath());
|
|
356
363
|
const noWrap = (className: string) => {
|
|
@@ -373,7 +380,8 @@ const unBindDocumentClick = () => {
|
|
|
373
380
|
}
|
|
374
381
|
onMounted(() => {
|
|
375
382
|
bindDocumentClick();
|
|
376
|
-
state.tableHeight = handleTableHeight(state, props);
|
|
383
|
+
// state.tableHeight = handleTableHeight(state, props);
|
|
384
|
+
state.tableHeight = '520px'
|
|
377
385
|
|
|
378
386
|
// // 子列表在mounted后初始化 直接watch无法触发
|
|
379
387
|
if (!props.isNestTable) return;
|
|
@@ -411,7 +419,6 @@ const loadColumn = (config: any) => {
|
|
|
411
419
|
// this.hasOnlyIcon = config.hasOnlyIcon;
|
|
412
420
|
let columns = formatColumns(config);
|
|
413
421
|
columns = handleGroupColums(columns, props);
|
|
414
|
-
console.log("columns--------------", columns);
|
|
415
422
|
xGrid.value && xGrid.value.reloadColumn(columns);
|
|
416
423
|
|
|
417
424
|
setGroupTreeExpand();
|
|
@@ -422,7 +429,7 @@ const loadData = async (data: any) => {
|
|
|
422
429
|
state.isShowEmpty = !data?.length;
|
|
423
430
|
|
|
424
431
|
const list = JSON.parse(JSON.stringify(data));
|
|
425
|
-
console.log("list--------------", list);
|
|
432
|
+
// console.log("list--------------", list);
|
|
426
433
|
let table = xGrid.value;
|
|
427
434
|
if (!table) return;
|
|
428
435
|
let formatList = setChecklist(list);
|
|
@@ -437,6 +444,14 @@ const loadData = async (data: any) => {
|
|
|
437
444
|
await handleFormTheUniqueKey();
|
|
438
445
|
}
|
|
439
446
|
|
|
447
|
+
formatList = formatList.map((v: any) => {
|
|
448
|
+
return {
|
|
449
|
+
...v,
|
|
450
|
+
selectTableShow: false,
|
|
451
|
+
selectTableDisable: false
|
|
452
|
+
}
|
|
453
|
+
})
|
|
454
|
+
|
|
440
455
|
// reloadData 替换 loadData 保存setting之后需要表格重新reload
|
|
441
456
|
// loadData 加载数据
|
|
442
457
|
// reloadData 加载数据并清除所有状态
|
|
@@ -504,7 +519,13 @@ const formatColumns = (map: any) => {
|
|
|
504
519
|
*/
|
|
505
520
|
// 配置列表
|
|
506
521
|
let { selectType } = getOtherConfigInit() || {};
|
|
507
|
-
let { isBatchSelect, fieldList, showButtonTop, isScanMultiTable } = map;
|
|
522
|
+
let { isBatchSelect, fieldList, showButtonTop, isScanMultiTable, isEdit = false, editConfig = {} } = map;
|
|
523
|
+
if (isEdit) {
|
|
524
|
+
state.editConfig = Object.assign(state.editConfig, editConfig, {
|
|
525
|
+
mode: 'cell',
|
|
526
|
+
autoClear: true
|
|
527
|
+
})
|
|
528
|
+
}
|
|
508
529
|
if (selectType) {
|
|
509
530
|
// 有设置 selectType 强制可选。
|
|
510
531
|
isBatchSelect = 1;
|
|
@@ -623,12 +644,17 @@ const formatColumns = (map: any) => {
|
|
|
623
644
|
showOverflow: "title",
|
|
624
645
|
treeNode: treeNode,
|
|
625
646
|
type: type,
|
|
626
|
-
slots: {
|
|
627
|
-
|
|
628
|
-
|
|
647
|
+
// slots: {
|
|
648
|
+
// default: (params: any) => {
|
|
649
|
+
// return formatter(params, item);
|
|
650
|
+
// },
|
|
651
|
+
// },
|
|
652
|
+
slots: isEdit ? {
|
|
653
|
+
edit: (params: any) => formatterEdit(params, item)
|
|
654
|
+
} : {
|
|
655
|
+
default: (params: any) => formatter(params, item)
|
|
629
656
|
},
|
|
630
|
-
}
|
|
631
|
-
editRender: generateEditRender(item),
|
|
657
|
+
editRender: isEdit ? {} : generateEditRender(item)
|
|
632
658
|
});
|
|
633
659
|
|
|
634
660
|
if (filterField && !props.isNestTable && !isScanMultiTable) {
|
|
@@ -669,6 +695,27 @@ const formatColumns = (map: any) => {
|
|
|
669
695
|
state.columnLen = currentColumns.filter((item: any) => item.visible).length;
|
|
670
696
|
return columns;
|
|
671
697
|
};
|
|
698
|
+
const formatterEdit = (params: any, col: any) => {
|
|
699
|
+
let { row, column, $rowIndex, rowIndex } = params
|
|
700
|
+
let formType = column.formType || col.formType
|
|
701
|
+
if (formType === 'selectTable') {
|
|
702
|
+
const propsData = {
|
|
703
|
+
row,
|
|
704
|
+
col
|
|
705
|
+
}
|
|
706
|
+
return <EditSelectTable {...propsData} v-model={[row[col.columnName], 'value']} />
|
|
707
|
+
}
|
|
708
|
+
if (formType === 'input') {
|
|
709
|
+
return <EditInput v-model={[row[col.columnName], 'value']} />
|
|
710
|
+
}
|
|
711
|
+
if (formType === 'select') {
|
|
712
|
+
const propsData = {
|
|
713
|
+
col
|
|
714
|
+
}
|
|
715
|
+
return <EditSelect {...propsData} v-model={[row[col.columnName], 'value']} />
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
|
|
672
719
|
// 表格渲染逻辑
|
|
673
720
|
const formatter = (params: any, col: any) => {
|
|
674
721
|
let { row, column, $rowIndex } = params;
|
|
@@ -761,7 +808,7 @@ const formatter = (params: any, col: any) => {
|
|
|
761
808
|
{tileBtnList}
|
|
762
809
|
{foldBtnList}
|
|
763
810
|
{inlineBtnList}
|
|
764
|
-
</span
|
|
811
|
+
</span>
|
|
765
812
|
];
|
|
766
813
|
}
|
|
767
814
|
|
|
@@ -1408,13 +1455,27 @@ const setCheckedMehod = (setChecked: any, row: any) => {
|
|
|
1408
1455
|
}
|
|
1409
1456
|
updateAddCheckedRows(row);
|
|
1410
1457
|
}
|
|
1458
|
+
//
|
|
1459
|
+
const getFormType = (field: string) => {
|
|
1460
|
+
const obj = props.columnConfig.fieldList.find((v: any) => v.columnName === field)
|
|
1461
|
+
return obj ? obj.formType || '' : ''
|
|
1462
|
+
}
|
|
1411
1463
|
//行点击
|
|
1412
1464
|
const handlerClickRow = (data: any) => {
|
|
1413
|
-
console.log("data");
|
|
1465
|
+
console.log("data.", data);
|
|
1414
1466
|
if (isScanMultiTable.value || props.isInlineOperating) return false;
|
|
1415
1467
|
if (vexutils.has(data?.row, GROUP_TITLE_KEY)) return false;
|
|
1416
1468
|
if (state.isTriggerSelectionChange && state.isTree == 0) return false;
|
|
1417
1469
|
let table = xGrid.value;
|
|
1470
|
+
|
|
1471
|
+
const formType = getFormType(data.column.field)
|
|
1472
|
+
console.log('formType---', formType)
|
|
1473
|
+
if (formType === 'selectTable') {
|
|
1474
|
+
// table.clearActived().then(() => {
|
|
1475
|
+
table.setActiveCell(data.row, data.column.field)
|
|
1476
|
+
// })
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1418
1479
|
// 嵌套表与主表click切换时需要清除上次的选中
|
|
1419
1480
|
isAboutNestTable.value && emit('resetNestLastClickTable', table);
|
|
1420
1481
|
|
|
@@ -1974,7 +2035,7 @@ const generateInlineBtnList = (row: any, index: any) => {
|
|
|
1974
2035
|
];
|
|
1975
2036
|
};
|
|
1976
2037
|
// 按钮 jsx
|
|
1977
|
-
const getTileBtnList = (row: any, index:
|
|
2038
|
+
const getTileBtnList = (row: any, index: number) => {
|
|
1978
2039
|
return [
|
|
1979
2040
|
(row.tileBtnList?.length &&
|
|
1980
2041
|
row.tileBtnList.map((btn: any, j: any) => {
|
|
@@ -2010,7 +2071,7 @@ const getTileBtnList = (row: any, index: any) => {
|
|
|
2010
2071
|
];
|
|
2011
2072
|
};
|
|
2012
2073
|
// 按钮事件
|
|
2013
|
-
const clickBtn = (row: any, btn: any, index:
|
|
2074
|
+
const clickBtn = (row: any, btn: any, index: number, e: any, j: any) => {
|
|
2014
2075
|
e.preventDefault();
|
|
2015
2076
|
e.stopPropagation();
|
|
2016
2077
|
recordClickBtnInfo(row, index);
|
|
@@ -2049,7 +2110,7 @@ const getBtnIcon = (btn: any, mr = "8px") => {
|
|
|
2049
2110
|
return [icon];
|
|
2050
2111
|
};
|
|
2051
2112
|
// 按钮 jsx
|
|
2052
|
-
const getFoldBtnList = (row: any, index:
|
|
2113
|
+
const getFoldBtnList = (row: any, index: number) => {
|
|
2053
2114
|
const getOptions = () => {
|
|
2054
2115
|
return row.foldBtnList.map((b: any, j: any) => {
|
|
2055
2116
|
return {
|
|
@@ -2498,14 +2559,15 @@ defineExpose({
|
|
|
2498
2559
|
clearChecked,
|
|
2499
2560
|
setCurrentRow,
|
|
2500
2561
|
loadColumn,
|
|
2501
|
-
removeInsert
|
|
2562
|
+
removeInsert,
|
|
2563
|
+
xGrid
|
|
2502
2564
|
})
|
|
2503
2565
|
|
|
2504
2566
|
</script>
|
|
2505
|
-
<style lang="less" scoped>
|
|
2506
|
-
@import "./assets/style/table-base.less";
|
|
2567
|
+
<style lang="less" scoped src="./assets/style/table-base.less">
|
|
2568
|
+
// @import "./assets/style/table-base.less";
|
|
2507
2569
|
</style>
|
|
2508
2570
|
|
|
2509
|
-
<style lang="less">
|
|
2510
|
-
@import "./assets/style/table-global.less";
|
|
2571
|
+
<style lang="less" src="./assets/style/table-global.less">
|
|
2572
|
+
// @import "./assets/style/table-global.less";
|
|
2511
2573
|
</style>
|
|
@@ -120,6 +120,11 @@ const bigTableProps = {
|
|
|
120
120
|
// 曾经的mapActions
|
|
121
121
|
resetInlineBatchEdit: Function,
|
|
122
122
|
resetBatchEditRowStatus: Function,
|
|
123
|
+
|
|
124
|
+
querySelectTableList: {
|
|
125
|
+
type: Function,
|
|
126
|
+
default: () => Promise.resolve({ rows: [], pageCount: 0 })
|
|
127
|
+
}
|
|
123
128
|
};
|
|
124
129
|
|
|
125
130
|
export default bigTableProps;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script lang="tsx">
|
|
2
|
+
import { defineComponent, ref, reactive } from 'vue'
|
|
3
|
+
import { NInput } from 'naive-ui'
|
|
4
|
+
|
|
5
|
+
export default defineComponent({
|
|
6
|
+
name: 'EditInput',
|
|
7
|
+
inheritAttrs: false,
|
|
8
|
+
components: {
|
|
9
|
+
NInput
|
|
10
|
+
},
|
|
11
|
+
setup (props, { attrs, slots, emit }) {
|
|
12
|
+
|
|
13
|
+
return () => [
|
|
14
|
+
<NInput {...attrs} />
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
})
|
|
18
|
+
</script>
|
|
19
|
+
<style lang="less" scoped></style>
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
<script lang="tsx">
|
|
2
|
+
import { defineComponent, ref, reactive } from 'vue'
|
|
3
|
+
import { NSelect, NPagination, NEmpty, NSpin, NSpace } from 'naive-ui'
|
|
4
|
+
import CGrid from '~/grid'
|
|
5
|
+
import vexutils from '@/utils/vexutils'
|
|
6
|
+
|
|
7
|
+
export default defineComponent({
|
|
8
|
+
name: 'EditSelectTable',
|
|
9
|
+
inheritAttrs: false,
|
|
10
|
+
components: {
|
|
11
|
+
NSelect,
|
|
12
|
+
CGrid,
|
|
13
|
+
NPagination,
|
|
14
|
+
NEmpty,
|
|
15
|
+
NSpin,
|
|
16
|
+
NSpace
|
|
17
|
+
},
|
|
18
|
+
props: {
|
|
19
|
+
row: {
|
|
20
|
+
type: Object,
|
|
21
|
+
default: {}
|
|
22
|
+
},
|
|
23
|
+
col: {
|
|
24
|
+
type: Object,
|
|
25
|
+
default: {}
|
|
26
|
+
},
|
|
27
|
+
value: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: ''
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
emits: ['update:value'],
|
|
33
|
+
setup (props, { attrs, slots, emit }) {
|
|
34
|
+
const state = reactive({
|
|
35
|
+
value: props.value,
|
|
36
|
+
row: JSON.parse(JSON.stringify(props.row)),
|
|
37
|
+
page: 1,
|
|
38
|
+
pageCount: 0,
|
|
39
|
+
keyword: '',
|
|
40
|
+
data: [],
|
|
41
|
+
columns: JSON.parse(JSON.stringify(props.col.tableColumn)),
|
|
42
|
+
loading: false,
|
|
43
|
+
show: true
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
const selectTableFocus = () => {
|
|
47
|
+
state.show = true
|
|
48
|
+
state.page = 1
|
|
49
|
+
state.keyword = ''
|
|
50
|
+
state.pageCount = 0
|
|
51
|
+
querySelectTableList()
|
|
52
|
+
}
|
|
53
|
+
const querySelectTableList = async () => {
|
|
54
|
+
state.loading = true
|
|
55
|
+
const obj = {
|
|
56
|
+
page: state.page,
|
|
57
|
+
keyword: state.keyword
|
|
58
|
+
}
|
|
59
|
+
const { data, pageCount } = await props.col.querySelectTableList(obj)
|
|
60
|
+
state.data = data
|
|
61
|
+
state.pageCount = pageCount
|
|
62
|
+
state.loading = false
|
|
63
|
+
}
|
|
64
|
+
let selectTableSearch = (value: string) => {
|
|
65
|
+
console.log('keyword', value)
|
|
66
|
+
state.keyword = value
|
|
67
|
+
querySelectTableList()
|
|
68
|
+
}
|
|
69
|
+
selectTableSearch = vexutils.debounce(selectTableSearch, 800)
|
|
70
|
+
const getSelectTableGrid = () => {
|
|
71
|
+
const config = {
|
|
72
|
+
border: 'outer',
|
|
73
|
+
resizable: true,
|
|
74
|
+
autoResize: true,
|
|
75
|
+
showOverflow: true,
|
|
76
|
+
showHeaderOverflow: true,
|
|
77
|
+
highlightHoverRow: true,
|
|
78
|
+
highlightCurrentRow: true,
|
|
79
|
+
maxHeight: '500',
|
|
80
|
+
align: 'center',
|
|
81
|
+
columns: state.columns,
|
|
82
|
+
data: state.data
|
|
83
|
+
}
|
|
84
|
+
return <CGrid {...config} onCellClick={(data: any) => onCellClick(data)}>{{
|
|
85
|
+
empty: () => <NEmpty description="无数据" />
|
|
86
|
+
}}</CGrid>
|
|
87
|
+
}
|
|
88
|
+
const onCellClick = (data: any) => {
|
|
89
|
+
emit('update:value', data.row?.[props.col.columnName]);
|
|
90
|
+
state.show = false
|
|
91
|
+
}
|
|
92
|
+
const getPagination = () => {
|
|
93
|
+
const pagination = () => {
|
|
94
|
+
return <NPagination
|
|
95
|
+
v-model={[state.page, 'page']}
|
|
96
|
+
pageCount={state.pageCount}
|
|
97
|
+
onUpdatePage={(page: number) => querySelectTableList()}
|
|
98
|
+
/>
|
|
99
|
+
}
|
|
100
|
+
return <NSpace justify="space-between" align="center" style="margin-top: 5px">{[`共${state.pageCount}条`, pagination()]}</NSpace>
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return () => [
|
|
104
|
+
<NSelect
|
|
105
|
+
class="form-select-table"
|
|
106
|
+
options={[]}
|
|
107
|
+
consistentMenuWidth={false}
|
|
108
|
+
clearable
|
|
109
|
+
filterable
|
|
110
|
+
to={false}
|
|
111
|
+
show={state.show}
|
|
112
|
+
loading={state.loading}
|
|
113
|
+
onFocus={selectTableFocus}
|
|
114
|
+
onBlur={() => state.show = false}
|
|
115
|
+
onSearch={selectTableSearch}
|
|
116
|
+
>{{
|
|
117
|
+
action: () => state.loading ? <NSpace justify="center"><NSpin class="spin" size="small" /></NSpace> : [getSelectTableGrid(), state.pageCount ? getPagination() : null]
|
|
118
|
+
}}</NSelect>
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
})
|
|
122
|
+
</script>
|
|
123
|
+
<style lang="less" scoped>
|
|
124
|
+
.spin {
|
|
125
|
+
margin: 80px auto;
|
|
126
|
+
}
|
|
127
|
+
</style>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<script lang="tsx">
|
|
2
|
+
import { defineComponent, ref, reactive } from 'vue'
|
|
3
|
+
import { NSelect } from 'naive-ui'
|
|
4
|
+
|
|
5
|
+
export default defineComponent({
|
|
6
|
+
name: 'EditSelect',
|
|
7
|
+
inheritAttrs: false,
|
|
8
|
+
components: {
|
|
9
|
+
NSelect
|
|
10
|
+
},
|
|
11
|
+
props: {
|
|
12
|
+
col: {
|
|
13
|
+
type: Object,
|
|
14
|
+
default: {}
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
setup (props, { attrs, slots, emit }) {
|
|
18
|
+
const state = reactive({
|
|
19
|
+
options: JSON.parse(JSON.stringify(props.col.options || []))
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
return () => [
|
|
23
|
+
<NSelect
|
|
24
|
+
{...attrs}
|
|
25
|
+
options={state.options}
|
|
26
|
+
consistentMenuWidth={false}
|
|
27
|
+
clearable
|
|
28
|
+
filterable
|
|
29
|
+
to={false}
|
|
30
|
+
placeholder="请选择"
|
|
31
|
+
/>
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
})
|
|
35
|
+
</script>
|
|
36
|
+
<style lang="less" scoped></style>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/packages/big-table/src/components/{edit-form → edit-form3}/edit-component/editFormProps.ts
RENAMED
|
File without changes
|
/package/packages/big-table/src/components/{edit-form → edit-form3}/edit-component/register-com.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/packages/big-table/src/components/{edit-form → edit-form3}/hooks/useValidateRules.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|