@vrojs/element-plus 0.0.1 → 0.0.3
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 +16 -0
- package/dist/index.js +88 -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.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-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 +4 -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 +8 -0
- package/dist/vro-el-image-upload/types.d.ts +38 -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 +42 -0
- package/dist/vro-el-image-upload/vro-el-image-upload.vue.js +126 -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 +596 -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 +16 -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 +38 -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 +983 -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 +563 -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 +14 -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 +36 -0
- package/dist/vro-el-schema-form/types.d.ts +114 -0
- package/dist/vro-el-schema-form/types.js +42 -0
- package/dist/vro-el-schema-form/useVroElSchemaForm.d.ts +908 -0
- package/dist/vro-el-schema-form/useVroElSchemaForm.js +31 -0
- package/dist/vro-el-schema-form/vro-el-schema-form.vue.d.ts +391 -0
- package/dist/vro-el-schema-form/vro-el-schema-form.vue.js +120 -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 +2182 -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 +18 -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 +42 -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 +1794 -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 -13
- package/src/locale/index.ts +0 -3
- package/src/locale/lang/zh-cn.ts +0 -22
- 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 -9
- package/src/style/index.scss +0 -12
- 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-schema-form-dialog/README.md +0 -64
- package/src/vro-el-schema-form-dialog/function-call.ts +0 -12
- package/src/vro-el-schema-form-dialog/index.ts +0 -17
- package/src/vro-el-schema-form-dialog/style/css.ts +0 -2
- package/src/vro-el-schema-form-dialog/style/index.scss +0 -1
- package/src/vro-el-schema-form-dialog/style/index.ts +0 -2
- package/src/vro-el-schema-form-dialog/types.ts +0 -5
- package/src/vro-el-schema-form-dialog/vro-el-schema-form-dialog.vue +0 -32
- 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-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-schema-form-dialog/style/deps.ts → dist/style/deps.d.ts} +0 -0
- /package/{src/vro-el-with-config/style/index.scss → dist/style/index.d.ts} +0 -0
|
@@ -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,75 +0,0 @@
|
|
|
1
|
-
# VroElWithConfig
|
|
2
|
-
|
|
3
|
-
### 介绍
|
|
4
|
-
|
|
5
|
-
用于给局部内容或动态组件同时包裹 `ElConfigProvider` 和 `VroElConfigProvider`。传入 `is` 时会渲染对应动态组件,并将 `attrs`、插槽透传给内部组件;未传入 `is` 时直接渲染默认插槽。
|
|
6
|
-
|
|
7
|
-
## 代码演示
|
|
8
|
-
|
|
9
|
-
### 基础用法
|
|
10
|
-
|
|
11
|
-
```html
|
|
12
|
-
<vro-el-with-config :el-config-props="{ size: 'large' }">
|
|
13
|
-
<el-button>按钮</el-button>
|
|
14
|
-
</vro-el-with-config>
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
### Vro 文案配置
|
|
18
|
-
|
|
19
|
-
```html
|
|
20
|
-
<vro-el-with-config :vro-config-props="{ locale }">
|
|
21
|
-
<app />
|
|
22
|
-
</vro-el-with-config>
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
### 动态组件
|
|
26
|
-
|
|
27
|
-
```html
|
|
28
|
-
<vro-el-with-config :is="ElButton" :el-config-props="{ size: 'small' }" type="primary">
|
|
29
|
-
动态按钮
|
|
30
|
-
</vro-el-with-config>
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## API
|
|
34
|
-
|
|
35
|
-
### 属性 Props
|
|
36
|
-
|
|
37
|
-
<table>
|
|
38
|
-
<tbody>
|
|
39
|
-
<tr>
|
|
40
|
-
<td>名称</td>
|
|
41
|
-
<td>类型</td>
|
|
42
|
-
<td>默认值</td>
|
|
43
|
-
</tr>
|
|
44
|
-
<tr v-for="(item, key) in vroElWithConfigProps" :key="key">
|
|
45
|
-
<td>{{ key }}</td>
|
|
46
|
-
<td>{{ parseType(item.type || item) }}</td>
|
|
47
|
-
<td>{{ reserve(item.default, '-') }}</td>
|
|
48
|
-
</tr>
|
|
49
|
-
</tbody>
|
|
50
|
-
</table>
|
|
51
|
-
|
|
52
|
-
### 插槽 Slots
|
|
53
|
-
|
|
54
|
-
<table>
|
|
55
|
-
<tbody>
|
|
56
|
-
<tr>
|
|
57
|
-
<td>名称</td>
|
|
58
|
-
<td>说明</td>
|
|
59
|
-
</tr>
|
|
60
|
-
<tr>
|
|
61
|
-
<td>default</td>
|
|
62
|
-
<td>默认内容;传入 is 时会透传给动态组件</td>
|
|
63
|
-
</tr>
|
|
64
|
-
</tbody>
|
|
65
|
-
</table>
|
|
66
|
-
|
|
67
|
-
### 实例代理
|
|
68
|
-
|
|
69
|
-
传入 `is` 时,组件实例会代理内部动态组件暴露的方法和属性。
|
|
70
|
-
|
|
71
|
-
<script setup lang="ts">
|
|
72
|
-
import { reserve } from '@daysnap/utils'
|
|
73
|
-
import { VroElWithConfig, vroElWithConfigProps } from '.'
|
|
74
|
-
import { parseType } from '../utils'
|
|
75
|
-
</script>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { withInstall } from '@vrojs/base'
|
|
2
|
-
|
|
3
|
-
import Component from './vro-el-with-config.vue'
|
|
4
|
-
|
|
5
|
-
export * from './types'
|
|
6
|
-
|
|
7
|
-
export const VroElWithConfig = withInstall<typeof Component>(Component)
|
|
8
|
-
export default VroElWithConfig
|
|
9
|
-
|
|
10
|
-
export type VroElWithConfigInstance = InstanceType<typeof VroElWithConfig>
|
|
11
|
-
|
|
12
|
-
declare module 'vue' {
|
|
13
|
-
export interface GlobalComponents {
|
|
14
|
-
VroElWithConfig: typeof VroElWithConfig
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { ConfigProviderProps } from 'element-plus'
|
|
2
|
-
import type { Component, ExtractPropTypes, PropType } from 'vue'
|
|
3
|
-
|
|
4
|
-
import type { VroElConfigProviderProps } from '../vro-el-config-provider'
|
|
5
|
-
|
|
6
|
-
export const vroElWithConfigProps = {
|
|
7
|
-
elConfigProps: {
|
|
8
|
-
type: Object as PropType<Partial<ConfigProviderProps>>,
|
|
9
|
-
default: () => ({}),
|
|
10
|
-
},
|
|
11
|
-
vroConfigProps: {
|
|
12
|
-
type: Object as PropType<Partial<VroElConfigProviderProps>>,
|
|
13
|
-
default: () => ({}),
|
|
14
|
-
},
|
|
15
|
-
is: [String, Object] as PropType<string | Component>,
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export type VroElWithConfigProps = ExtractPropTypes<typeof vroElWithConfigProps>
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { ElConfigProvider } from 'element-plus'
|
|
3
|
-
import { h, ref, useAttrs, useSlots } from 'vue'
|
|
4
|
-
|
|
5
|
-
import { VroElConfigProvider } from '../vro-el-config-provider'
|
|
6
|
-
import { vroElWithConfigProps } from './types'
|
|
7
|
-
|
|
8
|
-
defineOptions({ name: 'VroElWithConfig' })
|
|
9
|
-
|
|
10
|
-
const props = defineProps(vroElWithConfigProps)
|
|
11
|
-
const attrs = useAttrs()
|
|
12
|
-
const slots = useSlots()
|
|
13
|
-
|
|
14
|
-
const refComponent = ref<any>()
|
|
15
|
-
|
|
16
|
-
defineExpose(
|
|
17
|
-
new Proxy(
|
|
18
|
-
{},
|
|
19
|
-
{
|
|
20
|
-
get(_target, prop) {
|
|
21
|
-
return refComponent.value?.[prop]
|
|
22
|
-
},
|
|
23
|
-
has(_target, prop) {
|
|
24
|
-
return refComponent.value ? prop in refComponent.value : false
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
),
|
|
28
|
-
)
|
|
29
|
-
|
|
30
|
-
const renderContent = () => {
|
|
31
|
-
if (props.is) {
|
|
32
|
-
return h(props.is, { ...attrs, ref: refComponent }, slots)
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
return slots.default?.()
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const renderVroConfigProvider = () =>
|
|
39
|
-
h(VroElConfigProvider, props.vroConfigProps, {
|
|
40
|
-
default: renderContent,
|
|
41
|
-
})
|
|
42
|
-
|
|
43
|
-
const Render = () => h(ElConfigProvider, props.elConfigProps, renderVroConfigProvider)
|
|
44
|
-
</script>
|
|
45
|
-
|
|
46
|
-
<template>
|
|
47
|
-
<Render />
|
|
48
|
-
</template>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|