primevue-mirror/components/lib/textarea/BaseTextarea.vue

48 lines
914 B
Vue
Raw Normal View History

2023-05-24 14:15:21 +00:00
<script>
import BaseComponent from 'primevue/basecomponent';
import { useStyle } from 'primevue/usestyle';
const styles = `
2023-09-26 09:14:27 +00:00
@layer primevue {
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
}
]
};
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: {
classes,
loadStyle
2023-05-24 14:15:21 +00:00
},
provide() {
return {
$parentInstance: this
};
2023-05-24 14:15:21 +00:00
}
};
</script>