@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
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="vro-el-image-upload">
|
|
3
|
-
<vue-draggable
|
|
4
|
-
class="vro-el-image-upload-content"
|
|
5
|
-
:disabled="props.disabled || props.max <= 1"
|
|
6
|
-
:animation="150"
|
|
7
|
-
:model-value="computeValue"
|
|
8
|
-
filter=".vro-el-image-upload-btn"
|
|
9
|
-
@update:model-value="handleUpdate"
|
|
10
|
-
>
|
|
11
|
-
<div class="vro-el-image-upload-item" v-for="(item, index) in computeValue" :key="item">
|
|
12
|
-
<el-image
|
|
13
|
-
class="vro-el-image-upload-image"
|
|
14
|
-
v-bind="props.imageProps"
|
|
15
|
-
:src="item"
|
|
16
|
-
:preview-src-list="computeValue"
|
|
17
|
-
:initial-index="index"
|
|
18
|
-
/>
|
|
19
|
-
<el-icon
|
|
20
|
-
v-if="!props.disabled"
|
|
21
|
-
class="vro-el-image-upload-clear"
|
|
22
|
-
@click="handleDelete(index)"
|
|
23
|
-
>
|
|
24
|
-
<circle-close-filled />
|
|
25
|
-
</el-icon>
|
|
26
|
-
</div>
|
|
27
|
-
<div
|
|
28
|
-
v-if="computeValue.length < props.max && !props.disabled"
|
|
29
|
-
v-loading="loading"
|
|
30
|
-
class="vro-el-image-upload-item vro-el-image-upload-btn"
|
|
31
|
-
>
|
|
32
|
-
<el-icon class="vro-el-image-upload-add"><plus /></el-icon>
|
|
33
|
-
<input type="file" accept="image/*" :multiple="props.max > 1" @change="handleUpload" />
|
|
34
|
-
</div>
|
|
35
|
-
</vue-draggable>
|
|
36
|
-
<el-checkbox v-if="!props.disabled && props.compressible" v-model="compress">
|
|
37
|
-
{{ t('imageUpload.compressText') }}
|
|
38
|
-
</el-checkbox>
|
|
39
|
-
</div>
|
|
40
|
-
</template>
|
|
41
|
-
|
|
42
|
-
<script setup lang="ts">
|
|
43
|
-
import { isArray, isBoolean, isUndefined, omitBy } from '@daysnap/utils'
|
|
44
|
-
import { CircleCloseFilled, Plus } from '@element-plus/icons-vue'
|
|
45
|
-
import { useAsyncTask } from '@vrojs/use'
|
|
46
|
-
import { ElCheckbox, ElIcon, ElImage, ElLoading } from 'element-plus'
|
|
47
|
-
import { computed, ref } from 'vue'
|
|
48
|
-
import { VueDraggable } from 'vue-draggable-plus'
|
|
49
|
-
|
|
50
|
-
import { useLocale } from '../locale'
|
|
51
|
-
import { type VroElImageUploadProps, vroElImageUploadProps } from './types'
|
|
52
|
-
import { getVroElImageUploadOptions } from './utils'
|
|
53
|
-
|
|
54
|
-
defineOptions({ name: 'VroElImageUpload' })
|
|
55
|
-
|
|
56
|
-
const emit = defineEmits<{
|
|
57
|
-
'update:modelValue': [value: string | string[]]
|
|
58
|
-
}>()
|
|
59
|
-
const rawProps = defineProps(vroElImageUploadProps)
|
|
60
|
-
const { t } = useLocale()
|
|
61
|
-
|
|
62
|
-
const props = computed(() => {
|
|
63
|
-
const {
|
|
64
|
-
compressible = false,
|
|
65
|
-
upload,
|
|
66
|
-
...rest
|
|
67
|
-
} = {
|
|
68
|
-
...getVroElImageUploadOptions(),
|
|
69
|
-
...omitBy(rawProps, isUndefined),
|
|
70
|
-
} as VroElImageUploadProps
|
|
71
|
-
|
|
72
|
-
return {
|
|
73
|
-
upload,
|
|
74
|
-
compressible,
|
|
75
|
-
compress: isBoolean(compressible) ? compressible : compressible.value,
|
|
76
|
-
...rest,
|
|
77
|
-
}
|
|
78
|
-
})
|
|
79
|
-
|
|
80
|
-
const vLoading = ElLoading.directive
|
|
81
|
-
const compress = ref(props.value.compress)
|
|
82
|
-
|
|
83
|
-
const computeValue = computed(() => {
|
|
84
|
-
const { modelValue } = props.value
|
|
85
|
-
return isArray(modelValue) ? modelValue : modelValue ? [modelValue] : []
|
|
86
|
-
})
|
|
87
|
-
|
|
88
|
-
const handleUpdate = (value: string[]) => {
|
|
89
|
-
if (isArray(props.value.modelValue)) {
|
|
90
|
-
emit('update:modelValue', value)
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
const handleDelete = (index: number) => {
|
|
95
|
-
let value: string | string[] = ''
|
|
96
|
-
if (isArray(props.value.modelValue)) {
|
|
97
|
-
value = [...props.value.modelValue]
|
|
98
|
-
value.splice(index, 1)
|
|
99
|
-
}
|
|
100
|
-
emit('update:modelValue', value)
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
const { loading, trigger: handleUpload } = useAsyncTask(
|
|
104
|
-
async (event: Event) => {
|
|
105
|
-
const target = event.target as HTMLInputElement
|
|
106
|
-
const files = Array.from(target.files ?? [])
|
|
107
|
-
|
|
108
|
-
target.value = ''
|
|
109
|
-
if (!files?.length) {
|
|
110
|
-
return
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
const { max, upload, params } = props.value
|
|
114
|
-
|
|
115
|
-
if (!upload) {
|
|
116
|
-
throw new Error('not set upload')
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
const res = await upload(files.slice(0, max - computeValue.value.length), {
|
|
120
|
-
compress: compress.value,
|
|
121
|
-
params,
|
|
122
|
-
})
|
|
123
|
-
|
|
124
|
-
let value: string | string[] = res[0]
|
|
125
|
-
if (isArray(props.value.modelValue)) {
|
|
126
|
-
value = [...props.value.modelValue, ...res]
|
|
127
|
-
}
|
|
128
|
-
emit('update:modelValue', value)
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
throwError: true,
|
|
132
|
-
},
|
|
133
|
-
)
|
|
134
|
-
</script>
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
# VroElRadioGroup
|
|
2
|
-
|
|
3
|
-
### 介绍
|
|
4
|
-
|
|
5
|
-
基于 `ElRadioGroup` 和 `ElRadio` 的选项化封装。适合通过 `options` 快速渲染单选项,同时保留 Element Plus RadioGroup 的原有属性和事件。
|
|
6
|
-
|
|
7
|
-
## 代码演示
|
|
8
|
-
|
|
9
|
-
### 基础用法
|
|
10
|
-
|
|
11
|
-
```html
|
|
12
|
-
<template>
|
|
13
|
-
<vro-el-radio-group v-model="value" :options="options" />
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script setup lang="ts">
|
|
17
|
-
import { ref } from 'vue'
|
|
18
|
-
|
|
19
|
-
const value = ref('daily')
|
|
20
|
-
const options = [
|
|
21
|
-
{ label: '每天', value: 'daily' },
|
|
22
|
-
{ label: '每周', value: 'weekly' },
|
|
23
|
-
{ label: '每月', value: 'monthly', props: { disabled: true } },
|
|
24
|
-
]
|
|
25
|
-
</script>
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
### 自定义字段名
|
|
29
|
-
|
|
30
|
-
```html
|
|
31
|
-
<vro-el-radio-group v-model="value" :options="options" label-key="name" value-key="id" />
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## API
|
|
35
|
-
|
|
36
|
-
### 属性 Props
|
|
37
|
-
|
|
38
|
-
<table>
|
|
39
|
-
<tbody>
|
|
40
|
-
<tr>
|
|
41
|
-
<td>名称</td>
|
|
42
|
-
<td>类型</td>
|
|
43
|
-
<td>默认值</td>
|
|
44
|
-
</tr>
|
|
45
|
-
<tr v-for="(item, key) in vroElRadioGroupProps" :key="key">
|
|
46
|
-
<td>{{ key }}</td>
|
|
47
|
-
<td>{{ parseType(item.type || item) }}</td>
|
|
48
|
-
<td>{{ reserve(item.default, '-') }}</td>
|
|
49
|
-
</tr>
|
|
50
|
-
</tbody>
|
|
51
|
-
</table>
|
|
52
|
-
|
|
53
|
-
### 插槽 Slots
|
|
54
|
-
|
|
55
|
-
暂无。
|
|
56
|
-
|
|
57
|
-
### 事件 Events
|
|
58
|
-
|
|
59
|
-
<table>
|
|
60
|
-
<tbody>
|
|
61
|
-
<tr>
|
|
62
|
-
<td>名称</td>
|
|
63
|
-
<td>参数</td>
|
|
64
|
-
<td>说明</td>
|
|
65
|
-
</tr>
|
|
66
|
-
<tr>
|
|
67
|
-
<td>update:modelValue</td>
|
|
68
|
-
<td>value</td>
|
|
69
|
-
<td>选中值变化时触发</td>
|
|
70
|
-
</tr>
|
|
71
|
-
<tr>
|
|
72
|
-
<td>change</td>
|
|
73
|
-
<td>value</td>
|
|
74
|
-
<td>同 Element Plus RadioGroup change 事件</td>
|
|
75
|
-
</tr>
|
|
76
|
-
</tbody>
|
|
77
|
-
</table>
|
|
78
|
-
|
|
79
|
-
<script setup lang="ts">
|
|
80
|
-
import { reserve } from '@daysnap/utils'
|
|
81
|
-
import { VroElRadioGroup, vroElRadioGroupProps } from '.'
|
|
82
|
-
import { parseType } from '../utils'
|
|
83
|
-
</script>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { withInstall } from '@vrojs/base'
|
|
2
|
-
|
|
3
|
-
import Component from './vro-el-radio-group.vue'
|
|
4
|
-
|
|
5
|
-
export * from './types'
|
|
6
|
-
|
|
7
|
-
export const VroElRadioGroup = withInstall<typeof Component>(Component)
|
|
8
|
-
export default VroElRadioGroup
|
|
9
|
-
|
|
10
|
-
export type VroElRadioGroupInstance = InstanceType<typeof VroElRadioGroup>
|
|
11
|
-
|
|
12
|
-
declare module 'vue' {
|
|
13
|
-
export interface GlobalComponents {
|
|
14
|
-
VroElRadioGroup: typeof VroElRadioGroup
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.vro-el-radio-group { }
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { radioGroupProps } from 'element-plus'
|
|
2
|
-
import type { ExtractPropTypes, PropType } from 'vue'
|
|
3
|
-
|
|
4
|
-
export const vroElRadioGroupProps = {
|
|
5
|
-
...radioGroupProps,
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* 选项列表,支持基础值或对象配置。
|
|
9
|
-
*/
|
|
10
|
-
options: Array as PropType<any[]>,
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* 选项展示文本的字段名。
|
|
14
|
-
*/
|
|
15
|
-
labelKey: {
|
|
16
|
-
type: String,
|
|
17
|
-
default: 'label',
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* 选项绑定值的字段名。
|
|
22
|
-
*/
|
|
23
|
-
valueKey: {
|
|
24
|
-
type: String,
|
|
25
|
-
default: 'value',
|
|
26
|
-
},
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export type VroElRadioGroupProps = ExtractPropTypes<typeof vroElRadioGroupProps>
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-radio-group
|
|
3
|
-
v-bind="restProps"
|
|
4
|
-
class="vro-el-radio-group"
|
|
5
|
-
@update:model-value="$emit('update:modelValue', $event)"
|
|
6
|
-
@change="$emit('change', $event)"
|
|
7
|
-
>
|
|
8
|
-
<el-radio
|
|
9
|
-
v-for="(option, index) in options"
|
|
10
|
-
v-bind="option.props"
|
|
11
|
-
:key="index"
|
|
12
|
-
:value="option[valueKey || 'value'] ?? option"
|
|
13
|
-
>
|
|
14
|
-
{{ option[labelKey || 'label'] ?? option }}
|
|
15
|
-
</el-radio>
|
|
16
|
-
</el-radio-group>
|
|
17
|
-
</template>
|
|
18
|
-
|
|
19
|
-
<script setup lang="ts">
|
|
20
|
-
import { pick } from '@daysnap/utils'
|
|
21
|
-
import { ElRadio, ElRadioGroup, radioGroupProps } from 'element-plus'
|
|
22
|
-
import { computed } from 'vue'
|
|
23
|
-
|
|
24
|
-
import { vroElRadioGroupProps } from './types'
|
|
25
|
-
|
|
26
|
-
defineOptions({ name: 'VroElRadioGroup' })
|
|
27
|
-
|
|
28
|
-
defineEmits(['update:modelValue', 'change'])
|
|
29
|
-
const props = defineProps(vroElRadioGroupProps)
|
|
30
|
-
|
|
31
|
-
const restProps = computed(() => {
|
|
32
|
-
return pick(props, Object.keys(radioGroupProps) as any[])
|
|
33
|
-
})
|
|
34
|
-
</script>
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
# VroElSchemaFilter
|
|
2
|
-
|
|
3
|
-
### 介绍
|
|
4
|
-
|
|
5
|
-
基于 `VroElSchemaForm` 的筛选表单组件。组件会根据 `schema` 渲染筛选项,并内置搜索、重置按钮,适合列表页、表格页的查询条件区域。
|
|
6
|
-
|
|
7
|
-
## 代码演示
|
|
8
|
-
|
|
9
|
-
### 基础用法
|
|
10
|
-
|
|
11
|
-
```html
|
|
12
|
-
<template>
|
|
13
|
-
<vro-el-schema-filter
|
|
14
|
-
:schema="schema"
|
|
15
|
-
:form-props="{ labelWidth: '90px' }"
|
|
16
|
-
@query="handleQuery"
|
|
17
|
-
@reset="handleReset"
|
|
18
|
-
/>
|
|
19
|
-
</template>
|
|
20
|
-
|
|
21
|
-
<script setup lang="ts">
|
|
22
|
-
import { ref } from 'vue'
|
|
23
|
-
import type { VroElSchemaFormSchema } from '@vrojs/element-plus'
|
|
24
|
-
|
|
25
|
-
const schema = ref<VroElSchemaFormSchema>({
|
|
26
|
-
keyword: {
|
|
27
|
-
label: '关键词',
|
|
28
|
-
value: '',
|
|
29
|
-
is: 'ElInput',
|
|
30
|
-
props: {
|
|
31
|
-
placeholder: '请输入关键词',
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
status: {
|
|
35
|
-
label: '状态',
|
|
36
|
-
value: '',
|
|
37
|
-
defaultValue: '',
|
|
38
|
-
is: 'VroElSelect',
|
|
39
|
-
options: [
|
|
40
|
-
{ label: '启用', value: 'enabled' },
|
|
41
|
-
{ label: '停用', value: 'disabled' },
|
|
42
|
-
],
|
|
43
|
-
},
|
|
44
|
-
})
|
|
45
|
-
|
|
46
|
-
const handleQuery = (value) => {
|
|
47
|
-
console.log(value)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const handleReset = () => {
|
|
51
|
-
console.log('reset')
|
|
52
|
-
}
|
|
53
|
-
</script>
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### 重置默认值
|
|
57
|
-
|
|
58
|
-
字段存在 `defaultValue` 时,点击重置会恢复为 `defaultValue`;否则会根据当前值类型重置为空字符串、空数组或空对象。
|
|
59
|
-
|
|
60
|
-
```ts
|
|
61
|
-
const schema = {
|
|
62
|
-
type: {
|
|
63
|
-
label: '类型',
|
|
64
|
-
value: 'all',
|
|
65
|
-
defaultValue: 'all',
|
|
66
|
-
is: 'VroElRadioGroup',
|
|
67
|
-
options: [
|
|
68
|
-
{ label: '全部', value: 'all' },
|
|
69
|
-
{ label: '个人', value: 'personal' },
|
|
70
|
-
{ label: '企业', value: 'company' },
|
|
71
|
-
],
|
|
72
|
-
},
|
|
73
|
-
}
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### 自定义按钮区域
|
|
77
|
-
|
|
78
|
-
默认插槽会追加到搜索、重置按钮后面。
|
|
79
|
-
|
|
80
|
-
```html
|
|
81
|
-
<vro-el-schema-filter :schema="schema">
|
|
82
|
-
<el-button>导出</el-button>
|
|
83
|
-
</vro-el-schema-filter>
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
## API
|
|
87
|
-
|
|
88
|
-
### 属性 Props
|
|
89
|
-
|
|
90
|
-
<table>
|
|
91
|
-
<tbody>
|
|
92
|
-
<tr>
|
|
93
|
-
<td>名称</td>
|
|
94
|
-
<td>类型</td>
|
|
95
|
-
<td>默认值</td>
|
|
96
|
-
</tr>
|
|
97
|
-
<tr v-for="(item, key) in vroElSchemaFilterProps" :key="key">
|
|
98
|
-
<td>{{ key }}</td>
|
|
99
|
-
<td>{{ parseType(item.type || item) }}</td>
|
|
100
|
-
<td>{{ reserve(item.default, '-') }}</td>
|
|
101
|
-
</tr>
|
|
102
|
-
</tbody>
|
|
103
|
-
</table>
|
|
104
|
-
|
|
105
|
-
### 插槽 Slots
|
|
106
|
-
|
|
107
|
-
<table>
|
|
108
|
-
<tbody>
|
|
109
|
-
<tr>
|
|
110
|
-
<td>名称</td>
|
|
111
|
-
<td>说明</td>
|
|
112
|
-
</tr>
|
|
113
|
-
<tr>
|
|
114
|
-
<td>default</td>
|
|
115
|
-
<td>搜索、重置按钮后的自定义内容</td>
|
|
116
|
-
</tr>
|
|
117
|
-
</tbody>
|
|
118
|
-
</table>
|
|
119
|
-
|
|
120
|
-
### 事件 Events
|
|
121
|
-
|
|
122
|
-
<table>
|
|
123
|
-
<tbody>
|
|
124
|
-
<tr>
|
|
125
|
-
<td>名称</td>
|
|
126
|
-
<td>参数</td>
|
|
127
|
-
<td>说明</td>
|
|
128
|
-
</tr>
|
|
129
|
-
<tr>
|
|
130
|
-
<td>query</td>
|
|
131
|
-
<td>value</td>
|
|
132
|
-
<td>点击搜索或回车查询时触发,参数为过滤空值后的表单值</td>
|
|
133
|
-
</tr>
|
|
134
|
-
<tr>
|
|
135
|
-
<td>reset</td>
|
|
136
|
-
<td>-</td>
|
|
137
|
-
<td>点击重置时触发</td>
|
|
138
|
-
</tr>
|
|
139
|
-
</tbody>
|
|
140
|
-
</table>
|
|
141
|
-
|
|
142
|
-
<script setup lang="ts">
|
|
143
|
-
import { reserve } from '@daysnap/utils'
|
|
144
|
-
import { VroElSchemaFilter, vroElSchemaFilterProps } from '.'
|
|
145
|
-
import { parseType } from '../utils'
|
|
146
|
-
</script>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { withInstall } from '@vrojs/base'
|
|
2
|
-
|
|
3
|
-
import Component from './vro-el-schema-filter.vue'
|
|
4
|
-
|
|
5
|
-
export * from './types'
|
|
6
|
-
|
|
7
|
-
export const VroElSchemaFilter = withInstall<typeof Component>(Component)
|
|
8
|
-
export default VroElSchemaFilter
|
|
9
|
-
|
|
10
|
-
export type VroElSchemaFilterInstance = InstanceType<typeof VroElSchemaFilter>
|
|
11
|
-
|
|
12
|
-
declare module 'vue' {
|
|
13
|
-
export interface GlobalComponents {
|
|
14
|
-
VroElSchemaFilter: typeof VroElSchemaFilter
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
.vro-el-schema-filter {
|
|
2
|
-
display: block;
|
|
3
|
-
box-sizing: border-box;
|
|
4
|
-
overflow: hidden;
|
|
5
|
-
padding: 0 16px 16px;
|
|
6
|
-
background-color: var(--el-bg-color);
|
|
7
|
-
.el-form-item__label {
|
|
8
|
-
display: flex;
|
|
9
|
-
align-items: center;
|
|
10
|
-
text-align: right;
|
|
11
|
-
line-height: 1.1;
|
|
12
|
-
margin-bottom: 0;
|
|
13
|
-
}
|
|
14
|
-
.el-form-item {
|
|
15
|
-
margin-bottom: 0;
|
|
16
|
-
}
|
|
17
|
-
.el-col {
|
|
18
|
-
margin-top: 16px;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { ColProps } from 'element-plus'
|
|
2
|
-
import type { ExtractPropTypes, PropType } from 'vue'
|
|
3
|
-
|
|
4
|
-
import { vroElSchemaFormProps } from '../vro-el-schema-form'
|
|
5
|
-
|
|
6
|
-
export const vroElSchemaFilterProps = {
|
|
7
|
-
...vroElSchemaFormProps,
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* 筛选项默认栅格配置。
|
|
11
|
-
*/
|
|
12
|
-
colProps: {
|
|
13
|
-
type: Object as PropType<Partial<ColProps>>,
|
|
14
|
-
default: () => ({ span: 8 }),
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* 表单标签宽度,透传给内部 VroElSchemaForm。
|
|
19
|
-
*/
|
|
20
|
-
labelWidth: {
|
|
21
|
-
type: [String, Number] as PropType<string | number>,
|
|
22
|
-
default: '120px',
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* 查询和重置按钮 loading 状态。
|
|
27
|
-
*/
|
|
28
|
-
loading: Boolean,
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export type VroElSchemaFilterProps = ExtractPropTypes<typeof vroElSchemaFilterProps>
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<vro-el-schema-form
|
|
3
|
-
v-bind="props"
|
|
4
|
-
ref="refVroElSchemaForm"
|
|
5
|
-
class="vro-el-schema-filter"
|
|
6
|
-
@submit.prevent
|
|
7
|
-
@keyup.enter="handleQuery"
|
|
8
|
-
>
|
|
9
|
-
<el-col v-bind="colProps">
|
|
10
|
-
<el-form-item v-bind="formItemProps">
|
|
11
|
-
<el-button type="primary" :icon="Search" :loading="loading" @click="handleQuery">
|
|
12
|
-
{{ t('schemaFilter.searchText') }}
|
|
13
|
-
</el-button>
|
|
14
|
-
<el-button :icon="RefreshRight" :loading="loading" @click="handleReset">
|
|
15
|
-
{{ t('schemaFilter.resetText') }}
|
|
16
|
-
</el-button>
|
|
17
|
-
<slot></slot>
|
|
18
|
-
</el-form-item>
|
|
19
|
-
</el-col>
|
|
20
|
-
</vro-el-schema-form>
|
|
21
|
-
</template>
|
|
22
|
-
|
|
23
|
-
<script setup lang="ts">
|
|
24
|
-
import { filterEmptyValue, isArray, isFunction, isObject, isUndefined } from '@daysnap/utils'
|
|
25
|
-
import { RefreshRight, Search } from '@element-plus/icons-vue'
|
|
26
|
-
import { ElButton, ElCol, ElFormItem } from 'element-plus'
|
|
27
|
-
import { useTemplateRef } from 'vue'
|
|
28
|
-
|
|
29
|
-
import { useLocale } from '../locale'
|
|
30
|
-
import { VroElSchemaForm } from '../vro-el-schema-form'
|
|
31
|
-
import { vroElSchemaFilterProps } from './types'
|
|
32
|
-
|
|
33
|
-
defineOptions({ name: 'VroElSchemaFilter' })
|
|
34
|
-
|
|
35
|
-
const emit = defineEmits(['query', 'reset'])
|
|
36
|
-
const props = defineProps(vroElSchemaFilterProps)
|
|
37
|
-
const { t } = useLocale()
|
|
38
|
-
|
|
39
|
-
const refVroElSchemaForm = useTemplateRef('refVroElSchemaForm')
|
|
40
|
-
|
|
41
|
-
const handleQuery = async () => {
|
|
42
|
-
const data = (await refVroElSchemaForm.value?.extractValues()) ?? {}
|
|
43
|
-
emit('query', filterEmptyValue(data, true))
|
|
44
|
-
}
|
|
45
|
-
const handleReset = () => {
|
|
46
|
-
Object.values(props.schema).forEach((filed) => {
|
|
47
|
-
// eslint-disable-next-line prefer-const
|
|
48
|
-
let { value, resetValue } = filed
|
|
49
|
-
if (!isUndefined(resetValue)) {
|
|
50
|
-
value = isFunction(resetValue) ? resetValue(value) : resetValue
|
|
51
|
-
} else if (isArray(value)) {
|
|
52
|
-
value = []
|
|
53
|
-
} else if (isObject(value)) {
|
|
54
|
-
value = {}
|
|
55
|
-
} else {
|
|
56
|
-
value = ''
|
|
57
|
-
}
|
|
58
|
-
filed.value = value
|
|
59
|
-
})
|
|
60
|
-
refVroElSchemaForm.value?.resetFields()
|
|
61
|
-
emit('reset')
|
|
62
|
-
handleQuery()
|
|
63
|
-
}
|
|
64
|
-
</script>
|