skyline-vue-admin 0.0.15 → 0.0.17
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/dist/components/auto-complete-array-input/index.cjs +1 -1
- package/dist/components/auto-complete-array-input/index.cjs.map +1 -1
- package/dist/components/auto-complete-array-input/index.mjs +25 -22
- package/dist/components/auto-complete-array-input/index.mjs.map +1 -1
- package/dist/components/avatar-input/index.cjs +1 -1
- package/dist/components/avatar-input/index.cjs.map +1 -1
- package/dist/components/avatar-input/index.d.ts +0 -4
- package/dist/components/avatar-input/index.mjs +72 -104
- package/dist/components/avatar-input/index.mjs.map +1 -1
- package/dist/components/can-access/index.cjs +1 -1
- package/dist/components/can-access/index.mjs +1 -1
- package/dist/components/create/index.cjs +1 -1
- package/dist/components/create/index.mjs +4 -4
- package/dist/components/data-table/index.cjs +1 -1
- package/dist/components/data-table/index.mjs +4 -4
- package/dist/components/data-table-col/index.cjs +1 -1
- package/dist/components/data-table-col/index.cjs.map +1 -1
- package/dist/components/data-table-col/index.mjs +5 -4
- package/dist/components/data-table-col/index.mjs.map +1 -1
- package/dist/components/edit/index.cjs +1 -1
- package/dist/components/edit/index.mjs +1 -1
- package/dist/components/file-multiple-input/index.cjs +1 -1
- package/dist/components/file-multiple-input/index.cjs.map +1 -1
- package/dist/components/file-multiple-input/index.d.ts +2 -8
- package/dist/components/file-multiple-input/index.mjs +38 -146
- package/dist/components/file-multiple-input/index.mjs.map +1 -1
- package/dist/components/file-multiple-model-input/index.cjs +2 -0
- package/dist/components/file-multiple-model-input/index.cjs.map +1 -0
- package/dist/components/file-multiple-model-input/index.d.ts +72 -0
- package/dist/components/file-multiple-model-input/index.mjs +154 -0
- package/dist/components/file-multiple-model-input/index.mjs.map +1 -0
- package/dist/components/filter/index.cjs +1 -1
- package/dist/components/filter/index.mjs +6 -6
- package/dist/components/image-field/index.cjs +1 -1
- package/dist/components/image-field/index.cjs.map +1 -1
- package/dist/components/image-field/index.mjs +3 -2
- package/dist/components/image-field/index.mjs.map +1 -1
- package/dist/components/link-field/index.cjs +1 -1
- package/dist/components/link-field/index.cjs.map +1 -1
- package/dist/components/link-field/index.mjs +3 -2
- package/dist/components/link-field/index.mjs.map +1 -1
- package/dist/components/radio-button-group-input/index.cjs +1 -1
- package/dist/components/radio-button-group-input/index.cjs.map +1 -1
- package/dist/components/radio-button-group-input/index.mjs +3 -2
- package/dist/components/radio-button-group-input/index.mjs.map +1 -1
- package/dist/components/reference-field/index.cjs +1 -1
- package/dist/components/reference-field/index.mjs +1 -1
- package/dist/components/show-simple-layout/index.cjs +1 -1
- package/dist/components/show-simple-layout/index.cjs.map +1 -1
- package/dist/components/show-simple-layout/index.mjs +4 -2
- package/dist/components/show-simple-layout/index.mjs.map +1 -1
- package/dist/components/simple-form/index.cjs +1 -1
- package/dist/components/simple-form/index.cjs.map +1 -1
- package/dist/components/simple-form/index.mjs +3 -2
- package/dist/components/simple-form/index.mjs.map +1 -1
- package/dist/components/text-field/index.cjs +1 -1
- package/dist/components/text-field/index.cjs.map +1 -1
- package/dist/components/text-field/index.mjs +6 -4
- package/dist/components/text-field/index.mjs.map +1 -1
- package/dist/components/text-input/index.cjs +1 -1
- package/dist/components/text-input/index.cjs.map +1 -1
- package/dist/components/text-input/index.mjs +7 -6
- package/dist/components/text-input/index.mjs.map +1 -1
- package/dist/hooks/useUpload.cjs +1 -1
- package/dist/hooks/useUpload.cjs.map +1 -1
- package/dist/hooks/useUpload.d.ts +9 -3
- package/dist/hooks/useUpload.mjs +20 -5
- package/dist/hooks/useUpload.mjs.map +1 -1
- package/dist/layouts/default.cjs +1 -1
- package/dist/layouts/default.mjs +14 -14
- package/dist/provides/dataProvider.d.ts +2 -6
- package/dist/styles/components/file-multiple-input.css +1 -1
- package/dist/styles/components/file-multiple-model-input.css +1 -0
- package/dist/styles/index.css +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("element-plus/es/components/form-item/style/css");require("element-plus/es/components/select/style/css");const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("element-plus/es/components/form-item/style/css");require("element-plus/es/components/select/style/css");const u=require("vue");require("../../hooks/useUser.cjs");require("../../hooks/usePermission.cjs");require("../../hooks/useMenu.cjs");require("../../hooks/useTab.cjs");require("../../hooks/useRouteKeepAlive.cjs");require("../../hooks/useSize.cjs");require("../../hooks/useLang.cjs");require("../../hooks/useTheme.cjs");require("../../hooks/useList.cjs");require("../../hooks/useHiddenTitle.cjs");const V=require("../../hooks/useForm.cjs");require("../../hooks/useShow.cjs");require("../../hooks/useReferenceArrayField.cjs");require("../../hooks/useTreeWithDetails.cjs");const h=require("../../hooks/useFormGrid.cjs"),I=require("../../hooks/useReferenceArrayInput.cjs"),p=require("../../setup/index.cjs"),C=require("@vueuse/core"),i=require("element-plus"),D=u.defineComponent({name:"SkyAutoCompleteArrayInput",inheritAttrs:!1,props:{source:{type:String,required:!0},label:String,optionText:{type:String,default:"name"},optionValue:{type:String,default:"id"},filterToQuery:Function,rules:Object,defaultValue:{type:Array,default:()=>[]}},setup(e,{attrs:c}){const d=h.useFormGrid(),{formData:o,editData:a}=V.useForm(),{getList:f,listLoading:m,listData:n,reference:y}=I.useReferenceArrayInput(),q=u.computed(()=>e.label||e.source);typeof o[e.source]>"u"&&(o[e.source]=e.defaultValue),a.value&&(o[e.source]=a.value[e.source]);const g=r=>{const t=e.filterToQuery?.(r);t&&f(t)};let l;const{state:v,isLoading:A}=C.useAsyncState(async()=>{const r=o[e.source];if(r){const t=Array.isArray(r)?r:[r];if(t.length)return l=new AbortController,p.skyConfig.dataProvider?.getMany?.(y,{ids:t,signal:l.signal})}},void 0,{immediate:!0}),s=r=>{const t=r[e.optionText],b=r[e.optionValue];return{label:t,value:b}},S=u.computed(()=>n.value?.data?n.value.data.map(s):(v.value?.data||[]).map(s));return()=>u.withDirectives(u.createVNode(i.ElFormItem,{label:q.value,prop:e.source,rules:e.rules,style:d?`grid-area: ${e.source}`:""},{default:()=>[u.createVNode(i.ElSelect,u.mergeProps({modelValue:o[e.source],"onUpdate:modelValue":r=>o[e.source]=r,multiple:!0,filterable:!0,remote:!0,reserveKeyword:!0,remoteShowSuffix:!0,remoteMethod:g,loading:m.value,debounce:500,options:S.value,props:{value:"value",label:"label"}},c),null)]}),[[i.ElLoadingDirective,A.value]])}});exports.SkyAutoCompleteArrayInput=D;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/auto-complete-array-input/index.tsx"],"sourcesContent":["import { useForm, useFormGrid, useReferenceArrayInput } from '@/hooks'\r\nimport type { GetManyResult, Identifier } from '@/provides'\r\nimport { skyConfig } from '@/setup'\r\nimport { useAsyncState } from '@vueuse/core'\r\nimport {\r\n ElFormItem,\r\n ElLoadingDirective,\r\n ElSelect,\r\n type FormItemRule,\r\n type SelectProps,\r\n} from 'element-plus'\r\nimport { computed, defineComponent, withDirectives, type PropType } from 'vue'\r\n\r\nexport interface SkyAutoCompleteArrayInputProps {\r\n source: string\r\n label?: string\r\n optionText?: string\r\n optionValue?: string\r\n filterToQuery?: (searchText: string) => Record<string, unknown>\r\n rules?: FormItemRule | FormItemRule[]\r\n defaultValue?: Identifier[]\r\n}\r\n\r\nexport const SkyAutoCompleteArrayInput = defineComponent<\r\n SkyAutoCompleteArrayInputProps & Partial<SelectProps>\r\n>({\r\n name: 'SkyAutoCompleteArrayInput',\r\n inheritAttrs: false,\r\n props: {\r\n source: {\r\n type: String,\r\n required: true,\r\n },\r\n label: String,\r\n // placeholder: String,\r\n optionText: {\r\n type: String,\r\n default: 'name',\r\n },\r\n optionValue: {\r\n type: String,\r\n default: 'id',\r\n },\r\n filterToQuery: Function as PropType<SkyAutoCompleteArrayInputProps['filterToQuery']>,\r\n rules: Object,\r\n defaultValue: {\r\n type: Array,\r\n default: () => [],\r\n },\r\n },\r\n setup(props, { attrs }) {\r\n const formGrid = useFormGrid()\r\n const { formData, editData } = useForm()!\r\n const { getList, listLoading, listData, reference } = useReferenceArrayInput()!\r\n const title = computed<string>(() => props.label || props.source)\r\n\r\n if (typeof formData[props.source] === 'undefined') {\r\n formData[props.source] = props.defaultValue!\r\n }\r\n\r\n if (editData.value) {\r\n formData[props.source] = editData.value[props.source]\r\n }\r\n\r\n const remoteMethod = (search: string) => {\r\n const filter = props.filterToQuery?.(search)\r\n if (filter) {\r\n getList(filter)\r\n }\r\n }\r\n\r\n let controller: AbortController | undefined\r\n const { state: theReferenceArrayData, isLoading } = useAsyncState<GetManyResult | undefined>(\r\n async () => {\r\n const data = formData[props.source] as Identifier[] | Identifier | undefined\r\n\r\n if (data) {\r\n controller = new AbortController()\r\n
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/auto-complete-array-input/index.tsx"],"sourcesContent":["import { useForm, useFormGrid, useReferenceArrayInput } from '@/hooks'\r\nimport type { GetManyResult, Identifier } from '@/provides'\r\nimport { skyConfig } from '@/setup'\r\nimport { useAsyncState } from '@vueuse/core'\r\nimport {\r\n ElFormItem,\r\n ElLoadingDirective,\r\n ElSelect,\r\n type FormItemRule,\r\n type SelectProps,\r\n} from 'element-plus'\r\nimport { computed, defineComponent, withDirectives, type PropType } from 'vue'\r\n\r\nexport interface SkyAutoCompleteArrayInputProps {\r\n source: string\r\n label?: string\r\n optionText?: string\r\n optionValue?: string\r\n filterToQuery?: (searchText: string) => Record<string, unknown>\r\n rules?: FormItemRule | FormItemRule[]\r\n defaultValue?: Identifier[]\r\n}\r\n\r\nexport const SkyAutoCompleteArrayInput = defineComponent<\r\n SkyAutoCompleteArrayInputProps & Partial<SelectProps>\r\n>({\r\n name: 'SkyAutoCompleteArrayInput',\r\n inheritAttrs: false,\r\n props: {\r\n source: {\r\n type: String,\r\n required: true,\r\n },\r\n label: String,\r\n // placeholder: String,\r\n optionText: {\r\n type: String,\r\n default: 'name',\r\n },\r\n optionValue: {\r\n type: String,\r\n default: 'id',\r\n },\r\n filterToQuery: Function as PropType<SkyAutoCompleteArrayInputProps['filterToQuery']>,\r\n rules: Object,\r\n defaultValue: {\r\n type: Array,\r\n default: () => [],\r\n },\r\n },\r\n setup(props, { attrs }) {\r\n const formGrid = useFormGrid()\r\n const { formData, editData } = useForm()!\r\n const { getList, listLoading, listData, reference } = useReferenceArrayInput()!\r\n const title = computed<string>(() => props.label || props.source)\r\n\r\n if (typeof formData[props.source] === 'undefined') {\r\n formData[props.source] = props.defaultValue!\r\n }\r\n\r\n if (editData.value) {\r\n formData[props.source] = editData.value[props.source]\r\n }\r\n\r\n const remoteMethod = (search: string) => {\r\n const filter = props.filterToQuery?.(search)\r\n if (filter) {\r\n getList(filter)\r\n }\r\n }\r\n\r\n let controller: AbortController | undefined\r\n const { state: theReferenceArrayData, isLoading } = useAsyncState<GetManyResult | undefined>(\r\n async () => {\r\n const data = formData[props.source] as Identifier[] | Identifier | undefined\r\n\r\n if (data) {\r\n const ids = Array.isArray(data) ? data : [data]\r\n if (ids.length) {\r\n controller = new AbortController()\r\n return skyConfig.dataProvider?.getMany?.(reference, {\r\n ids,\r\n signal: controller.signal,\r\n })\r\n }\r\n }\r\n },\r\n undefined,\r\n {\r\n immediate: true,\r\n },\r\n )\r\n\r\n const getOptionItem = (item: Record<string, unknown>) => {\r\n const label = item[props.optionText!] as string\r\n const value = item[props.optionValue!] as Identifier\r\n return {\r\n label,\r\n value,\r\n }\r\n }\r\n\r\n const options = computed(() => {\r\n if (listData.value?.data) {\r\n return (\r\n listData.value.data\r\n // .filter((item) => {\r\n // const value = item[props.optionValue] as Identifier\r\n // return !formData[props.source]?.includes(value)\r\n // })\r\n .map(getOptionItem)\r\n )\r\n }\r\n\r\n const editArr = theReferenceArrayData.value?.data || []\r\n // create = []\r\n // edit = theReferenceArrayData.value?.data\r\n return editArr.map(getOptionItem)\r\n })\r\n\r\n return () =>\r\n withDirectives(\r\n <ElFormItem\r\n label={title.value}\r\n prop={props.source}\r\n rules={props.rules}\r\n style={formGrid ? `grid-area: ${props.source}` : ''}\r\n >\r\n <ElSelect\r\n modelValue={formData[props.source] as Identifier[]}\r\n onUpdate:modelValue={(v) => (formData[props.source] = v)}\r\n multiple\r\n filterable\r\n remote\r\n reserveKeyword\r\n remoteShowSuffix\r\n remoteMethod={remoteMethod}\r\n loading={listLoading.value}\r\n debounce={500}\r\n options={options.value}\r\n props={{ value: 'value', label: 'label' }}\r\n {...attrs}\r\n >\r\n {/* {options.value.map((option) => (\r\n <ElOption key={option.value} label={option.label} value={option.value} />\r\n ))} */}\r\n </ElSelect>\r\n </ElFormItem>,\r\n // h(\r\n // ElFormItem,\r\n // {\r\n // label: title.value,\r\n // prop: props.source,\r\n // rules: props.rules,\r\n // style: formGrid ? `grid-area: ${props.source}` : '',\r\n // },\r\n // {\r\n // default: () =>\r\n // h(\r\n // ElSelect,\r\n // {\r\n // modelValue: formData[props.source] as Identifier[],\r\n // 'onUpdate:modelValue': (v) => (formData[props.source] = v),\r\n // multiple: true,\r\n // filterable: true,\r\n // remote: true,\r\n // reserveKeyword: true,\r\n // remoteShowSuffix: true,\r\n // remoteMethod,\r\n // loading: listLoading.value,\r\n // debounce: 500,\r\n // ...attrs,\r\n // },\r\n // {\r\n // default: () =>\r\n // options.value.map((option) => (\r\n // <ElOption key={option.value} label={option.label} value={option.value} />\r\n // )),\r\n // },\r\n // ),\r\n // },\r\n // ),\r\n [[ElLoadingDirective, isLoading.value]],\r\n )\r\n },\r\n})\r\n"],"names":["SkyAutoCompleteArrayInput","defineComponent","name","inheritAttrs","props","source","type","required","label","optionText","default","optionValue","filterToQuery","rules","defaultValue","attrs","formGrid","useFormGrid","editData","reference","title","computed","formData","filter","search","controller","state","isLoading","data","ids","skyConfig","immediate","item","value","options","listData","getOptionItem","withDirectives","_createVNode","ElFormItem","remoteMethod"],"mappings":"q7BAuBAA,EAAAC,EAAAA,gBAAA,CAGEC,KAAAA,4BACAC,aAAAA,GACAC,MAAAA,CACEC,OAAAA,CACEC,KAAAA,OACAC,SAAAA,IAEFC,MAAAA,OAEAC,WAAAA,CACEH,KAAAA,OACAI,QAAAA,QAEFC,YAAAA,CACEL,KAAAA,OACAI,QAAAA,MAEFE,cAAAA,SACAC,MAAAA,OACAC,aAAAA,CACER,KAAAA,oBAEF,YAEaS,MAAAA,CAAM,EAAA,CACnB,MAAAC,EAAAC,EAAAA,YAAA,cACkBC,SAAAA,mDACsBC,UAAAA,8BACxCC,EAAAC,EAAAA,SAAA,IAAAjB,EAAA,OAAAA,EAAA,MAAA,iEAOEkB,EAAAA,EAAAA,MAAAA,EAAAA,EAAAA,MAAAA,EAAAA,MAAAA,eAIA,MAAAC,EAAAnB,EAAA,gBAAAoB,CAAA,EACAD,SAKF,IAAAE,QACQC,MAAAA,EAA8BC,UAAAA,6BAElC,MAAAC,EAAAN,EAAAlB,EAAA,MAAA,EAEA,GAAAwB,EAAA,CACE,MAAAC,EAAA,MAAA,QAAAD,CAAA,EAAAA,EAAA,CAAAA,CAAA,cAEEH,OAAAA,EAAAA,IAAAA,gBACAK,YAAA,cAAA,UAAAX,EAAA,sBAGA,CAAA,CAEJ,WAIAY,UAAAA,EACF,CAAA,QAIA,MAAAvB,EAAAwB,EAAA5B,EAAA,UAAA,EACA6B,EAAAD,EAAA5B,EAAA,WAAA,iBAGE6B,MAAAA,IAIJC,EAAAb,EAAAA,SAAA,IACEc,EAAA,OAAA,6CAcA,IAAAC,CAAA,CACF,EAEA,MAAA,IAAAC,EAAAA,eAAAC,EAAAA,YAAAC,aAAA,2CAKwB,MAAAvB,EAAA,cAAAZ,EAAA,MAAA,GAAA,EACiC,EAAA,CAAAM,QAAAA,IAAAA,CAAAA,cAAAA,EAAAA,SAAAA,EAAAA,WAAAA,CAAA,WAAAY,EAAAlB,EAAA,MAAA,yCAIO,SAAA,GAAA,WAAA,GAAA,OAAA,GAAA,eAAA,GAAA,iBAAA,GAAA,aAAAoC,kBAO9B,SAAA,2BAGjBP,MAAAA,QAAgBzB,MAAAA,OAAe,CAAC,EAAAO,CAAA,EAAA,IAAA,CAAA,CAChC,CAAA,mCA2CnB,CACF,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "element-plus/es/components/form-item/style/css";
|
|
2
2
|
import "element-plus/es/components/select/style/css";
|
|
3
|
-
import { defineComponent as
|
|
3
|
+
import { defineComponent as h, computed as n, withDirectives as V, createVNode as m, mergeProps as D } from "vue";
|
|
4
4
|
import "../../hooks/useUser.mjs";
|
|
5
5
|
import "../../hooks/usePermission.mjs";
|
|
6
6
|
import "../../hooks/useMenu.mjs";
|
|
@@ -20,7 +20,7 @@ import { useReferenceArrayInput as w } from "../../hooks/useReferenceArrayInput.
|
|
|
20
20
|
import { skyConfig as x } from "../../setup/index.mjs";
|
|
21
21
|
import { useAsyncState as F } from "@vueuse/core";
|
|
22
22
|
import { ElFormItem as L, ElSelect as T, ElLoadingDirective as k } from "element-plus";
|
|
23
|
-
const ee = /* @__PURE__ */
|
|
23
|
+
const ee = /* @__PURE__ */ h({
|
|
24
24
|
name: "SkyAutoCompleteArrayInput",
|
|
25
25
|
inheritAttrs: !1,
|
|
26
26
|
props: {
|
|
@@ -46,52 +46,55 @@ const ee = /* @__PURE__ */ V({
|
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
setup(e, {
|
|
49
|
-
attrs:
|
|
49
|
+
attrs: s
|
|
50
50
|
}) {
|
|
51
|
-
const
|
|
52
|
-
formData:
|
|
51
|
+
const c = I(), {
|
|
52
|
+
formData: o,
|
|
53
53
|
editData: i
|
|
54
54
|
} = C(), {
|
|
55
|
-
getList:
|
|
55
|
+
getList: d,
|
|
56
56
|
listLoading: f,
|
|
57
57
|
listData: a,
|
|
58
58
|
reference: p
|
|
59
59
|
} = w(), y = n(() => e.label || e.source);
|
|
60
|
-
typeof
|
|
60
|
+
typeof o[e.source] > "u" && (o[e.source] = e.defaultValue), i.value && (o[e.source] = i.value[e.source]);
|
|
61
61
|
const g = (t) => {
|
|
62
|
-
const
|
|
63
|
-
|
|
62
|
+
const r = e.filterToQuery?.(t);
|
|
63
|
+
r && d(r);
|
|
64
64
|
};
|
|
65
65
|
let u;
|
|
66
66
|
const {
|
|
67
67
|
state: v,
|
|
68
68
|
isLoading: A
|
|
69
69
|
} = F(async () => {
|
|
70
|
-
const t =
|
|
71
|
-
if (t)
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
70
|
+
const t = o[e.source];
|
|
71
|
+
if (t) {
|
|
72
|
+
const r = Array.isArray(t) ? t : [t];
|
|
73
|
+
if (r.length)
|
|
74
|
+
return u = new AbortController(), x.dataProvider?.getMany?.(p, {
|
|
75
|
+
ids: r,
|
|
76
|
+
signal: u.signal
|
|
77
|
+
});
|
|
78
|
+
}
|
|
76
79
|
}, void 0, {
|
|
77
80
|
immediate: !0
|
|
78
81
|
}), l = (t) => {
|
|
79
|
-
const
|
|
82
|
+
const r = t[e.optionText], S = t[e.optionValue];
|
|
80
83
|
return {
|
|
81
|
-
label:
|
|
84
|
+
label: r,
|
|
82
85
|
value: S
|
|
83
86
|
};
|
|
84
87
|
}, b = n(() => a.value?.data ? a.value.data.map(l) : (v.value?.data || []).map(l));
|
|
85
|
-
return () =>
|
|
88
|
+
return () => V(
|
|
86
89
|
m(L, {
|
|
87
90
|
label: y.value,
|
|
88
91
|
prop: e.source,
|
|
89
92
|
rules: e.rules,
|
|
90
|
-
style:
|
|
93
|
+
style: c ? `grid-area: ${e.source}` : ""
|
|
91
94
|
}, {
|
|
92
95
|
default: () => [m(T, D({
|
|
93
|
-
modelValue:
|
|
94
|
-
"onUpdate:modelValue": (t) =>
|
|
96
|
+
modelValue: o[e.source],
|
|
97
|
+
"onUpdate:modelValue": (t) => o[e.source] = t,
|
|
95
98
|
multiple: !0,
|
|
96
99
|
filterable: !0,
|
|
97
100
|
remote: !0,
|
|
@@ -105,7 +108,7 @@ const ee = /* @__PURE__ */ V({
|
|
|
105
108
|
value: "value",
|
|
106
109
|
label: "label"
|
|
107
110
|
}
|
|
108
|
-
},
|
|
111
|
+
}, s), null)]
|
|
109
112
|
}),
|
|
110
113
|
// h(
|
|
111
114
|
// ElFormItem,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../src/components/auto-complete-array-input/index.tsx"],"sourcesContent":["import { useForm, useFormGrid, useReferenceArrayInput } from '@/hooks'\r\nimport type { GetManyResult, Identifier } from '@/provides'\r\nimport { skyConfig } from '@/setup'\r\nimport { useAsyncState } from '@vueuse/core'\r\nimport {\r\n ElFormItem,\r\n ElLoadingDirective,\r\n ElSelect,\r\n type FormItemRule,\r\n type SelectProps,\r\n} from 'element-plus'\r\nimport { computed, defineComponent, withDirectives, type PropType } from 'vue'\r\n\r\nexport interface SkyAutoCompleteArrayInputProps {\r\n source: string\r\n label?: string\r\n optionText?: string\r\n optionValue?: string\r\n filterToQuery?: (searchText: string) => Record<string, unknown>\r\n rules?: FormItemRule | FormItemRule[]\r\n defaultValue?: Identifier[]\r\n}\r\n\r\nexport const SkyAutoCompleteArrayInput = defineComponent<\r\n SkyAutoCompleteArrayInputProps & Partial<SelectProps>\r\n>({\r\n name: 'SkyAutoCompleteArrayInput',\r\n inheritAttrs: false,\r\n props: {\r\n source: {\r\n type: String,\r\n required: true,\r\n },\r\n label: String,\r\n // placeholder: String,\r\n optionText: {\r\n type: String,\r\n default: 'name',\r\n },\r\n optionValue: {\r\n type: String,\r\n default: 'id',\r\n },\r\n filterToQuery: Function as PropType<SkyAutoCompleteArrayInputProps['filterToQuery']>,\r\n rules: Object,\r\n defaultValue: {\r\n type: Array,\r\n default: () => [],\r\n },\r\n },\r\n setup(props, { attrs }) {\r\n const formGrid = useFormGrid()\r\n const { formData, editData } = useForm()!\r\n const { getList, listLoading, listData, reference } = useReferenceArrayInput()!\r\n const title = computed<string>(() => props.label || props.source)\r\n\r\n if (typeof formData[props.source] === 'undefined') {\r\n formData[props.source] = props.defaultValue!\r\n }\r\n\r\n if (editData.value) {\r\n formData[props.source] = editData.value[props.source]\r\n }\r\n\r\n const remoteMethod = (search: string) => {\r\n const filter = props.filterToQuery?.(search)\r\n if (filter) {\r\n getList(filter)\r\n }\r\n }\r\n\r\n let controller: AbortController | undefined\r\n const { state: theReferenceArrayData, isLoading } = useAsyncState<GetManyResult | undefined>(\r\n async () => {\r\n const data = formData[props.source] as Identifier[] | Identifier | undefined\r\n\r\n if (data) {\r\n controller = new AbortController()\r\n
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../src/components/auto-complete-array-input/index.tsx"],"sourcesContent":["import { useForm, useFormGrid, useReferenceArrayInput } from '@/hooks'\r\nimport type { GetManyResult, Identifier } from '@/provides'\r\nimport { skyConfig } from '@/setup'\r\nimport { useAsyncState } from '@vueuse/core'\r\nimport {\r\n ElFormItem,\r\n ElLoadingDirective,\r\n ElSelect,\r\n type FormItemRule,\r\n type SelectProps,\r\n} from 'element-plus'\r\nimport { computed, defineComponent, withDirectives, type PropType } from 'vue'\r\n\r\nexport interface SkyAutoCompleteArrayInputProps {\r\n source: string\r\n label?: string\r\n optionText?: string\r\n optionValue?: string\r\n filterToQuery?: (searchText: string) => Record<string, unknown>\r\n rules?: FormItemRule | FormItemRule[]\r\n defaultValue?: Identifier[]\r\n}\r\n\r\nexport const SkyAutoCompleteArrayInput = defineComponent<\r\n SkyAutoCompleteArrayInputProps & Partial<SelectProps>\r\n>({\r\n name: 'SkyAutoCompleteArrayInput',\r\n inheritAttrs: false,\r\n props: {\r\n source: {\r\n type: String,\r\n required: true,\r\n },\r\n label: String,\r\n // placeholder: String,\r\n optionText: {\r\n type: String,\r\n default: 'name',\r\n },\r\n optionValue: {\r\n type: String,\r\n default: 'id',\r\n },\r\n filterToQuery: Function as PropType<SkyAutoCompleteArrayInputProps['filterToQuery']>,\r\n rules: Object,\r\n defaultValue: {\r\n type: Array,\r\n default: () => [],\r\n },\r\n },\r\n setup(props, { attrs }) {\r\n const formGrid = useFormGrid()\r\n const { formData, editData } = useForm()!\r\n const { getList, listLoading, listData, reference } = useReferenceArrayInput()!\r\n const title = computed<string>(() => props.label || props.source)\r\n\r\n if (typeof formData[props.source] === 'undefined') {\r\n formData[props.source] = props.defaultValue!\r\n }\r\n\r\n if (editData.value) {\r\n formData[props.source] = editData.value[props.source]\r\n }\r\n\r\n const remoteMethod = (search: string) => {\r\n const filter = props.filterToQuery?.(search)\r\n if (filter) {\r\n getList(filter)\r\n }\r\n }\r\n\r\n let controller: AbortController | undefined\r\n const { state: theReferenceArrayData, isLoading } = useAsyncState<GetManyResult | undefined>(\r\n async () => {\r\n const data = formData[props.source] as Identifier[] | Identifier | undefined\r\n\r\n if (data) {\r\n const ids = Array.isArray(data) ? data : [data]\r\n if (ids.length) {\r\n controller = new AbortController()\r\n return skyConfig.dataProvider?.getMany?.(reference, {\r\n ids,\r\n signal: controller.signal,\r\n })\r\n }\r\n }\r\n },\r\n undefined,\r\n {\r\n immediate: true,\r\n },\r\n )\r\n\r\n const getOptionItem = (item: Record<string, unknown>) => {\r\n const label = item[props.optionText!] as string\r\n const value = item[props.optionValue!] as Identifier\r\n return {\r\n label,\r\n value,\r\n }\r\n }\r\n\r\n const options = computed(() => {\r\n if (listData.value?.data) {\r\n return (\r\n listData.value.data\r\n // .filter((item) => {\r\n // const value = item[props.optionValue] as Identifier\r\n // return !formData[props.source]?.includes(value)\r\n // })\r\n .map(getOptionItem)\r\n )\r\n }\r\n\r\n const editArr = theReferenceArrayData.value?.data || []\r\n // create = []\r\n // edit = theReferenceArrayData.value?.data\r\n return editArr.map(getOptionItem)\r\n })\r\n\r\n return () =>\r\n withDirectives(\r\n <ElFormItem\r\n label={title.value}\r\n prop={props.source}\r\n rules={props.rules}\r\n style={formGrid ? `grid-area: ${props.source}` : ''}\r\n >\r\n <ElSelect\r\n modelValue={formData[props.source] as Identifier[]}\r\n onUpdate:modelValue={(v) => (formData[props.source] = v)}\r\n multiple\r\n filterable\r\n remote\r\n reserveKeyword\r\n remoteShowSuffix\r\n remoteMethod={remoteMethod}\r\n loading={listLoading.value}\r\n debounce={500}\r\n options={options.value}\r\n props={{ value: 'value', label: 'label' }}\r\n {...attrs}\r\n >\r\n {/* {options.value.map((option) => (\r\n <ElOption key={option.value} label={option.label} value={option.value} />\r\n ))} */}\r\n </ElSelect>\r\n </ElFormItem>,\r\n // h(\r\n // ElFormItem,\r\n // {\r\n // label: title.value,\r\n // prop: props.source,\r\n // rules: props.rules,\r\n // style: formGrid ? `grid-area: ${props.source}` : '',\r\n // },\r\n // {\r\n // default: () =>\r\n // h(\r\n // ElSelect,\r\n // {\r\n // modelValue: formData[props.source] as Identifier[],\r\n // 'onUpdate:modelValue': (v) => (formData[props.source] = v),\r\n // multiple: true,\r\n // filterable: true,\r\n // remote: true,\r\n // reserveKeyword: true,\r\n // remoteShowSuffix: true,\r\n // remoteMethod,\r\n // loading: listLoading.value,\r\n // debounce: 500,\r\n // ...attrs,\r\n // },\r\n // {\r\n // default: () =>\r\n // options.value.map((option) => (\r\n // <ElOption key={option.value} label={option.label} value={option.value} />\r\n // )),\r\n // },\r\n // ),\r\n // },\r\n // ),\r\n [[ElLoadingDirective, isLoading.value]],\r\n )\r\n },\r\n})\r\n"],"names":["SkyAutoCompleteArrayInput","defineComponent","name","inheritAttrs","props","source","type","required","label","optionText","default","optionValue","filterToQuery","rules","defaultValue","attrs","formGrid","useFormGrid","editData","reference","title","computed","formData","filter","search","controller","state","isLoading","data","ids","skyConfig","immediate","item","value","options","listData","getOptionItem","withDirectives","_createVNode","ElFormItem","remoteMethod"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAAA,KAAA,gBAAAC,EAAA;AAAA,EAGEC,MAAAA;AAAAA,EACAC,cAAAA;AAAAA,EACAC,OAAAA;AAAAA,IACEC,QAAAA;AAAAA,MACEC,MAAAA;AAAAA,MACAC,UAAAA;AAAAA;IAEFC,OAAAA;AAAAA;AAAAA,IAEAC,YAAAA;AAAAA,MACEH,MAAAA;AAAAA,MACAI,SAAAA;AAAAA;IAEFC,aAAAA;AAAAA,MACEL,MAAAA;AAAAA,MACAI,SAAAA;AAAAA;IAEFE,eAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,cAAAA;AAAAA,MACER,MAAAA;AAAAA;IAEF;AAAA;;IAEaS,OAAAA;AAAAA,EAAM,GAAA;AACnB,UAAAC,IAAAC,EAAA;;MACkBC,UAAAA;AAAAA;;;;MACsBC,WAAAA;AAAAA,aACxCC,IAAAC,EAAA,MAAAjB,EAAA,SAAAA,EAAA,MAAA;4EAOEkB,EAAAA,EAAAA,MAAAA,IAAAA,EAAAA,MAAAA,EAAAA,MAAAA;;AAIA,YAAAC,IAAAnB,EAAA,gBAAAoB,CAAA;AACA,MAAAD;;AAKF,QAAAE;;MACQC,OAAAA;AAAAA,MAA8BC,WAAAA;AAAAA;AAElC,YAAAC,IAAAN,EAAAlB,EAAA,MAAA;AAEA,UAAAwB,GAAA;AACE,cAAAC,IAAA,MAAA,QAAAD,CAAA,IAAAA,IAAA,CAAAA,CAAA;;AAEEH,iBAAAA,IAAAA,IAAAA,gBAAAA,GACAK,EAAA,cAAA,UAAAX,GAAA;AAAA;;UAGA,CAAA;AAAA,MAEJ;AAAA;MAIAY,WAAAA;AAAAA,IACF,CAAA;AAIA,YAAAvB,IAAAwB,EAAA5B,EAAA,UAAA,GACA6B,IAAAD,EAAA5B,EAAA,WAAA;;;QAGE6B,OAAAA;AAAAA;OAIJC,IAAAb,EAAA,MACEc,EAAA,OAAA,mDAcA,IAAAC,CAAA,CACF;AAEA,WAAA,MAAAC;AAAA,MAAAC,EAAAC,GAAA;AAAA;;;QAKwB,OAAAvB,IAAA,cAAAZ,EAAA,MAAA,KAAA;AAAA,MACiC,GAAA;AAAA,QAAAM,SAAAA,MAAAA,CAAAA,EAAAA,GAAAA,EAAAA;AAAAA,UAAA,YAAAY,EAAAlB,EAAA,MAAA;AAAA;UAIO,UAAA;AAAA,UAAA,YAAA;AAAA,UAAA,QAAA;AAAA,UAAA,gBAAA;AAAA,UAAA,kBAAA;AAAA,UAAA,cAAAoC;AAAA;UAO9B,UAAA;AAAA;;YAGjBP,OAAAA;AAAAA,YAAgBzB,OAAAA;AAAAA,UAAe;AAAA,QAAC,GAAAO,CAAA,GAAA,IAAA,CAAA;AAAA,MAChC,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;EA2CnB;AACF,CAAA;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("element-plus/es/components/form-item/style/css");require("element-plus/es/components/icon/style/css");require("element-plus/es/components/upload/style/css");const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("element-plus/es/components/form-item/style/css");require("element-plus/es/components/icon/style/css");require("element-plus/es/components/upload/style/css");const r=require("vue"),U=require("../../icons/EpPlus.cjs"),l=require("element-plus"),E=require("vue-router");require("../../hooks/useUser.cjs");require("../../hooks/usePermission.cjs");require("../../hooks/useMenu.cjs");require("../../hooks/useTab.cjs");require("../../hooks/useRouteKeepAlive.cjs");require("../../hooks/useSize.cjs");require("../../hooks/useLang.cjs");require("../../hooks/useTheme.cjs");require("../../hooks/useList.cjs");require("../../hooks/useHiddenTitle.cjs");const k=require("../../hooks/useForm.cjs");require("../../hooks/useShow.cjs");require("../../hooks/useReferenceArrayField.cjs");require("../../hooks/useTreeWithDetails.cjs");const w=require("../../hooks/useFormGrid.cjs");require("../../hooks/useReferenceArrayInput.cjs");const I=require("../../hooks/useUpload.cjs"),V=require("../can-access/index.cjs"),R=r.defineComponent({name:"SkyAvatarInput",inheritAttrs:!1,props:{source:{type:String,required:!0},label:String,rules:Object,dataName:{type:String,default:"name"},dataUrl:{type:String,default:"url"}},setup(e,{slots:s,attrs:c}){const d=E.useRoute(),m=w.useFormGrid(),{formData:i,editData:n}=k.useForm(),v=r.computed(()=>e.label||e.source),{fileList:t,action:f,data:q,headers:p,method:g,name:y,beforeUpload:S}=I.useUpload(),o=r.useTemplateRef("uploadRef"),h=d.meta;if(n.value){const u=n.value[e.source];i[e.source]=u,t.value=[{upload:u,name:u[e.dataName],url:u[e.dataUrl]}]}const b=async u=>{o.value?.clearFiles();const a=u[0];a.uid=l.genFileId(),o.value?.handleStart(a),o.value?.submit()},F=()=>{const u=t.value[0]?.upload;if(u)i[e.source]=u;else{const a=t.value[0]?.raw;a?.upload&&(i[e.source]=a.upload)}};return()=>r.createVNode(V.SkyCanAccess,{resource:h.resource,action:["create","edit"],column:e.source},{default:()=>[r.createVNode(l.ElFormItem,{class:"sky-avatar-input",label:v.value,prop:e.source,rules:e.rules,style:m?`grid-area: ${e.source}`:""},{default:()=>[r.createVNode(l.ElUpload,r.mergeProps({ref:"uploadRef",action:f.value,method:g.value,name:y.value,withCredentials:e.withCredentials,multiple:e.multiple,limit:1,beforeUpload:S,onSuccess:F,onExceed:b,headers:p.value,data:q.value,listType:"picture-card",fileList:t.value,"onUpdate:file-list":u=>t.value=u,autoUpload:!0,showFileList:!1,accept:"image/*"},c),{default:()=>t.value.length?r.withDirectives(r.createVNode("div",{class:"sky-avatar-input__preview",style:{backgroundImage:`url(${t.value[0].url})`}},null),[[l.ElLoadingDirective,t.value[0].status!=="success"]]):r.createVNode(l.ElIcon,null,{default:()=>[r.createVNode(U.EpPlus,null,null)]}),file:u=>{if(s.default){const a=s.default();return r.h(r.Fragment,a.map(N=>r.cloneVNode(N,{...u})))}}})]})]})}});exports.SkyAvatarInput=R;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/avatar-input/index.tsx"],"sourcesContent":["import { EpPlus } from '@/icons/EpPlus'\nimport type {
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/avatar-input/index.tsx"],"sourcesContent":["import { EpPlus } from '@/icons/EpPlus'\nimport type { SkyUploadRawFile } from '@/provides'\nimport {\n ElFormItem,\n ElIcon,\n ElLoadingDirective,\n ElUpload,\n genFileId,\n type FormItemRule,\n type UploadFile,\n type UploadInstance,\n type UploadProps,\n type UploadRawFile,\n} from 'element-plus'\nimport {\n cloneVNode,\n computed,\n defineComponent,\n Fragment,\n h,\n useTemplateRef,\n withDirectives,\n} from 'vue'\nimport { useRoute } from 'vue-router'\nimport { useForm, useFormGrid, useUpload, type FormContext, type SkyUploadUserFile } from '@/hooks'\nimport { SkyCanAccess } from '../can-access'\nimport type { SkyLayoutRouteMeta } from '@/router'\n\nexport interface SkyOssAvatarInputProps {\n source: string\n label?: string\n rules?: FormItemRule | FormItemRule[]\n dataName?: string\n dataUrl?: string\n}\n\nexport const SkyAvatarInput = defineComponent<SkyOssAvatarInputProps & Partial<UploadProps>>({\n name: 'SkyAvatarInput',\n inheritAttrs: false,\n props: {\n source: {\n type: String,\n required: true,\n },\n label: String,\n rules: Object,\n dataName: {\n type: String,\n default: 'name',\n },\n dataUrl: {\n type: String,\n default: 'url',\n },\n },\n setup(props, { slots, attrs }) {\n const route = useRoute()\n const formGrid = useFormGrid()\n const { formData, editData } = useForm()! as FormContext<\n Record<string, Record<string, unknown>>\n >\n const title = computed<string>(() => props.label || props.source)\n // init fileList\n const { fileList, action, data, headers, method, name, beforeUpload } = useUpload()\n const uploadRef = useTemplateRef<UploadInstance>('uploadRef')\n const routeMeta = route.meta as SkyLayoutRouteMeta\n\n if (editData.value) {\n const ed = editData.value[props.source] as Record<string, unknown>\n formData[props.source] = ed\n fileList.value = [\n {\n upload: ed,\n name: ed[props.dataName!] as string,\n url: ed[props.dataUrl!] as string,\n },\n ]\n }\n\n const onExceed = async (files: File[]) => {\n uploadRef.value?.clearFiles()\n const file = files[0] as UploadRawFile\n file.uid = genFileId()\n uploadRef.value?.handleStart(file)\n uploadRef.value?.submit()\n }\n\n const onSuccess = () => {\n const upload = fileList.value[0]?.upload\n if (upload) {\n formData[props.source] = upload\n } else {\n const raw = fileList.value[0]?.raw as SkyUploadRawFile | undefined\n if (raw?.upload) {\n formData[props.source] = raw.upload\n }\n }\n }\n\n return () => (\n <SkyCanAccess resource={routeMeta.resource} action={['create', 'edit']} column={props.source}>\n <ElFormItem\n class=\"sky-avatar-input\"\n label={title.value}\n prop={props.source}\n rules={props.rules}\n style={formGrid ? `grid-area: ${props.source}` : ''}\n >\n <ElUpload\n ref=\"uploadRef\"\n action={action.value}\n method={method.value}\n name={name.value}\n withCredentials={props.withCredentials}\n multiple={props.multiple}\n limit={1}\n beforeUpload={beforeUpload}\n onSuccess={onSuccess}\n onExceed={onExceed}\n headers={headers.value}\n data={data.value}\n listType=\"picture-card\"\n fileList={fileList.value}\n onUpdate:file-list={(fs: SkyUploadUserFile[]) => (fileList.value = fs)}\n autoUpload={true}\n showFileList={false}\n // https://developer.mozilla.org/zh-CN/docs/Web/HTML/Reference/Attributes/accept\n accept={'image/*'}\n {...attrs}\n >\n {{\n default: () =>\n fileList.value.length ? (\n withDirectives(\n <div\n class=\"sky-avatar-input__preview\"\n style={{ backgroundImage: `url(${fileList.value[0]!.url})` }}\n ></div>,\n [[ElLoadingDirective, fileList.value[0]!.status !== 'success']],\n )\n ) : (\n <ElIcon>\n <EpPlus />\n </ElIcon>\n ),\n file: (scope: { file: UploadFile; index: number }) => {\n if (slots.default) {\n const vnodes = slots.default()\n return h(\n Fragment,\n vnodes.map((vnode) => cloneVNode(vnode, { ...scope })),\n )\n }\n },\n }}\n </ElUpload>\n </ElFormItem>\n </SkyCanAccess>\n )\n },\n})\n"],"names":["SkyAvatarInput","defineComponent","name","inheritAttrs","props","source","type","required","label","rules","dataName","default","dataUrl","attrs","route","useRoute","formGrid","useFormGrid","editData","title","computed","beforeUpload","uploadRef","useTemplateRef","routeMeta","formData","upload","url","onExceed","files","file","onSuccess","fs","fileList","vnodes","slots","h","Fragment","vnode","cloneVNode"],"mappings":"yjCAoCAA,EAAAC,EAAAA,gBAAA,CACEC,KAAAA,iBACAC,aAAAA,GACAC,MAAAA,CACEC,OAAAA,CACEC,KAAAA,OACAC,SAAAA,IAEFC,MAAAA,OACAC,MAAAA,OACAC,SAAAA,CACEJ,KAAAA,OACAK,QAAAA,QAEFC,QAAAA,CACEN,KAAAA,OACAK,QAAAA,KACF,oBAEoBE,MAAAA,CAAM,EAAA,CAC1B,MAAAC,EAAAC,EAAAA,SAAA,EACAC,EAAAC,EAAAA,YAAA,cACkBC,SAAAA,eAGlBC,EAAAC,EAAAA,SAAA,IAAAhB,EAAA,OAAAA,EAAA,MAAA,wDAEuDiB,aAAAA,iBACvDC,EAAAC,EAAAA,eAAA,WAAA,EACAC,EAAAV,EAAA,2CAIEW,EAAAA,EAAAA,MAAAA,EAAAA,YAGIC,OAAAA,EACAxB,KAAAA,EAAAA,EAAAA,QAAAA,EACAyB,IAAAA,EAAAA,EAAAA,OAAAA,CACF,CAAA,CAEJ,CAEA,MAAAC,EAAA,MAAAC,GAAA,CACEP,EAAAA,OAAAA,WAAAA,EACA,MAAAQ,EAAAD,EAAA,CAAA,EACAC,EAAAA,IAAAA,YAAAA,EACAR,EAAAA,OAAAA,YAAAA,CAAAA,EACAA,EAAAA,OAAAA,OAAAA,qCAKA,GAAAI,EACED,EAAAA,EAAAA,MAAAA,EAAAA,MACF,0DAKA,+DAI0C,OAAA,CAAA,SAAA,MAAA,EAA4B,OAAArB,EAAA,MAAsB,EAAA,CAAAO,QAAAA,IAAAA,CAAAA,EAAAA,YAAAA,aAAAA,CAAA,MAAA,6DAKtE,MAAAK,EAAA,cAAAZ,EAAA,MAAA,GAAA,EACiC,EAAA,CAAAO,QAAAA,IAAAA,CAAAA,cAAAA,EAAAA,SAAAA,EAAAA,WAAAA,CAAA,IAAA,6GAQzB,MAAA,EAChB,aAAAU,EACkB,UAAAU,EACN,SAAAH,+BAGJ,SAAA,gCAEQ,qBAAAI,GAAAC,EAAA,MAAAD,EAC8C,WAAA,GACtD,aAAA,mBAGC,EAAAnB,CAAA,EAAA,kEAMG,MAAA,2EAGiD,8FAG9DF,QAAAA,IAAAA,CAAAA,EAAAA,YAAAA,EAAAA,OAAAA,KAAAA,IAAAA,CAAAA,2BAQD,MAAAuB,EAAAC,EAAA,QAAA,EACA,OAAAC,EAAAA,EAAAC,EAAAA,SAAAH,EAAA,IAAAI,GAAAC,EAAAA,WAAAD,EAAA,SAIF,CACF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,GAMb,CACF,CAAA"}
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { FormItemRule, UploadProps } from 'element-plus';
|
|
2
|
-
import { SkyUploadUserFile } from '../../hooks';
|
|
3
2
|
export interface SkyOssAvatarInputProps {
|
|
4
|
-
reference: string;
|
|
5
3
|
source: string;
|
|
6
4
|
label?: string;
|
|
7
5
|
rules?: FormItemRule | FormItemRule[];
|
|
8
|
-
dataId?: string;
|
|
9
6
|
dataName?: string;
|
|
10
7
|
dataUrl?: string;
|
|
11
|
-
fileList?: SkyUploadUserFile[];
|
|
12
8
|
}
|
|
13
9
|
export declare const SkyAvatarInput: import('vue').DefineComponent<SkyOssAvatarInputProps & Partial<UploadProps>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SkyOssAvatarInputProps & Partial<UploadProps>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import "element-plus/es/components/form-item/style/css";
|
|
2
2
|
import "element-plus/es/components/icon/style/css";
|
|
3
3
|
import "element-plus/es/components/upload/style/css";
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { EpPlus as
|
|
6
|
-
import { ElFormItem as
|
|
7
|
-
import {
|
|
8
|
-
import { useRoute as M } from "vue-router";
|
|
4
|
+
import { defineComponent as E, computed as F, useTemplateRef as k, createVNode as r, mergeProps as I, withDirectives as R, h as A, Fragment as C, cloneVNode as D } from "vue";
|
|
5
|
+
import { EpPlus as L } from "../../icons/EpPlus.mjs";
|
|
6
|
+
import { ElFormItem as N, ElUpload as x, ElLoadingDirective as G, ElIcon as P, genFileId as T } from "element-plus";
|
|
7
|
+
import { useRoute as V } from "vue-router";
|
|
9
8
|
import "../../hooks/useUser.mjs";
|
|
10
9
|
import "../../hooks/usePermission.mjs";
|
|
11
10
|
import "../../hooks/useMenu.mjs";
|
|
@@ -16,33 +15,24 @@ import "../../hooks/useLang.mjs";
|
|
|
16
15
|
import "../../hooks/useTheme.mjs";
|
|
17
16
|
import "../../hooks/useList.mjs";
|
|
18
17
|
import "../../hooks/useHiddenTitle.mjs";
|
|
19
|
-
import { useForm as
|
|
18
|
+
import { useForm as _ } from "../../hooks/useForm.mjs";
|
|
20
19
|
import "../../hooks/useShow.mjs";
|
|
21
20
|
import "../../hooks/useReferenceArrayField.mjs";
|
|
22
21
|
import "../../hooks/useTreeWithDetails.mjs";
|
|
23
|
-
import { useFormGrid as
|
|
22
|
+
import { useFormGrid as $ } from "../../hooks/useFormGrid.mjs";
|
|
24
23
|
import "../../hooks/useReferenceArrayInput.mjs";
|
|
25
|
-
import { useUpload as
|
|
26
|
-
import {
|
|
27
|
-
|
|
28
|
-
const we = /* @__PURE__ */ L({
|
|
24
|
+
import { useUpload as j } from "../../hooks/useUpload.mjs";
|
|
25
|
+
import { SkyCanAccess as q } from "../can-access/index.mjs";
|
|
26
|
+
const pe = /* @__PURE__ */ E({
|
|
29
27
|
name: "SkyAvatarInput",
|
|
30
28
|
inheritAttrs: !1,
|
|
31
29
|
props: {
|
|
32
|
-
reference: {
|
|
33
|
-
type: String,
|
|
34
|
-
required: !0
|
|
35
|
-
},
|
|
36
30
|
source: {
|
|
37
31
|
type: String,
|
|
38
32
|
required: !0
|
|
39
33
|
},
|
|
40
34
|
label: String,
|
|
41
35
|
rules: Object,
|
|
42
|
-
dataId: {
|
|
43
|
-
type: String,
|
|
44
|
-
default: "id"
|
|
45
|
-
},
|
|
46
36
|
dataName: {
|
|
47
37
|
type: String,
|
|
48
38
|
default: "name"
|
|
@@ -50,112 +40,90 @@ const we = /* @__PURE__ */ L({
|
|
|
50
40
|
dataUrl: {
|
|
51
41
|
type: String,
|
|
52
42
|
default: "url"
|
|
53
|
-
},
|
|
54
|
-
fileList: {
|
|
55
|
-
type: Array,
|
|
56
|
-
default: () => []
|
|
57
43
|
}
|
|
58
44
|
},
|
|
59
|
-
setup(
|
|
60
|
-
slots:
|
|
61
|
-
attrs:
|
|
45
|
+
setup(e, {
|
|
46
|
+
slots: i,
|
|
47
|
+
attrs: s
|
|
62
48
|
}) {
|
|
63
|
-
const
|
|
64
|
-
formData:
|
|
65
|
-
editData:
|
|
66
|
-
} =
|
|
67
|
-
fileList:
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
},
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
49
|
+
const n = V(), c = $(), {
|
|
50
|
+
formData: o,
|
|
51
|
+
editData: m
|
|
52
|
+
} = _(), d = F(() => e.label || e.source), {
|
|
53
|
+
fileList: a,
|
|
54
|
+
action: p,
|
|
55
|
+
data: f,
|
|
56
|
+
headers: v,
|
|
57
|
+
method: g,
|
|
58
|
+
name: h,
|
|
59
|
+
beforeUpload: y
|
|
60
|
+
} = j(), u = k("uploadRef"), S = n.meta;
|
|
61
|
+
if (m.value) {
|
|
62
|
+
const t = m.value[e.source];
|
|
63
|
+
o[e.source] = t, a.value = [{
|
|
64
|
+
upload: t,
|
|
65
|
+
name: t[e.dataName],
|
|
66
|
+
url: t[e.dataUrl]
|
|
67
|
+
}];
|
|
68
|
+
}
|
|
69
|
+
const b = async (t) => {
|
|
70
|
+
u.value?.clearFiles();
|
|
71
|
+
const l = t[0];
|
|
72
|
+
l.uid = T(), u.value?.handleStart(l), u.value?.submit();
|
|
73
|
+
}, U = () => {
|
|
74
|
+
const t = a.value[0]?.upload;
|
|
75
|
+
if (t)
|
|
76
|
+
o[e.source] = t;
|
|
78
77
|
else {
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
let s;
|
|
84
|
-
const {
|
|
85
|
-
isLoading: c
|
|
86
|
-
} = j(async () => {
|
|
87
|
-
const a = l[t.source];
|
|
88
|
-
if (a) {
|
|
89
|
-
s = new AbortController();
|
|
90
|
-
const e = await h.dataProvider?.getOne?.(t.reference, {
|
|
91
|
-
id: a,
|
|
92
|
-
signal: s.signal
|
|
93
|
-
});
|
|
94
|
-
if (e?.data)
|
|
95
|
-
return r.value = [{
|
|
96
|
-
id: e.data[t.dataId],
|
|
97
|
-
name: e.data[t.dataName],
|
|
98
|
-
url: e.data[t.dataUrl]
|
|
99
|
-
}], e;
|
|
78
|
+
const l = a.value[0]?.raw;
|
|
79
|
+
l?.upload && (o[e.source] = l.upload);
|
|
100
80
|
}
|
|
101
|
-
}, void 0, {
|
|
102
|
-
immediate: !0
|
|
103
|
-
}), m = u(""), f = y(), v = y(), p = u(), g = u(), C = async (a) => {
|
|
104
|
-
const e = await h.dataProvider?.getUploadConfig?.({
|
|
105
|
-
file: a
|
|
106
|
-
});
|
|
107
|
-
e?.data && (m.value = e.data.action, f.value = e.data.data, v.value = e.data.headers, p.value = e.data.method, g.value = e.data.name, a.data = {
|
|
108
|
-
id: e.data.file.id,
|
|
109
|
-
name: e.data.file.name,
|
|
110
|
-
url: e.data.file.url
|
|
111
|
-
});
|
|
112
81
|
};
|
|
113
|
-
return () =>
|
|
114
|
-
resource:
|
|
82
|
+
return () => r(q, {
|
|
83
|
+
resource: S.resource,
|
|
115
84
|
action: ["create", "edit"],
|
|
116
|
-
column:
|
|
85
|
+
column: e.source
|
|
117
86
|
}, {
|
|
118
|
-
default: () => [
|
|
87
|
+
default: () => [r(N, {
|
|
119
88
|
class: "sky-avatar-input",
|
|
120
|
-
label:
|
|
121
|
-
prop:
|
|
122
|
-
rules:
|
|
123
|
-
style:
|
|
89
|
+
label: d.value,
|
|
90
|
+
prop: e.source,
|
|
91
|
+
rules: e.rules,
|
|
92
|
+
style: c ? `grid-area: ${e.source}` : ""
|
|
124
93
|
}, {
|
|
125
|
-
default: () => [
|
|
94
|
+
default: () => [r(x, I({
|
|
126
95
|
ref: "uploadRef",
|
|
127
|
-
action:
|
|
128
|
-
method:
|
|
129
|
-
name:
|
|
130
|
-
withCredentials:
|
|
131
|
-
multiple:
|
|
96
|
+
action: p.value,
|
|
97
|
+
method: g.value,
|
|
98
|
+
name: h.value,
|
|
99
|
+
withCredentials: e.withCredentials,
|
|
100
|
+
multiple: e.multiple,
|
|
132
101
|
limit: 1,
|
|
133
|
-
beforeUpload:
|
|
134
|
-
onSuccess:
|
|
135
|
-
onExceed:
|
|
102
|
+
beforeUpload: y,
|
|
103
|
+
onSuccess: U,
|
|
104
|
+
onExceed: b,
|
|
136
105
|
headers: v.value,
|
|
137
106
|
data: f.value,
|
|
138
107
|
listType: "picture-card",
|
|
139
|
-
fileList:
|
|
140
|
-
"onUpdate:file-list": (
|
|
108
|
+
fileList: a.value,
|
|
109
|
+
"onUpdate:file-list": (t) => a.value = t,
|
|
141
110
|
autoUpload: !0,
|
|
142
111
|
showFileList: !1,
|
|
143
|
-
disabled: c.value,
|
|
144
112
|
accept: "image/*"
|
|
145
|
-
},
|
|
146
|
-
default: () =>
|
|
113
|
+
}, s), {
|
|
114
|
+
default: () => a.value.length ? R(r("div", {
|
|
147
115
|
class: "sky-avatar-input__preview",
|
|
148
116
|
style: {
|
|
149
|
-
backgroundImage: `url(${
|
|
117
|
+
backgroundImage: `url(${a.value[0].url})`
|
|
150
118
|
}
|
|
151
|
-
}, null), [[
|
|
152
|
-
default: () => [
|
|
119
|
+
}, null), [[G, a.value[0].status !== "success"]]) : r(P, null, {
|
|
120
|
+
default: () => [r(L, null, null)]
|
|
153
121
|
}),
|
|
154
|
-
file: (
|
|
155
|
-
if (
|
|
156
|
-
const
|
|
157
|
-
return
|
|
158
|
-
...
|
|
122
|
+
file: (t) => {
|
|
123
|
+
if (i.default) {
|
|
124
|
+
const l = i.default();
|
|
125
|
+
return A(C, l.map((w) => D(w, {
|
|
126
|
+
...t
|
|
159
127
|
})));
|
|
160
128
|
}
|
|
161
129
|
}
|
|
@@ -165,6 +133,6 @@ const we = /* @__PURE__ */ L({
|
|
|
165
133
|
}
|
|
166
134
|
});
|
|
167
135
|
export {
|
|
168
|
-
|
|
136
|
+
pe as SkyAvatarInput
|
|
169
137
|
};
|
|
170
138
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../src/components/avatar-input/index.tsx"],"sourcesContent":["import { EpPlus } from '@/icons/EpPlus'\nimport type {
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../src/components/avatar-input/index.tsx"],"sourcesContent":["import { EpPlus } from '@/icons/EpPlus'\nimport type { SkyUploadRawFile } from '@/provides'\nimport {\n ElFormItem,\n ElIcon,\n ElLoadingDirective,\n ElUpload,\n genFileId,\n type FormItemRule,\n type UploadFile,\n type UploadInstance,\n type UploadProps,\n type UploadRawFile,\n} from 'element-plus'\nimport {\n cloneVNode,\n computed,\n defineComponent,\n Fragment,\n h,\n useTemplateRef,\n withDirectives,\n} from 'vue'\nimport { useRoute } from 'vue-router'\nimport { useForm, useFormGrid, useUpload, type FormContext, type SkyUploadUserFile } from '@/hooks'\nimport { SkyCanAccess } from '../can-access'\nimport type { SkyLayoutRouteMeta } from '@/router'\n\nexport interface SkyOssAvatarInputProps {\n source: string\n label?: string\n rules?: FormItemRule | FormItemRule[]\n dataName?: string\n dataUrl?: string\n}\n\nexport const SkyAvatarInput = defineComponent<SkyOssAvatarInputProps & Partial<UploadProps>>({\n name: 'SkyAvatarInput',\n inheritAttrs: false,\n props: {\n source: {\n type: String,\n required: true,\n },\n label: String,\n rules: Object,\n dataName: {\n type: String,\n default: 'name',\n },\n dataUrl: {\n type: String,\n default: 'url',\n },\n },\n setup(props, { slots, attrs }) {\n const route = useRoute()\n const formGrid = useFormGrid()\n const { formData, editData } = useForm()! as FormContext<\n Record<string, Record<string, unknown>>\n >\n const title = computed<string>(() => props.label || props.source)\n // init fileList\n const { fileList, action, data, headers, method, name, beforeUpload } = useUpload()\n const uploadRef = useTemplateRef<UploadInstance>('uploadRef')\n const routeMeta = route.meta as SkyLayoutRouteMeta\n\n if (editData.value) {\n const ed = editData.value[props.source] as Record<string, unknown>\n formData[props.source] = ed\n fileList.value = [\n {\n upload: ed,\n name: ed[props.dataName!] as string,\n url: ed[props.dataUrl!] as string,\n },\n ]\n }\n\n const onExceed = async (files: File[]) => {\n uploadRef.value?.clearFiles()\n const file = files[0] as UploadRawFile\n file.uid = genFileId()\n uploadRef.value?.handleStart(file)\n uploadRef.value?.submit()\n }\n\n const onSuccess = () => {\n const upload = fileList.value[0]?.upload\n if (upload) {\n formData[props.source] = upload\n } else {\n const raw = fileList.value[0]?.raw as SkyUploadRawFile | undefined\n if (raw?.upload) {\n formData[props.source] = raw.upload\n }\n }\n }\n\n return () => (\n <SkyCanAccess resource={routeMeta.resource} action={['create', 'edit']} column={props.source}>\n <ElFormItem\n class=\"sky-avatar-input\"\n label={title.value}\n prop={props.source}\n rules={props.rules}\n style={formGrid ? `grid-area: ${props.source}` : ''}\n >\n <ElUpload\n ref=\"uploadRef\"\n action={action.value}\n method={method.value}\n name={name.value}\n withCredentials={props.withCredentials}\n multiple={props.multiple}\n limit={1}\n beforeUpload={beforeUpload}\n onSuccess={onSuccess}\n onExceed={onExceed}\n headers={headers.value}\n data={data.value}\n listType=\"picture-card\"\n fileList={fileList.value}\n onUpdate:file-list={(fs: SkyUploadUserFile[]) => (fileList.value = fs)}\n autoUpload={true}\n showFileList={false}\n // https://developer.mozilla.org/zh-CN/docs/Web/HTML/Reference/Attributes/accept\n accept={'image/*'}\n {...attrs}\n >\n {{\n default: () =>\n fileList.value.length ? (\n withDirectives(\n <div\n class=\"sky-avatar-input__preview\"\n style={{ backgroundImage: `url(${fileList.value[0]!.url})` }}\n ></div>,\n [[ElLoadingDirective, fileList.value[0]!.status !== 'success']],\n )\n ) : (\n <ElIcon>\n <EpPlus />\n </ElIcon>\n ),\n file: (scope: { file: UploadFile; index: number }) => {\n if (slots.default) {\n const vnodes = slots.default()\n return h(\n Fragment,\n vnodes.map((vnode) => cloneVNode(vnode, { ...scope })),\n )\n }\n },\n }}\n </ElUpload>\n </ElFormItem>\n </SkyCanAccess>\n )\n },\n})\n"],"names":["SkyAvatarInput","defineComponent","name","inheritAttrs","props","source","type","required","label","rules","dataName","default","dataUrl","attrs","route","useRoute","formGrid","useFormGrid","editData","title","computed","beforeUpload","uploadRef","useTemplateRef","routeMeta","formData","upload","url","onExceed","files","file","onSuccess","fs","fileList","vnodes","slots","h","Fragment","vnode","cloneVNode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,MAAAA,KAAA,gBAAAC,EAAA;AAAA,EACEC,MAAAA;AAAAA,EACAC,cAAAA;AAAAA,EACAC,OAAAA;AAAAA,IACEC,QAAAA;AAAAA,MACEC,MAAAA;AAAAA,MACAC,UAAAA;AAAAA;IAEFC,OAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,UAAAA;AAAAA,MACEJ,MAAAA;AAAAA,MACAK,SAAAA;AAAAA;IAEFC,SAAAA;AAAAA,MACEN,MAAAA;AAAAA,MACAK,SAAAA;AAAAA,IACF;AAAA;;;IAEoBE,OAAAA;AAAAA,EAAM,GAAA;AAC1B,UAAAC,IAAAC,EAAA,GACAC,IAAAC,EAAA;;MACkBC,UAAAA;AAAAA,aAGlBC,IAAAC,EAAA,MAAAhB,EAAA,SAAAA,EAAA,MAAA;;;;;;;MAEuDiB,cAAAA;AAAAA,aACvDC,IAAAC,EAAA,WAAA,GACAC,IAAAV,EAAA;;;AAIEW,MAAAA,EAAAA,EAAAA,MAAAA,IAAAA;QAGIC,QAAAA;AAAAA,QACAxB,MAAAA,EAAAA,EAAAA,QAAAA;AAAAA,QACAyB,KAAAA,EAAAA,EAAAA,OAAAA;AAAAA,MACF,CAAA;AAAA,IAEJ;AAEA,UAAAC,IAAA,OAAAC,MAAA;AACEP,MAAAA,EAAAA,OAAAA,WAAAA;AACA,YAAAQ,IAAAD,EAAA,CAAA;AACAC,MAAAA,EAAAA,MAAAA,EAAAA,GACAR,EAAAA,OAAAA,YAAAA,CAAAA,GACAA,EAAAA,OAAAA,OAAAA;AAAAA;;AAKA,UAAAI;AACED,QAAAA,EAAAA,EAAAA,MAAAA,IAAAA;AAAAA,WACF;;;MAKA;AAAA;;;MAI0C,QAAA,CAAA,UAAA,MAAA;AAAA,MAA4B,QAAArB,EAAA;AAAA,IAAsB,GAAA;AAAA,MAAAO,SAAAA,MAAAA,CAAAA,EAAAA,GAAAA;AAAAA,QAAA,OAAA;AAAA;;;QAKtE,OAAAK,IAAA,cAAAZ,EAAA,MAAA,KAAA;AAAA,MACiC,GAAA;AAAA,QAAAO,SAAAA,MAAAA,CAAAA,EAAAA,GAAAA,EAAAA;AAAAA,UAAA,KAAA;AAAA;;;;;UAQzB,OAAA;AAAA,UAChB,cAAAU;AAAA,UACkB,WAAAU;AAAA,UACN,UAAAH;AAAA;;UAGJ,UAAA;AAAA;UAEQ,sBAAA,CAAAI,MAAAC,EAAA,QAAAD;AAAA,UAC8C,YAAA;AAAA,UACtD,cAAA;AAAA;QAGC,GAAAnB,CAAA,GAAA;AAAA;YAMG,OAAA;AAAA;;YAGiD;AAAA;YAG9DF,SAAAA,MAAAA,CAAAA,EAAAA,GAAAA,MAAAA,IAAAA,CAAAA;AAAAA;;;AAQD,oBAAAuB,IAAAC,EAAA,QAAA;AACA,qBAAAC,EAAAC,GAAAH,EAAA,IAAA,CAAAI,MAAAC,EAAAD,GAAA;AAAA;;YAIF;AAAA,UACF;AAAA,QAAC,CAAA,CAAA;AAAA,MAAA,CAAA,CAAA;AAAA;EAMb;AACF,CAAA;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../hooks/useUser.cjs");const o=require("../../hooks/usePermission.cjs");require("../../hooks/useMenu.cjs");require("../../hooks/useTab.cjs");require("../../hooks/useRouteKeepAlive.cjs");require("../../hooks/useSize.cjs");require("../../hooks/useLang.cjs");require("../../hooks/useTheme.cjs");require("../../hooks/useList.cjs");require("../../hooks/useHiddenTitle.cjs");require("../../hooks/useForm.cjs");require("../../hooks/useShow.cjs");require("../../hooks/useReferenceArrayField.cjs");require("../../hooks/useTreeWithDetails.cjs");require("../../hooks/useFormGrid.cjs");require("../../hooks/useReferenceArrayInput.cjs");const r=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../hooks/useUser.cjs");const o=require("../../hooks/usePermission.cjs");require("../../hooks/useMenu.cjs");require("../../hooks/useTab.cjs");require("../../hooks/useRouteKeepAlive.cjs");require("../../hooks/useSize.cjs");require("../../hooks/useLang.cjs");require("../../hooks/useTheme.cjs");require("../../hooks/useList.cjs");require("../../hooks/useHiddenTitle.cjs");require("../../hooks/useForm.cjs");require("../../hooks/useShow.cjs");require("../../hooks/useReferenceArrayField.cjs");require("../../hooks/useTreeWithDetails.cjs");require("../../hooks/useFormGrid.cjs");require("../../hooks/useReferenceArrayInput.cjs");const r=require("../../setup/index.cjs"),u=require("vue"),c=require("vue-router"),q=u.defineComponent({name:"SkyCanAccess",props:{resource:{type:[String,Array],required:!0},action:{type:[String,Array],required:!0},row:[String,Number],column:[String,Number]},setup(i,{slots:e}){const t=c.useRouter(),{permissions:n}=o.usePermission(),s=u.computed(()=>t.hasRoute(r.skyConfig.loginRouteName)?r.skyConfig.dataProvider?.canAccess?.(i,n.value):!0);return()=>s.value?e.default?.():e.empty?.()}});exports.SkyCanAccess=q;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -14,8 +14,8 @@ import "../../hooks/useReferenceArrayField.mjs";
|
|
|
14
14
|
import "../../hooks/useTreeWithDetails.mjs";
|
|
15
15
|
import "../../hooks/useFormGrid.mjs";
|
|
16
16
|
import "../../hooks/useReferenceArrayInput.mjs";
|
|
17
|
-
import { defineComponent as n, computed as u } from "vue";
|
|
18
17
|
import { skyConfig as t } from "../../setup/index.mjs";
|
|
18
|
+
import { defineComponent as n, computed as u } from "vue";
|
|
19
19
|
import { useRouter as s } from "vue-router";
|
|
20
20
|
const x = /* @__PURE__ */ n({
|
|
21
21
|
name: "SkyCanAccess",
|