Commit 9932b935fef68f124beb75fa2d2e8a327c9f2b34
1 parent
3cf11946
update
Showing
4 changed files
with
20 additions
and
44 deletions
Show diff stats
src/components/breadcrumb/breadcrumb-item.vue
... | ... | @@ -15,26 +15,12 @@ |
15 | 15 | <script> |
16 | 16 | import mixinsLink from '../../mixins/link'; |
17 | 17 | const prefixCls = 'ivu-breadcrumb-item'; |
18 | - import { oneOf } from '../../utils/assist'; | |
19 | 18 | |
20 | 19 | export default { |
21 | 20 | name: 'BreadcrumbItem', |
22 | 21 | mixins: [ mixinsLink ], |
23 | 22 | props: { |
24 | - to: { | |
25 | - type: [Object, String] | |
26 | - }, | |
27 | - replace: { | |
28 | - type: Boolean, | |
29 | - default: false | |
30 | - }, | |
31 | - target: { | |
32 | - type: String, | |
33 | - validator (value) { | |
34 | - return oneOf(value, ['_blank', '_self', '_parent', '_top']); | |
35 | - }, | |
36 | - default: '_self' | |
37 | - } | |
23 | + | |
38 | 24 | }, |
39 | 25 | data () { |
40 | 26 | return { | ... | ... |
src/components/button/button.vue
... | ... | @@ -68,20 +68,6 @@ |
68 | 68 | type: Boolean, |
69 | 69 | default: false |
70 | 70 | }, |
71 | - to: { | |
72 | - type: [Object, String] | |
73 | - }, | |
74 | - replace: { | |
75 | - type: Boolean, | |
76 | - default: false | |
77 | - }, | |
78 | - target: { | |
79 | - type: String, | |
80 | - validator (value) { | |
81 | - return oneOf(value, ['_blank', '_self', '_parent', '_top']); | |
82 | - }, | |
83 | - default: '_self' | |
84 | - } | |
85 | 71 | }, |
86 | 72 | data () { |
87 | 73 | return { | ... | ... |
src/components/menu/menu-item.vue
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | </template> |
5 | 5 | <script> |
6 | 6 | import Emitter from '../../mixins/emitter'; |
7 | - import { findComponentUpward, oneOf } from '../../utils/assist'; | |
7 | + import { findComponentUpward } from '../../utils/assist'; | |
8 | 8 | const prefixCls = 'ivu-menu'; |
9 | 9 | import mixin from './mixin'; |
10 | 10 | import mixinsLink from '../../mixins/link'; |
... | ... | @@ -21,20 +21,6 @@ |
21 | 21 | type: Boolean, |
22 | 22 | default: false |
23 | 23 | }, |
24 | - to: { | |
25 | - type: [Object, String] | |
26 | - }, | |
27 | - replace: { | |
28 | - type: Boolean, | |
29 | - default: false | |
30 | - }, | |
31 | - target: { | |
32 | - type: String, | |
33 | - validator (value) { | |
34 | - return oneOf(value, ['_blank', '_self', '_parent', '_top']); | |
35 | - }, | |
36 | - default: '_self' | |
37 | - } | |
38 | 24 | }, |
39 | 25 | data () { |
40 | 26 | return { | ... | ... |
src/mixins/link.js
1 | +import { oneOf } from '../utils/assist'; | |
2 | + | |
1 | 3 | export default { |
4 | + props: { | |
5 | + to: { | |
6 | + type: [Object, String] | |
7 | + }, | |
8 | + replace: { | |
9 | + type: Boolean, | |
10 | + default: false | |
11 | + }, | |
12 | + target: { | |
13 | + type: String, | |
14 | + validator (value) { | |
15 | + return oneOf(value, ['_blank', '_self', '_parent', '_top']); | |
16 | + }, | |
17 | + default: '_self' | |
18 | + } | |
19 | + }, | |
2 | 20 | computed: { |
3 | 21 | linkUrl () { |
4 | 22 | const type = typeof this.to; | ... | ... |