Refactor #3965 - Refactor on responsive components
parent
6693602ca3
commit
dfcbf5152a
|
@ -111,13 +111,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import BaseCarousel from './BaseCarousel.vue';
|
|
||||||
import ChevronDownIcon from 'primevue/icons/chevrondown';
|
import ChevronDownIcon from 'primevue/icons/chevrondown';
|
||||||
import ChevronLeftIcon from 'primevue/icons/chevronleft';
|
import ChevronLeftIcon from 'primevue/icons/chevronleft';
|
||||||
import ChevronRightIcon from 'primevue/icons/chevronright';
|
import ChevronRightIcon from 'primevue/icons/chevronright';
|
||||||
import ChevronUpIcon from 'primevue/icons/chevronup';
|
import ChevronUpIcon from 'primevue/icons/chevronup';
|
||||||
import Ripple from 'primevue/ripple';
|
import Ripple from 'primevue/ripple';
|
||||||
import { DomHandler, UniqueComponentId } from 'primevue/utils';
|
import { DomHandler, UniqueComponentId } from 'primevue/utils';
|
||||||
|
import BaseCarousel from './BaseCarousel.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Carousel',
|
name: 'Carousel',
|
||||||
|
@ -553,7 +553,7 @@ export default {
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
if (this.responsiveOptions) {
|
if (this.responsiveOptions && !this.isUnstyled) {
|
||||||
let _responsiveOptions = [...this.responsiveOptions];
|
let _responsiveOptions = [...this.responsiveOptions];
|
||||||
|
|
||||||
_responsiveOptions.sort((data1, data2) => {
|
_responsiveOptions.sort((data1, data2) => {
|
||||||
|
|
|
@ -408,7 +408,7 @@ export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$el.setAttribute(this.attributeSelector, '');
|
this.$el.setAttribute(this.attributeSelector, '');
|
||||||
|
|
||||||
if (this.responsiveLayout === 'stack' && !this.scrollable) {
|
if (this.responsiveLayout === 'stack' && !this.scrollable && !this.unstyled) {
|
||||||
this.createResponsiveStyle();
|
this.createResponsiveStyle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,6 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import BaseDialog from './BaseDialog.vue';
|
|
||||||
import FocusTrap from 'primevue/focustrap';
|
import FocusTrap from 'primevue/focustrap';
|
||||||
import TimesIcon from 'primevue/icons/times';
|
import TimesIcon from 'primevue/icons/times';
|
||||||
import WindowMaximizeIcon from 'primevue/icons/windowmaximize';
|
import WindowMaximizeIcon from 'primevue/icons/windowmaximize';
|
||||||
|
@ -52,6 +51,7 @@ import Portal from 'primevue/portal';
|
||||||
import Ripple from 'primevue/ripple';
|
import Ripple from 'primevue/ripple';
|
||||||
import { DomHandler, UniqueComponentId, ZIndexUtils } from 'primevue/utils';
|
import { DomHandler, UniqueComponentId, ZIndexUtils } from 'primevue/utils';
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
|
import BaseDialog from './BaseDialog.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Dialog',
|
name: 'Dialog',
|
||||||
|
@ -250,7 +250,7 @@ export default {
|
||||||
this.closeButton = el;
|
this.closeButton = el;
|
||||||
},
|
},
|
||||||
createStyle() {
|
createStyle() {
|
||||||
if (!this.styleElement) {
|
if (!this.styleElement && !this.isUnstyled) {
|
||||||
this.styleElement = document.createElement('style');
|
this.styleElement = document.createElement('style');
|
||||||
this.styleElement.type = 'text/css';
|
this.styleElement.type = 'text/css';
|
||||||
document.head.appendChild(this.styleElement);
|
document.head.appendChild(this.styleElement);
|
||||||
|
|
|
@ -432,7 +432,7 @@ export default {
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
if (this.responsiveOptions) {
|
if (this.responsiveOptions && !this.isUnstyled) {
|
||||||
this.sortedResponsiveOptions = [...this.responsiveOptions];
|
this.sortedResponsiveOptions = [...this.responsiveOptions];
|
||||||
this.sortedResponsiveOptions.sort((data1, data2) => {
|
this.sortedResponsiveOptions.sort((data1, data2) => {
|
||||||
const value1 = data1.breakpoint;
|
const value1 = data1.breakpoint;
|
||||||
|
|
|
@ -484,7 +484,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
createStyle() {
|
createStyle() {
|
||||||
if (!this.styleElement) {
|
if (!this.styleElement && !this.isUnstyled) {
|
||||||
this.$el.setAttribute(this.attributeSelector, '');
|
this.$el.setAttribute(this.attributeSelector, '');
|
||||||
this.styleElement = document.createElement('style');
|
this.styleElement = document.createElement('style');
|
||||||
this.styleElement.type = 'text/css';
|
this.styleElement.type = 'text/css';
|
||||||
|
|
|
@ -16,13 +16,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import BaseOverlayPanel from './BaseOverlayPanel.vue';
|
|
||||||
import FocusTrap from 'primevue/focustrap';
|
import FocusTrap from 'primevue/focustrap';
|
||||||
import TimesIcon from 'primevue/icons/times';
|
import TimesIcon from 'primevue/icons/times';
|
||||||
import OverlayEventBus from 'primevue/overlayeventbus';
|
import OverlayEventBus from 'primevue/overlayeventbus';
|
||||||
import Portal from 'primevue/portal';
|
import Portal from 'primevue/portal';
|
||||||
import Ripple from 'primevue/ripple';
|
import Ripple from 'primevue/ripple';
|
||||||
import { ConnectedOverlayScrollHandler, DomHandler, UniqueComponentId, ZIndexUtils } from 'primevue/utils';
|
import { ConnectedOverlayScrollHandler, DomHandler, UniqueComponentId, ZIndexUtils } from 'primevue/utils';
|
||||||
|
import BaseOverlayPanel from './BaseOverlayPanel.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'OverlayPanel',
|
name: 'OverlayPanel',
|
||||||
|
@ -239,7 +239,7 @@ export default {
|
||||||
this.container = el;
|
this.container = el;
|
||||||
},
|
},
|
||||||
createStyle() {
|
createStyle() {
|
||||||
if (!this.styleElement) {
|
if (!this.styleElement && !this.isUnstyled) {
|
||||||
this.styleElement = document.createElement('style');
|
this.styleElement = document.createElement('style');
|
||||||
this.styleElement.type = 'text/css';
|
this.styleElement.type = 'text/css';
|
||||||
document.head.appendChild(this.styleElement);
|
document.head.appendChild(this.styleElement);
|
||||||
|
|
|
@ -141,7 +141,7 @@ export default {
|
||||||
this.changePage(this.page);
|
this.changePage(this.page);
|
||||||
},
|
},
|
||||||
createStyle() {
|
createStyle() {
|
||||||
if (this.hasBreakpoints()) {
|
if (this.hasBreakpoints() && !this.isUnstyled) {
|
||||||
this.styleElement = document.createElement('style');
|
this.styleElement = document.createElement('style');
|
||||||
this.styleElement.type = 'text/css';
|
this.styleElement.type = 'text/css';
|
||||||
document.head.appendChild(this.styleElement);
|
document.head.appendChild(this.styleElement);
|
||||||
|
|
|
@ -787,7 +787,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
createStyle() {
|
createStyle() {
|
||||||
if (!this.styleElement) {
|
if (!this.styleElement && !this.isUnstyled) {
|
||||||
this.$el.setAttribute(this.attributeSelector, '');
|
this.$el.setAttribute(this.attributeSelector, '');
|
||||||
this.styleElement = document.createElement('style');
|
this.styleElement = document.createElement('style');
|
||||||
this.styleElement.type = 'text/css';
|
this.styleElement.type = 'text/css';
|
||||||
|
|
|
@ -22,10 +22,10 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import BaseToast from './BaseToast.vue';
|
|
||||||
import Portal from 'primevue/portal';
|
import Portal from 'primevue/portal';
|
||||||
import ToastEventBus from 'primevue/toasteventbus';
|
import ToastEventBus from 'primevue/toasteventbus';
|
||||||
import { ObjectUtils, UniqueComponentId, ZIndexUtils } from 'primevue/utils';
|
import { ObjectUtils, UniqueComponentId, ZIndexUtils } from 'primevue/utils';
|
||||||
|
import BaseToast from './BaseToast.vue';
|
||||||
import ToastMessage from './ToastMessage.vue';
|
import ToastMessage from './ToastMessage.vue';
|
||||||
|
|
||||||
var messageIdx = 0;
|
var messageIdx = 0;
|
||||||
|
@ -111,7 +111,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
createStyle() {
|
createStyle() {
|
||||||
if (!this.styleElement) {
|
if (!this.styleElement && !this.isUnstyled) {
|
||||||
this.styleElement = document.createElement('style');
|
this.styleElement = document.createElement('style');
|
||||||
this.styleElement.type = 'text/css';
|
this.styleElement.type = 'text/css';
|
||||||
document.head.appendChild(this.styleElement);
|
document.head.appendChild(this.styleElement);
|
||||||
|
|
Loading…
Reference in New Issue