forked from syncfusion/ej2-vue-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.vue
102 lines (91 loc) · 2.99 KB
/
default.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<template>
<div class="file-api">
<div class="col-lg-8 control-section">
<div class="sample-container">
<ejs-filemanager id="file" ref="fileObject" :ajaxSettings='ajaxSettings' :view='view'
:navigationPaneSettings='navigationPaneSettings'>
</ejs-filemanager>
</div>
</div>
<div class="col-lg-4 property-section">
<div id="property" title="Properties">
<table id="property" title="Properties">
<tbody>
<tr>
<td style="width: 50%;">
<div id="checkboxElement">Toolbar</div>
</td>
<td style="width: 50%; padding-right: 10px;">
<ejs-checkbox id="toolbar" :checked="true" :change="onChange"></ejs-checkbox>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="action-description">
<p>This sample demonstrates the properties of FileManager component from the property pane. Select any properties from the property pane to customize the FileManager.</p>
</div>
<div id="description">
<p>The File Manager component is used to explore a file system through a web application, similar to the windows explorer for windows. It supports the basic file operations such as create, rename, delete.</p>
<p>
<b>Note: </b>File Manager's upload functionality is restricted in the online demo. If you need to test upload functionality, please install
<a target="_blank" href="https://www.syncfusion.com/downloads"> Syncfusion Essential Studio </a>on your machine and run the demo.
</p>
</div>
</div>
</template>
<style>
.file-api .property-panel-table div {
padding-top: 0;
}
.file-api #tool {
padding-top: 5px;
}
.file-api #tool_toggle {
width: 100px;
}
#checkboxElement{
font-size:14px;
}
</style>
<script>
import Vue from "vue";
import { FileManagerPlugin ,NavigationPane, Toolbar, DetailsView } from "@syncfusion/ej2-vue-filemanager";
import { CheckBoxPlugin } from "@syncfusion/ej2-vue-buttons";
Vue.use(CheckBoxPlugin);
Vue.use(FileManagerPlugin);
/**
* File Manager API sample
*/
let hostUrl = 'https://ej2-aspcore-service.azurewebsites.net/';
export default Vue.extend ({
data: function() {
return {
ajaxSettings:
{
url: hostUrl + 'api/FileManager/FileOperations',
getImageUrl: hostUrl + 'api/FileManager/GetImage',
uploadUrl: hostUrl + 'api/FileManager/Upload',
downloadUrl: hostUrl + 'api/FileManager/Download'
},
view:"LargeIcons",
navigationPaneSettings:
{
visible: false
},
};
},
provide: {
filemanager: [NavigationPane, Toolbar, DetailsView]
},
methods: {
onChange: function(args) {
var fileobj = this.$refs.fileObject.ej2Instances;
if (args.event.currentTarget.id === "toolbar") {
fileobj.toolbarSettings.visible = args.checked;
}
}
}
});
</script>