@cg-devcenter/aim 0.1.915 → 0.1.917

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3674,7 +3674,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
3674
3674
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3675
3675
 
3676
3676
  "use strict";
3677
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _components_mixins_MixinComponentMap_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/components/mixins/MixinComponentMap.vue */ \"./src/components/mixins/MixinComponentMap.vue\");\n/* harmony import */ var _cg_devcenter_jsb_isString__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @cg-devcenter/jsb/isString */ \"./node_modules/@cg-devcenter/jsb/isString.js\");\n/* harmony import */ var _cg_devcenter_jsb_isString__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_cg_devcenter_jsb_isString__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @cg-devcenter/jsb */ \"./node_modules/@cg-devcenter/jsb/index.js\");\n/* harmony import */ var _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./index */ \"./src/components/AimFormInput/index.js\");\n/* harmony import */ var _components_cells_const__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/components/cells/const */ \"./src/components/cells/const.js\");\n/* harmony import */ var _components_AimTable_table__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/components/AimTable/table */ \"./src/components/AimTable/table.js\");\n/* harmony import */ var _components_cells_CellViewAlert_vue__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/components/cells/CellViewAlert.vue */ \"./src/components/cells/CellViewAlert.vue\");\n/* harmony import */ var _components_AimFormInput_AimFormItem_vue__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/components/AimFormInput/AimFormItem.vue */ \"./src/components/AimFormInput/AimFormItem.vue\");\n/* harmony import */ var _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/components/AimTable/slot */ \"./src/components/AimTable/slot.js\");\n/* harmony import */ var _components_AimTable_Column_ColumnHeader_vue__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/components/AimTable/Column/ColumnHeader.vue */ \"./src/components/AimTable/Column/ColumnHeader.vue\");\n/* harmony import */ var vue_loading_overlay__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! vue-loading-overlay */ \"./node_modules/vue-loading-overlay/dist/vue-loading.min.js\");\n/* harmony import */ var vue_loading_overlay__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(vue_loading_overlay__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var vue_loading_overlay_dist_vue_loading_css__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! vue-loading-overlay/dist/vue-loading.css */ \"./node_modules/vue-loading-overlay/dist/vue-loading.css\");\n/* harmony import */ var _components_AimTable_virtual_field__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @/components/AimTable/virtual_field */ \"./src/components/AimTable/virtual_field.js\");\n/* harmony import */ var _components_AimTable_formatterForUpdate__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @/components/AimTable/formatterForUpdate */ \"./src/components/AimTable/formatterForUpdate.js\");\n/* harmony import */ var _components_AimTable_validate__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @/components/AimTable/validate */ \"./src/components/AimTable/validate.js\");\n/* harmony import */ var _components_AimTable_default__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @/components/AimTable/default */ \"./src/components/AimTable/default.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"AimFormInput\",\n components: {\n Loading: (vue_loading_overlay__WEBPACK_IMPORTED_MODULE_11___default()),\n ColumnHeader: _components_AimTable_Column_ColumnHeader_vue__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n AimFormItem: _components_AimFormInput_AimFormItem_vue__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n CellViewAlert: _components_cells_CellViewAlert_vue__WEBPACK_IMPORTED_MODULE_7__[\"default\"]\n },\n watch: {\n schema: {\n handler: function () {\n this.processSchema();\n },\n deep: true\n }\n },\n computed: {\n cssVars() {\n return {\n \"--form-container-height\": `${this.height}px`\n };\n },\n allCommentSlotName() {\n return (0,_components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.allSlotName)(this.schema, 'commentSlot');\n }\n },\n mixins: [_components_mixins_MixinComponentMap_vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"]],\n props: {\n height: Number,\n schema: Array,\n // 行schema信息\n data: [Object, Function, Promise],\n // 当前行数据\n mode: String,\n // 编辑模式\n alertInfo: {\n type: [Object, String],\n default: null\n },\n rules: Object,\n shouldCellDisable: Function,\n // 最外层调用不要设定rowTop,递归时传递到最底层便于统一回调外层\n rowTop: Object,\n labelWidth: String,\n viewLevelIndex: Number,\n // 默认0也就是0级页面\n parentKey: String,\n readOnly: Boolean,\n // 对接AimTable时,AimTable自动完成了watch\n enableWatcher: {\n type: Boolean,\n default: true\n },\n groupConfig: Array,\n row2Storage: Function,\n tableDataGetter: Function,\n submitRemoveFieldNotInSchema: {\n type: Boolean,\n default: false\n }\n },\n async created() {\n let dataGot = this.data;\n if (typeof this.data === 'function') {\n // 如果 options 是一个函数,则调用它并等待它的返回值\n dataGot = this.data();\n if (dataGot instanceof Promise) {\n this.inLoading = true;\n dataGot = await dataGot.finally(() => {\n this.inLoading = false;\n });\n }\n } else if (this.data instanceof Promise) {\n // 如果 options 是一个 Promise,则等待 Promise 完成并赋值给 optionsInner\n this.inLoading = true;\n dataGot = await this.data.finally(() => {\n this.inLoading = false;\n });\n }\n this.dataRef = dataGot;\n this.processSchema();\n if (this.rules) {\n this.rulesRef = this.rules;\n } else {\n this.rulesRef = (0,_components_AimTable_validate__WEBPACK_IMPORTED_MODULE_15__.FormRulesFromSchema)(this.schema);\n }\n this.getProxyTipSlotName();\n this.getProxyCommentSlotName();\n },\n data() {\n return {\n CodeButtonAdd: _components_cells_const__WEBPACK_IMPORTED_MODULE_5__.CodeButtonAdd,\n CodeButtonRowSelectedMinus: _components_cells_const__WEBPACK_IMPORTED_MODULE_5__.CodeButtonRowSelectedMinus,\n labelWidthPixel: this.labelWidth || (0,_index__WEBPACK_IMPORTED_MODULE_4__.calcLabelWidth)(this.schema || []),\n //fixme 需要table打入rules,独立使用AimFormInput的时候需要根据schema更新rules\n rulesRef: {},\n fieldsCommon: [],\n dataRef: {},\n inLoading: false,\n // inline显示的字段\n fieldSorted: [],\n currTab: {},\n groupMaxFieldNumber: 0,\n fieldWatcher: []\n };\n },\n beforeDestroy() {\n this.cleanFieldWatcher();\n },\n methods: {\n groupLabelWidth(gs) {\n const groupSquash = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(gs.setting, 'squash', false);\n if (groupSquash) {\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(gs, 'squash', false)) {\n return null;\n }\n return '0px';\n }\n return null;\n },\n getProxyCommentSlotNameWithName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.getProxyCommentSlotNameWithName,\n commentSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.commentSlotName,\n tipSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.tipSlotName,\n formSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.formSlotName,\n isString: (_cg_devcenter_jsb_isString__WEBPACK_IMPORTED_MODULE_2___default()),\n getProxyTipSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.getProxyTipSlotName,\n getProxyFormSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.getProxyFormSlotName,\n getProxyCommentSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.getProxyCommentSlotName,\n cleanFieldWatcher() {\n this.fieldWatcher.forEach(watcher => watcher());\n this.fieldWatcher = [];\n },\n afterField(fieldGroupList, field) {\n let ret = [];\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(fieldGroupList, function (group) {\n if (group.setting.after === field) {\n ret.push(group);\n }\n });\n ret.sort(function (a, b) {\n const indexA = a.setting.index || 0;\n const indexB = b.setting.index || 0;\n return indexA - indexB;\n });\n return ret;\n },\n iconBind(icon) {\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isString(icon)) {\n return {\n class: icon,\n style: {\n 'padding-right': '3px'\n }\n };\n }\n return icon;\n },\n setInLoading(v) {\n this.inLoading = v;\n },\n setLoading(v) {\n this.inLoading = v;\n },\n // 刷新当前表内local proxy 的aim表数据\n reloadLocalProxyAimTableData(field) {\n const refs = this.$refs['aimFormItem'];\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().wrapArray(refs), v => {\n v.reloadLocalProxyAimTableData(field);\n });\n },\n processSchema() {\n if (!this.dataRef) {\n return;\n }\n const fieldsCommon = [];\n const fieldGroupList = [];\n const _this = this;\n\n // 创建视图的时候根据schema填充默认数值,防止由于数值缺失导致的访问undefined\n // 但是只有传入的data完全空的时候才设定 fillBySchemaDefault 为true\n this.dataRef = (0,_components_AimTable_default__WEBPACK_IMPORTED_MODULE_16__.FillDefaultDataWithSchema)(this.schema, this.dataRef, this.mode === _index__WEBPACK_IMPORTED_MODULE_4__.AimFormInputInsert);\n this.cleanFieldWatcher();\n _this.groupMaxFieldNumber = 0;\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(this.schema, function (fs) {\n let formOff = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fs, 'formOff', undefined);\n if (formOff === undefined) {\n formOff = !!(0,_components_AimTable_virtual_field__WEBPACK_IMPORTED_MODULE_13__.isVirtualField)(fs);\n }\n if (formOff) {\n return;\n }\n if (_this.mode === _index__WEBPACK_IMPORTED_MODULE_4__.AimFormInputInsert && _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fs, 'insertOff', false)) {\n return;\n }\n const itemType = _this.fieldType(fs);\n // 如果是object类型,在传递进 FormInput 组件前需要给默认值\n if (itemType === 'object' && (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isNull(_this.dataRef[fs.field]) || _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isUndefined(_this.dataRef[fs.field]))) {\n _this.dataRef[fs.field] = {};\n }\n if (itemType === 'table' && (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isNull(_this.dataRef[fs.field]) || _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isUndefined(_this.dataRef[fs.field]))) {\n _this.dataRef[fs.field] = [];\n }\n const watch = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fs, 'watch');\n if (_this.enableWatcher && watch) {\n const watcher = _this.$watch(`dataRef.${fs.field}`, function (newValue, oldValue) {\n watch({\n row: this.getRow(),\n newValue,\n oldValue,\n parent: this.dataRef,\n target: this\n });\n }, _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fs, 'watchOptions', {}));\n _this.fieldWatcher.push(watcher);\n }\n let asCommonField = true;\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(_this.groupConfig, function (groupSetting, index) {\n if (!asCommonField) {\n return;\n }\n const fields = groupSetting.fields;\n let fieldShouldInGroup;\n if (fields) {\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isArray(fields)) {\n fieldShouldInGroup = fields.includes(fs.field);\n } else {\n fieldShouldInGroup = fields[fs.field];\n }\n }\n if (fieldShouldInGroup) {\n let group = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().find(fieldGroupList, item => item.index === index);\n if (!group) {\n group = {\n index: index,\n fieldSchemaList: [],\n setting: groupSetting,\n __isGroup: true\n };\n fieldGroupList.push(group);\n }\n asCommonField = false;\n if (!_this.currTab[`group_tab_${index}`]) {\n _this.currTab[`group_tab_${index}`] = _this.formLabel(fs);\n }\n group.fieldSchemaList.push(fs);\n if (group.fieldSchemaList.length > _this.groupMaxFieldNumber) {\n _this.groupMaxFieldNumber = group.fieldSchemaList.length;\n }\n }\n });\n if (asCommonField) {\n fieldsCommon.push(fs);\n }\n });\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(_this.groupConfig, function (groupSetting, index) {\n if (groupSetting.type === 'divider') {\n fieldGroupList.push({\n index: index,\n setting: groupSetting,\n __isGroup: true\n });\n }\n });\n _this.fieldSorted = [];\n _this.fieldSorted.push(..._this.afterField(fieldGroupList, '@start'));\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(fieldsCommon, function (fs) {\n _this.fieldSorted.push(fs);\n _this.fieldSorted.push(..._this.afterField(fieldGroupList, fs.field));\n });\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(fieldGroupList, function (group) {\n if (!_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().find(_this.fieldSorted, item => item.index === group.index)) {\n _this.fieldSorted.push(group);\n }\n });\n },\n groupShow(group) {\n let showCount = 0;\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(group.fieldSchemaList, v => {\n if ((0,_index__WEBPACK_IMPORTED_MODULE_4__.showForm)(this.getRow(), v, this.dataRef)) {\n showCount += 1;\n }\n });\n return showCount !== 0;\n },\n span(group, field) {\n let showCount = 0;\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(group.fieldSchemaList, v => {\n if ((0,_index__WEBPACK_IMPORTED_MODULE_4__.showForm)(this.getRow(), v, this.dataRef)) {\n showCount += 1;\n }\n });\n if (showCount === 1) {\n return 24;\n }\n if (this.groupMaxFieldNumber && _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(group.setting, 'itemAlign', true)) {\n return 24 / this.groupMaxFieldNumber;\n }\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isArray(group.setting.fields)) {\n return 24 / group.setting.fields.length;\n }\n return group.setting.fields[field] || 24 / group.setting.fields.length;\n },\n fieldType(fs) {\n return _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fs, 'typeFormInput', fs['type']);\n },\n getRow() {\n if (!this.rowTop) {\n return this.dataRef;\n }\n return this.rowTop;\n },\n formLabel(si) {\n return _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(si, 'nameForm', si['name']);\n },\n // 获取数据,不进行validate\n getDataForStorage(data = undefined) {\n data = data || this.dataRef;\n return (0,_components_AimTable_formatterForUpdate__WEBPACK_IMPORTED_MODULE_14__.CleanRowForStorage)(this.schema, data, true, true, this.submitRemoveFieldNotInSchema, this.row2Storage);\n },\n // validate 逻辑层主动调用,单独使用AimFormInput的场景\n validate(validCallback, notValidCallback = null, onValidCallbackRunError = e => {\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().cc.toastWarning(e);\n }) {\n const _this = this;\n this.__validatePrivate(validCallback, notValidCallback, onValidCallbackRunError, v => {\n // 移除虚拟字段、移除控制字段\n return _this.getDataForStorage(v);\n });\n },\n // __validatePrivate 外部不要直接调用\n __validatePrivate(validCallback, notValidCallback = () => {}, onValidCallbackRunError = e => {\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().cc.toastWarning(e);\n }, processor = v => {\n return v;\n }) {\n const _this = this;\n this.$refs['form'].validate(valid => {\n if (valid) {\n try {\n const tmp = processor(_this.dataRef);\n validCallback(tmp);\n } catch (e) {\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isFunction(onValidCallbackRunError)) {\n onValidCallbackRunError(e);\n }\n }\n } else {\n notValidCallback && notValidCallback();\n }\n });\n },\n // __validateFromAimTable aim table 内部调用,此处不主动清理数据,由aim table完成\n __validateFromAimTable(validCallback) {\n this.__validatePrivate(validCallback);\n },\n fieldComponentKey(fs) {\n return `${this.parentKey}_${fs.field}_${(0,_components_AimTable_table__WEBPACK_IMPORTED_MODULE_6__.xidRow)(this.getRow())}`;\n },\n formHeight() {\n return this.$refs.form.$el.clientHeight;\n },\n formRows() {\n return this.fieldSorted.length;\n },\n privateShouldCellDisable({\n fieldSchema,\n cell\n }) {\n if (this.readOnly) {\n return true;\n }\n if (this.mode === _index__WEBPACK_IMPORTED_MODULE_4__.AimFormInputView) {\n return true;\n }\n // 只读属性,如id等依赖服务器返回,只展现不允许编辑\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fieldSchema, 'disabled', false)) {\n return true;\n }\n // 只读属性,如id等依赖服务器返回,只展现不允许编辑\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fieldSchema, 'readOnly', false)) {\n return true;\n }\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fieldSchema, 'insertOnly', false)) {\n // 只允许插入时有效,创建后不允许编辑\n return this.mode !== _index__WEBPACK_IMPORTED_MODULE_4__.AimFormInputInsert && this.mode !== _index__WEBPACK_IMPORTED_MODULE_4__.AimFormInputCopy;\n }\n if (!this.shouldCellDisable) {\n return false;\n }\n return this.shouldCellDisable({\n fieldSchema,\n cell,\n row: this.getRow()\n });\n }\n }\n});\n\n//# sourceURL=webpack://@cg-devcenter/aim/./src/components/AimFormInput/index.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options");
3677
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _components_mixins_MixinComponentMap_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/components/mixins/MixinComponentMap.vue */ \"./src/components/mixins/MixinComponentMap.vue\");\n/* harmony import */ var _cg_devcenter_jsb_isString__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @cg-devcenter/jsb/isString */ \"./node_modules/@cg-devcenter/jsb/isString.js\");\n/* harmony import */ var _cg_devcenter_jsb_isString__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_cg_devcenter_jsb_isString__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @cg-devcenter/jsb */ \"./node_modules/@cg-devcenter/jsb/index.js\");\n/* harmony import */ var _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./index */ \"./src/components/AimFormInput/index.js\");\n/* harmony import */ var _components_cells_const__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/components/cells/const */ \"./src/components/cells/const.js\");\n/* harmony import */ var _components_AimTable_table__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/components/AimTable/table */ \"./src/components/AimTable/table.js\");\n/* harmony import */ var _components_cells_CellViewAlert_vue__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/components/cells/CellViewAlert.vue */ \"./src/components/cells/CellViewAlert.vue\");\n/* harmony import */ var _components_AimFormInput_AimFormItem_vue__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/components/AimFormInput/AimFormItem.vue */ \"./src/components/AimFormInput/AimFormItem.vue\");\n/* harmony import */ var _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/components/AimTable/slot */ \"./src/components/AimTable/slot.js\");\n/* harmony import */ var _components_AimTable_Column_ColumnHeader_vue__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/components/AimTable/Column/ColumnHeader.vue */ \"./src/components/AimTable/Column/ColumnHeader.vue\");\n/* harmony import */ var vue_loading_overlay__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! vue-loading-overlay */ \"./node_modules/vue-loading-overlay/dist/vue-loading.min.js\");\n/* harmony import */ var vue_loading_overlay__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(vue_loading_overlay__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var vue_loading_overlay_dist_vue_loading_css__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! vue-loading-overlay/dist/vue-loading.css */ \"./node_modules/vue-loading-overlay/dist/vue-loading.css\");\n/* harmony import */ var _components_AimTable_virtual_field__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @/components/AimTable/virtual_field */ \"./src/components/AimTable/virtual_field.js\");\n/* harmony import */ var _components_AimTable_formatterForUpdate__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @/components/AimTable/formatterForUpdate */ \"./src/components/AimTable/formatterForUpdate.js\");\n/* harmony import */ var _components_AimTable_validate__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @/components/AimTable/validate */ \"./src/components/AimTable/validate.js\");\n/* harmony import */ var _components_AimTable_default__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @/components/AimTable/default */ \"./src/components/AimTable/default.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"AimFormInput\",\n components: {\n Loading: (vue_loading_overlay__WEBPACK_IMPORTED_MODULE_11___default()),\n ColumnHeader: _components_AimTable_Column_ColumnHeader_vue__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n AimFormItem: _components_AimFormInput_AimFormItem_vue__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n CellViewAlert: _components_cells_CellViewAlert_vue__WEBPACK_IMPORTED_MODULE_7__[\"default\"]\n },\n watch: {\n schema: {\n handler: function () {\n this.processSchema();\n },\n deep: true\n }\n },\n computed: {\n cssVars() {\n return {\n \"--form-container-height\": `${this.height}px`\n };\n },\n allCommentSlotName() {\n return (0,_components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.allSlotName)(this.schema, 'commentSlot');\n }\n },\n mixins: [_components_mixins_MixinComponentMap_vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"]],\n props: {\n height: Number,\n schema: Array,\n // 行schema信息\n data: [Object, Function, Promise],\n // 当前行数据\n mode: String,\n // 编辑模式\n alertInfo: {\n type: [Object, String],\n default: null\n },\n rules: Object,\n shouldCellDisable: Function,\n // 最外层调用不要设定rowTop,递归时传递到最底层便于统一回调外层\n rowTop: Object,\n labelWidth: String,\n viewLevelIndex: Number,\n // 默认0也就是0级页面\n parentKey: String,\n readOnly: Boolean,\n // 对接AimTable时,AimTable自动完成了watch\n enableWatcher: {\n type: Boolean,\n default: true\n },\n groupConfig: Array,\n row2Storage: Function,\n tableDataGetter: Function,\n submitRemoveFieldNotInSchema: {\n type: Boolean,\n default: false\n }\n },\n async created() {\n let dataGot = this.data;\n if (typeof this.data === 'function') {\n // 如果 options 是一个函数,则调用它并等待它的返回值\n dataGot = this.data();\n if (dataGot instanceof Promise) {\n this.inLoading = true;\n dataGot = await dataGot.finally(() => {\n this.inLoading = false;\n });\n }\n } else if (this.data instanceof Promise) {\n // 如果 options 是一个 Promise,则等待 Promise 完成并赋值给 optionsInner\n this.inLoading = true;\n dataGot = await this.data.finally(() => {\n this.inLoading = false;\n });\n }\n this.dataRef = dataGot;\n this.processSchema();\n if (this.rules) {\n this.rulesRef = this.rules;\n } else {\n this.rulesRef = (0,_components_AimTable_validate__WEBPACK_IMPORTED_MODULE_15__.FormRulesFromSchema)(this.schema);\n }\n this.getProxyTipSlotName();\n this.getProxyCommentSlotName();\n },\n data() {\n return {\n CodeButtonAdd: _components_cells_const__WEBPACK_IMPORTED_MODULE_5__.CodeButtonAdd,\n CodeButtonRowSelectedMinus: _components_cells_const__WEBPACK_IMPORTED_MODULE_5__.CodeButtonRowSelectedMinus,\n labelWidthPixel: this.labelWidth || (0,_index__WEBPACK_IMPORTED_MODULE_4__.calcLabelWidth)(this.schema || []),\n //fixme 需要table打入rules,独立使用AimFormInput的时候需要根据schema更新rules\n rulesRef: {},\n fieldsCommon: [],\n dataRef: {},\n inLoading: false,\n // inline显示的字段\n fieldSorted: [],\n currTab: {},\n groupMaxFieldNumber: 0,\n fieldWatcher: []\n };\n },\n beforeDestroy() {\n this.cleanFieldWatcher();\n },\n methods: {\n groupLabelWidth(gs) {\n const groupSquash = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(gs.setting, 'squash', false);\n if (groupSquash) {\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(gs, 'squash', false)) {\n return null;\n }\n return '0px';\n }\n return null;\n },\n getProxyCommentSlotNameWithName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.getProxyCommentSlotNameWithName,\n commentSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.commentSlotName,\n tipSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.tipSlotName,\n formSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.formSlotName,\n isString: (_cg_devcenter_jsb_isString__WEBPACK_IMPORTED_MODULE_2___default()),\n getProxyTipSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.getProxyTipSlotName,\n getProxyFormSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.getProxyFormSlotName,\n getProxyCommentSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.getProxyCommentSlotName,\n cleanFieldWatcher() {\n this.fieldWatcher.forEach(watcher => watcher());\n this.fieldWatcher = [];\n },\n afterField(fieldGroupList, field) {\n let ret = [];\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(fieldGroupList, function (group) {\n if (group.setting.after === field) {\n ret.push(group);\n }\n });\n ret.sort(function (a, b) {\n const indexA = a.setting.index || 0;\n const indexB = b.setting.index || 0;\n return indexA - indexB;\n });\n return ret;\n },\n iconBind(icon) {\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isString(icon)) {\n return {\n class: icon,\n style: {\n 'padding-right': '3px'\n }\n };\n }\n return icon;\n },\n setInLoading(v) {\n this.inLoading = v;\n },\n setLoading(v) {\n this.inLoading = v;\n },\n // 刷新当前表内local proxy 的aim表数据\n reloadLocalProxyAimTableData(field) {\n const refs = this.$refs['aimFormItem'];\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().wrapArray(refs), v => {\n v.reloadLocalProxyAimTableData(field);\n });\n },\n processSchema() {\n if (!this.dataRef) {\n return;\n }\n const fieldsCommon = [];\n const fieldGroupList = [];\n const _this = this;\n\n // 创建视图的时候根据schema填充默认数值,防止由于数值缺失导致的访问undefined\n // 但是只有传入的data完全空的时候才设定 fillBySchemaDefault 为true\n this.dataRef = (0,_components_AimTable_default__WEBPACK_IMPORTED_MODULE_16__.FillDefaultDataWithSchema)(this.schema, this.dataRef, this.mode === _index__WEBPACK_IMPORTED_MODULE_4__.AimFormInputInsert);\n this.cleanFieldWatcher();\n _this.groupMaxFieldNumber = 0;\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(this.schema, function (fs) {\n let formOff = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fs, 'formOff', undefined);\n if (formOff === undefined) {\n formOff = !!(0,_components_AimTable_virtual_field__WEBPACK_IMPORTED_MODULE_13__.isVirtualField)(fs);\n }\n if (formOff) {\n return;\n }\n if (_this.mode === _index__WEBPACK_IMPORTED_MODULE_4__.AimFormInputInsert && _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fs, 'insertOff', false)) {\n return;\n }\n const itemType = _this.fieldType(fs);\n // 如果是object类型,在传递进 FormInput 组件前需要给默认值\n if (itemType === 'object' && (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isNull(_this.dataRef[fs.field]) || _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isUndefined(_this.dataRef[fs.field]))) {\n _this.dataRef[fs.field] = {};\n }\n if (itemType === 'table' && (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isNull(_this.dataRef[fs.field]) || _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isUndefined(_this.dataRef[fs.field]))) {\n _this.dataRef[fs.field] = [];\n }\n const watch = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fs, 'watch');\n if (_this.enableWatcher && watch) {\n const watcher = _this.$watch(`dataRef.${fs.field}`, function (newValue, oldValue) {\n watch({\n row: this.getRow(),\n newValue,\n oldValue,\n parent: this.dataRef,\n target: this\n });\n }, _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fs, 'watchOptions', {}));\n _this.fieldWatcher.push(watcher);\n }\n let asCommonField = true;\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(_this.groupConfig, function (groupSetting, index) {\n if (!asCommonField) {\n return;\n }\n const fields = groupSetting.fields;\n let fieldShouldInGroup;\n if (fields) {\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isArray(fields)) {\n fieldShouldInGroup = fields.includes(fs.field);\n } else {\n fieldShouldInGroup = fields[fs.field];\n }\n }\n if (fieldShouldInGroup) {\n let group = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().find(fieldGroupList, item => item.index === index);\n if (!group) {\n group = {\n index: index,\n fieldSchemaList: [],\n setting: groupSetting,\n __isGroup: true\n };\n fieldGroupList.push(group);\n }\n asCommonField = false;\n if (!_this.currTab[`group_tab_${index}`]) {\n _this.currTab[`group_tab_${index}`] = _this.formLabel(fs);\n }\n group.fieldSchemaList.push(fs);\n if (group.fieldSchemaList.length > _this.groupMaxFieldNumber) {\n _this.groupMaxFieldNumber = group.fieldSchemaList.length;\n }\n }\n });\n if (asCommonField) {\n fieldsCommon.push(fs);\n }\n });\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(_this.groupConfig, function (groupSetting, index) {\n if (groupSetting.type === 'divider') {\n fieldGroupList.push({\n index: index,\n setting: groupSetting,\n __isGroup: true\n });\n }\n });\n _this.fieldSorted = [];\n _this.fieldSorted.push(..._this.afterField(fieldGroupList, '@start'));\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(fieldsCommon, function (fs) {\n _this.fieldSorted.push(fs);\n _this.fieldSorted.push(..._this.afterField(fieldGroupList, fs.field));\n });\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(fieldGroupList, function (group) {\n if (!_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().find(_this.fieldSorted, item => item.index === group.index)) {\n _this.fieldSorted.push(group);\n }\n });\n },\n groupShow(group) {\n let showCount = 0;\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(group.fieldSchemaList, v => {\n if ((0,_index__WEBPACK_IMPORTED_MODULE_4__.showForm)(this.getRow(), v, this.dataRef)) {\n showCount += 1;\n }\n });\n return showCount !== 0;\n },\n span(group, field) {\n let showCount = 0;\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(group.fieldSchemaList, v => {\n if ((0,_index__WEBPACK_IMPORTED_MODULE_4__.showForm)(this.getRow(), v, this.dataRef)) {\n showCount += 1;\n }\n });\n if (showCount === 1) {\n return 24;\n }\n if (this.groupMaxFieldNumber && _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(group.setting, 'itemAlign', true)) {\n return 24 / this.groupMaxFieldNumber;\n }\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isArray(group.setting.fields)) {\n return 24 / group.setting.fields.length;\n }\n return group.setting.fields[field] || 24 / group.setting.fields.length;\n },\n fieldType(fs) {\n return _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fs, 'typeFormInput', fs['type']);\n },\n getRow() {\n if (!this.rowTop) {\n return this.dataRef;\n }\n return this.rowTop;\n },\n formLabel(si) {\n return _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(si, 'nameForm', si['name']);\n },\n // 获取数据,不进行validate\n getDataForStorage(data = undefined) {\n data = data || this.dataRef;\n return (0,_components_AimTable_formatterForUpdate__WEBPACK_IMPORTED_MODULE_14__.CleanRowForStorage)(this.schema, data, true, true, this.submitRemoveFieldNotInSchema, this.row2Storage);\n },\n // validate 逻辑层主动调用,单独使用AimFormInput的场景\n validate(validCallback, notValidCallback = null, onValidCallbackRunError = e => {\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().cc.toastWarning(e);\n }) {\n const _this = this;\n this.__validatePrivate(validCallback, notValidCallback, onValidCallbackRunError, v => {\n // 移除虚拟字段、移除控制字段\n return _this.getDataForStorage(v);\n });\n },\n // __validatePrivate 外部不要直接调用\n __validatePrivate(validCallback, notValidCallback, onValidCallbackRunError = e => {\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().cc.toastWarning(e);\n }, processor = v => {\n return v;\n }) {\n const _this = this;\n this.$refs['form'].validate((valid, invalidFields) => {\n if (valid) {\n try {\n const tmp = processor(_this.dataRef);\n validCallback(tmp);\n } catch (e) {\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isFunction(onValidCallbackRunError)) {\n onValidCallbackRunError(e);\n }\n }\n } else {\n notValidCallback ? notValidCallback() : Object.values(invalidFields).forEach(errors => {\n if (Array.isArray(errors)) {\n errors.forEach(error => {\n const {\n message\n } = error;\n if (message) {\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().cc.toastWarning(message);\n }\n });\n }\n });\n }\n });\n },\n // __validateFromAimTable aim table 内部调用,此处不主动清理数据,由aim table完成\n __validateFromAimTable(validCallback) {\n this.__validatePrivate(validCallback);\n },\n fieldComponentKey(fs) {\n return `${this.parentKey}_${fs.field}_${(0,_components_AimTable_table__WEBPACK_IMPORTED_MODULE_6__.xidRow)(this.getRow())}`;\n },\n formHeight() {\n return this.$refs.form.$el.clientHeight;\n },\n formRows() {\n return this.fieldSorted.length;\n },\n privateShouldCellDisable({\n fieldSchema,\n cell\n }) {\n if (this.readOnly) {\n return true;\n }\n if (this.mode === _index__WEBPACK_IMPORTED_MODULE_4__.AimFormInputView) {\n return true;\n }\n // 只读属性,如id等依赖服务器返回,只展现不允许编辑\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fieldSchema, 'disabled', false)) {\n return true;\n }\n // 只读属性,如id等依赖服务器返回,只展现不允许编辑\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fieldSchema, 'readOnly', false)) {\n return true;\n }\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fieldSchema, 'insertOnly', false)) {\n // 只允许插入时有效,创建后不允许编辑\n return this.mode !== _index__WEBPACK_IMPORTED_MODULE_4__.AimFormInputInsert && this.mode !== _index__WEBPACK_IMPORTED_MODULE_4__.AimFormInputCopy;\n }\n if (!this.shouldCellDisable) {\n return false;\n }\n return this.shouldCellDisable({\n fieldSchema,\n cell,\n row: this.getRow()\n });\n }\n }\n});\n\n//# sourceURL=webpack://@cg-devcenter/aim/./src/components/AimFormInput/index.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options");
3678
3678
 
3679
3679
  /***/ }),
3680
3680
 
@@ -4070,7 +4070,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _com
4070
4070
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
4071
4071
 
4072
4072
  "use strict";
4073
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _components_cells_mixins_MixinCellEditorConfig_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/components/cells/mixins/MixinCellEditorConfig.vue */ \"./src/components/cells/mixins/MixinCellEditorConfig.vue\");\n/* harmony import */ var _components_cells_CellTriggerImageSelect_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/components/cells/CellTriggerImageSelect.vue */ \"./src/components/cells/CellTriggerImageSelect.vue\");\n/* harmony import */ var _components_cells_CellViewImage_vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components/cells/CellViewImage.vue */ \"./src/components/cells/CellViewImage.vue\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'CellInput',\n components: {\n CellViewImage: _components_cells_CellViewImage_vue__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n CellTriggerImageSelect: _components_cells_CellTriggerImageSelect_vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n },\n mixins: [_components_cells_mixins_MixinCellEditorConfig_vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"]],\n props: {\n asImage: Boolean\n },\n created() {\n this.ccConfigMerge();\n },\n methods: {\n divClass() {\n return this.calcWidthPixString() ? 'cell-input-with-width' : '';\n },\n divStyle() {\n return {\n '--input-width': this.calcWidthPixString() || '100%',\n width: \"100%\",\n display: 'inline-flex'\n };\n },\n isValidImageUrl(url) {\n if (!url) {\n return false;\n }\n // 通过文件后缀判断是否是图像\n const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp'];\n const extension = String(url).split('.').pop().toLowerCase();\n return imageExtensions.includes(extension);\n }\n }\n});\n\n//# sourceURL=webpack://@cg-devcenter/aim/./src/components/cells/CellInput.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options");
4073
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _components_cells_mixins_MixinCellEditorConfig_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/components/cells/mixins/MixinCellEditorConfig.vue */ \"./src/components/cells/mixins/MixinCellEditorConfig.vue\");\n/* harmony import */ var _components_cells_CellTriggerImageSelect_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/components/cells/CellTriggerImageSelect.vue */ \"./src/components/cells/CellTriggerImageSelect.vue\");\n/* harmony import */ var _components_cells_CellViewImage_vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components/cells/CellViewImage.vue */ \"./src/components/cells/CellViewImage.vue\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'CellInput',\n components: {\n CellViewImage: _components_cells_CellViewImage_vue__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n CellTriggerImageSelect: _components_cells_CellTriggerImageSelect_vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n },\n mixins: [_components_cells_mixins_MixinCellEditorConfig_vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"]],\n props: {\n asImage: Boolean\n },\n created() {\n this.ccConfigMerge({}, [\"autosize\"]);\n },\n methods: {\n divClass() {\n return this.calcWidthPixString() ? 'cell-input-with-width' : '';\n },\n divStyle() {\n return {\n '--input-width': this.calcWidthPixString() || '100%',\n width: \"100%\",\n display: 'inline-flex'\n };\n },\n isValidImageUrl(url) {\n if (!url) {\n return false;\n }\n // 通过文件后缀判断是否是图像\n const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp'];\n const extension = String(url).split('.').pop().toLowerCase();\n return imageExtensions.includes(extension);\n }\n }\n});\n\n//# sourceURL=webpack://@cg-devcenter/aim/./src/components/cells/CellInput.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options");
4074
4074
 
4075
4075
  /***/ }),
4076
4076
 
@@ -4499,7 +4499,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _com
4499
4499
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
4500
4500
 
4501
4501
  "use strict";
4502
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @cg-devcenter/jsb */ \"./node_modules/@cg-devcenter/jsb/index.js\");\n/* harmony import */ var _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'MixinCellEditorConfig',\n props: {\n cellConfig: {},\n // 组件配置,editor的cellConfig必须为Object,但是对viewer可以为组件需要的值\n\n data: Object,\n // 父对象数据,必须是一个Object,组件的model为data[fieldName]\n fieldName: String,\n formatter: Function,\n // 格式化化方法\n\n options: [Function, Array, Promise],\n styleOverride: Object,\n // 便于组件覆盖基础配置,如form中所有的元素设定为100% width,但是少数对象如checkbox不允许100%\n styleBase: Object,\n // 便于父对象定义基础配置,如form中所有的元素设定为100% width\n disabled: Boolean,\n // 是否只读\n\n fieldSchema: Object,\n // trigger时需要通过fieldSchema定位fields字段数据\n getRow: Function,\n tableDataGetter: Function\n },\n watch: {\n options: {\n handler: function () {\n this.fetchOptionsData();\n },\n deep: true\n }\n },\n data() {\n const _this = this;\n return {\n dataRef: {},\n cc: {\n style: {},\n change: _this.emitChange,\n clearable: true\n },\n inOptionLoading: false,\n optionsUsing: [],\n optionsRefresh: false,\n fieldSchemaRef: this.fieldSchema,\n optionValueKey: 'value'\n };\n },\n async created() {\n if (this.data) {\n this.dataRef = this.data;\n }\n await this.fetchOptionsData();\n },\n methods: {\n optionsParameter(force = false) {\n return {\n force: force,\n parent: this.dataRef,\n row: this.getRow ? this.getRow() : null,\n table: this.tableDataGetter ? this.tableDataGetter() : null\n };\n },\n async manualFetchOptionsData() {\n return this.fetchOptionsData(true);\n },\n async fetchOptionsData(force = false) {\n try {\n this.inOptionLoading = true;\n await this.__fetchOptionsData(force);\n } catch (error) {\n if (this.fieldSchemaRef) {\n this.fieldSchemaRef.errorMessage = error;\n } else {\n console.log(\"aim option fresh got error \", error);\n }\n } finally {\n this.inOptionLoading = false;\n }\n },\n async __fetchOptionsData(force = false) {\n let optionsGot = [];\n let tmpOptionsRefresh = false;\n if (typeof this.options === 'function') {\n tmpOptionsRefresh = true;\n // 如果 options 是一个函数,则调用它并等待它的返回值\n optionsGot = this.options(this.optionsParameter(force));\n if (optionsGot instanceof Promise) {\n optionsGot = await optionsGot;\n }\n } else if (this.options instanceof Promise) {\n tmpOptionsRefresh = true;\n // 如果 options 是一个 Promise,则等待 Promise 完成并赋值给 optionsInner\n optionsGot = await this.options;\n } else if (Array.isArray(this.options)) {\n tmpOptionsRefresh = false;\n // 如果 options 是一个数组,直接赋值\n optionsGot = this.options;\n }\n let autoGroupField = '';\n let autoGroupSort = '';\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().isObjectOrMap(optionsGot)) {\n tmpOptionsRefresh = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(optionsGot, 'refresh', false);\n autoGroupField = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(optionsGot, 'autoGroup', '');\n autoGroupSort = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(optionsGot, 'autoGroupSort', 'desc');\n optionsGot = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(optionsGot, 'options', []);\n }\n this.optionsUsing = [];\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(this.optionsFmt(optionsGot, autoGroupField, autoGroupSort), v => {\n this.optionsUsing.push(v);\n });\n this.optionsRefresh = tmpOptionsRefresh;\n },\n optionsTryGroup(options, field, autoGroupSort) {\n let group2Options = {};\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(options, item => {\n const groupVal = item[field] || '';\n if (!group2Options[groupVal]) {\n group2Options[groupVal] = [];\n }\n group2Options[groupVal].push(item);\n });\n let optionGroup = [];\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(group2Options, (item, key) => {\n optionGroup.push({\n label: key,\n options: item\n });\n });\n // 优先显示group\n optionGroup = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().orderBy(optionGroup, [{\n field: 'label',\n order: autoGroupSort\n }]);\n if (optionGroup.length === 1 && optionGroup[0].label === \"\") {\n return optionGroup[0].options;\n }\n return optionGroup;\n },\n optionsFmt(optionsGot, autoGroupField, autoGroupSort) {\n const options = [];\n // 将数组转换为option对象\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(optionsGot, v => {\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().isString(v) || _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().isNumber(v)) {\n options.push({\n label: v,\n value: v\n });\n } else {\n options.push(v);\n }\n });\n this.optionValueKey = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(options, '0.valueKey', 'value');\n if (autoGroupField) {\n // 如果option的属性字段中含有aimGroup,则自动将其聚合为group\n return this.optionsTryGroup(options, autoGroupField, autoGroupSort);\n }\n return options;\n },\n emitChange(valNew) {\n this.$emit(\"input\", valNew);\n },\n calcWidthPixString(defaultVal) {\n this.cc.style.width = this.cc.style.width ? _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().isString(this.cc.style.width) ? this.cc.style.width : `${this.cc.style.width}px` : defaultVal;\n return this.cc.style.width;\n },\n ccConfigMerge(initVal = {}, copyVal = []) {\n const _this = this;\n // styleDefault => styleBase => styleUser => styleOverride\n const mergeFiled = ['style'];\n this.cc.style = Object.assign(this.cc.style, this.styleBase);\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(initVal, function (val, key) {\n if (mergeFiled.includes(key)) {\n _this.cc[key] = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().merge(_this.cc[key], val);\n } else {\n _this.cc[key] = val;\n }\n });\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(copyVal, function (key) {\n const value = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(_this.fieldSchema, key);\n value && _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathSet(_this.cc, key, value);\n });\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().isPlainObject(this.cellConfig)) {\n this.cc = Object.assign(this.cc, this.cellConfig);\n }\n this.cc.style = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().assign(this.cc.style, this.styleOverride);\n this.cc.placeholder = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(this.fieldSchema, 'placeholder', this.cc.placeholder);\n this.cc.pickerOptions = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(this.fieldSchema, 'pickerOptions', this.cc.pickerOptions);\n },\n change(newVal) {\n this.$forceUpdate();\n if (this.cc.change) {\n this.cc.change(newVal);\n }\n if (this.cc['changeEx']) {\n this.cc['changeEx']({\n value: newVal,\n parent: this.data\n });\n }\n if (this.fieldSchema && this.fieldSchema.__tableCallbackOnChange) {\n this.fieldSchema.__tableCallbackOnChange({\n row: this.data\n });\n }\n },\n emitClick(jsEvent) {\n this.$emit('code-cell-click', {\n code: this.cc.code,\n jsEvent: jsEvent\n });\n },\n emitClickWithCode(jsEvent, code) {\n this.$emit('code-cell-click', {\n code: code,\n jsEvent: jsEvent\n });\n },\n emitData(options) {\n return Object.assign({\n // 这里使用实际数据\n fieldValue: _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(this.data, this.fieldName)\n }, options);\n }\n }\n});\n\n//# sourceURL=webpack://@cg-devcenter/aim/./src/components/cells/mixins/MixinCellEditorConfig.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options");
4502
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @cg-devcenter/jsb */ \"./node_modules/@cg-devcenter/jsb/index.js\");\n/* harmony import */ var _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'MixinCellEditorConfig',\n props: {\n cellConfig: {},\n // 组件配置,editor的cellConfig必须为Object,但是对viewer可以为组件需要的值\n\n data: Object,\n // 父对象数据,必须是一个Object,组件的model为data[fieldName]\n fieldName: String,\n formatter: Function,\n // 格式化化方法\n\n options: [Function, Array, Promise],\n styleOverride: Object,\n // 便于组件覆盖基础配置,如form中所有的元素设定为100% width,但是少数对象如checkbox不允许100%\n styleBase: Object,\n // 便于父对象定义基础配置,如form中所有的元素设定为100% width\n disabled: Boolean,\n // 是否只读\n\n fieldSchema: Object,\n // trigger时需要通过fieldSchema定位fields字段数据\n getRow: Function,\n tableDataGetter: Function\n },\n watch: {\n options: {\n handler: function () {\n this.fetchOptionsData();\n },\n deep: true\n }\n },\n data() {\n const _this = this;\n return {\n dataRef: {},\n cc: {\n style: {},\n change: _this.emitChange,\n clearable: true\n },\n inOptionLoading: false,\n optionsUsing: [],\n optionsRefresh: false,\n fieldSchemaRef: this.fieldSchema,\n optionValueKey: 'value'\n };\n },\n async created() {\n if (this.data) {\n this.dataRef = this.data;\n }\n await this.fetchOptionsData();\n },\n methods: {\n optionsParameter(force = false) {\n return {\n force: force,\n parent: this.dataRef,\n row: this.getRow ? this.getRow() : null,\n table: this.tableDataGetter ? this.tableDataGetter() : null\n };\n },\n async manualFetchOptionsData() {\n return this.fetchOptionsData(true);\n },\n async fetchOptionsData(force = false) {\n try {\n this.inOptionLoading = true;\n await this.__fetchOptionsData(force);\n } catch (error) {\n if (this.fieldSchemaRef) {\n this.fieldSchemaRef.errorMessage = error;\n } else {\n console.log(\"aim option fresh got error \", error);\n }\n } finally {\n this.inOptionLoading = false;\n }\n },\n async __fetchOptionsData(force = false) {\n let optionsGot = [];\n let tmpOptionsRefresh = false;\n if (typeof this.options === 'function') {\n tmpOptionsRefresh = true;\n // 如果 options 是一个函数,则调用它并等待它的返回值\n optionsGot = this.options(this.optionsParameter(force));\n if (optionsGot instanceof Promise) {\n optionsGot = await optionsGot;\n }\n } else if (this.options instanceof Promise) {\n tmpOptionsRefresh = true;\n // 如果 options 是一个 Promise,则等待 Promise 完成并赋值给 optionsInner\n optionsGot = await this.options;\n } else if (Array.isArray(this.options)) {\n tmpOptionsRefresh = false;\n // 如果 options 是一个数组,直接赋值\n optionsGot = this.options;\n }\n let autoGroupField = '';\n let autoGroupSort = '';\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().isObjectOrMap(optionsGot)) {\n tmpOptionsRefresh = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(optionsGot, 'refresh', false);\n autoGroupField = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(optionsGot, 'autoGroup', '');\n autoGroupSort = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(optionsGot, 'autoGroupSort', 'desc');\n optionsGot = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(optionsGot, 'options', []);\n }\n this.optionsUsing = [];\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(this.optionsFmt(optionsGot, autoGroupField, autoGroupSort), v => {\n this.optionsUsing.push(v);\n });\n this.optionsRefresh = tmpOptionsRefresh;\n },\n optionsTryGroup(options, field, autoGroupSort) {\n let group2Options = {};\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(options, item => {\n const groupVal = item[field] || '';\n if (!group2Options[groupVal]) {\n group2Options[groupVal] = [];\n }\n group2Options[groupVal].push(item);\n });\n let optionGroup = [];\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(group2Options, (item, key) => {\n optionGroup.push({\n label: key,\n options: item\n });\n });\n // 优先显示group\n optionGroup = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().orderBy(optionGroup, [{\n field: 'label',\n order: autoGroupSort\n }]);\n if (optionGroup.length === 1 && optionGroup[0].label === \"\") {\n return optionGroup[0].options;\n }\n return optionGroup;\n },\n optionsFmt(optionsGot, autoGroupField, autoGroupSort) {\n const options = [];\n // 将数组转换为option对象\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(optionsGot, v => {\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().isString(v) || _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().isNumber(v)) {\n options.push({\n label: v,\n value: v\n });\n } else {\n options.push(v);\n }\n });\n this.optionValueKey = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(options, '0.valueKey', 'value');\n if (autoGroupField) {\n // 如果option的属性字段中含有aimGroup,则自动将其聚合为group\n return this.optionsTryGroup(options, autoGroupField, autoGroupSort);\n }\n return options;\n },\n emitChange(valNew) {\n this.$emit(\"input\", valNew);\n },\n calcWidthPixString(defaultVal) {\n this.cc.style.width = this.cc.style.width ? _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().isString(this.cc.style.width) ? this.cc.style.width : `${this.cc.style.width}px` : defaultVal;\n return this.cc.style.width;\n },\n ccConfigMerge(initVal = {}, copyVal = []) {\n const _this = this;\n // styleDefault => styleBase => styleUser => styleOverride\n const mergeFiled = ['style'];\n this.cc.style = Object.assign(this.cc.style, this.styleBase);\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(initVal, function (val, key) {\n if (mergeFiled.includes(key)) {\n _this.cc[key] = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().merge(_this.cc[key], val);\n } else {\n _this.cc[key] = val;\n }\n });\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().isPlainObject(this.cellConfig)) {\n this.cc = Object.assign(this.cc, this.cellConfig);\n }\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(copyVal, function (key) {\n const value = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(_this.fieldSchema, key);\n value && _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathSet(_this.cc, key, value);\n });\n this.cc.style = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().assign(this.cc.style, this.styleOverride);\n this.cc.placeholder = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(this.fieldSchema, 'placeholder', this.cc.placeholder);\n this.cc.pickerOptions = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(this.fieldSchema, 'pickerOptions', this.cc.pickerOptions);\n },\n change(newVal) {\n this.$forceUpdate();\n if (this.cc.change) {\n this.cc.change(newVal);\n }\n if (this.cc['changeEx']) {\n this.cc['changeEx']({\n value: newVal,\n parent: this.data\n });\n }\n if (this.fieldSchema && this.fieldSchema.__tableCallbackOnChange) {\n this.fieldSchema.__tableCallbackOnChange({\n row: this.data\n });\n }\n },\n emitClick(jsEvent) {\n this.$emit('code-cell-click', {\n code: this.cc.code,\n jsEvent: jsEvent\n });\n },\n emitClickWithCode(jsEvent, code) {\n this.$emit('code-cell-click', {\n code: code,\n jsEvent: jsEvent\n });\n },\n emitData(options) {\n return Object.assign({\n // 这里使用实际数据\n fieldValue: _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(this.data, this.fieldName)\n }, options);\n }\n }\n});\n\n//# sourceURL=webpack://@cg-devcenter/aim/./src/components/cells/mixins/MixinCellEditorConfig.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options");
4503
4503
 
4504
4504
  /***/ }),
4505
4505
 
@@ -4862,7 +4862,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
4862
4862
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
4863
4863
 
4864
4864
  "use strict";
4865
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ render: function() { return /* binding */ render; },\n/* harmony export */ staticRenderFns: function() { return /* binding */ staticRenderFns; }\n/* harmony export */ });\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n return _c(\"cell-input\", {\n attrs: {\n data: _vm.data,\n \"field-name\": _vm.fieldName,\n options: _vm.options,\n \"cell-config\": _vm.cellConfig,\n \"style-base\": _vm.styleBase,\n \"style-override\": _vm.styleOverride,\n disabled: _vm.disabled\n }\n });\n};\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://@cg-devcenter/aim/./src/components/cells/CellInputTextArea.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet%5B1%5D.rules%5B3%5D!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options");
4865
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ render: function() { return /* binding */ render; },\n/* harmony export */ staticRenderFns: function() { return /* binding */ staticRenderFns; }\n/* harmony export */ });\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n return _c(\"cell-input\", {\n attrs: {\n data: _vm.data,\n \"field-name\": _vm.fieldName,\n options: _vm.options,\n \"cell-config\": _vm.cellConfig,\n \"style-base\": _vm.styleBase,\n \"style-override\": _vm.styleOverride,\n \"field-schema\": _vm.fieldSchema,\n disabled: _vm.disabled\n }\n });\n};\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://@cg-devcenter/aim/./src/components/cells/CellInputTextArea.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet%5B1%5D.rules%5B3%5D!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options");
4866
4866
 
4867
4867
  /***/ }),
4868
4868
 
package/dist/aim.umd.js CHANGED
@@ -3684,7 +3684,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
3684
3684
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3685
3685
 
3686
3686
  "use strict";
3687
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _components_mixins_MixinComponentMap_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/components/mixins/MixinComponentMap.vue */ \"./src/components/mixins/MixinComponentMap.vue\");\n/* harmony import */ var _cg_devcenter_jsb_isString__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @cg-devcenter/jsb/isString */ \"./node_modules/@cg-devcenter/jsb/isString.js\");\n/* harmony import */ var _cg_devcenter_jsb_isString__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_cg_devcenter_jsb_isString__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @cg-devcenter/jsb */ \"./node_modules/@cg-devcenter/jsb/index.js\");\n/* harmony import */ var _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./index */ \"./src/components/AimFormInput/index.js\");\n/* harmony import */ var _components_cells_const__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/components/cells/const */ \"./src/components/cells/const.js\");\n/* harmony import */ var _components_AimTable_table__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/components/AimTable/table */ \"./src/components/AimTable/table.js\");\n/* harmony import */ var _components_cells_CellViewAlert_vue__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/components/cells/CellViewAlert.vue */ \"./src/components/cells/CellViewAlert.vue\");\n/* harmony import */ var _components_AimFormInput_AimFormItem_vue__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/components/AimFormInput/AimFormItem.vue */ \"./src/components/AimFormInput/AimFormItem.vue\");\n/* harmony import */ var _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/components/AimTable/slot */ \"./src/components/AimTable/slot.js\");\n/* harmony import */ var _components_AimTable_Column_ColumnHeader_vue__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/components/AimTable/Column/ColumnHeader.vue */ \"./src/components/AimTable/Column/ColumnHeader.vue\");\n/* harmony import */ var vue_loading_overlay__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! vue-loading-overlay */ \"./node_modules/vue-loading-overlay/dist/vue-loading.min.js\");\n/* harmony import */ var vue_loading_overlay__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(vue_loading_overlay__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var vue_loading_overlay_dist_vue_loading_css__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! vue-loading-overlay/dist/vue-loading.css */ \"./node_modules/vue-loading-overlay/dist/vue-loading.css\");\n/* harmony import */ var _components_AimTable_virtual_field__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @/components/AimTable/virtual_field */ \"./src/components/AimTable/virtual_field.js\");\n/* harmony import */ var _components_AimTable_formatterForUpdate__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @/components/AimTable/formatterForUpdate */ \"./src/components/AimTable/formatterForUpdate.js\");\n/* harmony import */ var _components_AimTable_validate__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @/components/AimTable/validate */ \"./src/components/AimTable/validate.js\");\n/* harmony import */ var _components_AimTable_default__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @/components/AimTable/default */ \"./src/components/AimTable/default.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"AimFormInput\",\n components: {\n Loading: (vue_loading_overlay__WEBPACK_IMPORTED_MODULE_11___default()),\n ColumnHeader: _components_AimTable_Column_ColumnHeader_vue__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n AimFormItem: _components_AimFormInput_AimFormItem_vue__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n CellViewAlert: _components_cells_CellViewAlert_vue__WEBPACK_IMPORTED_MODULE_7__[\"default\"]\n },\n watch: {\n schema: {\n handler: function () {\n this.processSchema();\n },\n deep: true\n }\n },\n computed: {\n cssVars() {\n return {\n \"--form-container-height\": `${this.height}px`\n };\n },\n allCommentSlotName() {\n return (0,_components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.allSlotName)(this.schema, 'commentSlot');\n }\n },\n mixins: [_components_mixins_MixinComponentMap_vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"]],\n props: {\n height: Number,\n schema: Array,\n // 行schema信息\n data: [Object, Function, Promise],\n // 当前行数据\n mode: String,\n // 编辑模式\n alertInfo: {\n type: [Object, String],\n default: null\n },\n rules: Object,\n shouldCellDisable: Function,\n // 最外层调用不要设定rowTop,递归时传递到最底层便于统一回调外层\n rowTop: Object,\n labelWidth: String,\n viewLevelIndex: Number,\n // 默认0也就是0级页面\n parentKey: String,\n readOnly: Boolean,\n // 对接AimTable时,AimTable自动完成了watch\n enableWatcher: {\n type: Boolean,\n default: true\n },\n groupConfig: Array,\n row2Storage: Function,\n tableDataGetter: Function,\n submitRemoveFieldNotInSchema: {\n type: Boolean,\n default: false\n }\n },\n async created() {\n let dataGot = this.data;\n if (typeof this.data === 'function') {\n // 如果 options 是一个函数,则调用它并等待它的返回值\n dataGot = this.data();\n if (dataGot instanceof Promise) {\n this.inLoading = true;\n dataGot = await dataGot.finally(() => {\n this.inLoading = false;\n });\n }\n } else if (this.data instanceof Promise) {\n // 如果 options 是一个 Promise,则等待 Promise 完成并赋值给 optionsInner\n this.inLoading = true;\n dataGot = await this.data.finally(() => {\n this.inLoading = false;\n });\n }\n this.dataRef = dataGot;\n this.processSchema();\n if (this.rules) {\n this.rulesRef = this.rules;\n } else {\n this.rulesRef = (0,_components_AimTable_validate__WEBPACK_IMPORTED_MODULE_15__.FormRulesFromSchema)(this.schema);\n }\n this.getProxyTipSlotName();\n this.getProxyCommentSlotName();\n },\n data() {\n return {\n CodeButtonAdd: _components_cells_const__WEBPACK_IMPORTED_MODULE_5__.CodeButtonAdd,\n CodeButtonRowSelectedMinus: _components_cells_const__WEBPACK_IMPORTED_MODULE_5__.CodeButtonRowSelectedMinus,\n labelWidthPixel: this.labelWidth || (0,_index__WEBPACK_IMPORTED_MODULE_4__.calcLabelWidth)(this.schema || []),\n //fixme 需要table打入rules,独立使用AimFormInput的时候需要根据schema更新rules\n rulesRef: {},\n fieldsCommon: [],\n dataRef: {},\n inLoading: false,\n // inline显示的字段\n fieldSorted: [],\n currTab: {},\n groupMaxFieldNumber: 0,\n fieldWatcher: []\n };\n },\n beforeDestroy() {\n this.cleanFieldWatcher();\n },\n methods: {\n groupLabelWidth(gs) {\n const groupSquash = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(gs.setting, 'squash', false);\n if (groupSquash) {\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(gs, 'squash', false)) {\n return null;\n }\n return '0px';\n }\n return null;\n },\n getProxyCommentSlotNameWithName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.getProxyCommentSlotNameWithName,\n commentSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.commentSlotName,\n tipSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.tipSlotName,\n formSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.formSlotName,\n isString: (_cg_devcenter_jsb_isString__WEBPACK_IMPORTED_MODULE_2___default()),\n getProxyTipSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.getProxyTipSlotName,\n getProxyFormSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.getProxyFormSlotName,\n getProxyCommentSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.getProxyCommentSlotName,\n cleanFieldWatcher() {\n this.fieldWatcher.forEach(watcher => watcher());\n this.fieldWatcher = [];\n },\n afterField(fieldGroupList, field) {\n let ret = [];\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(fieldGroupList, function (group) {\n if (group.setting.after === field) {\n ret.push(group);\n }\n });\n ret.sort(function (a, b) {\n const indexA = a.setting.index || 0;\n const indexB = b.setting.index || 0;\n return indexA - indexB;\n });\n return ret;\n },\n iconBind(icon) {\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isString(icon)) {\n return {\n class: icon,\n style: {\n 'padding-right': '3px'\n }\n };\n }\n return icon;\n },\n setInLoading(v) {\n this.inLoading = v;\n },\n setLoading(v) {\n this.inLoading = v;\n },\n // 刷新当前表内local proxy 的aim表数据\n reloadLocalProxyAimTableData(field) {\n const refs = this.$refs['aimFormItem'];\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().wrapArray(refs), v => {\n v.reloadLocalProxyAimTableData(field);\n });\n },\n processSchema() {\n if (!this.dataRef) {\n return;\n }\n const fieldsCommon = [];\n const fieldGroupList = [];\n const _this = this;\n\n // 创建视图的时候根据schema填充默认数值,防止由于数值缺失导致的访问undefined\n // 但是只有传入的data完全空的时候才设定 fillBySchemaDefault 为true\n this.dataRef = (0,_components_AimTable_default__WEBPACK_IMPORTED_MODULE_16__.FillDefaultDataWithSchema)(this.schema, this.dataRef, this.mode === _index__WEBPACK_IMPORTED_MODULE_4__.AimFormInputInsert);\n this.cleanFieldWatcher();\n _this.groupMaxFieldNumber = 0;\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(this.schema, function (fs) {\n let formOff = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fs, 'formOff', undefined);\n if (formOff === undefined) {\n formOff = !!(0,_components_AimTable_virtual_field__WEBPACK_IMPORTED_MODULE_13__.isVirtualField)(fs);\n }\n if (formOff) {\n return;\n }\n if (_this.mode === _index__WEBPACK_IMPORTED_MODULE_4__.AimFormInputInsert && _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fs, 'insertOff', false)) {\n return;\n }\n const itemType = _this.fieldType(fs);\n // 如果是object类型,在传递进 FormInput 组件前需要给默认值\n if (itemType === 'object' && (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isNull(_this.dataRef[fs.field]) || _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isUndefined(_this.dataRef[fs.field]))) {\n _this.dataRef[fs.field] = {};\n }\n if (itemType === 'table' && (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isNull(_this.dataRef[fs.field]) || _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isUndefined(_this.dataRef[fs.field]))) {\n _this.dataRef[fs.field] = [];\n }\n const watch = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fs, 'watch');\n if (_this.enableWatcher && watch) {\n const watcher = _this.$watch(`dataRef.${fs.field}`, function (newValue, oldValue) {\n watch({\n row: this.getRow(),\n newValue,\n oldValue,\n parent: this.dataRef,\n target: this\n });\n }, _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fs, 'watchOptions', {}));\n _this.fieldWatcher.push(watcher);\n }\n let asCommonField = true;\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(_this.groupConfig, function (groupSetting, index) {\n if (!asCommonField) {\n return;\n }\n const fields = groupSetting.fields;\n let fieldShouldInGroup;\n if (fields) {\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isArray(fields)) {\n fieldShouldInGroup = fields.includes(fs.field);\n } else {\n fieldShouldInGroup = fields[fs.field];\n }\n }\n if (fieldShouldInGroup) {\n let group = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().find(fieldGroupList, item => item.index === index);\n if (!group) {\n group = {\n index: index,\n fieldSchemaList: [],\n setting: groupSetting,\n __isGroup: true\n };\n fieldGroupList.push(group);\n }\n asCommonField = false;\n if (!_this.currTab[`group_tab_${index}`]) {\n _this.currTab[`group_tab_${index}`] = _this.formLabel(fs);\n }\n group.fieldSchemaList.push(fs);\n if (group.fieldSchemaList.length > _this.groupMaxFieldNumber) {\n _this.groupMaxFieldNumber = group.fieldSchemaList.length;\n }\n }\n });\n if (asCommonField) {\n fieldsCommon.push(fs);\n }\n });\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(_this.groupConfig, function (groupSetting, index) {\n if (groupSetting.type === 'divider') {\n fieldGroupList.push({\n index: index,\n setting: groupSetting,\n __isGroup: true\n });\n }\n });\n _this.fieldSorted = [];\n _this.fieldSorted.push(..._this.afterField(fieldGroupList, '@start'));\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(fieldsCommon, function (fs) {\n _this.fieldSorted.push(fs);\n _this.fieldSorted.push(..._this.afterField(fieldGroupList, fs.field));\n });\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(fieldGroupList, function (group) {\n if (!_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().find(_this.fieldSorted, item => item.index === group.index)) {\n _this.fieldSorted.push(group);\n }\n });\n },\n groupShow(group) {\n let showCount = 0;\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(group.fieldSchemaList, v => {\n if ((0,_index__WEBPACK_IMPORTED_MODULE_4__.showForm)(this.getRow(), v, this.dataRef)) {\n showCount += 1;\n }\n });\n return showCount !== 0;\n },\n span(group, field) {\n let showCount = 0;\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(group.fieldSchemaList, v => {\n if ((0,_index__WEBPACK_IMPORTED_MODULE_4__.showForm)(this.getRow(), v, this.dataRef)) {\n showCount += 1;\n }\n });\n if (showCount === 1) {\n return 24;\n }\n if (this.groupMaxFieldNumber && _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(group.setting, 'itemAlign', true)) {\n return 24 / this.groupMaxFieldNumber;\n }\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isArray(group.setting.fields)) {\n return 24 / group.setting.fields.length;\n }\n return group.setting.fields[field] || 24 / group.setting.fields.length;\n },\n fieldType(fs) {\n return _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fs, 'typeFormInput', fs['type']);\n },\n getRow() {\n if (!this.rowTop) {\n return this.dataRef;\n }\n return this.rowTop;\n },\n formLabel(si) {\n return _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(si, 'nameForm', si['name']);\n },\n // 获取数据,不进行validate\n getDataForStorage(data = undefined) {\n data = data || this.dataRef;\n return (0,_components_AimTable_formatterForUpdate__WEBPACK_IMPORTED_MODULE_14__.CleanRowForStorage)(this.schema, data, true, true, this.submitRemoveFieldNotInSchema, this.row2Storage);\n },\n // validate 逻辑层主动调用,单独使用AimFormInput的场景\n validate(validCallback, notValidCallback = null, onValidCallbackRunError = e => {\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().cc.toastWarning(e);\n }) {\n const _this = this;\n this.__validatePrivate(validCallback, notValidCallback, onValidCallbackRunError, v => {\n // 移除虚拟字段、移除控制字段\n return _this.getDataForStorage(v);\n });\n },\n // __validatePrivate 外部不要直接调用\n __validatePrivate(validCallback, notValidCallback = () => {}, onValidCallbackRunError = e => {\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().cc.toastWarning(e);\n }, processor = v => {\n return v;\n }) {\n const _this = this;\n this.$refs['form'].validate(valid => {\n if (valid) {\n try {\n const tmp = processor(_this.dataRef);\n validCallback(tmp);\n } catch (e) {\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isFunction(onValidCallbackRunError)) {\n onValidCallbackRunError(e);\n }\n }\n } else {\n notValidCallback && notValidCallback();\n }\n });\n },\n // __validateFromAimTable aim table 内部调用,此处不主动清理数据,由aim table完成\n __validateFromAimTable(validCallback) {\n this.__validatePrivate(validCallback);\n },\n fieldComponentKey(fs) {\n return `${this.parentKey}_${fs.field}_${(0,_components_AimTable_table__WEBPACK_IMPORTED_MODULE_6__.xidRow)(this.getRow())}`;\n },\n formHeight() {\n return this.$refs.form.$el.clientHeight;\n },\n formRows() {\n return this.fieldSorted.length;\n },\n privateShouldCellDisable({\n fieldSchema,\n cell\n }) {\n if (this.readOnly) {\n return true;\n }\n if (this.mode === _index__WEBPACK_IMPORTED_MODULE_4__.AimFormInputView) {\n return true;\n }\n // 只读属性,如id等依赖服务器返回,只展现不允许编辑\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fieldSchema, 'disabled', false)) {\n return true;\n }\n // 只读属性,如id等依赖服务器返回,只展现不允许编辑\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fieldSchema, 'readOnly', false)) {\n return true;\n }\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fieldSchema, 'insertOnly', false)) {\n // 只允许插入时有效,创建后不允许编辑\n return this.mode !== _index__WEBPACK_IMPORTED_MODULE_4__.AimFormInputInsert && this.mode !== _index__WEBPACK_IMPORTED_MODULE_4__.AimFormInputCopy;\n }\n if (!this.shouldCellDisable) {\n return false;\n }\n return this.shouldCellDisable({\n fieldSchema,\n cell,\n row: this.getRow()\n });\n }\n }\n});\n\n//# sourceURL=webpack://aim/./src/components/AimFormInput/index.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use%5B0%5D!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options");
3687
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _components_mixins_MixinComponentMap_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/components/mixins/MixinComponentMap.vue */ \"./src/components/mixins/MixinComponentMap.vue\");\n/* harmony import */ var _cg_devcenter_jsb_isString__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @cg-devcenter/jsb/isString */ \"./node_modules/@cg-devcenter/jsb/isString.js\");\n/* harmony import */ var _cg_devcenter_jsb_isString__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_cg_devcenter_jsb_isString__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @cg-devcenter/jsb */ \"./node_modules/@cg-devcenter/jsb/index.js\");\n/* harmony import */ var _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./index */ \"./src/components/AimFormInput/index.js\");\n/* harmony import */ var _components_cells_const__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/components/cells/const */ \"./src/components/cells/const.js\");\n/* harmony import */ var _components_AimTable_table__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/components/AimTable/table */ \"./src/components/AimTable/table.js\");\n/* harmony import */ var _components_cells_CellViewAlert_vue__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/components/cells/CellViewAlert.vue */ \"./src/components/cells/CellViewAlert.vue\");\n/* harmony import */ var _components_AimFormInput_AimFormItem_vue__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/components/AimFormInput/AimFormItem.vue */ \"./src/components/AimFormInput/AimFormItem.vue\");\n/* harmony import */ var _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/components/AimTable/slot */ \"./src/components/AimTable/slot.js\");\n/* harmony import */ var _components_AimTable_Column_ColumnHeader_vue__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/components/AimTable/Column/ColumnHeader.vue */ \"./src/components/AimTable/Column/ColumnHeader.vue\");\n/* harmony import */ var vue_loading_overlay__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! vue-loading-overlay */ \"./node_modules/vue-loading-overlay/dist/vue-loading.min.js\");\n/* harmony import */ var vue_loading_overlay__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(vue_loading_overlay__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var vue_loading_overlay_dist_vue_loading_css__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! vue-loading-overlay/dist/vue-loading.css */ \"./node_modules/vue-loading-overlay/dist/vue-loading.css\");\n/* harmony import */ var _components_AimTable_virtual_field__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @/components/AimTable/virtual_field */ \"./src/components/AimTable/virtual_field.js\");\n/* harmony import */ var _components_AimTable_formatterForUpdate__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @/components/AimTable/formatterForUpdate */ \"./src/components/AimTable/formatterForUpdate.js\");\n/* harmony import */ var _components_AimTable_validate__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @/components/AimTable/validate */ \"./src/components/AimTable/validate.js\");\n/* harmony import */ var _components_AimTable_default__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @/components/AimTable/default */ \"./src/components/AimTable/default.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"AimFormInput\",\n components: {\n Loading: (vue_loading_overlay__WEBPACK_IMPORTED_MODULE_11___default()),\n ColumnHeader: _components_AimTable_Column_ColumnHeader_vue__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n AimFormItem: _components_AimFormInput_AimFormItem_vue__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n CellViewAlert: _components_cells_CellViewAlert_vue__WEBPACK_IMPORTED_MODULE_7__[\"default\"]\n },\n watch: {\n schema: {\n handler: function () {\n this.processSchema();\n },\n deep: true\n }\n },\n computed: {\n cssVars() {\n return {\n \"--form-container-height\": `${this.height}px`\n };\n },\n allCommentSlotName() {\n return (0,_components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.allSlotName)(this.schema, 'commentSlot');\n }\n },\n mixins: [_components_mixins_MixinComponentMap_vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"]],\n props: {\n height: Number,\n schema: Array,\n // 行schema信息\n data: [Object, Function, Promise],\n // 当前行数据\n mode: String,\n // 编辑模式\n alertInfo: {\n type: [Object, String],\n default: null\n },\n rules: Object,\n shouldCellDisable: Function,\n // 最外层调用不要设定rowTop,递归时传递到最底层便于统一回调外层\n rowTop: Object,\n labelWidth: String,\n viewLevelIndex: Number,\n // 默认0也就是0级页面\n parentKey: String,\n readOnly: Boolean,\n // 对接AimTable时,AimTable自动完成了watch\n enableWatcher: {\n type: Boolean,\n default: true\n },\n groupConfig: Array,\n row2Storage: Function,\n tableDataGetter: Function,\n submitRemoveFieldNotInSchema: {\n type: Boolean,\n default: false\n }\n },\n async created() {\n let dataGot = this.data;\n if (typeof this.data === 'function') {\n // 如果 options 是一个函数,则调用它并等待它的返回值\n dataGot = this.data();\n if (dataGot instanceof Promise) {\n this.inLoading = true;\n dataGot = await dataGot.finally(() => {\n this.inLoading = false;\n });\n }\n } else if (this.data instanceof Promise) {\n // 如果 options 是一个 Promise,则等待 Promise 完成并赋值给 optionsInner\n this.inLoading = true;\n dataGot = await this.data.finally(() => {\n this.inLoading = false;\n });\n }\n this.dataRef = dataGot;\n this.processSchema();\n if (this.rules) {\n this.rulesRef = this.rules;\n } else {\n this.rulesRef = (0,_components_AimTable_validate__WEBPACK_IMPORTED_MODULE_15__.FormRulesFromSchema)(this.schema);\n }\n this.getProxyTipSlotName();\n this.getProxyCommentSlotName();\n },\n data() {\n return {\n CodeButtonAdd: _components_cells_const__WEBPACK_IMPORTED_MODULE_5__.CodeButtonAdd,\n CodeButtonRowSelectedMinus: _components_cells_const__WEBPACK_IMPORTED_MODULE_5__.CodeButtonRowSelectedMinus,\n labelWidthPixel: this.labelWidth || (0,_index__WEBPACK_IMPORTED_MODULE_4__.calcLabelWidth)(this.schema || []),\n //fixme 需要table打入rules,独立使用AimFormInput的时候需要根据schema更新rules\n rulesRef: {},\n fieldsCommon: [],\n dataRef: {},\n inLoading: false,\n // inline显示的字段\n fieldSorted: [],\n currTab: {},\n groupMaxFieldNumber: 0,\n fieldWatcher: []\n };\n },\n beforeDestroy() {\n this.cleanFieldWatcher();\n },\n methods: {\n groupLabelWidth(gs) {\n const groupSquash = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(gs.setting, 'squash', false);\n if (groupSquash) {\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(gs, 'squash', false)) {\n return null;\n }\n return '0px';\n }\n return null;\n },\n getProxyCommentSlotNameWithName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.getProxyCommentSlotNameWithName,\n commentSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.commentSlotName,\n tipSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.tipSlotName,\n formSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.formSlotName,\n isString: (_cg_devcenter_jsb_isString__WEBPACK_IMPORTED_MODULE_2___default()),\n getProxyTipSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.getProxyTipSlotName,\n getProxyFormSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.getProxyFormSlotName,\n getProxyCommentSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.getProxyCommentSlotName,\n cleanFieldWatcher() {\n this.fieldWatcher.forEach(watcher => watcher());\n this.fieldWatcher = [];\n },\n afterField(fieldGroupList, field) {\n let ret = [];\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(fieldGroupList, function (group) {\n if (group.setting.after === field) {\n ret.push(group);\n }\n });\n ret.sort(function (a, b) {\n const indexA = a.setting.index || 0;\n const indexB = b.setting.index || 0;\n return indexA - indexB;\n });\n return ret;\n },\n iconBind(icon) {\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isString(icon)) {\n return {\n class: icon,\n style: {\n 'padding-right': '3px'\n }\n };\n }\n return icon;\n },\n setInLoading(v) {\n this.inLoading = v;\n },\n setLoading(v) {\n this.inLoading = v;\n },\n // 刷新当前表内local proxy 的aim表数据\n reloadLocalProxyAimTableData(field) {\n const refs = this.$refs['aimFormItem'];\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().wrapArray(refs), v => {\n v.reloadLocalProxyAimTableData(field);\n });\n },\n processSchema() {\n if (!this.dataRef) {\n return;\n }\n const fieldsCommon = [];\n const fieldGroupList = [];\n const _this = this;\n\n // 创建视图的时候根据schema填充默认数值,防止由于数值缺失导致的访问undefined\n // 但是只有传入的data完全空的时候才设定 fillBySchemaDefault 为true\n this.dataRef = (0,_components_AimTable_default__WEBPACK_IMPORTED_MODULE_16__.FillDefaultDataWithSchema)(this.schema, this.dataRef, this.mode === _index__WEBPACK_IMPORTED_MODULE_4__.AimFormInputInsert);\n this.cleanFieldWatcher();\n _this.groupMaxFieldNumber = 0;\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(this.schema, function (fs) {\n let formOff = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fs, 'formOff', undefined);\n if (formOff === undefined) {\n formOff = !!(0,_components_AimTable_virtual_field__WEBPACK_IMPORTED_MODULE_13__.isVirtualField)(fs);\n }\n if (formOff) {\n return;\n }\n if (_this.mode === _index__WEBPACK_IMPORTED_MODULE_4__.AimFormInputInsert && _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fs, 'insertOff', false)) {\n return;\n }\n const itemType = _this.fieldType(fs);\n // 如果是object类型,在传递进 FormInput 组件前需要给默认值\n if (itemType === 'object' && (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isNull(_this.dataRef[fs.field]) || _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isUndefined(_this.dataRef[fs.field]))) {\n _this.dataRef[fs.field] = {};\n }\n if (itemType === 'table' && (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isNull(_this.dataRef[fs.field]) || _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isUndefined(_this.dataRef[fs.field]))) {\n _this.dataRef[fs.field] = [];\n }\n const watch = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fs, 'watch');\n if (_this.enableWatcher && watch) {\n const watcher = _this.$watch(`dataRef.${fs.field}`, function (newValue, oldValue) {\n watch({\n row: this.getRow(),\n newValue,\n oldValue,\n parent: this.dataRef,\n target: this\n });\n }, _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fs, 'watchOptions', {}));\n _this.fieldWatcher.push(watcher);\n }\n let asCommonField = true;\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(_this.groupConfig, function (groupSetting, index) {\n if (!asCommonField) {\n return;\n }\n const fields = groupSetting.fields;\n let fieldShouldInGroup;\n if (fields) {\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isArray(fields)) {\n fieldShouldInGroup = fields.includes(fs.field);\n } else {\n fieldShouldInGroup = fields[fs.field];\n }\n }\n if (fieldShouldInGroup) {\n let group = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().find(fieldGroupList, item => item.index === index);\n if (!group) {\n group = {\n index: index,\n fieldSchemaList: [],\n setting: groupSetting,\n __isGroup: true\n };\n fieldGroupList.push(group);\n }\n asCommonField = false;\n if (!_this.currTab[`group_tab_${index}`]) {\n _this.currTab[`group_tab_${index}`] = _this.formLabel(fs);\n }\n group.fieldSchemaList.push(fs);\n if (group.fieldSchemaList.length > _this.groupMaxFieldNumber) {\n _this.groupMaxFieldNumber = group.fieldSchemaList.length;\n }\n }\n });\n if (asCommonField) {\n fieldsCommon.push(fs);\n }\n });\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(_this.groupConfig, function (groupSetting, index) {\n if (groupSetting.type === 'divider') {\n fieldGroupList.push({\n index: index,\n setting: groupSetting,\n __isGroup: true\n });\n }\n });\n _this.fieldSorted = [];\n _this.fieldSorted.push(..._this.afterField(fieldGroupList, '@start'));\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(fieldsCommon, function (fs) {\n _this.fieldSorted.push(fs);\n _this.fieldSorted.push(..._this.afterField(fieldGroupList, fs.field));\n });\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(fieldGroupList, function (group) {\n if (!_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().find(_this.fieldSorted, item => item.index === group.index)) {\n _this.fieldSorted.push(group);\n }\n });\n },\n groupShow(group) {\n let showCount = 0;\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(group.fieldSchemaList, v => {\n if ((0,_index__WEBPACK_IMPORTED_MODULE_4__.showForm)(this.getRow(), v, this.dataRef)) {\n showCount += 1;\n }\n });\n return showCount !== 0;\n },\n span(group, field) {\n let showCount = 0;\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(group.fieldSchemaList, v => {\n if ((0,_index__WEBPACK_IMPORTED_MODULE_4__.showForm)(this.getRow(), v, this.dataRef)) {\n showCount += 1;\n }\n });\n if (showCount === 1) {\n return 24;\n }\n if (this.groupMaxFieldNumber && _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(group.setting, 'itemAlign', true)) {\n return 24 / this.groupMaxFieldNumber;\n }\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isArray(group.setting.fields)) {\n return 24 / group.setting.fields.length;\n }\n return group.setting.fields[field] || 24 / group.setting.fields.length;\n },\n fieldType(fs) {\n return _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fs, 'typeFormInput', fs['type']);\n },\n getRow() {\n if (!this.rowTop) {\n return this.dataRef;\n }\n return this.rowTop;\n },\n formLabel(si) {\n return _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(si, 'nameForm', si['name']);\n },\n // 获取数据,不进行validate\n getDataForStorage(data = undefined) {\n data = data || this.dataRef;\n return (0,_components_AimTable_formatterForUpdate__WEBPACK_IMPORTED_MODULE_14__.CleanRowForStorage)(this.schema, data, true, true, this.submitRemoveFieldNotInSchema, this.row2Storage);\n },\n // validate 逻辑层主动调用,单独使用AimFormInput的场景\n validate(validCallback, notValidCallback = null, onValidCallbackRunError = e => {\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().cc.toastWarning(e);\n }) {\n const _this = this;\n this.__validatePrivate(validCallback, notValidCallback, onValidCallbackRunError, v => {\n // 移除虚拟字段、移除控制字段\n return _this.getDataForStorage(v);\n });\n },\n // __validatePrivate 外部不要直接调用\n __validatePrivate(validCallback, notValidCallback, onValidCallbackRunError = e => {\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().cc.toastWarning(e);\n }, processor = v => {\n return v;\n }) {\n const _this = this;\n this.$refs['form'].validate((valid, invalidFields) => {\n if (valid) {\n try {\n const tmp = processor(_this.dataRef);\n validCallback(tmp);\n } catch (e) {\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isFunction(onValidCallbackRunError)) {\n onValidCallbackRunError(e);\n }\n }\n } else {\n notValidCallback ? notValidCallback() : Object.values(invalidFields).forEach(errors => {\n if (Array.isArray(errors)) {\n errors.forEach(error => {\n const {\n message\n } = error;\n if (message) {\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().cc.toastWarning(message);\n }\n });\n }\n });\n }\n });\n },\n // __validateFromAimTable aim table 内部调用,此处不主动清理数据,由aim table完成\n __validateFromAimTable(validCallback) {\n this.__validatePrivate(validCallback);\n },\n fieldComponentKey(fs) {\n return `${this.parentKey}_${fs.field}_${(0,_components_AimTable_table__WEBPACK_IMPORTED_MODULE_6__.xidRow)(this.getRow())}`;\n },\n formHeight() {\n return this.$refs.form.$el.clientHeight;\n },\n formRows() {\n return this.fieldSorted.length;\n },\n privateShouldCellDisable({\n fieldSchema,\n cell\n }) {\n if (this.readOnly) {\n return true;\n }\n if (this.mode === _index__WEBPACK_IMPORTED_MODULE_4__.AimFormInputView) {\n return true;\n }\n // 只读属性,如id等依赖服务器返回,只展现不允许编辑\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fieldSchema, 'disabled', false)) {\n return true;\n }\n // 只读属性,如id等依赖服务器返回,只展现不允许编辑\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fieldSchema, 'readOnly', false)) {\n return true;\n }\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fieldSchema, 'insertOnly', false)) {\n // 只允许插入时有效,创建后不允许编辑\n return this.mode !== _index__WEBPACK_IMPORTED_MODULE_4__.AimFormInputInsert && this.mode !== _index__WEBPACK_IMPORTED_MODULE_4__.AimFormInputCopy;\n }\n if (!this.shouldCellDisable) {\n return false;\n }\n return this.shouldCellDisable({\n fieldSchema,\n cell,\n row: this.getRow()\n });\n }\n }\n});\n\n//# sourceURL=webpack://aim/./src/components/AimFormInput/index.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use%5B0%5D!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options");
3688
3688
 
3689
3689
  /***/ }),
3690
3690
 
@@ -4080,7 +4080,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _com
4080
4080
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
4081
4081
 
4082
4082
  "use strict";
4083
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _components_cells_mixins_MixinCellEditorConfig_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/components/cells/mixins/MixinCellEditorConfig.vue */ \"./src/components/cells/mixins/MixinCellEditorConfig.vue\");\n/* harmony import */ var _components_cells_CellTriggerImageSelect_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/components/cells/CellTriggerImageSelect.vue */ \"./src/components/cells/CellTriggerImageSelect.vue\");\n/* harmony import */ var _components_cells_CellViewImage_vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components/cells/CellViewImage.vue */ \"./src/components/cells/CellViewImage.vue\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'CellInput',\n components: {\n CellViewImage: _components_cells_CellViewImage_vue__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n CellTriggerImageSelect: _components_cells_CellTriggerImageSelect_vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n },\n mixins: [_components_cells_mixins_MixinCellEditorConfig_vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"]],\n props: {\n asImage: Boolean\n },\n created() {\n this.ccConfigMerge();\n },\n methods: {\n divClass() {\n return this.calcWidthPixString() ? 'cell-input-with-width' : '';\n },\n divStyle() {\n return {\n '--input-width': this.calcWidthPixString() || '100%',\n width: \"100%\",\n display: 'inline-flex'\n };\n },\n isValidImageUrl(url) {\n if (!url) {\n return false;\n }\n // 通过文件后缀判断是否是图像\n const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp'];\n const extension = String(url).split('.').pop().toLowerCase();\n return imageExtensions.includes(extension);\n }\n }\n});\n\n//# sourceURL=webpack://aim/./src/components/cells/CellInput.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use%5B0%5D!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options");
4083
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _components_cells_mixins_MixinCellEditorConfig_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/components/cells/mixins/MixinCellEditorConfig.vue */ \"./src/components/cells/mixins/MixinCellEditorConfig.vue\");\n/* harmony import */ var _components_cells_CellTriggerImageSelect_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/components/cells/CellTriggerImageSelect.vue */ \"./src/components/cells/CellTriggerImageSelect.vue\");\n/* harmony import */ var _components_cells_CellViewImage_vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components/cells/CellViewImage.vue */ \"./src/components/cells/CellViewImage.vue\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'CellInput',\n components: {\n CellViewImage: _components_cells_CellViewImage_vue__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n CellTriggerImageSelect: _components_cells_CellTriggerImageSelect_vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n },\n mixins: [_components_cells_mixins_MixinCellEditorConfig_vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"]],\n props: {\n asImage: Boolean\n },\n created() {\n this.ccConfigMerge({}, [\"autosize\"]);\n },\n methods: {\n divClass() {\n return this.calcWidthPixString() ? 'cell-input-with-width' : '';\n },\n divStyle() {\n return {\n '--input-width': this.calcWidthPixString() || '100%',\n width: \"100%\",\n display: 'inline-flex'\n };\n },\n isValidImageUrl(url) {\n if (!url) {\n return false;\n }\n // 通过文件后缀判断是否是图像\n const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp'];\n const extension = String(url).split('.').pop().toLowerCase();\n return imageExtensions.includes(extension);\n }\n }\n});\n\n//# sourceURL=webpack://aim/./src/components/cells/CellInput.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use%5B0%5D!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options");
4084
4084
 
4085
4085
  /***/ }),
4086
4086
 
@@ -4509,7 +4509,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _com
4509
4509
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
4510
4510
 
4511
4511
  "use strict";
4512
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @cg-devcenter/jsb */ \"./node_modules/@cg-devcenter/jsb/index.js\");\n/* harmony import */ var _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'MixinCellEditorConfig',\n props: {\n cellConfig: {},\n // 组件配置,editor的cellConfig必须为Object,但是对viewer可以为组件需要的值\n\n data: Object,\n // 父对象数据,必须是一个Object,组件的model为data[fieldName]\n fieldName: String,\n formatter: Function,\n // 格式化化方法\n\n options: [Function, Array, Promise],\n styleOverride: Object,\n // 便于组件覆盖基础配置,如form中所有的元素设定为100% width,但是少数对象如checkbox不允许100%\n styleBase: Object,\n // 便于父对象定义基础配置,如form中所有的元素设定为100% width\n disabled: Boolean,\n // 是否只读\n\n fieldSchema: Object,\n // trigger时需要通过fieldSchema定位fields字段数据\n getRow: Function,\n tableDataGetter: Function\n },\n watch: {\n options: {\n handler: function () {\n this.fetchOptionsData();\n },\n deep: true\n }\n },\n data() {\n const _this = this;\n return {\n dataRef: {},\n cc: {\n style: {},\n change: _this.emitChange,\n clearable: true\n },\n inOptionLoading: false,\n optionsUsing: [],\n optionsRefresh: false,\n fieldSchemaRef: this.fieldSchema,\n optionValueKey: 'value'\n };\n },\n async created() {\n if (this.data) {\n this.dataRef = this.data;\n }\n await this.fetchOptionsData();\n },\n methods: {\n optionsParameter(force = false) {\n return {\n force: force,\n parent: this.dataRef,\n row: this.getRow ? this.getRow() : null,\n table: this.tableDataGetter ? this.tableDataGetter() : null\n };\n },\n async manualFetchOptionsData() {\n return this.fetchOptionsData(true);\n },\n async fetchOptionsData(force = false) {\n try {\n this.inOptionLoading = true;\n await this.__fetchOptionsData(force);\n } catch (error) {\n if (this.fieldSchemaRef) {\n this.fieldSchemaRef.errorMessage = error;\n } else {\n console.log(\"aim option fresh got error \", error);\n }\n } finally {\n this.inOptionLoading = false;\n }\n },\n async __fetchOptionsData(force = false) {\n let optionsGot = [];\n let tmpOptionsRefresh = false;\n if (typeof this.options === 'function') {\n tmpOptionsRefresh = true;\n // 如果 options 是一个函数,则调用它并等待它的返回值\n optionsGot = this.options(this.optionsParameter(force));\n if (optionsGot instanceof Promise) {\n optionsGot = await optionsGot;\n }\n } else if (this.options instanceof Promise) {\n tmpOptionsRefresh = true;\n // 如果 options 是一个 Promise,则等待 Promise 完成并赋值给 optionsInner\n optionsGot = await this.options;\n } else if (Array.isArray(this.options)) {\n tmpOptionsRefresh = false;\n // 如果 options 是一个数组,直接赋值\n optionsGot = this.options;\n }\n let autoGroupField = '';\n let autoGroupSort = '';\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().isObjectOrMap(optionsGot)) {\n tmpOptionsRefresh = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(optionsGot, 'refresh', false);\n autoGroupField = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(optionsGot, 'autoGroup', '');\n autoGroupSort = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(optionsGot, 'autoGroupSort', 'desc');\n optionsGot = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(optionsGot, 'options', []);\n }\n this.optionsUsing = [];\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(this.optionsFmt(optionsGot, autoGroupField, autoGroupSort), v => {\n this.optionsUsing.push(v);\n });\n this.optionsRefresh = tmpOptionsRefresh;\n },\n optionsTryGroup(options, field, autoGroupSort) {\n let group2Options = {};\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(options, item => {\n const groupVal = item[field] || '';\n if (!group2Options[groupVal]) {\n group2Options[groupVal] = [];\n }\n group2Options[groupVal].push(item);\n });\n let optionGroup = [];\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(group2Options, (item, key) => {\n optionGroup.push({\n label: key,\n options: item\n });\n });\n // 优先显示group\n optionGroup = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().orderBy(optionGroup, [{\n field: 'label',\n order: autoGroupSort\n }]);\n if (optionGroup.length === 1 && optionGroup[0].label === \"\") {\n return optionGroup[0].options;\n }\n return optionGroup;\n },\n optionsFmt(optionsGot, autoGroupField, autoGroupSort) {\n const options = [];\n // 将数组转换为option对象\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(optionsGot, v => {\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().isString(v) || _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().isNumber(v)) {\n options.push({\n label: v,\n value: v\n });\n } else {\n options.push(v);\n }\n });\n this.optionValueKey = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(options, '0.valueKey', 'value');\n if (autoGroupField) {\n // 如果option的属性字段中含有aimGroup,则自动将其聚合为group\n return this.optionsTryGroup(options, autoGroupField, autoGroupSort);\n }\n return options;\n },\n emitChange(valNew) {\n this.$emit(\"input\", valNew);\n },\n calcWidthPixString(defaultVal) {\n this.cc.style.width = this.cc.style.width ? _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().isString(this.cc.style.width) ? this.cc.style.width : `${this.cc.style.width}px` : defaultVal;\n return this.cc.style.width;\n },\n ccConfigMerge(initVal = {}, copyVal = []) {\n const _this = this;\n // styleDefault => styleBase => styleUser => styleOverride\n const mergeFiled = ['style'];\n this.cc.style = Object.assign(this.cc.style, this.styleBase);\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(initVal, function (val, key) {\n if (mergeFiled.includes(key)) {\n _this.cc[key] = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().merge(_this.cc[key], val);\n } else {\n _this.cc[key] = val;\n }\n });\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(copyVal, function (key) {\n const value = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(_this.fieldSchema, key);\n value && _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathSet(_this.cc, key, value);\n });\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().isPlainObject(this.cellConfig)) {\n this.cc = Object.assign(this.cc, this.cellConfig);\n }\n this.cc.style = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().assign(this.cc.style, this.styleOverride);\n this.cc.placeholder = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(this.fieldSchema, 'placeholder', this.cc.placeholder);\n this.cc.pickerOptions = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(this.fieldSchema, 'pickerOptions', this.cc.pickerOptions);\n },\n change(newVal) {\n this.$forceUpdate();\n if (this.cc.change) {\n this.cc.change(newVal);\n }\n if (this.cc['changeEx']) {\n this.cc['changeEx']({\n value: newVal,\n parent: this.data\n });\n }\n if (this.fieldSchema && this.fieldSchema.__tableCallbackOnChange) {\n this.fieldSchema.__tableCallbackOnChange({\n row: this.data\n });\n }\n },\n emitClick(jsEvent) {\n this.$emit('code-cell-click', {\n code: this.cc.code,\n jsEvent: jsEvent\n });\n },\n emitClickWithCode(jsEvent, code) {\n this.$emit('code-cell-click', {\n code: code,\n jsEvent: jsEvent\n });\n },\n emitData(options) {\n return Object.assign({\n // 这里使用实际数据\n fieldValue: _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(this.data, this.fieldName)\n }, options);\n }\n }\n});\n\n//# sourceURL=webpack://aim/./src/components/cells/mixins/MixinCellEditorConfig.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use%5B0%5D!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options");
4512
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @cg-devcenter/jsb */ \"./node_modules/@cg-devcenter/jsb/index.js\");\n/* harmony import */ var _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'MixinCellEditorConfig',\n props: {\n cellConfig: {},\n // 组件配置,editor的cellConfig必须为Object,但是对viewer可以为组件需要的值\n\n data: Object,\n // 父对象数据,必须是一个Object,组件的model为data[fieldName]\n fieldName: String,\n formatter: Function,\n // 格式化化方法\n\n options: [Function, Array, Promise],\n styleOverride: Object,\n // 便于组件覆盖基础配置,如form中所有的元素设定为100% width,但是少数对象如checkbox不允许100%\n styleBase: Object,\n // 便于父对象定义基础配置,如form中所有的元素设定为100% width\n disabled: Boolean,\n // 是否只读\n\n fieldSchema: Object,\n // trigger时需要通过fieldSchema定位fields字段数据\n getRow: Function,\n tableDataGetter: Function\n },\n watch: {\n options: {\n handler: function () {\n this.fetchOptionsData();\n },\n deep: true\n }\n },\n data() {\n const _this = this;\n return {\n dataRef: {},\n cc: {\n style: {},\n change: _this.emitChange,\n clearable: true\n },\n inOptionLoading: false,\n optionsUsing: [],\n optionsRefresh: false,\n fieldSchemaRef: this.fieldSchema,\n optionValueKey: 'value'\n };\n },\n async created() {\n if (this.data) {\n this.dataRef = this.data;\n }\n await this.fetchOptionsData();\n },\n methods: {\n optionsParameter(force = false) {\n return {\n force: force,\n parent: this.dataRef,\n row: this.getRow ? this.getRow() : null,\n table: this.tableDataGetter ? this.tableDataGetter() : null\n };\n },\n async manualFetchOptionsData() {\n return this.fetchOptionsData(true);\n },\n async fetchOptionsData(force = false) {\n try {\n this.inOptionLoading = true;\n await this.__fetchOptionsData(force);\n } catch (error) {\n if (this.fieldSchemaRef) {\n this.fieldSchemaRef.errorMessage = error;\n } else {\n console.log(\"aim option fresh got error \", error);\n }\n } finally {\n this.inOptionLoading = false;\n }\n },\n async __fetchOptionsData(force = false) {\n let optionsGot = [];\n let tmpOptionsRefresh = false;\n if (typeof this.options === 'function') {\n tmpOptionsRefresh = true;\n // 如果 options 是一个函数,则调用它并等待它的返回值\n optionsGot = this.options(this.optionsParameter(force));\n if (optionsGot instanceof Promise) {\n optionsGot = await optionsGot;\n }\n } else if (this.options instanceof Promise) {\n tmpOptionsRefresh = true;\n // 如果 options 是一个 Promise,则等待 Promise 完成并赋值给 optionsInner\n optionsGot = await this.options;\n } else if (Array.isArray(this.options)) {\n tmpOptionsRefresh = false;\n // 如果 options 是一个数组,直接赋值\n optionsGot = this.options;\n }\n let autoGroupField = '';\n let autoGroupSort = '';\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().isObjectOrMap(optionsGot)) {\n tmpOptionsRefresh = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(optionsGot, 'refresh', false);\n autoGroupField = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(optionsGot, 'autoGroup', '');\n autoGroupSort = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(optionsGot, 'autoGroupSort', 'desc');\n optionsGot = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(optionsGot, 'options', []);\n }\n this.optionsUsing = [];\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(this.optionsFmt(optionsGot, autoGroupField, autoGroupSort), v => {\n this.optionsUsing.push(v);\n });\n this.optionsRefresh = tmpOptionsRefresh;\n },\n optionsTryGroup(options, field, autoGroupSort) {\n let group2Options = {};\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(options, item => {\n const groupVal = item[field] || '';\n if (!group2Options[groupVal]) {\n group2Options[groupVal] = [];\n }\n group2Options[groupVal].push(item);\n });\n let optionGroup = [];\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(group2Options, (item, key) => {\n optionGroup.push({\n label: key,\n options: item\n });\n });\n // 优先显示group\n optionGroup = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().orderBy(optionGroup, [{\n field: 'label',\n order: autoGroupSort\n }]);\n if (optionGroup.length === 1 && optionGroup[0].label === \"\") {\n return optionGroup[0].options;\n }\n return optionGroup;\n },\n optionsFmt(optionsGot, autoGroupField, autoGroupSort) {\n const options = [];\n // 将数组转换为option对象\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(optionsGot, v => {\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().isString(v) || _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().isNumber(v)) {\n options.push({\n label: v,\n value: v\n });\n } else {\n options.push(v);\n }\n });\n this.optionValueKey = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(options, '0.valueKey', 'value');\n if (autoGroupField) {\n // 如果option的属性字段中含有aimGroup,则自动将其聚合为group\n return this.optionsTryGroup(options, autoGroupField, autoGroupSort);\n }\n return options;\n },\n emitChange(valNew) {\n this.$emit(\"input\", valNew);\n },\n calcWidthPixString(defaultVal) {\n this.cc.style.width = this.cc.style.width ? _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().isString(this.cc.style.width) ? this.cc.style.width : `${this.cc.style.width}px` : defaultVal;\n return this.cc.style.width;\n },\n ccConfigMerge(initVal = {}, copyVal = []) {\n const _this = this;\n // styleDefault => styleBase => styleUser => styleOverride\n const mergeFiled = ['style'];\n this.cc.style = Object.assign(this.cc.style, this.styleBase);\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(initVal, function (val, key) {\n if (mergeFiled.includes(key)) {\n _this.cc[key] = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().merge(_this.cc[key], val);\n } else {\n _this.cc[key] = val;\n }\n });\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().isPlainObject(this.cellConfig)) {\n this.cc = Object.assign(this.cc, this.cellConfig);\n }\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(copyVal, function (key) {\n const value = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(_this.fieldSchema, key);\n value && _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathSet(_this.cc, key, value);\n });\n this.cc.style = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().assign(this.cc.style, this.styleOverride);\n this.cc.placeholder = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(this.fieldSchema, 'placeholder', this.cc.placeholder);\n this.cc.pickerOptions = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(this.fieldSchema, 'pickerOptions', this.cc.pickerOptions);\n },\n change(newVal) {\n this.$forceUpdate();\n if (this.cc.change) {\n this.cc.change(newVal);\n }\n if (this.cc['changeEx']) {\n this.cc['changeEx']({\n value: newVal,\n parent: this.data\n });\n }\n if (this.fieldSchema && this.fieldSchema.__tableCallbackOnChange) {\n this.fieldSchema.__tableCallbackOnChange({\n row: this.data\n });\n }\n },\n emitClick(jsEvent) {\n this.$emit('code-cell-click', {\n code: this.cc.code,\n jsEvent: jsEvent\n });\n },\n emitClickWithCode(jsEvent, code) {\n this.$emit('code-cell-click', {\n code: code,\n jsEvent: jsEvent\n });\n },\n emitData(options) {\n return Object.assign({\n // 这里使用实际数据\n fieldValue: _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(this.data, this.fieldName)\n }, options);\n }\n }\n});\n\n//# sourceURL=webpack://aim/./src/components/cells/mixins/MixinCellEditorConfig.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use%5B0%5D!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options");
4513
4513
 
4514
4514
  /***/ }),
4515
4515
 
@@ -4872,7 +4872,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
4872
4872
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
4873
4873
 
4874
4874
  "use strict";
4875
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ render: function() { return /* binding */ render; },\n/* harmony export */ staticRenderFns: function() { return /* binding */ staticRenderFns; }\n/* harmony export */ });\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n return _c(\"cell-input\", {\n attrs: {\n data: _vm.data,\n \"field-name\": _vm.fieldName,\n options: _vm.options,\n \"cell-config\": _vm.cellConfig,\n \"style-base\": _vm.styleBase,\n \"style-override\": _vm.styleOverride,\n disabled: _vm.disabled\n }\n });\n};\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://aim/./src/components/cells/CellInputTextArea.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use%5B0%5D!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet%5B1%5D.rules%5B3%5D!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options");
4875
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ render: function() { return /* binding */ render; },\n/* harmony export */ staticRenderFns: function() { return /* binding */ staticRenderFns; }\n/* harmony export */ });\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n return _c(\"cell-input\", {\n attrs: {\n data: _vm.data,\n \"field-name\": _vm.fieldName,\n options: _vm.options,\n \"cell-config\": _vm.cellConfig,\n \"style-base\": _vm.styleBase,\n \"style-override\": _vm.styleOverride,\n \"field-schema\": _vm.fieldSchema,\n disabled: _vm.disabled\n }\n });\n};\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://aim/./src/components/cells/CellInputTextArea.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use%5B0%5D!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet%5B1%5D.rules%5B3%5D!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options");
4876
4876
 
4877
4877
  /***/ }),
4878
4878
 
@@ -3684,7 +3684,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
3684
3684
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3685
3685
 
3686
3686
  "use strict";
3687
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _components_mixins_MixinComponentMap_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/components/mixins/MixinComponentMap.vue */ \"./src/components/mixins/MixinComponentMap.vue\");\n/* harmony import */ var _cg_devcenter_jsb_isString__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @cg-devcenter/jsb/isString */ \"./node_modules/@cg-devcenter/jsb/isString.js\");\n/* harmony import */ var _cg_devcenter_jsb_isString__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_cg_devcenter_jsb_isString__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @cg-devcenter/jsb */ \"./node_modules/@cg-devcenter/jsb/index.js\");\n/* harmony import */ var _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./index */ \"./src/components/AimFormInput/index.js\");\n/* harmony import */ var _components_cells_const__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/components/cells/const */ \"./src/components/cells/const.js\");\n/* harmony import */ var _components_AimTable_table__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/components/AimTable/table */ \"./src/components/AimTable/table.js\");\n/* harmony import */ var _components_cells_CellViewAlert_vue__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/components/cells/CellViewAlert.vue */ \"./src/components/cells/CellViewAlert.vue\");\n/* harmony import */ var _components_AimFormInput_AimFormItem_vue__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/components/AimFormInput/AimFormItem.vue */ \"./src/components/AimFormInput/AimFormItem.vue\");\n/* harmony import */ var _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/components/AimTable/slot */ \"./src/components/AimTable/slot.js\");\n/* harmony import */ var _components_AimTable_Column_ColumnHeader_vue__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/components/AimTable/Column/ColumnHeader.vue */ \"./src/components/AimTable/Column/ColumnHeader.vue\");\n/* harmony import */ var vue_loading_overlay__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! vue-loading-overlay */ \"./node_modules/vue-loading-overlay/dist/vue-loading.min.js\");\n/* harmony import */ var vue_loading_overlay__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(vue_loading_overlay__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var vue_loading_overlay_dist_vue_loading_css__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! vue-loading-overlay/dist/vue-loading.css */ \"./node_modules/vue-loading-overlay/dist/vue-loading.css\");\n/* harmony import */ var _components_AimTable_virtual_field__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @/components/AimTable/virtual_field */ \"./src/components/AimTable/virtual_field.js\");\n/* harmony import */ var _components_AimTable_formatterForUpdate__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @/components/AimTable/formatterForUpdate */ \"./src/components/AimTable/formatterForUpdate.js\");\n/* harmony import */ var _components_AimTable_validate__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @/components/AimTable/validate */ \"./src/components/AimTable/validate.js\");\n/* harmony import */ var _components_AimTable_default__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @/components/AimTable/default */ \"./src/components/AimTable/default.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"AimFormInput\",\n components: {\n Loading: (vue_loading_overlay__WEBPACK_IMPORTED_MODULE_11___default()),\n ColumnHeader: _components_AimTable_Column_ColumnHeader_vue__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n AimFormItem: _components_AimFormInput_AimFormItem_vue__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n CellViewAlert: _components_cells_CellViewAlert_vue__WEBPACK_IMPORTED_MODULE_7__[\"default\"]\n },\n watch: {\n schema: {\n handler: function () {\n this.processSchema();\n },\n deep: true\n }\n },\n computed: {\n cssVars() {\n return {\n \"--form-container-height\": `${this.height}px`\n };\n },\n allCommentSlotName() {\n return (0,_components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.allSlotName)(this.schema, 'commentSlot');\n }\n },\n mixins: [_components_mixins_MixinComponentMap_vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"]],\n props: {\n height: Number,\n schema: Array,\n // 行schema信息\n data: [Object, Function, Promise],\n // 当前行数据\n mode: String,\n // 编辑模式\n alertInfo: {\n type: [Object, String],\n default: null\n },\n rules: Object,\n shouldCellDisable: Function,\n // 最外层调用不要设定rowTop,递归时传递到最底层便于统一回调外层\n rowTop: Object,\n labelWidth: String,\n viewLevelIndex: Number,\n // 默认0也就是0级页面\n parentKey: String,\n readOnly: Boolean,\n // 对接AimTable时,AimTable自动完成了watch\n enableWatcher: {\n type: Boolean,\n default: true\n },\n groupConfig: Array,\n row2Storage: Function,\n tableDataGetter: Function,\n submitRemoveFieldNotInSchema: {\n type: Boolean,\n default: false\n }\n },\n async created() {\n let dataGot = this.data;\n if (typeof this.data === 'function') {\n // 如果 options 是一个函数,则调用它并等待它的返回值\n dataGot = this.data();\n if (dataGot instanceof Promise) {\n this.inLoading = true;\n dataGot = await dataGot.finally(() => {\n this.inLoading = false;\n });\n }\n } else if (this.data instanceof Promise) {\n // 如果 options 是一个 Promise,则等待 Promise 完成并赋值给 optionsInner\n this.inLoading = true;\n dataGot = await this.data.finally(() => {\n this.inLoading = false;\n });\n }\n this.dataRef = dataGot;\n this.processSchema();\n if (this.rules) {\n this.rulesRef = this.rules;\n } else {\n this.rulesRef = (0,_components_AimTable_validate__WEBPACK_IMPORTED_MODULE_15__.FormRulesFromSchema)(this.schema);\n }\n this.getProxyTipSlotName();\n this.getProxyCommentSlotName();\n },\n data() {\n return {\n CodeButtonAdd: _components_cells_const__WEBPACK_IMPORTED_MODULE_5__.CodeButtonAdd,\n CodeButtonRowSelectedMinus: _components_cells_const__WEBPACK_IMPORTED_MODULE_5__.CodeButtonRowSelectedMinus,\n labelWidthPixel: this.labelWidth || (0,_index__WEBPACK_IMPORTED_MODULE_4__.calcLabelWidth)(this.schema || []),\n //fixme 需要table打入rules,独立使用AimFormInput的时候需要根据schema更新rules\n rulesRef: {},\n fieldsCommon: [],\n dataRef: {},\n inLoading: false,\n // inline显示的字段\n fieldSorted: [],\n currTab: {},\n groupMaxFieldNumber: 0,\n fieldWatcher: []\n };\n },\n beforeDestroy() {\n this.cleanFieldWatcher();\n },\n methods: {\n groupLabelWidth(gs) {\n const groupSquash = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(gs.setting, 'squash', false);\n if (groupSquash) {\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(gs, 'squash', false)) {\n return null;\n }\n return '0px';\n }\n return null;\n },\n getProxyCommentSlotNameWithName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.getProxyCommentSlotNameWithName,\n commentSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.commentSlotName,\n tipSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.tipSlotName,\n formSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.formSlotName,\n isString: (_cg_devcenter_jsb_isString__WEBPACK_IMPORTED_MODULE_2___default()),\n getProxyTipSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.getProxyTipSlotName,\n getProxyFormSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.getProxyFormSlotName,\n getProxyCommentSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.getProxyCommentSlotName,\n cleanFieldWatcher() {\n this.fieldWatcher.forEach(watcher => watcher());\n this.fieldWatcher = [];\n },\n afterField(fieldGroupList, field) {\n let ret = [];\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(fieldGroupList, function (group) {\n if (group.setting.after === field) {\n ret.push(group);\n }\n });\n ret.sort(function (a, b) {\n const indexA = a.setting.index || 0;\n const indexB = b.setting.index || 0;\n return indexA - indexB;\n });\n return ret;\n },\n iconBind(icon) {\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isString(icon)) {\n return {\n class: icon,\n style: {\n 'padding-right': '3px'\n }\n };\n }\n return icon;\n },\n setInLoading(v) {\n this.inLoading = v;\n },\n setLoading(v) {\n this.inLoading = v;\n },\n // 刷新当前表内local proxy 的aim表数据\n reloadLocalProxyAimTableData(field) {\n const refs = this.$refs['aimFormItem'];\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().wrapArray(refs), v => {\n v.reloadLocalProxyAimTableData(field);\n });\n },\n processSchema() {\n if (!this.dataRef) {\n return;\n }\n const fieldsCommon = [];\n const fieldGroupList = [];\n const _this = this;\n\n // 创建视图的时候根据schema填充默认数值,防止由于数值缺失导致的访问undefined\n // 但是只有传入的data完全空的时候才设定 fillBySchemaDefault 为true\n this.dataRef = (0,_components_AimTable_default__WEBPACK_IMPORTED_MODULE_16__.FillDefaultDataWithSchema)(this.schema, this.dataRef, this.mode === _index__WEBPACK_IMPORTED_MODULE_4__.AimFormInputInsert);\n this.cleanFieldWatcher();\n _this.groupMaxFieldNumber = 0;\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(this.schema, function (fs) {\n let formOff = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fs, 'formOff', undefined);\n if (formOff === undefined) {\n formOff = !!(0,_components_AimTable_virtual_field__WEBPACK_IMPORTED_MODULE_13__.isVirtualField)(fs);\n }\n if (formOff) {\n return;\n }\n if (_this.mode === _index__WEBPACK_IMPORTED_MODULE_4__.AimFormInputInsert && _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fs, 'insertOff', false)) {\n return;\n }\n const itemType = _this.fieldType(fs);\n // 如果是object类型,在传递进 FormInput 组件前需要给默认值\n if (itemType === 'object' && (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isNull(_this.dataRef[fs.field]) || _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isUndefined(_this.dataRef[fs.field]))) {\n _this.dataRef[fs.field] = {};\n }\n if (itemType === 'table' && (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isNull(_this.dataRef[fs.field]) || _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isUndefined(_this.dataRef[fs.field]))) {\n _this.dataRef[fs.field] = [];\n }\n const watch = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fs, 'watch');\n if (_this.enableWatcher && watch) {\n const watcher = _this.$watch(`dataRef.${fs.field}`, function (newValue, oldValue) {\n watch({\n row: this.getRow(),\n newValue,\n oldValue,\n parent: this.dataRef,\n target: this\n });\n }, _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fs, 'watchOptions', {}));\n _this.fieldWatcher.push(watcher);\n }\n let asCommonField = true;\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(_this.groupConfig, function (groupSetting, index) {\n if (!asCommonField) {\n return;\n }\n const fields = groupSetting.fields;\n let fieldShouldInGroup;\n if (fields) {\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isArray(fields)) {\n fieldShouldInGroup = fields.includes(fs.field);\n } else {\n fieldShouldInGroup = fields[fs.field];\n }\n }\n if (fieldShouldInGroup) {\n let group = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().find(fieldGroupList, item => item.index === index);\n if (!group) {\n group = {\n index: index,\n fieldSchemaList: [],\n setting: groupSetting,\n __isGroup: true\n };\n fieldGroupList.push(group);\n }\n asCommonField = false;\n if (!_this.currTab[`group_tab_${index}`]) {\n _this.currTab[`group_tab_${index}`] = _this.formLabel(fs);\n }\n group.fieldSchemaList.push(fs);\n if (group.fieldSchemaList.length > _this.groupMaxFieldNumber) {\n _this.groupMaxFieldNumber = group.fieldSchemaList.length;\n }\n }\n });\n if (asCommonField) {\n fieldsCommon.push(fs);\n }\n });\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(_this.groupConfig, function (groupSetting, index) {\n if (groupSetting.type === 'divider') {\n fieldGroupList.push({\n index: index,\n setting: groupSetting,\n __isGroup: true\n });\n }\n });\n _this.fieldSorted = [];\n _this.fieldSorted.push(..._this.afterField(fieldGroupList, '@start'));\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(fieldsCommon, function (fs) {\n _this.fieldSorted.push(fs);\n _this.fieldSorted.push(..._this.afterField(fieldGroupList, fs.field));\n });\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(fieldGroupList, function (group) {\n if (!_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().find(_this.fieldSorted, item => item.index === group.index)) {\n _this.fieldSorted.push(group);\n }\n });\n },\n groupShow(group) {\n let showCount = 0;\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(group.fieldSchemaList, v => {\n if ((0,_index__WEBPACK_IMPORTED_MODULE_4__.showForm)(this.getRow(), v, this.dataRef)) {\n showCount += 1;\n }\n });\n return showCount !== 0;\n },\n span(group, field) {\n let showCount = 0;\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(group.fieldSchemaList, v => {\n if ((0,_index__WEBPACK_IMPORTED_MODULE_4__.showForm)(this.getRow(), v, this.dataRef)) {\n showCount += 1;\n }\n });\n if (showCount === 1) {\n return 24;\n }\n if (this.groupMaxFieldNumber && _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(group.setting, 'itemAlign', true)) {\n return 24 / this.groupMaxFieldNumber;\n }\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isArray(group.setting.fields)) {\n return 24 / group.setting.fields.length;\n }\n return group.setting.fields[field] || 24 / group.setting.fields.length;\n },\n fieldType(fs) {\n return _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fs, 'typeFormInput', fs['type']);\n },\n getRow() {\n if (!this.rowTop) {\n return this.dataRef;\n }\n return this.rowTop;\n },\n formLabel(si) {\n return _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(si, 'nameForm', si['name']);\n },\n // 获取数据,不进行validate\n getDataForStorage(data = undefined) {\n data = data || this.dataRef;\n return (0,_components_AimTable_formatterForUpdate__WEBPACK_IMPORTED_MODULE_14__.CleanRowForStorage)(this.schema, data, true, true, this.submitRemoveFieldNotInSchema, this.row2Storage);\n },\n // validate 逻辑层主动调用,单独使用AimFormInput的场景\n validate(validCallback, notValidCallback = null, onValidCallbackRunError = e => {\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().cc.toastWarning(e);\n }) {\n const _this = this;\n this.__validatePrivate(validCallback, notValidCallback, onValidCallbackRunError, v => {\n // 移除虚拟字段、移除控制字段\n return _this.getDataForStorage(v);\n });\n },\n // __validatePrivate 外部不要直接调用\n __validatePrivate(validCallback, notValidCallback = () => {}, onValidCallbackRunError = e => {\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().cc.toastWarning(e);\n }, processor = v => {\n return v;\n }) {\n const _this = this;\n this.$refs['form'].validate(valid => {\n if (valid) {\n try {\n const tmp = processor(_this.dataRef);\n validCallback(tmp);\n } catch (e) {\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isFunction(onValidCallbackRunError)) {\n onValidCallbackRunError(e);\n }\n }\n } else {\n notValidCallback && notValidCallback();\n }\n });\n },\n // __validateFromAimTable aim table 内部调用,此处不主动清理数据,由aim table完成\n __validateFromAimTable(validCallback) {\n this.__validatePrivate(validCallback);\n },\n fieldComponentKey(fs) {\n return `${this.parentKey}_${fs.field}_${(0,_components_AimTable_table__WEBPACK_IMPORTED_MODULE_6__.xidRow)(this.getRow())}`;\n },\n formHeight() {\n return this.$refs.form.$el.clientHeight;\n },\n formRows() {\n return this.fieldSorted.length;\n },\n privateShouldCellDisable({\n fieldSchema,\n cell\n }) {\n if (this.readOnly) {\n return true;\n }\n if (this.mode === _index__WEBPACK_IMPORTED_MODULE_4__.AimFormInputView) {\n return true;\n }\n // 只读属性,如id等依赖服务器返回,只展现不允许编辑\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fieldSchema, 'disabled', false)) {\n return true;\n }\n // 只读属性,如id等依赖服务器返回,只展现不允许编辑\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fieldSchema, 'readOnly', false)) {\n return true;\n }\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fieldSchema, 'insertOnly', false)) {\n // 只允许插入时有效,创建后不允许编辑\n return this.mode !== _index__WEBPACK_IMPORTED_MODULE_4__.AimFormInputInsert && this.mode !== _index__WEBPACK_IMPORTED_MODULE_4__.AimFormInputCopy;\n }\n if (!this.shouldCellDisable) {\n return false;\n }\n return this.shouldCellDisable({\n fieldSchema,\n cell,\n row: this.getRow()\n });\n }\n }\n});\n\n//# sourceURL=webpack://aim/./src/components/AimFormInput/index.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-124.use%5B0%5D!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options");
3687
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _components_mixins_MixinComponentMap_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/components/mixins/MixinComponentMap.vue */ \"./src/components/mixins/MixinComponentMap.vue\");\n/* harmony import */ var _cg_devcenter_jsb_isString__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @cg-devcenter/jsb/isString */ \"./node_modules/@cg-devcenter/jsb/isString.js\");\n/* harmony import */ var _cg_devcenter_jsb_isString__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_cg_devcenter_jsb_isString__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @cg-devcenter/jsb */ \"./node_modules/@cg-devcenter/jsb/index.js\");\n/* harmony import */ var _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./index */ \"./src/components/AimFormInput/index.js\");\n/* harmony import */ var _components_cells_const__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/components/cells/const */ \"./src/components/cells/const.js\");\n/* harmony import */ var _components_AimTable_table__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/components/AimTable/table */ \"./src/components/AimTable/table.js\");\n/* harmony import */ var _components_cells_CellViewAlert_vue__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/components/cells/CellViewAlert.vue */ \"./src/components/cells/CellViewAlert.vue\");\n/* harmony import */ var _components_AimFormInput_AimFormItem_vue__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/components/AimFormInput/AimFormItem.vue */ \"./src/components/AimFormInput/AimFormItem.vue\");\n/* harmony import */ var _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/components/AimTable/slot */ \"./src/components/AimTable/slot.js\");\n/* harmony import */ var _components_AimTable_Column_ColumnHeader_vue__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/components/AimTable/Column/ColumnHeader.vue */ \"./src/components/AimTable/Column/ColumnHeader.vue\");\n/* harmony import */ var vue_loading_overlay__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! vue-loading-overlay */ \"./node_modules/vue-loading-overlay/dist/vue-loading.min.js\");\n/* harmony import */ var vue_loading_overlay__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(vue_loading_overlay__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var vue_loading_overlay_dist_vue_loading_css__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! vue-loading-overlay/dist/vue-loading.css */ \"./node_modules/vue-loading-overlay/dist/vue-loading.css\");\n/* harmony import */ var _components_AimTable_virtual_field__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @/components/AimTable/virtual_field */ \"./src/components/AimTable/virtual_field.js\");\n/* harmony import */ var _components_AimTable_formatterForUpdate__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @/components/AimTable/formatterForUpdate */ \"./src/components/AimTable/formatterForUpdate.js\");\n/* harmony import */ var _components_AimTable_validate__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @/components/AimTable/validate */ \"./src/components/AimTable/validate.js\");\n/* harmony import */ var _components_AimTable_default__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @/components/AimTable/default */ \"./src/components/AimTable/default.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"AimFormInput\",\n components: {\n Loading: (vue_loading_overlay__WEBPACK_IMPORTED_MODULE_11___default()),\n ColumnHeader: _components_AimTable_Column_ColumnHeader_vue__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n AimFormItem: _components_AimFormInput_AimFormItem_vue__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n CellViewAlert: _components_cells_CellViewAlert_vue__WEBPACK_IMPORTED_MODULE_7__[\"default\"]\n },\n watch: {\n schema: {\n handler: function () {\n this.processSchema();\n },\n deep: true\n }\n },\n computed: {\n cssVars() {\n return {\n \"--form-container-height\": `${this.height}px`\n };\n },\n allCommentSlotName() {\n return (0,_components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.allSlotName)(this.schema, 'commentSlot');\n }\n },\n mixins: [_components_mixins_MixinComponentMap_vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"]],\n props: {\n height: Number,\n schema: Array,\n // 行schema信息\n data: [Object, Function, Promise],\n // 当前行数据\n mode: String,\n // 编辑模式\n alertInfo: {\n type: [Object, String],\n default: null\n },\n rules: Object,\n shouldCellDisable: Function,\n // 最外层调用不要设定rowTop,递归时传递到最底层便于统一回调外层\n rowTop: Object,\n labelWidth: String,\n viewLevelIndex: Number,\n // 默认0也就是0级页面\n parentKey: String,\n readOnly: Boolean,\n // 对接AimTable时,AimTable自动完成了watch\n enableWatcher: {\n type: Boolean,\n default: true\n },\n groupConfig: Array,\n row2Storage: Function,\n tableDataGetter: Function,\n submitRemoveFieldNotInSchema: {\n type: Boolean,\n default: false\n }\n },\n async created() {\n let dataGot = this.data;\n if (typeof this.data === 'function') {\n // 如果 options 是一个函数,则调用它并等待它的返回值\n dataGot = this.data();\n if (dataGot instanceof Promise) {\n this.inLoading = true;\n dataGot = await dataGot.finally(() => {\n this.inLoading = false;\n });\n }\n } else if (this.data instanceof Promise) {\n // 如果 options 是一个 Promise,则等待 Promise 完成并赋值给 optionsInner\n this.inLoading = true;\n dataGot = await this.data.finally(() => {\n this.inLoading = false;\n });\n }\n this.dataRef = dataGot;\n this.processSchema();\n if (this.rules) {\n this.rulesRef = this.rules;\n } else {\n this.rulesRef = (0,_components_AimTable_validate__WEBPACK_IMPORTED_MODULE_15__.FormRulesFromSchema)(this.schema);\n }\n this.getProxyTipSlotName();\n this.getProxyCommentSlotName();\n },\n data() {\n return {\n CodeButtonAdd: _components_cells_const__WEBPACK_IMPORTED_MODULE_5__.CodeButtonAdd,\n CodeButtonRowSelectedMinus: _components_cells_const__WEBPACK_IMPORTED_MODULE_5__.CodeButtonRowSelectedMinus,\n labelWidthPixel: this.labelWidth || (0,_index__WEBPACK_IMPORTED_MODULE_4__.calcLabelWidth)(this.schema || []),\n //fixme 需要table打入rules,独立使用AimFormInput的时候需要根据schema更新rules\n rulesRef: {},\n fieldsCommon: [],\n dataRef: {},\n inLoading: false,\n // inline显示的字段\n fieldSorted: [],\n currTab: {},\n groupMaxFieldNumber: 0,\n fieldWatcher: []\n };\n },\n beforeDestroy() {\n this.cleanFieldWatcher();\n },\n methods: {\n groupLabelWidth(gs) {\n const groupSquash = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(gs.setting, 'squash', false);\n if (groupSquash) {\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(gs, 'squash', false)) {\n return null;\n }\n return '0px';\n }\n return null;\n },\n getProxyCommentSlotNameWithName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.getProxyCommentSlotNameWithName,\n commentSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.commentSlotName,\n tipSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.tipSlotName,\n formSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.formSlotName,\n isString: (_cg_devcenter_jsb_isString__WEBPACK_IMPORTED_MODULE_2___default()),\n getProxyTipSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.getProxyTipSlotName,\n getProxyFormSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.getProxyFormSlotName,\n getProxyCommentSlotName: _components_AimTable_slot__WEBPACK_IMPORTED_MODULE_9__.getProxyCommentSlotName,\n cleanFieldWatcher() {\n this.fieldWatcher.forEach(watcher => watcher());\n this.fieldWatcher = [];\n },\n afterField(fieldGroupList, field) {\n let ret = [];\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(fieldGroupList, function (group) {\n if (group.setting.after === field) {\n ret.push(group);\n }\n });\n ret.sort(function (a, b) {\n const indexA = a.setting.index || 0;\n const indexB = b.setting.index || 0;\n return indexA - indexB;\n });\n return ret;\n },\n iconBind(icon) {\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isString(icon)) {\n return {\n class: icon,\n style: {\n 'padding-right': '3px'\n }\n };\n }\n return icon;\n },\n setInLoading(v) {\n this.inLoading = v;\n },\n setLoading(v) {\n this.inLoading = v;\n },\n // 刷新当前表内local proxy 的aim表数据\n reloadLocalProxyAimTableData(field) {\n const refs = this.$refs['aimFormItem'];\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().wrapArray(refs), v => {\n v.reloadLocalProxyAimTableData(field);\n });\n },\n processSchema() {\n if (!this.dataRef) {\n return;\n }\n const fieldsCommon = [];\n const fieldGroupList = [];\n const _this = this;\n\n // 创建视图的时候根据schema填充默认数值,防止由于数值缺失导致的访问undefined\n // 但是只有传入的data完全空的时候才设定 fillBySchemaDefault 为true\n this.dataRef = (0,_components_AimTable_default__WEBPACK_IMPORTED_MODULE_16__.FillDefaultDataWithSchema)(this.schema, this.dataRef, this.mode === _index__WEBPACK_IMPORTED_MODULE_4__.AimFormInputInsert);\n this.cleanFieldWatcher();\n _this.groupMaxFieldNumber = 0;\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(this.schema, function (fs) {\n let formOff = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fs, 'formOff', undefined);\n if (formOff === undefined) {\n formOff = !!(0,_components_AimTable_virtual_field__WEBPACK_IMPORTED_MODULE_13__.isVirtualField)(fs);\n }\n if (formOff) {\n return;\n }\n if (_this.mode === _index__WEBPACK_IMPORTED_MODULE_4__.AimFormInputInsert && _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fs, 'insertOff', false)) {\n return;\n }\n const itemType = _this.fieldType(fs);\n // 如果是object类型,在传递进 FormInput 组件前需要给默认值\n if (itemType === 'object' && (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isNull(_this.dataRef[fs.field]) || _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isUndefined(_this.dataRef[fs.field]))) {\n _this.dataRef[fs.field] = {};\n }\n if (itemType === 'table' && (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isNull(_this.dataRef[fs.field]) || _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isUndefined(_this.dataRef[fs.field]))) {\n _this.dataRef[fs.field] = [];\n }\n const watch = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fs, 'watch');\n if (_this.enableWatcher && watch) {\n const watcher = _this.$watch(`dataRef.${fs.field}`, function (newValue, oldValue) {\n watch({\n row: this.getRow(),\n newValue,\n oldValue,\n parent: this.dataRef,\n target: this\n });\n }, _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fs, 'watchOptions', {}));\n _this.fieldWatcher.push(watcher);\n }\n let asCommonField = true;\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(_this.groupConfig, function (groupSetting, index) {\n if (!asCommonField) {\n return;\n }\n const fields = groupSetting.fields;\n let fieldShouldInGroup;\n if (fields) {\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isArray(fields)) {\n fieldShouldInGroup = fields.includes(fs.field);\n } else {\n fieldShouldInGroup = fields[fs.field];\n }\n }\n if (fieldShouldInGroup) {\n let group = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().find(fieldGroupList, item => item.index === index);\n if (!group) {\n group = {\n index: index,\n fieldSchemaList: [],\n setting: groupSetting,\n __isGroup: true\n };\n fieldGroupList.push(group);\n }\n asCommonField = false;\n if (!_this.currTab[`group_tab_${index}`]) {\n _this.currTab[`group_tab_${index}`] = _this.formLabel(fs);\n }\n group.fieldSchemaList.push(fs);\n if (group.fieldSchemaList.length > _this.groupMaxFieldNumber) {\n _this.groupMaxFieldNumber = group.fieldSchemaList.length;\n }\n }\n });\n if (asCommonField) {\n fieldsCommon.push(fs);\n }\n });\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(_this.groupConfig, function (groupSetting, index) {\n if (groupSetting.type === 'divider') {\n fieldGroupList.push({\n index: index,\n setting: groupSetting,\n __isGroup: true\n });\n }\n });\n _this.fieldSorted = [];\n _this.fieldSorted.push(..._this.afterField(fieldGroupList, '@start'));\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(fieldsCommon, function (fs) {\n _this.fieldSorted.push(fs);\n _this.fieldSorted.push(..._this.afterField(fieldGroupList, fs.field));\n });\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(fieldGroupList, function (group) {\n if (!_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().find(_this.fieldSorted, item => item.index === group.index)) {\n _this.fieldSorted.push(group);\n }\n });\n },\n groupShow(group) {\n let showCount = 0;\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(group.fieldSchemaList, v => {\n if ((0,_index__WEBPACK_IMPORTED_MODULE_4__.showForm)(this.getRow(), v, this.dataRef)) {\n showCount += 1;\n }\n });\n return showCount !== 0;\n },\n span(group, field) {\n let showCount = 0;\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().each(group.fieldSchemaList, v => {\n if ((0,_index__WEBPACK_IMPORTED_MODULE_4__.showForm)(this.getRow(), v, this.dataRef)) {\n showCount += 1;\n }\n });\n if (showCount === 1) {\n return 24;\n }\n if (this.groupMaxFieldNumber && _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(group.setting, 'itemAlign', true)) {\n return 24 / this.groupMaxFieldNumber;\n }\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isArray(group.setting.fields)) {\n return 24 / group.setting.fields.length;\n }\n return group.setting.fields[field] || 24 / group.setting.fields.length;\n },\n fieldType(fs) {\n return _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fs, 'typeFormInput', fs['type']);\n },\n getRow() {\n if (!this.rowTop) {\n return this.dataRef;\n }\n return this.rowTop;\n },\n formLabel(si) {\n return _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(si, 'nameForm', si['name']);\n },\n // 获取数据,不进行validate\n getDataForStorage(data = undefined) {\n data = data || this.dataRef;\n return (0,_components_AimTable_formatterForUpdate__WEBPACK_IMPORTED_MODULE_14__.CleanRowForStorage)(this.schema, data, true, true, this.submitRemoveFieldNotInSchema, this.row2Storage);\n },\n // validate 逻辑层主动调用,单独使用AimFormInput的场景\n validate(validCallback, notValidCallback = null, onValidCallbackRunError = e => {\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().cc.toastWarning(e);\n }) {\n const _this = this;\n this.__validatePrivate(validCallback, notValidCallback, onValidCallbackRunError, v => {\n // 移除虚拟字段、移除控制字段\n return _this.getDataForStorage(v);\n });\n },\n // __validatePrivate 外部不要直接调用\n __validatePrivate(validCallback, notValidCallback, onValidCallbackRunError = e => {\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().cc.toastWarning(e);\n }, processor = v => {\n return v;\n }) {\n const _this = this;\n this.$refs['form'].validate((valid, invalidFields) => {\n if (valid) {\n try {\n const tmp = processor(_this.dataRef);\n validCallback(tmp);\n } catch (e) {\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().isFunction(onValidCallbackRunError)) {\n onValidCallbackRunError(e);\n }\n }\n } else {\n notValidCallback ? notValidCallback() : Object.values(invalidFields).forEach(errors => {\n if (Array.isArray(errors)) {\n errors.forEach(error => {\n const {\n message\n } = error;\n if (message) {\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().cc.toastWarning(message);\n }\n });\n }\n });\n }\n });\n },\n // __validateFromAimTable aim table 内部调用,此处不主动清理数据,由aim table完成\n __validateFromAimTable(validCallback) {\n this.__validatePrivate(validCallback);\n },\n fieldComponentKey(fs) {\n return `${this.parentKey}_${fs.field}_${(0,_components_AimTable_table__WEBPACK_IMPORTED_MODULE_6__.xidRow)(this.getRow())}`;\n },\n formHeight() {\n return this.$refs.form.$el.clientHeight;\n },\n formRows() {\n return this.fieldSorted.length;\n },\n privateShouldCellDisable({\n fieldSchema,\n cell\n }) {\n if (this.readOnly) {\n return true;\n }\n if (this.mode === _index__WEBPACK_IMPORTED_MODULE_4__.AimFormInputView) {\n return true;\n }\n // 只读属性,如id等依赖服务器返回,只展现不允许编辑\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fieldSchema, 'disabled', false)) {\n return true;\n }\n // 只读属性,如id等依赖服务器返回,只展现不允许编辑\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fieldSchema, 'readOnly', false)) {\n return true;\n }\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_3___default().pathGet(fieldSchema, 'insertOnly', false)) {\n // 只允许插入时有效,创建后不允许编辑\n return this.mode !== _index__WEBPACK_IMPORTED_MODULE_4__.AimFormInputInsert && this.mode !== _index__WEBPACK_IMPORTED_MODULE_4__.AimFormInputCopy;\n }\n if (!this.shouldCellDisable) {\n return false;\n }\n return this.shouldCellDisable({\n fieldSchema,\n cell,\n row: this.getRow()\n });\n }\n }\n});\n\n//# sourceURL=webpack://aim/./src/components/AimFormInput/index.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-124.use%5B0%5D!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options");
3688
3688
 
3689
3689
  /***/ }),
3690
3690
 
@@ -4080,7 +4080,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _com
4080
4080
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
4081
4081
 
4082
4082
  "use strict";
4083
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _components_cells_mixins_MixinCellEditorConfig_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/components/cells/mixins/MixinCellEditorConfig.vue */ \"./src/components/cells/mixins/MixinCellEditorConfig.vue\");\n/* harmony import */ var _components_cells_CellTriggerImageSelect_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/components/cells/CellTriggerImageSelect.vue */ \"./src/components/cells/CellTriggerImageSelect.vue\");\n/* harmony import */ var _components_cells_CellViewImage_vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components/cells/CellViewImage.vue */ \"./src/components/cells/CellViewImage.vue\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'CellInput',\n components: {\n CellViewImage: _components_cells_CellViewImage_vue__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n CellTriggerImageSelect: _components_cells_CellTriggerImageSelect_vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n },\n mixins: [_components_cells_mixins_MixinCellEditorConfig_vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"]],\n props: {\n asImage: Boolean\n },\n created() {\n this.ccConfigMerge();\n },\n methods: {\n divClass() {\n return this.calcWidthPixString() ? 'cell-input-with-width' : '';\n },\n divStyle() {\n return {\n '--input-width': this.calcWidthPixString() || '100%',\n width: \"100%\",\n display: 'inline-flex'\n };\n },\n isValidImageUrl(url) {\n if (!url) {\n return false;\n }\n // 通过文件后缀判断是否是图像\n const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp'];\n const extension = String(url).split('.').pop().toLowerCase();\n return imageExtensions.includes(extension);\n }\n }\n});\n\n//# sourceURL=webpack://aim/./src/components/cells/CellInput.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-124.use%5B0%5D!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options");
4083
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _components_cells_mixins_MixinCellEditorConfig_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/components/cells/mixins/MixinCellEditorConfig.vue */ \"./src/components/cells/mixins/MixinCellEditorConfig.vue\");\n/* harmony import */ var _components_cells_CellTriggerImageSelect_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/components/cells/CellTriggerImageSelect.vue */ \"./src/components/cells/CellTriggerImageSelect.vue\");\n/* harmony import */ var _components_cells_CellViewImage_vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components/cells/CellViewImage.vue */ \"./src/components/cells/CellViewImage.vue\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'CellInput',\n components: {\n CellViewImage: _components_cells_CellViewImage_vue__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n CellTriggerImageSelect: _components_cells_CellTriggerImageSelect_vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n },\n mixins: [_components_cells_mixins_MixinCellEditorConfig_vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"]],\n props: {\n asImage: Boolean\n },\n created() {\n this.ccConfigMerge({}, [\"autosize\"]);\n },\n methods: {\n divClass() {\n return this.calcWidthPixString() ? 'cell-input-with-width' : '';\n },\n divStyle() {\n return {\n '--input-width': this.calcWidthPixString() || '100%',\n width: \"100%\",\n display: 'inline-flex'\n };\n },\n isValidImageUrl(url) {\n if (!url) {\n return false;\n }\n // 通过文件后缀判断是否是图像\n const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp'];\n const extension = String(url).split('.').pop().toLowerCase();\n return imageExtensions.includes(extension);\n }\n }\n});\n\n//# sourceURL=webpack://aim/./src/components/cells/CellInput.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-124.use%5B0%5D!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options");
4084
4084
 
4085
4085
  /***/ }),
4086
4086
 
@@ -4509,7 +4509,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _com
4509
4509
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
4510
4510
 
4511
4511
  "use strict";
4512
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @cg-devcenter/jsb */ \"./node_modules/@cg-devcenter/jsb/index.js\");\n/* harmony import */ var _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'MixinCellEditorConfig',\n props: {\n cellConfig: {},\n // 组件配置,editor的cellConfig必须为Object,但是对viewer可以为组件需要的值\n\n data: Object,\n // 父对象数据,必须是一个Object,组件的model为data[fieldName]\n fieldName: String,\n formatter: Function,\n // 格式化化方法\n\n options: [Function, Array, Promise],\n styleOverride: Object,\n // 便于组件覆盖基础配置,如form中所有的元素设定为100% width,但是少数对象如checkbox不允许100%\n styleBase: Object,\n // 便于父对象定义基础配置,如form中所有的元素设定为100% width\n disabled: Boolean,\n // 是否只读\n\n fieldSchema: Object,\n // trigger时需要通过fieldSchema定位fields字段数据\n getRow: Function,\n tableDataGetter: Function\n },\n watch: {\n options: {\n handler: function () {\n this.fetchOptionsData();\n },\n deep: true\n }\n },\n data() {\n const _this = this;\n return {\n dataRef: {},\n cc: {\n style: {},\n change: _this.emitChange,\n clearable: true\n },\n inOptionLoading: false,\n optionsUsing: [],\n optionsRefresh: false,\n fieldSchemaRef: this.fieldSchema,\n optionValueKey: 'value'\n };\n },\n async created() {\n if (this.data) {\n this.dataRef = this.data;\n }\n await this.fetchOptionsData();\n },\n methods: {\n optionsParameter(force = false) {\n return {\n force: force,\n parent: this.dataRef,\n row: this.getRow ? this.getRow() : null,\n table: this.tableDataGetter ? this.tableDataGetter() : null\n };\n },\n async manualFetchOptionsData() {\n return this.fetchOptionsData(true);\n },\n async fetchOptionsData(force = false) {\n try {\n this.inOptionLoading = true;\n await this.__fetchOptionsData(force);\n } catch (error) {\n if (this.fieldSchemaRef) {\n this.fieldSchemaRef.errorMessage = error;\n } else {\n console.log(\"aim option fresh got error \", error);\n }\n } finally {\n this.inOptionLoading = false;\n }\n },\n async __fetchOptionsData(force = false) {\n let optionsGot = [];\n let tmpOptionsRefresh = false;\n if (typeof this.options === 'function') {\n tmpOptionsRefresh = true;\n // 如果 options 是一个函数,则调用它并等待它的返回值\n optionsGot = this.options(this.optionsParameter(force));\n if (optionsGot instanceof Promise) {\n optionsGot = await optionsGot;\n }\n } else if (this.options instanceof Promise) {\n tmpOptionsRefresh = true;\n // 如果 options 是一个 Promise,则等待 Promise 完成并赋值给 optionsInner\n optionsGot = await this.options;\n } else if (Array.isArray(this.options)) {\n tmpOptionsRefresh = false;\n // 如果 options 是一个数组,直接赋值\n optionsGot = this.options;\n }\n let autoGroupField = '';\n let autoGroupSort = '';\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().isObjectOrMap(optionsGot)) {\n tmpOptionsRefresh = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(optionsGot, 'refresh', false);\n autoGroupField = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(optionsGot, 'autoGroup', '');\n autoGroupSort = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(optionsGot, 'autoGroupSort', 'desc');\n optionsGot = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(optionsGot, 'options', []);\n }\n this.optionsUsing = [];\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(this.optionsFmt(optionsGot, autoGroupField, autoGroupSort), v => {\n this.optionsUsing.push(v);\n });\n this.optionsRefresh = tmpOptionsRefresh;\n },\n optionsTryGroup(options, field, autoGroupSort) {\n let group2Options = {};\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(options, item => {\n const groupVal = item[field] || '';\n if (!group2Options[groupVal]) {\n group2Options[groupVal] = [];\n }\n group2Options[groupVal].push(item);\n });\n let optionGroup = [];\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(group2Options, (item, key) => {\n optionGroup.push({\n label: key,\n options: item\n });\n });\n // 优先显示group\n optionGroup = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().orderBy(optionGroup, [{\n field: 'label',\n order: autoGroupSort\n }]);\n if (optionGroup.length === 1 && optionGroup[0].label === \"\") {\n return optionGroup[0].options;\n }\n return optionGroup;\n },\n optionsFmt(optionsGot, autoGroupField, autoGroupSort) {\n const options = [];\n // 将数组转换为option对象\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(optionsGot, v => {\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().isString(v) || _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().isNumber(v)) {\n options.push({\n label: v,\n value: v\n });\n } else {\n options.push(v);\n }\n });\n this.optionValueKey = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(options, '0.valueKey', 'value');\n if (autoGroupField) {\n // 如果option的属性字段中含有aimGroup,则自动将其聚合为group\n return this.optionsTryGroup(options, autoGroupField, autoGroupSort);\n }\n return options;\n },\n emitChange(valNew) {\n this.$emit(\"input\", valNew);\n },\n calcWidthPixString(defaultVal) {\n this.cc.style.width = this.cc.style.width ? _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().isString(this.cc.style.width) ? this.cc.style.width : `${this.cc.style.width}px` : defaultVal;\n return this.cc.style.width;\n },\n ccConfigMerge(initVal = {}, copyVal = []) {\n const _this = this;\n // styleDefault => styleBase => styleUser => styleOverride\n const mergeFiled = ['style'];\n this.cc.style = Object.assign(this.cc.style, this.styleBase);\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(initVal, function (val, key) {\n if (mergeFiled.includes(key)) {\n _this.cc[key] = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().merge(_this.cc[key], val);\n } else {\n _this.cc[key] = val;\n }\n });\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(copyVal, function (key) {\n const value = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(_this.fieldSchema, key);\n value && _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathSet(_this.cc, key, value);\n });\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().isPlainObject(this.cellConfig)) {\n this.cc = Object.assign(this.cc, this.cellConfig);\n }\n this.cc.style = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().assign(this.cc.style, this.styleOverride);\n this.cc.placeholder = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(this.fieldSchema, 'placeholder', this.cc.placeholder);\n this.cc.pickerOptions = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(this.fieldSchema, 'pickerOptions', this.cc.pickerOptions);\n },\n change(newVal) {\n this.$forceUpdate();\n if (this.cc.change) {\n this.cc.change(newVal);\n }\n if (this.cc['changeEx']) {\n this.cc['changeEx']({\n value: newVal,\n parent: this.data\n });\n }\n if (this.fieldSchema && this.fieldSchema.__tableCallbackOnChange) {\n this.fieldSchema.__tableCallbackOnChange({\n row: this.data\n });\n }\n },\n emitClick(jsEvent) {\n this.$emit('code-cell-click', {\n code: this.cc.code,\n jsEvent: jsEvent\n });\n },\n emitClickWithCode(jsEvent, code) {\n this.$emit('code-cell-click', {\n code: code,\n jsEvent: jsEvent\n });\n },\n emitData(options) {\n return Object.assign({\n // 这里使用实际数据\n fieldValue: _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(this.data, this.fieldName)\n }, options);\n }\n }\n});\n\n//# sourceURL=webpack://aim/./src/components/cells/mixins/MixinCellEditorConfig.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-124.use%5B0%5D!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options");
4512
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @cg-devcenter/jsb */ \"./node_modules/@cg-devcenter/jsb/index.js\");\n/* harmony import */ var _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'MixinCellEditorConfig',\n props: {\n cellConfig: {},\n // 组件配置,editor的cellConfig必须为Object,但是对viewer可以为组件需要的值\n\n data: Object,\n // 父对象数据,必须是一个Object,组件的model为data[fieldName]\n fieldName: String,\n formatter: Function,\n // 格式化化方法\n\n options: [Function, Array, Promise],\n styleOverride: Object,\n // 便于组件覆盖基础配置,如form中所有的元素设定为100% width,但是少数对象如checkbox不允许100%\n styleBase: Object,\n // 便于父对象定义基础配置,如form中所有的元素设定为100% width\n disabled: Boolean,\n // 是否只读\n\n fieldSchema: Object,\n // trigger时需要通过fieldSchema定位fields字段数据\n getRow: Function,\n tableDataGetter: Function\n },\n watch: {\n options: {\n handler: function () {\n this.fetchOptionsData();\n },\n deep: true\n }\n },\n data() {\n const _this = this;\n return {\n dataRef: {},\n cc: {\n style: {},\n change: _this.emitChange,\n clearable: true\n },\n inOptionLoading: false,\n optionsUsing: [],\n optionsRefresh: false,\n fieldSchemaRef: this.fieldSchema,\n optionValueKey: 'value'\n };\n },\n async created() {\n if (this.data) {\n this.dataRef = this.data;\n }\n await this.fetchOptionsData();\n },\n methods: {\n optionsParameter(force = false) {\n return {\n force: force,\n parent: this.dataRef,\n row: this.getRow ? this.getRow() : null,\n table: this.tableDataGetter ? this.tableDataGetter() : null\n };\n },\n async manualFetchOptionsData() {\n return this.fetchOptionsData(true);\n },\n async fetchOptionsData(force = false) {\n try {\n this.inOptionLoading = true;\n await this.__fetchOptionsData(force);\n } catch (error) {\n if (this.fieldSchemaRef) {\n this.fieldSchemaRef.errorMessage = error;\n } else {\n console.log(\"aim option fresh got error \", error);\n }\n } finally {\n this.inOptionLoading = false;\n }\n },\n async __fetchOptionsData(force = false) {\n let optionsGot = [];\n let tmpOptionsRefresh = false;\n if (typeof this.options === 'function') {\n tmpOptionsRefresh = true;\n // 如果 options 是一个函数,则调用它并等待它的返回值\n optionsGot = this.options(this.optionsParameter(force));\n if (optionsGot instanceof Promise) {\n optionsGot = await optionsGot;\n }\n } else if (this.options instanceof Promise) {\n tmpOptionsRefresh = true;\n // 如果 options 是一个 Promise,则等待 Promise 完成并赋值给 optionsInner\n optionsGot = await this.options;\n } else if (Array.isArray(this.options)) {\n tmpOptionsRefresh = false;\n // 如果 options 是一个数组,直接赋值\n optionsGot = this.options;\n }\n let autoGroupField = '';\n let autoGroupSort = '';\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().isObjectOrMap(optionsGot)) {\n tmpOptionsRefresh = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(optionsGot, 'refresh', false);\n autoGroupField = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(optionsGot, 'autoGroup', '');\n autoGroupSort = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(optionsGot, 'autoGroupSort', 'desc');\n optionsGot = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(optionsGot, 'options', []);\n }\n this.optionsUsing = [];\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(this.optionsFmt(optionsGot, autoGroupField, autoGroupSort), v => {\n this.optionsUsing.push(v);\n });\n this.optionsRefresh = tmpOptionsRefresh;\n },\n optionsTryGroup(options, field, autoGroupSort) {\n let group2Options = {};\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(options, item => {\n const groupVal = item[field] || '';\n if (!group2Options[groupVal]) {\n group2Options[groupVal] = [];\n }\n group2Options[groupVal].push(item);\n });\n let optionGroup = [];\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(group2Options, (item, key) => {\n optionGroup.push({\n label: key,\n options: item\n });\n });\n // 优先显示group\n optionGroup = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().orderBy(optionGroup, [{\n field: 'label',\n order: autoGroupSort\n }]);\n if (optionGroup.length === 1 && optionGroup[0].label === \"\") {\n return optionGroup[0].options;\n }\n return optionGroup;\n },\n optionsFmt(optionsGot, autoGroupField, autoGroupSort) {\n const options = [];\n // 将数组转换为option对象\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(optionsGot, v => {\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().isString(v) || _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().isNumber(v)) {\n options.push({\n label: v,\n value: v\n });\n } else {\n options.push(v);\n }\n });\n this.optionValueKey = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(options, '0.valueKey', 'value');\n if (autoGroupField) {\n // 如果option的属性字段中含有aimGroup,则自动将其聚合为group\n return this.optionsTryGroup(options, autoGroupField, autoGroupSort);\n }\n return options;\n },\n emitChange(valNew) {\n this.$emit(\"input\", valNew);\n },\n calcWidthPixString(defaultVal) {\n this.cc.style.width = this.cc.style.width ? _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().isString(this.cc.style.width) ? this.cc.style.width : `${this.cc.style.width}px` : defaultVal;\n return this.cc.style.width;\n },\n ccConfigMerge(initVal = {}, copyVal = []) {\n const _this = this;\n // styleDefault => styleBase => styleUser => styleOverride\n const mergeFiled = ['style'];\n this.cc.style = Object.assign(this.cc.style, this.styleBase);\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(initVal, function (val, key) {\n if (mergeFiled.includes(key)) {\n _this.cc[key] = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().merge(_this.cc[key], val);\n } else {\n _this.cc[key] = val;\n }\n });\n if (_cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().isPlainObject(this.cellConfig)) {\n this.cc = Object.assign(this.cc, this.cellConfig);\n }\n _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().each(copyVal, function (key) {\n const value = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(_this.fieldSchema, key);\n value && _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathSet(_this.cc, key, value);\n });\n this.cc.style = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().assign(this.cc.style, this.styleOverride);\n this.cc.placeholder = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(this.fieldSchema, 'placeholder', this.cc.placeholder);\n this.cc.pickerOptions = _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(this.fieldSchema, 'pickerOptions', this.cc.pickerOptions);\n },\n change(newVal) {\n this.$forceUpdate();\n if (this.cc.change) {\n this.cc.change(newVal);\n }\n if (this.cc['changeEx']) {\n this.cc['changeEx']({\n value: newVal,\n parent: this.data\n });\n }\n if (this.fieldSchema && this.fieldSchema.__tableCallbackOnChange) {\n this.fieldSchema.__tableCallbackOnChange({\n row: this.data\n });\n }\n },\n emitClick(jsEvent) {\n this.$emit('code-cell-click', {\n code: this.cc.code,\n jsEvent: jsEvent\n });\n },\n emitClickWithCode(jsEvent, code) {\n this.$emit('code-cell-click', {\n code: code,\n jsEvent: jsEvent\n });\n },\n emitData(options) {\n return Object.assign({\n // 这里使用实际数据\n fieldValue: _cg_devcenter_jsb__WEBPACK_IMPORTED_MODULE_1___default().pathGet(this.data, this.fieldName)\n }, options);\n }\n }\n});\n\n//# sourceURL=webpack://aim/./src/components/cells/mixins/MixinCellEditorConfig.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-124.use%5B0%5D!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options");
4513
4513
 
4514
4514
  /***/ }),
4515
4515
 
@@ -4872,7 +4872,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
4872
4872
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
4873
4873
 
4874
4874
  "use strict";
4875
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ render: function() { return /* binding */ render; },\n/* harmony export */ staticRenderFns: function() { return /* binding */ staticRenderFns; }\n/* harmony export */ });\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n return _c(\"cell-input\", {\n attrs: {\n data: _vm.data,\n \"field-name\": _vm.fieldName,\n options: _vm.options,\n \"cell-config\": _vm.cellConfig,\n \"style-base\": _vm.styleBase,\n \"style-override\": _vm.styleOverride,\n disabled: _vm.disabled\n }\n });\n};\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://aim/./src/components/cells/CellInputTextArea.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-124.use%5B0%5D!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet%5B1%5D.rules%5B3%5D!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options");
4875
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ render: function() { return /* binding */ render; },\n/* harmony export */ staticRenderFns: function() { return /* binding */ staticRenderFns; }\n/* harmony export */ });\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n return _c(\"cell-input\", {\n attrs: {\n data: _vm.data,\n \"field-name\": _vm.fieldName,\n options: _vm.options,\n \"cell-config\": _vm.cellConfig,\n \"style-base\": _vm.styleBase,\n \"style-override\": _vm.styleOverride,\n \"field-schema\": _vm.fieldSchema,\n disabled: _vm.disabled\n }\n });\n};\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://aim/./src/components/cells/CellInputTextArea.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-124.use%5B0%5D!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet%5B1%5D.rules%5B3%5D!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options");
4876
4876
 
4877
4877
  /***/ }),
4878
4878
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cg-devcenter/aim",
3
3
  "license": "MIT",
4
- "version": "0.1.915",
4
+ "version": "0.1.917",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
7
7
  "build": "vue-cli-service build",
@@ -488,9 +488,9 @@ export default {
488
488
  })
489
489
  },
490
490
  // __validatePrivate 外部不要直接调用
491
- __validatePrivate(validCallback,notValidCallback=()=>{},onValidCallbackRunError=(e)=>{jsb.cc.toastWarning(e)},processor=(v)=>{return v}) {
491
+ __validatePrivate(validCallback,notValidCallback,onValidCallbackRunError=(e)=>{jsb.cc.toastWarning(e)},processor=(v)=>{return v}) {
492
492
  const _this = this
493
- this.$refs['form'].validate((valid) => {
493
+ this.$refs['form'].validate((valid,invalidFields) => {
494
494
  if (valid) {
495
495
  try {
496
496
  const tmp = processor(_this.dataRef)
@@ -501,7 +501,17 @@ export default {
501
501
  }
502
502
  }
503
503
  }else{
504
- notValidCallback && notValidCallback()
504
+ notValidCallback ? notValidCallback() :
505
+ Object.values(invalidFields).forEach(errors => {
506
+ if (Array.isArray(errors)) {
507
+ errors.forEach(error => {
508
+ const {message} = error
509
+ if (message) {
510
+ jsb.cc.toastWarning(message)
511
+ }
512
+ })
513
+ }
514
+ })
505
515
  }
506
516
  })
507
517
  },
@@ -567,4 +577,4 @@ export default {
567
577
  height: var(--form-container-height) !important;
568
578
  overflow: auto;
569
579
  }
570
- </style>
580
+ </style>
@@ -55,7 +55,7 @@ export default {
55
55
  asImage:Boolean,
56
56
  },
57
57
  created() {
58
- this.ccConfigMerge()
58
+ this.ccConfigMerge({},["autosize"])
59
59
  },
60
60
  methods:{
61
61
  divClass(){
@@ -85,4 +85,4 @@ export default {
85
85
  .cell-input-with-width >>> .el-input {
86
86
  width: var(--input-width) !important;
87
87
  }
88
- </style>
88
+ </style>
@@ -6,6 +6,7 @@
6
6
  :cell-config="cellConfig"
7
7
  :style-base="styleBase"
8
8
  :style-override="styleOverride"
9
+ :field-schema="fieldSchema"
9
10
  :disabled="disabled"/>
10
11
  </template>
11
12
 
@@ -27,4 +28,4 @@ export default {
27
28
  }
28
29
  }
29
30
  }
30
- </script>
31
+ </script>
@@ -162,13 +162,13 @@ export default {
162
162
  _this.cc[key] = val
163
163
  }
164
164
  })
165
+ if (jsb.isPlainObject(this.cellConfig)) {
166
+ this.cc = Object.assign(this.cc, this.cellConfig)
167
+ }
165
168
  jsb.each(copyVal, function (key) {
166
169
  const value = jsb.pathGet(_this.fieldSchema, key)
167
170
  value && jsb.pathSet(_this.cc, key, value)
168
171
  })
169
- if (jsb.isPlainObject(this.cellConfig)) {
170
- this.cc = Object.assign(this.cc, this.cellConfig)
171
- }
172
172
  this.cc.style = jsb.assign(this.cc.style, this.styleOverride)
173
173
  this.cc.placeholder = jsb.pathGet(this.fieldSchema,'placeholder',this.cc.placeholder )
174
174
  this.cc.pickerOptions = jsb.pathGet(this.fieldSchema,'pickerOptions',this.cc.pickerOptions )