module.exports = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ // Flag the module as loaded /******/ module.l = true; /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ // identity function for calling harmony imports with the correct context /******/ __webpack_require__.i = function(value) { return value; }; /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 216); /******/ }) /************************************************************************/ /******/ ({ /***/ 0: /***/ function(module, exports) { /* globals __VUE_SSR_CONTEXT__ */ // this module is a runtime utility for cleaner component module output and will // be included in the final webpack user bundle module.exports = function normalizeComponent ( rawScriptExports, compiledTemplate, injectStyles, scopeId, moduleIdentifier /* server only */ ) { var esModule var scriptExports = rawScriptExports = rawScriptExports || {} // ES6 modules interop var type = typeof rawScriptExports.default if (type === 'object' || type === 'function') { esModule = rawScriptExports scriptExports = rawScriptExports.default } // Vue.extend constructor export interop var options = typeof scriptExports === 'function' ? scriptExports.options : scriptExports // render functions if (compiledTemplate) { options.render = compiledTemplate.render options.staticRenderFns = compiledTemplate.staticRenderFns } // scopedId if (scopeId) { options._scopeId = scopeId } var hook if (moduleIdentifier) { // server build hook = function (context) { // 2.3 injection context = context || // cached call (this.$vnode && this.$vnode.ssrContext) || // stateful (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional // 2.2 with runInNewContext: true if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { context = __VUE_SSR_CONTEXT__ } // inject component styles if (injectStyles) { injectStyles.call(this, context) } // register component module identifier for async chunk inferrence if (context && context._registeredComponents) { context._registeredComponents.add(moduleIdentifier) } } // used by ssr in case component is cached and beforeCreate // never gets called options._ssrRegister = hook } else if (injectStyles) { hook = injectStyles } if (hook) { var functional = options.functional var existing = functional ? options.render : options.beforeCreate if (!functional) { // inject component registration as beforeCreate hook options.beforeCreate = existing ? [].concat(existing, hook) : [hook] } else { // register for functioal component in vue file options.render = function renderWithStyleInjection (h, context) { hook.call(context) return existing(h, context) } } } return { esModule: esModule, exports: scriptExports, options: options } } /***/ }, /***/ 119: /***/ function(module, exports) { // removed by extract-text-webpack-plugin /***/ }, /***/ 12: /***/ function(module, exports, __webpack_require__) { "use strict"; /** * v-clickoutside * @desc 点击元素外面才会触发的事件 * @example * ```vue *
* ``` */ var clickoutsideContext = '@@clickoutsideContext'; /* harmony default export */ exports["a"] = { bind: function bind(el, binding, vnode) { var documentHandler = function(e) { if (vnode.context && !el.contains(e.target)) { vnode.context[el[clickoutsideContext].methodName](); } }; el[clickoutsideContext] = { documentHandler: documentHandler, methodName: binding.expression, arg: binding.arg || 'click' }; document.addEventListener(el[clickoutsideContext].arg, documentHandler); }, update: function update(el, binding) { el[clickoutsideContext].methodName = binding.expression; }, unbind: function unbind(el) { document.removeEventListener( el[clickoutsideContext].arg, el[clickoutsideContext].documentHandler); }, install: function install(Vue) { Vue.directive('clickoutside', { bind: this.bind, unbind: this.unbind }); } }; /***/ }, /***/ 137: /***/ function(module, exports, __webpack_require__) { function injectStyle (ssrContext) { __webpack_require__(119) } var Component = __webpack_require__(0)( /* script */ __webpack_require__(59), /* template */ __webpack_require__(188), /* styles */ injectStyle, /* scopeId */ null, /* moduleIdentifier (server only) */ null ) module.exports = Component.exports /***/ }, /***/ 188: /***/ function(module, exports) { module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; return _c('x-cell', { directives: [{ name: "clickoutside", rawName: "v-clickoutside", value: (_vm.doCloseActive), expression: "doCloseActive" }], staticClass: "mint-field", class: [{ 'is-textarea': _vm.type === 'textarea', 'is-nolabel': !_vm.label }], attrs: { "title": _vm.label } }, [(_vm.type === 'textarea') ? _c('textarea', { directives: [{ name: "model", rawName: "v-model", value: (_vm.currentValue), expression: "currentValue" }], ref: "textarea", staticClass: "mint-field-core", attrs: { "placeholder": _vm.placeholder, "rows": _vm.rows, "disabled": _vm.disabled, "readonly": _vm.readonly }, domProps: { "value": (_vm.currentValue) }, on: { "change": function($event) { _vm.$emit('change', _vm.currentValue) }, "input": function($event) { if ($event.target.composing) { return; } _vm.currentValue = $event.target.value } } }) : _c('input', { ref: "input", staticClass: "mint-field-core", attrs: { "placeholder": _vm.placeholder, "number": _vm.type === 'number', "type": _vm.type, "disabled": _vm.disabled, "readonly": _vm.readonly }, domProps: { "value": _vm.currentValue }, on: { "change": function($event) { _vm.$emit('change', _vm.currentValue) }, "focus": function($event) { _vm.active = true }, "input": _vm.handleInput } }), _vm._v(" "), (!_vm.disableClear) ? _c('div', { directives: [{ name: "show", rawName: "v-show", value: (_vm.currentValue && _vm.type !== 'textarea' && _vm.active), expression: "currentValue && type !== 'textarea' && active" }], staticClass: "mint-field-clear", on: { "click": _vm.handleClear } }, [_c('i', { staticClass: "mintui mintui-field-error" })]) : _vm._e(), _vm._v(" "), (_vm.state) ? _c('span', { staticClass: "mint-field-state", class: ['is-' + _vm.state] }, [_c('i', { staticClass: "mintui", class: ['mintui-field-' + _vm.state] })]) : _vm._e(), _vm._v(" "), _c('div', { staticClass: "mint-field-other" }, [_vm._t("default")], 2)]) },staticRenderFns: []} /***/ }, /***/ 216: /***/ function(module, exports, __webpack_require__) { module.exports = __webpack_require__(25); /***/ }, /***/ 25: /***/ function(module, exports, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_field_vue__ = __webpack_require__(137); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_field_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__src_field_vue__); Object.defineProperty(exports, "__esModule", { value: true }); /* harmony reexport (default from non-hamory) */ __webpack_require__.d(exports, "default", function() { return __WEBPACK_IMPORTED_MODULE_0__src_field_vue___default.a; }); /***/ }, /***/ 3: /***/ function(module, exports) { module.exports = require("mint-ui/lib/cell"); /***/ }, /***/ 4: /***/ function(module, exports) { module.exports = require("mint-ui/lib/cell/style.css"); /***/ }, /***/ 59: /***/ function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_mint_ui_packages_cell_index_js__ = __webpack_require__(3); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_mint_ui_packages_cell_index_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_mint_ui_packages_cell_index_js__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_mint_ui_src_utils_clickoutside__ = __webpack_require__(12); // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // if (true) { __webpack_require__(4); } /** * mt-field * @desc 编辑器,依赖 cell * @module components/field * * @param {string} [type=text] - field 类型,接受 text, textarea 等 * @param {string} [label] - 标签 * @param {string} [rows] - textarea 的 rows * @param {string} [placeholder] - placeholder * @param {string} [disabled] - disabled * @param {string} [readonly] - readonly * @param {string} [state] - 表单校验状态样式,接受 error, warning, success * * @example * * * * */ /* harmony default export */ exports["default"] = { name: 'mt-field', data: function data() { return { active: false, currentValue: this.value }; }, directives: { Clickoutside: __WEBPACK_IMPORTED_MODULE_1_mint_ui_src_utils_clickoutside__["a" /* default */] }, props: { type: { type: String, default: 'text' }, rows: String, label: String, placeholder: String, readonly: Boolean, disabled: Boolean, disableClear: Boolean, state: { type: String, default: 'default' }, value: {}, attr: Object }, components: { XCell: __WEBPACK_IMPORTED_MODULE_0_mint_ui_packages_cell_index_js___default.a }, methods: { doCloseActive: function doCloseActive() { this.active = false; }, handleInput: function handleInput(evt) { this.currentValue = evt.target.value; }, handleClear: function handleClear() { if (this.disabled || this.readonly) return; this.currentValue = ''; } }, watch: { value: function value(val) { this.currentValue = val; }, currentValue: function currentValue(val) { this.$emit('input', val); }, attr: { immediate: true, handler: function handler(attrs) { var this$1 = this; this.$nextTick(function () { var target = [this$1.$refs.input, this$1.$refs.textarea]; target.forEach(function (el) { if (!el || !attrs) return; Object.keys(attrs).map(function (name) { return el.setAttribute(name, attrs[name]); }); }); }); } } } }; /***/ } /******/ });