1234567891011121314151617181920212223242526272829303132333435 |
- import _ from 'lodash'
- import {combo} from '../Defaults'
- import {baseConfig} from "./base";
- export default function () {
- const cc = Ext.form.field.ComboBox.prototype.constructor
- const {initComponent} = Ext.form.field.ComboBox.prototype
- Ext.form.field.ComboBox.override({
- constructor(config) {
- const newConfig = _.defaultsDeep({
- // 强制属性
- }, baseConfig(config, 'col-item'), config, combo)
- cc.call(this, newConfig)
- },
- initComponent() {
- this.on({
- focus: {
- // 获得焦点后自动下拉
- fn(sender) {
- sender.expand();
- this.doQuery(this.allQuery, true);
- },
- },
- })
- initComponent.call(this)
- },
- reload() {
- }
- });
- }
|