sh-view 2.9.0 → 2.9.2
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sh-view",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.2",
|
|
4
4
|
"description": "基于vxe-table二次封装,更包含Alert,Badge,Card,CodeEditor,Col,Corner,CountTo,Drawer,Empty,Form,Header,Icon,List,Loading,Modal,Noticebar,Poptip,Progress,PullRefresh,Query,Result,Row,Split,Grid,Table,Tabs,Tag,Toolbar,Tree,Upload,WaterFall,WaterMark等丰富组件库",
|
|
5
5
|
"main": "packages/index.js",
|
|
6
6
|
"typings": "types/index.d.ts",
|
|
@@ -97,7 +97,6 @@ export default function (props, context, proxy, isGrid) {
|
|
|
97
97
|
const tableEditRules = ref({}) // 表格根据表头自动生成验证规则
|
|
98
98
|
const tableFilterText = ref('') // 全局过滤关键字
|
|
99
99
|
const tableCurrentRowData = ref(null) // 表格当前高亮行
|
|
100
|
-
const tableRowDefaultData = ref({}) // 根据表头生成行默认值
|
|
101
100
|
|
|
102
101
|
const wrapHeight = computed(() => ([100, '100%', 'auto'].includes(props.height) ? '100%' : 'auto'))
|
|
103
102
|
const hasTree = computed(() => props.columns.some(_ => _.treeNode))
|
|
@@ -569,8 +568,8 @@ export default function (props, context, proxy, isGrid) {
|
|
|
569
568
|
}
|
|
570
569
|
// 新增行按钮
|
|
571
570
|
const handleTableAddRow = async (rows, index = -1, isTool = false) => {
|
|
572
|
-
let addRows = rows ? $vUtils.clone(rows, true) :
|
|
573
|
-
if (
|
|
571
|
+
let addRows = rows ? $vUtils.clone(rows, true) : props.insertDefault || {}
|
|
572
|
+
if (typeof props.onToolbarBtnAddBefore === 'function') {
|
|
574
573
|
addRows = await props.onToolbarBtnAddBefore(addRows)
|
|
575
574
|
}
|
|
576
575
|
// 删除主键,以防排序冲突
|