2023-05-24 14:15:21 +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-inputtextarea-resizable {
|
|
|
|
overflow: hidden;
|
|
|
|
resize: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-fluid .p-inputtextarea {
|
|
|
|
width: 100%;
|
|
|
|
}
|
2023-05-24 14:15:21 +00:00
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
const classes = {
|
|
|
|
root: ({ instance, props }) => [
|
|
|
|
'p-inputtextarea p-inputtext p-component',
|
|
|
|
{
|
|
|
|
'p-filled': instance.filled,
|
|
|
|
'p-inputtextarea-resizable ': props.autoResize
|
|
|
|
}
|
|
|
|
]
|
|
|
|
};
|
|
|
|
|
2023-07-03 22:20:35 +00:00
|
|
|
const { load: loadStyle } = useStyle(styles, { name: 'textarea', manual: true });
|
2023-05-24 14:15:21 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'BaseTextarea',
|
|
|
|
extends: BaseComponent,
|
|
|
|
props: {
|
|
|
|
modelValue: null,
|
|
|
|
autoResize: Boolean
|
|
|
|
},
|
|
|
|
css: {
|
2023-05-30 12:28:04 +00:00
|
|
|
classes,
|
|
|
|
loadStyle
|
2023-05-24 14:15:21 +00:00
|
|
|
},
|
2023-05-30 12:28:04 +00:00
|
|
|
provide() {
|
|
|
|
return {
|
|
|
|
$parentInstance: this
|
|
|
|
};
|
2023-05-24 14:15:21 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|