Skip to content

Commit 6c44078

Browse files
authored
Committed the example project.
0 parents  commit 6c44078

File tree

10 files changed

+11731
-0
lines changed

10 files changed

+11731
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# list-box
2+
3+
## Project setup
4+
```
5+
npm install
6+
```
7+
8+
### Compiles and hot-reloads for development
9+
```
10+
npm run serve
11+
```
12+
13+
### Compiles and minifies for production
14+
```
15+
npm run build
16+
```
17+
18+
### Lints and fixes files
19+
```
20+
npm run lint
21+
```
22+
23+
### Customize configuration
24+
See [Configuration Reference](https://cli.vuejs.org/config/).

babel.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
presets: [
3+
'@vue/cli-plugin-babel/preset'
4+
]
5+
}

package-lock.json

Lines changed: 11499 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"name": "list-box",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"serve": "vue-cli-service serve",
7+
"build": "vue-cli-service build",
8+
"lint": "vue-cli-service lint"
9+
},
10+
"dependencies": {
11+
"@syncfusion/ej2-vue-dropdowns": "^17.3.27",
12+
"core-js": "^3.3.2",
13+
"vue": "^2.6.10"
14+
},
15+
"devDependencies": {
16+
"@vue/cli-plugin-babel": "^4.0.0",
17+
"@vue/cli-plugin-eslint": "^4.0.0",
18+
"@vue/cli-service": "^4.0.0",
19+
"babel-eslint": "^10.0.3",
20+
"eslint": "^5.16.0",
21+
"eslint-plugin-vue": "^5.0.0",
22+
"vue-template-compiler": "^2.6.10"
23+
},
24+
"eslintConfig": {
25+
"root": true,
26+
"env": {
27+
"node": true
28+
},
29+
"extends": [
30+
"plugin:vue/essential",
31+
"eslint:recommended"
32+
],
33+
"rules": {},
34+
"parserOptions": {
35+
"parser": "babel-eslint"
36+
}
37+
},
38+
"postcss": {
39+
"plugins": {
40+
"autoprefixer": {}
41+
}
42+
},
43+
"browserslist": [
44+
"> 1%",
45+
"last 2 versions"
46+
]
47+
}

public/favicon.ico

4.19 KB
Binary file not shown.

public/index.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
7+
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
8+
<title>list-box</title>
9+
</head>
10+
<body>
11+
<noscript>
12+
<strong>We're sorry but list-box doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
13+
</noscript>
14+
<div id="app"></div>
15+
<!-- built files will be auto injected -->
16+
</body>
17+
</html>

src/App.vue

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
<template>
2+
<div class = 'controls'>
3+
<div class = 'listbox_parent'>
4+
<ejs-listbox :dataSource='dataItem' :fields='dataFields'
5+
allowDragAndDrop='true' scope='combined-list'>
6+
</ejs-listbox>
7+
</div>
8+
<div class = 'listbox_child'>
9+
<ejs-listbox :dataSource='dataItemChild'
10+
:fields='dataFieldsChild' allowDragAndDrop='true'
11+
scope='combined-list'>
12+
</ejs-listbox>
13+
</div>
14+
</div>
15+
</template>
16+
17+
<script>
18+
import Vue from "vue";
19+
import {ListBoxPlugin} from "@syncfusion/ej2-vue-dropdowns";
20+
Vue.use(ListBoxPlugin);
21+
export default Vue.extend({
22+
data: function() {
23+
return {
24+
dataItem: [
25+
{ Name: 'Cabbage', Id: 'item1', Category: 'Leafy and Salad'},
26+
{ Name: 'Pumpkins', Id: 'item2', Category: 'Leafy and Salad' },
27+
{ Name: 'Spinach', Id: 'item3', Category: 'Leafy and Salad'},
28+
{ Name: 'Green bean', Id: 'item4', Category: 'Beans' },
29+
{ Name: 'Horse gram', Id: 'item5', Category: 'Beans'},
30+
{ Name: 'Chickpea', Id: 'item6', Category: 'Beans'}
31+
],
32+
dataFields: { text: 'Name', value: 'Id', groupBy: 'Category' },
33+
dataItemChild: [
34+
{ Name: 'Watercress', Id: 'item1', Category: 'Leafy and Salad' },
35+
{ Name: 'Beet Greens', Id: 'item2', Category: 'Leafy and Salad' },
36+
{ Name: 'Romaine Lettuce', Id: 'item3', Category: 'Leafy and Salad' },
37+
{ Name: 'Black Beans', Id: 'item4', Category: 'Beans' },
38+
{ Name: 'Soybeans', Id: 'item5', Category: 'Beans' },
39+
{ Name: 'Lentils', Id: 'item6', Category: 'Beans' }
40+
],
41+
dataFieldsChild: { text: 'Name', value: 'Id', groupBy: 'Category'}
42+
};
43+
}
44+
});
45+
</script>
46+
47+
48+
49+
50+
<style>
51+
@import url(https://cdn.syncfusion.com/ej2/material.css);
52+
53+
.controls {
54+
display: inline-block;
55+
width: 100%;
56+
}
57+
58+
.listbox_parent {
59+
width: 300px;
60+
margin-top: 15%;
61+
margin-bottom: 15%;
62+
margin-left: 15%;
63+
margin-right: 5%;
64+
float: left;
65+
}
66+
67+
.listbox_child {
68+
width: 300px;
69+
margin-top: 15%;
70+
float: left;
71+
}
72+
73+
</style>

src/assets/logo.png

6.69 KB
Loading

src/components/HelloWorld.vue

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<template>
2+
<div class="hello">
3+
<h1>{{ msg }}</h1>
4+
<p>
5+
For a guide and recipes on how to configure / customize this project,<br>
6+
check out the
7+
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
8+
</p>
9+
<h3>Installed CLI Plugins</h3>
10+
<ul>
11+
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
12+
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
13+
</ul>
14+
<h3>Essential Links</h3>
15+
<ul>
16+
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
17+
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
18+
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
19+
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
20+
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
21+
</ul>
22+
<h3>Ecosystem</h3>
23+
<ul>
24+
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
25+
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
26+
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
27+
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
28+
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
29+
</ul>
30+
</div>
31+
</template>
32+
33+
<script>
34+
export default {
35+
name: 'HelloWorld',
36+
props: {
37+
msg: String
38+
}
39+
}
40+
</script>
41+
42+
<!-- Add "scoped" attribute to limit CSS to this component only -->
43+
<style scoped>
44+
h3 {
45+
margin: 40px 0 0;
46+
}
47+
ul {
48+
list-style-type: none;
49+
padding: 0;
50+
}
51+
li {
52+
display: inline-block;
53+
margin: 0 10px;
54+
}
55+
a {
56+
color: #42b983;
57+
}
58+
</style>

src/main.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import Vue from 'vue'
2+
import App from './App.vue'
3+
4+
Vue.config.productionTip = false
5+
6+
new Vue({
7+
render: h => h(App),
8+
}).$mount('#app')

0 commit comments

Comments
 (0)