update
This commit is contained in:
parent
3cf11946f2
commit
9932b935fe
4 changed files with 20 additions and 44 deletions
|
@ -15,26 +15,12 @@
|
||||||
<script>
|
<script>
|
||||||
import mixinsLink from '../../mixins/link';
|
import mixinsLink from '../../mixins/link';
|
||||||
const prefixCls = 'ivu-breadcrumb-item';
|
const prefixCls = 'ivu-breadcrumb-item';
|
||||||
import { oneOf } from '../../utils/assist';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'BreadcrumbItem',
|
name: 'BreadcrumbItem',
|
||||||
mixins: [ mixinsLink ],
|
mixins: [ mixinsLink ],
|
||||||
props: {
|
props: {
|
||||||
to: {
|
|
||||||
type: [Object, String]
|
|
||||||
},
|
|
||||||
replace: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false
|
|
||||||
},
|
|
||||||
target: {
|
|
||||||
type: String,
|
|
||||||
validator (value) {
|
|
||||||
return oneOf(value, ['_blank', '_self', '_parent', '_top']);
|
|
||||||
},
|
|
||||||
default: '_self'
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -68,20 +68,6 @@
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
to: {
|
|
||||||
type: [Object, String]
|
|
||||||
},
|
|
||||||
replace: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false
|
|
||||||
},
|
|
||||||
target: {
|
|
||||||
type: String,
|
|
||||||
validator (value) {
|
|
||||||
return oneOf(value, ['_blank', '_self', '_parent', '_top']);
|
|
||||||
},
|
|
||||||
default: '_self'
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import Emitter from '../../mixins/emitter';
|
import Emitter from '../../mixins/emitter';
|
||||||
import { findComponentUpward, oneOf } from '../../utils/assist';
|
import { findComponentUpward } from '../../utils/assist';
|
||||||
const prefixCls = 'ivu-menu';
|
const prefixCls = 'ivu-menu';
|
||||||
import mixin from './mixin';
|
import mixin from './mixin';
|
||||||
import mixinsLink from '../../mixins/link';
|
import mixinsLink from '../../mixins/link';
|
||||||
|
@ -21,20 +21,6 @@
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
to: {
|
|
||||||
type: [Object, String]
|
|
||||||
},
|
|
||||||
replace: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false
|
|
||||||
},
|
|
||||||
target: {
|
|
||||||
type: String,
|
|
||||||
validator (value) {
|
|
||||||
return oneOf(value, ['_blank', '_self', '_parent', '_top']);
|
|
||||||
},
|
|
||||||
default: '_self'
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -1,4 +1,22 @@
|
||||||
|
import { oneOf } from '../utils/assist';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
props: {
|
||||||
|
to: {
|
||||||
|
type: [Object, String]
|
||||||
|
},
|
||||||
|
replace: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
target: {
|
||||||
|
type: String,
|
||||||
|
validator (value) {
|
||||||
|
return oneOf(value, ['_blank', '_self', '_parent', '_top']);
|
||||||
|
},
|
||||||
|
default: '_self'
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
linkUrl () {
|
linkUrl () {
|
||||||
const type = typeof this.to;
|
const type = typeof this.to;
|
||||||
|
|
Loading…
Add table
Reference in a new issue