{"remainingRequest":"C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\node_modules\\style-vw-loader\\index.js??ref--0-2!C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\src\\components\\common\\form.vue?vue&type=script&lang=js&","dependencies":[{"path":"C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\src\\components\\common\\form.vue","mtime":1663828782925},{"path":"C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000},{"path":"C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\node_modules\\style-vw-loader\\index.js","mtime":1540864632000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nexport default {\r\n name: 'zz-form',\r\n props: {\r\n /*\r\n\t\t字段设置:二维数组,包括label名字设置,字段绑定设置,第二维有多少个集合就有多少列\r\n\t\t[\r\n\t\t\t[\r\n\t\t\t\t{\r\n\t\t\t\t\tlable: 'label名,必须',\r\n\t\t\t\t\tprop: '绑定字段,必须',\r\n\t\t\t\t\tfilter: 'vue过滤器名,',\r\n\t\t\t\t\tfilterParams: '过滤的参数',\r\n\t\t\t\t\tformat: '过滤方法,',\r\n\t\t\t\t\tclick: '绑定的click事件',\r\n\t\t\t\t\tdate: '日期输入控件',\r\n\t\t\t\t\tdateFormat: '日期控件的返回值格式化字符串,默认为\"yyyy-MM-dd\"'\r\n\t\t\t\t\tchange: 'date改变时触发的事件'\r\n\t\t\t\t\tinput: 'input输入框',\r\n\t\t\t\t\ttextarea: '内容输入框',\r\n\t\t\t\t\trows: '内容输入框的行数,默认4行',\r\n\t\t\t\t\tslot: '插槽名',\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t\t.\r\n\t\t\t.\r\n\t\t\t.\r\n\t\t]\r\n\t\t*/\r\n cols: {\r\n type: Array,\r\n default() {\r\n return [];\r\n }\r\n },\r\n // 绑定数据\r\n data: {\r\n type: Object,\r\n default() {\r\n return {};\r\n }\r\n },\r\n // 表单校验\r\n rules: {\r\n type: Object,\r\n default() {\r\n return {};\r\n }\r\n },\r\n // 表单标签宽度\r\n labelWidth: {\r\n type: String,\r\n default() {\r\n return '80px';\r\n }\r\n },\r\n // 错误的项目字段消息对象{prop: '错误消息'}\r\n errors: {\r\n type: Object,\r\n default() {\r\n return {};\r\n }\r\n },\r\n disabled: {\r\n type: Boolean,\r\n default() {\r\n return false;\r\n }\r\n }\r\n },\r\n data() {\r\n let self = this;\r\n return {\r\n ft: self.$root.$options.filters\r\n };\r\n },\r\n methods: {\r\n validate(resolve, reject) {\r\n this.$parent.errors = {};\r\n this.$refs.form.validate((valid) => {\r\n if (valid) {\r\n resolve && resolve();\r\n } else {\r\n this.$nextTick(() => {\r\n const isError = this.$el.querySelectorAll('.is-error');\r\n if (isError && isError[0]) {\r\n isError[0].querySelector('input').focus();\r\n }\r\n });\r\n reject && reject();\r\n }\r\n });\r\n },\r\n resetFields() {\r\n this.$refs.form.resetFields();\r\n },\r\n clearValidate() {\r\n this.$refs.form.clearValidate();\r\n }\r\n },\r\n computed: {\r\n width() {\r\n return 100 / this.cols.length + '%';\r\n }\r\n },\r\n watch: {\r\n errors(n) {\r\n const len = Object.keys(n).length;\r\n if (len) {\r\n this.$nextTick(() => {\r\n const isError = this.$el.querySelectorAll('.is-error');\r\n if (isError && isError[0]) {\r\n isError[0].querySelector('input').focus();\r\n }\r\n });\r\n }\r\n }\r\n }\r\n};\r\n",{"version":3,"sources":["form.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"form.vue","sourceRoot":"src/components/common","sourcesContent":["\r\n\r\n\r\n\r\n"]}]}