Refactor #3965 - For Chip

This commit is contained in:
Tuğçe Küçükoğlu 2023-05-25 17:42:11 +03:00
parent 78954bcc45
commit 5296fc2bd3
2 changed files with 5 additions and 5 deletions

View file

@ -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',