@king-one/form-design 0.0.2 → 0.0.4
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/CHANGELOG.md +12 -0
- package/dist/es/index.mjs +14 -6
- package/dist/es/src/components/form-desgin.mjs +51 -19
- package/dist/es/src/components/form-material.vue.mjs +64 -53
- package/dist/es/src/components/form-panel.vue.mjs +76 -59
- package/dist/es/src/components/form-setting.vue.mjs +55 -56
- package/dist/es/src/components/panel/index.mjs +16 -6
- package/dist/es/src/components/panel/panel-item.vue.mjs +112 -2
- package/dist/es/src/components/panel/panel-item.vue2.mjs +2 -64
- package/dist/es/src/components/panel/panel-wrapper.mjs +34 -0
- package/dist/es/src/components/panel/widget/array-card.vue.mjs +4 -0
- package/dist/es/src/components/panel/widget/array-card.vue2.mjs +71 -0
- package/dist/es/src/components/panel/widget/object.vue.mjs +4 -0
- package/dist/es/src/components/panel/widget/object.vue2.mjs +71 -0
- package/dist/es/src/components/panel/widget/select.vue.mjs +4 -0
- package/dist/es/src/components/panel/widget/select.vue2.mjs +23 -0
- package/dist/es/src/components/props/form-props.vue.mjs +4 -0
- package/dist/es/src/components/props/form-props.vue2.mjs +68 -0
- package/dist/es/src/components/props/index.mjs +5 -2
- package/dist/es/src/components/props/widget/BaseProps.vue.mjs +4 -0
- package/dist/es/src/components/props/widget/BaseProps.vue2.mjs +63 -0
- package/dist/es/src/components/props/widget/InputNumberProps.vue.mjs +4 -0
- package/dist/es/src/components/props/widget/InputNumberProps.vue2.mjs +125 -0
- package/dist/es/src/components/props/widget/InputProps.vue.mjs +4 -0
- package/dist/es/src/components/props/widget/InputProps.vue2.mjs +80 -0
- package/dist/es/src/components/props/widget/TextareaProps.vue.mjs +4 -0
- package/dist/es/src/components/props/widget/TextareaProps.vue2.mjs +79 -0
- package/dist/es/src/components/props/widget/index.mjs +27 -0
- package/dist/es/src/config/index.mjs +53 -4
- package/dist/es/src/core/Design.mjs +50 -26
- package/dist/es/src/core/Field.mjs +18 -0
- package/dist/es/src/core/FormSchema.mjs +39 -12
- package/dist/es/src/effects/effect-dict.mjs +7 -0
- package/dist/es/src/effects/onEffects.mjs +12 -0
- package/dist/es/src/hooks/use-monaco.mjs +24 -28
- package/dist/es/src/hooks/use-namespace/index.mjs +24 -24
- package/dist/es/src/index.mjs +14 -7
- package/dist/es/src/plugins/index.mjs +17 -0
- package/dist/es/src/utils/instanceof.mjs +9 -0
- package/dist/es/src/utils/isEmpty.mjs +41 -0
- package/dist/es/src/utils/merge.mjs +64 -0
- package/dist/lib/index.js +1 -1
- package/dist/lib/src/components/form-desgin.js +1 -1
- package/dist/lib/src/components/form-material.vue.js +1 -1
- package/dist/lib/src/components/form-panel.vue.js +2 -2
- package/dist/lib/src/components/form-setting.vue.js +1 -1
- package/dist/lib/src/components/panel/index.js +1 -1
- package/dist/lib/src/components/panel/panel-item.vue.js +1 -1
- package/dist/lib/src/components/panel/panel-item.vue2.js +1 -1
- package/dist/lib/src/components/panel/panel-wrapper.js +1 -0
- package/dist/lib/src/components/panel/widget/array-card.vue.js +1 -0
- package/dist/lib/src/components/panel/widget/array-card.vue2.js +1 -0
- package/dist/lib/src/components/panel/widget/object.vue.js +1 -0
- package/dist/lib/src/components/panel/widget/object.vue2.js +1 -0
- package/dist/lib/src/components/panel/widget/select.vue.js +1 -0
- package/dist/lib/src/components/panel/widget/select.vue2.js +1 -0
- package/dist/lib/src/components/props/form-props.vue.js +1 -0
- package/dist/lib/src/components/props/form-props.vue2.js +1 -0
- package/dist/lib/src/components/props/index.js +1 -1
- package/dist/lib/src/components/props/widget/BaseProps.vue.js +1 -0
- package/dist/lib/src/components/props/widget/BaseProps.vue2.js +1 -0
- package/dist/lib/src/components/props/widget/InputNumberProps.vue.js +1 -0
- package/dist/lib/src/components/props/widget/InputNumberProps.vue2.js +1 -0
- package/dist/lib/src/components/props/widget/InputProps.vue.js +1 -0
- package/dist/lib/src/components/props/widget/InputProps.vue2.js +1 -0
- package/dist/lib/src/components/props/widget/TextareaProps.vue.js +1 -0
- package/dist/lib/src/components/props/widget/TextareaProps.vue2.js +1 -0
- package/dist/lib/src/components/props/widget/index.js +1 -0
- package/dist/lib/src/config/index.js +1 -1
- package/dist/lib/src/core/Design.js +1 -1
- package/dist/lib/src/core/Field.js +1 -0
- package/dist/lib/src/core/FormSchema.js +1 -1
- package/dist/lib/src/effects/effect-dict.js +1 -0
- package/dist/lib/src/effects/onEffects.js +1 -0
- package/dist/lib/src/hooks/use-monaco.js +1 -1
- package/dist/lib/src/hooks/use-namespace/index.js +1 -1
- package/dist/lib/src/index.js +1 -1
- package/dist/lib/src/plugins/index.js +1 -0
- package/dist/lib/src/utils/instanceof.js +1 -0
- package/dist/lib/src/utils/isEmpty.js +1 -0
- package/dist/lib/src/utils/merge.js +1 -0
- package/dist/theme-chalk/fonts/iconfont.ttf +0 -0
- package/dist/theme-chalk/fonts/iconfont.woff +0 -0
- package/dist/theme-chalk/fonts/iconfont.woff2 +0 -0
- package/dist/theme-chalk/form-design.css +1 -1
- package/dist/theme-chalk/icon.css +1 -1
- package/dist/theme-chalk/index.css +1 -1
- package/dist/theme-chalk/material.css +1 -1
- package/dist/theme-chalk/panel-item.css +1 -1
- package/dist/theme-chalk/panel.css +1 -1
- package/dist/theme-chalk/setting.css +1 -1
- package/dist/types/src/components/form-panel.vue.d.ts +3 -1
- package/dist/types/src/components/panel/index.d.ts +2 -2
- package/dist/types/src/components/panel/panel-item.vue.d.ts +2 -0
- package/dist/types/src/components/panel/panel-wrapper.d.ts +11 -0
- package/dist/types/src/components/panel/widget/array-card.vue.d.ts +20 -0
- package/dist/types/src/components/panel/widget/object.vue.d.ts +20 -0
- package/dist/types/src/components/panel/widget/select.vue.d.ts +8 -0
- package/dist/types/src/components/props/index.d.ts +2 -2
- package/dist/types/src/components/props/widget/InputNumberProps.vue.d.ts +3 -0
- package/dist/types/src/components/props/widget/InputProps.vue.d.ts +3 -0
- package/dist/types/src/components/props/widget/TextareaProps.vue.d.ts +3 -0
- package/dist/types/src/components/props/widget/index.d.ts +8 -0
- package/dist/types/src/config/index.d.ts +1 -0
- package/dist/types/src/core/Design.d.ts +175 -18
- package/dist/types/src/core/Field.d.ts +6 -0
- package/dist/types/src/core/FormSchema.d.ts +33 -11
- package/dist/types/src/effects/onEffects.d.ts +2 -2
- package/dist/types/src/hooks/use-namespace/index.d.ts +1 -1
- package/dist/types/src/index.d.ts +3 -0
- package/dist/types/src/plugins/index.d.ts +8 -0
- package/dist/types/src/types.d.ts +36 -5
- package/dist/types/src/utils/instanceof.d.ts +2 -0
- package/dist/types/src/utils/isEmpty.d.ts +2 -0
- package/dist/types/src/utils/merge.d.ts +12 -0
- package/package.json +4 -2
- package/dist/es/src/components/props/base-props.vue.mjs +0 -60
- package/dist/es/src/components/props/base-props.vue2.mjs +0 -4
- package/dist/es/src/components/props/component-props.vue.mjs +0 -21
- package/dist/es/src/components/props/component-props.vue2.mjs +0 -4
- package/dist/lib/src/components/props/base-props.vue.js +0 -1
- package/dist/lib/src/components/props/base-props.vue2.js +0 -1
- package/dist/lib/src/components/props/component-props.vue.js +0 -1
- package/dist/lib/src/components/props/component-props.vue2.js +0 -1
- /package/dist/types/src/components/props/{base-props.vue.d.ts → form-props.vue.d.ts} +0 -0
- /package/dist/types/src/components/props/{component-props.vue.d.ts → widget/BaseProps.vue.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./instanceof.js"),i=e=>e!=null,o=Object.prototype.hasOwnProperty;function s(e,r=!1){if(e==null)return!0;if(typeof e=="boolean"||typeof e=="number")return!1;if(typeof e=="string"||typeof e=="function")return e.length===0;if(Array.isArray(e)){if(e.length===0)return!0;for(let t=0;t<e.length;t++)if(r){if(e[t]!==void 0&&e[t]!==null)return!1}else if(e[t]!==void 0&&e[t]!==null&&e[t]!==""&&e[t]!==0)return!1;return!0}if(n.instOf(e,"Error"))return e.message==="";if(e.toString===toString)switch(e.toString()){case"[object File]":case"[object Map]":case"[object Set]":return e.size===0;case"[object Object]":{for(const t in e)if(o.call(e,t))return!1;return!0}}return!1}exports.isEmpty=s;exports.isValid=i;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./checkers.js"),b=require("./isEmpty.js");function l(e){return O(e)&&!y(e)}function O(e){return!!e&&typeof e=="object"}function y(e){return"$$typeof"in e&&"_owner"in e||e._isAMomentObject||e._isJSONSchemaObject||u.isFn(e.toJS)||u.isFn(e.toJSON)?!0:u.isArr(e)?!1:!u.isPlainObj(e)}function m(e){return Array.isArray(e)?[]:{}}function i(e,r){var n;return r.clone!==!1&&((n=r.isMergeableObject)!=null&&n.call(r,e))?f(m(e),e,r):e}function j(e,r,n){return e.concat(r).map(c=>i(c,n))}function M(e,r){if(!r.customMerge)return f;const n=r.customMerge(e);return typeof n=="function"?n:f}function g(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(r=>e.propertyIsEnumerable(r)):[]}function s(e){return b.isValid(e)?Object.keys(e).concat(g(e)):[]}function a(e,r){try{return r in e}catch{return!1}}function A(e,r){return a(e,r)&&!(Object.hasOwnProperty.call(e,r)&&Object.propertyIsEnumerable.call(e,r))}function S(e,r,n){const c=n.assign?e||{}:{};return n.isMergeableObject(e)?(n.assign||s(e).forEach(t=>{c[t]=i(e[t],n)}),s(r).forEach(t=>{A(e,t)||(b.isEmpty(e[t])?c[t]=r[t]:a(e,t)&&n.isMergeableObject(r[t])?c[t]=M(t,n)(e[t],r[t],n):c[t]=i(r[t],n))}),c):e}function f(e,r,n){n=n||{},n.arrayMerge=n.arrayMerge||j,n.isMergeableObject=n.isMergeableObject||l,n.cloneUnlessOtherwiseSpecified=i;const c=Array.isArray(r),t=Array.isArray(e);return c===t?c?n.arrayMerge(e,r,n):S(e,r,n):i(r,n)}const d=f;exports.merge=d;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.k-
|
|
1
|
+
.k-design-main{width:100%;height:100%;display:flex;background:#f8f8f8;overflow:hidden;overflow-x:auto;font-size:13px;text-align:initial}.k-design-main,.k-design-main *{box-sizing:border-box}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@font-face{font-family:iconfont-design;src:url(fonts/iconfont.woff2?t=
|
|
1
|
+
@font-face{font-family:iconfont-design;src:url(fonts/iconfont.woff2?t=1053) format("woff2"),url(fonts/iconfont.woff?t=21858) format("woff"),url(fonts/iconfont.ttf?t=51911) format("truetype")}.k-design-icon{font-family:iconfont-design!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-from-design-exclamation-circle-filled:before{content:"\e670"}.icon-from-design-exclamation-circle:before{content:"\e660"}.icon-from-design-form-object:before{content:"\e666"}.icon-from-design-form-list:before{content:"\e667"}.icon-from-design-form-table:before{content:"\e66f"}.icon-from-design-copy:before{content:"\e65d"}.icon-from-design-form-radio:before{content:"\e698"}.icon-from-design-form-daterange:before{content:"\e699"}.icon-from-design-form-money:before{content:"\e69a"}.icon-from-design-form-kit-leave:before{content:"\e69b"}.icon-from-design-form-kit-reimbursement:before{content:"\e69c"}.icon-from-design-form-kit-out:before{content:"\e69d"}.icon-from-design-form-kit-replenish:before{content:"\e69e"}.icon-from-design-form-kit-overtime:before{content:"\e69f"}.icon-from-design-form-number:before{content:"\e6a0"}.icon-from-design-form-textarea:before{content:"\e6a1"}.icon-from-design-form-select:before{content:"\e6a2"}.icon-from-design-form-kit-transfer:before{content:"\e6a3"}.icon-from-design-form-right:before{content:"\e6a4"}.icon-from-design-form-checkbox:before{content:"\e687"}.icon-from-design-form-area:before{content:"\e688"}.icon-from-design-form-del:before{content:"\e689"}.icon-from-design-form-contact-person:before{content:"\e68a"}.icon-from-design-form-default:before{content:"\e68b"}.icon-from-design-form-date:before{content:"\e68c"}.icon-from-design-form-drag:before{content:"\e68d"}.icon-from-design-form-desctext:before{content:"\e68e"}.icon-from-design-form-fileupload:before{content:"\e68f"}.icon-from-design-form-input:before{content:"\e690"}.icon-from-design-form-grid:before{content:"\e691"}.icon-from-design-form-imgupload:before{content:"\e692"}.icon-from-design-form-hot-city:before{content:"\e693"}.icon-from-design-form-kit-leave-2:before{content:"\e694"}.icon-from-design-form-inputNumber:before{content:"\e695"}.icon-from-design-form-kit-business-trip:before{content:"\e696"}.icon-from-design-shouzhixiangyou:before{content:"\e615"}.icon-from-design-xiangzuohuangse:before{content:"\e60a"}.icon-from-design-code:before{content:"\e65a"}.icon-from-design-desktop:before{content:"\e65b"}.icon-from-design-delete1:before{content:"\e65c"}.icon-from-design-double-left:before{content:"\e65e"}.icon-from-design-double-right:before{content:"\e65f"}.icon-from-design-mobile:before{content:"\e668"}.icon-from-design-question-circle:before{content:"\e66c"}.icon-from-design-sound:before{content:"\e672"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--king-color-white:#ffffff;--king-color-primary:#409eff;--king-color-primary-light-3:#79bbff;--king-color-primary-light-5:#a0cfff;--king-color-primary-light-7:#c6e2ff;--king-color-primary-light-8:#d9ecff;--king-color-primary-light-9:#ecf5ff;--king-color-success:#67c23a;--king-color-success-light-3:#95d475;--king-color-success-light-5:#b3e19d;--king-color-success-light-7:#d1edc4;--king-color-success-light-8:#e1f3d8;--king-color-success-light-9:#f0f9eb;--king-color-warning:#e6a23c;--king-color-warning-light-3:#eebe77;--king-color-warning-light-5:#f3d19e;--king-color-warning-light-7:#f8e3c5;--king-color-warning-light-8:#faecd8;--king-color-warning-light-9:#fdf6ec;--king-color-danger:#f56c6c;--king-color-danger-light-3:#f89898;--king-color-danger-light-5:#fab6b6;--king-color-danger-light-7:#fcd3d3;--king-color-danger-light-8:#fde2e2;--king-color-danger-light-9:#fef0f0;--king-color-error:#f56c6c;--king-color-error-light-3:#f89898;--king-color-error-light-5:#fab6b6;--king-color-error-light-7:#fcd3d3;--king-color-error-light-8:#fde2e2;--king-color-error-light-9:#fef0f0;--king-color-info:#909399;--king-color-info-light-3:#b1b3b8;--king-color-info-light-5:#c8c9cc;--king-color-info-light-7:#dedfe0;--king-color-info-light-8:#e9e9eb;--king-color-info-light-9:#f4f4f5;--king-transition-duration:0.3s}.k-
|
|
1
|
+
:root{--king-color-white:#ffffff;--king-color-primary:#409eff;--king-color-primary-light-3:#79bbff;--king-color-primary-light-5:#a0cfff;--king-color-primary-light-7:#c6e2ff;--king-color-primary-light-8:#d9ecff;--king-color-primary-light-9:#ecf5ff;--king-color-success:#67c23a;--king-color-success-light-3:#95d475;--king-color-success-light-5:#b3e19d;--king-color-success-light-7:#d1edc4;--king-color-success-light-8:#e1f3d8;--king-color-success-light-9:#f0f9eb;--king-color-warning:#e6a23c;--king-color-warning-light-3:#eebe77;--king-color-warning-light-5:#f3d19e;--king-color-warning-light-7:#f8e3c5;--king-color-warning-light-8:#faecd8;--king-color-warning-light-9:#fdf6ec;--king-color-danger:#f56c6c;--king-color-danger-light-3:#f89898;--king-color-danger-light-5:#fab6b6;--king-color-danger-light-7:#fcd3d3;--king-color-danger-light-8:#fde2e2;--king-color-danger-light-9:#fef0f0;--king-color-error:#f56c6c;--king-color-error-light-3:#f89898;--king-color-error-light-5:#fab6b6;--king-color-error-light-7:#fcd3d3;--king-color-error-light-8:#fde2e2;--king-color-error-light-9:#fef0f0;--king-color-info:#909399;--king-color-info-light-3:#b1b3b8;--king-color-info-light-5:#c8c9cc;--king-color-info-light-7:#dedfe0;--king-color-info-light-8:#e9e9eb;--king-color-info-light-9:#f4f4f5;--king-transition-duration:0.3s}.k-design-main{width:100%;height:100%;display:flex;background:#f8f8f8;overflow:hidden;overflow-x:auto;font-size:13px;text-align:initial}.k-design-main,.k-design-main *{box-sizing:border-box}.k-design-material{flex:0 0 320px;height:100%;border:1px solid var(--king-color-info-light-7)}.k-design-material .k-design-toolbar{height:50px;display:flex;justify-content:center;align-items:center}.k-design-material .k-design-toolbar .toolbar-button{width:120px;text-align:center}.k-design-material .k-design-widget{padding:0 10px}.k-design-material .k-design-widget .widget-group-name{color:var(--king-color-info);font-size:14px;margin:10px 0}.k-design-material .k-design-widget .widget-list-drag{display:flex;flex-flow:row wrap;margin-left:-5px;margin-right:-5px;row-gap:10px}.k-design-material .k-design-widget .widget-col{padding-left:5px;padding-right:5px;width:50%}.k-design-material .k-design-widget .widget-col .widget-item{display:flex;align-items:center;padding:8px 10px;background:#fff;border:1px solid var(--king-color-info-light-9);border-radius:5px;cursor:pointer;font-size:13px}.k-design-material .k-design-widget .widget-item:hover{color:var(--king-color-primary);border-color:var(--king-color-primary-light-3)}.k-design-material .k-design-widget .widget-item-icon{margin-right:5px}.k-design-setting{flex:0;height:100%;border:1px solid var(--king-color-info-light-7);position:relative;background:#fff}.k-design-setting .setting-aside{height:100%;width:320px}.k-design-setting .setting-tabs{height:100%}.k-design-setting .setting-tabs .ant-tabs-content{height:100%;overflow:auto}.k-design-setting .setting-collapse{position:absolute;left:-25px;top:8px;cursor:pointer}.k-design-setting .ant-collapse{border-radius:0;border-left:none;border-right:none}.k-design-setting .ant-collapse-header{padding:5px 10px!important}.k-design-setting .ant-collapse-item{border-radius:0!important}.k-design-setting-collapse{border-left:none}.k-design-component-props .props-error{color:var(--king-color-danger)}.form-design-collapse-enter-active,.form-design-collapse-leave-active{transition:var(--form-design-collapse-duration) max-width linear,var(--form-design-collapse-duration) padding-left linear,var(--form-design-collapse-duration) padding-right linear}:root{--form-design-collapse-duration:0.3s}.k-design-panel{flex:1;min-width:800px;border-top:1px solid var(--king-color-info-light-7);border-bottom:1px solid var(--king-color-info-light-7);display:flex;flex-direction:column}.k-design-panel .k-design-panel__toolbar{min-height:38px;background:#fff;display:flex;justify-content:space-between;align-items:center;padding:5px 10px;border-bottom:1px solid var(--king-color-info-light-9)}.k-design-panel .k-design-panel__toolbar .k-design-panel__toolbar--icon{cursor:pointer;margin-right:5px}.k-design-panel .k-design-panel__toolbar .right{padding-right:25px;display:flex;align-items:center}.k-design-panel .k-design-panel__content{flex:1;overflow:hidden;position:relative}.k-design-panel .k-design-panel__content .design-from{height:100%}.k-design-panel .k-design-panel__content .content-panel{height:100%;overflow:auto}.k-design-panel .k-design-panel__content .content-panel .prompt{margin:0 auto;width:65%;max-width:400px;padding:35px 20px;border-radius:10px;border:1px dashed rgba(25,31,37,.12);margin-top:50px;text-align:center;font-size:14px;color:#7a7a7a}.k-design-panel .k-design-panel__content .content-editor{height:100%;overflow:hidden}.k-design-panel .k-design-panel__content .drag-from{min-height:100%;padding-bottom:20px}.k-design-panel .k-design-panel__content .drag-from .widget-col{background-color:#fff}.k-design-panel .k-design-panel__content .drag-from .widget-col .widget-item{display:flex;padding:10px}.k-design-panel .k-design-panel__content .drag-from .widget-col .widget-item .widget-item-icon{margin-right:5px}@font-face{font-family:iconfont-design;src:url(fonts/iconfont.woff2?t=86465) format("woff2"),url(fonts/iconfont.woff?t=72595) format("woff"),url(fonts/iconfont.ttf?t=50547) format("truetype")}.k-design-icon{font-family:iconfont-design!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-from-design-exclamation-circle-filled:before{content:"\e670"}.icon-from-design-exclamation-circle:before{content:"\e660"}.icon-from-design-form-object:before{content:"\e666"}.icon-from-design-form-list:before{content:"\e667"}.icon-from-design-form-table:before{content:"\e66f"}.icon-from-design-copy:before{content:"\e65d"}.icon-from-design-form-radio:before{content:"\e698"}.icon-from-design-form-daterange:before{content:"\e699"}.icon-from-design-form-money:before{content:"\e69a"}.icon-from-design-form-kit-leave:before{content:"\e69b"}.icon-from-design-form-kit-reimbursement:before{content:"\e69c"}.icon-from-design-form-kit-out:before{content:"\e69d"}.icon-from-design-form-kit-replenish:before{content:"\e69e"}.icon-from-design-form-kit-overtime:before{content:"\e69f"}.icon-from-design-form-number:before{content:"\e6a0"}.icon-from-design-form-textarea:before{content:"\e6a1"}.icon-from-design-form-select:before{content:"\e6a2"}.icon-from-design-form-kit-transfer:before{content:"\e6a3"}.icon-from-design-form-right:before{content:"\e6a4"}.icon-from-design-form-checkbox:before{content:"\e687"}.icon-from-design-form-area:before{content:"\e688"}.icon-from-design-form-del:before{content:"\e689"}.icon-from-design-form-contact-person:before{content:"\e68a"}.icon-from-design-form-default:before{content:"\e68b"}.icon-from-design-form-date:before{content:"\e68c"}.icon-from-design-form-drag:before{content:"\e68d"}.icon-from-design-form-desctext:before{content:"\e68e"}.icon-from-design-form-fileupload:before{content:"\e68f"}.icon-from-design-form-input:before{content:"\e690"}.icon-from-design-form-grid:before{content:"\e691"}.icon-from-design-form-imgupload:before{content:"\e692"}.icon-from-design-form-hot-city:before{content:"\e693"}.icon-from-design-form-kit-leave-2:before{content:"\e694"}.icon-from-design-form-inputNumber:before{content:"\e695"}.icon-from-design-form-kit-business-trip:before{content:"\e696"}.icon-from-design-shouzhixiangyou:before{content:"\e615"}.icon-from-design-xiangzuohuangse:before{content:"\e60a"}.icon-from-design-code:before{content:"\e65a"}.icon-from-design-desktop:before{content:"\e65b"}.icon-from-design-delete1:before{content:"\e65c"}.icon-from-design-double-left:before{content:"\e65e"}.icon-from-design-double-right:before{content:"\e65f"}.icon-from-design-mobile:before{content:"\e668"}.icon-from-design-question-circle:before{content:"\e66c"}.icon-from-design-sound:before{content:"\e672"}.k-design-panel-item{cursor:move;border:1px dashed transparent;padding:10px;background-color:#fff;margin-bottom:10px;position:relative}.k-design-panel-item .k-design-panel-item__form{margin-bottom:0;cursor:move}.k-design-panel-item .k-design-panel-item__form *{cursor:move}.k-design-panel-item .k-design-panel-item__error{color:var(--king-color-error)}.k-design-panel-item .icons{position:absolute;right:0;bottom:0;background-color:#fff;border:1px solid var(--king-color-primary);border-bottom:0;border-right:0;padding:0 7px;cursor:pointer;border-top-left-radius:10px}.k-design-panel-item .icons .panel-icon{color:var(--king-color-primary);cursor:pointer}.k-design-panel-item .icons .panel-icon{margin-right:5px}.k-design-panel-item .icons .panel-exclamation-icon{color:var(--king-color-error)}.k-design-panel-item--active{border-color:var(--king-color-primary);border-left:4px solid var(--king-color-primary)}.k-design-panel-item--error{border-color:var(--king-color-error)}.k-design-panel-item--error .icons{border-color:var(--king-color-error)}.k-design-panel-drag{min-height:60px;background-color:#f5f6f6;padding:10px 5px}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.k-
|
|
1
|
+
.k-design-material{flex:0 0 320px;height:100%;border:1px solid var(--king-color-info-light-7)}.k-design-material .k-design-toolbar{height:50px;display:flex;justify-content:center;align-items:center}.k-design-material .k-design-toolbar .toolbar-button{width:120px;text-align:center}.k-design-material .k-design-widget{padding:0 10px}.k-design-material .k-design-widget .widget-group-name{color:var(--king-color-info);font-size:14px;margin:10px 0}.k-design-material .k-design-widget .widget-list-drag{display:flex;flex-flow:row wrap;margin-left:-5px;margin-right:-5px;row-gap:10px}.k-design-material .k-design-widget .widget-col{padding-left:5px;padding-right:5px;width:50%}.k-design-material .k-design-widget .widget-col .widget-item{display:flex;align-items:center;padding:8px 10px;background:#fff;border:1px solid var(--king-color-info-light-9);border-radius:5px;cursor:pointer;font-size:13px}.k-design-material .k-design-widget .widget-item:hover{color:var(--king-color-primary);border-color:var(--king-color-primary-light-3)}.k-design-material .k-design-widget .widget-item-icon{margin-right:5px}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.k-
|
|
1
|
+
.k-design-panel-item{cursor:move;border:1px dashed transparent;padding:10px;background-color:#fff;margin-bottom:10px;position:relative}.k-design-panel-item .k-design-panel-item__form{margin-bottom:0;cursor:move}.k-design-panel-item .k-design-panel-item__form *{cursor:move}.k-design-panel-item .k-design-panel-item__error{color:var(--king-color-error)}.k-design-panel-item .icons{position:absolute;right:0;bottom:0;background-color:#fff;border:1px solid var(--king-color-primary);border-bottom:0;border-right:0;padding:0 7px;cursor:pointer;border-top-left-radius:10px}.k-design-panel-item .icons .panel-icon{color:var(--king-color-primary);cursor:pointer}.k-design-panel-item .icons .panel-icon{margin-right:5px}.k-design-panel-item .icons .panel-exclamation-icon{color:var(--king-color-error)}.k-design-panel-item--active{border-color:var(--king-color-primary);border-left:4px solid var(--king-color-primary)}.k-design-panel-item--error{border-color:var(--king-color-error)}.k-design-panel-item--error .icons{border-color:var(--king-color-error)}.k-design-panel-drag{min-height:60px;background-color:#f5f6f6;padding:10px 5px}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.k-
|
|
1
|
+
.k-design-panel{flex:1;min-width:800px;border-top:1px solid var(--king-color-info-light-7);border-bottom:1px solid var(--king-color-info-light-7);display:flex;flex-direction:column}.k-design-panel .k-design-panel__toolbar{min-height:38px;background:#fff;display:flex;justify-content:space-between;align-items:center;padding:5px 10px;border-bottom:1px solid var(--king-color-info-light-9)}.k-design-panel .k-design-panel__toolbar .k-design-panel__toolbar--icon{cursor:pointer;margin-right:5px}.k-design-panel .k-design-panel__toolbar .right{padding-right:25px;display:flex;align-items:center}.k-design-panel .k-design-panel__content{flex:1;overflow:hidden;position:relative}.k-design-panel .k-design-panel__content .design-from{height:100%}.k-design-panel .k-design-panel__content .content-panel{height:100%;overflow:auto}.k-design-panel .k-design-panel__content .content-panel .prompt{margin:0 auto;width:65%;max-width:400px;padding:35px 20px;border-radius:10px;border:1px dashed rgba(25,31,37,.12);margin-top:50px;text-align:center;font-size:14px;color:#7a7a7a}.k-design-panel .k-design-panel__content .content-editor{height:100%;overflow:hidden}.k-design-panel .k-design-panel__content .drag-from{min-height:100%;padding-bottom:20px}.k-design-panel .k-design-panel__content .drag-from .widget-col{background-color:#fff}.k-design-panel .k-design-panel__content .drag-from .widget-col .widget-item{display:flex;padding:10px}.k-design-panel .k-design-panel__content .drag-from .widget-col .widget-item .widget-item-icon{margin-right:5px}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.k-
|
|
1
|
+
.k-design-setting{flex:0;height:100%;border:1px solid var(--king-color-info-light-7);position:relative;background:#fff}.k-design-setting .setting-aside{height:100%;width:320px}.k-design-setting .setting-tabs{height:100%}.k-design-setting .setting-tabs .ant-tabs-content{height:100%;overflow:auto}.k-design-setting .setting-collapse{position:absolute;left:-25px;top:8px;cursor:pointer}.k-design-setting .ant-collapse{border-radius:0;border-left:none;border-right:none}.k-design-setting .ant-collapse-header{padding:5px 10px!important}.k-design-setting .ant-collapse-item{border-radius:0!important}.k-design-setting-collapse{border-left:none}.k-design-component-props .props-error{color:var(--king-color-danger)}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
2
|
declare function __VLS_template(): {
|
|
3
|
-
slots: Partial<Record<`panel-${any}`, (_: {}) => any
|
|
3
|
+
slots: Partial<Record<`panel-${any}`, (_: {}) => any>> & {
|
|
4
|
+
toolbar?(_: {}): any;
|
|
5
|
+
};
|
|
4
6
|
refs: {
|
|
5
7
|
contentEditorTel: HTMLDivElement;
|
|
6
8
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const
|
|
1
|
+
import { WidgetComponentType } from '../../types';
|
|
2
|
+
export declare const widgetPanels: Record<string, WidgetComponentType>;
|
|
@@ -2,7 +2,9 @@ import { FieldSchema } from '@king-one/form-design/src/types';
|
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
3
|
declare const _default: DefineComponent<{
|
|
4
4
|
field: FieldSchema;
|
|
5
|
+
space: FieldSchema[];
|
|
5
6
|
}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{
|
|
6
7
|
field: FieldSchema;
|
|
8
|
+
space: FieldSchema[];
|
|
7
9
|
}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
8
10
|
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PropType, DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
import { FieldSchema, VueComponent } from '@king-one/form-design/src/types';
|
|
3
|
+
export declare function panelWarpper(Target: VueComponent): DefineComponent<ExtractPropTypes<{
|
|
4
|
+
field: {
|
|
5
|
+
type: PropType<FieldSchema>;
|
|
6
|
+
};
|
|
7
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
8
|
+
field: {
|
|
9
|
+
type: PropType<FieldSchema>;
|
|
10
|
+
};
|
|
11
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FieldSchema } from '@king-one/form-design/src/types';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
declare function __VLS_template(): {
|
|
4
|
+
slots: any;
|
|
5
|
+
refs: {};
|
|
6
|
+
attrs: Partial<{}>;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
9
|
+
declare const __VLS_component: DefineComponent<{
|
|
10
|
+
field: FieldSchema;
|
|
11
|
+
}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{
|
|
12
|
+
field: FieldSchema;
|
|
13
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FieldSchema } from '@king-one/form-design/src/types';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
declare function __VLS_template(): {
|
|
4
|
+
slots: any;
|
|
5
|
+
refs: {};
|
|
6
|
+
attrs: Partial<{}>;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
9
|
+
declare const __VLS_component: DefineComponent<{
|
|
10
|
+
field: FieldSchema;
|
|
11
|
+
}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{
|
|
12
|
+
field: FieldSchema;
|
|
13
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FieldSchema } from '@king-one/form-design/src/types';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
declare const _default: DefineComponent<{
|
|
4
|
+
field: FieldSchema;
|
|
5
|
+
}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{
|
|
6
|
+
field: FieldSchema;
|
|
7
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as
|
|
2
|
-
export {
|
|
1
|
+
export { default as FormProps } from './form-props.vue';
|
|
2
|
+
export { widgetProps } from './widget';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { WidgetsPropsType } from '@king-one/form-design/src/types';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
export declare const components: {
|
|
4
|
+
'k-input': DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
5
|
+
'k-textarea': DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
'k-input-number': DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
7
|
+
};
|
|
8
|
+
export declare const widgetProps: Record<string, WidgetsPropsType>;
|
|
@@ -1,74 +1,231 @@
|
|
|
1
|
-
import { DesignParams, DesignSchema, FieldSchema, valueType, FormProps
|
|
1
|
+
import { DesignParams, DesignSchema, FieldSchema, FormDesignPlugin, WidgetComponentType, WidgetsPropsType, valueType, FormProps } from '@king-one/form-design/src/types';
|
|
2
2
|
import { Ref, VNode, CSSProperties } from 'vue';
|
|
3
|
+
import { Field } from './Field';
|
|
4
|
+
import { SyncBailHook, UnsetAdditionalOptions } from '@king-one/tapable';
|
|
3
5
|
export declare class FormDesign {
|
|
4
6
|
schema: DesignSchema[];
|
|
5
7
|
private heart;
|
|
8
|
+
private plugin;
|
|
6
9
|
private FormSchema;
|
|
7
10
|
private props;
|
|
8
11
|
checkedField: Ref<{
|
|
9
12
|
title?: string | undefined;
|
|
10
13
|
key?: string | undefined;
|
|
11
|
-
type?: "string" | "number" | "boolean" | "object" | "
|
|
14
|
+
type?: "string" | "number" | "boolean" | "object" | "array" | "void" | undefined;
|
|
12
15
|
'k-component'?: string | undefined;
|
|
16
|
+
enum?: any[] | undefined;
|
|
17
|
+
items?: {
|
|
18
|
+
title: string;
|
|
19
|
+
key: string;
|
|
20
|
+
type: valueType;
|
|
21
|
+
'k-component': string;
|
|
22
|
+
enum?: any[] | undefined;
|
|
23
|
+
items?: any[] | undefined;
|
|
24
|
+
children?: any[] | undefined;
|
|
25
|
+
required?: boolean | undefined;
|
|
26
|
+
id?: string | undefined;
|
|
27
|
+
name?: string | undefined;
|
|
28
|
+
icon?: (string | VNode) | undefined;
|
|
29
|
+
'k-design-props'?: {
|
|
30
|
+
[x: string]: any;
|
|
31
|
+
unDragTo?: string[] | undefined;
|
|
32
|
+
validate?: {
|
|
33
|
+
status: "success" | "error" | "warning" | "";
|
|
34
|
+
message: string;
|
|
35
|
+
} | undefined;
|
|
36
|
+
} | undefined;
|
|
37
|
+
'k-component-props'?: Record<string, any> | undefined;
|
|
38
|
+
'k-decorator-props'?: {
|
|
39
|
+
[x: string]: any;
|
|
40
|
+
} | undefined;
|
|
41
|
+
}[] | undefined;
|
|
42
|
+
children?: {
|
|
43
|
+
title: string;
|
|
44
|
+
key: string;
|
|
45
|
+
type: valueType;
|
|
46
|
+
'k-component': string;
|
|
47
|
+
enum?: any[] | undefined;
|
|
48
|
+
items?: any[] | undefined;
|
|
49
|
+
children?: any[] | undefined;
|
|
50
|
+
required?: boolean | undefined;
|
|
51
|
+
id?: string | undefined;
|
|
52
|
+
name?: string | undefined;
|
|
53
|
+
icon?: (string | VNode) | undefined;
|
|
54
|
+
'k-design-props'?: {
|
|
55
|
+
[x: string]: any;
|
|
56
|
+
unDragTo?: string[] | undefined;
|
|
57
|
+
validate?: {
|
|
58
|
+
status: "success" | "error" | "warning" | "";
|
|
59
|
+
message: string;
|
|
60
|
+
} | undefined;
|
|
61
|
+
} | undefined;
|
|
62
|
+
'k-component-props'?: Record<string, any> | undefined;
|
|
63
|
+
'k-decorator-props'?: {
|
|
64
|
+
[x: string]: any;
|
|
65
|
+
} | undefined;
|
|
66
|
+
}[] | undefined;
|
|
13
67
|
required?: boolean | undefined;
|
|
14
68
|
id?: string | undefined;
|
|
15
69
|
name?: string | undefined;
|
|
16
70
|
icon?: (string | VNode) | undefined;
|
|
71
|
+
'k-design-props'?: {
|
|
72
|
+
[x: string]: any;
|
|
73
|
+
unDragTo?: string[] | undefined;
|
|
74
|
+
validate?: {
|
|
75
|
+
status: "success" | "error" | "warning" | "";
|
|
76
|
+
message: string;
|
|
77
|
+
} | undefined;
|
|
78
|
+
} | undefined;
|
|
17
79
|
'k-component-props'?: Record<string, any> | undefined;
|
|
80
|
+
'k-decorator-props'?: {
|
|
81
|
+
[x: string]: any;
|
|
82
|
+
} | undefined;
|
|
18
83
|
}, Partial<FieldSchema> | {
|
|
19
84
|
title?: string | undefined;
|
|
20
85
|
key?: string | undefined;
|
|
21
|
-
type?: "string" | "number" | "boolean" | "object" | "
|
|
86
|
+
type?: "string" | "number" | "boolean" | "object" | "array" | "void" | undefined;
|
|
22
87
|
'k-component'?: string | undefined;
|
|
88
|
+
enum?: any[] | undefined;
|
|
89
|
+
items?: {
|
|
90
|
+
title: string;
|
|
91
|
+
key: string;
|
|
92
|
+
type: valueType;
|
|
93
|
+
'k-component': string;
|
|
94
|
+
enum?: any[] | undefined;
|
|
95
|
+
items?: any[] | undefined;
|
|
96
|
+
children?: any[] | undefined;
|
|
97
|
+
required?: boolean | undefined;
|
|
98
|
+
id?: string | undefined;
|
|
99
|
+
name?: string | undefined;
|
|
100
|
+
icon?: (string | VNode) | undefined;
|
|
101
|
+
'k-design-props'?: {
|
|
102
|
+
[x: string]: any;
|
|
103
|
+
unDragTo?: string[] | undefined;
|
|
104
|
+
validate?: {
|
|
105
|
+
status: "success" | "error" | "warning" | "";
|
|
106
|
+
message: string;
|
|
107
|
+
} | undefined;
|
|
108
|
+
} | undefined;
|
|
109
|
+
'k-component-props'?: Record<string, any> | undefined;
|
|
110
|
+
'k-decorator-props'?: {
|
|
111
|
+
[x: string]: any;
|
|
112
|
+
} | undefined;
|
|
113
|
+
}[] | undefined;
|
|
114
|
+
children?: {
|
|
115
|
+
title: string;
|
|
116
|
+
key: string;
|
|
117
|
+
type: valueType;
|
|
118
|
+
'k-component': string;
|
|
119
|
+
enum?: any[] | undefined;
|
|
120
|
+
items?: any[] | undefined;
|
|
121
|
+
children?: any[] | undefined;
|
|
122
|
+
required?: boolean | undefined;
|
|
123
|
+
id?: string | undefined;
|
|
124
|
+
name?: string | undefined;
|
|
125
|
+
icon?: (string | VNode) | undefined;
|
|
126
|
+
'k-design-props'?: {
|
|
127
|
+
[x: string]: any;
|
|
128
|
+
unDragTo?: string[] | undefined;
|
|
129
|
+
validate?: {
|
|
130
|
+
status: "success" | "error" | "warning" | "";
|
|
131
|
+
message: string;
|
|
132
|
+
} | undefined;
|
|
133
|
+
} | undefined;
|
|
134
|
+
'k-component-props'?: Record<string, any> | undefined;
|
|
135
|
+
'k-decorator-props'?: {
|
|
136
|
+
[x: string]: any;
|
|
137
|
+
} | undefined;
|
|
138
|
+
}[] | undefined;
|
|
23
139
|
required?: boolean | undefined;
|
|
24
140
|
id?: string | undefined;
|
|
25
141
|
name?: string | undefined;
|
|
26
142
|
icon?: (string | VNode) | undefined;
|
|
143
|
+
'k-design-props'?: {
|
|
144
|
+
[x: string]: any;
|
|
145
|
+
unDragTo?: string[] | undefined;
|
|
146
|
+
validate?: {
|
|
147
|
+
status: "success" | "error" | "warning" | "";
|
|
148
|
+
message: string;
|
|
149
|
+
} | undefined;
|
|
150
|
+
} | undefined;
|
|
27
151
|
'k-component-props'?: Record<string, any> | undefined;
|
|
152
|
+
'k-decorator-props'?: {
|
|
153
|
+
[x: string]: any;
|
|
154
|
+
} | undefined;
|
|
28
155
|
}>;
|
|
156
|
+
shared: {
|
|
157
|
+
draggedContext: {
|
|
158
|
+
key: string;
|
|
159
|
+
};
|
|
160
|
+
panelWidgets: Record<string, WidgetComponentType>;
|
|
161
|
+
widgetProps: Record<string, WidgetsPropsType>;
|
|
162
|
+
};
|
|
163
|
+
extendFormProps: NonNullable<DesignParams["extendFormProps"]>;
|
|
29
164
|
constructor(params: DesignParams);
|
|
30
|
-
|
|
165
|
+
use(plugin: FormDesignPlugin): void;
|
|
166
|
+
notify: (type: string, ...args: any[]) => void;
|
|
31
167
|
getFormSchema(): {
|
|
32
168
|
version: string;
|
|
33
169
|
form: {
|
|
34
|
-
schema: {
|
|
35
|
-
title: string;
|
|
36
|
-
key: string;
|
|
37
|
-
type: valueType;
|
|
38
|
-
'k-component': string;
|
|
39
|
-
required?: boolean | undefined;
|
|
40
|
-
id?: string | undefined;
|
|
41
|
-
name?: string | undefined;
|
|
42
|
-
icon?: (string | VNode) | undefined;
|
|
43
|
-
'k-component-props'?: Record<string, any> | undefined;
|
|
44
|
-
}[];
|
|
170
|
+
schema: {};
|
|
45
171
|
layout: "horizontal" | "vertical";
|
|
46
172
|
labelAlign: "left" | "right" | "top";
|
|
47
173
|
style?: CSSProperties;
|
|
48
174
|
};
|
|
49
175
|
};
|
|
50
|
-
|
|
176
|
+
getFieldList(): Field[];
|
|
177
|
+
private get lifecycles();
|
|
178
|
+
getFormProps(): FormProps;
|
|
179
|
+
get hooks(): {
|
|
180
|
+
beforeDelete: SyncBailHook<FieldSchema, boolean, UnsetAdditionalOptions>;
|
|
181
|
+
};
|
|
51
182
|
get fields(): Ref<{
|
|
52
183
|
title: string;
|
|
53
184
|
key: string;
|
|
54
185
|
type: valueType;
|
|
55
186
|
'k-component': string;
|
|
187
|
+
enum?: any[] | undefined;
|
|
188
|
+
items?: any[] | undefined;
|
|
189
|
+
children?: any[] | undefined;
|
|
56
190
|
required?: boolean | undefined;
|
|
57
191
|
id?: string | undefined;
|
|
58
192
|
name?: string | undefined;
|
|
59
193
|
icon?: (string | VNode) | undefined;
|
|
194
|
+
'k-design-props'?: {
|
|
195
|
+
[x: string]: any;
|
|
196
|
+
unDragTo?: string[] | undefined;
|
|
197
|
+
validate?: {
|
|
198
|
+
status: "success" | "error" | "warning" | "";
|
|
199
|
+
message: string;
|
|
200
|
+
} | undefined;
|
|
201
|
+
} | undefined;
|
|
60
202
|
'k-component-props'?: Record<string, any> | undefined;
|
|
203
|
+
'k-decorator-props'?: {
|
|
204
|
+
[x: string]: any;
|
|
205
|
+
} | undefined;
|
|
61
206
|
}[], FieldSchema[] | {
|
|
62
207
|
title: string;
|
|
63
208
|
key: string;
|
|
64
209
|
type: valueType;
|
|
65
210
|
'k-component': string;
|
|
211
|
+
enum?: any[] | undefined;
|
|
212
|
+
items?: any[] | undefined;
|
|
213
|
+
children?: any[] | undefined;
|
|
66
214
|
required?: boolean | undefined;
|
|
67
215
|
id?: string | undefined;
|
|
68
216
|
name?: string | undefined;
|
|
69
217
|
icon?: (string | VNode) | undefined;
|
|
218
|
+
'k-design-props'?: {
|
|
219
|
+
[x: string]: any;
|
|
220
|
+
unDragTo?: string[] | undefined;
|
|
221
|
+
validate?: {
|
|
222
|
+
status: "success" | "error" | "warning" | "";
|
|
223
|
+
message: string;
|
|
224
|
+
} | undefined;
|
|
225
|
+
} | undefined;
|
|
70
226
|
'k-component-props'?: Record<string, any> | undefined;
|
|
227
|
+
'k-decorator-props'?: {
|
|
228
|
+
[x: string]: any;
|
|
229
|
+
} | undefined;
|
|
71
230
|
}[]>;
|
|
72
|
-
get propsComponents(): Record<string, VueComponent> | undefined;
|
|
73
|
-
get panelComponents(): Record<string, VueComponent>;
|
|
74
231
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FieldSchema, FormProps, valueType } from '@king-one/form-design/src/types';
|
|
2
|
+
import { Field } from './Field';
|
|
2
3
|
import { Ref, VNode, CSSProperties } from 'vue';
|
|
3
4
|
export declare class FormSchema {
|
|
4
5
|
private version;
|
|
@@ -8,39 +9,60 @@ export declare class FormSchema {
|
|
|
8
9
|
key: string;
|
|
9
10
|
type: valueType;
|
|
10
11
|
'k-component': string;
|
|
12
|
+
enum?: any[] | undefined;
|
|
13
|
+
items?: any[] | undefined;
|
|
14
|
+
children?: any[] | undefined;
|
|
11
15
|
required?: boolean | undefined;
|
|
12
16
|
id?: string | undefined;
|
|
13
17
|
name?: string | undefined;
|
|
14
18
|
icon?: (string | VNode) | undefined;
|
|
19
|
+
'k-design-props'?: {
|
|
20
|
+
[x: string]: any;
|
|
21
|
+
unDragTo?: string[] | undefined;
|
|
22
|
+
validate?: {
|
|
23
|
+
status: "success" | "error" | "warning" | "";
|
|
24
|
+
message: string;
|
|
25
|
+
} | undefined;
|
|
26
|
+
} | undefined;
|
|
15
27
|
'k-component-props'?: Record<string, any> | undefined;
|
|
28
|
+
'k-decorator-props'?: {
|
|
29
|
+
[x: string]: any;
|
|
30
|
+
} | undefined;
|
|
16
31
|
}[], FieldSchema[] | {
|
|
17
32
|
title: string;
|
|
18
33
|
key: string;
|
|
19
34
|
type: valueType;
|
|
20
35
|
'k-component': string;
|
|
36
|
+
enum?: any[] | undefined;
|
|
37
|
+
items?: any[] | undefined;
|
|
38
|
+
children?: any[] | undefined;
|
|
21
39
|
required?: boolean | undefined;
|
|
22
40
|
id?: string | undefined;
|
|
23
41
|
name?: string | undefined;
|
|
24
42
|
icon?: (string | VNode) | undefined;
|
|
43
|
+
'k-design-props'?: {
|
|
44
|
+
[x: string]: any;
|
|
45
|
+
unDragTo?: string[] | undefined;
|
|
46
|
+
validate?: {
|
|
47
|
+
status: "success" | "error" | "warning" | "";
|
|
48
|
+
message: string;
|
|
49
|
+
} | undefined;
|
|
50
|
+
} | undefined;
|
|
25
51
|
'k-component-props'?: Record<string, any> | undefined;
|
|
52
|
+
'k-decorator-props'?: {
|
|
53
|
+
[x: string]: any;
|
|
54
|
+
} | undefined;
|
|
26
55
|
}[]>;
|
|
27
56
|
getSchema(): {
|
|
28
57
|
version: string;
|
|
29
58
|
form: {
|
|
30
|
-
schema: {
|
|
31
|
-
title: string;
|
|
32
|
-
key: string;
|
|
33
|
-
type: valueType;
|
|
34
|
-
'k-component': string;
|
|
35
|
-
required?: boolean | undefined;
|
|
36
|
-
id?: string | undefined;
|
|
37
|
-
name?: string | undefined;
|
|
38
|
-
icon?: (string | VNode) | undefined;
|
|
39
|
-
'k-component-props'?: Record<string, any> | undefined;
|
|
40
|
-
}[];
|
|
59
|
+
schema: {};
|
|
41
60
|
layout: "horizontal" | "vertical";
|
|
42
61
|
labelAlign: "left" | "right" | "top";
|
|
43
62
|
style?: CSSProperties;
|
|
44
63
|
};
|
|
45
64
|
};
|
|
65
|
+
getFieldList(): Field[];
|
|
66
|
+
private jsonToschema;
|
|
67
|
+
private omit;
|
|
46
68
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FormDesignInstance } from '../types';
|
|
1
|
+
import { FieldSchema, FormDesignInstance } from '../types';
|
|
2
2
|
type EffectFn<T extends any[]> = (callback: (...args: T & any[]) => void) => void;
|
|
3
3
|
export declare const onDesignInit: EffectFn<[FormDesignInstance]>;
|
|
4
|
-
export declare const onDesignFieldChange: EffectFn<[FormDesignInstance]>;
|
|
4
|
+
export declare const onDesignFieldChange: EffectFn<[FieldSchema, FormDesignInstance]>;
|
|
5
5
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InjectionKey, Ref, ComputedRef } from 'vue';
|
|
2
|
-
export declare const defaultNamespace = "k-
|
|
2
|
+
export declare const defaultNamespace = "k-design";
|
|
3
3
|
export declare const namespaceContextKey: InjectionKey<Ref<string | undefined>>;
|
|
4
4
|
export declare function useGetDerivedNamespace(namespaceOverrides?: Ref<string | undefined>): ComputedRef<string>;
|
|
5
5
|
export declare function useNamespace(block: string, namespaceOverrides?: Ref<string | undefined>): {
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
export { default as FormPanelItem } from './components/panel/panel-item.vue';
|
|
2
|
+
export { useInjectDesignContext } from './context/design';
|
|
1
3
|
export { default as FormDesign } from './components/form-desgin';
|
|
2
4
|
export { CreateFormDesign } from './core/index';
|
|
3
5
|
export * from './config';
|
|
6
|
+
export * from './effects/onEffects';
|
|
4
7
|
export type { DesignSchema } from './types';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SyncBailHook, UnsetAdditionalOptions } from '@king-one/tapable';
|
|
2
|
+
import { FieldSchema, FormDesignPlugin } from '../types';
|
|
3
|
+
export declare class Plugin {
|
|
4
|
+
readonly hooks: {
|
|
5
|
+
beforeDelete: SyncBailHook<FieldSchema, boolean, UnsetAdditionalOptions>;
|
|
6
|
+
};
|
|
7
|
+
use(plugIn: FormDesignPlugin): void;
|
|
8
|
+
}
|