@vrojs/element-plus 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +17 -0
- package/dist/index.js +95 -0
- package/dist/locale/index.d.ts +3 -0
- package/dist/locale/index.js +7 -0
- package/dist/locale/lang/zh-cn.d.ts +47 -0
- package/dist/locale/lang/zh-cn.js +49 -0
- package/dist/locale/types.d.ts +7 -0
- package/dist/locale/types.js +1 -0
- package/dist/locale/useLocale.d.ts +53 -0
- package/dist/locale/useLocale.js +24 -0
- package/dist/style/css.js +4 -0
- package/dist/style/deps.js +26 -0
- package/dist/style/index.css +1 -0
- package/dist/style/index.d.ts +0 -0
- package/dist/style/index.js +30 -0
- package/dist/utils/datePickerValueFormat.d.ts +1 -0
- package/dist/utils/datePickerValueFormat.js +9 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +6 -0
- package/dist/vro-el-checkbox-group/index.d.ts +122 -0
- package/dist/vro-el-checkbox-group/index.js +9 -0
- package/dist/vro-el-checkbox-group/style/css.d.ts +0 -0
- package/dist/vro-el-checkbox-group/style/css.js +3 -0
- package/dist/vro-el-checkbox-group/style/deps.d.ts +0 -0
- package/dist/vro-el-checkbox-group/style/deps.js +2 -0
- package/dist/vro-el-checkbox-group/style/index.d.ts +0 -0
- package/dist/vro-el-checkbox-group/style/index.js +5 -0
- package/dist/vro-el-checkbox-group/types.d.ts +50 -0
- package/dist/vro-el-checkbox-group/types.js +16 -0
- package/dist/vro-el-checkbox-group/vro-el-checkbox-group.vue.d.ts +115 -0
- package/dist/vro-el-checkbox-group/vro-el-checkbox-group.vue.js +34 -0
- package/dist/vro-el-checkbox-group/vro-el-checkbox-group.vue2.js +4 -0
- package/dist/vro-el-config-provider/index.d.ts +46 -0
- package/dist/vro-el-config-provider/index.js +9 -0
- package/dist/vro-el-config-provider/style/css.d.ts +0 -0
- package/dist/vro-el-config-provider/style/css.js +3 -0
- package/dist/vro-el-config-provider/style/deps.d.ts +0 -0
- package/dist/vro-el-config-provider/style/deps.js +1 -0
- package/dist/vro-el-config-provider/style/index.d.ts +0 -0
- package/dist/vro-el-config-provider/style/index.js +3 -0
- package/dist/vro-el-config-provider/types.d.ts +14 -0
- package/dist/vro-el-config-provider/types.js +13 -0
- package/dist/vro-el-config-provider/vro-el-config-provider.vue.d.ts +29 -0
- package/dist/vro-el-config-provider/vro-el-config-provider.vue.js +17 -0
- package/dist/vro-el-config-provider/vro-el-config-provider.vue2.js +4 -0
- package/dist/vro-el-file-upload/index.d.ts +44 -0
- package/dist/vro-el-file-upload/index.js +12 -0
- package/dist/vro-el-file-upload/style/css.d.ts +0 -0
- package/dist/vro-el-file-upload/style/css.js +4 -0
- package/dist/vro-el-file-upload/style/deps.d.ts +0 -0
- package/dist/vro-el-file-upload/style/deps.js +2 -0
- package/dist/vro-el-file-upload/style/index.css +1 -0
- package/dist/vro-el-file-upload/style/index.d.ts +0 -0
- package/dist/vro-el-file-upload/style/index.js +6 -0
- package/dist/vro-el-file-upload/types.d.ts +39 -0
- package/dist/vro-el-file-upload/types.js +35 -0
- package/dist/vro-el-file-upload/utils.d.ts +2 -0
- package/dist/vro-el-file-upload/utils.js +6 -0
- package/dist/vro-el-file-upload/vro-el-file-upload.vue.d.ts +36 -0
- package/dist/vro-el-file-upload/vro-el-file-upload.vue.js +86 -0
- package/dist/vro-el-file-upload/vro-el-file-upload.vue2.js +4 -0
- package/dist/vro-el-icon/index.d.ts +82 -0
- package/dist/vro-el-icon/index.js +9 -0
- package/dist/vro-el-icon/style/css.d.ts +0 -0
- package/dist/vro-el-icon/style/css.js +3 -0
- package/dist/vro-el-icon/style/deps.d.ts +0 -0
- package/dist/vro-el-icon/style/deps.js +1 -0
- package/dist/vro-el-icon/style/index.d.ts +0 -0
- package/dist/vro-el-icon/style/index.js +4 -0
- package/dist/vro-el-icon/types.d.ts +20 -0
- package/dist/vro-el-icon/types.js +11 -0
- package/dist/vro-el-icon/vro-el-icon.vue.d.ts +53 -0
- package/dist/vro-el-icon/vro-el-icon.vue.js +33 -0
- package/dist/vro-el-icon/vro-el-icon.vue2.js +4 -0
- package/dist/vro-el-image/index.d.ts +207 -0
- package/dist/vro-el-image/index.js +12 -0
- package/dist/vro-el-image/style/css.d.ts +0 -0
- package/dist/vro-el-image/style/css.js +3 -0
- package/dist/vro-el-image/style/deps.d.ts +0 -0
- package/dist/vro-el-image/style/deps.js +1 -0
- package/dist/vro-el-image/style/index.d.ts +0 -0
- package/dist/vro-el-image/style/index.js +4 -0
- package/dist/vro-el-image/types.d.ts +54 -0
- package/dist/vro-el-image/types.js +15 -0
- package/dist/vro-el-image/utils.d.ts +2 -0
- package/dist/vro-el-image/utils.js +6 -0
- package/dist/vro-el-image/vro-el-image.vue.d.ts +122 -0
- package/dist/vro-el-image/vro-el-image.vue.js +32 -0
- package/dist/vro-el-image/vro-el-image.vue2.js +4 -0
- package/dist/vro-el-image-upload/index.d.ts +50 -0
- package/dist/vro-el-image-upload/index.js +12 -0
- package/dist/vro-el-image-upload/style/css.d.ts +0 -0
- package/dist/vro-el-image-upload/style/css.js +5 -0
- package/dist/vro-el-image-upload/style/deps.d.ts +0 -0
- package/dist/vro-el-image-upload/style/deps.js +4 -0
- package/dist/vro-el-image-upload/style/index.css +1 -0
- package/dist/vro-el-image-upload/style/index.d.ts +0 -0
- package/dist/vro-el-image-upload/style/index.js +9 -0
- package/dist/vro-el-image-upload/types.d.ts +40 -0
- package/dist/vro-el-image-upload/types.js +25 -0
- package/dist/vro-el-image-upload/utils.d.ts +2 -0
- package/dist/vro-el-image-upload/utils.js +6 -0
- package/dist/vro-el-image-upload/vro-el-image-upload.vue.d.ts +43 -0
- package/dist/vro-el-image-upload/vro-el-image-upload.vue.js +132 -0
- package/dist/vro-el-image-upload/vro-el-image-upload.vue2.js +4 -0
- package/dist/vro-el-radio-group/index.d.ts +79 -0
- package/dist/vro-el-radio-group/index.js +9 -0
- package/dist/vro-el-radio-group/style/css.d.ts +0 -0
- package/dist/vro-el-radio-group/style/css.js +3 -0
- package/dist/vro-el-radio-group/style/deps.d.ts +0 -0
- package/dist/vro-el-radio-group/style/deps.js +2 -0
- package/dist/vro-el-radio-group/style/index.d.ts +0 -0
- package/dist/vro-el-radio-group/style/index.js +5 -0
- package/dist/vro-el-radio-group/types.d.ts +38 -0
- package/dist/vro-el-radio-group/types.js +25 -0
- package/dist/vro-el-radio-group/vro-el-radio-group.vue.d.ts +72 -0
- package/dist/vro-el-radio-group/vro-el-radio-group.vue.js +34 -0
- package/dist/vro-el-radio-group/vro-el-radio-group.vue2.js +4 -0
- package/dist/vro-el-schema-filter/index.d.ts +594 -0
- package/dist/vro-el-schema-filter/index.js +9 -0
- package/dist/vro-el-schema-filter/style/css.d.ts +0 -0
- package/dist/vro-el-schema-filter/style/css.js +17 -0
- package/dist/vro-el-schema-filter/style/deps.d.ts +0 -0
- package/dist/vro-el-schema-filter/style/deps.js +22 -0
- package/dist/vro-el-schema-filter/style/index.css +1 -0
- package/dist/vro-el-schema-filter/style/index.d.ts +0 -0
- package/dist/vro-el-schema-filter/style/index.js +39 -0
- package/dist/vro-el-schema-filter/types.d.ts +41 -0
- package/dist/vro-el-schema-filter/types.js +26 -0
- package/dist/vro-el-schema-filter/vro-el-schema-filter.vue.d.ts +979 -0
- package/dist/vro-el-schema-filter/vro-el-schema-filter.vue.js +71 -0
- package/dist/vro-el-schema-filter/vro-el-schema-filter.vue2.js +4 -0
- package/dist/vro-el-schema-form/defineVroElSchemaFormCreateField.d.ts +2 -0
- package/dist/vro-el-schema-form/defineVroElSchemaFormCreateField.js +9 -0
- package/dist/vro-el-schema-form/defineVroElSchemaFormFieldTrigger.d.ts +9 -0
- package/dist/vro-el-schema-form/defineVroElSchemaFormFieldTrigger.js +6 -0
- package/dist/vro-el-schema-form/index.d.ts +561 -0
- package/dist/vro-el-schema-form/index.js +17 -0
- package/dist/vro-el-schema-form/style/css.d.ts +0 -0
- package/dist/vro-el-schema-form/style/css.js +15 -0
- package/dist/vro-el-schema-form/style/deps.d.ts +0 -0
- package/dist/vro-el-schema-form/style/deps.js +22 -0
- package/dist/vro-el-schema-form/style/index.css +1 -0
- package/dist/vro-el-schema-form/style/index.d.ts +0 -0
- package/dist/vro-el-schema-form/style/index.js +37 -0
- package/dist/vro-el-schema-form/types.d.ts +122 -0
- package/dist/vro-el-schema-form/types.js +42 -0
- package/dist/vro-el-schema-form/useVroElSchemaForm.d.ts +904 -0
- package/dist/vro-el-schema-form/useVroElSchemaForm.js +31 -0
- package/dist/vro-el-schema-form/vro-el-schema-form.vue.d.ts +389 -0
- package/dist/vro-el-schema-form/vro-el-schema-form.vue.js +127 -0
- package/dist/vro-el-schema-form/vro-el-schema-form.vue2.js +4 -0
- package/dist/vro-el-schema-form/vroElSchemaFormFieldManager.d.ts +2 -0
- package/dist/vro-el-schema-form/vroElSchemaFormFieldManager.js +32 -0
- package/dist/vro-el-schema-form-dialog/function-call.d.ts +3 -0
- package/dist/vro-el-schema-form-dialog/function-call.js +17 -0
- package/dist/vro-el-schema-form-dialog/index.d.ts +2174 -0
- package/dist/vro-el-schema-form-dialog/index.js +18 -0
- package/dist/vro-el-schema-form-dialog/injection.d.ts +9 -0
- package/dist/vro-el-schema-form-dialog/injection.js +9 -0
- package/dist/vro-el-schema-form-dialog/style/css.d.ts +0 -0
- package/dist/vro-el-schema-form-dialog/style/css.js +19 -0
- package/dist/vro-el-schema-form-dialog/style/deps.d.ts +0 -0
- package/dist/vro-el-schema-form-dialog/style/deps.js +24 -0
- package/dist/vro-el-schema-form-dialog/style/index.css +1 -0
- package/dist/vro-el-schema-form-dialog/style/index.d.ts +0 -0
- package/dist/vro-el-schema-form-dialog/style/index.js +43 -0
- package/dist/vro-el-schema-form-dialog/types.d.ts +79 -0
- package/dist/vro-el-schema-form-dialog/types.js +59 -0
- package/dist/vro-el-schema-form-dialog/useVroElSchemaFormDialog.d.ts +14 -0
- package/dist/vro-el-schema-form-dialog/useVroElSchemaFormDialog.js +18 -0
- package/dist/vro-el-schema-form-dialog/vro-el-schema-form-dialog.vue.d.ts +1788 -0
- package/dist/vro-el-schema-form-dialog/vro-el-schema-form-dialog.vue.js +135 -0
- package/dist/vro-el-schema-form-dialog/vro-el-schema-form-dialog.vue2.js +4 -0
- package/dist/vro-el-select/index.d.ts +259 -0
- package/dist/vro-el-select/index.js +9 -0
- package/dist/vro-el-select/style/css.d.ts +0 -0
- package/dist/vro-el-select/style/css.js +3 -0
- package/dist/vro-el-select/style/deps.d.ts +0 -0
- package/dist/vro-el-select/style/deps.js +2 -0
- package/dist/vro-el-select/style/index.d.ts +0 -0
- package/dist/vro-el-select/style/index.js +5 -0
- package/dist/vro-el-select/types.d.ts +105 -0
- package/dist/vro-el-select/types.js +16 -0
- package/dist/vro-el-select/vro-el-select.vue.d.ts +252 -0
- package/dist/vro-el-select/vro-el-select.vue.js +30 -0
- package/dist/vro-el-select/vro-el-select.vue2.js +4 -0
- package/dist/vro-el-skeleton/index.d.ts +154 -0
- package/dist/vro-el-skeleton/index.js +9 -0
- package/dist/vro-el-skeleton/style/css.d.ts +0 -0
- package/dist/vro-el-skeleton/style/css.js +5 -0
- package/dist/vro-el-skeleton/style/deps.d.ts +0 -0
- package/dist/vro-el-skeleton/style/deps.js +3 -0
- package/dist/vro-el-skeleton/style/index.css +1 -0
- package/dist/vro-el-skeleton/style/index.d.ts +0 -0
- package/dist/vro-el-skeleton/style/index.js +8 -0
- package/dist/vro-el-skeleton/types.d.ts +72 -0
- package/{src/vro-el-skeleton/types.ts → dist/vro-el-skeleton/types.js} +15 -29
- package/dist/vro-el-skeleton/vro-el-skeleton.vue.d.ts +95 -0
- package/dist/vro-el-skeleton/vro-el-skeleton.vue.js +85 -0
- package/dist/vro-el-skeleton/vro-el-skeleton.vue2.js +4 -0
- package/dist/vro-el-tags/index.d.ts +223 -0
- package/dist/vro-el-tags/index.js +9 -0
- package/dist/vro-el-tags/style/css.d.ts +0 -0
- package/dist/vro-el-tags/style/css.js +3 -0
- package/dist/vro-el-tags/style/deps.d.ts +0 -0
- package/dist/vro-el-tags/style/deps.js +3 -0
- package/dist/vro-el-tags/style/index.d.ts +0 -0
- package/dist/vro-el-tags/style/index.js +6 -0
- package/dist/vro-el-tags/types.d.ts +18 -0
- package/dist/vro-el-tags/types.js +19 -0
- package/dist/vro-el-tags/vro-el-tags.vue.d.ts +217 -0
- package/dist/vro-el-tags/vro-el-tags.vue.js +62 -0
- package/dist/vro-el-tags/vro-el-tags.vue2.js +4 -0
- package/dist/vro-el-tree/index.d.ts +86 -0
- package/dist/vro-el-tree/index.js +9 -0
- package/dist/vro-el-tree/style/css.d.ts +0 -0
- package/dist/vro-el-tree/style/css.js +4 -0
- package/dist/vro-el-tree/style/deps.d.ts +0 -0
- package/dist/vro-el-tree/style/deps.js +1 -0
- package/dist/vro-el-tree/style/index.css +1 -0
- package/dist/vro-el-tree/style/index.d.ts +0 -0
- package/dist/vro-el-tree/style/index.js +5 -0
- package/dist/vro-el-tree/types.d.ts +32 -0
- package/dist/vro-el-tree/types.js +26 -0
- package/dist/vro-el-tree/vro-el-tree.vue.d.ts +52 -0
- package/dist/vro-el-tree/vro-el-tree.vue.js +56 -0
- package/dist/vro-el-tree/vro-el-tree.vue2.js +4 -0
- package/dist/vro-el-with-config/index.d.ts +32 -0
- package/dist/vro-el-with-config/index.js +9 -0
- package/dist/vro-el-with-config/style/css.d.ts +0 -0
- package/dist/vro-el-with-config/style/css.js +4 -0
- package/dist/vro-el-with-config/style/deps.d.ts +0 -0
- package/dist/vro-el-with-config/style/deps.js +1 -0
- package/dist/vro-el-with-config/style/index.d.ts +0 -0
- package/dist/vro-el-with-config/style/index.js +5 -0
- package/dist/vro-el-with-config/types.d.ts +15 -0
- package/dist/vro-el-with-config/types.js +14 -0
- package/dist/vro-el-with-config/vro-el-with-config.vue.d.ts +25 -0
- package/dist/vro-el-with-config/vro-el-with-config.vue.js +32 -0
- package/dist/vro-el-with-config/vro-el-with-config.vue2.js +4 -0
- package/package.json +18 -12
- package/src/index.ts +0 -18
- package/src/locale/index.ts +0 -3
- package/src/locale/lang/zh-cn.ts +0 -46
- package/src/locale/types.ts +0 -8
- package/src/locale/useLocale.ts +0 -42
- package/src/style/base.scss +0 -2
- package/src/style/css.ts +0 -2
- package/src/style/deps.ts +0 -14
- package/src/style/index.scss +0 -17
- package/src/style/index.ts +0 -2
- package/src/utils/datePickerValueFormat.ts +0 -6
- package/src/utils/index.ts +0 -2
- package/src/vro-el-checkbox-group/README.md +0 -83
- package/src/vro-el-checkbox-group/index.ts +0 -16
- package/src/vro-el-checkbox-group/style/css.ts +0 -2
- package/src/vro-el-checkbox-group/style/deps.ts +0 -2
- package/src/vro-el-checkbox-group/style/index.scss +0 -1
- package/src/vro-el-checkbox-group/style/index.ts +0 -2
- package/src/vro-el-checkbox-group/types.ts +0 -18
- package/src/vro-el-checkbox-group/vro-el-checkbox-group.vue +0 -33
- package/src/vro-el-config-provider/README.md +0 -65
- package/src/vro-el-config-provider/index.ts +0 -16
- package/src/vro-el-config-provider/style/css.ts +0 -2
- package/src/vro-el-config-provider/style/index.ts +0 -2
- package/src/vro-el-config-provider/types.ts +0 -18
- package/src/vro-el-config-provider/vro-el-config-provider.vue +0 -19
- package/src/vro-el-file-upload/README.md +0 -89
- package/src/vro-el-file-upload/index.ts +0 -17
- package/src/vro-el-file-upload/style/css.ts +0 -2
- package/src/vro-el-file-upload/style/deps.ts +0 -2
- package/src/vro-el-file-upload/style/index.scss +0 -30
- package/src/vro-el-file-upload/style/index.ts +0 -2
- package/src/vro-el-file-upload/types.ts +0 -50
- package/src/vro-el-file-upload/utils.ts +0 -7
- package/src/vro-el-file-upload/vro-el-file-upload.vue +0 -95
- package/src/vro-el-icon/README.md +0 -68
- package/src/vro-el-icon/index.ts +0 -16
- package/src/vro-el-icon/style/css.ts +0 -2
- package/src/vro-el-icon/style/deps.ts +0 -1
- package/src/vro-el-icon/style/index.scss +0 -1
- package/src/vro-el-icon/style/index.ts +0 -2
- package/src/vro-el-icon/types.ts +0 -12
- package/src/vro-el-icon/vro-el-icon.vue +0 -28
- package/src/vro-el-image-upload/README.md +0 -99
- package/src/vro-el-image-upload/index.ts +0 -17
- package/src/vro-el-image-upload/style/css.ts +0 -2
- package/src/vro-el-image-upload/style/deps.ts +0 -4
- package/src/vro-el-image-upload/style/index.scss +0 -55
- package/src/vro-el-image-upload/style/index.ts +0 -2
- package/src/vro-el-image-upload/types.ts +0 -42
- package/src/vro-el-image-upload/utils.ts +0 -7
- package/src/vro-el-image-upload/vro-el-image-upload.vue +0 -134
- package/src/vro-el-radio-group/README.md +0 -83
- package/src/vro-el-radio-group/index.ts +0 -16
- package/src/vro-el-radio-group/style/css.ts +0 -2
- package/src/vro-el-radio-group/style/deps.ts +0 -2
- package/src/vro-el-radio-group/style/index.scss +0 -1
- package/src/vro-el-radio-group/style/index.ts +0 -2
- package/src/vro-el-radio-group/types.ts +0 -29
- package/src/vro-el-radio-group/vro-el-radio-group.vue +0 -34
- package/src/vro-el-schema-filter/README.md +0 -146
- package/src/vro-el-schema-filter/index.ts +0 -16
- package/src/vro-el-schema-filter/style/css.ts +0 -3
- package/src/vro-el-schema-filter/style/deps.ts +0 -4
- package/src/vro-el-schema-filter/style/index.scss +0 -20
- package/src/vro-el-schema-filter/style/index.ts +0 -2
- package/src/vro-el-schema-filter/types.ts +0 -31
- package/src/vro-el-schema-filter/vro-el-schema-filter.vue +0 -64
- package/src/vro-el-schema-form/README.md +0 -207
- package/src/vro-el-schema-form/defineVroElSchemaFormCreateField.ts +0 -12
- package/src/vro-el-schema-form/defineVroElSchemaFormFieldTrigger.ts +0 -9
- package/src/vro-el-schema-form/index.ts +0 -20
- package/src/vro-el-schema-form/style/css.ts +0 -9
- package/src/vro-el-schema-form/style/deps.ts +0 -20
- package/src/vro-el-schema-form/style/index.scss +0 -4
- package/src/vro-el-schema-form/style/index.ts +0 -2
- package/src/vro-el-schema-form/types.ts +0 -171
- package/src/vro-el-schema-form/useVroElSchemaForm.ts +0 -48
- package/src/vro-el-schema-form/vro-el-schema-form.vue +0 -177
- package/src/vro-el-schema-form/vroElSchemaFormFieldManager.ts +0 -59
- package/src/vro-el-schema-form-dialog/README.md +0 -173
- package/src/vro-el-schema-form-dialog/function-call.ts +0 -20
- package/src/vro-el-schema-form-dialog/index.ts +0 -22
- package/src/vro-el-schema-form-dialog/injection.ts +0 -10
- package/src/vro-el-schema-form-dialog/style/css.ts +0 -4
- package/src/vro-el-schema-form-dialog/style/deps.ts +0 -4
- package/src/vro-el-schema-form-dialog/style/index.scss +0 -4
- package/src/vro-el-schema-form-dialog/style/index.ts +0 -2
- package/src/vro-el-schema-form-dialog/types.ts +0 -73
- package/src/vro-el-schema-form-dialog/useVroElSchemaFormDialog.ts +0 -52
- package/src/vro-el-schema-form-dialog/vro-el-schema-form-dialog.vue +0 -142
- package/src/vro-el-select/README.md +0 -83
- package/src/vro-el-select/index.ts +0 -16
- package/src/vro-el-select/style/css.ts +0 -2
- package/src/vro-el-select/style/deps.ts +0 -2
- package/src/vro-el-select/style/index.scss +0 -1
- package/src/vro-el-select/style/index.ts +0 -2
- package/src/vro-el-select/types.ts +0 -18
- package/src/vro-el-select/vro-el-select.vue +0 -33
- package/src/vro-el-skeleton/README.md +0 -128
- package/src/vro-el-skeleton/index.ts +0 -16
- package/src/vro-el-skeleton/style/css.ts +0 -3
- package/src/vro-el-skeleton/style/deps.ts +0 -3
- package/src/vro-el-skeleton/style/index.scss +0 -24
- package/src/vro-el-skeleton/style/index.ts +0 -2
- package/src/vro-el-skeleton/vro-el-skeleton.vue +0 -73
- package/src/vro-el-tags/README.md +0 -73
- package/src/vro-el-tags/index.ts +0 -16
- package/src/vro-el-tags/style/css.ts +0 -2
- package/src/vro-el-tags/style/deps.ts +0 -3
- package/src/vro-el-tags/style/index.scss +0 -1
- package/src/vro-el-tags/style/index.ts +0 -2
- package/src/vro-el-tags/types.ts +0 -21
- package/src/vro-el-tags/vro-el-tags.vue +0 -69
- package/src/vro-el-tree/README.md +0 -85
- package/src/vro-el-tree/index.ts +0 -16
- package/src/vro-el-tree/style/css.ts +0 -2
- package/src/vro-el-tree/style/deps.ts +0 -1
- package/src/vro-el-tree/style/index.scss +0 -3
- package/src/vro-el-tree/style/index.ts +0 -2
- package/src/vro-el-tree/types.ts +0 -38
- package/src/vro-el-tree/vro-el-tree.vue +0 -78
- package/src/vro-el-with-config/README.md +0 -75
- package/src/vro-el-with-config/index.ts +0 -16
- package/src/vro-el-with-config/style/css.ts +0 -3
- package/src/vro-el-with-config/style/deps.ts +0 -2
- package/src/vro-el-with-config/style/index.ts +0 -2
- package/src/vro-el-with-config/types.ts +0 -18
- package/src/vro-el-with-config/vro-el-with-config.vue +0 -48
- /package/{src/vro-el-config-provider/style/deps.ts → dist/style/base.css} +0 -0
- /package/{src/vro-el-config-provider/style/index.scss → dist/style/css.d.ts} +0 -0
- /package/{src/vro-el-with-config/style/index.scss → dist/style/deps.d.ts} +0 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
options: import('vue').PropType<any[]>;
|
|
3
|
+
labelKey: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
valueKey: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
ariaLabel: StringConstructor;
|
|
12
|
+
modelValue: import('element-plus/es/utils/vue/props/types.mjs').EpPropFinalized<(new (...args: any[]) => import('element-plus').CheckboxGroupValueType) | (() => import('element-plus').CheckboxGroupValueType) | (((new (...args: any[]) => import('element-plus').CheckboxGroupValueType) | (() => import('element-plus').CheckboxGroupValueType)) | null)[], unknown, unknown, () => never[], boolean>;
|
|
13
|
+
disabled: import('element-plus/es/utils/vue/props/types.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
14
|
+
min: NumberConstructor;
|
|
15
|
+
max: NumberConstructor;
|
|
16
|
+
size: {
|
|
17
|
+
readonly type: import('vue').PropType<import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
18
|
+
readonly required: false;
|
|
19
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
20
|
+
__epPropKey: true;
|
|
21
|
+
};
|
|
22
|
+
fill: StringConstructor;
|
|
23
|
+
textColor: StringConstructor;
|
|
24
|
+
tag: import('element-plus/es/utils/vue/props/types.mjs').EpPropFinalized<StringConstructor, unknown, unknown, "div", boolean>;
|
|
25
|
+
validateEvent: import('element-plus/es/utils/vue/props/types.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
26
|
+
props: import('element-plus/es/utils/vue/props/types.mjs').EpPropFinalized<(new (...args: any[]) => {
|
|
27
|
+
value?: string;
|
|
28
|
+
label?: string;
|
|
29
|
+
disabled?: string;
|
|
30
|
+
}) | (() => {
|
|
31
|
+
value?: string;
|
|
32
|
+
label?: string;
|
|
33
|
+
disabled?: string;
|
|
34
|
+
}) | (((new (...args: any[]) => {
|
|
35
|
+
value?: string;
|
|
36
|
+
label?: string;
|
|
37
|
+
disabled?: string;
|
|
38
|
+
}) | (() => {
|
|
39
|
+
value?: string;
|
|
40
|
+
label?: string;
|
|
41
|
+
disabled?: string;
|
|
42
|
+
})) | null)[], unknown, unknown, () => Required<{
|
|
43
|
+
value?: string;
|
|
44
|
+
label?: string;
|
|
45
|
+
disabled?: string;
|
|
46
|
+
}>, boolean>;
|
|
47
|
+
type: import('element-plus/es/utils/vue/props/types.mjs').EpPropFinalized<StringConstructor, "button" | "checkbox", unknown, "checkbox", boolean>;
|
|
48
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
49
|
+
change: (...args: any[]) => void;
|
|
50
|
+
"update:modelValue": (...args: any[]) => void;
|
|
51
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
52
|
+
options: import('vue').PropType<any[]>;
|
|
53
|
+
labelKey: {
|
|
54
|
+
type: StringConstructor;
|
|
55
|
+
default: string;
|
|
56
|
+
};
|
|
57
|
+
valueKey: {
|
|
58
|
+
type: StringConstructor;
|
|
59
|
+
default: string;
|
|
60
|
+
};
|
|
61
|
+
ariaLabel: StringConstructor;
|
|
62
|
+
modelValue: import('element-plus/es/utils/vue/props/types.mjs').EpPropFinalized<(new (...args: any[]) => import('element-plus').CheckboxGroupValueType) | (() => import('element-plus').CheckboxGroupValueType) | (((new (...args: any[]) => import('element-plus').CheckboxGroupValueType) | (() => import('element-plus').CheckboxGroupValueType)) | null)[], unknown, unknown, () => never[], boolean>;
|
|
63
|
+
disabled: import('element-plus/es/utils/vue/props/types.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
64
|
+
min: NumberConstructor;
|
|
65
|
+
max: NumberConstructor;
|
|
66
|
+
size: {
|
|
67
|
+
readonly type: import('vue').PropType<import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
68
|
+
readonly required: false;
|
|
69
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
70
|
+
__epPropKey: true;
|
|
71
|
+
};
|
|
72
|
+
fill: StringConstructor;
|
|
73
|
+
textColor: StringConstructor;
|
|
74
|
+
tag: import('element-plus/es/utils/vue/props/types.mjs').EpPropFinalized<StringConstructor, unknown, unknown, "div", boolean>;
|
|
75
|
+
validateEvent: import('element-plus/es/utils/vue/props/types.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
76
|
+
props: import('element-plus/es/utils/vue/props/types.mjs').EpPropFinalized<(new (...args: any[]) => {
|
|
77
|
+
value?: string;
|
|
78
|
+
label?: string;
|
|
79
|
+
disabled?: string;
|
|
80
|
+
}) | (() => {
|
|
81
|
+
value?: string;
|
|
82
|
+
label?: string;
|
|
83
|
+
disabled?: string;
|
|
84
|
+
}) | (((new (...args: any[]) => {
|
|
85
|
+
value?: string;
|
|
86
|
+
label?: string;
|
|
87
|
+
disabled?: string;
|
|
88
|
+
}) | (() => {
|
|
89
|
+
value?: string;
|
|
90
|
+
label?: string;
|
|
91
|
+
disabled?: string;
|
|
92
|
+
})) | null)[], unknown, unknown, () => Required<{
|
|
93
|
+
value?: string;
|
|
94
|
+
label?: string;
|
|
95
|
+
disabled?: string;
|
|
96
|
+
}>, boolean>;
|
|
97
|
+
type: import('element-plus/es/utils/vue/props/types.mjs').EpPropFinalized<StringConstructor, "button" | "checkbox", unknown, "checkbox", boolean>;
|
|
98
|
+
}>> & Readonly<{
|
|
99
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
100
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
101
|
+
}>, {
|
|
102
|
+
type: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<StringConstructor, "button" | "checkbox", unknown>;
|
|
103
|
+
props: {
|
|
104
|
+
value?: string;
|
|
105
|
+
label?: string;
|
|
106
|
+
disabled?: string;
|
|
107
|
+
};
|
|
108
|
+
disabled: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
109
|
+
modelValue: import('element-plus').CheckboxGroupValueType;
|
|
110
|
+
labelKey: string;
|
|
111
|
+
valueKey: string;
|
|
112
|
+
tag: string;
|
|
113
|
+
validateEvent: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
114
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
115
|
+
export default _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { defineComponent as d, computed as k, createBlock as t, openBlock as l, unref as u, mergeProps as p, withCtx as a, createElementBlock as f, Fragment as i, renderList as b, createTextVNode as g, toDisplayString as h } from "vue";
|
|
2
|
+
import { pick as v } from "@daysnap/utils";
|
|
3
|
+
import { checkboxGroupProps as C, ElCheckboxGroup as x, ElCheckbox as y } from "element-plus";
|
|
4
|
+
import { vroElCheckboxGroupProps as E } from "./types.js";
|
|
5
|
+
const K = /* @__PURE__ */ d({
|
|
6
|
+
name: "VroElCheckboxGroup",
|
|
7
|
+
__name: "vro-el-checkbox-group",
|
|
8
|
+
props: E,
|
|
9
|
+
emits: ["update:modelValue", "change"],
|
|
10
|
+
setup(m) {
|
|
11
|
+
const n = m, s = k(() => v(n, Object.keys(C)));
|
|
12
|
+
return (r, o) => (l(), t(u(x), p(s.value, {
|
|
13
|
+
class: "vro-el-checkbox-group",
|
|
14
|
+
"onUpdate:modelValue": o[0] || (o[0] = (e) => r.$emit("update:modelValue", e)),
|
|
15
|
+
onChange: o[1] || (o[1] = (e) => r.$emit("change", e))
|
|
16
|
+
}), {
|
|
17
|
+
default: a(() => [
|
|
18
|
+
(l(!0), f(i, null, b(r.options, (e, c) => (l(), t(u(y), p({ ref_for: !0 }, e.props, {
|
|
19
|
+
key: c,
|
|
20
|
+
value: e[r.valueKey || "value"] ?? e
|
|
21
|
+
}), {
|
|
22
|
+
default: a(() => [
|
|
23
|
+
g(h(e[r.labelKey || "label"] ?? e), 1)
|
|
24
|
+
]),
|
|
25
|
+
_: 2
|
|
26
|
+
}, 1040, ["value"]))), 128))
|
|
27
|
+
]),
|
|
28
|
+
_: 1
|
|
29
|
+
}, 16));
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
export {
|
|
33
|
+
K as default
|
|
34
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export * from './types';
|
|
2
|
+
export declare const VroElConfigProvider: import('@vrojs/base').WithInstall<{
|
|
3
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
4
|
+
locale: {
|
|
5
|
+
type: import('vue').PropType<import('./types').VroElLocale>;
|
|
6
|
+
default: () => {};
|
|
7
|
+
};
|
|
8
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
9
|
+
locale: import('@vrojs/base').DeepPartial<import('..').Locale>;
|
|
10
|
+
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
11
|
+
P: {};
|
|
12
|
+
B: {};
|
|
13
|
+
D: {};
|
|
14
|
+
C: {};
|
|
15
|
+
M: {};
|
|
16
|
+
Defaults: {};
|
|
17
|
+
}, Readonly<import('vue').ExtractPropTypes<{
|
|
18
|
+
locale: {
|
|
19
|
+
type: import('vue').PropType<import('./types').VroElLocale>;
|
|
20
|
+
default: () => {};
|
|
21
|
+
};
|
|
22
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, {
|
|
23
|
+
locale: import('@vrojs/base').DeepPartial<import('..').Locale>;
|
|
24
|
+
}>;
|
|
25
|
+
__isFragment?: never;
|
|
26
|
+
__isTeleport?: never;
|
|
27
|
+
__isSuspense?: never;
|
|
28
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
29
|
+
locale: {
|
|
30
|
+
type: import('vue').PropType<import('./types').VroElLocale>;
|
|
31
|
+
default: () => {};
|
|
32
|
+
};
|
|
33
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
34
|
+
locale: import('@vrojs/base').DeepPartial<import('..').Locale>;
|
|
35
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
36
|
+
$slots: {
|
|
37
|
+
default?(_: {}): any;
|
|
38
|
+
};
|
|
39
|
+
})>;
|
|
40
|
+
export default VroElConfigProvider;
|
|
41
|
+
export type VroElConfigProviderInstance = InstanceType<typeof VroElConfigProvider>;
|
|
42
|
+
declare module 'vue' {
|
|
43
|
+
interface GlobalComponents {
|
|
44
|
+
VroElConfigProvider: typeof VroElConfigProvider;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { withInstall as o } from "@vrojs/base";
|
|
2
|
+
import r from "./vro-el-config-provider.vue.js";
|
|
3
|
+
import { vroElConfigProviderProps as l } from "./types.js";
|
|
4
|
+
const f = o(r);
|
|
5
|
+
export {
|
|
6
|
+
f as VroElConfigProvider,
|
|
7
|
+
f as default,
|
|
8
|
+
l as vroElConfigProviderProps
|
|
9
|
+
};
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DeepPartial } from '@vrojs/base';
|
|
2
|
+
import { ExtractPropTypes, PropType } from 'vue';
|
|
3
|
+
import { Locale } from '../locale';
|
|
4
|
+
export type VroElLocale = DeepPartial<Locale>;
|
|
5
|
+
export declare const vroElConfigProviderProps: {
|
|
6
|
+
/**
|
|
7
|
+
* 组件内部文案配置,支持局部覆盖。
|
|
8
|
+
*/
|
|
9
|
+
locale: {
|
|
10
|
+
type: PropType<VroElLocale>;
|
|
11
|
+
default: () => {};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export type VroElConfigProviderProps = ExtractPropTypes<typeof vroElConfigProviderProps>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: {
|
|
4
|
+
default?(_: {}): any;
|
|
5
|
+
};
|
|
6
|
+
refs: {};
|
|
7
|
+
rootEl: any;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
11
|
+
locale: {
|
|
12
|
+
type: import('vue').PropType<import('./types').VroElLocale>;
|
|
13
|
+
default: () => {};
|
|
14
|
+
};
|
|
15
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
16
|
+
locale: {
|
|
17
|
+
type: import('vue').PropType<import('./types').VroElLocale>;
|
|
18
|
+
default: () => {};
|
|
19
|
+
};
|
|
20
|
+
}>> & Readonly<{}>, {
|
|
21
|
+
locale: import('@vrojs/base').DeepPartial<import('..').Locale>;
|
|
22
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
23
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { defineComponent as m, computed as n, provide as p, renderSlot as i } from "vue";
|
|
2
|
+
import { merge as l } from "@daysnap/utils";
|
|
3
|
+
import f from "../locale/lang/zh-cn.js";
|
|
4
|
+
import { localeContextKey as c } from "../locale/useLocale.js";
|
|
5
|
+
import { vroElConfigProviderProps as s } from "./types.js";
|
|
6
|
+
const g = /* @__PURE__ */ m({
|
|
7
|
+
name: "VroElConfigProvider",
|
|
8
|
+
__name: "vro-el-config-provider",
|
|
9
|
+
props: s,
|
|
10
|
+
setup(o) {
|
|
11
|
+
const r = o, e = n(() => l({}, f, r.locale));
|
|
12
|
+
return p(c, e), (t, a) => i(t.$slots, "default");
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
export {
|
|
16
|
+
g as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export * from './types';
|
|
2
|
+
export * from './utils';
|
|
3
|
+
export declare const VroElFileUpload: import('@vrojs/base').WithInstall<import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
modelValue: {
|
|
5
|
+
type: import('vue').PropType<string | string[]>;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
accept: StringConstructor;
|
|
9
|
+
max: {
|
|
10
|
+
type: NumberConstructor;
|
|
11
|
+
default: number;
|
|
12
|
+
};
|
|
13
|
+
disabled: BooleanConstructor;
|
|
14
|
+
params: import('vue').PropType<Record<string, any>>;
|
|
15
|
+
upload: import('vue').PropType<import('./types').VroElFileUploadCallback>;
|
|
16
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
17
|
+
"update:modelValue": (value: string | string[]) => any;
|
|
18
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
19
|
+
modelValue: {
|
|
20
|
+
type: import('vue').PropType<string | string[]>;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
accept: StringConstructor;
|
|
24
|
+
max: {
|
|
25
|
+
type: NumberConstructor;
|
|
26
|
+
default: number;
|
|
27
|
+
};
|
|
28
|
+
disabled: BooleanConstructor;
|
|
29
|
+
params: import('vue').PropType<Record<string, any>>;
|
|
30
|
+
upload: import('vue').PropType<import('./types').VroElFileUploadCallback>;
|
|
31
|
+
}>> & Readonly<{
|
|
32
|
+
"onUpdate:modelValue"?: ((value: string | string[]) => any) | undefined;
|
|
33
|
+
}>, {
|
|
34
|
+
disabled: boolean;
|
|
35
|
+
modelValue: string | string[];
|
|
36
|
+
max: number;
|
|
37
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>>;
|
|
38
|
+
export default VroElFileUpload;
|
|
39
|
+
export type VroElFileUploadInstance = InstanceType<typeof VroElFileUpload>;
|
|
40
|
+
declare module 'vue' {
|
|
41
|
+
interface GlobalComponents {
|
|
42
|
+
VroElFileUpload: typeof VroElFileUpload;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { withInstall as o } from "@vrojs/base";
|
|
2
|
+
import l from "./vro-el-file-upload.vue.js";
|
|
3
|
+
import { vroElFileUploadProps as a } from "./types.js";
|
|
4
|
+
import { getVroElFileUploadOptions as m, setVroElFileUploadOptions as f } from "./utils.js";
|
|
5
|
+
const p = o(l);
|
|
6
|
+
export {
|
|
7
|
+
p as VroElFileUpload,
|
|
8
|
+
p as default,
|
|
9
|
+
m as getVroElFileUploadOptions,
|
|
10
|
+
f as setVroElFileUploadOptions,
|
|
11
|
+
a as vroElFileUploadProps
|
|
12
|
+
};
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.vro-el-file-upload-btn{position:relative}.vro-el-file-upload-btn input{position:absolute;width:100%;height:100%;top:0;left:0;cursor:pointer;opacity:0}.vro-el-file-upload-item{position:relative;box-sizing:border-box;display:flex;align-items:center;margin-top:4px}.vro-el-file-upload-item a{text-decoration:underline;color:#007bee;margin-right:10px}.vro-el-file-upload-item i{cursor:pointer;margin-right:10px;color:#e00;background-color:#f2f2f2}
|
|
File without changes
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
export interface VroElFileUploadCallback<T = any> {
|
|
3
|
+
(files: File[], options: {
|
|
4
|
+
params: T;
|
|
5
|
+
}): Promise<string[]>;
|
|
6
|
+
}
|
|
7
|
+
export declare const vroElFileUploadProps: {
|
|
8
|
+
/**
|
|
9
|
+
* 绑定值。单文件时可传字符串,多文件时传字符串数组。
|
|
10
|
+
*/
|
|
11
|
+
modelValue: {
|
|
12
|
+
type: PropType<string | string[]>;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* 原生文件选择 accept 属性。
|
|
17
|
+
*/
|
|
18
|
+
accept: StringConstructor;
|
|
19
|
+
/**
|
|
20
|
+
* 最大上传数量。
|
|
21
|
+
*/
|
|
22
|
+
max: {
|
|
23
|
+
type: NumberConstructor;
|
|
24
|
+
default: number;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* 是否禁用上传和删除。
|
|
28
|
+
*/
|
|
29
|
+
disabled: BooleanConstructor;
|
|
30
|
+
/**
|
|
31
|
+
* 上传时透传给 upload 回调的自定义参数。
|
|
32
|
+
*/
|
|
33
|
+
params: PropType<Record<string, any>>;
|
|
34
|
+
/**
|
|
35
|
+
* 上传回调,接收本次选择的文件列表,返回文件访问地址列表。
|
|
36
|
+
*/
|
|
37
|
+
upload: PropType<VroElFileUploadCallback>;
|
|
38
|
+
};
|
|
39
|
+
export type VroElFileUploadProps = ExtractPropTypes<typeof vroElFileUploadProps>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
/**
|
|
3
|
+
* 绑定值。单文件时可传字符串,多文件时传字符串数组。
|
|
4
|
+
*/
|
|
5
|
+
modelValue: {
|
|
6
|
+
type: [String, Array],
|
|
7
|
+
default: ""
|
|
8
|
+
},
|
|
9
|
+
/**
|
|
10
|
+
* 原生文件选择 accept 属性。
|
|
11
|
+
*/
|
|
12
|
+
accept: String,
|
|
13
|
+
/**
|
|
14
|
+
* 最大上传数量。
|
|
15
|
+
*/
|
|
16
|
+
max: {
|
|
17
|
+
type: Number,
|
|
18
|
+
default: 1
|
|
19
|
+
},
|
|
20
|
+
/**
|
|
21
|
+
* 是否禁用上传和删除。
|
|
22
|
+
*/
|
|
23
|
+
disabled: Boolean,
|
|
24
|
+
/**
|
|
25
|
+
* 上传时透传给 upload 回调的自定义参数。
|
|
26
|
+
*/
|
|
27
|
+
params: Object,
|
|
28
|
+
/**
|
|
29
|
+
* 上传回调,接收本次选择的文件列表,返回文件访问地址列表。
|
|
30
|
+
*/
|
|
31
|
+
upload: Function
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
e as vroElFileUploadProps
|
|
35
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { VroElFileUploadProps } from './types';
|
|
2
|
+
export declare const setVroElFileUploadOptions: (value: Partial<Pick<VroElFileUploadProps, "upload">>) => Partial<Pick<VroElFileUploadProps, "upload">>, getVroElFileUploadOptions: () => Partial<Pick<VroElFileUploadProps, "upload">>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
modelValue: {
|
|
3
|
+
type: import('vue').PropType<string | string[]>;
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
accept: StringConstructor;
|
|
7
|
+
max: {
|
|
8
|
+
type: NumberConstructor;
|
|
9
|
+
default: number;
|
|
10
|
+
};
|
|
11
|
+
disabled: BooleanConstructor;
|
|
12
|
+
params: import('vue').PropType<Record<string, any>>;
|
|
13
|
+
upload: import('vue').PropType<import('./types').VroElFileUploadCallback>;
|
|
14
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
15
|
+
"update:modelValue": (value: string | string[]) => any;
|
|
16
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
17
|
+
modelValue: {
|
|
18
|
+
type: import('vue').PropType<string | string[]>;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
accept: StringConstructor;
|
|
22
|
+
max: {
|
|
23
|
+
type: NumberConstructor;
|
|
24
|
+
default: number;
|
|
25
|
+
};
|
|
26
|
+
disabled: BooleanConstructor;
|
|
27
|
+
params: import('vue').PropType<Record<string, any>>;
|
|
28
|
+
upload: import('vue').PropType<import('./types').VroElFileUploadCallback>;
|
|
29
|
+
}>> & Readonly<{
|
|
30
|
+
"onUpdate:modelValue"?: ((value: string | string[]) => any) | undefined;
|
|
31
|
+
}>, {
|
|
32
|
+
disabled: boolean;
|
|
33
|
+
modelValue: string | string[];
|
|
34
|
+
max: number;
|
|
35
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
36
|
+
export default _default;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { defineComponent as N, computed as h, createElementBlock as s, openBlock as r, createBlock as V, createCommentVNode as y, createElementVNode as d, unref as t, withCtx as k, createTextVNode as A, toDisplayString as E, Fragment as T, renderList as D, createVNode as L } from "vue";
|
|
2
|
+
import { omitBy as P, isUndefined as x, isArray as u } from "@daysnap/utils";
|
|
3
|
+
import { CircleCloseFilled as I } from "@element-plus/icons-vue";
|
|
4
|
+
import { useAsyncTask as O } from "@vrojs/use";
|
|
5
|
+
import { ElButton as S, ElIcon as $ } from "element-plus";
|
|
6
|
+
import { useLocale as j } from "../locale/useLocale.js";
|
|
7
|
+
import { vroElFileUploadProps as q } from "./types.js";
|
|
8
|
+
import { getVroElFileUploadOptions as z } from "./utils.js";
|
|
9
|
+
const G = { class: "vro-el-file-upload" }, H = ["accept", "multiple"], J = { class: "vro-el-file-upload-content" }, K = ["href"], le = /* @__PURE__ */ N({
|
|
10
|
+
name: "VroElFileUpload",
|
|
11
|
+
__name: "vro-el-file-upload",
|
|
12
|
+
props: q,
|
|
13
|
+
emits: ["update:modelValue"],
|
|
14
|
+
setup(_, { emit: b }) {
|
|
15
|
+
const p = b, C = _, { t: w } = j(), n = h(() => ({
|
|
16
|
+
...z(),
|
|
17
|
+
...P(C, x)
|
|
18
|
+
})), i = h(() => {
|
|
19
|
+
const { modelValue: e } = n.value;
|
|
20
|
+
return u(e) ? e : e ? [e] : [];
|
|
21
|
+
}), U = (e) => {
|
|
22
|
+
let l = "";
|
|
23
|
+
u(n.value.modelValue) && (l = [...n.value.modelValue], l.splice(e, 1)), p("update:modelValue", l);
|
|
24
|
+
}, { loading: B, trigger: m } = O(
|
|
25
|
+
async (e) => {
|
|
26
|
+
const l = e.target, o = Array.from(l.files ?? []);
|
|
27
|
+
if (l.value = "", !o?.length)
|
|
28
|
+
return;
|
|
29
|
+
const { modelValue: a, max: c, upload: f, params: F } = n.value;
|
|
30
|
+
if (!f)
|
|
31
|
+
throw new Error("not set upload");
|
|
32
|
+
const v = await f(o.slice(0, c - i.value.length), { params: F });
|
|
33
|
+
let g = v[0];
|
|
34
|
+
u(a) && (g = [...a, ...v]), p("update:modelValue", g);
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
throwError: !0
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
return (e, l) => (r(), s("div", G, [
|
|
41
|
+
i.value.length < e.max && !e.disabled ? (r(), V(t(S), {
|
|
42
|
+
key: 0,
|
|
43
|
+
class: "vro-el-file-upload-btn",
|
|
44
|
+
loading: t(B),
|
|
45
|
+
disabled: e.disabled,
|
|
46
|
+
type: "primary",
|
|
47
|
+
icon: "upload"
|
|
48
|
+
}, {
|
|
49
|
+
default: k(() => [
|
|
50
|
+
A(E(t(w)("fileUpload.btnText")) + " ", 1),
|
|
51
|
+
d("input", {
|
|
52
|
+
type: "file",
|
|
53
|
+
accept: e.accept,
|
|
54
|
+
multiple: e.max > 1,
|
|
55
|
+
onChange: l[0] || (l[0] = //@ts-ignore
|
|
56
|
+
(...o) => t(m) && t(m)(...o))
|
|
57
|
+
}, null, 40, H)
|
|
58
|
+
]),
|
|
59
|
+
_: 1
|
|
60
|
+
}, 8, ["loading", "disabled"])) : y("", !0),
|
|
61
|
+
d("ul", J, [
|
|
62
|
+
(r(!0), s(T, null, D(i.value, (o, a) => (r(), s("li", {
|
|
63
|
+
class: "vro-el-file-upload-item",
|
|
64
|
+
key: a
|
|
65
|
+
}, [
|
|
66
|
+
d("a", {
|
|
67
|
+
href: o,
|
|
68
|
+
target: "_blank"
|
|
69
|
+
}, E(o), 9, K),
|
|
70
|
+
e.disabled ? y("", !0) : (r(), V(t($), {
|
|
71
|
+
key: 0,
|
|
72
|
+
onClick: (c) => U(a)
|
|
73
|
+
}, {
|
|
74
|
+
default: k(() => [
|
|
75
|
+
L(t(I))
|
|
76
|
+
]),
|
|
77
|
+
_: 1
|
|
78
|
+
}, 8, ["onClick"]))
|
|
79
|
+
]))), 128))
|
|
80
|
+
])
|
|
81
|
+
]));
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
export {
|
|
85
|
+
le as default
|
|
86
|
+
};
|