├── src ├── assets │ └── logo.png ├── main.js ├── App.vue └── components │ ├── Menu.vue │ └── Table.vue ├── .babelrc ├── .gitignore ├── .editorconfig ├── index.html ├── README.md ├── package.json └── webpack.config.js /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YalongYan/vue-table-edit/HEAD/src/assets/logo.png -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | 4 | new Vue({ 5 | el: '#app', 6 | render: h => h(App) 7 | }) 8 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { "modules": false }], 4 | "stage-3" 5 | ], 6 | "plugins": ["transform-runtime"] 7 | } 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | dist/ 4 | npm-debug.log 5 | yarn-error.log 6 | 7 | # Editor directories and files 8 | .idea 9 | *.suo 10 | *.ntvs* 11 | *.njsproj 12 | *.sln 13 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 || handleCellMousedown(e, row, col)" 21 | @mouseenter.stop.prevent="handleCellMouseenter(row, col)" 22 | @mouseup="handleMouseUp" 23 | @contextmenu.prevent.stop="handleContendMenu" 24 | > 25 | {{ row }}--{{ col }} 26 | | 27 |