UNPKG

vue-ant-patterns

Version:

vue-ant-patterns

173 lines (159 loc) 5.1 kB
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _defineProperty2 = require('babel-runtime/helpers/defineProperty'); var _defineProperty3 = _interopRequireDefault(_defineProperty2); var _vueTypes = require('ant-design-vue/lib/_util/vue-types'); var _vueTypes2 = _interopRequireDefault(_vueTypes); var _classnames = require('classnames'); var _classnames2 = _interopRequireDefault(_classnames); var _ViewItem = require('./ViewItem'); var _ViewItem2 = _interopRequireDefault(_ViewItem); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var TopTools = { props: { prefixCls: _vueTypes2['default'].string.def('depot-dquerypanel-toptools'), conditionAllList: _vueTypes2['default'].array, selectCode: _vueTypes2['default'].string.def('') }, components: { ViewItem: _ViewItem2['default'] }, data: function data() { return {}; }, methods: { changeSH: function changeSH() { this.$emit('changestate'); }, selectView: function selectView(scode) { this.$emit('changeSelect', scode); } }, render: function render() { var _this = this; var h = arguments[0]; var prefixCls = this.prefixCls, conditionAllList = this.conditionAllList; var ttProps = { 'class': (0, _classnames2['default'])((0, _defineProperty3['default'])({}, '' + prefixCls, true)) }; return h( 'div', ttProps, [h('d-tools', [h( 'template', { slot: 'main' }, [h( 'a-row', { attrs: { type: 'flex' } }, [h('a-col', [h( 'a-popover', { attrs: { placement: 'bottomLeft' } }, [h( 'template', { slot: 'content' }, [h( 'd-container-v', { style: 'min-height:100px;width:400px', attrs: { justify: 'between' } }, [h( 'd-container', { style: 'padding:16px' }, [h( 'a-row', { attrs: { type: 'flex' } }, [h( 'a-col', { 'class': 'margin-right-xs margin-bottom-xs' }, [h( 'div', { 'class': (0, _classnames2['default'])((0, _defineProperty3['default'])({}, prefixCls + '-allbtn', true)), on: { 'click': function click() { _this.selectView(''); } } }, ['\u5168\u90E8\u7ED3\u679C'] )] ), this.conditionAllList.map(function (_citem) { return h( 'a-col', { 'class': 'margin-right-xs margin-bottom-xs' }, [h('view-item', { on: { 'selectview': _this.selectView }, attrs: { conditionItem: _citem, selected: _citem.id === _this.selectCode } })] ); })] )] ), h( 'd-container', { style: 'background: rgba(0,0,0,0.02);height:48px;padding:6px 12px' }, [h('d-tools', [h( 'template', { slot: 'second' }, [h('a-button', ['\u7F16\u8F91\u89C6\u56FE'])] )])] )] )] ), h( 'div', { 'class': prefixCls + '-qrItem' }, [this.selectCode === '' ? '全部结果' : this.conditionAllList.find(function (_citem) { return _citem.id === _this.selectCode; }).name] )] )]), h('a-col', [h( 'div', { 'class': prefixCls + '-rightIcon' }, [h('a-icon', { attrs: { type: 'right' } })] )]), h('a-col', [h( 'a-tag', { attrs: { closable: true } }, ['\u2260\u6B63\u5F0F\u5458\u5DE5'] )]), h('a-col', [h( 'a-tag', { attrs: { closable: true } }, ['\u5B9E\u4E60\u751F'] )])] )] ), h( 'template', { slot: 'second' }, [h('a-divider', { attrs: { type: 'vertical' } }), h( 'a-button', { on: { 'click': this.changeSH } }, ['\u5C55\u5F00\u67E5\u8BE2\u9762\u677F'] )] )])] ); } }; exports['default'] = TopTools;