Use cn for data-p
parent
94fe4e59a7
commit
443fd41198
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<DocSectionText v-bind="$attrs">
|
<DocSectionText v-bind="$attrs">
|
||||||
<p>InputText is used with the <i>v-model</i> property for two-way value binding.</p>
|
<p>InputText provides <i>small</i> and <i>large</i> sizes as alternatives to the base.</p>
|
||||||
</DocSectionText>
|
</DocSectionText>
|
||||||
<div class="card flex flex-col items-center gap-4">
|
<div class="card flex flex-col items-center gap-4">
|
||||||
<PlexInputText v-model="value1" type="text" size="small" placeholder="Small" />
|
<PlexInputText v-model="value1" type="text" size="small" placeholder="Small" />
|
||||||
|
|
|
@ -34,15 +34,10 @@ export default defineNuxtConfig({
|
||||||
runtimeConfig: {
|
runtimeConfig: {
|
||||||
GITHUB_TOKEN: ''
|
GITHUB_TOKEN: ''
|
||||||
},
|
},
|
||||||
primevue: {
|
|
||||||
options: {
|
|
||||||
theme: 'none'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
app: {
|
app: {
|
||||||
baseURL: baseUrl,
|
baseURL: baseUrl,
|
||||||
head: {
|
head: {
|
||||||
title: 'Tailwind CSS based Vue UI Component Library',
|
title: 'Plex UI Component Library for Vue.js',
|
||||||
meta: [
|
meta: [
|
||||||
{ charset: 'utf-8' },
|
{ charset: 'utf-8' },
|
||||||
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
|
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
|
||||||
|
|
|
@ -22,6 +22,6 @@ const theme = ref({
|
||||||
px-3 py-2 p-fluid:w-full
|
px-3 py-2 p-fluid:w-full
|
||||||
p-small:text-sm p-small:px-[0.625rem] p-small-py-[0.375rem]
|
p-small:text-sm p-small:px-[0.625rem] p-small-py-[0.375rem]
|
||||||
p-large:text-lg p-small:px-[0.875rem] p-small-py-[0.625rem]
|
p-large:text-lg p-small:px-[0.875rem] p-small-py-[0.625rem]
|
||||||
transition-colors duration-200`
|
transition-colors duration-200 shadow-[0_1px_2px_0_rgba(18,18,23,0.05)]`
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { cn } from '@primeuix/utils/classnames';
|
||||||
import { mergeProps } from 'vue';
|
import { mergeProps } from 'vue';
|
||||||
import BaseInputText from './BaseInputText.vue';
|
import BaseInputText from './BaseInputText.vue';
|
||||||
|
|
||||||
|
@ -28,21 +29,12 @@ export default {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
dataP() {
|
dataP() {
|
||||||
const p = [];
|
return cn({
|
||||||
if (this.$invalid) {
|
invalid: this.$invalid,
|
||||||
p.push('invalid');
|
fluid: this.$fluid,
|
||||||
}
|
filled: this.$variant === 'filled',
|
||||||
if (this.size) {
|
[this.size]: this.size
|
||||||
p.push(this.size);
|
});
|
||||||
}
|
|
||||||
if (this.$fluid) {
|
|
||||||
p.push('fluid');
|
|
||||||
}
|
|
||||||
if (this.$variant === 'filled') {
|
|
||||||
p.push('filled');
|
|
||||||
}
|
|
||||||
|
|
||||||
return p.join(' ');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue