@aplus-frontend/ui 7.1.1 → 7.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/es/index.mjs +207 -211
- package/es/src/ag-grid/index.vue.mjs +247 -239
- package/es/src/ap-form/style/search-form-sorter.mjs +1 -1
- package/es/src/ap-grid/index.vue.mjs +197 -197
- package/es/src/ap-pro-card/components/statistic-card/index.vue.mjs +122 -2
- package/es/src/ap-pro-card/components/statistic-card/index.vue2.mjs +2 -122
- package/es/src/ap-pro-card/components/title/index.vue.d.ts +3 -0
- package/es/src/ap-pro-card/components/title/index.vue2.mjs +18 -13
- package/es/src/ap-pro-card/index.d.ts +1 -1
- package/es/src/ap-pro-card/index.mjs +2 -2
- package/es/src/ap-pro-card/statistic-card/index.d.ts +2 -0
- package/es/src/ap-pro-card/statistic-card/index.mjs +5 -0
- package/es/src/ap-table/ap-table.vue2.mjs +190 -190
- package/es/src/business/ag-grid-modal/hooks/use-modal-title.mjs +16 -13
- package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +2 -2
- package/es/src/business/ap-attachment/ApAttachment.mjs +2 -2
- package/es/src/business/ap-attachment/interface.d.ts +1 -1
- package/es/src/{ap-descriptions → business/ap-descriptions}/ap-descriptions.vue.mjs +3 -3
- package/es/src/{ap-descriptions → business/ap-descriptions}/help-message/index.vue2.mjs +2 -2
- package/es/src/{ap-descriptions → business/ap-descriptions}/style/index.mjs +1 -1
- package/es/src/{ap-download → business/ap-download}/ap-download.vue.mjs +3 -3
- package/es/src/{ap-download → business/ap-download}/hooks/useStyle.mjs +3 -3
- package/es/src/{ap-download → business/ap-download}/style/index.mjs +1 -1
- package/es/src/business/ap-image/ApImage.vue2.mjs +45 -42
- package/es/src/business/ap-image/interface.d.ts +2 -0
- package/es/src/business/ap-label/group/ApLabelGroup.mjs +11 -10
- package/es/src/business/ap-label/interface.d.ts +1 -1
- package/es/src/{ap-tag → business/ap-tag}/ap-tag-group.vue.mjs +7 -7
- package/es/src/{ap-tag → business/ap-tag}/ap-tag.vue.mjs +2 -2
- package/es/src/{ap-tag → business/ap-tag}/style/group.d.ts +1 -1
- package/es/src/{ap-tag → business/ap-tag}/style/group.mjs +1 -1
- package/{lib/src → es/src/business}/ap-tag/style/index.d.ts +1 -1
- package/es/src/{ap-tag → business/ap-tag}/style/index.mjs +1 -1
- package/es/src/business/ap-title/ApTitle.vue2.mjs +24 -21
- package/es/src/business/ap-title/interface.d.ts +2 -0
- package/es/src/{ap-upload → business/ap-upload}/apUpload.vue.mjs +4 -4
- package/es/src/{ap-upload → business/ap-upload}/components/MultipleFile.vue2.mjs +4 -4
- package/es/src/{ap-upload → business/ap-upload}/components/Picture.vue2.mjs +3 -3
- package/es/src/{ap-upload → business/ap-upload}/components/SingleFile.vue2.mjs +4 -4
- package/es/src/{ap-upload → business/ap-upload}/hooks/useOss.d.ts +1 -1
- package/es/src/{ap-upload → business/ap-upload}/style/index.mjs +1 -1
- package/es/src/business/ap-upload/style/multiple-file.d.ts +2 -0
- package/es/src/business/ap-upload/style/picture.d.ts +2 -0
- package/es/src/business/ap-upload/style/single-file.d.ts +2 -0
- package/{lib/src → es/src/business}/ap-upload/utils/accept.d.ts +1 -1
- package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.d.ts +1 -1
- package/es/src/business/ap-view/components/menu-list-content.vue2.mjs +2 -2
- package/es/src/business/hooks/index.d.ts +0 -2
- package/es/src/business/hooks/index.mjs +5 -9
- package/es/src/business/hooks/usePageListApGrid.d.ts +1 -2
- package/es/src/business/hooks/usePageListApGrid.mjs +35 -44
- package/es/src/business/hooks/usePageListApTable.d.ts +1 -2
- package/es/src/business/hooks/usePageListApTable.mjs +46 -48
- package/es/src/business/index.d.ts +4 -0
- package/es/src/business/index.mjs +58 -54
- package/es/src/config-provider/config-provider-props.d.ts +20 -3
- package/es/src/config-provider/config-provider-props.mjs +12 -0
- package/es/src/config-provider/config-provider.d.ts +33 -3
- package/es/src/config-provider/config-provider.mjs +35 -35
- package/es/src/config-provider/constants.d.ts +1 -0
- package/es/src/config-provider/hooks/use-global-config.d.ts +17 -2
- package/es/src/config-provider/hooks/use-locale.d.ts +2 -2
- package/es/src/config-provider/index.d.ts +49 -4
- package/es/src/index.d.ts +0 -4
- package/es/src/index.mjs +297 -305
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ap-form/style/search-form-sorter.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-pro-card/components/statistic-card/index.vue.js +1 -1
- package/lib/src/ap-pro-card/components/statistic-card/index.vue2.js +1 -1
- package/lib/src/ap-pro-card/components/title/index.vue.d.ts +3 -0
- package/lib/src/ap-pro-card/components/title/index.vue2.js +1 -1
- package/lib/src/ap-pro-card/index.d.ts +1 -1
- package/lib/src/ap-pro-card/index.js +1 -1
- package/lib/src/ap-pro-card/statistic-card/index.d.ts +2 -0
- package/lib/src/ap-pro-card/statistic-card/index.js +1 -0
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/business/ag-grid-modal/hooks/use-modal-title.js +1 -1
- package/lib/src/business/ap-appendix/ap-appendix.vue2.js +1 -1
- package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
- package/lib/src/business/ap-attachment/interface.d.ts +1 -1
- package/lib/src/business/ap-descriptions/ap-descriptions.vue.js +1 -0
- package/lib/src/business/ap-descriptions/help-message/index.vue2.js +1 -0
- package/lib/src/business/ap-descriptions/style/index.js +1 -0
- package/lib/src/business/ap-download/ap-download.vue.js +1 -0
- package/lib/src/business/ap-download/hooks/useStyle.js +1 -0
- package/lib/src/business/ap-download/style/index.js +1 -0
- package/lib/src/business/ap-image/ApImage.vue2.js +1 -1
- package/lib/src/business/ap-image/interface.d.ts +2 -0
- package/lib/src/business/ap-label/group/ApLabelGroup.js +1 -1
- package/lib/src/business/ap-label/interface.d.ts +1 -1
- package/lib/src/business/ap-tag/ap-tag-group.vue.js +1 -0
- package/lib/src/business/ap-tag/ap-tag.vue.js +1 -0
- package/lib/src/{ap-tag → business/ap-tag}/style/group.d.ts +1 -1
- package/lib/src/business/ap-tag/style/group.js +1 -0
- package/{es/src → lib/src/business}/ap-tag/style/index.d.ts +1 -1
- package/lib/src/business/ap-tag/style/index.js +1 -0
- package/lib/src/business/ap-title/ApTitle.vue2.js +1 -1
- package/lib/src/business/ap-title/interface.d.ts +2 -0
- package/lib/src/business/ap-upload/apUpload.vue.js +1 -0
- package/lib/src/business/ap-upload/components/MultipleFile.vue2.js +1 -0
- package/lib/src/business/ap-upload/components/Picture.vue2.js +1 -0
- package/lib/src/business/ap-upload/components/SingleFile.vue2.js +1 -0
- package/lib/src/{ap-upload → business/ap-upload}/hooks/useOss.d.ts +1 -1
- package/lib/src/business/ap-upload/style/index.js +1 -0
- package/lib/src/business/ap-upload/style/multiple-file.d.ts +2 -0
- package/lib/src/business/ap-upload/style/picture.d.ts +2 -0
- package/lib/src/business/ap-upload/style/single-file.d.ts +2 -0
- package/{es/src → lib/src/business}/ap-upload/utils/accept.d.ts +1 -1
- package/lib/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.d.ts +1 -1
- package/lib/src/business/ap-view/components/menu-list-content.vue2.js +1 -1
- package/lib/src/business/hooks/index.d.ts +0 -2
- package/lib/src/business/hooks/index.js +1 -1
- package/lib/src/business/hooks/usePageListApGrid.d.ts +1 -2
- package/lib/src/business/hooks/usePageListApGrid.js +1 -1
- package/lib/src/business/hooks/usePageListApTable.d.ts +1 -2
- package/lib/src/business/hooks/usePageListApTable.js +1 -1
- package/lib/src/business/index.d.ts +4 -0
- package/lib/src/business/index.js +1 -1
- package/lib/src/config-provider/config-provider-props.d.ts +20 -3
- package/lib/src/config-provider/config-provider-props.js +1 -1
- package/lib/src/config-provider/config-provider.d.ts +33 -3
- package/lib/src/config-provider/config-provider.js +1 -1
- package/lib/src/config-provider/constants.d.ts +1 -0
- package/lib/src/config-provider/hooks/use-global-config.d.ts +17 -2
- package/lib/src/config-provider/hooks/use-locale.d.ts +2 -2
- package/lib/src/config-provider/index.d.ts +49 -4
- package/lib/src/index.d.ts +0 -4
- package/lib/src/index.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +6 -5
- package/es/src/ap-upload/style/multiple-file.d.ts +0 -2
- package/es/src/ap-upload/style/picture.d.ts +0 -2
- package/es/src/ap-upload/style/single-file.d.ts +0 -2
- package/es/src/business/hooks/useGridRefresh.d.ts +0 -17
- package/es/src/business/hooks/useGridRefresh.mjs +0 -16
- package/es/src/business/hooks/useTableRefresh.d.ts +0 -20
- package/es/src/business/hooks/useTableRefresh.mjs +0 -57
- package/lib/src/ap-descriptions/ap-descriptions.vue.js +0 -1
- package/lib/src/ap-descriptions/help-message/index.vue2.js +0 -1
- package/lib/src/ap-descriptions/style/index.js +0 -1
- package/lib/src/ap-download/ap-download.vue.js +0 -1
- package/lib/src/ap-download/hooks/useStyle.js +0 -1
- package/lib/src/ap-download/style/index.js +0 -1
- package/lib/src/ap-tag/ap-tag-group.vue.js +0 -1
- package/lib/src/ap-tag/ap-tag.vue.js +0 -1
- package/lib/src/ap-tag/style/group.js +0 -1
- package/lib/src/ap-tag/style/index.js +0 -1
- package/lib/src/ap-upload/apUpload.vue.js +0 -1
- package/lib/src/ap-upload/components/MultipleFile.vue2.js +0 -1
- package/lib/src/ap-upload/components/Picture.vue2.js +0 -1
- package/lib/src/ap-upload/components/SingleFile.vue2.js +0 -1
- package/lib/src/ap-upload/style/index.js +0 -1
- package/lib/src/ap-upload/style/multiple-file.d.ts +0 -2
- package/lib/src/ap-upload/style/picture.d.ts +0 -2
- package/lib/src/ap-upload/style/single-file.d.ts +0 -2
- package/lib/src/business/hooks/useGridRefresh.d.ts +0 -17
- package/lib/src/business/hooks/useGridRefresh.js +0 -1
- package/lib/src/business/hooks/useTableRefresh.d.ts +0 -20
- package/lib/src/business/hooks/useTableRefresh.js +0 -1
- package/es/src/{ap-descriptions → business/ap-descriptions}/ap-descriptions.vue.d.ts +0 -0
- package/es/src/{ap-descriptions → business/ap-descriptions}/ap-descriptions.vue2.mjs +0 -0
- package/es/src/{ap-descriptions → business/ap-descriptions}/formatter/index.d.ts +0 -0
- package/es/src/{ap-descriptions → business/ap-descriptions}/formatter/index.mjs +0 -0
- package/es/src/{ap-descriptions → business/ap-descriptions}/formatter/utils.d.ts +0 -0
- package/es/src/{ap-descriptions → business/ap-descriptions}/formatter/utils.mjs +0 -0
- package/es/src/{ap-descriptions → business/ap-descriptions}/help-message/index.vue.d.ts +0 -0
- package/es/src/{ap-descriptions → business/ap-descriptions}/help-message/index.vue.mjs +0 -0
- package/es/src/{ap-descriptions → business/ap-descriptions}/helper.d.ts +0 -0
- package/es/src/{ap-descriptions → business/ap-descriptions}/helper.mjs +0 -0
- package/es/src/{ap-descriptions → business/ap-descriptions}/index.d.ts +0 -0
- package/es/src/{ap-descriptions → business/ap-descriptions}/index.mjs +0 -0
- package/es/src/{ap-descriptions → business/ap-descriptions}/interface.d.ts +0 -0
- package/es/src/{ap-descriptions → business/ap-descriptions}/interface.mjs +0 -0
- package/es/src/{ap-descriptions → business/ap-descriptions}/style/index.d.ts +0 -0
- package/es/src/{ap-download → business/ap-download}/ap-download.vue.d.ts +0 -0
- package/es/src/{ap-download → business/ap-download}/ap-download.vue2.mjs +0 -0
- package/es/src/{ap-download → business/ap-download}/hooks/index.d.ts +0 -0
- package/es/src/{ap-download → business/ap-download}/hooks/index.mjs +0 -0
- package/es/src/{ap-download → business/ap-download}/hooks/useStyle.d.ts +0 -0
- package/es/src/{ap-download → business/ap-download}/index.d.ts +0 -0
- package/es/src/{ap-download → business/ap-download}/index.mjs +0 -0
- package/es/src/{ap-download → business/ap-download}/interface.d.ts +0 -0
- package/es/src/{ap-download → business/ap-download}/interface.mjs +0 -0
- package/es/src/{ap-download → business/ap-download}/style/index.d.ts +0 -0
- package/es/src/{ap-download → business/ap-download}/utils/getFileInfo.d.ts +0 -0
- package/es/src/{ap-download → business/ap-download}/utils/getFileInfo.mjs +0 -0
- package/es/src/{ap-tag → business/ap-tag}/ap-tag-group.vue.d.ts +0 -0
- package/es/src/{ap-tag → business/ap-tag}/ap-tag-group.vue2.mjs +0 -0
- package/es/src/{ap-tag → business/ap-tag}/ap-tag.vue.d.ts +0 -0
- package/es/src/{ap-tag → business/ap-tag}/ap-tag.vue2.mjs +0 -0
- package/es/src/{ap-tag → business/ap-tag}/index.d.ts +0 -0
- package/es/src/{ap-tag → business/ap-tag}/index.mjs +0 -0
- package/es/src/{ap-tag → business/ap-tag}/interface.d.ts +0 -0
- package/es/src/{ap-tag → business/ap-tag}/interface.mjs +0 -0
- package/es/src/{ap-tag → business/ap-tag}/utils.d.ts +0 -0
- package/es/src/{ap-tag → business/ap-tag}/utils.mjs +0 -0
- package/{lib/src → es/src/business}/ap-upload/apUpload.vue.d.ts +2 -2
- package/es/src/{ap-upload → business/ap-upload}/apUpload.vue2.mjs +0 -0
- package/es/src/{ap-upload → business/ap-upload}/apUploadTypes.d.ts +0 -0
- package/es/src/{ap-upload → business/ap-upload}/apUploadTypes.mjs +0 -0
- package/es/src/{ap-upload → business/ap-upload}/assets/single-file-icon.png.mjs +0 -0
- package/es/src/{ap-upload → business/ap-upload}/components/MultipleFile.vue.d.ts +0 -0
- package/es/src/{ap-upload → business/ap-upload}/components/MultipleFile.vue.mjs +0 -0
- package/es/src/{ap-upload → business/ap-upload}/components/Picture.vue.d.ts +0 -0
- package/es/src/{ap-upload → business/ap-upload}/components/Picture.vue.mjs +0 -0
- package/es/src/{ap-upload → business/ap-upload}/components/SingleFile.vue.d.ts +0 -0
- package/es/src/{ap-upload → business/ap-upload}/components/SingleFile.vue.mjs +0 -0
- package/es/src/{ap-upload → business/ap-upload}/hooks/useOss.mjs +0 -0
- package/es/src/{ap-upload → business/ap-upload}/index.d.ts +0 -0
- package/es/src/{ap-upload → business/ap-upload}/index.mjs +0 -0
- package/es/src/{ap-upload → business/ap-upload}/style/index.d.ts +0 -0
- package/es/src/{ap-upload → business/ap-upload}/style/multiple-file.mjs +0 -0
- package/es/src/{ap-upload → business/ap-upload}/style/picture.mjs +0 -0
- package/es/src/{ap-upload → business/ap-upload}/style/single-file.mjs +0 -0
- package/es/src/{ap-upload → business/ap-upload}/utils/accept.mjs +0 -0
- package/es/src/{ap-upload → business/ap-upload}/utils/returnData.d.ts +0 -0
- package/es/src/{ap-upload → business/ap-upload}/utils/returnData.mjs +0 -0
- package/lib/src/{ap-descriptions → business/ap-descriptions}/ap-descriptions.vue.d.ts +0 -0
- package/lib/src/{ap-descriptions → business/ap-descriptions}/ap-descriptions.vue2.js +0 -0
- package/lib/src/{ap-descriptions → business/ap-descriptions}/formatter/index.d.ts +0 -0
- package/lib/src/{ap-descriptions → business/ap-descriptions}/formatter/index.js +0 -0
- package/lib/src/{ap-descriptions → business/ap-descriptions}/formatter/utils.d.ts +0 -0
- package/lib/src/{ap-descriptions → business/ap-descriptions}/formatter/utils.js +0 -0
- package/lib/src/{ap-descriptions → business/ap-descriptions}/help-message/index.vue.d.ts +0 -0
- package/lib/src/{ap-descriptions → business/ap-descriptions}/help-message/index.vue.js +0 -0
- package/lib/src/{ap-descriptions → business/ap-descriptions}/helper.d.ts +0 -0
- package/lib/src/{ap-descriptions → business/ap-descriptions}/helper.js +0 -0
- package/lib/src/{ap-descriptions → business/ap-descriptions}/index.d.ts +0 -0
- package/lib/src/{ap-descriptions → business/ap-descriptions}/index.js +0 -0
- package/lib/src/{ap-descriptions → business/ap-descriptions}/interface.d.ts +0 -0
- package/lib/src/{ap-descriptions → business/ap-descriptions}/interface.js +0 -0
- package/lib/src/{ap-descriptions → business/ap-descriptions}/style/index.d.ts +0 -0
- package/lib/src/{ap-download → business/ap-download}/ap-download.vue.d.ts +0 -0
- package/lib/src/{ap-download → business/ap-download}/ap-download.vue2.js +0 -0
- package/lib/src/{ap-download → business/ap-download}/hooks/index.d.ts +0 -0
- package/lib/src/{ap-download → business/ap-download}/hooks/index.js +0 -0
- package/lib/src/{ap-download → business/ap-download}/hooks/useStyle.d.ts +0 -0
- package/lib/src/{ap-download → business/ap-download}/index.d.ts +0 -0
- package/lib/src/{ap-download → business/ap-download}/index.js +0 -0
- package/lib/src/{ap-download → business/ap-download}/interface.d.ts +0 -0
- package/lib/src/{ap-download → business/ap-download}/interface.js +0 -0
- package/lib/src/{ap-download → business/ap-download}/style/index.d.ts +0 -0
- package/lib/src/{ap-download → business/ap-download}/utils/getFileInfo.d.ts +0 -0
- package/lib/src/{ap-download → business/ap-download}/utils/getFileInfo.js +0 -0
- package/lib/src/{ap-tag → business/ap-tag}/ap-tag-group.vue.d.ts +0 -0
- package/lib/src/{ap-tag → business/ap-tag}/ap-tag-group.vue2.js +0 -0
- package/lib/src/{ap-tag → business/ap-tag}/ap-tag.vue.d.ts +0 -0
- package/lib/src/{ap-tag → business/ap-tag}/ap-tag.vue2.js +0 -0
- package/lib/src/{ap-tag → business/ap-tag}/index.d.ts +0 -0
- package/lib/src/{ap-tag → business/ap-tag}/index.js +0 -0
- package/lib/src/{ap-tag → business/ap-tag}/interface.d.ts +0 -0
- package/lib/src/{ap-tag → business/ap-tag}/interface.js +0 -0
- package/lib/src/{ap-tag → business/ap-tag}/utils.d.ts +0 -0
- package/lib/src/{ap-tag → business/ap-tag}/utils.js +0 -0
- package/{es/src → lib/src/business}/ap-upload/apUpload.vue.d.ts +2 -2
- /package/lib/src/{ap-upload → business/ap-upload}/apUpload.vue2.js +0 -0
- /package/lib/src/{ap-upload → business/ap-upload}/apUploadTypes.d.ts +0 -0
- /package/lib/src/{ap-upload → business/ap-upload}/apUploadTypes.js +0 -0
- /package/lib/src/{ap-upload → business/ap-upload}/assets/single-file-icon.png.js +0 -0
- /package/lib/src/{ap-upload → business/ap-upload}/components/MultipleFile.vue.d.ts +0 -0
- /package/lib/src/{ap-upload → business/ap-upload}/components/MultipleFile.vue.js +0 -0
- /package/lib/src/{ap-upload → business/ap-upload}/components/Picture.vue.d.ts +0 -0
- /package/lib/src/{ap-upload → business/ap-upload}/components/Picture.vue.js +0 -0
- /package/lib/src/{ap-upload → business/ap-upload}/components/SingleFile.vue.d.ts +0 -0
- /package/lib/src/{ap-upload → business/ap-upload}/components/SingleFile.vue.js +0 -0
- /package/lib/src/{ap-upload → business/ap-upload}/hooks/useOss.js +0 -0
- /package/lib/src/{ap-upload → business/ap-upload}/index.d.ts +0 -0
- /package/lib/src/{ap-upload → business/ap-upload}/index.js +0 -0
- /package/lib/src/{ap-upload → business/ap-upload}/style/index.d.ts +0 -0
- /package/lib/src/{ap-upload → business/ap-upload}/style/multiple-file.js +0 -0
- /package/lib/src/{ap-upload → business/ap-upload}/style/picture.js +0 -0
- /package/lib/src/{ap-upload → business/ap-upload}/style/single-file.js +0 -0
- /package/lib/src/{ap-upload → business/ap-upload}/utils/accept.js +0 -0
- /package/lib/src/{ap-upload → business/ap-upload}/utils/returnData.d.ts +0 -0
- /package/lib/src/{ap-upload → business/ap-upload}/utils/returnData.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue");require("../../config-provider/index.js");const S=require("./style/index.js"),y=require("../../config-provider/hooks/use-namespace.js"),$=["title"],b=t.defineComponent({name:"ApTag",__name:"ap-tag",props:{type:{default:"purely"},text:{},color:{default:"#34B77C"},size:{default:"middle"},disabled:{type:Boolean,default:!1},fixedWidth:{type:Boolean,default:!1}},setup(i){const a=i,{b:r,bm:n}=y.useNamespace("tag"),l=S.default("tag");function s(e,p){e.length===4&&(e=`#${e[1]}${e[1]}${e[2]}${e[2]}${e[3]}${e[3]}`);const d=parseInt(e.slice(1,3),16),g=parseInt(e.slice(3,5),16),m=parseInt(e.slice(5,7),16),f=Math.round(p*255).toString(16).padStart(2,"0");return`#${d.toString(16).padStart(2,"0")}${g.toString(16).padStart(2,"0")}${m.toString(16).padStart(2,"0")}${f}`}const c=t.computed(()=>({"--tag-main-color":a.color,"--tag-main-color-opacity":s(a.color,.06),"--tag-main-color-background":s(a.color,.15)})),o=t.computed(()=>[r(),r("wrapper"),r(`wrapper-${a.type}`),n("wrapper",a.size),l.value].filter(Boolean)),u=t.computed(()=>{const e=[r("inner-wrapper"),n("inner-wrapper",a.size)];return a.disabled&&e.push(n("inner-wrapper","disabled")),e});return(e,p)=>(t.openBlock(),t.createElementBlock("span",{style:t.normalizeStyle(c.value),title:e.text,class:t.normalizeClass(o.value)},[t.createElementVNode("span",{class:t.normalizeClass(u.value)},t.toDisplayString(e.text),3)],14,$))}});exports.default=b;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GenStyleFunc } from '
|
|
1
|
+
import { GenStyleFunc } from '../../../design-token/interface';
|
|
2
2
|
import { ComputedRef } from 'vue';
|
|
3
3
|
export declare const genTagGroupStyle: GenStyleFunc;
|
|
4
4
|
declare const _default: (prefixCls: string) => ComputedRef<string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("../../../utils/cssinjs/index.js"),o=e=>{const{componentCls:t}=e;return{[t]:{textWrap:"nowrap",display:"flex",flexWrap:"nowrap",whiteSpace:"nowrap",alignItems:"center",[`${t}-ellipsis-text`]:{fontSize:e.fontSize,color:e.textColor1}}}},r=n.genComponentStyleHook("ApTag.Group",e=>[o(e)]);exports.default=r;exports.genTagGroupStyle=o;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GenStyleFunc } from '
|
|
1
|
+
import { GenStyleFunc } from '../../../design-token/interface';
|
|
2
2
|
import { ComputedRef } from 'vue';
|
|
3
3
|
export declare const genApTagStyle: GenStyleFunc;
|
|
4
4
|
declare const _default: (prefixCls: string) => ComputedRef<string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../../utils/cssinjs/index.js"),l=e=>{const{componentCls:i}=e,o=`${i}-wrapper`,r=`${i}-inner-wrapper`;return{[o]:{textWrap:"nowrap",whiteSpace:"nowrap",display:"inline-flex",maxWidth:"100%",[r]:{borderRadius:e.borderRadius,boxSizing:"border-box",overflow:"hidden",textOverflow:"ellipsis",width:"100%","&--large":{padding:"6px",lineHeight:e.lineHeightLG,fontSize:e.fontSizeLG},"&--middle":{lineHeight:e.lineHeight,padding:"3px 6px",fontSize:e.fontSize},"&--small":{padding:"0 4px",lineHeight:e.lineHeight,fontSize:e.fontSize,borderRadius:"2px"}}},[`${o}-purely`]:{"& > *":{backgroundColor:"var(--tag-main-color-background)",color:e.textColor1},[`${r}--disabled`]:{backgroundColor:`color-mix(in srgb, ${e.textColor3} 15%, white)`}},[`${o}-border`]:{"& > *":{outline:"1px solid var(--tag-main-color)",outlineOffset:"-1px",backgroundColor:"var(--tag-main-color-opacity)",color:"var(--tag-main-color)"},[`${r}--disabled`]:{outline:`1px solid ${e.borderColorBase}`,outlineOffset:"-1px",backgroundColor:`color-mix(in srgb, ${e.textColor2} 6%, white)`,color:e.textColor2}}}},a=t.genComponentStyleHook("ApTag",e=>[l(e)]);exports.default=a;exports.genApTagStyle=l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),p=require("@aplus-frontend/antdv"),d=require("@ant-design/icons-vue");require("../../config-provider/index.js");const f=require("./style/index.js"),m=require("../../config-provider/hooks/use-namespace.js"),g=require("../../config-provider/hooks/use-global-config.js"),h=e.defineComponent({name:"ApTitle",__name:"ApTitle",props:{title:{default:""},helpMessage:{default:""},helpIconColor:{default:""},placement:{default:"top"},trigger:{default:"hover"},uiMode:{}},setup(r){const l=r,{b:n,e:o,m:s}=m.useNamespace("ap-title"),a=f.default("ap-title"),i=g.useGlobalConfig("apTitle",{uiMode:"aplus"}),u=e.computed(()=>l.uiMode||i.value?.uiMode),c=e.computed(()=>l.helpIconColor?{color:`${l.helpIconColor}`}:{});return(t,C)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(n)(),`${e.unref(s)(u.value)}`,e.unref(a)])},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(o)("prefix"))},[t.$slots.prefix?e.renderSlot(t.$slots,"prefix",{key:0}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("span",null,e.toDisplayString(t.title),1),t.helpMessage?(e.openBlock(),e.createBlock(e.unref(p.Tooltip),{key:0,title:t.helpMessage,placement:t.placement,trigger:t.trigger},{default:e.withCtx(()=>[e.createVNode(e.unref(d.QuestionCircleOutlined),{style:e.normalizeStyle(c.value)},null,8,["style"])]),_:1},8,["title","placement","trigger"])):e.createCommentVNode("",!0)],64))],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(o)("suffix"))},[e.renderSlot(t.$slots,"suffix")],2)],2))}});exports.default=h;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../config-provider/index.js");require("./components/SingleFile.vue.js");require("./components/MultipleFile.vue.js");require("./components/Picture.vue.js");const b=require("./utils/accept.js"),M=require("./hooks/useOss.js"),x=require("@aplus-frontend/antdv"),F=require("./style/index.js"),E=require("../../config-provider/hooks/use-locale.js"),N=require("../../config-provider/hooks/use-namespace.js"),h=require("./components/Picture.vue2.js"),O=require("./components/MultipleFile.vue2.js"),U=require("./components/SingleFile.vue2.js"),R=require("../../config-provider/hooks/use-global-config.js"),j=["id"],z=e.defineComponent({name:"AplusFileUpload",__name:"apUpload",props:{dirName:{type:String,default:void 0},type:{type:String,default:"singleFile"},value:{type:[String,Object,Array],default:void 0},needName:{type:[Boolean,Object],default:void 0},accept:{type:String,default:void 0},maxSize:{type:Number,default:void 0},title:{type:String,default:""},subTitle:{type:[String,Object],default:""},maxCount:{type:Number,default:void 0},beforeUpload:{type:Function,default:void 0},customRequest:{type:Function,default:void 0},getOssAccess:{type:Function,default:void 0},onChange:{type:Function,default:void 0},maxSizeErrorMsg:{type:String,default:void 0},maxCountErrorMsg:{type:String,default:void 0},acceptErrorMsg:{type:String,default:void 0},onRemove:{type:Function,default:void 0},showUploadErrorMsg:{type:Boolean,default:!0}},emits:["update:value"],setup(p,{expose:d,emit:c}){const{t:u,lang:v}=E.useLocale();b.injectLocaleToAccept(u),M.injectLocaleToOss(u,v);const{b:m}=N.useNamespace("ap-upload"),f=F.default("ap-upload"),a=e.ref(null),t=p,g=c,_={singleFile:U.default,multipleFile:O.default,picture:h.default},i=x.Form.useInjectFormItemContext(),y=e.computed({get(){return t.value},set(o){g("update:value",o),i?.onFieldChange(),t.onChange?.(o)}}),r=R.useGlobalConfig("apUpload");e.provide("value",y),e.provide("dirName",t.dirName??r.value?.dirName),e.provide("needName",t.needName??r.value?.needName??!1),e.provide("accept",t.accept??r.value?.accept??""),e.provide("maxSize",t.maxSize),e.provide("title",t.title),e.provide("subTitle",t.subTitle),e.provide("maxCount",t.maxCount),e.provide("beforeUpload",t.beforeUpload),e.provide("customRequest",t.customRequest),e.provide("getOssAccess",t.getOssAccess??r.value?.getOssAccess),e.provide("maxSizeErrorMsg",t.maxSizeErrorMsg),e.provide("maxCountErrorMsg",t.maxCountErrorMsg),e.provide("acceptErrorMsg",t.acceptErrorMsg),e.provide("onRemove",t.onRemove),e.provide("showUploadErrorMsg",t.showUploadErrorMsg);const C=e.computed(()=>n.value===0),n=e.ref(0);e.provide("uploadingCount",n);function S(){s(void 0)}function s(o){a?.value?.setValue?.(o)}return d({done:C,clear:S,setValue:s}),(o,A)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(i)?.id.value,class:e.normalizeClass([e.unref(m)(),e.unref(f)])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(_[t.type]),e.mergeProps(o.$attrs,{ref_key:"uploadRef",ref:a}),e.createSlots({_:2},[e.renderList(Object.keys(o.$slots),l=>({name:l,fn:e.withCtx(q=>[e.renderSlot(o.$slots,l,e.normalizeProps(e.guardReactiveProps(q||{})))])}))]),1040))],10,j))}});exports.default=z;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../config-provider/index.js");const h=require("../utils/returnData.js"),C=require("../hooks/useOss.js"),i=require("@aplus-frontend/antdv"),q=require("@ant-design/icons-vue"),T=require("../utils/accept.js"),G=require("../style/index.js"),W=require("../../../config-provider/hooks/use-global-config.js"),H=require("../../../config-provider/hooks/use-locale.js"),J=require("../../../config-provider/hooks/use-namespace.js"),K={class:"multiple-file-context"},Q={key:0},X={key:1},Y=e.defineComponent({__name:"MultipleFile",setup(Z,{expose:F}){const y=W.useGlobalConfig("downloadCenterTriggerConfig"),{t:a}=H.useLocale(),{b:R}=J.useNamespace("ap-upload-multiple-file"),A=G.default("ap-upload"),{put:B}=C.useOss(),I=e.inject("dirName"),w=e.inject("accept")||"*",k=e.inject("maxSize")??500,M=e.inject("title")||a("ap.apUpload.uploadFile"),d=e.inject("subTitle"),r=e.inject("maxCount")??10,c=e.inject("uploadingCount"),j=e.inject("beforeUpload"),E=e.inject("customRequest"),N=e.inject("getOssAccess"),S=e.inject("maxSizeErrorMsg"),L=e.inject("maxCountErrorMsg"),O=e.inject("acceptErrorMsg"),U=e.inject("onRemove"),x=e.inject("showUploadErrorMsg"),s=e.inject("value"),l=[],m=e.inject("needName"),p=e.ref(null);e.watch(()=>s?.value,function(t){!p?.value?.fileList?.length&&t&&b(t)},{immediate:!0});function b(t){if(!t){u=[],p.value.fileList=[],s.value=void 0,l.splice(0,l.length);return}e.nextTick(()=>{const o=t.map(n=>{const g=h.getPath(m,n),$=h.getName(m,n),v=new File([n],$,{});return v.response=g,v.uid=g,v.status="done",v});if(r&&o.length>r){i.message.warning(a("ap.apUpload.fileInitializationException",{maxCount:r}));return}o.forEach(n=>{u.push(n),l.push({uid:n.uid,path:n.response})}),p.value.fileList=o,s.value=t})}F({setValue:b});let u=[],_;function f(t){setTimeout(()=>{const o=p.value.fileList.findIndex(n=>n.uid===t.uid);o>=0&&p.value.fileList.splice(o,1)})}async function V(t){if(r&&r>1&&u.length>=r)return clearTimeout(_),_=setTimeout(()=>{i.message.warning(L||a("ap.apUpload.maxUploadFiles",{maxCount:r}))}),f(t),!1;if(t.size>k*1024*1024)return i.message.warning(S||a("ap.apUpload.maxUploadFileSize",{maxSize:k})),f(t),!1;if(!T.fileMatchesAccept(t,w))return i.message.warning(O||a("ap.apUpload.fileFormatNotSupported")),f(t),!1;if(typeof j=="function"&&await j(t)===!1)return f(t),!1;r&&r===1&&(u=[],s.value=void 0),u.push(t)}async function D(t){if(c.value++,typeof E=="function"){E({onProgress:o=>{setTimeout(()=>{t.onProgress({percent:o})})},onError:o=>{x&&i.message.warning(o||a("ap.apUpload.networkAnomaly")),setTimeout(()=>{t.onError({name:o,message:o})}),c.value--},onSuccess:o=>{setTimeout(()=>{t.onSuccess(o)}),s.value=[...s.value||[],h.getReturnData(m,o,t.file.name)],l.push({uid:t.file.uid,path:o}),c.value--},file:t.file});return}try{const o=await C.getOssInstance(N);t.file.oss=o,B({file:t.file,dirName:I,oss:o,successCallBack(n){t.onSuccess(n),s.value=[...s.value||[],h.getReturnData(m,n,t.file.name)],l.push({uid:t.file.uid,path:n}),c.value--},errorCallBack(n){x&&i.message.warning(n||a("ap.apUpload.networkAnomaly")),t.onError({name:n,message:n}),c.value--},progressCallBack(n){t.onProgress({percent:n})}})}catch(o){x&&i.message.warning(typeof o?.message=="string"?o.message:a("ap.apUpload.networkAnomaly")),t.onError({name:o?.message||a("ap.apUpload.networkAnomaly"),message:o?.message||a("ap.apUpload.networkAnomaly")}),c.value--}}function z(t){if(U&&U?.(t),t.response){if(Array.isArray(s.value)){const n=l.findIndex(g=>g.uid===t.uid);n>=0&&(s?.value.splice(n,1),l.splice(n,1)),s.value.length===0&&(s.value=void 0)}}else t?.oss?.pauseUpload();const o=u.findIndex(n=>n.uid===t.uid);return u.splice(o,1),Promise.resolve(!0)}const P=async t=>{if(y.value?.trigger){let o=[t].map(n=>({objectName:n.response,fileName:n.name}));y.value?.trigger?.(o)}else(await C.getOssInstance(N)).downloadFile([{path:t.response,fileName:t.name}])};return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({[e.unref(R)()]:!0,[e.unref(A)??""]:!0})},[e.createVNode(e.unref(i.Upload),{ref_key:"uploadRef",ref:p,accept:e.unref(w),multiple:"","max-count":e.unref(r),progress:{strokeWidth:3,showInfo:!1,strokeColor:"#0070FF"},"before-upload":V,"custom-request":D,"show-upload-list":{showDownloadIcon:!0,showRemoveIcon:!0},onRemove:z,onDownload:P},{downloadIcon:e.withCtx(()=>[e.createVNode(e.unref(q.VerticalAlignBottomOutlined))]),default:e.withCtx(()=>[e.createElementVNode("div",K,[e.createVNode(e.unref(i.Button),{class:"file-btn"},{default:e.withCtx(()=>[e.createVNode(e.unref(q.UploadOutlined)),e.createTextVNode(" "+e.toDisplayString(e.unref(M)),1)]),_:1}),e.createElementVNode("div",{class:"sub-title",onClick:o[0]||(o[0]=e.withModifiers(()=>{},["stop"]))},[typeof e.unref(d)=="string"?(e.openBlock(),e.createElementBlock("div",Q,e.toDisplayString(e.unref(d)||`${e.unref(a)("ap.apUpload.supportExtension")}:${e.unref(T.getAcceptText)(e.unref(w))}`),1)):e.unref(d)?(e.openBlock(),e.createElementBlock("div",X,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(d))))])):e.createCommentVNode("",!0)])])]),_:1},8,["accept","max-count"])],2))}});exports.default=Y;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../config-provider/index.js");const v=require("../utils/returnData.js"),B=require("@ant-design/icons-vue"),y=require("../hooks/useOss.js"),S=require("../utils/accept.js"),l=require("@aplus-frontend/antdv"),J=require("lodash-unified"),K=require("../style/index.js"),Q=require("../../../config-provider/hooks/use-locale.js"),W=require("../../../config-provider/hooks/use-namespace.js"),X=["accept"],Y={class:"picture-context"},Z={class:"picture-item-box"},F=["src"],ee={class:"picture-item-shadow"},te=["onClick"],ne={key:0,class:"picture-item-uploading"},ae={class:"picture-title"},se={key:0},oe={key:1},ce=e.defineComponent({__name:"Picture",setup(re,{expose:q}){const{t:i}=Q.useLocale(),{b:M}=W.useNamespace("ap-upload-picture"),R=K.default("ap-upload"),{put:b}=y.useOss(),P=e.inject("dirName"),h=e.inject("accept")||"image/*",k=e.inject("maxSize")??5,_=e.inject("title"),u=e.inject("maxCount")??10,f=e.inject("uploadingCount"),w=e.inject("beforeUpload"),E=e.inject("customRequest"),U=e.inject("getOssAccess"),z=e.inject("maxSizeErrorMsg"),A=e.inject("maxCountErrorMsg"),I=e.inject("acceptErrorMsg"),m=e.ref(null),r=e.inject("value"),g=e.inject("needName"),C=e.inject("onRemove"),x=e.inject("showUploadErrorMsg");let o=e.ref([]);const p=[];e.watch(()=>r?.value,async function(n){!o?.value?.length&&n&&N(n)},{immediate:!0});function N(n){if(!n){r.value=void 0,p.splice(0,p.length),o.value=[];return}e.nextTick(async()=>{const s=[];for(let t of n){const a=v.getPath(g,t),c=v.getName(g,t),d=await y.getOssInstance(U),G=await d.getSignatureUrl(a),H={...typeof t=="string"?{}:t,...new File([t],c,{}),uid:`${new Date().getTime()}-${Math.random()}`,thumbUrl:G,status:"success",percent:100,path:a};s.push(H),d.destroy()}if(u&&s.length>u){l.message.warning(i("ap.apUpload.fileInitializationException",{maxCount:u}));return}s.forEach(t=>{o.value.push(t),p.push({uid:t.uid,path:t.path})}),r.value=n})}q({setValue:N});function D(){m.value?.click()}function $(n){const s=n.target;O(s?.files)}function O(n){if(n?.length)for(let s=0;s<n.length;s++)T(n[s]);m.value&&(m.value.value="")}let V;async function T(n){if(u&&u>1&&o.value.length>=u)return clearTimeout(V),V=setTimeout(()=>{l.message.warning(A||i("ap.apUpload.maxUploadPicture",{maxCount:u}))}),!1;if(n.size>k*1024*1024)return l.message.warning(z||i("ap.apUpload.maxUploadFileSize",{maxSize:k})),!1;if(!/image\/\w+/.test(n.type)||!S.fileMatchesAccept(n,h))return l.message.warning(I||i("ap.apUpload.pictureFormatNotSupported")),!1;if(typeof w=="function"&&await w(n)===!1)return!1;const s=new FileReader;s.readAsDataURL(n),s.onload=function(){const t={...n,uid:`${new Date().getTime()}-${Math.random()}`,thumbUrl:this.result,status:"uploading",percent:0};L(t,n)},s.onerror=function(){l.message.warning(i("ap.apUpload.imageParsingFailed"))}}async function L(n,s){if(f.value++,typeof E=="function"){E({onProgress:t=>{const a=o.value.find(c=>c.uid===n.uid);a&&(a.percent=t)},onError:t=>{x&&l.message.warning(t||i("ap.apUpload.networkAnomaly"));const a=o.value.findIndex(c=>c.uid===n.uid);a>-1&&o.value.splice(a,1),f.value--},onSuccess:t=>{const a=o.value.find(c=>c.uid===n.uid);a&&(a.status="success",a.path=t),r.value=[...r.value||[],v.getReturnData(g,t,s.name)],p.push({uid:n.uid,path:t}),f.value--},file:s});return}try{const t=await y.getOssInstance(U);n.oss=t,o.value.push(n),b({file:s,dirName:P,oss:t,successCallBack(a){const c=o.value.find(d=>d.uid===n.uid);c&&(c.status="success",c.path=a),r.value=[...r.value||[],v.getReturnData(g,a,s.name)],p.push({uid:n.uid,path:a}),f.value--},errorCallBack(a){x&&l.message.warning(a||i("ap.apUpload.networkAnomaly"));const c=o.value.findIndex(d=>d.uid===n.uid);c>-1&&o.value.splice(c,1),f.value--},progressCallBack(a){const c=o.value.find(d=>d.uid===n.uid);c&&(c.percent=a)}})}catch(t){x&&l.message.warning(typeof t?.message=="string"?t.message:i("ap.apUpload.networkAnomaly"));const a=o.value.findIndex(c=>c.uid===n.uid);a>-1&&o.value.splice(a,1),f.value--}}function j(n){if(C&&C?.(n),n.path&&r){if(Array.isArray(r.value)){const t=p.findIndex(a=>a.uid===n.uid);if(t>=0){const a=r?.value?.slice()??[];a?.splice(t,1),r.value=a,p.splice(t,1)}r.value.length===0&&(r.value=void 0)}}else n?.oss?.pauseUpload();const s=o.value.findIndex(t=>t.uid===n.uid);return o.value.splice(s,1),Promise.resolve(!0)}return(n,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({[e.unref(M)()]:!0,[e.unref(R)??""]:!0})},[e.createElementVNode("input",{ref_key:"fileRef",ref:m,style:{display:"none"},type:"file",accept:e.unref(h),onChange:$},null,40,X),e.createElementVNode("div",Y,[e.renderSlot(n.$slots,"pictureContext",{fileList:e.unref(o).map(t=>({...e.unref(J.omit)(t,"oss"),oss:{pauseUpload:t?.oss?.pauseUpload}})),remove:j},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),t=>(e.openBlock(),e.createElementBlock("div",{key:t.uid,class:"picture-item"},[e.createElementVNode("div",Z,[e.createElementVNode("img",{src:t.thumbUrl,alt:""},null,8,F),e.withDirectives(e.createElementVNode("div",ee,[e.createElementVNode("div",{class:"picture-item-close",onClick:a=>j(t)},[e.createVNode(e.unref(B.CloseOutlined))],8,te),t.status==="uploading"?(e.openBlock(),e.createElementBlock("div",ne,[e.createVNode(e.unref(l.Progress),{percent:t.percent,"stroke-color":"#ffffff","trail-color":"rgba(255, 255, 255, 0.3)",size:4,"show-info":!1},null,8,["percent"])])):e.createCommentVNode("",!0)],512),[[e.vShow,t.status==="uploading"]])])]))),128))]),e.unref(u)===void 0||e.unref(o).length<e.unref(u)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"picture-upload",onClick:D},[e.createVNode(e.unref(B.PlusOutlined)),e.createElementVNode("div",null,e.toDisplayString(e.unref(i)("ap.apUpload.update")),1)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",ae,[e.unref(_)?(e.openBlock(),e.createElementBlock("div",se,e.toDisplayString(e.unref(_)),1)):(e.openBlock(),e.createElementBlock("div",oe,e.toDisplayString(`${e.unref(i)("ap.apUpload.supportExtension")}:${e.unref(S.getAcceptText)(e.unref(h))},${e.unref(i)("ap.apUpload.maxUploadPictureSize",{maxSize:e.unref(k)})}`),1))])],2))}});exports.default=ce;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../config-provider/index.js");const w=require("../utils/returnData.js"),A=require("../hooks/useOss.js"),M=require("../utils/accept.js"),s=require("@aplus-frontend/antdv"),ee=require("@ant-design/icons-vue"),R=require("../assets/single-file-icon.png.js"),te=require("../style/index.js"),ae=require("../../../config-provider/hooks/use-token.js"),ne=require("../../../config-provider/hooks/use-locale.js"),oe=require("../../../config-provider/hooks/use-namespace.js"),le=["accept"],re={key:0,class:"state-un"},se=["src"],ce={class:"state-un-title"},ue={class:"state-un-subtitle"},ie={key:1,class:"state-ing"},pe={class:"left"},de=["src"],fe={class:"center"},ve={class:"center-progress"},me=e.defineComponent({__name:"SingleFile",setup(ge,{expose:T}){const{t:l}=ne.useLocale(),{b:D}=oe.useNamespace("ap-upload-single-file"),O=te.default("ap-upload"),{put:P,client:U}=A.useOss(),L=e.inject("dirName"),v=e.inject("accept")||"*",m=e.inject("maxSize")??500,I=e.inject("title")||l("ap.apUpload.clickOrDragUpload"),g=e.inject("subTitle"),{token:C}=ae.useToken(),r=e.inject("value"),h=e.inject("needName"),c=e.inject("uploadingCount"),S=e.inject("beforeUpload"),F=e.inject("customRequest"),$=e.inject("getOssAccess"),G=e.inject("maxSizeErrorMsg"),W=e.inject("acceptErrorMsg"),j=e.inject("onRemove"),k=e.inject("showUploadErrorMsg"),n=e.ref(null);e.watch(()=>r?.value,function(t){n.value===null&&t&&V(t)},{immediate:!0});function V(t){t?setTimeout(()=>{const a=w.getName(h,t);o.value=3,n.value=new File([t],a,{}),r.value=t}):(o.value=1,n.value=null,r.value=void 0)}T({setValue:V});const o=e.ref(1),i=e.ref(0),p=e.ref(null),q=e.computed(()=>n.value&&r?.value);function H(){o.value===1&&p.value?.click()}function B(t){t.preventDefault(),t.stopPropagation()}function J(t){t.dataTransfer.dropEffect="copy",t.preventDefault(),t.stopPropagation()}function K(t){b(t)}function Q(t){if(t.preventDefault(),t.stopPropagation(),o.value!==1)return;var a=t.dataTransfer,d=[],x=0,z=a.files.length;function u(){x===z-1&&K(d),x++}if(a.items!==void 0)for(var _=0;_<a.items.length;_++){var y=a.items[_];if(y.kind==="file"&&y.webkitGetAsEntry().isFile){var Z=y.getAsFile();d.push(Z),u()}}else for(let N=0;N<z;N++){var f=a.files[N];if(f.type)d.push(f),u();else try{var E=new FileReader;E.readAsDataURL(f.slice(0,3)),E.addEventListener("load",function(){d.push(f),u()},!1),E.addEventListener("error",function(){s.message.warning(l("ap.apUpload.foldersNotSupported")),u()},!1)}catch{s.message.warning(l("ap.apUpload.foldersNotSupported")),u()}}}async function X(t){const a=t.target;await b(a?.files),p.value&&(p.value.value="")}async function b(t){if(t?.length){if(t[0].size>m*1024*1024){s.message.warning(G||l("ap.apUpload.maxUploadFileSize",{maxSize:m}));return}if(!M.fileMatchesAccept(t[0],v)){s.message.warning(W||l("ap.apUpload.fileFormatNotSupported"));return}if(typeof S=="function"&&await S(t[0])===!1)return;if(n.value=t[0],o.value=2,i.value=0,c.value++,typeof F=="function"){F({onProgress:a=>{i.value=a},onError:a=>{k&&s.message.warning(a||l("ap.apUpload.networkAnomaly")),o.value=1,n.value=null,c.value--},onSuccess:a=>{r.value=w.getReturnData(h,a,n.value.name),o.value=3,c.value--},file:t[0]});return}try{await A.useOssInit($),P({file:n.value,dirName:L,oss:U,successCallBack(a){r.value=w.getReturnData(h,a,n.value.name),o.value=3,c.value--},errorCallBack(a){k&&s.message.warning(a||l("ap.apUpload.networkAnomaly")),o.value=1,n.value=null,c.value--},progressCallBack(a){i.value=a}})}catch(a){k&&s.message.warning(typeof a?.message=="string"?a.message:l("ap.apUpload.networkAnomaly")),o.value=1,n.value=null,c.value--}}}function Y(){j&&j?.(n.value),n.value&&!r?.value&&U.pauseUpload(),o.value=1,n.value=null,r.value=void 0}return(t,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({[e.unref(D)()]:!0,[e.unref(D)("un")]:o.value===1,[e.unref(O)??""]:!0}),onClick:H,onDragenter:B,onDragover:J,onDragleave:B,onDrop:Q},[e.createElementVNode("input",{ref_key:"fileRef",ref:p,style:{display:"none"},type:"file",accept:e.unref(v),onChange:X},null,40,le),o.value===1?(e.openBlock(),e.createElementBlock("div",re,[e.createElementVNode("img",{class:"state-un-icon",src:e.unref(R.default)},null,8,se),e.createElementVNode("div",ce,e.toDisplayString(e.unref(I)),1),e.createElementVNode("div",ue,e.toDisplayString(typeof e.unref(g)=="string"&&e.unref(g).length>0?e.unref(g):`${e.unref(l)("ap.apUpload.supportExtension")}:${e.unref(M.getAcceptText)(e.unref(v))},${e.unref(l)("ap.apUpload.maxWarnUploadFileSize",{maxSize:e.unref(m)})}`),1)])):e.createCommentVNode("",!0),[2,3].includes(o.value)?(e.openBlock(),e.createElementBlock("div",ie,[e.createElementVNode("div",pe,[e.createElementVNode("img",{src:e.unref(R.default)},null,8,de)]),e.createElementVNode("div",fe,[e.createElementVNode("div",{class:"center-title",style:e.normalizeStyle({color:q.value?"#0070FF":"#182948"})},e.toDisplayString(n.value?.name),5),e.createElementVNode("div",ve,[q.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(s.Progress),{key:0,percent:i.value,size:4,"show-info":!1,"trail-color":e.unref(C).borderColorBase,"stroke-color":e.unref(C).colorPrimary},null,8,["percent","trail-color","stroke-color"]))])]),e.createElementVNode("div",{class:"right",onClick:e.withModifiers(Y,["stop"])},[e.createVNode(e.unref(ee.DeleteOutlined))])])):e.createCommentVNode("",!0)],34))}});exports.default=me;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { accessCreate, Oss } from '@aplus-frontend/oss';
|
|
2
|
-
import { Translator } from '
|
|
2
|
+
import { Translator } from '../../../config-provider';
|
|
3
3
|
import { Ref } from 'vue';
|
|
4
4
|
export type { Oss } from '@aplus-frontend/oss';
|
|
5
5
|
export type GetOssAccess = () => Promise<accessCreate>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("../../../utils/cssinjs/index.js"),t=require("./single-file.js"),i=require("./multiple-file.js"),u=require("./picture.js"),r=l.genComponentStyleHook("ApUpload",e=>[t.singleFileStyle(e),i.multipleFileStyle(e),u.pictureStyle(e)]);exports.default=r;
|
|
@@ -18,8 +18,8 @@ declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, Comp
|
|
|
18
18
|
}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
19
19
|
"onUpdate:fileList"?: ((...args: any[]) => any) | undefined;
|
|
20
20
|
}>, {
|
|
21
|
-
accept: string;
|
|
22
21
|
maxSize: number;
|
|
22
|
+
accept: string;
|
|
23
23
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
24
24
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
25
25
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../config-provider/index.js");const x=require("../hooks/use-view-provide.js"),m=require("../utils/enum.js"),c=require("@aplus-frontend/antdv"),E=require("../icons/line-delete.vue.js");require("
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../config-provider/index.js");const x=require("../hooks/use-view-provide.js"),m=require("../utils/enum.js"),c=require("@aplus-frontend/antdv"),E=require("../icons/line-delete.vue.js");require("../../ap-tag/index.js");require("../../../ap-form/ap-form.vue.js");const S=require("../../../ap-field/index.js"),q=require("../style/index.js"),g=require("../../../config-provider/hooks/use-token.js"),D=require("../../../config-provider/hooks/use-namespace.js"),K=require("../../../config-provider/hooks/use-locale.js"),B=require("../../ap-tag/ap-tag.vue.js"),f=require("../../../ap-form/ap-form.vue2.js"),T={class:"menu-list-content-name"},I=["title"],z={key:0,class:"menu-list-content-default"},M={class:"menu-list-content-action-delete"},b={class:"menu-list-content-edit"},P=e.defineComponent({__name:"menu-list-content",props:{view:{}},setup(w){const{b:o}=D.useNamespace("ap-view"),u=q.default("ap-view"),{token:p}=g.useToken(),{t:n}=K.useLocale(),t=w,{currentViewKey:_,changeCurrentViewKey:V,viewListCRUD:s,tableKey:r,menuOpen:d}=x.useViewInject(),a=e.ref(!1),v=e.ref(),k=()=>{V(t.view.viewKey),d.value=!1},N=()=>{s?.changeView?.({...t.view,tableKey:r,isDefault:!0})},y=()=>{s?.removeView?.({tableKey:r,viewKey:t.view.viewKey})},C=async()=>{const l=await v.value?.validate?.();s?.changeView?.({...t.view,tableKey:r,viewName:l?.viewName||t.view.viewName}),a.value=!1};return e.watch(()=>d.value,l=>{l&&(a.value=!1)}),(l,i)=>a.value===!1?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass({[e.unref(o)("menu-list-content")]:!0,[e.unref(o)("menu-list-content-active")]:t.view?.viewKey===e.unref(_),hashId:e.unref(u)}),onClick:k},[e.createElementVNode("div",T,[e.createElementVNode("span",{title:t.view?.viewName},e.toDisplayString(t.view?.viewName),9,I)]),t.view?.viewKey!==e.unref(m.SYSTEM_VIEW_KEY)&&t.view?.isDefault?(e.openBlock(),e.createElementBlock("div",z,[e.createVNode(e.unref(B.default),{text:e.unref(n)("ap.apView.default"),size:"small",color:e.unref(p).colorPrimary},null,8,["text","color"])])):e.createCommentVNode("",!0),t.view?.viewKey!==e.unref(m.SYSTEM_VIEW_KEY)?(e.openBlock(),e.createElementBlock("div",{key:1,class:"menu-list-content-action",onClick:i[1]||(i[1]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(e.unref(c.Space),{size:8},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"menu-list-content-action-text",onClick:i[0]||(i[0]=h=>a.value=!0)},e.toDisplayString(e.unref(n)("ap.apView.rename")),1),t.view?.isDefault?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"menu-list-content-action-text",onClick:N},e.toDisplayString(e.unref(n)("ap.apView.setDefault")),1)),e.createElementVNode("div",M,[e.createVNode(e.unref(c.Popconfirm),{title:e.unref(n)("ap.apView.deleteTip"),"ok-text":e.unref(n)("ap.apView.ok"),onConfirm:y},{default:e.withCtx(()=>[e.createVNode(E.default)]),_:1},8,["title","ok-text"])])]),_:1})])):e.createCommentVNode("",!0)],2)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass([e.unref(o)("menu-list-content"),e.unref(o)("menu-list-content-edit"),e.unref(u)])},[e.createVNode(f.default,{ref_key:"formRef",ref:v,"initial-values":{viewName:t.view?.viewName}},{default:e.withCtx(()=>[e.createElementVNode("div",b,[e.createVNode(e.unref(c.Space),{size:8},{default:e.withCtx(()=>[e.createVNode(f.default.FormItem,{name:"viewName"},{default:e.withCtx(()=>[e.createVNode(e.unref(S.ApField).Text,{maxlength:20})]),_:1}),e.createElementVNode("div",{class:"menu-list-content-action-text",onClick:C},e.toDisplayString(e.unref(n)("ap.apView.save")),1),e.createElementVNode("div",{class:"menu-list-content-action-text",onClick:i[2]||(i[2]=h=>a.value=!1)},e.toDisplayString(e.unref(n)("ap.apView.cancel")),1)]),_:1})])]),_:1},8,["initial-values"])],2))}});exports.default=P;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./usePageListApTable.js"),s=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./usePageListApTable.js"),s=require("./usePageListApGrid.js"),i=require("./usePageListAgGrid.js");exports.usePageListApTable=e.usePageListApTable;exports.usePageListApGrid=s.usePageListApGrid;exports.usePageListAgGrid=i.usePageListAgGrid;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { UseTableRefreshOption } from '..';
|
|
2
1
|
import { ApGridExpose, ApGridProps } from '../../ap-grid';
|
|
3
2
|
export interface UsePageListApGrid extends ApGridProps {
|
|
4
3
|
/** 是否显示默认的行选择配置
|
|
@@ -18,7 +17,7 @@ export interface UsePageListApGrid extends ApGridProps {
|
|
|
18
17
|
/**
|
|
19
18
|
* 表格刷新相关
|
|
20
19
|
*/
|
|
21
|
-
tableRefresh?: boolean |
|
|
20
|
+
tableRefresh?: boolean | (() => boolean);
|
|
22
21
|
/** 是否需要在deactivated的时候清空数据
|
|
23
22
|
* @default true
|
|
24
23
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("lodash-unified"),q=require("vue"),w=require("./useKeepAliveFlag.js");function G(u){const r=q.ref(null),{isShowRowSelection:d=!0,clearSelectionOnRequest:f=!0,transformSearchFormValues:o,api:s,tableRefresh:n=!0,virtual:v,clearDataOnDeactivated:p=!0,...S}=u||{};let i=null;const c=()=>{r.value?.rowSelection?.clearAll()},l=()=>{r.value?.submitWith(!0)},g=()=>{r.value?.reset()},{isDeactivated:h}=w.useKeepAliveFlag({afterActivated(){(a.isFunction(n)?n():n)&&l()},afterDeactivated:l}),m=async e=>{if(h()&&p)return{data:[],total:0};i=e.sort;const t=o?o(e):e;if(!s)throw new Error("api is not defined");const{records:A,total:F}=await s(t);return f&&c(),{data:A,total:F}};return[a.merge({scroll:{x:"100%",y:"100%"},columnResizable:!0,request:s?m:void 0,rowSelection:d?{fixed:"left",columnWidth:38}:void 0,ref(e){r.value=e},virtual:a.merge({oSize:20,y:20},v),card:!0},S),{reload:l,reset:g,getSearchFormValues:(e=!0)=>{const t=r.value?.getSearchFormValues(!!e)||{};return o?o(t):t},getApGridInstance:()=>r.value,getSearchFormValuesAndSorted:(e=!0)=>{const t=r.value?.getSearchFormValues(!!e)||{};return t.sort=i&&a.cloneDeep(i),o?o(t):t},clearSelection:c}]}exports.usePageListApGrid=G;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ApTableProps } from '../../';
|
|
2
|
-
import { UseTableRefreshOption } from './useTableRefresh';
|
|
3
2
|
import { Recordable } from '../../type';
|
|
4
3
|
import { TableColumnsType } from '@aplus-frontend/antdv';
|
|
5
4
|
import { InternalPagingType } from '../../ap-table/hooks/use-table-paging-ng';
|
|
@@ -22,7 +21,7 @@ export interface UsePageListApTable extends ApTableProps {
|
|
|
22
21
|
/**
|
|
23
22
|
* 表格刷新相关
|
|
24
23
|
*/
|
|
25
|
-
tableRefresh?: boolean |
|
|
24
|
+
tableRefresh?: boolean | (() => boolean);
|
|
26
25
|
}
|
|
27
26
|
/**
|
|
28
27
|
* 集成了列表页面的ApTable的默认配置
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("lodash-unified"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("lodash-unified"),m=require("vue"),b=require("../../utils/warning.js"),A=require("./useKeepAliveFlag.js");function F(d){const r=m.ref(null),{isShowRowSelection:f=!0,clearSelectionOnRequest:p=!0,transformSearchFormValues:a,api:s,tableRefresh:o=!1,...g}=d||{};let l=null;const u=()=>{r.value?.rowSelection?.clearAll()},S=async e=>{l=e.sort;const t=a?a(e):e;try{if(!s)throw new Error("api is not defined");const{records:n,total:v}=await s(t);return p&&u(),{data:n,total:v}}catch(n){return b.warning(!1,n),{data:[],total:0}}};A.useKeepAliveFlag({afterActivated(){(c.isFunction(o)?o():o)&&i()}});const h=c.merge({scroll:{x:"100%",y:"100%"},tableLayout:"fixed",columnResizable:!0,class:"ap-table--sticky",request:s?S:void 0,rowSelection:f?{mode:"internal",fixed:"left",columnWidth:50}:void 0,ref(e){r.value=e},card:!0},g),i=()=>{r.value?.submit()};return[h,{reload:i,reset:()=>{r.value?.reset()},getSearchFormValues:e=>{const t=r.value?.getSearchFormValues(e)||{};return a?a(t):t},getApTableInstance:()=>r.value,getSearchFormValuesAndSorted:e=>{const t=r.value?.getSearchFormValues(e)||{};return t.sort=l&&c.cloneDeep(l),a?a(t):t},clearSelection:u}]}exports.usePageListApTable=F;
|
|
@@ -28,3 +28,7 @@ export * from './ap-draggable-grid';
|
|
|
28
28
|
export * from './ap-value-select-card';
|
|
29
29
|
export { ApTransformDataHelper } from '../utils/ap-trans-data';
|
|
30
30
|
export * from './ag-grid-modal';
|
|
31
|
+
export * from './ap-tag';
|
|
32
|
+
export * from './ap-upload';
|
|
33
|
+
export * from './ap-download';
|
|
34
|
+
export * from './ap-descriptions';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./ap-table-modal/index.js"),i=require("./ap-attachment/index.js"),t=require("./ap-batch-action/index.js"),n=require("./ap-batch-action-group/index.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./ap-table-modal/index.js"),i=require("./ap-attachment/index.js"),t=require("./ap-batch-action/index.js"),n=require("./ap-batch-action-group/index.js"),u=require("./ap-button-group/index.js"),A=require("./ap-card/index.js"),o=require("./ap-expand-alert/index.js"),d=require("./ap-export-group/index.js"),a=require("./ap-image/index.js"),c=require("./ap-input-radio/index.js"),e=require("./ap-label/index.js"),q=require("./ap-ladder/index.js"),s=require("./ap-select-layout/index.js"),r=require("./ap-status/index.js"),x=require("./ap-title/index.js");require("./hooks/index.js");const l=require("./ap-summary/index.js"),$=require("./ap-appendix/index.js");require("./ap-upload-file/index.js");require("./batch-input-group/index.js");const G=require("./ap-size-input/index.js"),S=require("./ap-product-info/index.js"),m=require("./ap-copy/index.js"),b=require("./ap-view/index.js"),g=require("./ap-radio-group/index.js"),y=require("./ap-keep-alive/index.js"),I=require("./ap-draggable-grid/index.js"),L=require("./ap-value-select-card/index.js"),f=require("../utils/ap-trans-data/index.js");require("./ag-grid-modal/index.js");require("./ap-tag/index.js");require("./ap-upload/index.js");require("./ap-download/index.js");require("./ap-descriptions/index.js");exports.ApTableModal=p.default;exports.ApAttachment=i.ApAttachment;exports.ApBatchAction=t.ApBatchAction;exports.ApBatchActionGroup=n.ApBatchActionGroup;exports.ApButtonGroup=u.ApButtonGroup;exports.ApCard=A.ApCard;exports.ApExpandAlert=o.ApExpandAlert;exports.ApExportGroup=d.ApExportGroup;exports.ApImage=a.ApImage;exports.ApInputRadio=c.ApInputRadio;exports.ApLabel=e.ApLabel;exports.ApLabelGroup=e.ApLabelGroup;exports.ApLadder=q.ApLadder;exports.ApSelectLayout=s.ApSelectLayout;exports.ApStatus=r.ApStatus;exports.ApStatusGroup=r.ApStatusGroup;exports.ApTitle=x.ApTitle;exports.ApSummary=l.ApSummary;exports.ApAppendix=$.ApAppendix;exports.ApSizeInput=G.ApSizeInput;exports.ApProductInfo=S.ApProductInfo;exports.ApCopy=m.ApCopy;exports.ApView=b.ApView;exports.ApRadioGroup=g.ApRadioGroup;exports.ApKeepAlive=y.ApKeepAlive;exports.ApDraggableGrid=I.ApDraggableGrid;exports.ApValueSelectCard=L.ApValueSelectCard;exports.ApTransformDataHelper=f.ApTransformDataHelper;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
2
|
import { LocaleType } from '../locale/interface';
|
|
3
|
-
import { ApiType, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig, ExportField, SearchFormGlobalConfig } from './constants';
|
|
3
|
+
import { ApiType, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig, ExportField, SearchFormGlobalConfig, UiModeType } from './constants';
|
|
4
4
|
import { ApGridProps } from '../ap-grid';
|
|
5
5
|
import { AgGridProps } from '../ag-grid';
|
|
6
|
-
import { ViewCacheOption } from '../business';
|
|
6
|
+
import { ApImageProps, ApTitleProps, ViewCacheOption } from '../business';
|
|
7
7
|
import { FullToken } from '../design-token/interface';
|
|
8
8
|
import { RecursivePartial } from '../type';
|
|
9
9
|
import { default as __DTS_DEFAULT_0__ } from '@aplus-frontend/antdv/es/config-provider/renderEmpty';
|
|
@@ -14,6 +14,11 @@ import { ButtonSize } from '@aplus-frontend/antdv/es/button';
|
|
|
14
14
|
import { ThemeConfig, InputConfig, PaginationConfig, FormConfig, SelectConfig, CascaderConfig, DatePickerConfig, RangePickerConfig, TreeSelectConfig, TextAreaConfig, InputNumberConfig, MentionsConfig, TimePickerConfig, CardConfig } from '@aplus-frontend/antdv/es/config-provider/context';
|
|
15
15
|
type ApGridConfig = Pick<ApGridProps, 'rowSelection'>;
|
|
16
16
|
type AgGridConfig = Pick<AgGridProps, 'rowSelection'>;
|
|
17
|
+
type ApProCardConfig = {
|
|
18
|
+
uiMode?: UiModeType;
|
|
19
|
+
};
|
|
20
|
+
type ApImageConfig = Pick<ApImageProps, 'uiMode'>;
|
|
21
|
+
type ApTitleConfig = Pick<ApTitleProps, 'uiMode'>;
|
|
17
22
|
export declare const configProviderProps: () => {
|
|
18
23
|
iconPrefixCls: StringConstructor;
|
|
19
24
|
getTargetContainer: {
|
|
@@ -152,6 +157,15 @@ export declare const configProviderProps: () => {
|
|
|
152
157
|
agGrid: {
|
|
153
158
|
type: PropType<AgGridConfig>;
|
|
154
159
|
};
|
|
160
|
+
apProCard: {
|
|
161
|
+
type: PropType<ApProCardConfig>;
|
|
162
|
+
};
|
|
163
|
+
apImage: {
|
|
164
|
+
type: PropType<ApImageConfig>;
|
|
165
|
+
};
|
|
166
|
+
apTitle: {
|
|
167
|
+
type: PropType<ApTitleConfig>;
|
|
168
|
+
};
|
|
155
169
|
/**
|
|
156
170
|
* @description aplus-ui的locale
|
|
157
171
|
*/
|
|
@@ -171,8 +185,11 @@ export declare const configProviderProps: () => {
|
|
|
171
185
|
type: PropType<ApiType>;
|
|
172
186
|
default: () => {};
|
|
173
187
|
};
|
|
188
|
+
/**
|
|
189
|
+
* @deprecated 已废弃,请使用各自组件的uiMode属性
|
|
190
|
+
*/
|
|
174
191
|
uiMode: {
|
|
175
|
-
type: PropType<
|
|
192
|
+
type: PropType<UiModeType>;
|
|
176
193
|
};
|
|
177
194
|
apUpload: {
|
|
178
195
|
type: PropType<ApUploadConfig>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@aplus-frontend/antdv/es/config-provider/context"),t=()=>({apGrid:{type:Object},agGrid:{type:Object}}),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@aplus-frontend/antdv/es/config-provider/context"),t=()=>({apGrid:{type:Object},agGrid:{type:Object},apProCard:{type:Object},apImage:{type:Object},apTitle:{type:Object}}),p=()=>({aplusLocale:{type:Object},aplusToken:{type:Object},namespace:{type:String},api:{type:Object,default:()=>({})},uiMode:{type:String},apUpload:{type:Object,default:()=>({})},apDescriptions:{type:Object,default:()=>({})},valueTypeMap:{type:Object,default:()=>({})},downloadCenterTriggerConfig:{type:Object,default:()=>({})},exportField:{type:[Object,Boolean],default:!1},scrollYDomName:{type:String},viewCacheOption:{type:Object,default:()=>({})},searchForm:{type:Object,default:()=>({})},...t(),...e.configProviderProps()});exports.configProviderProps=p;
|
|
@@ -7,9 +7,9 @@ import { Locale } from '@aplus-frontend/antdv/es/locale';
|
|
|
7
7
|
import { ButtonSize } from '@aplus-frontend/antdv/es/button';
|
|
8
8
|
import { ThemeConfig, InputConfig, PaginationConfig, FormConfig, SelectConfig, CascaderConfig, DatePickerConfig, RangePickerConfig, TreeSelectConfig, TextAreaConfig, InputNumberConfig, MentionsConfig, TimePickerConfig, CardConfig } from '@aplus-frontend/antdv/es/config-provider/context';
|
|
9
9
|
import { ApGridRowSelection, AgGridRowSelection, FullToken, ViewCacheOption } from '..';
|
|
10
|
+
import { UiModeType, ApiType, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig, ExportField, SearchFormGlobalConfig } from './constants';
|
|
10
11
|
import { LocaleType } from '../locale';
|
|
11
12
|
import { RecursivePartial } from '../type';
|
|
12
|
-
import { ApiType, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig, ExportField, SearchFormGlobalConfig } from './constants';
|
|
13
13
|
export declare const globalConfigCached: Ref<ConfigProviderProps>;
|
|
14
14
|
export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
|
|
15
15
|
iconPrefixCls: StringConstructor;
|
|
@@ -153,6 +153,21 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
|
|
|
153
153
|
rowSelection?: true | AgGridRowSelection<any> | undefined;
|
|
154
154
|
}>;
|
|
155
155
|
};
|
|
156
|
+
apProCard: {
|
|
157
|
+
type: PropType<{
|
|
158
|
+
uiMode?: UiModeType;
|
|
159
|
+
}>;
|
|
160
|
+
};
|
|
161
|
+
apImage: {
|
|
162
|
+
type: PropType<{
|
|
163
|
+
uiMode?: UiModeType | undefined;
|
|
164
|
+
}>;
|
|
165
|
+
};
|
|
166
|
+
apTitle: {
|
|
167
|
+
type: PropType<{
|
|
168
|
+
uiMode?: UiModeType | undefined;
|
|
169
|
+
}>;
|
|
170
|
+
};
|
|
156
171
|
aplusLocale: {
|
|
157
172
|
type: PropType<LocaleType>;
|
|
158
173
|
};
|
|
@@ -167,7 +182,7 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
|
|
|
167
182
|
default: () => {};
|
|
168
183
|
};
|
|
169
184
|
uiMode: {
|
|
170
|
-
type: PropType<
|
|
185
|
+
type: PropType<UiModeType>;
|
|
171
186
|
};
|
|
172
187
|
apUpload: {
|
|
173
188
|
type: PropType<ApUploadConfig>;
|
|
@@ -342,6 +357,21 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
|
|
|
342
357
|
rowSelection?: true | AgGridRowSelection<any> | undefined;
|
|
343
358
|
}>;
|
|
344
359
|
};
|
|
360
|
+
apProCard: {
|
|
361
|
+
type: PropType<{
|
|
362
|
+
uiMode?: UiModeType;
|
|
363
|
+
}>;
|
|
364
|
+
};
|
|
365
|
+
apImage: {
|
|
366
|
+
type: PropType<{
|
|
367
|
+
uiMode?: UiModeType | undefined;
|
|
368
|
+
}>;
|
|
369
|
+
};
|
|
370
|
+
apTitle: {
|
|
371
|
+
type: PropType<{
|
|
372
|
+
uiMode?: UiModeType | undefined;
|
|
373
|
+
}>;
|
|
374
|
+
};
|
|
345
375
|
aplusLocale: {
|
|
346
376
|
type: PropType<LocaleType>;
|
|
347
377
|
};
|
|
@@ -356,7 +386,7 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
|
|
|
356
386
|
default: () => {};
|
|
357
387
|
};
|
|
358
388
|
uiMode: {
|
|
359
|
-
type: PropType<
|
|
389
|
+
type: PropType<UiModeType>;
|
|
360
390
|
};
|
|
361
391
|
apUpload: {
|
|
362
392
|
type: PropType<ApUploadConfig>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),P=require("@aplus-frontend/antdv"),d=require("./hooks/use-global-config.js"),p=require("./config-provider-props.js"),o=require("../utils/config-provider-preset.js"),h=require("./constants.js"),G=require("../utils/warning.js");function T(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const i=a.ref({}),b=a.defineComponent({name:"AplusConfigProvider",props:p.configProviderProps(),setup(e,{slots:u}){G.useDevWarning("ConfigProvider")(!e.uiMode,"breaking","uiMode has been remove, see migrate guild https://aplus.aplnk.com/aplus-ui/guild/migrate-7.2.html");const n=d.useGlobalConfig();let t=!0;const l=a.computed(()=>e.namespace!==void 0?e.namespace:n.value?.namespace||h.DEFAULT_NAMESPACE),c=a.computed(()=>e.apGrid!==void 0?e.apGrid:n.value?.apGrid),g=a.computed(()=>e.agGrid!==void 0?e.agGrid:n.value?.agGrid),f=a.computed(()=>e.apProCard!==void 0?e.apProCard:n.value?.apProCard),m=a.computed(()=>e.apImage!==void 0?e.apImage:n.value?.apImage),v=a.computed(()=>e.apTitle!==void 0?e.apTitle:n.value?.apTitle),s=a.computed(()=>({namespace:a.unref(l),aplusLocale:e.aplusLocale,aplusToken:e.aplusToken,api:e.api,apUpload:e.apUpload,apDescriptions:e.apDescriptions,valueTypeMap:e.valueTypeMap,downloadCenterTriggerConfig:e.downloadCenterTriggerConfig,exportField:e.exportField,scrollYDomName:e.scrollYDomName,viewCacheOption:e.viewCacheOption,searchForm:e.searchForm,apGrid:a.unref(c),agGrid:a.unref(g),apProCard:a.unref(f),apImage:a.unref(m),apTitle:a.unref(v)})),C=d.provideGlobalConfig(s);return a.watch(()=>e,r=>{i.value=o.mergeAntdProviderConfigWithCache(o.mergeAntdProvideConfig(r),i.value)},{deep:!0,immediate:!0}),a.onActivated(()=>{if(t){t=!1;return}i.value=o.mergeAntdProviderConfigWithCache(o.mergeAntdProvideConfig(e),i.value)}),()=>{let r;return a.createVNode(P.ConfigProvider,i.value,T(r=a.renderSlot(u,"default",{config:C?.value}))?r:{default:()=>[r]})}}});exports.ConfigProvider=b;exports.globalConfigCached=i;
|
|
@@ -8,9 +8,9 @@ import { Locale } from '@aplus-frontend/antdv/es/locale';
|
|
|
8
8
|
import { ButtonSize } from '@aplus-frontend/antdv/es/button';
|
|
9
9
|
import { ThemeConfig, InputConfig, PaginationConfig, FormConfig, SelectConfig, CascaderConfig, DatePickerConfig, RangePickerConfig, TreeSelectConfig, TextAreaConfig, InputNumberConfig, MentionsConfig, TimePickerConfig, CardConfig } from '@aplus-frontend/antdv/es/config-provider/context';
|
|
10
10
|
import { ApGridRowSelection, AgGridRowSelection, FullToken, ViewCacheOption } from '../..';
|
|
11
|
+
import { UiModeType, ApiType, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig, ExportField, SearchFormGlobalConfig } from '..';
|
|
11
12
|
import { LocaleType } from '../../locale';
|
|
12
13
|
import { RecursivePartial } from '../../type';
|
|
13
|
-
import { ApiType, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig, ExportField, SearchFormGlobalConfig } from '..';
|
|
14
14
|
export declare const keysOf: <T extends Record<string, any>>(arr: T) => Array<keyof T>;
|
|
15
15
|
export declare function useGlobalConfig<K extends keyof ConfigProviderContext, D extends ConfigProviderContext[K]>(key: K, defaultValue?: D): Ref<Exclude<ConfigProviderContext[K], undefined> | D>;
|
|
16
16
|
export declare function useGlobalConfig(): Ref<ConfigProviderContext>;
|
|
@@ -156,6 +156,21 @@ export declare const provideGlobalConfig: (config: MaybeRef<ConfigProviderContex
|
|
|
156
156
|
rowSelection?: true | AgGridRowSelection<any> | undefined;
|
|
157
157
|
}>;
|
|
158
158
|
};
|
|
159
|
+
apProCard: {
|
|
160
|
+
type: PropType<{
|
|
161
|
+
uiMode?: UiModeType;
|
|
162
|
+
}>;
|
|
163
|
+
};
|
|
164
|
+
apImage: {
|
|
165
|
+
type: PropType<{
|
|
166
|
+
uiMode?: UiModeType | undefined;
|
|
167
|
+
}>;
|
|
168
|
+
};
|
|
169
|
+
apTitle: {
|
|
170
|
+
type: PropType<{
|
|
171
|
+
uiMode?: UiModeType | undefined;
|
|
172
|
+
}>;
|
|
173
|
+
};
|
|
159
174
|
aplusLocale: {
|
|
160
175
|
type: PropType<LocaleType>;
|
|
161
176
|
};
|
|
@@ -170,7 +185,7 @@ export declare const provideGlobalConfig: (config: MaybeRef<ConfigProviderContex
|
|
|
170
185
|
default: () => {};
|
|
171
186
|
};
|
|
172
187
|
uiMode: {
|
|
173
|
-
type: PropType<
|
|
188
|
+
type: PropType<UiModeType>;
|
|
174
189
|
};
|
|
175
190
|
apUpload: {
|
|
176
191
|
type: PropType<ApUploadConfig>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { MaybeRef } from '@aplus-frontend/utils';
|
|
2
2
|
import { InjectionKey, Ref } from 'vue';
|
|
3
|
-
import { LocaleType } from '../../locale/interface';
|
|
3
|
+
import { LangNames, LocaleType } from '../../locale/interface';
|
|
4
4
|
export type TranslatorOption = Record<string, string | number>;
|
|
5
5
|
export type Translator = (path: string, option?: TranslatorOption) => string;
|
|
6
6
|
export type LocaleContext = {
|
|
7
7
|
locale: Ref<LocaleType>;
|
|
8
|
-
lang: Ref<
|
|
8
|
+
lang: Ref<LangNames>;
|
|
9
9
|
t: Translator;
|
|
10
10
|
};
|
|
11
11
|
export declare const buildTranslator: (locale: MaybeRef<LocaleType>) => Translator;
|
|
@@ -6,9 +6,9 @@ import { Locale } from '@aplus-frontend/antdv/es/locale';
|
|
|
6
6
|
import { ButtonSize } from '@aplus-frontend/antdv/es/button';
|
|
7
7
|
import { ThemeConfig, InputConfig, PaginationConfig, FormConfig, SelectConfig, CascaderConfig, DatePickerConfig, RangePickerConfig, TreeSelectConfig, TextAreaConfig, InputNumberConfig, MentionsConfig, TimePickerConfig, CardConfig } from '@aplus-frontend/antdv/es/config-provider/context';
|
|
8
8
|
import { ApGridRowSelection, AgGridRowSelection, FullToken, ViewCacheOption } from '..';
|
|
9
|
+
import { UiModeType, ApiType, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig, ExportField, SearchFormGlobalConfig } from './constants';
|
|
9
10
|
import { LocaleType } from '../locale';
|
|
10
11
|
import { RecursivePartial } from '../type';
|
|
11
|
-
import { ApiType, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig, ExportField, SearchFormGlobalConfig } from './constants';
|
|
12
12
|
export * from './config-provider-props';
|
|
13
13
|
export * from './constants';
|
|
14
14
|
export * from './hooks/use-global-config';
|
|
@@ -158,6 +158,21 @@ export declare const APConfigProvider: {
|
|
|
158
158
|
rowSelection?: true | AgGridRowSelection<any> | undefined;
|
|
159
159
|
}>;
|
|
160
160
|
};
|
|
161
|
+
apProCard: {
|
|
162
|
+
type: PropType<{
|
|
163
|
+
uiMode?: UiModeType;
|
|
164
|
+
}>;
|
|
165
|
+
};
|
|
166
|
+
apImage: {
|
|
167
|
+
type: PropType<{
|
|
168
|
+
uiMode?: UiModeType | undefined;
|
|
169
|
+
}>;
|
|
170
|
+
};
|
|
171
|
+
apTitle: {
|
|
172
|
+
type: PropType<{
|
|
173
|
+
uiMode?: UiModeType | undefined;
|
|
174
|
+
}>;
|
|
175
|
+
};
|
|
161
176
|
aplusLocale: {
|
|
162
177
|
type: PropType<LocaleType>;
|
|
163
178
|
};
|
|
@@ -172,7 +187,7 @@ export declare const APConfigProvider: {
|
|
|
172
187
|
default: () => {};
|
|
173
188
|
};
|
|
174
189
|
uiMode: {
|
|
175
|
-
type: PropType<
|
|
190
|
+
type: PropType<UiModeType>;
|
|
176
191
|
};
|
|
177
192
|
apUpload: {
|
|
178
193
|
type: PropType<ApUploadConfig>;
|
|
@@ -393,6 +408,21 @@ export declare const APConfigProvider: {
|
|
|
393
408
|
rowSelection?: true | AgGridRowSelection<any> | undefined;
|
|
394
409
|
}>;
|
|
395
410
|
};
|
|
411
|
+
apProCard: {
|
|
412
|
+
type: PropType<{
|
|
413
|
+
uiMode?: UiModeType;
|
|
414
|
+
}>;
|
|
415
|
+
};
|
|
416
|
+
apImage: {
|
|
417
|
+
type: PropType<{
|
|
418
|
+
uiMode?: UiModeType | undefined;
|
|
419
|
+
}>;
|
|
420
|
+
};
|
|
421
|
+
apTitle: {
|
|
422
|
+
type: PropType<{
|
|
423
|
+
uiMode?: UiModeType | undefined;
|
|
424
|
+
}>;
|
|
425
|
+
};
|
|
396
426
|
aplusLocale: {
|
|
397
427
|
type: PropType<LocaleType>;
|
|
398
428
|
};
|
|
@@ -407,7 +437,7 @@ export declare const APConfigProvider: {
|
|
|
407
437
|
default: () => {};
|
|
408
438
|
};
|
|
409
439
|
uiMode: {
|
|
410
|
-
type: PropType<
|
|
440
|
+
type: PropType<UiModeType>;
|
|
411
441
|
};
|
|
412
442
|
apUpload: {
|
|
413
443
|
type: PropType<ApUploadConfig>;
|
|
@@ -625,6 +655,21 @@ export declare const APConfigProvider: {
|
|
|
625
655
|
rowSelection?: true | AgGridRowSelection<any> | undefined;
|
|
626
656
|
}>;
|
|
627
657
|
};
|
|
658
|
+
apProCard: {
|
|
659
|
+
type: PropType<{
|
|
660
|
+
uiMode?: UiModeType;
|
|
661
|
+
}>;
|
|
662
|
+
};
|
|
663
|
+
apImage: {
|
|
664
|
+
type: PropType<{
|
|
665
|
+
uiMode?: UiModeType | undefined;
|
|
666
|
+
}>;
|
|
667
|
+
};
|
|
668
|
+
apTitle: {
|
|
669
|
+
type: PropType<{
|
|
670
|
+
uiMode?: UiModeType | undefined;
|
|
671
|
+
}>;
|
|
672
|
+
};
|
|
628
673
|
aplusLocale: {
|
|
629
674
|
type: PropType<LocaleType>;
|
|
630
675
|
};
|
|
@@ -639,7 +684,7 @@ export declare const APConfigProvider: {
|
|
|
639
684
|
default: () => {};
|
|
640
685
|
};
|
|
641
686
|
uiMode: {
|
|
642
|
-
type: PropType<
|
|
687
|
+
type: PropType<UiModeType>;
|
|
643
688
|
};
|
|
644
689
|
apUpload: {
|
|
645
690
|
type: PropType<ApUploadConfig>;
|
package/lib/src/index.d.ts
CHANGED
|
@@ -3,9 +3,6 @@ export * from './ap-form';
|
|
|
3
3
|
export * from './ap-field';
|
|
4
4
|
export * from './design-token';
|
|
5
5
|
export * from './ap-action';
|
|
6
|
-
export * from './ap-tag';
|
|
7
|
-
export * from './ap-upload';
|
|
8
|
-
export * from './ap-download';
|
|
9
6
|
export * from './check-card';
|
|
10
7
|
export * from './ap-modal';
|
|
11
8
|
export * from './ap-list';
|
|
@@ -15,7 +12,6 @@ export * from './ap-pro-card';
|
|
|
15
12
|
export * from './business';
|
|
16
13
|
export * from './ap-table';
|
|
17
14
|
export * from './editable-table';
|
|
18
|
-
export * from './ap-descriptions';
|
|
19
15
|
export * from './scroll-bar';
|
|
20
16
|
export * from './scroll-view';
|
|
21
17
|
export * from './portal';
|