2023-05-24 09:52:20 +00:00
|
|
|
<script>
|
|
|
|
import BaseComponent from 'primevue/basecomponent';
|
|
|
|
import { useStyle } from 'primevue/usestyle';
|
|
|
|
|
|
|
|
const styles = `
|
2023-09-26 06:40:02 +00:00
|
|
|
@layer primevue.core {
|
2023-09-25 19:11:55 +00:00
|
|
|
.p-inplace .p-inplace-display {
|
|
|
|
display: inline;
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-inplace .p-inplace-content {
|
|
|
|
display: inline;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-fluid .p-inplace.p-inplace-closable .p-inplace-content {
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-fluid .p-inplace.p-inplace-closable .p-inplace-content > .p-inputtext {
|
|
|
|
flex: 1 1 auto;
|
|
|
|
width: 1%;
|
|
|
|
}
|
2023-05-24 09:52:20 +00:00
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
const classes = {
|
|
|
|
root: ({ props }) => ['p-inplace p-component', { 'p-inplace-closable': props.closable }],
|
|
|
|
display: ({ props }) => ['p-inplace-display', { 'p-disabled': props.disabled }],
|
2023-05-25 14:42:26 +00:00
|
|
|
content: 'p-inplace-content'
|
2023-05-24 09:52:20 +00:00
|
|
|
};
|
|
|
|
|
2023-07-03 22:20:35 +00:00
|
|
|
const { load: loadStyle } = useStyle(styles, { name: 'inplace', manual: true });
|
2023-05-24 09:52:20 +00:00
|
|
|
|
|
|
|
export default {
|
2023-05-24 10:09:45 +00:00
|
|
|
name: 'BaseInplace',
|
2023-05-24 09:52:20 +00:00
|
|
|
extends: BaseComponent,
|
|
|
|
props: {
|
|
|
|
closable: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
},
|
|
|
|
active: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
},
|
|
|
|
disabled: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
},
|
|
|
|
closeIcon: {
|
|
|
|
type: String,
|
|
|
|
default: undefined
|
|
|
|
},
|
|
|
|
displayProps: {
|
|
|
|
type: null,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
closeButtonProps: {
|
|
|
|
type: null,
|
|
|
|
default: null
|
|
|
|
}
|
|
|
|
},
|
|
|
|
css: {
|
2023-05-30 12:28:04 +00:00
|
|
|
classes,
|
|
|
|
loadStyle
|
2023-05-24 09:52:20 +00:00
|
|
|
},
|
2023-05-30 12:28:04 +00:00
|
|
|
provide() {
|
|
|
|
return {
|
|
|
|
$parentInstance: this
|
|
|
|
};
|
2023-05-24 09:52:20 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|