el-plus-crud 0.0.76 → 0.0.78

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.
@@ -162,7 +162,7 @@ const props = withDefaults(
162
162
  const elPlusTableRef = ref()
163
163
 
164
164
  // 顶部Tab数据
165
- const tableTabVal = ref(props.tableConfig?.tabConf?.tabs[0].value ?? '')
165
+ const tableTabVal = ref(props.tableConfig?.tabConf?.tabs[props.tableConfig?.tabConf?.default || 0].value ?? '')
166
166
  const tabStatic = ref({} as any)
167
167
  const getTabLabel = computed(() => (item: ITableTabItem) => {
168
168
  if (item.key) {
package/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "el-plus-crud",
3
- "version": "0.0.76",
3
+ "version": "0.0.78",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "el-plus-crud",
9
- "version": "0.0.76",
9
+ "version": "0.0.78",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@element-plus/icons-vue": "^2.1.0",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "el-plus-crud",
3
3
  "description": "采用Vue3 + TS,封装的element-plus数据驱动表单、列表组件",
4
4
  "author": "K.D.Jack",
5
- "version": "0.0.76",
5
+ "version": "0.0.78",
6
6
  "license": "MIT",
7
7
  "private": false,
8
8
  "main": "dist/el-plus-crud.mjs",
package/types/index.d.ts CHANGED
@@ -50,7 +50,12 @@ export type IDescItem = {
50
50
  limit?: number
51
51
  required?: boolean | ((data?: any) => boolean)
52
52
  style?: IBaseObj | ((data?: any) => IBaseObj)
53
+ // 事件
53
54
  on?: { [key: string]: Function }
55
+ // 查看详情
56
+ linkId?: string | ((val: any, formData: any) => string)
57
+ linkType?: string | ((val: any, formData: any) => string)
58
+ linkLabel?: string | ((val: any, formData: any) => string)
54
59
  // 内部使用属性
55
60
  _vif?: boolean
56
61
  }
@@ -83,16 +88,13 @@ export interface IFormDescItem extends IDescItem {
83
88
  tableConfig?: ITableConfig
84
89
  tableAttr?: IBaseObj
85
90
  tableEvent?: IBaseObj
86
- // 查看详情
87
- linkId?: string | ((val: any, formData: any) => string)
88
- linkType?: string | ((val: any, formData: any) => string)
89
- linkLabel?: string | ((val: any, formData: any) => string)
91
+
90
92
  // 内部接口
91
93
  _type?: string
92
94
  _tip?: string
93
95
  _disabled?: boolean
94
96
  _attrs?: IBaseObj
95
- _label?: null
97
+ _label?: string
96
98
  _prop?: IBaseObj
97
99
  _options?: Array<IFormDescItemOptionItem>
98
100
  // 其他属性
@@ -276,6 +278,8 @@ export interface ITableTabConf {
276
278
  fetch?: IFetch<any>
277
279
  // 查询条件
278
280
  queryMap?: any
281
+ // 默认选中的下标
282
+ default?: number
279
283
  }
280
284
 
281
285
  /**