forked from syncfusion/ej2-vue-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtooltip-temp-taskbar.vue
46 lines (44 loc) · 1.31 KB
/
tooltip-temp-taskbar.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<template>
<div>
<table>
<template v-if="data.ganttProperties.resourceNames">
<tr>
<td rowspan="3" style="padding:3px"><img :src="image" height="40px" /></td>
<td style="padding:3px">Task done By:</td>
<td style="padding:3px">{{data.ganttProperties.resourceNames}}</td>
</tr>
</template>
<template>
<tr>
<td style="padding:3px">Starts On:</td>
<td style="padding:3px">{{format(data.StartDate)}}</td>
</tr>
<tr>
<td style="padding:3px">Ends On:</td>
<td style="padding:3px">{{format(data.EndDate)}}</td>
</tr>
</template>
</table>
</div>
</template>
<script>
import { Internationalization } from '@syncfusion/ej2-base';
let instance = new Internationalization();
export default {
data() {
return {
data: {}
};
},
methods: {
format: function(value) {
return instance.formatDate(value, { skeleton: 'yMd', type: 'date' });
}
},
computed: {
image: function() {
return 'https://ej2.syncfusion.com/vue/demos/source/gantt/images/' + this.data.ganttProperties.resourceNames + '.png';
}
}
};
</script>