@zscreate/form-component 1.0.14 → 1.0.15

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.
@@ -2411,7 +2411,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */
2411
2411
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2412
2412
 
2413
2413
  "use strict";
2414
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_web_dom_exception_stack_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/web.dom-exception.stack.js */ \"./node_modules/_core-js@3.27.1@core-js/modules/web.dom-exception.stack.js\");\n/* harmony import */ var core_js_modules_web_dom_exception_stack_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_exception_stack_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _form_modules_widgetList__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/form/modules/widgetList */ \"./src/form/modules/widgetList.vue\");\n/* harmony import */ var _form_modules_widgetForm__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/form/modules/widgetForm */ \"./src/form/modules/widgetForm.vue\");\n/* harmony import */ var _form_modules_widgetConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/form/modules/widgetConfig */ \"./src/form/modules/widgetConfig.vue\");\n/* harmony import */ var _components_CusDialog_CusDialog__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/components/CusDialog/CusDialog */ \"./src/components/CusDialog/CusDialog.vue\");\n/* harmony import */ var _form_modules_layout_layoutForPaper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/form/modules/layout/layoutForPaper */ \"./src/form/modules/layout/layoutForPaper.vue\");\n/* harmony import */ var _form_modules_formConfig__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/form/modules/formConfig */ \"./src/form/modules/formConfig.vue\");\n/* harmony import */ var _form_modules_pageFooterAndHeader__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/form/modules/pageFooterAndHeader */ \"./src/form/modules/pageFooterAndHeader.vue\");\n/* harmony import */ var _util_util__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../util/util */ \"./src/form/util/util.js\");\n/* harmony import */ var vue_codemirror__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! vue-codemirror */ \"./node_modules/_vue-codemirror@4.0.6@vue-codemirror/dist/vue-codemirror.js\");\n/* harmony import */ var vue_codemirror__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(vue_codemirror__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var clipboard__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! clipboard */ \"./node_modules/_clipboard@2.0.4@clipboard/dist/clipboard.js\");\n/* harmony import */ var clipboard__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(clipboard__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _api_onLineForm__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @/api/onLineForm */ \"./src/api/onLineForm.js\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! vue */ \"vue\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _util_Bus__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../util/Bus */ \"./src/form/util/Bus.js\");\n\n //控件库\n //设计form\n\n //JSON预览\n\n\n\n\n/* 加载代码 */\n\n\n\n__webpack_require__(/*! codemirror/mode/javascript/javascript.js */ \"./node_modules/_codemirror@5.46.0@codemirror/mode/javascript/javascript.js\");\n\n //导入bus\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"Container\",\n data() {\n return {\n clearable: true,\n //可以清空\n jsonVisible: false,\n previewVisible: false,\n //预览\n configTab: \"widget\",\n widgetFormSelect: null,\n formOnlineRelId: \"\",\n isView: false,\n //是否是预览模式\n canCopy: false,\n isPreviewDesktop: true,\n previewMobileUrl: vue__WEBPACK_IMPORTED_MODULE_12___default().prototype.getPreviewMobileUrl(),\n widgetForm: {\n list: [],\n config: {\n // canAgainSearch: \"\",\n labelPosition: \"right\",\n labelWidth: 100,\n formLayout: \"horizontal\",\n layout: \"vertical\",\n fontSize: 14,\n formPageWidth: '1123',\n size: \"small\",\n header: \"\",\n footer: \"\",\n headerHeight: 0,\n footerHeight: 0,\n multiplePages: true,\n paddingNum: 20,\n //边距\n align: \"align-between\",\n border: true,\n componentsNoBorder: false,\n borderColor: \"#333333\",\n mode: \"web\",\n //web --网页模式 paper --z\n formName: \"表单设计\",\n pageHeader: \"\",\n pageFooter: \"\",\n color: \"#000\",\n bgc: \"transparent\"\n }\n },\n refreshWidgetConfig: false,\n widgetModels: {},\n options: {\n height: \"850\",\n mode: {\n name: \"javascript\",\n json: true\n },\n lineNumbers: true\n },\n jsonTemplate: \"\",\n jsonCopyValue: \"\"\n };\n },\n components: {\n widgetList: _form_modules_widgetList__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n widgetForm: _form_modules_widgetForm__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n widgetConfig: _form_modules_widgetConfig__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n layoutForPaper: _form_modules_layout_layoutForPaper__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n formConfig: _form_modules_formConfig__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n CusDialog: _components_CusDialog_CusDialog__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n codemirror: vue_codemirror__WEBPACK_IMPORTED_MODULE_9__.codemirror,\n pageFooterAndHeader: _form_modules_pageFooterAndHeader__WEBPACK_IMPORTED_MODULE_7__[\"default\"]\n },\n watch: {\n widgetFormSelect() {\n // 切换选择时可能组件配置的状态无法更新,所以需要通过v-if重新加载一次挂载组件\n this.refreshWidgetConfig = true;\n this.$nextTick(() => {\n this.refreshWidgetConfig = false;\n });\n }\n },\n created() {\n this.BusOrgin();\n this.getDataByParams();\n },\n methods: {\n previewMobileOnload() {\n this.$nextTick(() => {\n this.$refs.previewIframe.contentWindow.postMessage({\n type: 'formConfig',\n data: this.widgetForm\n });\n });\n },\n btoa(str) {\n return window.btoa(encodeURIComponent(str));\n },\n async getDataByParams() {\n let record = this.$route.query;\n if (record) {\n this.formOnlineRelId = record.id;\n (0,_api_onLineForm__WEBPACK_IMPORTED_MODULE_11__.getFormTableColumnsData)({\n tableId: record.onlineTableName,\n id: record.id\n }).then(res => {\n if (!res.result) return;\n this.toolsData = res.result;\n /* 重组数据 */\n this.toolsData.map((item, index) => {\n item.options.showLabel = true;\n item.options.inline = true;\n });\n // console.log(this.toolsData);\n });\n\n this.formOnlineRelId = record.id;\n let isData = await (0,_api_onLineForm__WEBPACK_IMPORTED_MODULE_11__.getFormDesigerData)({\n formOnlineRelId: this.formOnlineRelId\n });\n if (isData) {\n // if (!isData.result.config.align) {\n // isData.result.config = this.widgetForm.config;\n // }\n this.setJSON(isData.result, record);\n }\n }\n },\n setJSON(json, record) {\n if (json && json.list.length > 0) {\n this.widgetForm = json;\n this.widgetForm.config.formName = record.formName;\n if (json.list && json.list.length > 0) {\n this.widgetFormSelect = json.list[0];\n }\n }\n },\n getJSON() {\n this.getWidgetFormList();\n return this.widgetForm;\n },\n changeHeaderOrFooter(type) {\n //编辑页眉页脚\n this.$refs.pageFooterAndHeader.visible = true;\n var content = type === \"header\" ? this.widgetForm.config.pageHeader : this.widgetForm.config.pageFooter;\n this.$refs.pageFooterAndHeader.init(type, content);\n },\n changeContent(content, type) {\n //修改页眉页脚内容\n let tempEle = document.createElement(\"div\");\n tempEle.innerHTML = content;\n document.getElementsByTagName(\"body\")[0].appendChild(tempEle);\n let tempHeight = tempEle.offsetHeight;\n if (type === \"header\") {\n this.widgetForm.config.pageHeader = content;\n this.widgetForm.config.headerHeight = tempHeight;\n } else {\n this.widgetForm.config.pageFooter = content;\n this.widgetForm.config.footerHeight = tempHeight;\n }\n tempEle.remove();\n },\n BusOrgin() {\n //自组件需要获取最外层 datalist\n _util_Bus__WEBPACK_IMPORTED_MODULE_13__[\"default\"].$on(\"getWidgetFormList\", () => {\n console.log(\"getdatalist\");\n this.getWidgetFormList();\n });\n },\n //清空设计\n handleClear() {\n this.$refs.widgetForm.widgetList = [[]];\n },\n //获取list\n getWidgetFormList() {\n this.widgetForm.list = [].concat(...this.$refs.widgetForm.widgetList);\n // console.log('this.widgetForm.list', this.widgetForm.list)\n // console.log('this.$refs.widgetForm.widgetList', this.$refs.widgetForm.widgetList)\n },\n\n handleGetData() {\n this.canCopy = false;\n this.$refs.layoutForPaper.getFormData().then(res => {\n this.jsonVisible = true;\n this.jsonTemplate = JSON.stringify(res, null, 2);\n });\n },\n //预览设计\n handlePreview() {\n this.isView = true;\n this.getWidgetFormList();\n // this.previewVisible = true;\n },\n\n //关闭预览\n handleColse() {\n this.isView = false;\n // 子表单 fix[4044] 关闭预览时,需要重新调用一下 vue-grid-layout 里面的onWindowResize, 重新渲染宽度\n const getChildren = childs => {\n for (let i = 0; i < childs.length; i++) {\n let child = childs[i];\n if (child.onWindowResize) child.onWindowResize();\n getChildren(child.$children);\n }\n };\n this.$nextTick(() => {\n getChildren(this.$children);\n });\n },\n onClosePreview() {\n // this.$refs.layoutForPaper.reset();\n // this.previewVisible = false;\n this.isView = false;\n },\n handleDataChange() {},\n //重置表单\n handleReset() {},\n //获取数据\n handleTest() {},\n //保存\n handleSave() {\n let params = {\n formDesigerData: this.getJSON(),\n formOnlineRelId: this.formOnlineRelId,\n id: \"\"\n };\n (0,_api_onLineForm__WEBPACK_IMPORTED_MODULE_11__.addOrEditData)(params).then(res => {\n if (res.code == 200) {\n this.$message.success(\"保存成功!\");\n } else {\n if (res.code == -1) {\n this.$message.error(res.message);\n } else {\n this.$message.error(\"保存失败!\");\n }\n }\n });\n },\n //生成json\n handleExportJson() {},\n //生成json\n handleGenerateJson() {\n this.jsonVisible = true;\n this.canCopy = true;\n this.widgetForm.list = [].concat(...this.$refs.widgetForm.widgetList);\n this.jsonTemplate = JSON.stringify(this.widgetForm, null, 2);\n this.$nextTick(() => {\n if (!this.jsonClipboard) {\n this.jsonClipboard = new (clipboard__WEBPACK_IMPORTED_MODULE_10___default())(\".json-btn\");\n this.jsonClipboard.on(\"success\", e => {\n this.$message.success(\"复制成功\");\n });\n }\n this.jsonCopyValue = JSON.stringify(this.widgetForm);\n });\n },\n //切换字段属性配置和表单字段配置\n handleConfigSelect(type) {\n // console.log(type)\n this.configTab = type;\n }\n }\n});\n\n//# sourceURL=webpack://form-component/./src/form/modules/Container.vue?./node_modules/_babel-loader@8.3.0@babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/_vue-loader@15.10.1@vue-loader/lib/index.js??vue-loader-options");
2414
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_web_dom_exception_stack_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/web.dom-exception.stack.js */ \"./node_modules/_core-js@3.27.1@core-js/modules/web.dom-exception.stack.js\");\n/* harmony import */ var core_js_modules_web_dom_exception_stack_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_exception_stack_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _form_modules_widgetList__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/form/modules/widgetList */ \"./src/form/modules/widgetList.vue\");\n/* harmony import */ var _form_modules_widgetForm__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/form/modules/widgetForm */ \"./src/form/modules/widgetForm.vue\");\n/* harmony import */ var _form_modules_widgetConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/form/modules/widgetConfig */ \"./src/form/modules/widgetConfig.vue\");\n/* harmony import */ var _components_CusDialog_CusDialog__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/components/CusDialog/CusDialog */ \"./src/components/CusDialog/CusDialog.vue\");\n/* harmony import */ var _form_modules_layout_layoutForPaper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/form/modules/layout/layoutForPaper */ \"./src/form/modules/layout/layoutForPaper.vue\");\n/* harmony import */ var _form_modules_formConfig__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/form/modules/formConfig */ \"./src/form/modules/formConfig.vue\");\n/* harmony import */ var _form_modules_pageFooterAndHeader__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/form/modules/pageFooterAndHeader */ \"./src/form/modules/pageFooterAndHeader.vue\");\n/* harmony import */ var _util_util__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../util/util */ \"./src/form/util/util.js\");\n/* harmony import */ var vue_codemirror__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! vue-codemirror */ \"./node_modules/_vue-codemirror@4.0.6@vue-codemirror/dist/vue-codemirror.js\");\n/* harmony import */ var vue_codemirror__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(vue_codemirror__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var clipboard__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! clipboard */ \"./node_modules/_clipboard@2.0.4@clipboard/dist/clipboard.js\");\n/* harmony import */ var clipboard__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(clipboard__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _api_onLineForm__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @/api/onLineForm */ \"./src/api/onLineForm.js\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! vue */ \"vue\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _util_Bus__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../util/Bus */ \"./src/form/util/Bus.js\");\n\n //控件库\n //设计form\n\n //JSON预览\n\n\n\n\n/* 加载代码 */\n\n\n\n__webpack_require__(/*! codemirror/mode/javascript/javascript.js */ \"./node_modules/_codemirror@5.46.0@codemirror/mode/javascript/javascript.js\");\n\n //导入bus\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"Container\",\n data() {\n return {\n clearable: true,\n //可以清空\n jsonVisible: false,\n previewVisible: false,\n //预览\n configTab: \"widget\",\n widgetFormSelect: null,\n formOnlineRelId: \"\",\n isView: false,\n //是否是预览模式\n canCopy: false,\n isPreviewDesktop: true,\n previewMobileUrl: vue__WEBPACK_IMPORTED_MODULE_12___default().prototype.getPreviewMobileUrl(),\n widgetForm: {\n list: [],\n config: {\n // canAgainSearch: \"\",\n labelPosition: \"right\",\n labelWidth: 100,\n formLayout: \"horizontal\",\n layout: \"vertical\",\n fontSize: 14,\n formPageWidth: '1123',\n size: \"small\",\n header: \"\",\n footer: \"\",\n headerHeight: 0,\n footerHeight: 0,\n multiplePages: true,\n paddingNum: 20,\n //边距\n align: \"align-between\",\n border: true,\n componentsNoBorder: false,\n borderColor: \"#333333\",\n mode: \"web\",\n //web --网页模式 paper --z\n formName: \"表单设计\",\n pageHeader: \"\",\n pageFooter: \"\",\n color: \"#000\",\n bgc: \"transparent\"\n }\n },\n refreshWidgetConfig: false,\n widgetModels: {},\n options: {\n height: \"850\",\n mode: {\n name: \"javascript\",\n json: true\n },\n lineNumbers: true\n },\n jsonTemplate: \"\",\n jsonCopyValue: \"\"\n };\n },\n components: {\n widgetList: _form_modules_widgetList__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n widgetForm: _form_modules_widgetForm__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n widgetConfig: _form_modules_widgetConfig__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n layoutForPaper: _form_modules_layout_layoutForPaper__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n formConfig: _form_modules_formConfig__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n CusDialog: _components_CusDialog_CusDialog__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n codemirror: vue_codemirror__WEBPACK_IMPORTED_MODULE_9__.codemirror,\n pageFooterAndHeader: _form_modules_pageFooterAndHeader__WEBPACK_IMPORTED_MODULE_7__[\"default\"]\n },\n watch: {\n widgetFormSelect() {\n // 切换选择时可能组件配置的状态无法更新,所以需要通过v-if重新加载一次挂载组件\n this.refreshWidgetConfig = true;\n this.$nextTick(() => {\n this.refreshWidgetConfig = false;\n });\n }\n },\n created() {\n this.BusOrgin();\n this.getDataByParams();\n },\n methods: {\n previewMobileOnload() {\n this.$nextTick(() => {\n this.$refs.previewIframe.contentWindow.postMessage({\n type: 'formConfig',\n data: {\n ...this.widgetForm,\n token: vue__WEBPACK_IMPORTED_MODULE_12___default().prototype.getToken()\n }\n });\n });\n },\n btoa(str) {\n return window.btoa(encodeURIComponent(str));\n },\n async getDataByParams() {\n let record = this.$route.query;\n if (record) {\n this.formOnlineRelId = record.id;\n (0,_api_onLineForm__WEBPACK_IMPORTED_MODULE_11__.getFormTableColumnsData)({\n tableId: record.onlineTableName,\n id: record.id\n }).then(res => {\n if (!res.result) return;\n this.toolsData = res.result;\n /* 重组数据 */\n this.toolsData.map((item, index) => {\n item.options.showLabel = true;\n item.options.inline = true;\n });\n // console.log(this.toolsData);\n });\n\n this.formOnlineRelId = record.id;\n let isData = await (0,_api_onLineForm__WEBPACK_IMPORTED_MODULE_11__.getFormDesigerData)({\n formOnlineRelId: this.formOnlineRelId\n });\n if (isData) {\n // if (!isData.result.config.align) {\n // isData.result.config = this.widgetForm.config;\n // }\n this.setJSON(isData.result, record);\n }\n }\n },\n setJSON(json, record) {\n if (json && json.list.length > 0) {\n this.widgetForm = json;\n this.widgetForm.config.formName = record.formName;\n if (json.list && json.list.length > 0) {\n this.widgetFormSelect = json.list[0];\n }\n }\n },\n getJSON() {\n this.getWidgetFormList();\n return this.widgetForm;\n },\n changeHeaderOrFooter(type) {\n //编辑页眉页脚\n this.$refs.pageFooterAndHeader.visible = true;\n var content = type === \"header\" ? this.widgetForm.config.pageHeader : this.widgetForm.config.pageFooter;\n this.$refs.pageFooterAndHeader.init(type, content);\n },\n changeContent(content, type) {\n //修改页眉页脚内容\n let tempEle = document.createElement(\"div\");\n tempEle.innerHTML = content;\n document.getElementsByTagName(\"body\")[0].appendChild(tempEle);\n let tempHeight = tempEle.offsetHeight;\n if (type === \"header\") {\n this.widgetForm.config.pageHeader = content;\n this.widgetForm.config.headerHeight = tempHeight;\n } else {\n this.widgetForm.config.pageFooter = content;\n this.widgetForm.config.footerHeight = tempHeight;\n }\n tempEle.remove();\n },\n BusOrgin() {\n //自组件需要获取最外层 datalist\n _util_Bus__WEBPACK_IMPORTED_MODULE_13__[\"default\"].$on(\"getWidgetFormList\", () => {\n console.log(\"getdatalist\");\n this.getWidgetFormList();\n });\n },\n //清空设计\n handleClear() {\n this.$refs.widgetForm.widgetList = [[]];\n },\n //获取list\n getWidgetFormList() {\n this.widgetForm.list = [].concat(...this.$refs.widgetForm.widgetList);\n // console.log('this.widgetForm.list', this.widgetForm.list)\n // console.log('this.$refs.widgetForm.widgetList', this.$refs.widgetForm.widgetList)\n },\n\n handleGetData() {\n this.canCopy = false;\n this.$refs.layoutForPaper.getFormData().then(res => {\n this.jsonVisible = true;\n this.jsonTemplate = JSON.stringify(res, null, 2);\n });\n },\n //预览设计\n handlePreview() {\n this.isView = true;\n this.getWidgetFormList();\n // this.previewVisible = true;\n },\n\n //关闭预览\n handleColse() {\n this.isView = false;\n // 子表单 fix[4044] 关闭预览时,需要重新调用一下 vue-grid-layout 里面的onWindowResize, 重新渲染宽度\n const getChildren = childs => {\n for (let i = 0; i < childs.length; i++) {\n let child = childs[i];\n if (child.onWindowResize) child.onWindowResize();\n getChildren(child.$children);\n }\n };\n this.$nextTick(() => {\n getChildren(this.$children);\n });\n },\n onClosePreview() {\n // this.$refs.layoutForPaper.reset();\n // this.previewVisible = false;\n this.isView = false;\n },\n handleDataChange() {},\n //重置表单\n handleReset() {},\n //获取数据\n handleTest() {},\n //保存\n handleSave() {\n let params = {\n formDesigerData: this.getJSON(),\n formOnlineRelId: this.formOnlineRelId,\n id: \"\"\n };\n (0,_api_onLineForm__WEBPACK_IMPORTED_MODULE_11__.addOrEditData)(params).then(res => {\n if (res.code == 200) {\n this.$message.success(\"保存成功!\");\n } else {\n if (res.code == -1) {\n this.$message.error(res.message);\n } else {\n this.$message.error(\"保存失败!\");\n }\n }\n });\n },\n //生成json\n handleExportJson() {},\n //生成json\n handleGenerateJson() {\n this.jsonVisible = true;\n this.canCopy = true;\n this.widgetForm.list = [].concat(...this.$refs.widgetForm.widgetList);\n this.jsonTemplate = JSON.stringify(this.widgetForm, null, 2);\n this.$nextTick(() => {\n if (!this.jsonClipboard) {\n this.jsonClipboard = new (clipboard__WEBPACK_IMPORTED_MODULE_10___default())(\".json-btn\");\n this.jsonClipboard.on(\"success\", e => {\n this.$message.success(\"复制成功\");\n });\n }\n this.jsonCopyValue = JSON.stringify(this.widgetForm);\n });\n },\n //切换字段属性配置和表单字段配置\n handleConfigSelect(type) {\n // console.log(type)\n this.configTab = type;\n }\n }\n});\n\n//# sourceURL=webpack://form-component/./src/form/modules/Container.vue?./node_modules/_babel-loader@8.3.0@babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/_vue-loader@15.10.1@vue-loader/lib/index.js??vue-loader-options");
2415
2415
 
2416
2416
  /***/ }),
2417
2417
 
@@ -12325,7 +12325,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_vue__;
12325
12325
  /***/ (function(module) {
12326
12326
 
12327
12327
  "use strict";
12328
- eval("module.exports = JSON.parse('{\"name\":\"@zscreate/form-component\",\"version\":\"1.0.14\",\"private\":false,\"description\":\"\",\"main\":\"dist/form-component.umd.js\",\"unpkg\":\"dist/form-component.umd.js\",\"scripts\":{\"build\":\"vue-cli-service build --target lib --name form-component src/main.js --formats umd --report\",\"build:watch\":\"vue-cli-service build --target lib --name form-component src/main.js --formats umd --watch\"},\"exports\":{\".\":{\"import\":{\"default\":\"./dist/form-component.umd.js\"},\"require\":\"./dist/form-component.common.js\"}},\"publishConfig\":{\"access\":\"public\",\"registry\":\"https://registry.npmjs.org/\"},\"files\":[\"/dist/*\"],\"exclude\":[\"node_modules\"],\"keywords\":[],\"author\":\"\",\"license\":\"ISC\",\"dependencies\":{\"core-js\":\"^3.8.3\",\"vue\":\"^2.6.14\",\"pubsub-js\":\"^1.9.3\",\"vue-draggable-resizable\":\"2.2.0\",\"vue-draggable-resizable-gorkys\":\"2.0.0\",\"vue-grid-layout\":\"^2.3.12\",\"vue-signature-pad\":\"^2.0.2\",\"vuedraggable\":\"^2.24.3\",\"moment\":\"^2.29.1\"},\"devDependencies\":{\"clipboard\":\"2.0.4\",\"codemirror\":\"^5.46.0\",\"vue-codemirror\":\"^4.0.6\",\"@vue/cli-plugin-babel\":\"~5.0.0\",\"@vue/cli-service\":\"~5.0.0\",\"vue-template-compiler\":\"^2.6.14\",\"less\":\"^3.0.4\",\"less-loader\":\"^5.0.0\",\"node-sass\":\"^4.11.0\",\"sass-loader\":\"^7.0.1\"}}');\n\n//# sourceURL=webpack://form-component/./package.json?");
12328
+ eval("module.exports = JSON.parse('{\"name\":\"@zscreate/form-component\",\"version\":\"1.0.15\",\"private\":false,\"description\":\"\",\"main\":\"dist/form-component.umd.js\",\"unpkg\":\"dist/form-component.umd.js\",\"scripts\":{\"build\":\"vue-cli-service build --target lib --name form-component src/main.js --formats umd --report\",\"build:watch\":\"vue-cli-service build --target lib --name form-component src/main.js --formats umd --watch\"},\"exports\":{\".\":{\"import\":{\"default\":\"./dist/form-component.umd.js\"},\"require\":\"./dist/form-component.common.js\"}},\"publishConfig\":{\"access\":\"public\",\"registry\":\"https://registry.npmjs.org/\"},\"files\":[\"/dist/*\"],\"exclude\":[\"node_modules\"],\"keywords\":[],\"author\":\"\",\"license\":\"ISC\",\"dependencies\":{\"core-js\":\"^3.8.3\",\"vue\":\"^2.6.14\",\"pubsub-js\":\"^1.9.3\",\"vue-draggable-resizable\":\"2.2.0\",\"vue-draggable-resizable-gorkys\":\"2.0.0\",\"vue-grid-layout\":\"^2.3.12\",\"vue-signature-pad\":\"^2.0.2\",\"vuedraggable\":\"^2.24.3\",\"moment\":\"^2.29.1\"},\"devDependencies\":{\"clipboard\":\"2.0.4\",\"codemirror\":\"^5.46.0\",\"vue-codemirror\":\"^4.0.6\",\"@vue/cli-plugin-babel\":\"~5.0.0\",\"@vue/cli-service\":\"~5.0.0\",\"vue-template-compiler\":\"^2.6.14\",\"less\":\"^3.0.4\",\"less-loader\":\"^5.0.0\",\"node-sass\":\"^4.11.0\",\"sass-loader\":\"^7.0.1\"}}');\n\n//# sourceURL=webpack://form-component/./package.json?");
12329
12329
 
12330
12330
  /***/ })
12331
12331
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zscreate/form-component",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "main": "dist/form-component.umd.js",