@schemx/vue 1.0.0-next.4 → 1.0.0-next.6
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/README.md +42 -38
- package/dist/analyze.html +1 -1
- package/dist/components/Col/index.d.ts +31 -0
- package/dist/components/Col/index.d.ts.map +1 -0
- package/dist/components/ConfigProvider/index.d.ts +13 -3
- package/dist/components/ConfigProvider/index.d.ts.map +1 -1
- package/dist/components/Dynamic/index.d.ts +17 -1
- package/dist/components/Dynamic/index.d.ts.map +1 -1
- package/dist/components/Group/index.d.ts +16 -1
- package/dist/components/Group/index.d.ts.map +1 -1
- package/dist/components/SchemaList/index.d.ts +58 -0
- package/dist/components/SchemaList/index.d.ts.map +1 -0
- package/dist/components/Wrapper/index.vue.d.ts +29 -0
- package/dist/components/Wrapper/index.vue.d.ts.map +1 -0
- package/dist/config/appConfig.d.ts +3 -3
- package/dist/config/appConfig.d.ts.map +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/providerConfig.d.ts +10 -3
- package/dist/config/providerConfig.d.ts.map +1 -1
- package/dist/form.d.ts +2 -2
- package/dist/form.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +324 -78
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/form.d.ts +3 -2
- package/dist/types/form.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/layout.d.ts +26 -0
- package/dist/types/layout.d.ts.map +1 -0
- package/dist/utils/colProvider.d.ts +20 -0
- package/dist/utils/colProvider.d.ts.map +1 -0
- package/package.json +5 -6
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--schemx-primary-color: #2f6bff;--schemx-primary-color-light: #eaf2ff;--schemx-text-color: #323233;--schemx-text-color-secondary: #666666;--schemx-text-color-placeholder: #c8c9cc;--schemx-readonly-color: #969799;--schemx-disabled-color: #c8c9cc;--schemx-disabled-opacity: .6;--schemx-background-color: #ffffff;--schemx-background-color-light: #f3f4f6;--schemx-border-color: #ebedf0;--schemx-danger-color: #ee0a24;--schemx-success-color: #07c160;--schemx-warning-color: #ff976a;--schemx-padding-base: 4px;--schemx-padding-xs: 8px;--schemx-padding-sm: 12px;--schemx-padding-md: 16px;--schemx-padding-lg: 24px;--schemx-font-size-xs: 10px;--schemx-font-size-sm: 12px;--schemx-font-size-md: 14px;--schemx-font-size-lg: 16px;--schemx-border-radius-xs: 2px;--schemx-border-radius-sm: 4px;--schemx-border-radius-md: 8px;--schemx-border-radius-lg: 12px;--schemx-form-padding-bottom: 15px;--schemx-schemas-padding-inline: 6px;--schemx-field-gap: 16px;--schemx-field-line-height: 1.6;--schemx-field-error-line-height: 1.5714285714285714;--schemx-field-label-color: #666666;--schemx-field-label-top-gap: 4px;--schemx-field-content-padding-inline: 6px;--schemx-field-required-gap: 2px;--schemx-field-error-gap: 6px;--schemx-content-align: right;--schemx-error-align: right;--schemx-group-arrow-size: 5px;--schemx-group-arrow-duration: .2s}.schemx-field-wrapper{position:relative;background-color:var(--schemx-background-color)}.schemx-field-wrapper--first{border-top-left-radius:var(--schemx-border-radius-md);border-top-right-radius:var(--schemx-border-radius-md)}.schemx-field-wrapper--last{border-bottom-left-radius:var(--schemx-border-radius-md);border-bottom-right-radius:var(--schemx-border-radius-md);margin-bottom:var(--schemx-padding-sm)}.schemx>.schemx-field-wrapper--last:last-child,.schemx>.schemx-field-wrapper--last:has(+.schemx-actions){margin-bottom:0}.
|
|
1
|
+
:root{--schemx-primary-color: #2f6bff;--schemx-primary-color-light: #eaf2ff;--schemx-text-color: #323233;--schemx-text-color-secondary: #666666;--schemx-text-color-placeholder: #c8c9cc;--schemx-readonly-color: #969799;--schemx-disabled-color: #c8c9cc;--schemx-disabled-opacity: .6;--schemx-background-color: #ffffff;--schemx-background-color-light: #f3f4f6;--schemx-border-color: #ebedf0;--schemx-danger-color: #ee0a24;--schemx-success-color: #07c160;--schemx-warning-color: #ff976a;--schemx-padding-base: 4px;--schemx-padding-xs: 8px;--schemx-padding-sm: 12px;--schemx-padding-md: 16px;--schemx-padding-lg: 24px;--schemx-font-size-xs: 10px;--schemx-font-size-sm: 12px;--schemx-font-size-md: 14px;--schemx-font-size-lg: 16px;--schemx-border-radius-xs: 2px;--schemx-border-radius-sm: 4px;--schemx-border-radius-md: 8px;--schemx-border-radius-lg: 12px;--schemx-form-padding-bottom: 15px;--schemx-schemas-padding-inline: 6px;--schemx-field-gap: 16px;--schemx-field-line-height: 1.6;--schemx-field-error-line-height: 1.5714285714285714;--schemx-field-label-color: #666666;--schemx-field-label-top-gap: 4px;--schemx-field-content-padding-inline: 6px;--schemx-field-required-gap: 2px;--schemx-field-error-gap: 6px;--schemx-content-align: right;--schemx-error-align: right;--schemx-group-arrow-size: 5px;--schemx-group-arrow-duration: .2s}.schemx-row{display:flex;flex-wrap:wrap;width:100%}.schemx-col{box-sizing:border-box;min-width:0}.schemx>.schemx-row:has(+.schemx-actions)>.schemx-col:last-child>.schemx-field-wrapper--last,.schemx>.schemx-row:has(+.schemx-actions)>.schemx-col:last-child>.schemx-group-wrapper{margin-bottom:0}.schemx-group__body>.schemx-row>.schemx-col:last-child>.schemx-field-wrapper .schemx-field:after{display:none}.schemx-field-wrapper{position:relative;background-color:var(--schemx-background-color)}.schemx-field-wrapper--first{border-top-left-radius:var(--schemx-border-radius-md);border-top-right-radius:var(--schemx-border-radius-md)}.schemx-field-wrapper--last{border-bottom-left-radius:var(--schemx-border-radius-md);border-bottom-right-radius:var(--schemx-border-radius-md);margin-bottom:var(--schemx-padding-sm)}.schemx>.schemx-field-wrapper--last:last-child,.schemx>.schemx-field-wrapper--last:has(+.schemx-actions){margin-bottom:0}.schemx-field{display:flex;align-items:flex-start;justify-content:space-between;padding-inline:var(--schemx-padding-md);padding-block:var(--schemx-padding-md);line-height:var(--schemx-field-line-height);gap:var(--schemx-field-gap)}.schemx-field:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:var(--schemx-padding-md);bottom:0;left:var(--schemx-padding-md);border-bottom:1px solid var(--schemx-border-color);transform:scaleY(.5)}.schemx-field-wrapper--last .schemx-field:after{display:none}.schemx-field--label-left{flex-direction:row}.schemx-field--label-right{flex-direction:row-reverse}.schemx-field--label-right .schemx-field__label{margin-right:0;margin-left:var(--schemx-padding-xs)}.schemx-field--label-top{flex-direction:column}.schemx-field--label-top .schemx-field__label{margin-right:0;margin-bottom:var(--schemx-field-label-top-gap);width:auto}.schemx-field__label{position:relative;display:flex;align-items:center;flex-shrink:0;color:var(--schemx-field-label-color);font-size:var(--schemx-font-size-md);margin-right:var(--schemx-padding-xs);line-height:var(--schemx-field-line-height)}.schemx-field__required{color:var(--schemx-danger-color);margin-right:var(--schemx-field-required-gap);position:absolute;top:2px;left:-8px}.schemx-field__content{flex:1;min-width:0;max-width:70%}.schemx-field__control{text-align:var(--schemx-content-align)}.schemx-field__control .schemx-renderer{width:100%}.schemx-field__error{color:var(--schemx-danger-color);font-size:var(--schemx-font-size-sm);text-align:var(--schemx-error-align, right);line-height:var(--schemx-field-error-line-height);margin-top:var(--schemx-field-error-gap)}.schemx-field--label-top>.schemx-field__content{box-sizing:border-box;width:100%;max-width:none}.schemx-group-wrapper{position:relative;margin-bottom:var(--schemx-padding-sm);background-color:var(--schemx-background-color);padding:0 var(--schemx-padding-md);border-radius:var(--schemx-border-radius-md)}.schemx>.schemx-group-wrapper:last-child,.schemx>.schemx-group-wrapper:has(+.schemx-actions){margin-bottom:0}.schemx-group__header{display:flex;align-items:center;justify-content:space-between;padding-block:var(--schemx-padding-md);-webkit-user-select:none;user-select:none}.schemx-group__header--clickable{cursor:pointer}.schemx-group__title{font-size:var(--schemx-font-size-lg);font-weight:500;color:var(--schemx-text-color)}.schemx-group__arrow{display:inline-block;width:0;height:0;border-left:var(--schemx-group-arrow-size) solid transparent;border-right:var(--schemx-group-arrow-size) solid transparent;border-bottom:var(--schemx-group-arrow-size) solid var(--schemx-text-color-secondary);transition:transform var(--schemx-group-arrow-duration) ease}.schemx-group__arrow--down{transform:rotate(180deg)}.schemx-group__body>.schemx-field-wrapper:last-child .schemx-field:after{display:none}.schemx-group__body>.schemx-field-wrapper>.schemx-field{padding-inline:var(--schemx-padding-xs)}.schemx{box-sizing:border-box;padding-bottom:var(--schemx-form-padding-bottom)}.schemx-actions{display:flex;align-items:center;justify-content:flex-end;gap:var(--schemx-padding-sm);padding:var(--schemx-padding-md) 0}.schemx-schemas{background-color:var(--schemx-background-color);padding:var(--schemx-padding-md) var(--schemx-schemas-padding-inline);border-radius:var(--schemx-border-radius-lg)}.schemx-schemas-title{display:flex;align-items:center;padding-left:var(--schemx-padding-md);padding-bottom:var(--schemx-padding-xs)}.schemx-schemas-title-icon{margin-right:var(--schemx-padding-xs)}.schemx-schemas-title-label{font-size:var(--schemx-font-size-md);color:var(--schemx-text-color)}.schemx-renderer-readonly{color:var(--schemx-readonly-color);cursor:default}.is-disabled{opacity:.6}.is-readonly,.is-disabled .is-disabled{opacity:1}.schemx-button{box-sizing:content-box;flex:1;display:inline-flex;align-items:center;justify-content:center;gap:var(--schemx-padding-xs);min-width:72px;height:24px;padding:var(--schemx-padding-xs) var(--schemx-padding-md);border:1px solid var(--schemx-border-color);border-radius:var(--schemx-border-radius-sm);background:var(--schemx-background-color);color:var(--schemx-text-color);cursor:pointer;transition:border-color .15s ease,background-color .15s ease,color .15s ease,transform .1s ease}.schemx-button:not(:disabled):hover{opacity:.8}.schemx-button:not(:disabled):active{transform:scale(.98)}.schemx-button--small{min-width:56px;height:20px;padding:var(--schemx-padding-base) var(--schemx-padding-sm);font-size:var(--schemx-font-size-sm)}.schemx-button--large{min-width:88px;height:28px;padding:var(--schemx-padding-sm) var(--schemx-padding-lg);font-size:var(--schemx-font-size-lg)}.schemx-button__loading{display:inline-block;border-radius:50%;vertical-align:-.15em;animation:schemx-button-loading .8s linear infinite}.schemx-actions-button--submit{border-color:var(--schemx-primary-color);background:var(--schemx-primary-color);color:#fff}.schemx-actions-button--submit:not(:disabled):hover{filter:brightness(.92);color:#fff}.schemx-button:disabled{cursor:not-allowed;opacity:var(--schemx-disabled-opacity)}@keyframes schemx-button-loading{to{transform:rotate(360deg)}}.schemx-wrapper{box-sizing:border-box;width:100%}.schemx-wrapper--readonly{color:var(--schemx-wrapper-readonly-color, var(--schemx-readonly-color, #969799));cursor:default}.schemx-wrapper--disabled{opacity:var(--schemx-disabled-opacity, .6);cursor:not-allowed}.is-disabled .schemx-wrapper--disabled{opacity:1}
|
package/dist/types/form.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ClassValue, StyleValue } from 'vue';
|
|
2
|
+
import { SchemxVueConfig } from './layout';
|
|
2
3
|
import { SchemxButtonProps } from '../components/Button';
|
|
3
|
-
import { DefinedFieldValue, FormCallbackOptions, FormLifecycleOptions, FormPerformanceOptions, NamePath, RequiredConfig,
|
|
4
|
+
import { DefinedFieldValue, FormCallbackOptions, FormLifecycleOptions, FormPerformanceOptions, NamePath, RequiredConfig, SchemxFieldRulesMap, SchemxInstance, SchemxSchemasInput, ValidationTrigger, Values } from '@schemx/core';
|
|
4
5
|
/**
|
|
5
6
|
* Vue 需要在编译 `defineProps` 时直接读取 Props 的字段列表。
|
|
6
7
|
*
|
|
@@ -46,7 +47,7 @@ export type SchemxFormAction = boolean | SchemxFormActionConfig;
|
|
|
46
47
|
*
|
|
47
48
|
* @typeParam TValues - 表单值类型
|
|
48
49
|
*/
|
|
49
|
-
export interface SchemxFormProps<TValues extends Values = Values> extends Omit<
|
|
50
|
+
export interface SchemxFormProps<TValues extends Values = Values> extends Omit<SchemxVueConfig<TValues>, "schemaConfig">, FormCallbackOptions<TValues>, FormLifecycleOptions<TValues>, FormPerformanceOptions, SchemxFormSchemaConfigProps<TValues> {
|
|
50
51
|
/**
|
|
51
52
|
* 初始 Schema 列表。
|
|
52
53
|
*/
|
package/dist/types/form.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/types/form.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAEjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,KAAK,EACV,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,QAAQ,EACR,cAAc,EACd,
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/types/form.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAEjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,KAAK,EACV,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,QAAQ,EACR,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,MAAM,EACP,MAAM,cAAc,CAAA;AAErB;;;;;;GAMG;AACH,UAAU,2BAA2B,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM;IACnE,QAAQ,CAAC,EAAE,cAAc,CAAC,iBAAiB,CAAC,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAA;IACxC,aAAa,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,CAAA;IACxC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAA;IAC1C,iBAAiB,CAAC,EAAE,iBAAiB,GAAG,iBAAiB,EAAE,CAAA;IAC3D,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,WAAW,CAAC,EAAE,IAAI,CAAC,iBAAiB,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;CAC1D;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,sBAAsB,CAAA;AAE/D;;;;GAIG;AACH,MAAM,WAAW,eAAe,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM,CAC9D,SACE,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC,EAC9C,mBAAmB,CAAC,OAAO,CAAC,EAC5B,oBAAoB,CAAC,OAAO,CAAC,EAC7B,sBAAsB,EACtB,2BAA2B,CAAC,OAAO,CAAC;IACtC;;OAEG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAA;IAErC;;OAEG;IACH,UAAU,CAAC,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAA;IAEzC;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;OAEG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAA;IAE9B;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;OAEG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAA;IAE5B;;OAEG;IACH,QAAQ,CAAC,EAAE,gBAAgB,CAAA;IAE3B;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAA;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAA;CACnB"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAErC,OAAO,QAAQ,cAAc,CAAC;IAC5B,UAAU,qBAAqB;QAC7B,oCAAoC;QACpC,KAAK,CAAC,EAAE,MAAM,CAAA;QAEd,iCAAiC;QACjC,KAAK,CAAC,EAAE,UAAU,CAAA;KACnB;IAED,UAAU,0BAA0B;QAClC,oCAAoC;QACpC,KAAK,CAAC,EAAE,MAAM,CAAA;QAEd,iCAAiC;QACjC,KAAK,CAAC,EAAE,UAAU,CAAA;KACnB;CACF;AAED,cAAc,cAAc,CAAA;AAE5B,cAAc,QAAQ,CAAA;AAEtB,cAAc,SAAS,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAErC,OAAO,QAAQ,cAAc,CAAC;IAC5B,UAAU,qBAAqB;QAC7B,oCAAoC;QACpC,KAAK,CAAC,EAAE,MAAM,CAAA;QAEd,iCAAiC;QACjC,KAAK,CAAC,EAAE,UAAU,CAAA;KACnB;IAED,UAAU,0BAA0B;QAClC,oCAAoC;QACpC,KAAK,CAAC,EAAE,MAAM,CAAA;QAEd,iCAAiC;QACjC,KAAK,CAAC,EAAE,UAAU,CAAA;KACnB;CACF;AAED,cAAc,cAAc,CAAA;AAE5B,cAAc,QAAQ,CAAA;AAEtB,cAAc,SAAS,CAAA;AAEvB,cAAc,UAAU,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
import { SchemxConfig, SchemxLayout, Values } from '@schemx/core';
|
|
3
|
+
/** UI 组件库 Col 组件的 Vue 组件类型。 */
|
|
4
|
+
export type SchemxColComponent = Component;
|
|
5
|
+
/**
|
|
6
|
+
* Col 包装组件属性。
|
|
7
|
+
*
|
|
8
|
+
* `component` 仅供 Schemx 内部把 Form 解析出的实现传给 Col;普通调用方通常只需
|
|
9
|
+
* 提供 `layout`,组件会从显式组件属性或全局注册表解析实现。
|
|
10
|
+
*/
|
|
11
|
+
export interface SchemxColProps {
|
|
12
|
+
/** 当前 Schema 的静态布局元数据。 */
|
|
13
|
+
layout?: SchemxLayout;
|
|
14
|
+
/** 当前 Form 解析出的 Col 实现。 */
|
|
15
|
+
component?: SchemxColComponent;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Vue 适配层配置。
|
|
19
|
+
*
|
|
20
|
+
* Core 配置保持框架无关;`colComponent` 仅供 Vue 渲染层解析布局组件。
|
|
21
|
+
*/
|
|
22
|
+
export interface SchemxVueConfig<TValues extends Values = Values> extends SchemxConfig<TValues> {
|
|
23
|
+
/** 当前 App、Provider 或 Form 使用的 Col 实现。 */
|
|
24
|
+
readonly colComponent?: SchemxColComponent;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/types/layout.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAEpC,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAEtE,+BAA+B;AAC/B,MAAM,MAAM,kBAAkB,GAAG,SAAS,CAAA;AAE1C;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,0BAA0B;IAC1B,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,kBAAkB,CAAA;CAC/B;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe,CAC9B,OAAO,SAAS,MAAM,GAAG,MAAM,CAC/B,SAAQ,YAAY,CAAC,OAAO,CAAC;IAC7B,yCAAyC;IACzC,QAAQ,CAAC,YAAY,CAAC,EAAE,kBAAkB,CAAA;CAC3C"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SchemxColComponent } from '../types/layout';
|
|
2
|
+
/** 当前全局注册的 Col 组件。 */
|
|
3
|
+
export declare const registeredColComponent: import('vue').ShallowRef<SchemxColComponent | undefined, SchemxColComponent | undefined>;
|
|
4
|
+
/**
|
|
5
|
+
* 注册全局 Col 组件。
|
|
6
|
+
*
|
|
7
|
+
* 后续注册会覆盖当前全局组件;App、ConfigProvider 和 Form 的局部配置拥有更高优先级。
|
|
8
|
+
*
|
|
9
|
+
* @param component - UI 组件库提供的 Col 组件。
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* import { Col } from "vant"
|
|
14
|
+
* import { registerCol } from "@schemx/vue"
|
|
15
|
+
*
|
|
16
|
+
* registerCol(Col)
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare function registerCol(component: SchemxColComponent): void;
|
|
20
|
+
//# sourceMappingURL=colProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colProvider.d.ts","sourceRoot":"","sources":["../../src/utils/colProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAEzD,sBAAsB;AACtB,eAAO,MAAM,sBAAsB,0FAAmC,CAAA;AAEtE;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,kBAAkB,GAAG,IAAI,CAE/D"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@schemx/vue",
|
|
4
|
-
"version": "1.0.0-next.
|
|
4
|
+
"version": "1.0.0-next.6",
|
|
5
5
|
"description": "基于 JSON Schema 配置的 Vue 3 动态表单引擎(UI 无关核心)",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"schemx",
|
|
@@ -47,21 +47,20 @@
|
|
|
47
47
|
"**/index.ts"
|
|
48
48
|
],
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"vue": "^3.0.0"
|
|
51
|
-
"@schemx/core": "1.0.0-next.4"
|
|
50
|
+
"vue": "^3.0.0"
|
|
52
51
|
},
|
|
53
52
|
"dependencies": {
|
|
54
53
|
"classnames": "^2.5.1",
|
|
55
54
|
"csstype": "^3.2.3",
|
|
56
|
-
"es-toolkit": "^1.47.0"
|
|
55
|
+
"es-toolkit": "^1.47.0",
|
|
56
|
+
"@schemx/core": "1.0.0-next.6"
|
|
57
57
|
},
|
|
58
58
|
"license": "MIT",
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@vue/test-utils": "^2.4.6",
|
|
61
61
|
"vue": "^3.4.0",
|
|
62
62
|
"vue-tsc": "^3.3.9",
|
|
63
|
-
"zod": "^4.3.6"
|
|
64
|
-
"@schemx/core": "1.0.0-next.4"
|
|
63
|
+
"zod": "^4.3.6"
|
|
65
64
|
},
|
|
66
65
|
"scripts": {
|
|
67
66
|
"build": "pnpm run type-check && vite build",
|