Refactor #3965 - For Inplace
parent
5296fc2bd3
commit
4804652c20
|
@ -25,8 +25,7 @@ const styles = `
|
||||||
const classes = {
|
const classes = {
|
||||||
root: ({ props }) => ['p-inplace p-component', { 'p-inplace-closable': props.closable }],
|
root: ({ props }) => ['p-inplace p-component', { 'p-inplace-closable': props.closable }],
|
||||||
display: ({ props }) => ['p-inplace-display', { 'p-disabled': props.disabled }],
|
display: ({ props }) => ['p-inplace-display', { 'p-disabled': props.disabled }],
|
||||||
content: 'p-inplace-content',
|
content: 'p-inplace-content'
|
||||||
closeButton: ({ props }) => props.closeIcon
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const { load: loadStyle } = useStyle(styles, { id: 'primevue_inplace_style', manual: true });
|
const { load: loadStyle } = useStyle(styles, { id: 'primevue_inplace_style', manual: true });
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<IPButton v-if="closable" :aria-label="closeAriaLabel" @click="close" :pt="ptm('closeButton')" v-bind="closeButtonProps">
|
<IPButton v-if="closable" :aria-label="closeAriaLabel" @click="close" :pt="ptm('closeButton')" v-bind="closeButtonProps">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<slot name="closeicon">
|
<slot name="closeicon">
|
||||||
<component :is="closeIcon ? 'span' : 'TimesIcon'" :class="cx('closeButton')" v-bind="ptm('closeButton')['icon']"></component>
|
<component :is="closeIcon ? 'span' : 'TimesIcon'" :class="closeIcon" v-bind="ptm('closeButton')['icon']"></component>
|
||||||
</slot>
|
</slot>
|
||||||
</template>
|
</template>
|
||||||
</IPButton>
|
</IPButton>
|
||||||
|
@ -17,10 +17,10 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import BaseInplace from './BaseInplace.vue';
|
|
||||||
import Button from 'primevue/button';
|
import Button from 'primevue/button';
|
||||||
import FocusTrap from 'primevue/focustrap';
|
import FocusTrap from 'primevue/focustrap';
|
||||||
import TimesIcon from 'primevue/icons/times';
|
import TimesIcon from 'primevue/icons/times';
|
||||||
|
import BaseInplace from './BaseInplace.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Inplace',
|
name: 'Inplace',
|
||||||
|
|
Loading…
Reference in New Issue