Refactor #5257
parent
d77e66415b
commit
23a21c2407
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div ref="container" :class="cx('root')" role="group" :aria-labelledby="ariaLabelledby" v-bind="ptm('root')">
|
<div ref="container" :class="cx('root')" role="group" :aria-labelledby="ariaLabelledby" v-bind="ptmi('root')">
|
||||||
<div
|
<div
|
||||||
v-for="(option, i) of options"
|
v-for="(option, i) of options"
|
||||||
:key="getOptionRenderKey(option)"
|
:key="getOptionRenderKey(option)"
|
||||||
|
@ -33,6 +33,7 @@ import BaseSelectButton from './BaseSelectButton.vue';
|
||||||
export default {
|
export default {
|
||||||
name: 'SelectButton',
|
name: 'SelectButton',
|
||||||
extends: BaseSelectButton,
|
extends: BaseSelectButton,
|
||||||
|
inheritAttrs: false,
|
||||||
emits: ['update:modelValue', 'focus', 'blur', 'change'],
|
emits: ['update:modelValue', 'focus', 'blur', 'change'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<Portal>
|
<Portal>
|
||||||
<div v-if="containerVisible" :ref="maskRef" @mousedown="onMaskClick" :class="cx('mask')" :style="sx('mask', true, { position })" v-bind="ptm('mask')">
|
<div v-if="containerVisible" :ref="maskRef" @mousedown="onMaskClick" :class="cx('mask')" :style="sx('mask', true, { position })" v-bind="ptm('mask')">
|
||||||
<transition name="p-sidebar" @enter="onEnter" @after-enter="onAfterEnter" @before-leave="onBeforeLeave" @leave="onLeave" @after-leave="onAfterLeave" appear v-bind="ptm('transition')">
|
<transition name="p-sidebar" @enter="onEnter" @after-enter="onAfterEnter" @before-leave="onBeforeLeave" @leave="onLeave" @after-leave="onAfterLeave" appear v-bind="ptm('transition')">
|
||||||
<div v-if="visible" :ref="containerRef" v-focustrap :class="cx('root')" role="complementary" :aria-modal="modal" v-bind="{ ...$attrs, ...ptm('root') }">
|
<div v-if="visible" :ref="containerRef" v-focustrap :class="cx('root')" role="complementary" :aria-modal="modal" v-bind="ptmi('root')">
|
||||||
<slot v-if="$slots.container" name="container" :onClose="hide" :closeCallback="hide"></slot>
|
<slot v-if="$slots.container" name="container" :onClose="hide" :closeCallback="hide"></slot>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<div :ref="headerContainerRef" :class="cx('header')" v-bind="ptm('header')">
|
<div :ref="headerContainerRef" :class="cx('header')" v-bind="ptm('header')">
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div :class="cx('root')" :style="[sx('root'), containerStyle]" aria-hidden="true" v-bind="ptm('root')"></div>
|
<div :class="cx('root')" :style="[sx('root'), containerStyle]" aria-hidden="true" v-bind="ptmi('root')"></div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -8,6 +8,7 @@ import BaseSkeleton from './BaseSkeleton.vue';
|
||||||
export default {
|
export default {
|
||||||
name: 'Skeleton',
|
name: 'Skeleton',
|
||||||
extends: BaseSkeleton,
|
extends: BaseSkeleton,
|
||||||
|
inheritAttrs: false,
|
||||||
computed: {
|
computed: {
|
||||||
containerStyle() {
|
containerStyle() {
|
||||||
if (this.size) return { width: this.size, height: this.size, borderRadius: this.borderRadius };
|
if (this.size) return { width: this.size, height: this.size, borderRadius: this.borderRadius };
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div :class="cx('root')" @click="onBarClick" v-bind="ptm('root')" :data-p-sliding="false">
|
<div :class="cx('root')" @click="onBarClick" v-bind="ptmi('root')" :data-p-sliding="false">
|
||||||
<span :class="cx('range')" :style="[sx('range'), rangeStyle]" v-bind="ptm('range')"></span>
|
<span :class="cx('range')" :style="[sx('range'), rangeStyle]" v-bind="ptm('range')"></span>
|
||||||
<span
|
<span
|
||||||
v-if="!range"
|
v-if="!range"
|
||||||
|
@ -68,6 +68,7 @@ import BaseSlider from './BaseSlider.vue';
|
||||||
export default {
|
export default {
|
||||||
name: 'Slider',
|
name: 'Slider',
|
||||||
extends: BaseSlider,
|
extends: BaseSlider,
|
||||||
|
inheritAttrs: false,
|
||||||
emits: ['update:modelValue', 'change', 'slideend'],
|
emits: ['update:modelValue', 'change', 'slideend'],
|
||||||
dragging: false,
|
dragging: false,
|
||||||
handleIndex: null,
|
handleIndex: null,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div :ref="containerRef" :class="containerClass" :style="[style, sx('root')]" v-bind="ptm('root')">
|
<div :ref="containerRef" :class="containerClass" :style="[style, sx('root')]" v-bind="ptmi('root')">
|
||||||
<slot name="button" :onClick="onClick" :toggleCallback="onClick">
|
<slot name="button" :onClick="onClick" :toggleCallback="onClick">
|
||||||
<SDButton
|
<SDButton
|
||||||
type="button"
|
type="button"
|
||||||
|
@ -63,6 +63,7 @@ import BaseSpeedDial from './BaseSpeedDial.vue';
|
||||||
export default {
|
export default {
|
||||||
name: 'SpeedDial',
|
name: 'SpeedDial',
|
||||||
extends: BaseSpeedDial,
|
extends: BaseSpeedDial,
|
||||||
|
inheritAttrs: false,
|
||||||
emits: ['click', 'show', 'hide', 'focus', 'blur'],
|
emits: ['click', 'show', 'hide', 'focus', 'blur'],
|
||||||
documentClickListener: null,
|
documentClickListener: null,
|
||||||
container: null,
|
container: null,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div :class="cx('root')" :style="sx('root')" :data-p-resizing="false" v-bind="ptm('root', getPTOptions())">
|
<div :class="cx('root')" :style="sx('root')" :data-p-resizing="false" v-bind="ptmi('root', getPTOptions())">
|
||||||
<template v-for="(panel, i) of panels" :key="i">
|
<template v-for="(panel, i) of panels" :key="i">
|
||||||
<component :is="panel" tabindex="-1"></component>
|
<component :is="panel" tabindex="-1"></component>
|
||||||
<div
|
<div
|
||||||
|
@ -28,6 +28,7 @@ import BaseSplitter from './BaseSplitter.vue';
|
||||||
export default {
|
export default {
|
||||||
name: 'Splitter',
|
name: 'Splitter',
|
||||||
extends: BaseSplitter,
|
extends: BaseSplitter,
|
||||||
|
inheritAttrs: false,
|
||||||
emits: ['resizestart', 'resizeend', 'resize'],
|
emits: ['resizestart', 'resizeend', 'resize'],
|
||||||
dragging: false,
|
dragging: false,
|
||||||
mouseMoveListener: null,
|
mouseMoveListener: null,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div ref="container" :class="cx('root')" v-bind="ptm('root', getPTOptions)">
|
<div ref="container" :class="cx('root')" v-bind="ptmi('root', getPTOptions)">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -10,6 +10,7 @@ import BaseSplitterPanel from './BaseSplitterPanel.vue';
|
||||||
export default {
|
export default {
|
||||||
name: 'SplitterPanel',
|
name: 'SplitterPanel',
|
||||||
extends: BaseSplitterPanel,
|
extends: BaseSplitterPanel,
|
||||||
|
inheritAttrs: false,
|
||||||
computed: {
|
computed: {
|
||||||
isNested() {
|
isNested() {
|
||||||
return this.$slots.default().some((child) => {
|
return this.$slots.default().some((child) => {
|
||||||
|
|
Loading…
Reference in New Issue