w-ui-v1 1.1.4 → 1.1.6
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 +1 -1
- package/w-card/w-card.vue +11 -2
- package/w-form-control/w-form-control.vue +1 -1
- package/w-table/w-table.vue +10 -1
package/package.json
CHANGED
package/w-card/w-card.vue
CHANGED
|
@@ -42,6 +42,15 @@ const props = defineProps({
|
|
|
42
42
|
enumMap:{
|
|
43
43
|
type:Object,
|
|
44
44
|
default:{}
|
|
45
|
+
},
|
|
46
|
+
visible:{
|
|
47
|
+
type:Number,
|
|
48
|
+
default:null
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
editButtonName:{
|
|
52
|
+
type:String,
|
|
53
|
+
default:''
|
|
45
54
|
}
|
|
46
55
|
})
|
|
47
56
|
console.log(props.enumMap)
|
|
@@ -107,7 +116,7 @@ const items = computed(() => {
|
|
|
107
116
|
const wFormMessageBoxRef = ref()
|
|
108
117
|
const showMoreButns = ref(false)
|
|
109
118
|
const isExpanded = ref(false)
|
|
110
|
-
const defaultVisible = 4 // 默认显示行数量
|
|
119
|
+
const defaultVisible =props.visible|| 4 // 默认显示行数量
|
|
111
120
|
|
|
112
121
|
const visibleItems = computed(() => {
|
|
113
122
|
return isExpanded.value ? items.value : items.value.slice(0, defaultVisible)
|
|
@@ -324,7 +333,7 @@ const getTitleValue = (value: any, title: string) => {
|
|
|
324
333
|
</wd-button>
|
|
325
334
|
<wd-button :round="false" type="warning" size="small" class="btn" v-if="props.page.buttons.includes('dtmplEdit')"
|
|
326
335
|
@click="goto('edit')">
|
|
327
|
-
编辑
|
|
336
|
+
{{props.editButtonName||"编辑"}}
|
|
328
337
|
</wd-button>
|
|
329
338
|
<!-- //假删除按钮,在新增、编辑页面才会出现 -->
|
|
330
339
|
<wd-button :round="false" size="small" class="btn" type="error" @click="delerelation"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<wd-picker v-else-if="subItem.extControlType === 'select'" :disabled="subItem.disabled" :label="subItem.title"
|
|
27
27
|
label-width="100px" :prop="subItem.id" clearable :modelValue="modelValue"
|
|
28
28
|
:placeholder="subItem.disabled ? '无需输入' : `请选择${subItem.title}`"
|
|
29
|
-
:rules="[{ required: subItem.required, message: `请选择${subItem.title}` }]" :columns="[
|
|
29
|
+
:rules="[{ required: subItem.required, message: `请选择${subItem.title}` }]" :columns="Enumcolumn[subItem.mstrucId]"
|
|
30
30
|
@confirm="(e) => { change(e) }" @clear="clear" />
|
|
31
31
|
|
|
32
32
|
<wd-select-picker v-else-if="subItem.controlType === 'select'&&subItem.extControlType === 'multiselect'" :disabled="subItem.disabled" :label="subItem.title"
|
package/w-table/w-table.vue
CHANGED
|
@@ -36,6 +36,15 @@ const props = defineProps({
|
|
|
36
36
|
showSearch:{
|
|
37
37
|
type:Boolean,
|
|
38
38
|
default:true
|
|
39
|
+
},
|
|
40
|
+
visible:{
|
|
41
|
+
type:Number,
|
|
42
|
+
default:null
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
editButtonName:{
|
|
46
|
+
type:String,
|
|
47
|
+
default:''
|
|
39
48
|
}
|
|
40
49
|
})
|
|
41
50
|
const emits=defineEmits(['loadData'])
|
|
@@ -154,7 +163,7 @@ defineExpose({
|
|
|
154
163
|
</template>
|
|
155
164
|
<!-- 卡片 -->
|
|
156
165
|
<view class="card-list" v-if="dataList.length > 0">
|
|
157
|
-
<w-card :enumMap="Enumcolumn" v-for="(item, index) in dataList" :key="index" :car-index="index" :page="pageData" :item-data="item"
|
|
166
|
+
<w-card :visible="props.visible" :editButtonName="props.editButtonName" :enumMap="Enumcolumn" v-for="(item, index) in dataList" :key="index" :car-index="index" :page="pageData" :item-data="item"
|
|
158
167
|
:source-id="sourceId" @refresh="paging.reload()"/>
|
|
159
168
|
</view>
|
|
160
169
|
<template #bottom>
|