w-ui-v1 1.1.9 → 1.1.11
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 +16 -2
package/package.json
CHANGED
package/w-card/w-card.vue
CHANGED
|
@@ -252,13 +252,27 @@ const getTitleValue = (value: any, title: string) => {
|
|
|
252
252
|
//判断编辑按钮是否显示
|
|
253
253
|
function isShowEditButton(){
|
|
254
254
|
if(props.editButtonConfig.show){
|
|
255
|
-
return props.editButtonConfig.show(
|
|
255
|
+
return props.editButtonConfig.show({
|
|
256
|
+
data:items.value,
|
|
257
|
+
sourceId:props.sourceId
|
|
258
|
+
})
|
|
256
259
|
}else{
|
|
257
260
|
return props.page.buttons.includes('dtmplEdit')
|
|
258
261
|
}
|
|
259
262
|
|
|
260
263
|
}
|
|
261
264
|
|
|
265
|
+
//编辑按钮文字
|
|
266
|
+
function EditButtonLabel(){
|
|
267
|
+
if(props.editButtonConfig.label){
|
|
268
|
+
return props.editButtonConfig.label({
|
|
269
|
+
sourceId:props.sourceId
|
|
270
|
+
})
|
|
271
|
+
}else{
|
|
272
|
+
return "编辑"
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
}
|
|
262
276
|
</script>
|
|
263
277
|
|
|
264
278
|
<template>
|
|
@@ -345,7 +359,7 @@ function isShowEditButton(){
|
|
|
345
359
|
</wd-button>
|
|
346
360
|
<wd-button :round="false" type="warning" size="small" class="btn" v-if="isShowEditButton()"
|
|
347
361
|
@click="goto('edit')">
|
|
348
|
-
{{
|
|
362
|
+
{{EditButtonLabel()}}
|
|
349
363
|
</wd-button>
|
|
350
364
|
<!-- //假删除按钮,在新增、编辑页面才会出现 -->
|
|
351
365
|
<wd-button :round="false" size="small" class="btn" type="error" @click="delerelation"
|