Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions examples/sites/demos/mobile-first/app/tabs/tabdata-title.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<tiny-tabs v-model="activeName" v-if="showTab" tab-style="card" :with-close="true" @close="close">
<tiny-tab-item :key="item.name" v-for="item in Tabs" :title="item.title" :name="item.name">
<tiny-tab-item :key="item.name" v-for="item in tabs" :title="item.title" :name="item.name">
{{ item.content }}
</tiny-tab-item>
</tiny-tabs>
Expand All @@ -18,12 +18,12 @@ export default {
return {
activeName: '',
showTab: false,
TinyTabs: []
tabs: []
}
},
mounted() {
setTimeout(() => {
this.TinyTabs = [
this.tabs = [
{
title: '表单组件',
name: 'first',
Expand Down Expand Up @@ -57,7 +57,7 @@ export default {
},
methods: {
close(name) {
this.TinyTabs = this.TinyTabs.filter((tab) => {
this.tabs = this.tabs.filter((tab) => {
return tab.name !== name
})
}
Expand Down
16 changes: 8 additions & 8 deletions examples/sites/demos/mobile-first/app/tabs/tabs-draggable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@tab-drag-over="handleOver"
@tab-drag-end="handleEnd"
>
<tiny-tab-item :key="item.name" v-for="item in Tabs" :title="item.title" :name="item.name">
<tiny-tab-item :key="item.name" v-for="item in tabs" :title="item.title" :name="item.name">
{{ item.content }}
</tiny-tab-item>
</tiny-tabs>
Expand All @@ -34,7 +34,7 @@ export default {
dropConfig: {
plugin: Sortable
},
TinyTabs: [
tabs: [
{
title: 'Tab 1',
name: '1',
Expand Down Expand Up @@ -62,15 +62,15 @@ export default {
},
handleEnd(event) {
const { oldDraggableIndex, newDraggableIndex } = event
const tab = this.TinyTabs.splice(oldDraggableIndex, 1)[0]
this.TinyTabs.splice(newDraggableIndex, 0, tab)
const tab = this.tabs.splice(oldDraggableIndex, 1)[0]
this.tabs.splice(newDraggableIndex, 0, tab)

console.log(this.TinyTabs)
console.log(this.tabs)
},
handleAdd() {
this.TinyTabs.push({
title: 'Tab ' + String(this.TinyTabs.length + 1),
name: String(this.TinyTabs.length + 1),
this.tabs.push({
title: 'Tab ' + String(this.tabs.length + 1),
name: String(this.tabs.length + 1),
content: '动态增加tabitem'
})
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<tiny-tabs v-model="activeName" :with-add="true" @add="add" tab-style="card">
<tiny-tab-item :key="item.name" v-for="item in Tabs" :title="item.title" :name="item.name">
<tiny-tab-item :key="item.name" v-for="item in tabs" :title="item.title" :name="item.name">
{{ item.content }}
</tiny-tab-item>
</tiny-tabs>
Expand All @@ -16,7 +16,7 @@ export default {
},
data() {
return {
TinyTabs: [
tabs: [
{
title: '表单组件',
name: 'first',
Expand Down Expand Up @@ -49,7 +49,7 @@ export default {
message: '动态增加 tabitem'
})

this.TinyTabs.push({
this.tabs.push({
title: 'Tab ++',
name: ++this.tabIndex + '',
content: '动态增加 tabitem'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<tiny-tabs v-model="activeName" tab-style="card" :with-close="true" :before-close="beforeClose" @close="close">
<tiny-tab-item :key="item.name" v-for="item in Tabs" :title="item.title" :name="item.name">
<tiny-tab-item :key="item.name" v-for="item in tabs" :title="item.title" :name="item.name">
{{ item.content }}
</tiny-tab-item>
</tiny-tabs>
Expand All @@ -17,7 +17,7 @@ export default {
data() {
return {
activeName: 'first',
TinyTabs: [
tabs: [
{
title: '表单组件',
name: 'first',
Expand Down Expand Up @@ -57,7 +57,7 @@ export default {
message: '关闭 ' + name + ' 页签'
})

this.TinyTabs = this.TinyTabs.filter((tab) => {
this.tabs = this.tabs.filter((tab) => {
return tab.name !== name
})
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<tiny-tabs v-model="activeName" tab-style="card" editable @edit="edit">
<tiny-tab-item :key="item.name" v-for="item in Tabs" :title="item.title" :name="item.name">
<tiny-tab-item :key="item.name" v-for="item in tabs" :title="item.title" :name="item.name">
{{ item.content }}
</tiny-tab-item>
</tiny-tabs>
Expand All @@ -17,7 +17,7 @@ export default {
data() {
return {
activeName: 'first',
TinyTabs: [
tabs: [
{
title: '表单组件',
name: 'first',
Expand Down
6 changes: 3 additions & 3 deletions examples/sites/demos/mobile-first/app/tabs/tabs-tabs.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<tiny-tabs v-model="activeName" v-if="showTab" tab-style="card" :with-close="true" @close="close">
<tiny-tab-item :key="item.name" v-for="item in Tabs" :title="item.title" :name="item.name">
<tiny-tab-item :key="item.name" v-for="item in tabs" :title="item.title" :name="item.name">
{{ item.content }}
<tiny-tabs v-model="activeName1" v-if="item.name === 'f1'">
<tiny-tab-item title="s1子标签页" name="s1">
Expand Down Expand Up @@ -32,7 +32,7 @@ export default {
activeName: 'f1',
activeName2: 'ss1',
showTab: true,
TinyTabs: [
tabs: [
{
title: '表单组件',
name: 'f1',
Expand All @@ -53,7 +53,7 @@ export default {
},
methods: {
close(name) {
this.TinyTabs = this.TinyTabs.filter((tab) => {
this.tabs = this.tabs.filter((tab) => {
return tab.name !== name
})
}
Expand Down
8 changes: 4 additions & 4 deletions examples/sites/demos/mobile-first/app/tabs/with-add.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<tiny-tabs tab-style="card" :editable="false" :with-add="true" @add="handleadd" style="width: 500px" show-more-tabs>
<tiny-tab-item :key="item.name" v-for="item in Tabs" :title="item.title" :name="item.name">
<tiny-tab-item :key="item.name" v-for="item in tabs" :title="item.title" :name="item.name">
{{ item.content }}
</tiny-tab-item>
</tiny-tabs>
Expand All @@ -16,7 +16,7 @@ export default {
},
data() {
return {
TinyTabs: [
tabs: [
{
title: 'Tab 1',
name: '1',
Expand All @@ -35,10 +35,10 @@ export default {
methods: {
handleadd() {
// 如果tabItem数量小于指定值就可以新增
if (this.TinyTabs.length < this.maxCount) {
if (this.tabs.length < this.maxCount) {
const name = `${++this.tabIndex}`
const title = `Tab ++ ${name}`
this.TinyTabs.push({ title, name, content: '动态增加tabitem - ' + name })
this.tabs.push({ title, name, content: '动态增加tabitem - ' + name })
} else {
TinyModal.message('tabitem数量已到最大值')
}
Expand Down
4 changes: 2 additions & 2 deletions examples/sites/demos/mobile/app/tabs/expand.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="demo-tabs">
<tiny-tabs v-model="activeName" show-expand-tabs expand-tabs-title="请选择" expand-tabs-mode="columns">
<tiny-tab-item :key="item.name" v-for="item in Tabs" :title="item.title" :name="item.name"> </tiny-tab-item>
<tiny-tab-item :key="item.name" v-for="item in tabs" :title="item.title" :name="item.name"> </tiny-tab-item>
</tiny-tabs>
</div>
</template>
Expand All @@ -16,7 +16,7 @@ export default {
},
data() {
return {
TinyTabs: [
tabs: [
{
title: '标签 1',
name: '1',
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/config-provider/base.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default {
name: 'smb', // 设计规范名称
version: '1.0.0', // 设计规范版本号
components: {
TinyAlert: {
Alert: {
icons: {
warning: iconWarningTriangle()
},
Expand Down
4 changes: 2 additions & 2 deletions examples/sites/demos/pc/app/fall-menu/custom-menuitem.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="left-panel">
<fall-menu :data="dataset">
<tiny-fall-menu :data="dataset">
<template #level1="data">
<a>{{ `${data.slotScope.title} level1 ` }}</a>
</template>
Expand All @@ -10,7 +10,7 @@
<template #level3="data">
<a v-for="(level3, index) in data.slotScope" :href="level3.url" :key="index">{{ `${level3.title} level3 ` }}</a>
</template>
</fall-menu>
</tiny-fall-menu>
</div>
</template>

Expand Down
4 changes: 2 additions & 2 deletions examples/sites/demos/pc/app/fall-menu/custom-slider-icon.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<template>
<div class="left-panel">
<fall-menu :data="dataset">
<tiny-fall-menu :data="dataset">
<template #left>
<icon-left class="tiny-svg-size" />
</template>
<template #right>
<icon-right class="tiny-svg-size" />
</template>
</fall-menu>
</tiny-fall-menu>
</div>
</template>

Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/fall-menu/data-resource.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="left-panel">
<fall-menu :data="dataset"></fall-menu>
<tiny-fall-menu :data="dataset"></tiny-fall-menu>
</div>
</template>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
seq-serial
:start-index="200"
:pager="{
component: Pager,
component: TinyPager,
attrs: {
currentPage: 1,
pageSize: 5,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
seq-serial
:start-index="200"
:pager="{
component: Pager,
component: TinyPager,
attrs: {
currentPage: 1,
pageSize: 5,
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/loading/fullscreen.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default {
TinyButton
},
directives: {
TinyLoading: TinyLoading.directive
Loading: TinyLoading.directive
},
data() {
return {
Expand Down
4 changes: 2 additions & 2 deletions examples/sites/demos/pc/app/sticky/events.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</template>

<script>
import { TinySticky, TinyButton } from '@opentiny/vue'
import { TinySticky, TinyButton, TinyModal } from '@opentiny/vue'

export default {
components: {
Expand All @@ -16,7 +16,7 @@ export default {
},
methods: {
change(isFixed) {
Modal.message({
TinyModal.message({
message: `触发 change 事件,当前isFixed为:${isFixed}`,
status: 'info'
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<template #moreIcon>
<tiny-icon-popup />
</template>
<tiny-tab-item :key="item.name" v-for="item in Tabs" :title="item.title" :name="item.name">
<tiny-tab-item :key="item.name" v-for="item in tabs" :title="item.title" :name="item.name">
{{ item.content }}
</tiny-tab-item>
</tiny-tabs>
Expand All @@ -14,13 +14,13 @@ import { reactive } from 'vue'
import { TinyTabs, TinyTabItem } from '@opentiny/vue'
import { iconPopup } from '@opentiny/vue-icon'

const Tabs = reactive([])
const tabs = reactive([])
const TinyIconPopup = iconPopup()

// 创建tabs
for (let i = 1; i < 9; i++) {
const title = `Tab ${i}`
Tabs.push({
tabs.push({
title,
name: i + '',
content: `${title} content `
Expand Down
6 changes: 3 additions & 3 deletions examples/sites/demos/pc/app/tabs/custom-more-icon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<template #moreIcon>
<tiny-icon-popup />
</template>
<tiny-tab-item :key="item.name" v-for="item in Tabs" :title="item.title" :name="item.name">
<tiny-tab-item :key="item.name" v-for="item in tabs" :title="item.title" :name="item.name">
{{ item.content }}
</tiny-tab-item>
</tiny-tabs>
Expand All @@ -21,14 +21,14 @@ export default {
},
data() {
return {
TinyTabs: []
tabs: []
}
},
created() {
// 创建tabs
for (let i = 1; i < 9; i++) {
const title = `Tab ${i}`
this.TinyTabs.push({
this.tabs.push({
title,
name: i + '',
content: `${title} content `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<template #moreIcon>
<tiny-icon-popup />
</template>
<tiny-tab-item :key="item.name" v-for="item in Tabs" :title="item.title" :name="item.name">
<tiny-tab-item :key="item.name" v-for="item in tabs" :title="item.title" :name="item.name">
{{ item.content }}
</tiny-tab-item>
</tiny-tabs>
Expand All @@ -14,13 +14,13 @@ import { reactive } from 'vue'
import { TinyTabs, TinyTabItem } from '@opentiny/vue'
import { iconPopup } from '@opentiny/vue-icon'

const Tabs = reactive([])
const tabs = reactive([])
const TinyIconPopup = iconPopup()

// 创建tabs
for (let i = 1; i < 101; i++) {
const title = `Tab ${i}`
Tabs.push({
tabs.push({
title,
name: i + '',
content: `${title} content `
Expand Down
Loading
Loading