1
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<div style="font-size: 13px; font-family: Verdana; float: left;">
|
||||
|
||||
<JqxGrid :width="getWidth" :source="dataAdapter" :columns="columns" :columnsresize="true">
|
||||
</JqxGrid>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import JqxGrid from "jqwidgets-scripts/jqwidgets-vue/vue_jqxgrid.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
JqxGrid
|
||||
},
|
||||
data: function () {
|
||||
return {
|
||||
getWidth: '90%',
|
||||
dataAdapter: new jqx.dataAdapter(this.source),
|
||||
columns: [
|
||||
{ text: 'Name', datafield: 'name', width: 250 },
|
||||
{ text: 'Beverage Type', datafield: 'type', width: 250 },
|
||||
{ text: 'Calories', datafield: 'calories', width: 180 },
|
||||
{ text: 'Total Fat', datafield: 'totalfat', width: 120 },
|
||||
{ text: 'Protein', datafield: 'protein', minwidth: 120 }
|
||||
]
|
||||
}
|
||||
},
|
||||
beforeCreate: function () {
|
||||
this.source = {
|
||||
datatype: 'json',
|
||||
datafields: [
|
||||
{ name: 'name', type: 'string' },
|
||||
{ name: 'type', type: 'string' },
|
||||
{ name: 'calories', type: 'int' },
|
||||
{ name: 'totalfat', type: 'string' },
|
||||
{ name: 'protein', type: 'string' }
|
||||
],
|
||||
id: 'id',
|
||||
url: 'beverages.txt'
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>jQWidgets Vue Example</title>
|
||||
<link rel="stylesheet" href="node_modules/jqwidgets-scripts/jqwidgets/styles/jqx.base.css" type="text/css" />
|
||||
<script src="https://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/generatedata.js"></script> </head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script src="dist/main.bundle.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App'
|
||||
|
||||
Vue.config.productionTip = false
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
components: { App },
|
||||
template: '<App/>'
|
||||
})
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"name": "jQWidgets_Vue_Demo",
|
||||
"version": "1.0.0",
|
||||
"description": "Vue.js Demos Build Project",
|
||||
"author": "www.jqwidgets.com <sales@jqwidgets.com>",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "webpack --config webpack.config.js",
|
||||
"start": "npm run build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^7.1.2",
|
||||
"css-loader": "^0.28.11",
|
||||
"extract-text-webpack-plugin": "^3.0.0",
|
||||
"file-loader": "^1.1.4",
|
||||
"jqwidgets-scripts": "~6.1.0",
|
||||
"portfinder": "^1.0.13",
|
||||
"postcss-import": "^11.0.0",
|
||||
"postcss-loader": "^2.0.8",
|
||||
"postcss-url": "^7.2.1",
|
||||
"style-loader": "^0.23.0",
|
||||
"uglifyjs-webpack-plugin": "^1.1.1",
|
||||
"url-loader": "^0.5.8",
|
||||
"vue": "^2.5.2",
|
||||
"vue-loader": "^13.3.0",
|
||||
"vue-style-loader": "^3.0.1",
|
||||
"vue-template-compiler": "^2.5.2",
|
||||
"webpack": "^3.6.0",
|
||||
"webpack-bundle-analyzer": "^2.9.0",
|
||||
"webpack-dev-server": "^2.9.1",
|
||||
"webpack-merge": "^4.1.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,204 @@
|
||||
[{
|
||||
"id": "1",
|
||||
"name": "Hot Chocolate",
|
||||
"type": "Chocolate Beverage",
|
||||
"calories": "370",
|
||||
"totalfat": "16g",
|
||||
"protein": "14g"
|
||||
}, {
|
||||
"id": 2,
|
||||
"name": "Peppermint Hot Chocolate",
|
||||
"type": "Chocolate Beverage",
|
||||
"calories": "440",
|
||||
"totalfat": "16g",
|
||||
"protein": "13g"
|
||||
}, {
|
||||
"id": "3",
|
||||
"name": "Salted Caramel Hot Chocolate",
|
||||
"type": "Chocolate Beverage",
|
||||
"calories": "450",
|
||||
"totalfat": "16g",
|
||||
"protein": "13g"
|
||||
}, {
|
||||
"id": "4",
|
||||
"name": "White Hot Chocolate",
|
||||
"type": "Chocolate Beverage",
|
||||
"calories": "420",
|
||||
"totalfat": "16g",
|
||||
"protein": "12g"
|
||||
}, {
|
||||
"id": "5",
|
||||
"name": "Caffe Americano",
|
||||
"type": "Espresso Beverage",
|
||||
"calories": "15",
|
||||
"totalfat": "0g",
|
||||
"protein": "1g"
|
||||
}, {
|
||||
"id": "6",
|
||||
"name": "Caffe Latte",
|
||||
"type": "Espresso Beverage",
|
||||
"calories": "190",
|
||||
"totalfat": "7g",
|
||||
"protein": "12g"
|
||||
}, {
|
||||
"id": "7",
|
||||
"name": "Caffe Mocha",
|
||||
"type": "Espresso Beverage",
|
||||
"calories": "330",
|
||||
"totalfat": "15g",
|
||||
"protein": "13g"
|
||||
}, {
|
||||
"id": "8",
|
||||
"name": "Cappuccino",
|
||||
"type": "Espresso Beverage",
|
||||
"calories": "120",
|
||||
"totalfat": "4g",
|
||||
"protein": "8g"
|
||||
}, {
|
||||
"id": "9",
|
||||
"name": "Caramel Brulee Latte",
|
||||
"type": "Espresso Beverage",
|
||||
"calories": "420",
|
||||
"totalfat": "9g",
|
||||
"protein": "8g"
|
||||
}, {
|
||||
"id": "10",
|
||||
"name": "Caramel Macchiato",
|
||||
"type": "Espresso Beverage",
|
||||
"calories": "240",
|
||||
"totalfat": "11g",
|
||||
"protein": "10g"
|
||||
}, {
|
||||
"id": "11",
|
||||
"name": "Peppermint Hot Chocolate",
|
||||
"type": "Espresso Beverage",
|
||||
"calories": "440",
|
||||
"totalfat": "10g",
|
||||
"protein": "13g"
|
||||
}, {
|
||||
"id": "12",
|
||||
"name": "Cinnamon Dolce Latte",
|
||||
"type": "Espresso Beverage",
|
||||
"calories": "260",
|
||||
"totalfat": "6g",
|
||||
"protein": "10g"
|
||||
}, {
|
||||
"id": "13",
|
||||
"name": "Eggnog Latte",
|
||||
"type": "Espresso Beverage",
|
||||
"calories": "460",
|
||||
"totalfat": "16g",
|
||||
"protein": "13g"
|
||||
}, {
|
||||
"id": "14",
|
||||
"name": "Espresso",
|
||||
"type": "Espresso Beverage",
|
||||
"calories": "5",
|
||||
"totalfat": "1g",
|
||||
"protein": "1g"
|
||||
}, {
|
||||
"id": "15",
|
||||
"name": "Espresso Con Panna",
|
||||
"type": "Espresso Beverage",
|
||||
"calories": "30",
|
||||
"totalfat": "1g",
|
||||
"protein": "0g"
|
||||
}, {
|
||||
"id": "16",
|
||||
"name": "Espresso Macchiato",
|
||||
"type": "Espresso Beverage",
|
||||
"calories": "100",
|
||||
"totalfat": "1g",
|
||||
"protein": "0g"
|
||||
}, {
|
||||
"id": "17",
|
||||
"name": "Flavored Latte",
|
||||
"type": "Espresso Beverage",
|
||||
"calories": "250",
|
||||
"totalfat": "6g",
|
||||
"protein": "12g"
|
||||
}, {
|
||||
"id": "18",
|
||||
"name": "Gingerbread Latte",
|
||||
"type": "Espresso Beverage",
|
||||
"calories": "320",
|
||||
"totalfat": "13g",
|
||||
"protein": "12g"
|
||||
}, {
|
||||
"id": "19",
|
||||
"name": "White Chocolate Mocha",
|
||||
"type": "Espresso Beverage",
|
||||
"calories": "470",
|
||||
"totalfat": "18g",
|
||||
"protein": "15g"
|
||||
}, {
|
||||
"id": 20,
|
||||
"name": "Skinny Peppermint Mocha",
|
||||
"type": "Espresso Beverage",
|
||||
"calories": 130,
|
||||
"totalfat": "15g",
|
||||
"protein": "13g"
|
||||
}, {
|
||||
"id": "21",
|
||||
"name": "Skinny Flavored Latte",
|
||||
"type": "Espresso Beverage",
|
||||
"calories": "120",
|
||||
"totalfat": "0g",
|
||||
"protein": "12g"
|
||||
}, {
|
||||
"id": "22",
|
||||
"name": "Pumpkin Spice Latte",
|
||||
"type": "Espresso Beverage",
|
||||
"calories": "380",
|
||||
"totalfat": "13g",
|
||||
"protein": "14g"
|
||||
}, {
|
||||
"id": "23",
|
||||
"name": "Caffe Vanilla Frappuccino",
|
||||
"type": "Frappuccino Blended Beverage",
|
||||
"calories": "310",
|
||||
"totalfat": "3g",
|
||||
"protein": "3g"
|
||||
}, {
|
||||
"id": "24",
|
||||
"name": "Caffe Vanilla Frappuccino Light",
|
||||
"type": "Frappuccino Blended Beverage",
|
||||
"calories": "180",
|
||||
"totalfat": "0g",
|
||||
"protein": "3g"
|
||||
}, {
|
||||
"id": "25",
|
||||
"name": "Caramel Brulee Frappuccino",
|
||||
"type": "Frappuccino Blended Beverage",
|
||||
"calories": "410",
|
||||
"totalfat": "13g",
|
||||
"protein": "4g"
|
||||
}, {
|
||||
"id": "26",
|
||||
"name": "Caramel Brulee Frappuccino Light",
|
||||
"type": "Frappuccino Blended Beverage",
|
||||
"calories": "190",
|
||||
"totalfat": "0g",
|
||||
"protein": "3g"
|
||||
}, {
|
||||
"id": "27",
|
||||
"name": "Eggnog Frappuccino",
|
||||
"type": "Frappuccino Blended Beverage",
|
||||
"calories": "420",
|
||||
"totalfat": "18g",
|
||||
"protein": "7g"
|
||||
}, {
|
||||
"id": "28",
|
||||
"name": "Mocha Frappuccino",
|
||||
"type": "Frappuccino Blended Beverage",
|
||||
"calories": "400",
|
||||
"totalfat": "15g",
|
||||
"protein": "5g"
|
||||
}, {
|
||||
"id": "29",
|
||||
"name": "Tazo Green Tea Creme Frappuccino",
|
||||
"type": "Frappuccino Blended Beverage",
|
||||
"calories": "430",
|
||||
"totalfat": "16g",
|
||||
"protein": "6g"
|
||||
}]
|
||||
@@ -0,0 +1,50 @@
|
||||
'use strict'
|
||||
const path = require('path')
|
||||
const webpack = require('webpack')
|
||||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
main: './main.js'
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(__dirname + '/dist'),
|
||||
filename: '[name].bundle.js'
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.js', '.vue'],
|
||||
alias: {
|
||||
'vue$': 'vue/dist/vue.esm.js',
|
||||
'@': path.resolve(__dirname + '/src'),
|
||||
}
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.vue$/,
|
||||
loader: 'vue-loader'
|
||||
},
|
||||
{
|
||||
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
|
||||
loader: 'url-loader'
|
||||
},
|
||||
{
|
||||
test: /\.css$/,
|
||||
loaders: ['style-loader', 'css-loader']
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
// strip all the warnings from Vue.js source code.
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': {
|
||||
NODE_ENV: '"production"'
|
||||
}
|
||||
}),
|
||||
// uglify build code
|
||||
new UglifyJsPlugin({
|
||||
// this speeds up the build
|
||||
parallel: true
|
||||
})
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user