Commit 9563a8da20532c63bf192f9c71127ffa68b0c19d
1 parent
2474ee59
add disable-highlight prop to Table
Showing
3 changed files
with
4 additions
and
46 deletions
Show diff stats
build/webpack.ssr.config.js deleted
| 1 | -/** | |
| 2 | - * 本地预览 | |
| 3 | - */ | |
| 4 | - | |
| 5 | -var path = require('path'); | |
| 6 | -var webpack = require('webpack'); | |
| 7 | -// var ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
| 8 | -var HtmlWebpackPlugin = require('html-webpack-plugin'); | |
| 9 | -var merge = require('webpack-merge'); | |
| 10 | -var webpackBaseConfig = require('./webpack.base.config.js'); | |
| 11 | -var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin'); | |
| 12 | - | |
| 13 | -module.exports = merge(webpackBaseConfig, { | |
| 14 | - // 入口 | |
| 15 | - entry: { | |
| 16 | - main: './examples/main', | |
| 17 | - vendors: ['vue', 'vue-router'] | |
| 18 | - }, | |
| 19 | - // 输出 | |
| 20 | - output: { | |
| 21 | - path: path.join(__dirname, '../examples/dist'), | |
| 22 | - publicPath: '', | |
| 23 | - filename: '[name].js' | |
| 24 | - // chunkFilename: '[name].chunk.js' | |
| 25 | - }, | |
| 26 | - resolve: { | |
| 27 | - alias: { | |
| 28 | - iview: '../../src/index', | |
| 29 | - // vue: 'vue/dist/vue.js' | |
| 30 | - vue: 'vue/dist/vue.runtime.js' | |
| 31 | - } | |
| 32 | - }, | |
| 33 | - plugins: [ | |
| 34 | - // new webpack.optimize.CommonsChunkPlugin({ name: 'vendors', filename: 'vendor.bundle.js' }), | |
| 35 | - new HtmlWebpackPlugin({ | |
| 36 | - inject: true, | |
| 37 | - filename: path.join(__dirname, '../examples/dist/index.html'), | |
| 38 | - template: path.join(__dirname, '../examples/index.html') | |
| 39 | - }), | |
| 40 | - new FriendlyErrorsPlugin() | |
| 41 | - ] | |
| 42 | -}); |
examples/routers/table.vue
src/components/table/table.vue
| ... | ... | @@ -153,7 +153,7 @@ |
| 153 | 153 | noFilteredDataText: { |
| 154 | 154 | type: String |
| 155 | 155 | }, |
| 156 | - hoverHighlight: { | |
| 156 | + disableHighlight: { | |
| 157 | 157 | type: Boolean |
| 158 | 158 | } |
| 159 | 159 | }, |
| ... | ... | @@ -354,12 +354,12 @@ |
| 354 | 354 | }); |
| 355 | 355 | }, |
| 356 | 356 | handleMouseIn (_index) { |
| 357 | - if (!this.hoverHighlight) return; | |
| 357 | + if (this.disableHighlight) return; | |
| 358 | 358 | if (this.objData[_index]._isHover) return; |
| 359 | 359 | this.objData[_index]._isHover = true; |
| 360 | 360 | }, |
| 361 | 361 | handleMouseOut (_index) { |
| 362 | - if (!this.hoverHighlight) return; | |
| 362 | + if (this.disableHighlight) return; | |
| 363 | 363 | this.objData[_index]._isHover = false; |
| 364 | 364 | }, |
| 365 | 365 | highlightCurrentRow (_index) { | ... | ... |