{"size": 2096, "ext": "js", "max_stars_repo_path": "dist/sources/control/select/code.js", "max_stars_repo_name": "MaiyunNET/DeskUI", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "dist/sources/control/select/code.js", "max_issues_repo_name": "MaiyunNET/DeskUI", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "dist/sources/control/select/code.js", "max_forks_repo_name": "MaiyunNET/DeskUI", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 24.3720930233, "max_line_length": 109, "alphanum_fraction": 0.5009541985}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.mounted = exports.methods = exports.computed = exports.data = exports.watch = exports.props = void 0;
const clickgo = require("clickgo");
exports.props = {
    'disabled': {
        'default': false
    },
    'modelValue': {
        'default': ''
    },
    'editable': {
        'default': false
    },
    'data': {
        'default': []
    }
};
exports.watch = {
    'modelValue': {
        'handler': function () {
            this.value = this.modelValue;
        },
        'immediate': true
    },
    'isEditable': {
        'handler': function (editable) {
            if (editable) {
                this.inputValue = this.value;
            }
        },
        'immediate': true
    }
};
exports.data = {
    'background': '',
    'padding': '',
    'value': '',
    'label': '',
    'inputValue': ''
};
exports.computed = {
    'isDisabled': function () {
        return clickgo.tool.getBoolean(this.disabled);
    },
    'isEditable': function () {
        return clickgo.tool.getBoolean(this.editable);
    },
    'opMargin': function () {
        return this.padding.replace(/(\w+)/g, '-$1');
    }
};
exports.methods = {
    updateInputValue: function (value) {
        this.inputValue = value;
        this.value = this.inputValue;
        this.$emit('update:modelValue', this.value);
    },
    updateModelValue: function (value) {
        this.value = value;
        if (this.isEditable && (value === '')) {
            return;
        }
        this.inputValue = value;
        this.$emit('update:modelValue', value);
    },
    listItemClick: function () {
        clickgo.form.hidePop();
    }
};
const mounted = function () {
    clickgo.dom.watchStyle(this.$el, ['background', 'padding'], (n, v) => {
        switch (n) {
            case 'background': {
                this.background = v;
                break;
            }
            case 'padding': {
                this.padding = v;
                break;
            }
        }
    }, true);
};
exports.mounted = mounted;
