@silver-formily/element-plus 2.2.0 → 2.3.0
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.en-US.md +32 -32
- package/README.md +32 -32
- package/esm/__builtins__/index.mjs +19 -23
- package/esm/__builtins__/index.mjs.map +1 -1
- package/esm/__builtins__/shared/index.d.ts +0 -1
- package/esm/__builtins__/shared/index.mjs +17 -21
- package/esm/__builtins__/shared/index.mjs.map +1 -1
- package/esm/__builtins__/shared/loading.mjs +5 -5
- package/esm/__builtins__/shared/loading.mjs.map +1 -1
- package/esm/__builtins__/shared/use-enter-submit.d.ts +9 -0
- package/esm/__builtins__/shared/use-enter-submit.mjs +25 -0
- package/esm/__builtins__/shared/use-enter-submit.mjs.map +1 -0
- package/esm/autocomplete/autocomplete.d.ts +1222 -0
- package/esm/autocomplete/index.d.ts +639 -0
- package/esm/autocomplete/index.mjs +110 -0
- package/esm/autocomplete/index.mjs.map +1 -0
- package/esm/checkbox/index.d.ts +42 -42
- package/esm/color-picker/index.d.ts +210 -0
- package/esm/color-picker/index.mjs +14 -0
- package/esm/color-picker/index.mjs.map +1 -0
- package/esm/color-picker-panel/index.d.ts +129 -0
- package/esm/color-picker-panel/index.mjs +22 -0
- package/esm/color-picker-panel/index.mjs.map +1 -0
- package/esm/date-picker/index.mjs +12 -34
- package/esm/date-picker/index.mjs.map +1 -1
- package/esm/date-picker/utils.d.ts +4 -0
- package/esm/date-picker/utils.mjs +27 -0
- package/esm/date-picker/utils.mjs.map +1 -0
- package/esm/date-picker-panel/index.d.ts +143 -0
- package/esm/date-picker-panel/index.mjs +27 -0
- package/esm/date-picker-panel/index.mjs.map +1 -0
- package/esm/env.d.mjs +2 -0
- package/esm/env.d.mjs.map +1 -0
- package/esm/form-button-group/form-button-group.d.ts +1 -1
- package/esm/form-button-group/index.d.ts +3 -3
- package/esm/form-dialog/dialog-content.d.ts +789 -3
- package/esm/form-dialog/index.mjs +98 -87
- package/esm/form-dialog/index.mjs.map +1 -1
- package/esm/form-dialog/types.d.ts +1 -0
- package/esm/form-drawer/drawer-content.d.ts +919 -3
- package/esm/form-drawer/index.mjs +91 -81
- package/esm/form-drawer/index.mjs.map +1 -1
- package/esm/form-drawer/types.d.ts +1 -0
- package/esm/form-item/index.mjs +17 -17
- package/esm/form-item/index.mjs.map +1 -1
- package/esm/form-layout/form-layout.mjs +10 -10
- package/esm/form-layout/form-layout.mjs.map +1 -1
- package/esm/form-layout/utils.mjs +1 -1
- package/esm/form-layout/utils.mjs.map +1 -1
- package/esm/index.d.ts +6 -0
- package/esm/index.mjs +90 -78
- package/esm/index.mjs.map +1 -1
- package/esm/input-number/index.d.ts +21 -21
- package/esm/input-tag/index.d.ts +32 -0
- package/esm/input-tag/index.mjs +46 -0
- package/esm/input-tag/index.mjs.map +1 -0
- package/esm/input-tag/input-tag.d.ts +32 -0
- package/esm/mention/index.d.ts +50 -0
- package/esm/mention/index.mjs +93 -0
- package/esm/mention/index.mjs.map +1 -0
- package/esm/mention/mention.d.ts +51 -0
- package/esm/pagination/pagination.mjs.map +1 -1
- package/esm/preview-text/color-picker.d.ts +5 -0
- package/esm/preview-text/index.d.ts +5 -0
- package/esm/preview-text/index.mjs +180 -145
- package/esm/preview-text/index.mjs.map +1 -1
- package/esm/radio/index.d.ts +36 -36
- package/esm/rate/index.mjs.map +1 -1
- package/esm/segmented/index.mjs.map +1 -1
- package/esm/shared/overlay-elements.d.ts +6 -0
- package/esm/shared/overlay-elements.mjs +16 -0
- package/esm/shared/overlay-elements.mjs.map +1 -0
- package/esm/slider/index.mjs.map +1 -1
- package/esm/styles/preview-text/index.css +1 -1
- package/esm/switch/index.d.ts +12 -12
- package/esm/upload/index.d.ts +1 -1
- package/esm/upload/upload.d.ts +2 -2
- package/package.json +3 -1
- package/esm/__builtins__/shared/hooks.d.ts +0 -7
- package/esm/__builtins__/shared/hooks.mjs +0 -59
- package/esm/__builtins__/shared/hooks.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-layout.mjs","sources":["../../src/form-layout/form-layout.vue"],"sourcesContent":["<script lang=\"ts\" setup>\r\nimport type { FormContext } from 'element-plus'\r\nimport type { IFormLayoutProps } from './types'\r\nimport { isEmpty, isValid } from '@formily/shared'\r\nimport { formContextKey, useId } from 'element-plus'\r\nimport { computed, provide, reactive, ref, toRef, watch } from 'vue'\r\nimport { stylePrefix, useCleanAttrs
|
|
1
|
+
{"version":3,"file":"form-layout.mjs","sources":["../../src/form-layout/form-layout.vue"],"sourcesContent":["<script lang=\"ts\" setup>\r\nimport type { FormContext } from 'element-plus'\r\nimport type { IFormLayoutProps } from './types'\r\nimport { isEmpty, isValid } from '@formily/shared'\r\nimport { useThrottleFn } from '@vueuse/core'\r\nimport { formContextKey, useId } from 'element-plus'\r\nimport { computed, provide, reactive, ref, toRef, watch } from 'vue'\r\nimport { stylePrefix, useCleanAttrs } from '../__builtins__'\r\nimport { filterValidFormLayoutProps, formLayoutDeepContext, formLayoutIdContext, formLayoutShallowContext, useFormDeepLayout, useResponsiveFormLayout } from './utils'\r\n\r\ndefineOptions({\r\n name: 'FFormLayout',\r\n inheritAttrs: false,\r\n})\r\n\r\nconst props = withDefaults(defineProps<IFormLayoutProps>(), {\r\n tag: 'form',\r\n colon: undefined,\r\n labelWrap: undefined,\r\n fullness: undefined,\r\n size: 'default',\r\n layout: 'horizontal',\r\n shallow: true,\r\n statusIcon: true,\r\n asterisk: undefined,\r\n})\r\nconst formPrefixCls = `${stylePrefix}-form`\r\nconst { props: attrs } = useCleanAttrs()\r\nconst rootHTMLRef = ref<HTMLElement>()\r\nconst isFormTag = props.tag === 'form'\r\nconst formLayoutBaseId = useId()\r\nconst formLayoutId = computed(() => attrs.value.id ?? `formily-${formLayoutBaseId.value}`)\r\nconst formLayoutDomId = computed(() => (isFormTag ? formLayoutId.value : attrs.value.id))\r\nif (isFormTag) {\r\n provide(formLayoutIdContext, formLayoutId)\r\n}\r\n\r\nconst formLayoutDeepConfig = useFormDeepLayout()\r\nconst { props: responsiveProps } = useResponsiveFormLayout(props, rootHTMLRef)\r\n\r\nconst deepLayout = ref({\r\n ...formLayoutDeepConfig.value,\r\n ...(props.shallow\r\n ? {\r\n size: props.size,\r\n ...(isValid(props.colon) && { colon: props.colon }),\r\n }\r\n : filterValidFormLayoutProps(props)),\r\n})\r\nprovide(formLayoutDeepContext, deepLayout)\r\n\r\nconst shallowLayout = ref(props.shallow ? filterValidFormLayoutProps(props) : {})\r\nprovide(formLayoutShallowContext, shallowLayout)\r\n\r\nconst updateLayout = useThrottleFn(() => {\r\n if (!isEmpty(responsiveProps.value)) {\r\n const _responsiveProps = filterValidFormLayoutProps(responsiveProps.value)\r\n shallowLayout.value = filterValidFormLayoutProps({ ...props, ..._responsiveProps })\r\n }\r\n}, 200, true)\r\n\r\nwatch(() => [props, responsiveProps], updateLayout, {\r\n deep: true,\r\n immediate: true,\r\n})\r\n\r\nconst formContext = reactive({\r\n size: toRef(props, 'size'),\r\n statusIcon: toRef(props, 'statusIcon'),\r\n hideRequiredAsterisk: toRef(props, 'hideRequiredAsterisk'),\r\n requireAsteriskPosition: toRef(props, 'requireAsteriskPosition'),\r\n})\r\nprovide(formContextKey, formContext as FormContext)\r\n</script>\r\n\r\n<template>\r\n <component\r\n :is=\"props.tag\"\r\n :id=\"formLayoutDomId\"\r\n ref=\"rootHTMLRef\"\r\n :class=\"formPrefixCls\"\r\n v-bind=\"attrs\"\r\n @submit.prevent.stop\r\n >\r\n <slot />\r\n </component>\r\n</template>\r\n"],"names":["props","__props","formPrefixCls","stylePrefix","attrs","useCleanAttrs","rootHTMLRef","ref","isFormTag","formLayoutBaseId","useId","formLayoutId","computed","formLayoutDomId","provide","formLayoutIdContext","formLayoutDeepConfig","useFormDeepLayout","responsiveProps","useResponsiveFormLayout","deepLayout","isValid","filterValidFormLayoutProps","formLayoutDeepContext","shallowLayout","formLayoutShallowContext","updateLayout","useThrottleFn","isEmpty","_responsiveProps","watch","formContext","reactive","toRef","formContextKey","_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_unref","_renderSlot","_ctx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,UAAMA,IAAQC,GAWRC,IAAgB,GAAGC,CAAW,SAC9B,EAAE,OAAOC,EAAA,IAAUC,EAAA,GACnBC,IAAcC,EAAA,GACdC,IAAYR,EAAM,QAAQ,QAC1BS,IAAmBC,EAAA,GACnBC,IAAeC,EAAS,MAAMR,EAAM,MAAM,MAAM,WAAWK,EAAiB,KAAK,EAAE,GACnFI,IAAkBD,EAAS,MAAOJ,IAAYG,EAAa,QAAQP,EAAM,MAAM,EAAG;AACxF,IAAII,KACFM,EAAQC,GAAqBJ,CAAY;AAG3C,UAAMK,IAAuBC,EAAA,GACvB,EAAE,OAAOC,EAAA,IAAoBC,EAAwBnB,GAAOM,CAAW,GAEvEc,IAAab,EAAI;AAAA,MACrB,GAAGS,EAAqB;AAAA,MACxB,GAAIhB,EAAM,UACN;AAAA,QACE,MAAMA,EAAM;AAAA,QACZ,GAAIqB,EAAQrB,EAAM,KAAK,KAAK,EAAE,OAAOA,EAAM,MAAA;AAAA,MAAM,IAEnDsB,EAA2BtB,CAAK;AAAA,IAAA,CACrC;AACD,IAAAc,EAAQS,GAAuBH,CAAU;AAEzC,UAAMI,IAAgBjB,EAAIP,EAAM,UAAUsB,EAA2BtB,CAAK,IAAI,EAAE;AAChF,IAAAc,EAAQW,GAA0BD,CAAa;AAE/C,UAAME,IAAeC,EAAc,MAAM;AACvC,UAAI,CAACC,EAAQV,EAAgB,KAAK,GAAG;AACnC,cAAMW,IAAmBP,EAA2BJ,EAAgB,KAAK;AACzE,QAAAM,EAAc,QAAQF,EAA2B,EAAE,GAAGtB,GAAO,GAAG6B,GAAkB;AAAA,MACpF;AAAA,IACF,GAAG,KAAK,EAAI;AAEZ,IAAAC,EAAM,MAAM,CAAC9B,GAAOkB,CAAe,GAAGQ,GAAc;AAAA,MAClD,MAAM;AAAA,MACN,WAAW;AAAA,IAAA,CACZ;AAED,UAAMK,IAAcC,EAAS;AAAA,MAC3B,MAAMC,EAAMjC,GAAO,MAAM;AAAA,MACzB,YAAYiC,EAAMjC,GAAO,YAAY;AAAA,MACrC,sBAAsBiC,EAAMjC,GAAO,sBAAsB;AAAA,MACzD,yBAAyBiC,EAAMjC,GAAO,yBAAyB;AAAA,IAAA,CAChE;AACD,WAAAc,EAAQoB,GAAgBH,CAA0B,cAIhDI,KAAAC,EASYC,EARLrC,EAAM,GAAG,GADhBsC,EASY;AAAA,MAPT,IAAIzB,EAAA;AAAA,eACD;AAAA,MAAJ,KAAIP;AAAA,MACH,OAAOJ;AAAA,IAAA,GACAqC,EAAAnC,CAAA,GAAK;AAAA,MACZ,4BAAD,MAAA;AAAA,MAAA,GAAoB,CAAA,WAAA,MAAA,CAAA;AAAA,IAAA;iBAEpB,MAAQ;AAAA,QAARoC,EAAQC,EAAA,QAAA,SAAA;AAAA,MAAA;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isArr as d, isValid as u } from "@formily/shared";
|
|
2
|
+
import { useResizeObserver as h } from "@vueuse/core";
|
|
2
3
|
import { inject as l, ref as i, computed as s } from "vue";
|
|
3
|
-
import { useResizeObserver as h } from "../__builtins__/shared/hooks.mjs";
|
|
4
4
|
function A(t, o) {
|
|
5
5
|
for (const [r, e] of t.entries())
|
|
6
6
|
if (o <= e)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.mjs","sources":["../../src/form-layout/utils.ts"],"sourcesContent":["import type { ComputedRef, InjectionKey, Ref } from 'vue'\r\nimport type { IFormLayoutProps } from './types'\r\nimport { isArr, isValid } from '@formily/shared'\r\nimport {
|
|
1
|
+
{"version":3,"file":"utils.mjs","sources":["../../src/form-layout/utils.ts"],"sourcesContent":["import type { ComputedRef, InjectionKey, Ref } from 'vue'\r\nimport type { IFormLayoutProps } from './types'\r\nimport { isArr, isValid } from '@formily/shared'\r\nimport { useResizeObserver } from '@vueuse/core'\r\nimport { computed, inject, ref } from 'vue'\r\n\r\nexport function calcBreakpointIndex(breakpoints: number[], width: number): number {\r\n for (const [i, breakpoint] of breakpoints.entries()) {\r\n if (width <= breakpoint) {\r\n return i\r\n }\r\n }\r\n return -1\r\n}\r\n\r\nexport function calcFactor<T>(value: T | readonly T[], breakpointIndex: number): T {\r\n if (!Array.isArray(value) || value.length === 0) {\r\n return value as T\r\n }\r\n const safeIndex = Math.max(-1, Math.min(breakpointIndex, value.length - 1))\r\n return value.at(safeIndex)\r\n}\r\n\r\nexport function factor<T>(value: T | T[], breakpointIndex: number): T {\r\n return isValid(value) ? calcFactor<T>(value, breakpointIndex) : value as T\r\n}\r\n\r\nexport function calculateProps(target: Element, props: IFormLayoutProps): IFormLayoutProps {\r\n const { clientWidth } = target\r\n const {\r\n breakpoints,\r\n layout,\r\n labelAlign,\r\n wrapperAlign,\r\n labelCol,\r\n wrapperCol,\r\n ...otherProps\r\n } = props\r\n const breakpointIndex = calcBreakpointIndex(\r\n breakpoints as number[],\r\n clientWidth,\r\n )\r\n\r\n return {\r\n layout: factor(layout, breakpointIndex),\r\n labelAlign: factor(labelAlign, breakpointIndex),\r\n wrapperAlign: factor(wrapperAlign, breakpointIndex),\r\n labelCol: factor(labelCol, breakpointIndex),\r\n wrapperCol: factor(wrapperCol, breakpointIndex),\r\n ...otherProps,\r\n }\r\n}\r\n\r\nexport function useResponsiveFormLayout(props: IFormLayoutProps, root: Ref<HTMLElement | null>) {\r\n const { breakpoints } = props\r\n if (!isArr(breakpoints)) {\r\n return {\r\n props: ref(props),\r\n }\r\n }\r\n\r\n const layoutProps = ref<IFormLayoutProps>({})\r\n\r\n useResizeObserver(root, () => {\r\n layoutProps.value = calculateProps(root.value, props)\r\n })\r\n\r\n return {\r\n props: layoutProps,\r\n }\r\n}\r\n\r\nexport const formLayoutDeepContext: InjectionKey<Ref<IFormLayoutProps>> = Symbol(\r\n 'formLayoutDeepContext',\r\n)\r\n\r\nexport const formLayoutShallowContext: InjectionKey<Ref<IFormLayoutProps>>\r\n = Symbol('formLayoutShallowContext')\r\n\r\nexport const formLayoutIdContext: InjectionKey<ComputedRef<string>>\r\n = Symbol('formLayoutIdContext')\r\n\r\nexport function useFormDeepLayout(): Ref<IFormLayoutProps> {\r\n return inject(formLayoutDeepContext, ref({}))\r\n}\r\n\r\nexport function useFormLayout(): Ref<IFormLayoutProps> {\r\n const shallowLayout = inject(formLayoutShallowContext, ref({}))\r\n const deepLayout = inject(formLayoutDeepContext, ref({}))\r\n\r\n const formLayout = computed(() => {\r\n return {\r\n ...deepLayout.value,\r\n ...shallowLayout.value,\r\n }\r\n })\r\n\r\n return formLayout\r\n}\r\n\r\nexport function useFormLayoutId(): ComputedRef<string> {\r\n return inject(formLayoutIdContext, computed(() => ''))\r\n}\r\n\r\nexport const FORM_LAYOUT_PROPS_KEYS: ReadonlyArray<keyof IFormLayoutProps> = [\r\n 'colon',\r\n 'labelAlign',\r\n 'wrapperAlign',\r\n 'labelWrap',\r\n 'labelWidth',\r\n 'wrapperWidth',\r\n 'labelCol',\r\n 'wrapperCol',\r\n 'fullness',\r\n 'size',\r\n 'layout',\r\n 'feedbackLayout',\r\n 'tooltipLayout',\r\n 'breakpoints',\r\n 'hideRequiredAsterisk',\r\n 'statusIcon',\r\n 'requireAsteriskPosition',\r\n] as const\r\n\r\nexport function filterValidFormLayoutProps(props: IFormLayoutProps): IFormLayoutProps {\r\n return Object.fromEntries(\r\n Object.entries(props)\r\n .filter(([_, value]) => isValid(value)),\r\n )\r\n}\r\n"],"names":["calcBreakpointIndex","breakpoints","width","i","breakpoint","calcFactor","value","breakpointIndex","safeIndex","factor","isValid","calculateProps","target","props","clientWidth","layout","labelAlign","wrapperAlign","labelCol","wrapperCol","otherProps","useResponsiveFormLayout","root","isArr","ref","layoutProps","useResizeObserver","formLayoutDeepContext","formLayoutShallowContext","formLayoutIdContext","useFormDeepLayout","inject","useFormLayout","shallowLayout","deepLayout","computed","useFormLayoutId","FORM_LAYOUT_PROPS_KEYS","filterValidFormLayoutProps","_"],"mappings":";;;AAMO,SAASA,EAAoBC,GAAuBC,GAAuB;AAChF,aAAW,CAACC,GAAGC,CAAU,KAAKH,EAAY;AACxC,QAAIC,KAASE;AACX,aAAOD;AAGX,SAAO;AACT;AAEO,SAASE,EAAcC,GAAyBC,GAA4B;AACjF,MAAI,CAAC,MAAM,QAAQD,CAAK,KAAKA,EAAM,WAAW;AAC5C,WAAOA;AAET,QAAME,IAAY,KAAK,IAAI,IAAI,KAAK,IAAID,GAAiBD,EAAM,SAAS,CAAC,CAAC;AAC1E,SAAOA,EAAM,GAAGE,CAAS;AAC3B;AAEO,SAASC,EAAUH,GAAgBC,GAA4B;AACpE,SAAOG,EAAQJ,CAAK,IAAID,EAAcC,GAAOC,CAAe,IAAID;AAClE;AAEO,SAASK,EAAeC,GAAiBC,GAA2C;AACzF,QAAM,EAAE,aAAAC,MAAgBF,GAClB;AAAA,IACJ,aAAAX;AAAA,IACA,QAAAc;AAAA,IACA,YAAAC;AAAA,IACA,cAAAC;AAAA,IACA,UAAAC;AAAA,IACA,YAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,IACDP,GACEN,IAAkBP;AAAA,IACtBC;AAAA,IACAa;AAAA,EAAA;AAGF,SAAO;AAAA,IACL,QAAQL,EAAOM,GAAQR,CAAe;AAAA,IACtC,YAAYE,EAAOO,GAAYT,CAAe;AAAA,IAC9C,cAAcE,EAAOQ,GAAcV,CAAe;AAAA,IAClD,UAAUE,EAAOS,GAAUX,CAAe;AAAA,IAC1C,YAAYE,EAAOU,GAAYZ,CAAe;AAAA,IAC9C,GAAGa;AAAA,EAAA;AAEP;AAEO,SAASC,EAAwBR,GAAyBS,GAA+B;AAC9F,QAAM,EAAE,aAAArB,MAAgBY;AACxB,MAAI,CAACU,EAAMtB,CAAW;AACpB,WAAO;AAAA,MACL,OAAOuB,EAAIX,CAAK;AAAA,IAAA;AAIpB,QAAMY,IAAcD,EAAsB,EAAE;AAE5C,SAAAE,EAAkBJ,GAAM,MAAM;AAC5B,IAAAG,EAAY,QAAQd,EAAeW,EAAK,OAAOT,CAAK;AAAA,EACtD,CAAC,GAEM;AAAA,IACL,OAAOY;AAAA,EAAA;AAEX;AAEO,MAAME,IAA6D;AAAA,EACxE;AACF,GAEaC,IACT,OAAO,0BAA0B,GAExBC,IACT,OAAO,qBAAqB;AAEzB,SAASC,IAA2C;AACzD,SAAOC,EAAOJ,GAAuBH,EAAI,CAAA,CAAE,CAAC;AAC9C;AAEO,SAASQ,IAAuC;AACrD,QAAMC,IAAgBF,EAAOH,GAA0BJ,EAAI,CAAA,CAAE,CAAC,GACxDU,IAAaH,EAAOJ,GAAuBH,EAAI,CAAA,CAAE,CAAC;AASxD,SAPmBW,EAAS,OACnB;AAAA,IACL,GAAGD,EAAW;AAAA,IACd,GAAGD,EAAc;AAAA,EAAA,EAEpB;AAGH;AAEO,SAASG,IAAuC;AACrD,SAAOL,EAAOF,GAAqBM,EAAS,MAAM,EAAE,CAAC;AACvD;AAEO,MAAME,IAAgE;AAAA,EAC3E;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,SAASC,EAA2BzB,GAA2C;AACpF,SAAO,OAAO;AAAA,IACZ,OAAO,QAAQA,CAAK,EACjB,OAAO,CAAC,CAAC0B,GAAGjC,CAAK,MAAMI,EAAQJ,CAAK,CAAC;AAAA,EAAA;AAE5C;"}
|
package/esm/index.d.ts
CHANGED
|
@@ -4,9 +4,13 @@ export * from './array-items';
|
|
|
4
4
|
export * from './array-list-tabs';
|
|
5
5
|
export * from './array-table';
|
|
6
6
|
export * from './array-tabs';
|
|
7
|
+
export * from './autocomplete';
|
|
7
8
|
export * from './cascader';
|
|
8
9
|
export * from './checkbox';
|
|
10
|
+
export * from './color-picker';
|
|
11
|
+
export * from './color-picker-panel';
|
|
9
12
|
export * from './date-picker';
|
|
13
|
+
export * from './date-picker-panel';
|
|
10
14
|
export * from './editable';
|
|
11
15
|
export * from './form';
|
|
12
16
|
export * from './form-button-group';
|
|
@@ -20,6 +24,8 @@ export * from './form-step';
|
|
|
20
24
|
export * from './form-tab';
|
|
21
25
|
export * from './input';
|
|
22
26
|
export * from './input-number';
|
|
27
|
+
export * from './input-tag';
|
|
28
|
+
export * from './mention';
|
|
23
29
|
export * from './password';
|
|
24
30
|
export * from './preview-text';
|
|
25
31
|
export * from './radio';
|
package/esm/index.mjs
CHANGED
|
@@ -1,87 +1,99 @@
|
|
|
1
1
|
import { ArrayCards as e } from "./array-cards/index.mjs";
|
|
2
|
-
import { ArrayCollapse as
|
|
2
|
+
import { ArrayCollapse as m } from "./array-collapse/index.mjs";
|
|
3
3
|
import { ArrayItems as f } from "./array-items/index.mjs";
|
|
4
4
|
import { ArrayListTabs as a } from "./array-list-tabs/index.mjs";
|
|
5
|
-
import { ArrayTable as
|
|
6
|
-
import { ArrayTabs as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
5
|
+
import { ArrayTable as s } from "./array-table/index.mjs";
|
|
6
|
+
import { ArrayTabs as i } from "./array-tabs/index.mjs";
|
|
7
|
+
import { Autocomplete as T } from "./autocomplete/index.mjs";
|
|
8
|
+
import { Cascader as d } from "./cascader/index.mjs";
|
|
9
|
+
import { Checkbox as n } from "./checkbox/index.mjs";
|
|
10
|
+
import { ColorPicker as P } from "./color-picker/index.mjs";
|
|
11
|
+
import { ColorPickerPanel as k } from "./color-picker-panel/index.mjs";
|
|
12
|
+
import { DatePicker as A } from "./date-picker/index.mjs";
|
|
13
|
+
import { DatePickerPanel as w } from "./date-picker-panel/index.mjs";
|
|
14
|
+
import { Editable as g } from "./editable/index.mjs";
|
|
15
|
+
import { FormButtonGroup as h } from "./form-button-group/index.mjs";
|
|
16
|
+
import { FormCollapse as E, FormCollapseItem as G } from "./form-collapse/index.mjs";
|
|
17
|
+
import { FormDialog as M } from "./form-dialog/index.mjs";
|
|
18
|
+
import { FormDrawer as v } from "./form-drawer/index.mjs";
|
|
19
|
+
import { FormGrid as U } from "./form-grid/index.mjs";
|
|
20
|
+
import { FormBaseItem as q, FormItem as z, fieldFeedbackMapper as H } from "./form-item/index.mjs";
|
|
21
|
+
import { FormStep as K } from "./form-step/index.mjs";
|
|
22
|
+
import { composeFormTab as Q, composeFormTab as V } from "./form-tab/index.mjs";
|
|
23
|
+
import { Input as X } from "./input/index.mjs";
|
|
24
|
+
import { InputNumber as Z } from "./input-number/index.mjs";
|
|
25
|
+
import { InputTag as rr } from "./input-tag/index.mjs";
|
|
26
|
+
import { Mention as er } from "./mention/index.mjs";
|
|
27
|
+
import { Password as mr } from "./password/index.mjs";
|
|
28
|
+
import { PreviewText as fr } from "./preview-text/index.mjs";
|
|
29
|
+
import { Radio as ar } from "./radio/index.mjs";
|
|
30
|
+
import { Rate as sr } from "./rate/index.mjs";
|
|
31
|
+
import { Reset as ir } from "./reset/index.mjs";
|
|
32
|
+
import { Segmented as Tr } from "./segmented/index.mjs";
|
|
33
|
+
import { Select as dr } from "./select/index.mjs";
|
|
34
|
+
import { SelectTable as nr } from "./select-table/index.mjs";
|
|
35
|
+
import { Slider as Pr } from "./slider/index.mjs";
|
|
36
|
+
import { Submit as kr } from "./submit/index.mjs";
|
|
37
|
+
import { Switch as Ar } from "./switch/index.mjs";
|
|
38
|
+
import { TimePicker as wr } from "./time-picker/index.mjs";
|
|
39
|
+
import { TimeSelect as gr } from "./time-select/index.mjs";
|
|
40
|
+
import { Transfer as hr } from "./transfer/index.mjs";
|
|
41
|
+
import { Tree as Er } from "./tree/index.mjs";
|
|
42
|
+
import { TreeSelect as Lr } from "./tree-select/index.mjs";
|
|
43
|
+
import { Upload as _r } from "./upload/index.mjs";
|
|
44
|
+
import { _ as Nr } from "./form/form.mjs";
|
|
45
|
+
import { _ as jr } from "./form-layout/form-layout.mjs";
|
|
46
|
+
import { ElSpace as zr } from "element-plus";
|
|
41
47
|
export {
|
|
42
48
|
e as ArrayCards,
|
|
43
|
-
|
|
49
|
+
m as ArrayCollapse,
|
|
44
50
|
f as ArrayItems,
|
|
45
51
|
a as ArrayListTabs,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
T as
|
|
49
|
-
d as
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
U as
|
|
64
|
-
z as
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
X as
|
|
69
|
-
Z as
|
|
70
|
-
rr as
|
|
71
|
-
er as
|
|
72
|
-
|
|
73
|
-
fr as
|
|
74
|
-
ar as
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
52
|
+
s as ArrayTable,
|
|
53
|
+
i as ArrayTabs,
|
|
54
|
+
T as Autocomplete,
|
|
55
|
+
d as Cascader,
|
|
56
|
+
n as Checkbox,
|
|
57
|
+
P as ColorPicker,
|
|
58
|
+
k as ColorPickerPanel,
|
|
59
|
+
A as DatePicker,
|
|
60
|
+
w as DatePickerPanel,
|
|
61
|
+
g as Editable,
|
|
62
|
+
Nr as Form,
|
|
63
|
+
q as FormBaseItem,
|
|
64
|
+
h as FormButtonGroup,
|
|
65
|
+
E as FormCollapse,
|
|
66
|
+
G as FormCollapseItem,
|
|
67
|
+
M as FormDialog,
|
|
68
|
+
v as FormDrawer,
|
|
69
|
+
U as FormGrid,
|
|
70
|
+
z as FormItem,
|
|
71
|
+
jr as FormLayout,
|
|
72
|
+
K as FormStep,
|
|
73
|
+
Q as FormTab,
|
|
74
|
+
X as Input,
|
|
75
|
+
Z as InputNumber,
|
|
76
|
+
rr as InputTag,
|
|
77
|
+
er as Mention,
|
|
78
|
+
mr as Password,
|
|
79
|
+
fr as PreviewText,
|
|
80
|
+
ar as Radio,
|
|
81
|
+
sr as Rate,
|
|
82
|
+
ir as Reset,
|
|
83
|
+
Tr as Segmented,
|
|
84
|
+
dr as Select,
|
|
85
|
+
nr as SelectTable,
|
|
86
|
+
Pr as Slider,
|
|
87
|
+
zr as Space,
|
|
88
|
+
kr as Submit,
|
|
89
|
+
Ar as Switch,
|
|
90
|
+
wr as TimePicker,
|
|
91
|
+
gr as TimeSelect,
|
|
92
|
+
hr as Transfer,
|
|
93
|
+
Er as Tree,
|
|
94
|
+
Lr as TreeSelect,
|
|
95
|
+
_r as Upload,
|
|
96
|
+
V as composeFormTab,
|
|
97
|
+
H as fieldFeedbackMapper
|
|
86
98
|
};
|
|
87
99
|
//# sourceMappingURL=index.mjs.map
|
package/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -9,13 +9,17 @@ export declare const InputNumber: import('element-plus/es/utils/index.mjs').SFCW
|
|
|
9
9
|
size: {
|
|
10
10
|
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
type: import('vue').PropType<
|
|
14
|
-
default:
|
|
12
|
+
align: {
|
|
13
|
+
type: import('vue').PropType<"center" | "left" | "right">;
|
|
14
|
+
default: string;
|
|
15
15
|
};
|
|
16
16
|
name: {
|
|
17
17
|
type: import('vue').PropType<string>;
|
|
18
18
|
};
|
|
19
|
+
max: {
|
|
20
|
+
type: import('vue').PropType<number>;
|
|
21
|
+
default: number;
|
|
22
|
+
};
|
|
19
23
|
disabled: {
|
|
20
24
|
type: import('vue').PropType<boolean>;
|
|
21
25
|
default: undefined;
|
|
@@ -30,10 +34,6 @@ export declare const InputNumber: import('element-plus/es/utils/index.mjs').SFCW
|
|
|
30
34
|
modelValue: {
|
|
31
35
|
type: import('vue').PropType<number>;
|
|
32
36
|
};
|
|
33
|
-
align: {
|
|
34
|
-
type: import('vue').PropType<"center" | "left" | "right">;
|
|
35
|
-
default: string;
|
|
36
|
-
};
|
|
37
37
|
ariaLabel: {
|
|
38
38
|
type: import('vue').PropType<string>;
|
|
39
39
|
};
|
|
@@ -119,13 +119,17 @@ export declare const InputNumber: import('element-plus/es/utils/index.mjs').SFCW
|
|
|
119
119
|
size: {
|
|
120
120
|
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
|
121
121
|
};
|
|
122
|
-
|
|
123
|
-
type: import('vue').PropType<
|
|
124
|
-
default:
|
|
122
|
+
align: {
|
|
123
|
+
type: import('vue').PropType<"center" | "left" | "right">;
|
|
124
|
+
default: string;
|
|
125
125
|
};
|
|
126
126
|
name: {
|
|
127
127
|
type: import('vue').PropType<string>;
|
|
128
128
|
};
|
|
129
|
+
max: {
|
|
130
|
+
type: import('vue').PropType<number>;
|
|
131
|
+
default: number;
|
|
132
|
+
};
|
|
129
133
|
disabled: {
|
|
130
134
|
type: import('vue').PropType<boolean>;
|
|
131
135
|
default: undefined;
|
|
@@ -140,10 +144,6 @@ export declare const InputNumber: import('element-plus/es/utils/index.mjs').SFCW
|
|
|
140
144
|
modelValue: {
|
|
141
145
|
type: import('vue').PropType<number>;
|
|
142
146
|
};
|
|
143
|
-
align: {
|
|
144
|
-
type: import('vue').PropType<"center" | "left" | "right">;
|
|
145
|
-
default: string;
|
|
146
|
-
};
|
|
147
147
|
ariaLabel: {
|
|
148
148
|
type: import('vue').PropType<string>;
|
|
149
149
|
};
|
|
@@ -220,13 +220,17 @@ export declare const InputNumber: import('element-plus/es/utils/index.mjs').SFCW
|
|
|
220
220
|
size: {
|
|
221
221
|
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
|
222
222
|
};
|
|
223
|
-
|
|
224
|
-
type: import('vue').PropType<
|
|
225
|
-
default:
|
|
223
|
+
align: {
|
|
224
|
+
type: import('vue').PropType<"center" | "left" | "right">;
|
|
225
|
+
default: string;
|
|
226
226
|
};
|
|
227
227
|
name: {
|
|
228
228
|
type: import('vue').PropType<string>;
|
|
229
229
|
};
|
|
230
|
+
max: {
|
|
231
|
+
type: import('vue').PropType<number>;
|
|
232
|
+
default: number;
|
|
233
|
+
};
|
|
230
234
|
disabled: {
|
|
231
235
|
type: import('vue').PropType<boolean>;
|
|
232
236
|
default: undefined;
|
|
@@ -241,10 +245,6 @@ export declare const InputNumber: import('element-plus/es/utils/index.mjs').SFCW
|
|
|
241
245
|
modelValue: {
|
|
242
246
|
type: import('vue').PropType<number>;
|
|
243
247
|
};
|
|
244
|
-
align: {
|
|
245
|
-
type: import('vue').PropType<"center" | "left" | "right">;
|
|
246
|
-
default: string;
|
|
247
|
-
};
|
|
248
248
|
ariaLabel: {
|
|
249
249
|
type: import('vue').PropType<string>;
|
|
250
250
|
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare const InputTag: {
|
|
2
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
3
|
+
P: {};
|
|
4
|
+
B: {};
|
|
5
|
+
D: {};
|
|
6
|
+
C: {};
|
|
7
|
+
M: {};
|
|
8
|
+
Defaults: {};
|
|
9
|
+
}, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
10
|
+
__isFragment?: never;
|
|
11
|
+
__isTeleport?: never;
|
|
12
|
+
__isSuspense?: never;
|
|
13
|
+
} & import('vue').ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
14
|
+
$slots: Readonly<{
|
|
15
|
+
tag?: (scope: {
|
|
16
|
+
value: string;
|
|
17
|
+
index: number;
|
|
18
|
+
field: import('@formily/core').Field | undefined;
|
|
19
|
+
}) => any;
|
|
20
|
+
prefix?: () => any;
|
|
21
|
+
suffix?: () => any;
|
|
22
|
+
}> & {
|
|
23
|
+
tag?: (scope: {
|
|
24
|
+
value: string;
|
|
25
|
+
index: number;
|
|
26
|
+
field: import('@formily/core').Field | undefined;
|
|
27
|
+
}) => any;
|
|
28
|
+
prefix?: () => any;
|
|
29
|
+
suffix?: () => any;
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
export default InputTag;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { useField as l, connect as m, mapProps as u } from "@silver-formily/vue";
|
|
2
|
+
import { PreviewText as d } from "../preview-text/index.mjs";
|
|
3
|
+
import { defineComponent as c, useSlots as g, createBlock as x, openBlock as y, unref as o, normalizeProps as s, guardReactiveProps as a, createSlots as P, withCtx as r, renderSlot as n } from "vue";
|
|
4
|
+
import { ElInputTag as _ } from "element-plus";
|
|
5
|
+
import { useCleanAttrs as k } from "../__builtins__/shared/utils.mjs";
|
|
6
|
+
import { mapReadPretty as v } from "../__builtins__/shared/transform-component.mjs";
|
|
7
|
+
const T = /* @__PURE__ */ c({
|
|
8
|
+
name: "FInputTag",
|
|
9
|
+
inheritAttrs: !1,
|
|
10
|
+
__name: "input-tag",
|
|
11
|
+
setup(S) {
|
|
12
|
+
const e = g(), { props: i } = k(), p = l();
|
|
13
|
+
return (t, h) => (y(), x(o(_), s(a(o(i))), P({ _: 2 }, [
|
|
14
|
+
e.tag ? {
|
|
15
|
+
name: "tag",
|
|
16
|
+
fn: r((f) => [
|
|
17
|
+
n(t.$slots, "tag", s(a({ ...f, field: o(p) })))
|
|
18
|
+
]),
|
|
19
|
+
key: "0"
|
|
20
|
+
} : void 0,
|
|
21
|
+
e.prefix ? {
|
|
22
|
+
name: "prefix",
|
|
23
|
+
fn: r(() => [
|
|
24
|
+
n(t.$slots, "prefix")
|
|
25
|
+
]),
|
|
26
|
+
key: "1"
|
|
27
|
+
} : void 0,
|
|
28
|
+
e.suffix ? {
|
|
29
|
+
name: "suffix",
|
|
30
|
+
fn: r(() => [
|
|
31
|
+
n(t.$slots, "suffix")
|
|
32
|
+
]),
|
|
33
|
+
key: "2"
|
|
34
|
+
} : void 0
|
|
35
|
+
]), 1040));
|
|
36
|
+
}
|
|
37
|
+
}), B = m(
|
|
38
|
+
T,
|
|
39
|
+
u({ readOnly: "readonly", disabled: !0 }),
|
|
40
|
+
v(d.Select, { multiple: !0 })
|
|
41
|
+
);
|
|
42
|
+
export {
|
|
43
|
+
B as InputTag,
|
|
44
|
+
B as default
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/input-tag/input-tag.vue","../../src/input-tag/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\r\nimport type { Field } from '@formily/core'\r\nimport { useField } from '@silver-formily/vue'\r\nimport { ElInputTag } from 'element-plus'\r\nimport { useCleanAttrs } from '../__builtins__'\r\n\r\ndefineOptions({\r\n name: 'FInputTag',\r\n inheritAttrs: false,\r\n})\r\n\r\nconst slots = defineSlots<{\r\n tag?: (scope: { value: string, index: number, field: Field | undefined }) => any\r\n prefix?: () => any\r\n suffix?: () => any\r\n}>()\r\n\r\nconst { props: inputTagProps } = useCleanAttrs()\r\nconst fieldRef = useField<Field>()\r\n</script>\r\n\r\n<template>\r\n <ElInputTag v-bind=\"inputTagProps\">\r\n <template v-if=\"slots.tag\" #tag=\"slotProps\">\r\n <slot name=\"tag\" v-bind=\"{ ...slotProps, field: fieldRef }\" />\r\n </template>\r\n <template v-if=\"slots.prefix\" #prefix>\r\n <slot name=\"prefix\" />\r\n </template>\r\n <template v-if=\"slots.suffix\" #suffix>\r\n <slot name=\"suffix\" />\r\n </template>\r\n </ElInputTag>\r\n</template>\r\n","import { connect, mapProps } from '@silver-formily/vue'\r\nimport { mapReadPretty } from '../__builtins__'\r\nimport { PreviewText } from '../preview-text'\r\nimport FInputTag from './input-tag.vue'\r\n\r\nexport const InputTag = connect<typeof FInputTag>(\r\n FInputTag,\r\n mapProps({ readOnly: 'readonly', disabled: true }),\r\n mapReadPretty(PreviewText.Select, { multiple: true }),\r\n)\r\n\r\nexport default InputTag\r\n"],"names":["slots","_useSlots","inputTagProps","useCleanAttrs","fieldRef","useField","_openBlock","_createBlock","_unref","_createSlots","_withCtx","slotProps","_renderSlot","_ctx","_normalizeProps","_guardReactiveProps","InputTag","connect","FInputTag","mapProps","mapReadPretty","PreviewText"],"mappings":";;;;;;;;;;;AAWA,UAAMA,IAAQC,EAAA,GAMR,EAAE,OAAOC,EAAA,IAAkBC,EAAA,GAC3BC,IAAWC,EAAA;sBAIfC,KAAAC,EAUaC,UAVOA,EAAAN,CAAA,CAAa,CAAA,GAAAO,EAAA,EAAA,GAAA,KAAA;AAAA,MACfT,EAAM;cAAM;AAAA,QAC1B,IAAAU,EAAA,CAD+BC,MAAS;AAAA,UACxCC,EAA8DC,EAAA,QAAA,OAAAC,EAAAC,EAAA,EAAA,GAAhCJ,GAAS,OAASH,EAAAJ,CAAA,EAAA,CAAQ,CAAA,CAAA;AAAA,QAAA;;;MAE1CJ,EAAM;cAAS;AAAA,cAC7B,MAAsB;AAAA,UAAtBY,EAAsBC,EAAA,QAAA,QAAA;AAAA,QAAA;;;MAERb,EAAM;cAAS;AAAA,cAC7B,MAAsB;AAAA,UAAtBY,EAAsBC,EAAA,QAAA,QAAA;AAAA,QAAA;;;;;ICzBfG,IAAWC;AAAA,EACtBC;AAAAA,EACAC,EAAS,EAAE,UAAU,YAAY,UAAU,IAAM;AAAA,EACjDC,EAAcC,EAAY,QAAQ,EAAE,UAAU,IAAM;AACtD;"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Field } from '@formily/core';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: Readonly<{
|
|
5
|
+
tag?: (scope: {
|
|
6
|
+
value: string;
|
|
7
|
+
index: number;
|
|
8
|
+
field: Field | undefined;
|
|
9
|
+
}) => any;
|
|
10
|
+
prefix?: () => any;
|
|
11
|
+
suffix?: () => any;
|
|
12
|
+
}> & {
|
|
13
|
+
tag?: (scope: {
|
|
14
|
+
value: string;
|
|
15
|
+
index: number;
|
|
16
|
+
field: Field | undefined;
|
|
17
|
+
}) => any;
|
|
18
|
+
prefix?: () => any;
|
|
19
|
+
suffix?: () => any;
|
|
20
|
+
};
|
|
21
|
+
refs: {};
|
|
22
|
+
rootEl: any;
|
|
23
|
+
};
|
|
24
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
25
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
26
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export declare const Mention: {
|
|
2
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
3
|
+
P: {};
|
|
4
|
+
B: {};
|
|
5
|
+
D: {};
|
|
6
|
+
C: {};
|
|
7
|
+
M: {};
|
|
8
|
+
Defaults: {};
|
|
9
|
+
}, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
10
|
+
__isFragment?: never;
|
|
11
|
+
__isTeleport?: never;
|
|
12
|
+
__isSuspense?: never;
|
|
13
|
+
} & import('vue').ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
14
|
+
$slots: Readonly<{
|
|
15
|
+
label?: (scope: {
|
|
16
|
+
item: import('element-plus').MentionOption;
|
|
17
|
+
index: number;
|
|
18
|
+
field: import('@formily/core').Field | undefined;
|
|
19
|
+
}) => any;
|
|
20
|
+
header?: (scope: {
|
|
21
|
+
field: import('@formily/core').Field | undefined;
|
|
22
|
+
}) => any;
|
|
23
|
+
footer?: (scope: {
|
|
24
|
+
field: import('@formily/core').Field | undefined;
|
|
25
|
+
}) => any;
|
|
26
|
+
loading?: () => any;
|
|
27
|
+
prefix?: () => any;
|
|
28
|
+
suffix?: () => any;
|
|
29
|
+
prepend?: () => any;
|
|
30
|
+
append?: () => any;
|
|
31
|
+
}> & {
|
|
32
|
+
label?: (scope: {
|
|
33
|
+
item: import('element-plus').MentionOption;
|
|
34
|
+
index: number;
|
|
35
|
+
field: import('@formily/core').Field | undefined;
|
|
36
|
+
}) => any;
|
|
37
|
+
header?: (scope: {
|
|
38
|
+
field: import('@formily/core').Field | undefined;
|
|
39
|
+
}) => any;
|
|
40
|
+
footer?: (scope: {
|
|
41
|
+
field: import('@formily/core').Field | undefined;
|
|
42
|
+
}) => any;
|
|
43
|
+
loading?: () => any;
|
|
44
|
+
prefix?: () => any;
|
|
45
|
+
suffix?: () => any;
|
|
46
|
+
prepend?: () => any;
|
|
47
|
+
append?: () => any;
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
export default Mention;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { useField as u, connect as c, mapProps as v } from "@silver-formily/vue";
|
|
2
|
+
import { PreviewText as y } from "../preview-text/index.mjs";
|
|
3
|
+
import { defineComponent as k, useSlots as h, computed as $, createBlock as P, openBlock as S, unref as s, normalizeProps as p, guardReactiveProps as l, createSlots as g, withCtx as n, renderSlot as r } from "vue";
|
|
4
|
+
import { ElMention as b } from "element-plus";
|
|
5
|
+
import { useCleanAttrs as M } from "../__builtins__/shared/utils.mjs";
|
|
6
|
+
import { mapReadPretty as w } from "../__builtins__/shared/transform-component.mjs";
|
|
7
|
+
const C = /* @__PURE__ */ k({
|
|
8
|
+
name: "FMention",
|
|
9
|
+
inheritAttrs: !1,
|
|
10
|
+
__name: "mention",
|
|
11
|
+
setup(R) {
|
|
12
|
+
const o = h(), { props: d } = M(), t = u(), f = $(() => {
|
|
13
|
+
const e = d.value, { onSearch: a } = e;
|
|
14
|
+
return a ? {
|
|
15
|
+
...e,
|
|
16
|
+
onSearch(i, m) {
|
|
17
|
+
return a(
|
|
18
|
+
i,
|
|
19
|
+
m,
|
|
20
|
+
t.value
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
} : e;
|
|
24
|
+
});
|
|
25
|
+
return (e, a) => (S(), P(s(b), p(l(f.value)), g({ _: 2 }, [
|
|
26
|
+
o.prefix ? {
|
|
27
|
+
name: "prefix",
|
|
28
|
+
fn: n(() => [
|
|
29
|
+
r(e.$slots, "prefix")
|
|
30
|
+
]),
|
|
31
|
+
key: "0"
|
|
32
|
+
} : void 0,
|
|
33
|
+
o.suffix ? {
|
|
34
|
+
name: "suffix",
|
|
35
|
+
fn: n(() => [
|
|
36
|
+
r(e.$slots, "suffix")
|
|
37
|
+
]),
|
|
38
|
+
key: "1"
|
|
39
|
+
} : void 0,
|
|
40
|
+
o.prepend ? {
|
|
41
|
+
name: "prepend",
|
|
42
|
+
fn: n(() => [
|
|
43
|
+
r(e.$slots, "prepend")
|
|
44
|
+
]),
|
|
45
|
+
key: "2"
|
|
46
|
+
} : void 0,
|
|
47
|
+
o.append ? {
|
|
48
|
+
name: "append",
|
|
49
|
+
fn: n(() => [
|
|
50
|
+
r(e.$slots, "append")
|
|
51
|
+
]),
|
|
52
|
+
key: "3"
|
|
53
|
+
} : void 0,
|
|
54
|
+
o.header ? {
|
|
55
|
+
name: "header",
|
|
56
|
+
fn: n(() => [
|
|
57
|
+
r(e.$slots, "header", { field: s(t) })
|
|
58
|
+
]),
|
|
59
|
+
key: "4"
|
|
60
|
+
} : void 0,
|
|
61
|
+
o.footer ? {
|
|
62
|
+
name: "footer",
|
|
63
|
+
fn: n(() => [
|
|
64
|
+
r(e.$slots, "footer", { field: s(t) })
|
|
65
|
+
]),
|
|
66
|
+
key: "5"
|
|
67
|
+
} : void 0,
|
|
68
|
+
o.label ? {
|
|
69
|
+
name: "label",
|
|
70
|
+
fn: n((i) => [
|
|
71
|
+
r(e.$slots, "label", p(l({ ...i, field: s(t) })))
|
|
72
|
+
]),
|
|
73
|
+
key: "6"
|
|
74
|
+
} : void 0,
|
|
75
|
+
o.loading ? {
|
|
76
|
+
name: "loading",
|
|
77
|
+
fn: n(() => [
|
|
78
|
+
r(e.$slots, "loading")
|
|
79
|
+
]),
|
|
80
|
+
key: "7"
|
|
81
|
+
} : void 0
|
|
82
|
+
]), 1040));
|
|
83
|
+
}
|
|
84
|
+
}), I = c(
|
|
85
|
+
C,
|
|
86
|
+
v({ dataSource: "options", readOnly: "readonly", loading: !0, disabled: !0 }),
|
|
87
|
+
w(y.Input)
|
|
88
|
+
);
|
|
89
|
+
export {
|
|
90
|
+
I as Mention,
|
|
91
|
+
I as default
|
|
92
|
+
};
|
|
93
|
+
//# sourceMappingURL=index.mjs.map
|