├── vue.config.js
├── .postcssrc
├── .babelrc
├── public
├── favicon.ico
└── index.html
├── src
├── main.js
├── index.js
├── App.vue
└── components
│ └── VueSpreadsheetLite.vue
├── .gitignore
├── package.json
├── README.md
└── CHANGELOG.md
/vue.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | baseUrl: "./"
3 | };
4 |
--------------------------------------------------------------------------------
/.postcssrc:
--------------------------------------------------------------------------------
1 | {
2 | "plugins": {
3 | "autoprefixer": {}
4 | }
5 | }
--------------------------------------------------------------------------------
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [["@vue/app", { "useBuiltIns": false }]]
3 | }
4 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anydown/vue-spreadsheet-lite/HEAD/public/favicon.ico
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
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')
9 |
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | import VueSpreadsheetLite from "./components/VueSpreadsheetLite.vue";
2 |
3 | export default VueSpreadsheetLite;
4 |
5 | if (typeof window !== "undefined" && window.Vue) {
6 | window.Vue.component(VueSpreadsheetLite.name, VueSpreadsheetLite);
7 | }
8 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 |
5 | # local env files
6 | .env.local
7 | .env.*.local
8 |
9 | # Log files
10 | npm-debug.log*
11 | yarn-debug.log*
12 | yarn-error.log*
13 |
14 | # Editor directories and files
15 | .idea
16 | .vscode
17 | *.suo
18 | *.ntvs*
19 | *.njsproj
20 | *.sln
21 |
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | study-svg-grid
9 |
10 |
11 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@anydown/vue-spreadsheet-lite",
3 | "version": "0.2.1",
4 | "license": "MIT",
5 | "repository": {
6 | "url": "anydown/vue-spreadsheet-lite",
7 | "type": "git"
8 | },
9 | "scripts": {
10 | "example:serve": "vue-cli-service serve",
11 | "prepublishOnly": "npm run build",
12 | "build": "bili --plugin vue --inline --external vue",
13 | "example:build": "vue-cli-service build",
14 | "deploy": "gh-pages -d dist"
15 | },
16 | "files": [
17 | "dist"
18 | ],
19 | "dependencies": {
20 | "vue": "^2.5.13"
21 | },
22 | "devDependencies": {
23 | "@vue/cli-plugin-babel": "^3.0.0-beta.2",
24 | "@vue/cli-service": "^3.0.0-beta.2",
25 | "bili": "^3.0.7",
26 | "bootstrap": "^4.0.0",
27 | "gh-pages": "^1.1.0",
28 | "rollup-plugin-vue": "^3.0.0",
29 | "vue-template-compiler": "^2.5.13"
30 | },
31 | "main": "dist/vue-spreadsheet-lite.cjs.js",
32 | "browserslist": [
33 | "> 1%",
34 | "last 2 versions",
35 | "not ie <= 8"
36 | ]
37 | }
38 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # vue-spreadsheet-lite
2 |
3 | 
4 |
5 | Lightweight full-scratched spreadsheet component. WIP
6 |
7 | # Usage
8 |
9 | npm install -D @anydown/vue-spreadsheet-lite
10 |
11 | ```
12 | import VueSpreadsheetLite from "vue-spreadsheet-lite";
13 | import "vue-spreadsheet-lite/dist/vue-spreadsheet-lite.css";
14 |
15 | ...
16 |
17 | components: {
18 | VueSpreadsheetLite
19 | }
20 |
21 | ...
22 |
23 | data() {
24 | return {
25 | demoBasic: {
26 | header: [
27 | { name: "Name", width: 200 },
28 | { name: "Age", width: 60 },
29 | { name: "Gender", width: 60 }
30 | ],
31 | data: [
32 | ["Yamada Taro", "12", "M"],
33 | ["Yamada Hanako", "12", "M"],
34 | ["Sato Jiro", "12", "M"],
35 | ["Sato Hanako", "12", "M"]
36 | ]
37 | }
38 | };
39 | }
40 | ```
41 |
42 | in template:
43 |
44 | ```
45 |
46 | ```
47 |
--------------------------------------------------------------------------------
/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
vue-spreadsheet-lite
4 |
8 |
9 |
10 |
11 |
12 |
18 |
19 |
20 |
21 |
70 |
71 |
87 |
88 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Change Log
2 |
3 | All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4 |
5 |
6 | ## [0.2.1](https://github.com/anydown/vue-spreadsheet-lite/compare/v0.2.0...v0.2.1) (2018-03-14)
7 |
8 |
9 | ### Bug Fixes
10 |
11 | * Disable babel polyfills ([77d9af7](https://github.com/anydown/vue-spreadsheet-lite/commit/77d9af7))
12 |
13 |
14 |
15 |
16 | # 0.2.0 (2018-03-12)
17 |
18 |
19 | ### Bug Fixes
20 |
21 | * editing with IME ([8f4ee71](https://github.com/hashrock-sandbox/study-svg-spreadsheet/commit/8f4ee71))
22 | * Fix clear first cell bug ([0853e49](https://github.com/hashrock-sandbox/study-svg-spreadsheet/commit/0853e49))
23 | * Fix selection overflow data range bug ([f7cb506](https://github.com/hashrock-sandbox/study-svg-spreadsheet/commit/f7cb506))
24 | * force edit from line end ([b066a83](https://github.com/hashrock-sandbox/study-svg-spreadsheet/commit/b066a83))
25 | * improve mouse selection ([4c3af8e](https://github.com/hashrock-sandbox/study-svg-spreadsheet/commit/4c3af8e))
26 | * set move range ([5bb8706](https://github.com/hashrock-sandbox/study-svg-spreadsheet/commit/5bb8706))
27 | * When new letter entered, clear editingText ([9207ef8](https://github.com/hashrock-sandbox/study-svg-spreadsheet/commit/9207ef8))
28 |
29 |
30 | ### Features
31 |
32 | * add bili ([0c1c39b](https://github.com/hashrock-sandbox/study-svg-spreadsheet/commit/0c1c39b))
33 | * add editor ([6ddd42a](https://github.com/hashrock-sandbox/study-svg-spreadsheet/commit/6ddd42a))
34 | * add header ([8b7d51b](https://github.com/hashrock-sandbox/study-svg-spreadsheet/commit/8b7d51b))
35 | * add multiple selection ([4982653](https://github.com/hashrock-sandbox/study-svg-spreadsheet/commit/4982653))
36 | * add row button ([9d52de8](https://github.com/hashrock-sandbox/study-svg-spreadsheet/commit/9d52de8))
37 | * change header size ([8ac50ff](https://github.com/hashrock-sandbox/study-svg-spreadsheet/commit/8ac50ff))
38 | * header resizing ([254a883](https://github.com/hashrock-sandbox/study-svg-spreadsheet/commit/254a883))
39 | * header selection ([cbf9d04](https://github.com/hashrock-sandbox/study-svg-spreadsheet/commit/cbf9d04))
40 | * keyboard selection ([993a558](https://github.com/hashrock-sandbox/study-svg-spreadsheet/commit/993a558))
41 | * move cursor ([3c8d7c8](https://github.com/hashrock-sandbox/study-svg-spreadsheet/commit/3c8d7c8))
42 | * scrolling ([10a6afe](https://github.com/hashrock-sandbox/study-svg-spreadsheet/commit/10a6afe))
43 |
--------------------------------------------------------------------------------
/src/components/VueSpreadsheetLite.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
11 |
12 |
13 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
350 |
351 |
352 |
414 |
--------------------------------------------------------------------------------