@daxiangme/form-vue 0.1.3 → 0.1.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/README.md +9 -2
- package/dist/index.js +58 -10
- package/dist/index.js.map +1 -1
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -20,7 +20,14 @@ pnpm add @daxiangme/form-vue
|
|
|
20
20
|
pnpm add @daxiangme/form-vue vue element-plus
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
按需宿主(`unplugin-vue-components` 等)只需引入包自身样式。入口会副作用导入所用 Element Plus 组件的 `style/css`,宿主已有的 `--el-*` 变量和全局 `.el-*` 补丁会作用在设计器上,**不必**全量 `element-plus/dist/index.css`,也**不必** `app.use(ElementPlus)`:
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
import '@daxiangme/form-vue/style.css'
|
|
27
|
+
import { FormDesigner, FormRenderer } from '@daxiangme/form-vue'
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
已经全量引入 Element Plus 样式的工程仍然兼容,可继续:
|
|
24
31
|
|
|
25
32
|
```ts
|
|
26
33
|
import 'element-plus/dist/index.css'
|
|
@@ -30,7 +37,7 @@ import '@daxiangme/form-vue/style.css'
|
|
|
30
37
|
|
|
31
38
|
## 注册组件
|
|
32
39
|
|
|
33
|
-
|
|
40
|
+
库构建会为模板用到的 Element Plus 控件注入对应 `style/css` 副作用导入。按需宿主直接导入两个公共组件即可:
|
|
34
41
|
|
|
35
42
|
```ts
|
|
36
43
|
import { createApp } from 'vue'
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,56 @@
|
|
|
1
|
+
import "element-plus/es/components/message/style/css";
|
|
2
|
+
import "element-plus/es/components/message-box/style/css";
|
|
3
|
+
import "element-plus/es/components/loading/style/css";
|
|
1
4
|
import { ElDialog as T3, ElLoadingDirective as R3, ElButton as d0, ElEmpty as L0, ElPagination as $3, ElTag as Y0, ElInput as I0, ElAlert as P0, ElCheckboxGroup as E4, ElCheckbox as Y2, ElRadioGroup as hl, ElRadio as vl, ElInputNumber as p2, ElSelect as $0, ElOption as O0, ElCheckboxButton as O3, ElRadioButton as q3, ElDatePicker as h5, ElUpload as N3, ElSwitch as d2, ElRate as ul, ElCascader as _3, ElTreeSelect as U3, ElTooltip as z2, ElCol as F3, ElFormItem as b2, ElDivider as v5, ElTabs as Q2, ElTabPane as X2, ElRow as sl, ElText as ml, ElSegmented as I2, ElForm as y2, ElDrawer as B3, ElDropdown as J2, ElDropdownMenu as K2, ElDropdownItem as Z2, ElOptionGroup as fl, ElButtonGroup as P3, ElSpace as j3, ElCollapse as u5, ElCollapseItem as s5, ElColorPicker as G3, ElTree as W3, ElResult as Y3 } from "element-plus/es";
|
|
5
|
+
import "element-plus/es/components/base/style/css";
|
|
6
|
+
import "element-plus/es/components/tooltip/style/css";
|
|
2
7
|
import { defineComponent as P1, computed as L, openBlock as n, createBlock as V, normalizeStyle as b0, normalizeClass as O1, createSlots as pl, withCtx as d, withDirectives as Q0, createElementBlock as m, renderSlot as p0, createTextVNode as G, toDisplayString as N, createCommentVNode as Q, h as K4, unref as U1, mergeProps as zl, shallowRef as Q3, ref as s1, watch as a0, createElementVNode as z, createVNode as o, Fragment as a1, renderList as u1, nextTick as T0, onMounted as l4, withKeys as f2, watchEffect as bl, resolveComponent as x4, resolveDynamicComponent as m5, reactive as R0, toRefs as X3, getCurrentInstance as f5, onUnmounted as J3, isRef as T4, withModifiers as X1, useId as K3, onBeforeUnmount as yl, useModel as M2, mergeModels as x0, vShow as a2 } from "vue";
|
|
3
8
|
import { ElMessage as Z1, ElMessageBox as H2 } from "element-plus";
|
|
9
|
+
import "element-plus/es/components/dialog/style/css";
|
|
10
|
+
import "element-plus/es/components/button/style/css";
|
|
4
11
|
import { cloneDesignerDocument as t2, serializeDesignerDocument as m2, decodeDesignerDocument as Ml, createDesignerSubtableRow as S2, cloneDesignerSubtableRow as Z4, createDesignerSubtableGridLayout as Vl, formatDesignerNumber as Cl, findDesignerComponent as B0, resolveDesignerNumberPrecision as Z3, createDesignerFieldFeedbackKey as U2, designerContainerAppearanceClasses as p5, resolveDesignerContainerAppearance as z5, projectDesignerSubtableColumns as C4, resolveDesignerLocalizedText as r4, designerFieldHelpI18nKey as Hl, designerFieldLabelI18nKey as Ll, designerModuleI18nKey as gl, designerActionI18nKey as Al, executeDesignerEventFlow as la, applyDesignerFieldAccess as aa, resolveDesignerFieldState as S5, readDesignerFieldAccess as ea, applyDesignerValueRules as oa, designerControlRadiusClass as F2, designerDialogRadiusClass as wl, resolveDesignerOverlayMaxHeight as ta, projectDesignerSubmission as ra, validateDesignerField as R4, projectDesignerFieldFeedback as $4, isDesignerRuntimeWriteBlocked as na, applyDesignerCurrentRowValueRules as ia, projectDesignerCanvas as kl, designerNodeDropRejection as Sl, resolveDesignerEventActionAvailability as O4, findDesignerNode as O2, createDefaultDesignerFieldBehavior as da, resolveDesignerValidationCatalog as ca, diagnoseDesignerFieldBehaviorDraft as ha, summarizeDesignerStateRule as va, summarizeDesignerValueRule as ua, summarizeDesignerValidationRule as sa, createDesignerStateRule as ma, createDesignerValueRule as E5, createDesignerValidationRule as x5, includeDesignerCurrentOption as n4, designerDateFormatOptions as fa, DESIGNER_PC_SPAN_PRESETS as pa, DESIGNER_MOBILE_SPAN_PRESETS as za, numberOptions as El, DESIGNER_FILE_TYPE_OPTIONS as I5, compatibleDesignerComponents as xl, countDesignerSurfaceContainers as ba, DESIGNER_SPACING_PRESETS as D5, resolveDesignerCatalogComponents as Il, diagnoseDesignerDocument as l5, prepareDesignerDataModel as T5, DESIGNER_MAIN_VIEW_CODE as e2, resolveDesignerViewRoot as R5, createDesignerOutline as ya, collectPlacedFieldIds as $5, collectPlacedRelationCodes as Ma, previewDesignerQuickGrid as Va, collectDesignerBatchDefaultFields as Ca, designerComponentDropRejection as Ha, mutateDesignerView as j0, resolveDesignerTargetEntityCode as La, createNodeFromComponent as w0, insertDesignerNode as ga, moveDesignerNode as Aa, removeDesignerNode as wa, duplicateDesignerNode as ka, restoreDesignerFieldNode as Sa, createDesignerRelationContainer as Ea, generateDesignerDataModelLayout as xa, deleteUnplacedDesignerField as Ia, applyDesignerQuickGrid as Da, applyDesignerBatchDefaults as Ta, updateDesignerRootEntity as Ra, updateDesignerRelation as $a, applyDesignerContainerAppearanceInheritance as Oa, synchronizeContainerSlots as qa, createEmptyDesignerDocument as Na, createDesignerOverlayModule as _a, duplicateDesignerOverlayModule as Ua, removeDesignerOverlayModule as Fa } from "@daxiangme/form-core";
|
|
5
|
-
import { createDefaultDesignerFieldBehavior as
|
|
12
|
+
import { createDefaultDesignerFieldBehavior as Nr, createDemoDesignerDocument as _r, createEmptyDesignerDocument as Ur, decodeDesignerDocument as Fr, diagnoseDesignerDocument as Br, serializeDesignerDocument as Pr } from "@daxiangme/form-core";
|
|
13
|
+
import "element-plus/es/components/drawer/style/css";
|
|
14
|
+
import "element-plus/es/components/form/style/css";
|
|
15
|
+
import "element-plus/es/components/empty/style/css";
|
|
16
|
+
import "element-plus/es/components/row/style/css";
|
|
17
|
+
import "element-plus/es/components/alert/style/css";
|
|
18
|
+
import "element-plus/es/components/segmented/style/css";
|
|
19
|
+
import "element-plus/es/components/select/style/css";
|
|
20
|
+
import "element-plus/es/components/option/style/css";
|
|
21
|
+
import "element-plus/es/components/text/style/css";
|
|
22
|
+
import "element-plus/es/components/tabs/style/css";
|
|
23
|
+
import "element-plus/es/components/tab-pane/style/css";
|
|
24
|
+
import "element-plus/es/components/divider/style/css";
|
|
25
|
+
import "element-plus/es/components/col/style/css";
|
|
26
|
+
import "element-plus/es/components/form-item/style/css";
|
|
27
|
+
import "element-plus/es/components/pagination/style/css";
|
|
28
|
+
import "element-plus/es/components/tag/style/css";
|
|
29
|
+
import "element-plus/es/components/tree-select/style/css";
|
|
30
|
+
import "element-plus/es/components/cascader/style/css";
|
|
31
|
+
import "element-plus/es/components/rate/style/css";
|
|
32
|
+
import "element-plus/es/components/switch/style/css";
|
|
33
|
+
import "element-plus/es/components/upload/style/css";
|
|
34
|
+
import "element-plus/es/components/date-picker/style/css";
|
|
35
|
+
import "element-plus/es/components/radio-group/style/css";
|
|
36
|
+
import "element-plus/es/components/radio/style/css";
|
|
37
|
+
import "element-plus/es/components/radio-button/style/css";
|
|
38
|
+
import "element-plus/es/components/checkbox-group/style/css";
|
|
39
|
+
import "element-plus/es/components/checkbox/style/css";
|
|
40
|
+
import "element-plus/es/components/checkbox-button/style/css";
|
|
41
|
+
import "element-plus/es/components/input-number/style/css";
|
|
42
|
+
import "element-plus/es/components/input/style/css";
|
|
43
|
+
import "element-plus/es/components/dropdown/style/css";
|
|
44
|
+
import "element-plus/es/components/dropdown-menu/style/css";
|
|
45
|
+
import "element-plus/es/components/dropdown-item/style/css";
|
|
46
|
+
import "element-plus/es/components/option-group/style/css";
|
|
47
|
+
import "element-plus/es/components/space/style/css";
|
|
48
|
+
import "element-plus/es/components/button-group/style/css";
|
|
49
|
+
import "element-plus/es/components/collapse/style/css";
|
|
50
|
+
import "element-plus/es/components/collapse-item/style/css";
|
|
51
|
+
import "element-plus/es/components/color-picker/style/css";
|
|
52
|
+
import "element-plus/es/components/tree/style/css";
|
|
53
|
+
import "element-plus/es/components/result/style/css";
|
|
6
54
|
const Ba = { class: "daxiang-form-modal__body" }, q0 = /* @__PURE__ */ P1({
|
|
7
55
|
name: "FormModalShell",
|
|
8
56
|
__name: "FormModalShell",
|
|
@@ -14640,23 +14688,23 @@ const Vt = { class: "designer-schema-inspector__actions" }, Ct = { key: 1 }, Ht
|
|
|
14640
14688
|
]);
|
|
14641
14689
|
};
|
|
14642
14690
|
}
|
|
14643
|
-
}), Ot = /* @__PURE__ */ j1($t, [["__scopeId", "data-v-c525d85f"]]),
|
|
14691
|
+
}), Ot = /* @__PURE__ */ j1($t, [["__scopeId", "data-v-c525d85f"]]), $r = {
|
|
14644
14692
|
install(l) {
|
|
14645
14693
|
l.component("FormDesigner", Ot), l.component("FormRenderer", o5);
|
|
14646
14694
|
}
|
|
14647
14695
|
};
|
|
14648
14696
|
export {
|
|
14649
|
-
|
|
14697
|
+
$r as DaxiangFormVue,
|
|
14650
14698
|
Ot as FormDesigner,
|
|
14651
14699
|
t1 as FormIcon,
|
|
14652
14700
|
q0 as FormModalShell,
|
|
14653
14701
|
o5 as FormRenderer,
|
|
14654
|
-
|
|
14655
|
-
|
|
14656
|
-
|
|
14657
|
-
|
|
14658
|
-
|
|
14659
|
-
|
|
14660
|
-
|
|
14702
|
+
Nr as createDefaultDesignerFieldBehavior,
|
|
14703
|
+
_r as createDemoDesignerDocument,
|
|
14704
|
+
Ur as createEmptyDesignerDocument,
|
|
14705
|
+
Fr as decodeDesignerDocument,
|
|
14706
|
+
$r as default,
|
|
14707
|
+
Br as diagnoseDesignerDocument,
|
|
14708
|
+
Pr as serializeDesignerDocument
|
|
14661
14709
|
};
|
|
14662
14710
|
//# sourceMappingURL=index.js.map
|