mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 08:52:34 +00:00
Refactor #3965 - For Chip
This commit is contained in:
parent
78954bcc45
commit
5296fc2bd3
2 changed files with 5 additions and 5 deletions
|
@ -3,18 +3,18 @@
|
|||
<slot>
|
||||
<img v-if="image" :src="image" v-bind="ptm('image')" />
|
||||
<component v-else-if="$slots.icon" :is="$slots.icon" :class="cx('icon')" v-bind="ptm('icon')" />
|
||||
<span v-else-if="icon" :class="cx('icon')" v-bind="ptm('icon')" />
|
||||
<span v-else-if="icon" :class="[cx('icon'), icon]" v-bind="ptm('icon')" />
|
||||
<div v-if="label" :class="cx('label')" v-bind="ptm('label')">{{ label }}</div>
|
||||
</slot>
|
||||
<slot v-if="removable" name="removeicon" :onClick="close" :onKeydown="onKeydown">
|
||||
<component :is="removeIcon ? 'span' : 'TimesCircleIcon'" tabindex="0" :class="cx('removeIcon')" @click="close" @keydown="onKeydown" v-bind="ptm('removeIcon')"></component>
|
||||
<component :is="removeIcon ? 'span' : 'TimesCircleIcon'" tabindex="0" :class="[cx('removeIcon'), removeIcon]" @click="close" @keydown="onKeydown" v-bind="ptm('removeIcon')"></component>
|
||||
</slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BaseChip from './BaseChip.vue';
|
||||
import TimesCircleIcon from 'primevue/icons/timescircle';
|
||||
import BaseChip from './BaseChip.vue';
|
||||
|
||||
export default {
|
||||
name: 'Chip',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue