k-form-design
Version:
基于vue、ant-design-vue的表单设计器,可视化开发表单
1 lines • 2.27 kB
JavaScript
(("undefined"!==typeof self?self:this)["webpackJsonpk_form_design"]=("undefined"!==typeof self?self:this)["webpackJsonpk_form_design"]||[]).push([[30],{"54fe":function(e,o,t){"use strict";t.r(o);t("7f7f");var r=function(){var e=this,o=e.$createElement,t=e._self._c||o;return"YYYY-MM"===e.record.options.format&&!1===e.record.options.range?t("MonthPicker",{style:"width:"+e.record.options.width,attrs:{disabled:e.record.options.disabled||e.parentDisabled,allowClear:e.record.options.clearable,placeholder:e.record.options.placeholder,format:e.record.options.format,value:e.date},on:{change:e.handleSelectChange}}):!1===e.record.options.range?t("DatePicker",{style:"width:"+e.record.options.width,attrs:{disabled:e.record.options.disabled||e.parentDisabled,"show-time":e.record.options.showTime,allowClear:e.record.options.clearable,placeholder:e.record.options.placeholder,format:e.record.options.format,value:e.date},on:{change:e.handleSelectChange}}):!0===e.record.options.range?t("RangePicker",{style:"width:"+e.record.options.width,attrs:{"show-time":e.record.options.showTime,disabled:e.record.options.disabled||e.parentDisabled,allowClear:e.record.options.clearable,placeholder:e.record.options.rangePlaceholder,format:e.record.options.format,value:e.date},on:{change:e.handleSelectChange}}):e._e()},n=[],a=t("c1df"),i=t.n(a),d=t("e74d"),s=d["d"].getComponent("datePicker"),c=d["d"].getComponent("rangePicker"),l=d["d"].getComponent("monthPicker"),p={props:["record","value","parentDisabled"],components:{DatePicker:s.component,RangePicker:c.component,MonthPicker:l.component},data:function(){return{}},computed:{date:function(){var e=this;return!this.value||this.record.options.range&&0===this.value.length?void 0:this.record.options.range?this.value.map((function(o){return i()(o,e.record.options.format)})):i()(this.value,this.record.options.format)}},methods:{handleSelectChange:function(e){var o,t=this;o=!e||this.record.options.range&&0===e.length?"":this.record.options.range?e.map((function(e){return e.format(t.record.options.format)})):e.format(this.record.options.format),this.$emit("change",o),this.$emit("input",o)}}},h=p,f=t("2877"),m=Object(f["a"])(h,r,n,!1,null,null,null),u=m.exports;u.install=function(e){e.component(u.name,u)};o["default"]=u}}]);