mirror of
https://github.com/fugary/simple-element-plus-template.git
synced 2025-12-10 04:47:50 +00:00
图标选择控件
This commit is contained in:
@@ -27,7 +27,7 @@ const props = defineProps({
|
||||
required: true
|
||||
},
|
||||
/**
|
||||
* @type {'large'|'small'|'default'}
|
||||
* @type {''|'large'|'small'|'default'}
|
||||
*/
|
||||
buttonSize: {
|
||||
type: String,
|
||||
@@ -75,19 +75,21 @@ const props = defineProps({
|
||||
<template
|
||||
#default="scope"
|
||||
>
|
||||
<el-button
|
||||
v-for="(button, index) in column.buttons"
|
||||
:key="index"
|
||||
:type="button.type"
|
||||
:icon="button.icon"
|
||||
:size="button.size||buttonSize"
|
||||
:disabled="button.disabled"
|
||||
:round="button.round"
|
||||
:circle="button.circle"
|
||||
@click="button.click&&button.click(scope.row, scope)"
|
||||
>
|
||||
{{ button.label || $t(button.labelKey) }}
|
||||
</el-button>
|
||||
<template v-for="(button, index) in column.buttons">
|
||||
<el-button
|
||||
v-if="!button.buttonIf||button.buttonIf(scope.row, scope)"
|
||||
:key="index"
|
||||
:type="button.type"
|
||||
:icon="button.icon"
|
||||
:size="button.size||buttonSize"
|
||||
:disabled="button.disabled"
|
||||
:round="button.round"
|
||||
:circle="button.circle"
|
||||
@click="button.click&&button.click(scope.row, scope)"
|
||||
>
|
||||
{{ button.label || $t(button.labelKey) }}
|
||||
</el-button>
|
||||
</template>
|
||||
<slot
|
||||
name="default"
|
||||
v-bind="scope"
|
||||
|
||||
Reference in New Issue
Block a user