@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,18 +0,0 @@
|
|
|
1
|
-
import { selectProps } from 'element-plus'
|
|
2
|
-
import type { ExtractPropTypes, PropType } from 'vue'
|
|
3
|
-
|
|
4
|
-
export const vroElSelectProps = {
|
|
5
|
-
...selectProps,
|
|
6
|
-
|
|
7
|
-
options: Array as PropType<any[]>,
|
|
8
|
-
labelKey: {
|
|
9
|
-
type: String,
|
|
10
|
-
default: 'label',
|
|
11
|
-
},
|
|
12
|
-
valueKey: {
|
|
13
|
-
type: String,
|
|
14
|
-
default: 'value',
|
|
15
|
-
},
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export type VroElSelectProps = ExtractPropTypes<typeof vroElSelectProps>
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-select
|
|
3
|
-
v-bind="restProps"
|
|
4
|
-
class="vro-el-select"
|
|
5
|
-
@update:model-value="$emit('update:modelValue', $event)"
|
|
6
|
-
@change="$emit('change', $event)"
|
|
7
|
-
>
|
|
8
|
-
<el-option
|
|
9
|
-
v-for="(option, index) in options"
|
|
10
|
-
v-bind="option.props"
|
|
11
|
-
:key="index"
|
|
12
|
-
:label="option[labelKey || 'label'] ?? option"
|
|
13
|
-
:value="option[valueKey || 'value'] ?? option"
|
|
14
|
-
/>
|
|
15
|
-
</el-select>
|
|
16
|
-
</template>
|
|
17
|
-
|
|
18
|
-
<script setup lang="ts">
|
|
19
|
-
import { pick } from '@daysnap/utils'
|
|
20
|
-
import { ElOption, ElSelect, selectProps } from 'element-plus'
|
|
21
|
-
import { computed } from 'vue'
|
|
22
|
-
|
|
23
|
-
import { vroElSelectProps } from './types'
|
|
24
|
-
|
|
25
|
-
defineOptions({ name: 'VroElSelect' })
|
|
26
|
-
|
|
27
|
-
defineEmits(['update:modelValue', 'change'])
|
|
28
|
-
const props = defineProps(vroElSelectProps)
|
|
29
|
-
|
|
30
|
-
const restProps = computed(() => {
|
|
31
|
-
return pick(props, Object.keys(selectProps) as any[])
|
|
32
|
-
})
|
|
33
|
-
</script>
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
# VroElSkeleton
|
|
2
|
-
|
|
3
|
-
### 介绍
|
|
4
|
-
|
|
5
|
-
用于统一处理内容区域的加载、错误和空状态。`loading` 时显示 `VroLoading` 加载指示器,`error` 时显示错误结果,`empty` 时显示空状态,其余情况渲染默认内容。
|
|
6
|
-
|
|
7
|
-
## 代码演示
|
|
8
|
-
|
|
9
|
-
### 基础用法
|
|
10
|
-
|
|
11
|
-
```html
|
|
12
|
-
<vro-el-skeleton :loading="loading" :error="error" :empty="empty" @refresh="refresh">
|
|
13
|
-
<div>内容</div>
|
|
14
|
-
</vro-el-skeleton>
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
### 自定义状态内容
|
|
18
|
-
|
|
19
|
-
```html
|
|
20
|
-
<vro-el-skeleton :error="error">
|
|
21
|
-
<template #error="{ refresh }">
|
|
22
|
-
<el-result icon="warning" title="加载失败">
|
|
23
|
-
<template #extra>
|
|
24
|
-
<el-button type="primary" @click="refresh">重试</el-button>
|
|
25
|
-
</template>
|
|
26
|
-
</el-result>
|
|
27
|
-
</template>
|
|
28
|
-
</vro-el-skeleton>
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
### 加载样式
|
|
32
|
-
|
|
33
|
-
```html
|
|
34
|
-
<vro-el-skeleton loading loading-type="spinner" :loading-size="40" loading-color="#409eff" />
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### 国际化文案
|
|
38
|
-
|
|
39
|
-
默认文案通过 `VroElConfigProvider` 的 `locale` 配置,也可以通过组件属性覆盖。
|
|
40
|
-
|
|
41
|
-
```html
|
|
42
|
-
<vro-el-config-provider :locale="locale">
|
|
43
|
-
<vro-el-skeleton empty />
|
|
44
|
-
</vro-el-config-provider>
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
```ts
|
|
48
|
-
const locale = {
|
|
49
|
-
el: {
|
|
50
|
-
skeleton: {
|
|
51
|
-
emptyDescription: 'No data',
|
|
52
|
-
emptyBtnText: 'Reload',
|
|
53
|
-
errorTitle: 'Something went wrong',
|
|
54
|
-
errorBtnText: 'Retry',
|
|
55
|
-
loadingDescription: 'Loading...',
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
}
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
## API
|
|
62
|
-
|
|
63
|
-
### 属性 Props
|
|
64
|
-
|
|
65
|
-
<table>
|
|
66
|
-
<tbody>
|
|
67
|
-
<tr>
|
|
68
|
-
<td>名称</td>
|
|
69
|
-
<td>类型</td>
|
|
70
|
-
<td>默认值</td>
|
|
71
|
-
</tr>
|
|
72
|
-
<tr v-for="(item, key) in vroElSkeletonProps" :key="key">
|
|
73
|
-
<td>{{ key }}</td>
|
|
74
|
-
<td>{{ parseType(item.type || item) }}</td>
|
|
75
|
-
<td>{{ reserve(item.default, '-') }}</td>
|
|
76
|
-
</tr>
|
|
77
|
-
</tbody>
|
|
78
|
-
</table>
|
|
79
|
-
|
|
80
|
-
### 插槽 Slots
|
|
81
|
-
|
|
82
|
-
<table>
|
|
83
|
-
<tbody>
|
|
84
|
-
<tr>
|
|
85
|
-
<td>名称</td>
|
|
86
|
-
<td>说明</td>
|
|
87
|
-
</tr>
|
|
88
|
-
<tr>
|
|
89
|
-
<td>default</td>
|
|
90
|
-
<td>正常内容</td>
|
|
91
|
-
</tr>
|
|
92
|
-
<tr>
|
|
93
|
-
<td>loading</td>
|
|
94
|
-
<td>自定义加载状态内容</td>
|
|
95
|
-
</tr>
|
|
96
|
-
<tr>
|
|
97
|
-
<td>error</td>
|
|
98
|
-
<td>自定义错误状态内容,参数为 { error, refresh }</td>
|
|
99
|
-
</tr>
|
|
100
|
-
<tr>
|
|
101
|
-
<td>empty</td>
|
|
102
|
-
<td>自定义空状态内容,参数为 { refresh }</td>
|
|
103
|
-
</tr>
|
|
104
|
-
</tbody>
|
|
105
|
-
</table>
|
|
106
|
-
|
|
107
|
-
### 事件 Events
|
|
108
|
-
|
|
109
|
-
<table>
|
|
110
|
-
<tbody>
|
|
111
|
-
<tr>
|
|
112
|
-
<td>名称</td>
|
|
113
|
-
<td>参数</td>
|
|
114
|
-
<td>说明</td>
|
|
115
|
-
</tr>
|
|
116
|
-
<tr>
|
|
117
|
-
<td>refresh</td>
|
|
118
|
-
<td>-</td>
|
|
119
|
-
<td>点击默认错误或空状态按钮时触发</td>
|
|
120
|
-
</tr>
|
|
121
|
-
</tbody>
|
|
122
|
-
</table>
|
|
123
|
-
|
|
124
|
-
<script setup lang="ts">
|
|
125
|
-
import { reserve } from '@daysnap/utils'
|
|
126
|
-
import { VroElSkeleton, vroElSkeletonProps } from '.'
|
|
127
|
-
import { parseType } from '../utils'
|
|
128
|
-
</script>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { withInstall } from '@vrojs/base'
|
|
2
|
-
|
|
3
|
-
import Component from './vro-el-skeleton.vue'
|
|
4
|
-
|
|
5
|
-
export * from './types'
|
|
6
|
-
|
|
7
|
-
export const VroElSkeleton = withInstall<typeof Component>(Component)
|
|
8
|
-
export default VroElSkeleton
|
|
9
|
-
|
|
10
|
-
export type VroElSkeletonInstance = InstanceType<typeof VroElSkeleton>
|
|
11
|
-
|
|
12
|
-
declare module 'vue' {
|
|
13
|
-
export interface GlobalComponents {
|
|
14
|
-
VroElSkeleton: typeof VroElSkeleton
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
.vro-el-skeleton {
|
|
2
|
-
width: 100%;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.vro-el-skeleton__state {
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
justify-content: center;
|
|
9
|
-
width: 100%;
|
|
10
|
-
min-height: inherit;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.vro-el-skeleton__loading {
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
color: var(--el-text-color-secondary);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.vro-el-skeleton__description {
|
|
19
|
-
margin: 16px 0 0;
|
|
20
|
-
color: var(--el-text-color-secondary);
|
|
21
|
-
font-size: var(--el-font-size-base);
|
|
22
|
-
line-height: 1.5;
|
|
23
|
-
text-align: center;
|
|
24
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="vro-el-skeleton" :style="rootStyle">
|
|
3
|
-
<template v-if="loading">
|
|
4
|
-
<slot name="loading">
|
|
5
|
-
<div class="vro-el-skeleton__state vro-el-skeleton__loading">
|
|
6
|
-
<vro-loading :type="loadingType" :size="loadingSize" :color="loadingColor" />
|
|
7
|
-
<p class="vro-el-skeleton__description">
|
|
8
|
-
{{ loadingDescription ?? t('skeleton.loadingDescription') }}
|
|
9
|
-
</p>
|
|
10
|
-
</div>
|
|
11
|
-
</slot>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<template v-else-if="error">
|
|
15
|
-
<slot name="error" :error="error" :refresh="handleRefresh">
|
|
16
|
-
<div class="vro-el-skeleton__state">
|
|
17
|
-
<el-result
|
|
18
|
-
icon="error"
|
|
19
|
-
:title="errorTitle ?? t('skeleton.errorTitle')"
|
|
20
|
-
:sub-title="formatMessage(error)"
|
|
21
|
-
>
|
|
22
|
-
<template #extra>
|
|
23
|
-
<el-button type="primary" @click="handleRefresh">
|
|
24
|
-
{{ errorBtnText ?? t('skeleton.errorBtnText') }}
|
|
25
|
-
</el-button>
|
|
26
|
-
</template>
|
|
27
|
-
</el-result>
|
|
28
|
-
</div>
|
|
29
|
-
</slot>
|
|
30
|
-
</template>
|
|
31
|
-
|
|
32
|
-
<template v-else-if="empty">
|
|
33
|
-
<slot name="empty" :refresh="handleRefresh">
|
|
34
|
-
<div class="vro-el-skeleton__state">
|
|
35
|
-
<el-empty :description="emptyDescription ?? t('skeleton.emptyDescription')">
|
|
36
|
-
<el-button v-if="showEmptyBtn" type="primary" @click="handleRefresh">
|
|
37
|
-
{{ emptyBtnText ?? t('skeleton.emptyBtnText') }}
|
|
38
|
-
</el-button>
|
|
39
|
-
</el-empty>
|
|
40
|
-
</div>
|
|
41
|
-
</slot>
|
|
42
|
-
</template>
|
|
43
|
-
|
|
44
|
-
<slot v-else></slot>
|
|
45
|
-
</div>
|
|
46
|
-
</template>
|
|
47
|
-
|
|
48
|
-
<script setup lang="ts">
|
|
49
|
-
import { formatMessage } from '@daysnap/utils'
|
|
50
|
-
import { VroLoading } from '@vrojs/base'
|
|
51
|
-
import { ElButton, ElEmpty, ElResult } from 'element-plus'
|
|
52
|
-
import { computed } from 'vue'
|
|
53
|
-
|
|
54
|
-
import { useLocale } from '../locale'
|
|
55
|
-
import { vroElSkeletonProps } from './types'
|
|
56
|
-
|
|
57
|
-
const emit = defineEmits<{
|
|
58
|
-
(event: 'refresh'): void
|
|
59
|
-
}>()
|
|
60
|
-
|
|
61
|
-
defineOptions({ name: 'VroElSkeleton' })
|
|
62
|
-
|
|
63
|
-
const props = defineProps(vroElSkeletonProps)
|
|
64
|
-
const { t } = useLocale()
|
|
65
|
-
|
|
66
|
-
const rootStyle = computed(() => ({
|
|
67
|
-
minHeight: typeof props.minHeight === 'number' ? `${props.minHeight}px` : props.minHeight,
|
|
68
|
-
}))
|
|
69
|
-
|
|
70
|
-
const handleRefresh = () => {
|
|
71
|
-
emit('refresh')
|
|
72
|
-
}
|
|
73
|
-
</script>
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
# VroElTags
|
|
2
|
-
|
|
3
|
-
### 介绍
|
|
4
|
-
|
|
5
|
-
基于 `ElTag`、`ElInput` 和 `ElButton` 的标签编辑组件。支持通过 `v-model` 新增、删除标签,也可以设置为只读禁用状态。
|
|
6
|
-
|
|
7
|
-
## 代码演示
|
|
8
|
-
|
|
9
|
-
### 基础用法
|
|
10
|
-
|
|
11
|
-
```html
|
|
12
|
-
<template>
|
|
13
|
-
<vro-el-tags v-model="value" />
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script setup lang="ts">
|
|
17
|
-
import { ref } from 'vue'
|
|
18
|
-
|
|
19
|
-
const value = ref(['Vue', 'Element Plus'])
|
|
20
|
-
</script>
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
### 禁用状态
|
|
24
|
-
|
|
25
|
-
```html
|
|
26
|
-
<vro-el-tags v-model="value" disabled />
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## API
|
|
30
|
-
|
|
31
|
-
### 属性 Props
|
|
32
|
-
|
|
33
|
-
<table>
|
|
34
|
-
<tbody>
|
|
35
|
-
<tr>
|
|
36
|
-
<td>名称</td>
|
|
37
|
-
<td>类型</td>
|
|
38
|
-
<td>默认值</td>
|
|
39
|
-
</tr>
|
|
40
|
-
<tr v-for="(item, key) in vroElTagsProps" :key="key">
|
|
41
|
-
<td>{{ key }}</td>
|
|
42
|
-
<td>{{ parseType(item.type || item) }}</td>
|
|
43
|
-
<td>{{ reserve(item.default, '-') }}</td>
|
|
44
|
-
</tr>
|
|
45
|
-
</tbody>
|
|
46
|
-
</table>
|
|
47
|
-
|
|
48
|
-
### 插槽 Slots
|
|
49
|
-
|
|
50
|
-
暂无。
|
|
51
|
-
|
|
52
|
-
### 事件 Events
|
|
53
|
-
|
|
54
|
-
<table>
|
|
55
|
-
<tbody>
|
|
56
|
-
<tr>
|
|
57
|
-
<td>名称</td>
|
|
58
|
-
<td>参数</td>
|
|
59
|
-
<td>说明</td>
|
|
60
|
-
</tr>
|
|
61
|
-
<tr>
|
|
62
|
-
<td>update:modelValue</td>
|
|
63
|
-
<td>value</td>
|
|
64
|
-
<td>标签列表变化时触发</td>
|
|
65
|
-
</tr>
|
|
66
|
-
</tbody>
|
|
67
|
-
</table>
|
|
68
|
-
|
|
69
|
-
<script setup lang="ts">
|
|
70
|
-
import { reserve } from '@daysnap/utils'
|
|
71
|
-
import { VroElTags, vroElTagsProps } from '.'
|
|
72
|
-
import { parseType } from '../utils'
|
|
73
|
-
</script>
|
package/src/vro-el-tags/index.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { withInstall } from '@vrojs/base'
|
|
2
|
-
|
|
3
|
-
import Component from './vro-el-tags.vue'
|
|
4
|
-
|
|
5
|
-
export * from './types'
|
|
6
|
-
|
|
7
|
-
export const VroElTags = withInstall<typeof Component>(Component)
|
|
8
|
-
export default VroElTags
|
|
9
|
-
|
|
10
|
-
export type VroElTagsInstance = InstanceType<typeof VroElTags>
|
|
11
|
-
|
|
12
|
-
declare module 'vue' {
|
|
13
|
-
export interface GlobalComponents {
|
|
14
|
-
VroElTags: typeof VroElTags
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.vro-el-tags { }
|
package/src/vro-el-tags/types.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { ExtractPropTypes, PropType } from 'vue'
|
|
2
|
-
|
|
3
|
-
export const vroElTagsProps = {
|
|
4
|
-
/**
|
|
5
|
-
* 标签列表。
|
|
6
|
-
*/
|
|
7
|
-
modelValue: {
|
|
8
|
-
type: Array as PropType<string[]>,
|
|
9
|
-
default: () => [],
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* 是否禁用新增和删除标签。
|
|
14
|
-
*/
|
|
15
|
-
disabled: {
|
|
16
|
-
type: Boolean,
|
|
17
|
-
default: false,
|
|
18
|
-
},
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export type VroElTagsProps = ExtractPropTypes<typeof vroElTagsProps>
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="vro-el-tags">
|
|
3
|
-
<el-tag
|
|
4
|
-
v-for="(item, index) in modelValue"
|
|
5
|
-
:key="`${item}-${index}`"
|
|
6
|
-
class="vro-el-tag"
|
|
7
|
-
size="large"
|
|
8
|
-
:closable="!disabled"
|
|
9
|
-
:disable-transitions="false"
|
|
10
|
-
@close="handleClose(index)"
|
|
11
|
-
>
|
|
12
|
-
{{ item }}
|
|
13
|
-
</el-tag>
|
|
14
|
-
|
|
15
|
-
<el-input
|
|
16
|
-
v-if="inputVisible"
|
|
17
|
-
ref="inputRef"
|
|
18
|
-
v-model="inputValue"
|
|
19
|
-
class="vro-el-tag-input"
|
|
20
|
-
@keyup.enter="handleInputConfirm"
|
|
21
|
-
@blur="handleInputConfirm"
|
|
22
|
-
/>
|
|
23
|
-
<el-button v-else-if="!disabled" class="vro-el-tag-btn" :icon="Plus" @click="showInput">
|
|
24
|
-
{{ t('tags.addText') }}
|
|
25
|
-
</el-button>
|
|
26
|
-
</div>
|
|
27
|
-
</template>
|
|
28
|
-
|
|
29
|
-
<script setup lang="ts">
|
|
30
|
-
import { Plus } from '@element-plus/icons-vue'
|
|
31
|
-
import { ElButton, ElInput, ElTag } from 'element-plus'
|
|
32
|
-
import { nextTick, ref } from 'vue'
|
|
33
|
-
|
|
34
|
-
import { useLocale } from '../locale'
|
|
35
|
-
import { vroElTagsProps } from './types'
|
|
36
|
-
|
|
37
|
-
defineOptions({ name: 'VroElTags' })
|
|
38
|
-
|
|
39
|
-
const emit = defineEmits(['update:modelValue'])
|
|
40
|
-
const props = defineProps(vroElTagsProps)
|
|
41
|
-
const { t } = useLocale()
|
|
42
|
-
|
|
43
|
-
const inputValue = ref('')
|
|
44
|
-
const inputVisible = ref(false)
|
|
45
|
-
const inputRef = ref<InstanceType<typeof ElInput>>()
|
|
46
|
-
|
|
47
|
-
const handleClose = (index: number) => {
|
|
48
|
-
const value = props.modelValue.filter((_, valueIndex) => valueIndex !== index)
|
|
49
|
-
emit('update:modelValue', value)
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const showInput = () => {
|
|
53
|
-
inputVisible.value = true
|
|
54
|
-
nextTick(() => {
|
|
55
|
-
inputRef.value?.input?.focus()
|
|
56
|
-
})
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
const handleInputConfirm = () => {
|
|
60
|
-
const value = [...props.modelValue]
|
|
61
|
-
const tag = inputValue.value.trim()
|
|
62
|
-
if (tag) {
|
|
63
|
-
value.push(tag)
|
|
64
|
-
}
|
|
65
|
-
emit('update:modelValue', value)
|
|
66
|
-
inputVisible.value = false
|
|
67
|
-
inputValue.value = ''
|
|
68
|
-
}
|
|
69
|
-
</script>
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
# VroElTree
|
|
2
|
-
|
|
3
|
-
### 介绍
|
|
4
|
-
|
|
5
|
-
基于 `ElTree` 的受控勾选封装。组件会把全选节点和半选节点一起同步到 `v-model`,适合权限树这类需要保存父子勾选链路的场景。
|
|
6
|
-
|
|
7
|
-
## 代码演示
|
|
8
|
-
|
|
9
|
-
### 基础用法
|
|
10
|
-
|
|
11
|
-
```html
|
|
12
|
-
<template>
|
|
13
|
-
<vro-el-tree
|
|
14
|
-
v-model="value"
|
|
15
|
-
show-checkbox
|
|
16
|
-
node-key="id"
|
|
17
|
-
default-expand-all
|
|
18
|
-
:options="options"
|
|
19
|
-
:props="{ label: 'label' }"
|
|
20
|
-
/>
|
|
21
|
-
</template>
|
|
22
|
-
|
|
23
|
-
<script setup lang="ts">
|
|
24
|
-
import { ref } from 'vue'
|
|
25
|
-
|
|
26
|
-
const value = ref(['system'])
|
|
27
|
-
const options = [
|
|
28
|
-
{
|
|
29
|
-
id: 'system',
|
|
30
|
-
parentId: '-1',
|
|
31
|
-
label: '系统管理',
|
|
32
|
-
children: [
|
|
33
|
-
{ id: 'user', parentId: 'system', label: '用户管理' },
|
|
34
|
-
{ id: 'role', parentId: 'system', label: '角色管理' },
|
|
35
|
-
],
|
|
36
|
-
},
|
|
37
|
-
]
|
|
38
|
-
</script>
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## API
|
|
42
|
-
|
|
43
|
-
### 属性 Props
|
|
44
|
-
|
|
45
|
-
<table>
|
|
46
|
-
<tbody>
|
|
47
|
-
<tr>
|
|
48
|
-
<td>名称</td>
|
|
49
|
-
<td>类型</td>
|
|
50
|
-
<td>默认值</td>
|
|
51
|
-
</tr>
|
|
52
|
-
<tr v-for="(item, key) in vroElTreeProps" :key="key">
|
|
53
|
-
<td>{{ key }}</td>
|
|
54
|
-
<td>{{ parseType(item.type || item) }}</td>
|
|
55
|
-
<td>{{ reserve(item.default, '-') }}</td>
|
|
56
|
-
</tr>
|
|
57
|
-
</tbody>
|
|
58
|
-
</table>
|
|
59
|
-
|
|
60
|
-
### 插槽 Slots
|
|
61
|
-
|
|
62
|
-
支持默认插槽,插槽参数同 `ElTree` 默认插槽。
|
|
63
|
-
|
|
64
|
-
### 事件 Events
|
|
65
|
-
|
|
66
|
-
<table>
|
|
67
|
-
<tbody>
|
|
68
|
-
<tr>
|
|
69
|
-
<td>名称</td>
|
|
70
|
-
<td>参数</td>
|
|
71
|
-
<td>说明</td>
|
|
72
|
-
</tr>
|
|
73
|
-
<tr>
|
|
74
|
-
<td>update:modelValue</td>
|
|
75
|
-
<td>value</td>
|
|
76
|
-
<td>勾选节点变化时触发,返回半选和全选节点 id</td>
|
|
77
|
-
</tr>
|
|
78
|
-
</tbody>
|
|
79
|
-
</table>
|
|
80
|
-
|
|
81
|
-
<script setup lang="ts">
|
|
82
|
-
import { reserve } from '@daysnap/utils'
|
|
83
|
-
import { VroElTree, vroElTreeProps } from '.'
|
|
84
|
-
import { parseType } from '../utils'
|
|
85
|
-
</script>
|
package/src/vro-el-tree/index.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { withInstall } from '@vrojs/base'
|
|
2
|
-
|
|
3
|
-
import Component from './vro-el-tree.vue'
|
|
4
|
-
|
|
5
|
-
export * from './types'
|
|
6
|
-
|
|
7
|
-
export const VroElTree = withInstall<typeof Component>(Component)
|
|
8
|
-
export default VroElTree
|
|
9
|
-
|
|
10
|
-
export type VroElTreeInstance = InstanceType<typeof VroElTree>
|
|
11
|
-
|
|
12
|
-
declare module 'vue' {
|
|
13
|
-
export interface GlobalComponents {
|
|
14
|
-
VroElTree: typeof VroElTree
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import 'element-plus/es/components/tree/style/css'
|
package/src/vro-el-tree/types.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { ExtractPropTypes, PropType } from 'vue'
|
|
2
|
-
|
|
3
|
-
export type VroElTreeKey = string | number
|
|
4
|
-
|
|
5
|
-
export interface VroElTreeOption {
|
|
6
|
-
id: VroElTreeKey
|
|
7
|
-
parentId?: VroElTreeKey
|
|
8
|
-
children?: VroElTreeOption[]
|
|
9
|
-
[key: string]: any
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export const vroElTreeProps = {
|
|
13
|
-
/**
|
|
14
|
-
* 选中的节点 id 列表,包含半选和全选节点。
|
|
15
|
-
*/
|
|
16
|
-
modelValue: {
|
|
17
|
-
type: Array as PropType<VroElTreeKey[]>,
|
|
18
|
-
default: () => [],
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* 树节点数据,节点需要包含 id,可通过 parentId 表示父级关系。
|
|
23
|
-
*/
|
|
24
|
-
options: {
|
|
25
|
-
type: Array as PropType<VroElTreeOption[]>,
|
|
26
|
-
default: () => [],
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* 根节点 id,用于判断顶层节点的选中链路。
|
|
31
|
-
*/
|
|
32
|
-
rootId: {
|
|
33
|
-
type: [String, Number],
|
|
34
|
-
default: '-1',
|
|
35
|
-
},
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export type VroElTreeProps = ExtractPropTypes<typeof vroElTreeProps>
|