mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Refactor #5257
This commit is contained in:
parent
23a21c2407
commit
bcb1b6eb8d
7 changed files with 14 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<nav :id="id" :class="cx('root')" v-bind="ptm('root')">
|
<nav :id="id" :class="cx('root')" v-bind="ptmi('root')">
|
||||||
<ol ref="list" :class="cx('menu')" v-bind="ptm('menu')">
|
<ol ref="list" :class="cx('menu')" v-bind="ptm('menu')">
|
||||||
<template v-for="(item, index) of model" :key="label(item) + '_' + index.toString()">
|
<template v-for="(item, index) of model" :key="label(item) + '_' + index.toString()">
|
||||||
<li
|
<li
|
||||||
|
@ -34,6 +34,7 @@ import BaseSteps from './BaseSteps.vue';
|
||||||
export default {
|
export default {
|
||||||
name: 'Steps',
|
name: 'Steps',
|
||||||
extends: BaseSteps,
|
extends: BaseSteps,
|
||||||
|
inheritAttrs: false,
|
||||||
emits: ['update:activeStep', 'step-change'],
|
emits: ['update:activeStep', 'step-change'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div :class="cx('root')" v-bind="ptm('root')">
|
<div :class="cx('root')" v-bind="ptmi('root')">
|
||||||
<ul ref="nav" :class="cx('menu')" role="menubar" :aria-labelledby="ariaLabelledby" :aria-label="ariaLabel" v-bind="ptm('menu')">
|
<ul ref="nav" :class="cx('menu')" role="menubar" :aria-labelledby="ariaLabelledby" :aria-label="ariaLabel" v-bind="ptm('menu')">
|
||||||
<template v-for="(item, i) of model" :key="label(item) + '_' + i.toString()">
|
<template v-for="(item, i) of model" :key="label(item) + '_' + i.toString()">
|
||||||
<li
|
<li
|
||||||
|
@ -37,6 +37,7 @@ import BaseTabMenu from './BaseTabMenu.vue';
|
||||||
export default {
|
export default {
|
||||||
name: 'TabMenu',
|
name: 'TabMenu',
|
||||||
extends: BaseTabMenu,
|
extends: BaseTabMenu,
|
||||||
|
inheritAttrs: false,
|
||||||
emits: ['update:activeIndex', 'tab-change'],
|
emits: ['update:activeIndex', 'tab-change'],
|
||||||
timeout: null,
|
timeout: null,
|
||||||
data() {
|
data() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div :class="cx('root')" role="tablist" v-bind="ptm('root')">
|
<div :class="cx('root')" role="tablist" v-bind="ptmi('root')">
|
||||||
<div :class="cx('navContainer')" v-bind="ptm('navContainer')">
|
<div :class="cx('navContainer')" v-bind="ptm('navContainer')">
|
||||||
<button
|
<button
|
||||||
v-if="scrollable && !isPrevButtonDisabled"
|
v-if="scrollable && !isPrevButtonDisabled"
|
||||||
|
@ -102,6 +102,7 @@ import BaseTabView from './BaseTabView.vue';
|
||||||
export default {
|
export default {
|
||||||
name: 'TabView',
|
name: 'TabView',
|
||||||
extends: BaseTabView,
|
extends: BaseTabView,
|
||||||
|
inheritAttrs: false,
|
||||||
emits: ['update:activeIndex', 'tab-change', 'tab-click'],
|
emits: ['update:activeIndex', 'tab-change', 'tab-click'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<span :class="cx('root')" v-bind="ptm('root')">
|
<span :class="cx('root')" v-bind="ptmi('root')">
|
||||||
<component v-if="$slots.icon" :is="$slots.icon" :class="cx('icon')" v-bind="ptm('icon')" />
|
<component v-if="$slots.icon" :is="$slots.icon" :class="cx('icon')" v-bind="ptm('icon')" />
|
||||||
<span v-else-if="icon" :class="[cx('icon'), icon]" v-bind="ptm('icon')"></span>
|
<span v-else-if="icon" :class="[cx('icon'), icon]" v-bind="ptm('icon')"></span>
|
||||||
<slot v-if="value || $slots.default">
|
<slot v-if="value || $slots.default">
|
||||||
|
@ -13,6 +13,7 @@ import BaseTag from './BaseTag.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Tag',
|
name: 'Tag',
|
||||||
extends: BaseTag
|
extends: BaseTag,
|
||||||
|
inheritAttrs: false
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div :class="cx('root')" @click="onClick" v-bind="ptm('root')">
|
<div :class="cx('root')" @click="onClick" v-bind="ptmi('root')">
|
||||||
<div v-if="welcomeMessage" v-bind="ptm('welcomeMessage')">{{ welcomeMessage }}</div>
|
<div v-if="welcomeMessage" v-bind="ptm('welcomeMessage')">{{ welcomeMessage }}</div>
|
||||||
<div :class="cx('content')" v-bind="ptm('content')">
|
<div :class="cx('content')" v-bind="ptm('content')">
|
||||||
<div v-for="(command, i) of commands" :key="command.text + i.toString()" v-bind="ptm('commands')">
|
<div v-for="(command, i) of commands" :key="command.text + i.toString()" v-bind="ptm('commands')">
|
||||||
|
@ -22,6 +22,7 @@ import BaseTerminal from './BaseTerminal.vue';
|
||||||
export default {
|
export default {
|
||||||
name: 'Terminal',
|
name: 'Terminal',
|
||||||
extends: BaseTerminal,
|
extends: BaseTerminal,
|
||||||
|
inheritAttrs: false,
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
commandText: null,
|
commandText: null,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<textarea :class="cx('root')" :value="modelValue" @input="onInput" v-bind="ptm('root', ptmParams)"></textarea>
|
<textarea :class="cx('root')" :value="modelValue" @input="onInput" v-bind="ptmi('root', ptmParams)"></textarea>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -8,6 +8,7 @@ import BaseTextarea from './BaseTextarea.vue';
|
||||||
export default {
|
export default {
|
||||||
name: 'Textarea',
|
name: 'Textarea',
|
||||||
extends: BaseTextarea,
|
extends: BaseTextarea,
|
||||||
|
inheritAttrs: false,
|
||||||
emits: ['update:modelValue'],
|
emits: ['update:modelValue'],
|
||||||
mounted() {
|
mounted() {
|
||||||
if (this.$el.offsetParent && this.autoResize) {
|
if (this.$el.offsetParent && this.autoResize) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<Portal :appendTo="appendTo" :disabled="!popup">
|
<Portal :appendTo="appendTo" :disabled="!popup">
|
||||||
<transition name="p-connected-overlay" @enter="onEnter" @after-enter="onAfterEnter" @leave="onLeave" @after-leave="onAfterLeave" v-bind="ptm('transition')">
|
<transition name="p-connected-overlay" @enter="onEnter" @after-enter="onAfterEnter" @leave="onLeave" @after-leave="onAfterLeave" v-bind="ptm('transition')">
|
||||||
<div v-if="visible" :ref="containerRef" :id="id" :class="cx('root')" @click="onOverlayClick" v-bind="{ ...$attrs, ...ptm('root') }">
|
<div v-if="visible" :ref="containerRef" :id="id" :class="cx('root')" @click="onOverlayClick" v-bind="ptmi('root')">
|
||||||
<div v-if="$slots.start" :class="cx('start')" v-bind="ptm('start')">
|
<div v-if="$slots.start" :class="cx('start')" v-bind="ptm('start')">
|
||||||
<slot name="start"></slot>
|
<slot name="start"></slot>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue