add disable-highlight prop to Table
This commit is contained in:
parent
2474ee5929
commit
9563a8da20
3 changed files with 4 additions and 46 deletions
|
@ -1,42 +0,0 @@
|
||||||
/**
|
|
||||||
* 本地预览
|
|
||||||
*/
|
|
||||||
|
|
||||||
var path = require('path');
|
|
||||||
var webpack = require('webpack');
|
|
||||||
// var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
|
||||||
var HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
||||||
var merge = require('webpack-merge');
|
|
||||||
var webpackBaseConfig = require('./webpack.base.config.js');
|
|
||||||
var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin');
|
|
||||||
|
|
||||||
module.exports = merge(webpackBaseConfig, {
|
|
||||||
// 入口
|
|
||||||
entry: {
|
|
||||||
main: './examples/main',
|
|
||||||
vendors: ['vue', 'vue-router']
|
|
||||||
},
|
|
||||||
// 输出
|
|
||||||
output: {
|
|
||||||
path: path.join(__dirname, '../examples/dist'),
|
|
||||||
publicPath: '',
|
|
||||||
filename: '[name].js'
|
|
||||||
// chunkFilename: '[name].chunk.js'
|
|
||||||
},
|
|
||||||
resolve: {
|
|
||||||
alias: {
|
|
||||||
iview: '../../src/index',
|
|
||||||
// vue: 'vue/dist/vue.js'
|
|
||||||
vue: 'vue/dist/vue.runtime.js'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
plugins: [
|
|
||||||
// new webpack.optimize.CommonsChunkPlugin({ name: 'vendors', filename: 'vendor.bundle.js' }),
|
|
||||||
new HtmlWebpackPlugin({
|
|
||||||
inject: true,
|
|
||||||
filename: path.join(__dirname, '../examples/dist/index.html'),
|
|
||||||
template: path.join(__dirname, '../examples/index.html')
|
|
||||||
}),
|
|
||||||
new FriendlyErrorsPlugin()
|
|
||||||
]
|
|
||||||
});
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<Table border :columns="columns7" :data="data6" :hover-highlight="false"></Table>
|
<Table border :columns="columns7" :data="data6" disable-highlight></Table>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -153,7 +153,7 @@
|
||||||
noFilteredDataText: {
|
noFilteredDataText: {
|
||||||
type: String
|
type: String
|
||||||
},
|
},
|
||||||
hoverHighlight: {
|
disableHighlight: {
|
||||||
type: Boolean
|
type: Boolean
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -354,12 +354,12 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleMouseIn (_index) {
|
handleMouseIn (_index) {
|
||||||
if (!this.hoverHighlight) return;
|
if (this.disableHighlight) return;
|
||||||
if (this.objData[_index]._isHover) return;
|
if (this.objData[_index]._isHover) return;
|
||||||
this.objData[_index]._isHover = true;
|
this.objData[_index]._isHover = true;
|
||||||
},
|
},
|
||||||
handleMouseOut (_index) {
|
handleMouseOut (_index) {
|
||||||
if (!this.hoverHighlight) return;
|
if (this.disableHighlight) return;
|
||||||
this.objData[_index]._isHover = false;
|
this.objData[_index]._isHover = false;
|
||||||
},
|
},
|
||||||
highlightCurrentRow (_index) {
|
highlightCurrentRow (_index) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue