@cg-devcenter/aim 0.1.915 → 0.1.916
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.
- package/dist/aim.common.js +4 -4
- package/dist/aim.css +59 -59
- package/dist/aim.umd.js +4 -4
- package/dist/aim.umd.min.js +4 -4
- package/package.json +1 -1
- package/src/components/AimFormInput/index.vue +14 -4
- package/src/components/cells/CellInput.vue +2 -2
- package/src/components/cells/CellInputTextArea.vue +2 -1
- package/src/components/cells/mixins/MixinCellEditorConfig.vue +3 -3
package/dist/aim.common.js
CHANGED
|
@@ -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
|
|
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.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!****************************************************************************************************************************************************************************************!*\
|
|
2
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
2
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-98.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-98.use[2]!./node_modules/@cg-devcenter/jsb/toast.css ***!
|
|
3
3
|
\****************************************************************************************************************************************************************************************/
|
|
4
4
|
div[class^="toast-wrapper"] {
|
|
5
5
|
position: absolute;
|
|
@@ -60,7 +60,7 @@ div[class^="toast-wrapper"] {
|
|
|
60
60
|
left: 0px;
|
|
61
61
|
}
|
|
62
62
|
/*!******************************************************************************************************************************************************************************************!*\
|
|
63
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
63
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-98.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-98.use[2]!./node_modules/codemirror/lib/codemirror.css ***!
|
|
64
64
|
\******************************************************************************************************************************************************************************************/
|
|
65
65
|
/* BASICS */
|
|
66
66
|
|
|
@@ -398,7 +398,7 @@ div.CodeMirror-dragcursors {
|
|
|
398
398
|
span.CodeMirror-selectedtext { background: none; }
|
|
399
399
|
|
|
400
400
|
/*!*****************************************************************************************************************************************************************************************************!*\
|
|
401
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
401
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-98.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-98.use[2]!./node_modules/vue-loading-overlay/dist/vue-loading.css ***!
|
|
402
402
|
\*****************************************************************************************************************************************************************************************************/
|
|
403
403
|
.vld-shown {
|
|
404
404
|
overflow: hidden;
|
|
@@ -442,7 +442,7 @@ span.CodeMirror-selectedtext { background: none; }
|
|
|
442
442
|
|
|
443
443
|
|
|
444
444
|
/*!**************************************************************************************************************************************************************************************!*\
|
|
445
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
445
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-98.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-98.use[2]!./node_modules/codemirror/theme/idea.css ***!
|
|
446
446
|
\**************************************************************************************************************************************************************************************/
|
|
447
447
|
/**
|
|
448
448
|
Name: IDEA default theme
|
|
@@ -487,7 +487,7 @@ span.CodeMirror-selectedtext { background: none; }
|
|
|
487
487
|
color: #5c6065 !important;
|
|
488
488
|
}
|
|
489
489
|
/*!*********************************************************************************************************************************************************************************************!*\
|
|
490
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
490
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-98.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-98.use[2]!./node_modules/codemirror/theme/base16-dark.css ***!
|
|
491
491
|
\*********************************************************************************************************************************************************************************************/
|
|
492
492
|
/*
|
|
493
493
|
|
|
@@ -532,7 +532,7 @@ span.CodeMirror-selectedtext { background: none; }
|
|
|
532
532
|
.cm-s-base16-dark .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; }
|
|
533
533
|
|
|
534
534
|
/*!*****************************************************************************************************************************************************************************************!*\
|
|
535
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
535
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-98.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-98.use[2]!./node_modules/codemirror/theme/monokai.css ***!
|
|
536
536
|
\*****************************************************************************************************************************************************************************************/
|
|
537
537
|
/* Based on Sublime Text's Monokai theme */
|
|
538
538
|
|
|
@@ -578,7 +578,7 @@ span.CodeMirror-selectedtext { background: none; }
|
|
|
578
578
|
}
|
|
579
579
|
|
|
580
580
|
/*!*************************************************************************************************************************************************************************************!*\
|
|
581
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
581
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-98.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-98.use[2]!./node_modules/codemirror/theme/mbo.css ***!
|
|
582
582
|
\*************************************************************************************************************************************************************************************/
|
|
583
583
|
/****************************************************************/
|
|
584
584
|
/* Based on mbonaci's Brackets mbo theme */
|
|
@@ -620,7 +620,7 @@ span.CodeMirror-selectedtext { background: none; }
|
|
|
620
620
|
.cm-s-mbo .CodeMirror-matchingtag { background: rgba(255, 255, 255, .37); }
|
|
621
621
|
|
|
622
622
|
/*!******************************************************************************************************************************************************************************************!*\
|
|
623
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
623
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-98.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-98.use[2]!./node_modules/codemirror/theme/rubyblue.css ***!
|
|
624
624
|
\******************************************************************************************************************************************************************************************/
|
|
625
625
|
.cm-s-rubyblue.CodeMirror { background: #112435; color: white; }
|
|
626
626
|
.cm-s-rubyblue div.CodeMirror-selected { background: #38566F; }
|
|
@@ -650,7 +650,7 @@ span.CodeMirror-selectedtext { background: none; }
|
|
|
650
650
|
.cm-s-rubyblue .CodeMirror-activeline-background { background: #173047; }
|
|
651
651
|
|
|
652
652
|
/*!***********************************************************************************************************************************************************************************************!*\
|
|
653
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
653
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-98.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-98.use[2]!./node_modules/codemirror/addon/dialog/dialog.css ***!
|
|
654
654
|
\***********************************************************************************************************************************************************************************************/
|
|
655
655
|
.CodeMirror-dialog {
|
|
656
656
|
position: absolute;
|
|
@@ -686,7 +686,7 @@ span.CodeMirror-selectedtext { background: none; }
|
|
|
686
686
|
}
|
|
687
687
|
|
|
688
688
|
/*!****************************************************************************************************************************************************************************************************!*\
|
|
689
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
689
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-98.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-98.use[2]!./node_modules/codemirror/addon/display/fullscreen.css ***!
|
|
690
690
|
\****************************************************************************************************************************************************************************************************/
|
|
691
691
|
.CodeMirror-fullscreen {
|
|
692
692
|
position: fixed;
|
|
@@ -696,7 +696,7 @@ span.CodeMirror-selectedtext { background: none; }
|
|
|
696
696
|
}
|
|
697
697
|
|
|
698
698
|
/*!*************************************************************************************************************************************************************************************************!*\
|
|
699
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
699
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-98.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-98.use[2]!./node_modules/codemirror/addon/fold/foldgutter.css ***!
|
|
700
700
|
\*************************************************************************************************************************************************************************************************/
|
|
701
701
|
.CodeMirror-foldmarker {
|
|
702
702
|
color: blue;
|
|
@@ -720,7 +720,7 @@ span.CodeMirror-selectedtext { background: none; }
|
|
|
720
720
|
}
|
|
721
721
|
|
|
722
722
|
/*!************************************************************************************************************************************************************************************************!*\
|
|
723
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
723
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-98.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-98.use[2]!./node_modules/codemirror/addon/hint/show-hint.css ***!
|
|
724
724
|
\************************************************************************************************************************************************************************************************/
|
|
725
725
|
.CodeMirror-hints {
|
|
726
726
|
position: absolute;
|
|
@@ -758,7 +758,7 @@ li.CodeMirror-hint-active {
|
|
|
758
758
|
}
|
|
759
759
|
|
|
760
760
|
/*!*******************************************************************************************************************************************************************************************!*\
|
|
761
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
761
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-98.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-98.use[2]!./node_modules/codemirror/addon/lint/lint.css ***!
|
|
762
762
|
\*******************************************************************************************************************************************************************************************/
|
|
763
763
|
/* The lint marker gutter */
|
|
764
764
|
.CodeMirror-lint-markers {
|
|
@@ -841,7 +841,7 @@ li.CodeMirror-hint-active {
|
|
|
841
841
|
}
|
|
842
842
|
|
|
843
843
|
/*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
844
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
844
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-96.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-96.use[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/AimPopup/index.vue?vue&type=style&index=0&id=94998f4c&scoped=true&lang=css ***!
|
|
845
845
|
\*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
846
846
|
|
|
847
847
|
.aim-popup[data-v-94998f4c] .aim-drawer-footer {
|
|
@@ -916,7 +916,7 @@ li.CodeMirror-hint-active {
|
|
|
916
916
|
|
|
917
917
|
|
|
918
918
|
/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
919
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
919
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-96.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-96.use[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/AimFullScreenDialog/index.vue?vue&type=style&index=0&id=f30f622a&lang=css ***!
|
|
920
920
|
\******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
921
921
|
|
|
922
922
|
.hidden {
|
|
@@ -942,9 +942,9 @@ li.CodeMirror-hint-active {
|
|
|
942
942
|
}
|
|
943
943
|
|
|
944
944
|
|
|
945
|
-
|
|
946
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
947
|
-
|
|
945
|
+
/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
946
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-106.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-106.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-106.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/AimCodeMirror/index.vue?vue&type=style&index=0&id=3cf33718&lang=scss&scoped=true ***!
|
|
947
|
+
\********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
948
948
|
.codemirror-wrapper[data-v-3cf33718] .CodeMirror {
|
|
949
949
|
font-size: var(--font-size) !important;
|
|
950
950
|
line-height: var(--line-height) !important;
|
|
@@ -965,7 +965,7 @@ li.CodeMirror-hint-active {
|
|
|
965
965
|
border-radius: 3px;
|
|
966
966
|
}
|
|
967
967
|
/*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
968
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
968
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-96.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-96.use[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/cells/CellDropdown.vue?vue&type=style&index=0&id=e0d9597e&scoped=true&lang=css ***!
|
|
969
969
|
\***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
970
970
|
|
|
971
971
|
.aim-dropdown-menu[data-v-e0d9597e] {
|
|
@@ -982,18 +982,18 @@ li.CodeMirror-hint-active {
|
|
|
982
982
|
}
|
|
983
983
|
}
|
|
984
984
|
|
|
985
|
-
|
|
986
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
987
|
-
|
|
985
|
+
/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
986
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-106.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-106.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-106.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/AimTinymce/components/EditorImage.vue?vue&type=style&index=0&id=dbb8090c&lang=scss&scoped=true ***!
|
|
987
|
+
\**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
988
988
|
.editor-slide-upload[data-v-dbb8090c] {
|
|
989
989
|
margin-bottom: 20px;
|
|
990
990
|
}
|
|
991
991
|
.editor-slide-upload[data-v-dbb8090c] .el-upload--picture-card {
|
|
992
992
|
width: 100%;
|
|
993
993
|
}
|
|
994
|
-
|
|
995
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
996
|
-
|
|
994
|
+
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
995
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-106.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-106.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-106.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/AimTinymce/index.vue?vue&type=style&index=0&id=04763c86&lang=scss&scoped=true ***!
|
|
996
|
+
\*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
997
997
|
.tinymce-container[data-v-04763c86] {
|
|
998
998
|
position: relative;
|
|
999
999
|
line-height: normal;
|
|
@@ -1019,7 +1019,7 @@ li.CodeMirror-hint-active {
|
|
|
1019
1019
|
display: inline-block;
|
|
1020
1020
|
}
|
|
1021
1021
|
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
1022
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
1022
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-96.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-96.use[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/AimSvgIcon/index.vue?vue&type=style&index=0&id=cba54aaa&scoped=true&lang=css ***!
|
|
1023
1023
|
\*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
1024
1024
|
|
|
1025
1025
|
.svg-icon[data-v-cba54aaa] {
|
|
@@ -1037,7 +1037,7 @@ li.CodeMirror-hint-active {
|
|
|
1037
1037
|
}
|
|
1038
1038
|
|
|
1039
1039
|
/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
1040
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
1040
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-96.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-96.use[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/AimIconSelector/index.vue?vue&type=style&index=0&id=1e8fccc0&scoped=true&lang=css ***!
|
|
1041
1041
|
\**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
1042
1042
|
|
|
1043
1043
|
.icon-body[data-v-1e8fccc0] {
|
|
@@ -1070,11 +1070,11 @@ div[data-v-1e8fccc0] {
|
|
|
1070
1070
|
}
|
|
1071
1071
|
|
|
1072
1072
|
/*!*******************************************************************************************************************************************************************************************************!*\
|
|
1073
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
1073
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-98.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-98.use[2]!./node_modules/vue-select-image/dist/vue-select-image.css ***!
|
|
1074
1074
|
\*******************************************************************************************************************************************************************************************************/
|
|
1075
1075
|
.vue-select-image__wrapper{overflow:auto;list-style-image:none;list-style-position:outside;list-style-type:none;padding:0;margin:0}.vue-select-image__item{margin:0 12px 12px 0;float:left}.vue-select-image__thumbnail{cursor:pointer;padding:6px;display:block;padding:4px;line-height:20px;border:1px solid #ddd;border-radius:4px;box-shadow:0 1px 3px rgba(0,0,0,.055);transition:all .2s ease-in-out}.vue-select-image__thumbnail--selected{background:#08c}.vue-select-image__thumbnail--disabled{background:#b9b9b9;cursor:not-allowed}.vue-select-image__thumbnail--disabled>.vue-select-image__img{opacity:.5}.vue-select-image__img{-webkit-user-drag:none;display:block;max-width:100%;margin-right:auto;margin-left:auto}.vue-select-image__lbl{line-height:3}@media only screen and (min-width:1200px){.vue-select-image__item{margin-left:30px}}
|
|
1076
1076
|
/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
1077
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
1077
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-96.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-96.use[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/cells/CellInput.vue?vue&type=style&index=0&id=0a03c16c&scoped=true&lang=css ***!
|
|
1078
1078
|
\********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
1079
1079
|
|
|
1080
1080
|
.cell-input-with-width[data-v-0a03c16c] .el-input {
|
|
@@ -1082,7 +1082,7 @@ div[data-v-1e8fccc0] {
|
|
|
1082
1082
|
}
|
|
1083
1083
|
|
|
1084
1084
|
/*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
1085
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
1085
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-96.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-96.use[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/cells/CellPassword.vue?vue&type=style&index=0&id=434b74cb&scoped=true&lang=css ***!
|
|
1086
1086
|
\***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
1087
1087
|
|
|
1088
1088
|
.cell-input-with-width[data-v-434b74cb] .el-input {
|
|
@@ -1090,7 +1090,7 @@ div[data-v-1e8fccc0] {
|
|
|
1090
1090
|
}
|
|
1091
1091
|
|
|
1092
1092
|
/*!***************************************************************************************************************************************************************************************************!*\
|
|
1093
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
1093
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-98.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-98.use[2]!./node_modules/vue-slider-component/theme/default.css ***!
|
|
1094
1094
|
\***************************************************************************************************************************************************************************************************/
|
|
1095
1095
|
/* component style */
|
|
1096
1096
|
.vue-slider-disabled {
|
|
@@ -1215,9 +1215,9 @@ div[data-v-1e8fccc0] {
|
|
|
1215
1215
|
opacity: 1;
|
|
1216
1216
|
}
|
|
1217
1217
|
|
|
1218
|
-
|
|
1219
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
1220
|
-
|
|
1218
|
+
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
1219
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-106.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-106.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-106.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/AimSliderInput/index.vue?vue&type=style&index=0&id=4a5b4ed2&lang=scss ***!
|
|
1220
|
+
\*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
1221
1221
|
.___slider-input {
|
|
1222
1222
|
display: flex;
|
|
1223
1223
|
align-items: center;
|
|
@@ -1261,7 +1261,7 @@ div[data-v-1e8fccc0] {
|
|
|
1261
1261
|
background-color: #3498db;
|
|
1262
1262
|
}
|
|
1263
1263
|
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
1264
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
1264
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-96.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-96.use[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/AimTable/Column/ColumnHeader.vue?vue&type=style&index=0&id=a4b24974&lang=css ***!
|
|
1265
1265
|
\*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
1266
1266
|
|
|
1267
1267
|
.aim-required-icon {
|
|
@@ -1301,16 +1301,16 @@ div[data-v-1e8fccc0] {
|
|
|
1301
1301
|
}
|
|
1302
1302
|
|
|
1303
1303
|
|
|
1304
|
-
|
|
1305
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
1306
|
-
|
|
1304
|
+
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
1305
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-106.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-106.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-106.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/AimFormInput/AimFormItem.vue?vue&type=style&index=0&id=e967a004&lang=scss ***!
|
|
1306
|
+
\*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
1307
1307
|
.aim-form-input-component-flex-end {
|
|
1308
1308
|
display: flex;
|
|
1309
1309
|
z-index: 10;
|
|
1310
1310
|
justify-content: flex-end;
|
|
1311
1311
|
}
|
|
1312
1312
|
/*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
1313
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
1313
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-96.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-96.use[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/AimFormInput/index.vue?vue&type=style&index=0&id=27bb5b14&lang=css ***!
|
|
1314
1314
|
\***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
1315
1315
|
|
|
1316
1316
|
.aim-component-flex-start {
|
|
@@ -1326,16 +1326,16 @@ div[data-v-1e8fccc0] {
|
|
|
1326
1326
|
|
|
1327
1327
|
|
|
1328
1328
|
|
|
1329
|
-
|
|
1330
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
1331
|
-
|
|
1329
|
+
/*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
1330
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-106.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-106.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-106.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/AimFormInput/index.vue?vue&type=style&index=1&id=27bb5b14&lang=scss&scoped=true ***!
|
|
1331
|
+
\*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
1332
1332
|
.aim-form-container[data-v-27bb5b14] {
|
|
1333
1333
|
height: var(--form-container-height) !important;
|
|
1334
1334
|
overflow: auto;
|
|
1335
1335
|
}
|
|
1336
|
-
|
|
1337
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
1338
|
-
|
|
1336
|
+
/*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
1337
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-106.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-106.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-106.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/AimTable/AimTableSetting/index.vue?vue&type=style&index=0&id=56843954&lang=scss&scoped=true ***!
|
|
1338
|
+
\*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
1339
1339
|
.aim-table-setting-tabs.el-tabs[data-v-56843954] .el-tabs--card {
|
|
1340
1340
|
height: calc(100vh - 160px);
|
|
1341
1341
|
}
|
|
@@ -1344,13 +1344,13 @@ div[data-v-1e8fccc0] {
|
|
|
1344
1344
|
overflow-y: auto;
|
|
1345
1345
|
}
|
|
1346
1346
|
/*!*******************************************************************************************************************************************************************************************!*\
|
|
1347
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
1347
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-98.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-98.use[2]!./node_modules/splitpanes/dist/splitpanes.css ***!
|
|
1348
1348
|
\*******************************************************************************************************************************************************************************************/
|
|
1349
1349
|
.splitpanes{display:flex;width:100%;height:100%}.splitpanes--vertical{flex-direction:row}.splitpanes--horizontal{flex-direction:column}.splitpanes--dragging *{-webkit-user-select:none;-moz-user-select:none;user-select:none}.splitpanes__pane{width:100%;height:100%;overflow:hidden}.splitpanes--vertical .splitpanes__pane{transition:width .2s ease-out}.splitpanes--horizontal .splitpanes__pane{transition:height .2s ease-out}.splitpanes--dragging .splitpanes__pane{transition:none}.splitpanes__splitter{touch-action:none}.splitpanes--vertical>.splitpanes__splitter{min-width:1px;cursor:col-resize}.splitpanes--horizontal>.splitpanes__splitter{min-height:1px;cursor:row-resize}.splitpanes.default-theme .splitpanes__pane{background-color:#f2f2f2}.splitpanes.default-theme .splitpanes__splitter{background-color:#fff;box-sizing:border-box;position:relative;flex-shrink:0}.splitpanes.default-theme .splitpanes__splitter:before,.splitpanes.default-theme .splitpanes__splitter:after{content:"";position:absolute;top:50%;left:50%;background-color:#00000026;transition:background-color .3s}.splitpanes.default-theme .splitpanes__splitter:hover:before,.splitpanes.default-theme .splitpanes__splitter:hover:after{background-color:#00000040}.splitpanes.default-theme .splitpanes__splitter:first-child{cursor:auto}.default-theme.splitpanes .splitpanes .splitpanes__splitter{z-index:1}.default-theme.splitpanes--vertical>.splitpanes__splitter,.default-theme .splitpanes--vertical>.splitpanes__splitter{width:7px;border-left:1px solid #eee;margin-left:-1px}.default-theme.splitpanes--vertical>.splitpanes__splitter:before,.default-theme.splitpanes--vertical>.splitpanes__splitter:after,.default-theme .splitpanes--vertical>.splitpanes__splitter:before,.default-theme .splitpanes--vertical>.splitpanes__splitter:after{transform:translateY(-50%);width:1px;height:30px}.default-theme.splitpanes--vertical>.splitpanes__splitter:before,.default-theme .splitpanes--vertical>.splitpanes__splitter:before{margin-left:-2px}.default-theme.splitpanes--vertical>.splitpanes__splitter:after,.default-theme .splitpanes--vertical>.splitpanes__splitter:after{margin-left:1px}.default-theme.splitpanes--horizontal>.splitpanes__splitter,.default-theme .splitpanes--horizontal>.splitpanes__splitter{height:7px;border-top:1px solid #eee;margin-top:-1px}.default-theme.splitpanes--horizontal>.splitpanes__splitter:before,.default-theme.splitpanes--horizontal>.splitpanes__splitter:after,.default-theme .splitpanes--horizontal>.splitpanes__splitter:before,.default-theme .splitpanes--horizontal>.splitpanes__splitter:after{transform:translate(-50%);width:30px;height:1px}.default-theme.splitpanes--horizontal>.splitpanes__splitter:before,.default-theme .splitpanes--horizontal>.splitpanes__splitter:before{margin-top:-2px}.default-theme.splitpanes--horizontal>.splitpanes__splitter:after,.default-theme .splitpanes--horizontal>.splitpanes__splitter:after{margin-top:1px}
|
|
1350
1350
|
|
|
1351
|
-
|
|
1352
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
1353
|
-
|
|
1351
|
+
/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
1352
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-106.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-106.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-106.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/AimTreeView/index.vue?vue&type=style&index=0&id=4974164b&lang=scss ***!
|
|
1353
|
+
\******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
1354
1354
|
.container-for-height {
|
|
1355
1355
|
height: calc(100vh - 120px);
|
|
1356
1356
|
overflow: auto;
|
|
@@ -1360,7 +1360,7 @@ div[data-v-1e8fccc0] {
|
|
|
1360
1360
|
border-bottom: 1px solid gray;
|
|
1361
1361
|
}
|
|
1362
1362
|
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
1363
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
1363
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-96.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-96.use[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/AimCodeDiffWrapper/index.vue?vue&type=style&index=0&id=b3c73b62&scoped=true&lang=css ***!
|
|
1364
1364
|
\*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
1365
1365
|
|
|
1366
1366
|
.toolbars-container-flex-end[data-v-b3c73b62]{
|
|
@@ -1373,9 +1373,9 @@ div[data-v-1e8fccc0] {
|
|
|
1373
1373
|
z-index: 10;
|
|
1374
1374
|
}
|
|
1375
1375
|
|
|
1376
|
-
|
|
1377
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
1378
|
-
|
|
1376
|
+
/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
1377
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-106.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-106.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-106.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/AimTable/index.vue?vue&type=style&index=0&id=0cc300fc&lang=scss ***!
|
|
1378
|
+
\***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
1379
1379
|
.aim-table-shortcuts-button {
|
|
1380
1380
|
position: sticky;
|
|
1381
1381
|
top: 0;
|
|
@@ -1430,9 +1430,9 @@ div[data-v-1e8fccc0] {
|
|
|
1430
1430
|
.el-table .aim-danger-row {
|
|
1431
1431
|
background: #fbe5e1;
|
|
1432
1432
|
}
|
|
1433
|
-
|
|
1434
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
1435
|
-
|
|
1433
|
+
/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
1434
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-106.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-106.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-106.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/AimTable/index.vue?vue&type=style&index=1&id=0cc300fc&lang=scss&scoped=true ***!
|
|
1435
|
+
\***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
1436
1436
|
[data-v-0cc300fc] .aim-table-tree .el-icon-arrow-right:before {
|
|
1437
1437
|
content: "+";
|
|
1438
1438
|
color: #1890ff;
|
|
@@ -1469,9 +1469,9 @@ div[data-v-1e8fccc0] {
|
|
|
1469
1469
|
[data-v-0cc300fc] .aim-table-tree-line .el-table__row:is([class*=el-table__row--level-5]) td:first-child {
|
|
1470
1470
|
background: repeating-linear-gradient(#999 0 1px, transparent 0px 2px) 20px 0px/1px 100% no-repeat, repeating-linear-gradient(#999 0 1px, transparent 0px 2px) 37px 0px/1px 100% no-repeat, repeating-linear-gradient(#999 0 1px, transparent 0px 2px) 53px 0px/1px 100% no-repeat, repeating-linear-gradient(#999 0 1px, transparent 0px 2px) 68px 0px/1px 100% no-repeat, repeating-linear-gradient(#999 0 1px, transparent 0px 2px) 83px 0px/1px 100% no-repeat !important;
|
|
1471
1471
|
}
|
|
1472
|
-
|
|
1473
|
-
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-
|
|
1474
|
-
|
|
1472
|
+
/*!***************************************************************************************************************************************************************************************************************************************************************!*\
|
|
1473
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-108.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-108.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-108.use[3]!./src/components/AimElementTreeLine/style.scss ***!
|
|
1474
|
+
\***************************************************************************************************************************************************************************************************************************************************************/
|
|
1475
1475
|
.el-tree .el-tree-node__content {
|
|
1476
1476
|
position: relative;
|
|
1477
1477
|
}
|
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
|
|
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
|
|
package/dist/aim.umd.min.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-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
|
|
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
|
@@ -488,9 +488,9 @@ export default {
|
|
|
488
488
|
})
|
|
489
489
|
},
|
|
490
490
|
// __validatePrivate 外部不要直接调用
|
|
491
|
-
__validatePrivate(validCallback,notValidCallback
|
|
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
|
|
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>
|
|
@@ -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 )
|