File tree Expand file tree Collapse file tree 1 file changed +22
-15
lines changed
desktop/core/src/desktop/js/components Expand file tree Collapse file tree 1 file changed +22
-15
lines changed Original file line number Diff line number Diff line change 21
21
</template >
22
22
23
23
<script lang="ts">
24
+ import { defineComponent } from ' vue' ;
25
+
24
26
import { onHueLinkClick } from ' utils/hueUtils' ;
25
- import Vue from ' vue' ;
26
- import Component from ' vue-class-component' ;
27
- import { Prop } from ' vue-property-decorator' ;
28
27
29
28
interface hueWindow {
30
29
HUE_BASE_URL: string ;
31
30
}
32
31
33
- @Component
34
- export default class HueLink extends Vue {
35
- @Prop ({ required: false })
36
- url? : string ;
32
+ export default defineComponent ({
33
+ props: {
34
+ url: {
35
+ type: String ,
36
+ required: false ,
37
+ default: ' '
38
+ }
39
+ },
40
+
41
+ emits: [' click' ],
37
42
38
43
created(): void {
39
44
delete this .$attrs .href ;
40
- }
41
-
42
- clicked(event : Event ): void {
43
- if (this .url ) {
44
- onHueLinkClick (event , this .url , this .$attrs .target );
45
- } else {
46
- this .$emit (' click' );
45
+ },
46
+
47
+ methods: {
48
+ clicked(event : Event ): void {
49
+ if (this .url && this .$attrs .target ) {
50
+ onHueLinkClick (event , this .url , <string >this .$attrs .target );
51
+ } else {
52
+ this .$emit (' click' );
53
+ }
47
54
}
48
55
}
49
- }
56
+ });
50
57
</script >
51
58
52
59
<style lang="scss" scoped></style >
You can’t perform that action at this time.
0 commit comments