-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
SaravanaPriya31
authored and
SaravanaPriya31
committed
Mar 2, 2024
1 parent
1e3b5bf
commit 3d97ddf
Showing
10 changed files
with
260 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"presets": [ | ||
["env", { "modules": false }], | ||
"stage-3" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.DS_Store | ||
node_modules/ | ||
dist/ | ||
npm-debug.log | ||
yarn-error.log | ||
|
||
# Editor directories and files | ||
.idea | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Getting Started | ||
|
||
> A Vue.js project | ||
## Build Setup | ||
|
||
``` bash | ||
# install dependencies | ||
npm install | ||
|
||
# serve with hot reload at localhost:8080 | ||
npm run dev | ||
|
||
# build for production with minification | ||
npm run build | ||
``` | ||
|
||
For detailed explanation on how things work, consult the [docs for vue-loader](http://vuejs.github.io/vue-loader). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<title>quickstart</title> | ||
</head> | ||
|
||
<body> | ||
<div id="app"></div> | ||
<script src="/dist/build.js"></script> | ||
</body> | ||
|
||
</html> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"name": "quickstart", | ||
"description": "A Vue.js project", | ||
"version": "1.0.0", | ||
"scripts": { | ||
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot", | ||
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules" | ||
}, | ||
"dependencies": { | ||
"@syncfusion/ej2-vue-pdfviewer": "*", | ||
"vue": "^2.5.11" | ||
}, | ||
"browserslist": [ | ||
"> 1%", | ||
"last 2 versions", | ||
"not ie <= 8" | ||
], | ||
"devDependencies": { | ||
"babel-core": "^6.26.0", | ||
"babel-loader": "^7.1.2", | ||
"babel-preset-env": "^1.6.0", | ||
"babel-preset-stage-3": "^6.24.1", | ||
"cross-env": "^5.0.5", | ||
"css-loader": "^0.28.7", | ||
"file-loader": "^1.1.4", | ||
"vue-loader": "^13.0.5", | ||
"vue-template-compiler": "^2.4.4", | ||
"webpack": "^3.6.0", | ||
"webpack-dev-server": "^2.9.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<template> | ||
<div id="app"> | ||
<button v-on:click="openBookmark">Open Bookmark Pane</button> | ||
<button v-on:click="closeBookmark">Close Bookmark Pane</button> | ||
<ejs-pdfviewer | ||
id="pdfViewer" | ||
ref="pdfviewer" | ||
:documentPath="documentPath" | ||
:resourceUrl="resourceUrl"> | ||
</ejs-pdfviewer> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import Vue from 'vue'; | ||
import { PdfViewerPlugin, Toolbar, Magnification, Navigation, | ||
LinkAnnotation, BookmarkView, Annotation, ThumbnailView, | ||
Print, TextSelection, TextSearch, FormFields, FormDesigner } from '@syncfusion/ej2-vue-pdfviewer'; | ||
Vue.use(PdfViewerPlugin); | ||
export default { | ||
name: 'app', | ||
data () { | ||
return { | ||
resourceUrl:"https://cdn.syncfusion.com/ej2/24.1.41/dist/ej2-pdfviewer-lib", | ||
documentPath:"https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf" | ||
}; | ||
}, | ||
provide: { | ||
PdfViewer: [ Toolbar, Magnification, Navigation, LinkAnnotation, BookmarkView, Annotation, | ||
ThumbnailView, Print, TextSelection, TextSearch, FormFields, FormDesigner ]}, | ||
methods: { | ||
openBookmark: function () { | ||
viewer.bookmarkViewModule.openBookmarkPane(); | ||
}, | ||
closeBookmark: function () { | ||
viewer.bookmarkViewModule.closeBookmarkPane(); | ||
} | ||
} | ||
} | ||
</script> | ||
<style> | ||
@import "../node_modules/@syncfusion/ej2-base/styles/material.css"; | ||
@import "../node_modules/@syncfusion/ej2-buttons/styles/material.css"; | ||
@import "../node_modules/@syncfusion/ej2-dropdowns/styles/material.css"; | ||
@import "../node_modules/@syncfusion/ej2-inputs/styles/material.css"; | ||
@import "../node_modules/@syncfusion/ej2-navigations/styles/material.css"; | ||
@import "../node_modules/@syncfusion/ej2-popups/styles/material.css"; | ||
@import "../node_modules/@syncfusion/ej2-splitbuttons/styles/material.css"; | ||
@import "../node_modules/@syncfusion/ej2-vue-pdfviewer/styles/material.css"; | ||
#app { | ||
font-family: "Avenir", Helvetica, Arial, sans-serif; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
text-align: center; | ||
color: #2c3e50; | ||
margin-top: 60px; | ||
} | ||
h1, | ||
h2 { | ||
font-weight: normal; | ||
} | ||
ul { | ||
list-style-type: none; | ||
padding: 0; | ||
} | ||
li { | ||
display: inline-block; | ||
margin: 0 10px; | ||
} | ||
a { | ||
color: #42b983; | ||
} | ||
</style> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import Vue from 'vue' | ||
import App from './App.vue' | ||
import { PdfViewerPlugin } from '@syncfusion/ej2-vue-pdfviewer'; | ||
|
||
Vue.use(PdfViewerPlugin); | ||
|
||
new Vue({ | ||
el: '#app', | ||
render: h => h(App) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
var path = require('path') | ||
var webpack = require('webpack') | ||
|
||
module.exports = { | ||
entry: './src/main.js', | ||
output: { | ||
path: path.resolve(__dirname, './dist'), | ||
publicPath: '/dist/', | ||
filename: 'build.js' | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.css$/, | ||
use: [ | ||
'vue-style-loader', | ||
'css-loader' | ||
], | ||
}, { | ||
test: /\.vue$/, | ||
loader: 'vue-loader', | ||
options: { | ||
loaders: { | ||
} | ||
// other vue-loader options go here | ||
} | ||
}, | ||
{ | ||
test: /\.js$/, | ||
loader: 'babel-loader', | ||
exclude: /node_modules/ | ||
}, | ||
{ | ||
test: /\.(png|jpg|gif|svg)$/, | ||
loader: 'file-loader', | ||
options: { | ||
name: '[name].[ext]?[hash]' | ||
} | ||
} | ||
] | ||
}, | ||
resolve: { | ||
alias: { | ||
'vue$': 'vue/dist/vue.esm.js' | ||
}, | ||
extensions: ['*', '.js', '.vue', '.json'] | ||
}, | ||
devServer: { | ||
historyApiFallback: true, | ||
noInfo: true, | ||
overlay: true | ||
}, | ||
performance: { | ||
hints: false | ||
}, | ||
devtool: '#eval-source-map' | ||
} | ||
|
||
if (process.env.NODE_ENV === 'production') { | ||
module.exports.devtool = '#source-map' | ||
// http://vue-loader.vuejs.org/en/workflow/production.html | ||
module.exports.plugins = (module.exports.plugins || []).concat([ | ||
new webpack.DefinePlugin({ | ||
'process.env': { | ||
NODE_ENV: '"production"' | ||
} | ||
}), | ||
new webpack.optimize.UglifyJsPlugin({ | ||
sourceMap: true, | ||
compress: { | ||
warnings: false | ||
} | ||
}), | ||
new webpack.LoaderOptionsPlugin({ | ||
minimize: true | ||
}) | ||
]) | ||
} |