@element-plus/nightly 0.0.20220107 → 0.0.20220108
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/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +174 -173
- package/dist/index.full.min.js +8 -8
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +8 -8
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +172 -170
- package/es/components/cascader/index.d.ts +4 -0
- package/es/components/cascader/src/index.vue.d.ts +2 -0
- package/es/components/cascader-panel/src/index.vue_vue_type_script_lang.mjs +5 -4
- package/es/components/cascader-panel/src/index.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/cascader-panel/src/index.vue_vue_type_template_id_97c48f5c_lang.mjs.map +1 -1
- package/es/components/cascader-panel/src/menu.vue.d.ts +1 -0
- package/es/components/cascader-panel/src/menu.vue_vue_type_script_lang.mjs +6 -0
- package/es/components/cascader-panel/src/menu.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/cascader-panel/src/menu.vue_vue_type_template_id_9c79e4e2_lang.mjs +19 -2
- package/es/components/cascader-panel/src/menu.vue_vue_type_template_id_9c79e4e2_lang.mjs.map +1 -1
- package/es/components/cascader-panel/src/types.d.ts +1 -0
- package/es/components/cascader-panel/src/types.mjs.map +1 -1
- package/es/components/checkbox/index.d.ts +6 -6
- package/es/components/checkbox/src/checkbox-button.vue.d.ts +2 -2
- package/es/components/checkbox/src/checkbox.vue.d.ts +2 -2
- package/es/components/config-provider/index.d.ts +6 -2
- package/es/components/config-provider/index.mjs +1 -1
- package/es/components/config-provider/src/config-provider.d.ts +13 -5
- package/es/components/config-provider/src/config-provider.mjs +12 -5
- package/es/components/config-provider/src/config-provider.mjs.map +1 -1
- package/es/components/date-picker/index.d.ts +4 -4
- package/es/components/date-picker/src/date-picker-com/basic-cell-render.mjs +1 -1
- package/es/components/date-picker/src/date-picker-com/basic-cell-render.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker.d.ts +2 -2
- package/es/components/form/index.d.ts +1 -0
- package/es/components/form/src/form.vue.d.ts +1 -0
- package/es/components/form/src/form.vue_vue_type_script_lang.mjs +14 -0
- package/es/components/form/src/form.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/form/src/form.vue_vue_type_template_id_602d6cf6_lang.mjs +1 -4
- package/es/components/form/src/form.vue_vue_type_template_id_602d6cf6_lang.mjs.map +1 -1
- package/es/components/index.mjs +1 -1
- package/es/components/input/index.d.ts +1 -0
- package/es/components/input/src/input.vue.d.ts +1 -0
- package/es/components/input/src/input.vue_vue_type_script_lang.mjs +1 -0
- package/es/components/input/src/input.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/input/src/input.vue_vue_type_template_id_3290dcb6_lang.mjs +1 -1
- package/es/components/input/src/input.vue_vue_type_template_id_3290dcb6_lang.mjs.map +1 -1
- package/es/components/input-number/index.d.ts +3 -1
- package/es/components/input-number/src/input-number.vue.d.ts +3 -1
- package/es/components/message/src/message-method.mjs +5 -1
- package/es/components/message/src/message-method.mjs.map +1 -1
- package/es/components/message/src/message.d.ts +3 -0
- package/es/components/message/src/message.mjs.map +1 -1
- package/es/components/message/src/message.vue.d.ts +2 -2
- package/es/components/notification/src/notification.vue.d.ts +4 -4
- package/es/components/popper/src/content.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/popper/src/content.vue_vue_type_template_id_611b76f0_lang.mjs +1 -0
- package/es/components/popper/src/content.vue_vue_type_template_id_611b76f0_lang.mjs.map +1 -1
- package/es/components/radio/index.d.ts +6 -6
- package/es/components/radio/src/radio-button.vue.d.ts +2 -2
- package/es/components/radio/src/radio.vue.d.ts +2 -2
- package/es/components/select/index.d.ts +1 -1
- package/es/components/select/src/select.vue.d.ts +1 -1
- package/es/components/select-v2/index.d.ts +2 -2
- package/es/components/select-v2/src/select.vue.d.ts +1 -1
- package/es/components/switch/index.d.ts +2 -2
- package/es/components/switch/src/switch.vue.d.ts +2 -2
- package/es/components/tabs/index.d.ts +4 -4
- package/es/components/tabs/src/tab-pane.vue.d.ts +2 -2
- package/es/components/time-picker/index.d.ts +4 -4
- package/es/components/time-picker/src/common/picker.vue.d.ts +2 -2
- package/es/components/time-picker/src/time-picker.d.ts +2 -2
- package/es/components/transfer/src/transfer-panel.vue.d.ts +1 -2
- package/es/components/transfer/src/transfer-panel.vue_vue_type_script_lang.mjs +2 -13
- package/es/components/transfer/src/transfer-panel.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/transfer/src/transfer-panel.vue_vue_type_template_id_1a7d1f9c_lang.mjs +5 -18
- package/es/components/transfer/src/transfer-panel.vue_vue_type_template_id_1a7d1f9c_lang.mjs.map +1 -1
- package/es/defaults.d.ts +3 -1
- package/es/hooks/index.mjs +1 -1
- package/es/hooks/use-global-config/index.d.ts +3 -1
- package/es/hooks/use-global-config/index.mjs +3 -2
- package/es/hooks/use-global-config/index.mjs.map +1 -1
- package/es/hooks/use-locale/index.d.ts +2 -253
- package/es/hooks/use-locale/index.mjs +9 -29
- package/es/hooks/use-locale/index.mjs.map +1 -1
- package/es/index.d.ts +4 -1
- package/es/index.mjs +3 -2
- package/es/index.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/cascader/index.d.ts +4 -0
- package/lib/components/cascader/src/index.vue.d.ts +2 -0
- package/lib/components/cascader-panel/src/index.vue_vue_type_script_lang.js +5 -4
- package/lib/components/cascader-panel/src/index.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/cascader-panel/src/index.vue_vue_type_template_id_97c48f5c_lang.js.map +1 -1
- package/lib/components/cascader-panel/src/menu.vue.d.ts +1 -0
- package/lib/components/cascader-panel/src/menu.vue_vue_type_script_lang.js +10 -4
- package/lib/components/cascader-panel/src/menu.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/cascader-panel/src/menu.vue_vue_type_template_id_9c79e4e2_lang.js +18 -1
- package/lib/components/cascader-panel/src/menu.vue_vue_type_template_id_9c79e4e2_lang.js.map +1 -1
- package/lib/components/cascader-panel/src/types.d.ts +1 -0
- package/lib/components/cascader-panel/src/types.js.map +1 -1
- package/lib/components/checkbox/index.d.ts +6 -6
- package/lib/components/checkbox/src/checkbox-button.vue.d.ts +2 -2
- package/lib/components/checkbox/src/checkbox.vue.d.ts +2 -2
- package/lib/components/config-provider/index.d.ts +6 -2
- package/lib/components/config-provider/index.js +1 -0
- package/lib/components/config-provider/index.js.map +1 -1
- package/lib/components/config-provider/src/config-provider.d.ts +13 -5
- package/lib/components/config-provider/src/config-provider.js +13 -5
- package/lib/components/config-provider/src/config-provider.js.map +1 -1
- package/lib/components/date-picker/index.d.ts +4 -4
- package/lib/components/date-picker/src/date-picker-com/basic-cell-render.js +1 -1
- package/lib/components/date-picker/src/date-picker-com/basic-cell-render.js.map +1 -1
- package/lib/components/date-picker/src/date-picker.d.ts +2 -2
- package/lib/components/form/index.d.ts +1 -0
- package/lib/components/form/src/form.vue.d.ts +1 -0
- package/lib/components/form/src/form.vue_vue_type_script_lang.js +14 -0
- package/lib/components/form/src/form.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/form/src/form.vue_vue_type_template_id_602d6cf6_lang.js +1 -4
- package/lib/components/form/src/form.vue_vue_type_template_id_602d6cf6_lang.js.map +1 -1
- package/lib/components/index.js +1 -0
- package/lib/components/index.js.map +1 -1
- package/lib/components/input/index.d.ts +1 -0
- package/lib/components/input/src/input.vue.d.ts +1 -0
- package/lib/components/input/src/input.vue_vue_type_script_lang.js +1 -0
- package/lib/components/input/src/input.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/input/src/input.vue_vue_type_template_id_3290dcb6_lang.js +1 -1
- package/lib/components/input/src/input.vue_vue_type_template_id_3290dcb6_lang.js.map +1 -1
- package/lib/components/input-number/index.d.ts +3 -1
- package/lib/components/input-number/src/input-number.vue.d.ts +3 -1
- package/lib/components/message/src/message-method.js +5 -1
- package/lib/components/message/src/message-method.js.map +1 -1
- package/lib/components/message/src/message.d.ts +3 -0
- package/lib/components/message/src/message.js.map +1 -1
- package/lib/components/message/src/message.vue.d.ts +2 -2
- package/lib/components/notification/src/notification.vue.d.ts +4 -4
- package/lib/components/popper/src/content.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/popper/src/content.vue_vue_type_template_id_611b76f0_lang.js +1 -0
- package/lib/components/popper/src/content.vue_vue_type_template_id_611b76f0_lang.js.map +1 -1
- package/lib/components/radio/index.d.ts +6 -6
- package/lib/components/radio/src/radio-button.vue.d.ts +2 -2
- package/lib/components/radio/src/radio.vue.d.ts +2 -2
- package/lib/components/select/index.d.ts +1 -1
- package/lib/components/select/src/select.vue.d.ts +1 -1
- package/lib/components/select-v2/index.d.ts +2 -2
- package/lib/components/select-v2/src/select.vue.d.ts +1 -1
- package/lib/components/switch/index.d.ts +2 -2
- package/lib/components/switch/src/switch.vue.d.ts +2 -2
- package/lib/components/tabs/index.d.ts +4 -4
- package/lib/components/tabs/src/tab-pane.vue.d.ts +2 -2
- package/lib/components/time-picker/index.d.ts +4 -4
- package/lib/components/time-picker/src/common/picker.vue.d.ts +2 -2
- package/lib/components/time-picker/src/time-picker.d.ts +2 -2
- package/lib/components/transfer/src/transfer-panel.vue.d.ts +1 -2
- package/lib/components/transfer/src/transfer-panel.vue_vue_type_script_lang.js +3 -14
- package/lib/components/transfer/src/transfer-panel.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/transfer/src/transfer-panel.vue_vue_type_template_id_1a7d1f9c_lang.js +4 -17
- package/lib/components/transfer/src/transfer-panel.vue_vue_type_template_id_1a7d1f9c_lang.js.map +1 -1
- package/lib/defaults.d.ts +3 -1
- package/lib/hooks/index.js +1 -4
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/use-global-config/index.d.ts +3 -1
- package/lib/hooks/use-global-config/index.js +3 -2
- package/lib/hooks/use-global-config/index.js.map +1 -1
- package/lib/hooks/use-locale/index.d.ts +2 -253
- package/lib/hooks/use-locale/index.js +8 -31
- package/lib/hooks/use-locale/index.js.map +1 -1
- package/lib/index.d.ts +4 -1
- package/lib/index.js +4 -4
- package/lib/index.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/tags.json +1 -1
- package/theme-chalk/el-cascader.css +1 -1
- package/theme-chalk/el-date-picker.css +1 -1
- package/theme-chalk/el-form.css +1 -1
- package/theme-chalk/el-pagination.css +1 -1
- package/theme-chalk/el-tag.css +1 -1
- package/theme-chalk/el-time-picker.css +1 -1
- package/theme-chalk/el-time-select.css +1 -1
- package/theme-chalk/el-transfer.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/cascader.scss +4 -0
- package/theme-chalk/src/common/var.scss +2 -2
- package/theme-chalk/src/date-picker/picker.scss +1 -0
- package/theme-chalk/src/form.scss +101 -24
- package/theme-chalk/src/pagination.scss +0 -3
- package/theme-chalk/src/tag.scss +3 -3
- package/theme-chalk/src/transfer.scss +27 -31
- package/web-types.json +1 -1
package/es/components/transfer/src/transfer-panel.vue_vue_type_template_id_1a7d1f9c_lang.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { resolveComponent, openBlock, createElementBlock, createElementVNode, createVNode, withCtx, createTextVNode, toDisplayString, normalizeClass, createBlock,
|
|
1
|
+
import { resolveComponent, openBlock, createElementBlock, createElementVNode, createVNode, withCtx, createTextVNode, toDisplayString, normalizeClass, createBlock, createCommentVNode, withDirectives, Fragment, renderList, vShow, renderSlot } from 'vue';
|
|
2
2
|
|
|
3
3
|
const _hoisted_1 = { class: "el-transfer-panel" };
|
|
4
4
|
const _hoisted_2 = { class: "el-transfer-panel__header" };
|
|
@@ -8,7 +8,6 @@ const _hoisted_3 = {
|
|
|
8
8
|
};
|
|
9
9
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
10
10
|
const _component_el_checkbox = resolveComponent("el-checkbox");
|
|
11
|
-
const _component_el_icon = resolveComponent("el-icon");
|
|
12
11
|
const _component_el_input = resolveComponent("el-input");
|
|
13
12
|
const _component_option_content = resolveComponent("option-content");
|
|
14
13
|
const _component_el_checkbox_group = resolveComponent("el-checkbox-group");
|
|
@@ -35,25 +34,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
35
34
|
modelValue: _ctx.query,
|
|
36
35
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.query = $event),
|
|
37
36
|
class: "el-transfer-panel__filter",
|
|
38
|
-
size: "
|
|
37
|
+
size: "default",
|
|
39
38
|
placeholder: _ctx.placeholder,
|
|
39
|
+
"prefix-icon": _ctx.SearchIcon,
|
|
40
|
+
clearable: "",
|
|
40
41
|
onMouseenter: _cache[2] || (_cache[2] = ($event) => _ctx.inputHover = true),
|
|
41
42
|
onMouseleave: _cache[3] || (_cache[3] = ($event) => _ctx.inputHover = false)
|
|
42
|
-
},
|
|
43
|
-
prefix: withCtx(() => [
|
|
44
|
-
_ctx.inputIcon ? (openBlock(), createBlock(_component_el_icon, {
|
|
45
|
-
key: 0,
|
|
46
|
-
class: "el-input__icon",
|
|
47
|
-
onClick: _ctx.clearQuery
|
|
48
|
-
}, {
|
|
49
|
-
default: withCtx(() => [
|
|
50
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.inputIcon)))
|
|
51
|
-
]),
|
|
52
|
-
_: 1
|
|
53
|
-
}, 8, ["onClick"])) : createCommentVNode("v-if", true)
|
|
54
|
-
]),
|
|
55
|
-
_: 1
|
|
56
|
-
}, 8, ["modelValue", "placeholder"])) : createCommentVNode("v-if", true),
|
|
43
|
+
}, null, 8, ["modelValue", "placeholder", "prefix-icon"])) : createCommentVNode("v-if", true),
|
|
57
44
|
withDirectives(createVNode(_component_el_checkbox_group, {
|
|
58
45
|
modelValue: _ctx.checked,
|
|
59
46
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => _ctx.checked = $event),
|
package/es/components/transfer/src/transfer-panel.vue_vue_type_template_id_1a7d1f9c_lang.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transfer-panel.vue_vue_type_template_id_1a7d1f9c_lang.mjs","sources":["../../../../../../packages/components/transfer/src/transfer-panel.vue?vue&type=template&id=1a7d1f9c&lang.js"],"sourcesContent":["<template>\n <div class=\"el-transfer-panel\">\n <p class=\"el-transfer-panel__header\">\n <el-checkbox\n v-model=\"allChecked\"\n :indeterminate=\"isIndeterminate\"\n @change=\"handleAllCheckedChange\"\n >\n {{ title }}\n <span>{{ checkedSummary }}</span>\n </el-checkbox>\n </p>\n\n <div\n :class=\"['el-transfer-panel__body', hasFooter ? 'is-with-footer' : '']\"\n >\n <el-input\n v-if=\"filterable\"\n v-model=\"query\"\n class=\"el-transfer-panel__filter\"\n size=\"
|
|
1
|
+
{"version":3,"file":"transfer-panel.vue_vue_type_template_id_1a7d1f9c_lang.mjs","sources":["../../../../../../packages/components/transfer/src/transfer-panel.vue?vue&type=template&id=1a7d1f9c&lang.js"],"sourcesContent":["<template>\n <div class=\"el-transfer-panel\">\n <p class=\"el-transfer-panel__header\">\n <el-checkbox\n v-model=\"allChecked\"\n :indeterminate=\"isIndeterminate\"\n @change=\"handleAllCheckedChange\"\n >\n {{ title }}\n <span>{{ checkedSummary }}</span>\n </el-checkbox>\n </p>\n\n <div\n :class=\"['el-transfer-panel__body', hasFooter ? 'is-with-footer' : '']\"\n >\n <el-input\n v-if=\"filterable\"\n v-model=\"query\"\n class=\"el-transfer-panel__filter\"\n size=\"default\"\n :placeholder=\"placeholder\"\n :prefix-icon=\"SearchIcon\"\n clearable\n @mouseenter=\"inputHover = true\"\n @mouseleave=\"inputHover = false\"\n >\n </el-input>\n <el-checkbox-group\n v-show=\"!hasNoMatch && data.length > 0\"\n v-model=\"checked\"\n :class=\"{ 'is-filterable': filterable }\"\n class=\"el-transfer-panel__list\"\n >\n <el-checkbox\n v-for=\"item in filteredData\"\n :key=\"item[keyProp]\"\n class=\"el-transfer-panel__item\"\n :label=\"item[keyProp]\"\n :disabled=\"item[disabledProp]\"\n >\n <option-content :option=\"optionRender(item)\" />\n </el-checkbox>\n </el-checkbox-group>\n <p\n v-show=\"hasNoMatch || data.length === 0\"\n class=\"el-transfer-panel__empty\"\n >\n {{ hasNoMatch ? t('el.transfer.noMatch') : t('el.transfer.noData') }}\n </p>\n </div>\n <p v-if=\"hasFooter\" class=\"el-transfer-panel__footer\">\n <slot></slot>\n </p>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, reactive, toRefs } from 'vue'\nimport { useLocale } from '@element-plus/hooks'\nimport { ElCheckbox, ElCheckboxGroup } from '@element-plus/components/checkbox'\nimport ElInput from '@element-plus/components/input'\nimport { Search } from '@element-plus/icons-vue'\nimport { useCheck, useCheckProps, CHECKED_CHANGE_EVENT } from './useCheck'\n\nexport default defineComponent({\n name: 'ElTransferPanel',\n\n components: {\n ElCheckboxGroup,\n ElCheckbox,\n ElInput,\n OptionContent: ({ option }) => option,\n },\n\n props: useCheckProps,\n\n emits: [CHECKED_CHANGE_EVENT],\n\n setup(props, { slots }) {\n const { t } = useLocale()\n\n const panelState = reactive({\n checked: [],\n allChecked: false,\n query: '',\n inputHover: false,\n checkChangeByUser: true,\n })\n\n const {\n labelProp,\n keyProp,\n disabledProp,\n filteredData,\n checkedSummary,\n isIndeterminate,\n handleAllCheckedChange,\n } = useCheck(props, panelState)\n\n const hasNoMatch = computed(() => {\n return panelState.query.length > 0 && filteredData.value.length === 0\n })\n\n const hasFooter = computed(() => !!slots.default()[0].children.length)\n\n const { checked, allChecked, query, inputHover, checkChangeByUser } =\n toRefs(panelState)\n\n return {\n labelProp,\n keyProp,\n disabledProp,\n filteredData,\n checkedSummary,\n isIndeterminate,\n handleAllCheckedChange,\n\n checked,\n allChecked,\n query,\n inputHover,\n checkChangeByUser,\n\n hasNoMatch,\n SearchIcon: Search,\n hasFooter,\n\n t,\n }\n },\n})\n</script>\n"],"names":["_withCtx"],"mappings":";;;qBACO,KAAK,EAAC;;;;EAkDW;;;;;;;;;wBAlDtB;6BACE;;;;QAGK;;;;;UAID;;;;;;WAKI;;;;;;;iBAKC,EAAC;;;;;wBAKK;;;;;;;;;0BAWT;6BADF;;cAEG,SAASA;;0BAEG;4BACE,CAAC;;;;kBAEC;;;;;;;;;;;qBAGrB;mCACwB;;;;;;"}
|
package/es/defaults.d.ts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
version: string;
|
|
3
3
|
install: (app: import("vue").App<any>, options?: {
|
|
4
|
+
readonly locale?: unknown;
|
|
4
5
|
readonly size?: unknown;
|
|
5
6
|
readonly button?: unknown;
|
|
7
|
+
readonly message?: unknown;
|
|
6
8
|
readonly zIndex?: unknown;
|
|
7
|
-
readonly locale?: unknown;
|
|
8
9
|
} & {} & {
|
|
9
10
|
button?: import("./components").ButtonConfigContext | undefined;
|
|
10
11
|
size?: import("./utils/props").BuildPropType<StringConstructor, "small" | "default" | "large", unknown> | undefined;
|
|
11
12
|
locale?: import("./locale").Language | undefined;
|
|
13
|
+
message?: import("./components").MessageConfigContext | undefined;
|
|
12
14
|
zIndex?: number | undefined;
|
|
13
15
|
}) => void;
|
|
14
16
|
};
|
package/es/hooks/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ export { useDisabled, useSize, useSizeProp } from './use-common-props/index.mjs'
|
|
|
3
3
|
export { useFocus } from './use-focus/index.mjs';
|
|
4
4
|
export { useFormItem } from './use-form-item/index.mjs';
|
|
5
5
|
export { provideGlobalConfig, useGlobalConfig } from './use-global-config/index.mjs';
|
|
6
|
-
export {
|
|
6
|
+
export { buildLocaleContext, buildTranslator, translate, useLocale } from './use-locale/index.mjs';
|
|
7
7
|
export { useLockscreen } from './use-lockscreen/index.mjs';
|
|
8
8
|
export { useModal } from './use-modal/index.mjs';
|
|
9
9
|
export { createModelToggleComposable, useModelToggle, useModelToggleEmits, useModelToggleProps } from './use-model-toggle/index.mjs';
|
|
@@ -4,13 +4,15 @@ import type { ConfigProviderContext } from 'element-plus/es/tokens';
|
|
|
4
4
|
export declare function useGlobalConfig<K extends keyof ConfigProviderContext>(key: K): Ref<ConfigProviderContext[K]>;
|
|
5
5
|
export declare function useGlobalConfig(): Ref<ConfigProviderContext>;
|
|
6
6
|
export declare const provideGlobalConfig: (config: MaybeRef<ConfigProviderContext>, app?: App<any> | undefined) => import("vue").ComputedRef<{
|
|
7
|
+
readonly locale?: unknown;
|
|
7
8
|
readonly size?: unknown;
|
|
8
9
|
readonly button?: unknown;
|
|
10
|
+
readonly message?: unknown;
|
|
9
11
|
readonly zIndex?: unknown;
|
|
10
|
-
readonly locale?: unknown;
|
|
11
12
|
} & {} & {
|
|
12
13
|
button?: import("../..").ButtonConfigContext | undefined;
|
|
13
14
|
size?: import("../../utils/props").BuildPropType<StringConstructor, "small" | "default" | "large", unknown> | undefined;
|
|
14
15
|
locale?: import("../../locale").Language | undefined;
|
|
16
|
+
message?: import("../..").MessageConfigContext | undefined;
|
|
15
17
|
zIndex?: number | undefined;
|
|
16
18
|
}> | undefined;
|
|
@@ -5,9 +5,9 @@ import { debugWarn } from '../../utils/error.mjs';
|
|
|
5
5
|
import { configProviderContextKey } from '../../tokens/config-provider.mjs';
|
|
6
6
|
import { isObject, hasOwn } from '@vue/shared';
|
|
7
7
|
|
|
8
|
-
const
|
|
8
|
+
const cache = ref({});
|
|
9
9
|
function useGlobalConfig(key) {
|
|
10
|
-
const config = inject(configProviderContextKey,
|
|
10
|
+
const config = inject(configProviderContextKey, cache);
|
|
11
11
|
if (key) {
|
|
12
12
|
return isObject(config.value) && hasOwn(config.value, key) ? computed(() => config.value[key]) : ref(void 0);
|
|
13
13
|
} else {
|
|
@@ -30,6 +30,7 @@ const provideGlobalConfig = (config, app) => {
|
|
|
30
30
|
return merge(oldConfig.value, cfg);
|
|
31
31
|
});
|
|
32
32
|
provideFn(configProviderContextKey, context);
|
|
33
|
+
cache.value = context.value;
|
|
33
34
|
return context;
|
|
34
35
|
};
|
|
35
36
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-global-config/index.ts"],"sourcesContent":["import { inject, ref, computed, unref, provide, getCurrentInstance } from 'vue'\nimport { configProviderContextKey } from '@element-plus/tokens'\nimport { hasOwn, isObject, merge } from '@element-plus/utils/util'\nimport { debugWarn } from '@element-plus/utils/error'\nimport type { MaybeRef } from '@vueuse/core'\nimport type { Ref, App } from 'vue'\nimport type { ConfigProviderContext } from '@element-plus/tokens'\n\nconst
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-global-config/index.ts"],"sourcesContent":["import { inject, ref, computed, unref, provide, getCurrentInstance } from 'vue'\nimport { configProviderContextKey } from '@element-plus/tokens'\nimport { hasOwn, isObject, merge } from '@element-plus/utils/util'\nimport { debugWarn } from '@element-plus/utils/error'\nimport type { MaybeRef } from '@vueuse/core'\nimport type { Ref, App } from 'vue'\nimport type { ConfigProviderContext } from '@element-plus/tokens'\n\n// this is meant to fix global methods like `ElMessage(opts)`, this way we can inject current locale\n// into the component as default injection value.\n// refer to: https://github.com/element-plus/element-plus/issues/2610#issuecomment-887965266\nconst cache = ref<ConfigProviderContext>({})\n\nexport function useGlobalConfig<K extends keyof ConfigProviderContext>(\n key: K\n): Ref<ConfigProviderContext[K]>\nexport function useGlobalConfig(): Ref<ConfigProviderContext>\nexport function useGlobalConfig(key?: keyof ConfigProviderContext) {\n const config = inject(configProviderContextKey, cache)\n if (key) {\n return isObject(config.value) && hasOwn(config.value, key)\n ? computed(() => config.value[key])\n : ref(undefined)\n } else {\n return config\n }\n}\n\nexport const provideGlobalConfig = (\n config: MaybeRef<ConfigProviderContext>,\n app?: App\n) => {\n const inSetup = !!getCurrentInstance()\n const oldConfig = inSetup ? useGlobalConfig() : undefined\n\n const provideFn = app?.provide ?? (inSetup ? provide : undefined)\n if (!provideFn) {\n debugWarn(\n 'provideGlobalConfig',\n 'provideGlobalConfig() can only be used inside setup().'\n )\n return\n }\n\n const context = computed(() => {\n const cfg = unref(config)\n if (!oldConfig) return cfg\n return merge(oldConfig.value, cfg)\n })\n provideFn(configProviderContextKey, context)\n cache.value = context.value\n return context\n}\n"],"names":[],"mappings":";;;;;;;AAIA,MAAM,KAAK,GAAG,GAAG,CAAC,EAAE,CAAC,CAAC;AACf,SAAS,eAAe,CAAC,GAAG,EAAE;AACrC,EAAE,MAAM,MAAM,GAAG,MAAM,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;AACzD,EAAE,IAAI,GAAG,EAAE;AACX,IAAI,OAAO,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,QAAQ,CAAC,MAAM,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;AACjH,GAAG,MAAM;AACT,IAAI,OAAO,MAAM,CAAC;AAClB,GAAG;AACH,CAAC;AACW,MAAC,mBAAmB,GAAG,CAAC,MAAM,EAAE,GAAG,KAAK;AACpD,EAAE,IAAI,EAAE,CAAC;AACT,EAAE,MAAM,OAAO,GAAG,CAAC,CAAC,kBAAkB,EAAE,CAAC;AACzC,EAAE,MAAM,SAAS,GAAG,OAAO,GAAG,eAAe,EAAE,GAAG,KAAK,CAAC,CAAC;AACzD,EAAE,MAAM,SAAS,GAAG,CAAC,EAAE,GAAG,GAAG,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,OAAO,KAAK,IAAI,GAAG,EAAE,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,CAAC,CAAC;AACxG,EAAE,IAAI,CAAC,SAAS,EAAE;AAClB,IAAI,SAAS,CAAC,qBAAqB,EAAE,wDAAwD,CAAC,CAAC;AAC/F,IAAI,OAAO;AACX,GAAG;AACH,EAAE,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM;AACjC,IAAI,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AAC9B,IAAI,IAAI,CAAC,SAAS;AAClB,MAAM,OAAO,GAAG,CAAC;AACjB,IAAI,OAAO,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AACvC,GAAG,CAAC,CAAC;AACL,EAAE,SAAS,CAAC,wBAAwB,EAAE,OAAO,CAAC,CAAC;AAC/C,EAAE,KAAK,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;AAC9B,EAAE,OAAO,OAAO,CAAC;AACjB;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { MaybeRef } from '@vueuse/core';
|
|
2
|
-
import type {
|
|
2
|
+
import type { Ref } from 'vue';
|
|
3
3
|
import type { Language } from 'element-plus/es/locale';
|
|
4
4
|
export declare type TranslatorOption = Record<string, string | number>;
|
|
5
5
|
export declare type Translator = (path: string, option?: TranslatorOption) => string;
|
|
@@ -8,258 +8,7 @@ export declare type LocaleContext = {
|
|
|
8
8
|
lang: Ref<string>;
|
|
9
9
|
t: Translator;
|
|
10
10
|
};
|
|
11
|
-
export declare const useLocaleProps: {
|
|
12
|
-
locale: import("element-plus/es/utils/props").BuildPropReturn<import("element-plus/es/utils/props").PropWrapper<Language>, unknown, unknown, unknown, unknown>;
|
|
13
|
-
};
|
|
14
|
-
export declare const localeContextKey: InjectionKey<LocaleContext>;
|
|
15
|
-
export declare const provideLocale: () => void;
|
|
16
11
|
export declare const buildTranslator: (locale: MaybeRef<Language>) => Translator;
|
|
17
12
|
export declare const translate: (path: string, option: undefined | TranslatorOption, locale: Language) => string;
|
|
18
|
-
export declare const
|
|
19
|
-
name: string;
|
|
20
|
-
el: {
|
|
21
|
-
colorpicker: {
|
|
22
|
-
confirm: string;
|
|
23
|
-
clear: string;
|
|
24
|
-
};
|
|
25
|
-
datepicker: {
|
|
26
|
-
now: string;
|
|
27
|
-
today: string;
|
|
28
|
-
cancel: string;
|
|
29
|
-
clear: string;
|
|
30
|
-
confirm: string;
|
|
31
|
-
selectDate: string;
|
|
32
|
-
selectTime: string;
|
|
33
|
-
startDate: string;
|
|
34
|
-
startTime: string;
|
|
35
|
-
endDate: string;
|
|
36
|
-
endTime: string;
|
|
37
|
-
prevYear: string;
|
|
38
|
-
nextYear: string;
|
|
39
|
-
prevMonth: string;
|
|
40
|
-
nextMonth: string;
|
|
41
|
-
year: string;
|
|
42
|
-
month1: string;
|
|
43
|
-
month2: string;
|
|
44
|
-
month3: string;
|
|
45
|
-
month4: string;
|
|
46
|
-
month5: string;
|
|
47
|
-
month6: string;
|
|
48
|
-
month7: string;
|
|
49
|
-
month8: string;
|
|
50
|
-
month9: string;
|
|
51
|
-
month10: string;
|
|
52
|
-
month11: string;
|
|
53
|
-
month12: string;
|
|
54
|
-
week: string;
|
|
55
|
-
weeks: {
|
|
56
|
-
sun: string;
|
|
57
|
-
mon: string;
|
|
58
|
-
tue: string;
|
|
59
|
-
wed: string;
|
|
60
|
-
thu: string;
|
|
61
|
-
fri: string;
|
|
62
|
-
sat: string;
|
|
63
|
-
};
|
|
64
|
-
months: {
|
|
65
|
-
jan: string;
|
|
66
|
-
feb: string;
|
|
67
|
-
mar: string;
|
|
68
|
-
apr: string;
|
|
69
|
-
may: string;
|
|
70
|
-
jun: string;
|
|
71
|
-
jul: string;
|
|
72
|
-
aug: string;
|
|
73
|
-
sep: string;
|
|
74
|
-
oct: string;
|
|
75
|
-
nov: string;
|
|
76
|
-
dec: string;
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
|
-
select: {
|
|
80
|
-
loading: string;
|
|
81
|
-
noMatch: string;
|
|
82
|
-
noData: string;
|
|
83
|
-
placeholder: string;
|
|
84
|
-
};
|
|
85
|
-
cascader: {
|
|
86
|
-
noMatch: string;
|
|
87
|
-
loading: string;
|
|
88
|
-
placeholder: string;
|
|
89
|
-
noData: string;
|
|
90
|
-
};
|
|
91
|
-
pagination: {
|
|
92
|
-
goto: string;
|
|
93
|
-
pagesize: string;
|
|
94
|
-
total: string;
|
|
95
|
-
pageClassifier: string;
|
|
96
|
-
deprecationWarning: string;
|
|
97
|
-
};
|
|
98
|
-
messagebox: {
|
|
99
|
-
title: string;
|
|
100
|
-
confirm: string;
|
|
101
|
-
cancel: string;
|
|
102
|
-
error: string;
|
|
103
|
-
};
|
|
104
|
-
upload: {
|
|
105
|
-
deleteTip: string;
|
|
106
|
-
delete: string;
|
|
107
|
-
preview: string;
|
|
108
|
-
continue: string;
|
|
109
|
-
};
|
|
110
|
-
table: {
|
|
111
|
-
emptyText: string;
|
|
112
|
-
confirmFilter: string;
|
|
113
|
-
resetFilter: string;
|
|
114
|
-
clearFilter: string;
|
|
115
|
-
sumText: string;
|
|
116
|
-
};
|
|
117
|
-
tree: {
|
|
118
|
-
emptyText: string;
|
|
119
|
-
};
|
|
120
|
-
transfer: {
|
|
121
|
-
noMatch: string;
|
|
122
|
-
noData: string;
|
|
123
|
-
titles: string[];
|
|
124
|
-
filterPlaceholder: string;
|
|
125
|
-
noCheckedFormat: string;
|
|
126
|
-
hasCheckedFormat: string;
|
|
127
|
-
};
|
|
128
|
-
image: {
|
|
129
|
-
error: string;
|
|
130
|
-
};
|
|
131
|
-
pageHeader: {
|
|
132
|
-
title: string;
|
|
133
|
-
};
|
|
134
|
-
popconfirm: {
|
|
135
|
-
confirmButtonText: string;
|
|
136
|
-
cancelButtonText: string;
|
|
137
|
-
};
|
|
138
|
-
};
|
|
139
|
-
}) => {
|
|
140
|
-
lang: Ref<string>;
|
|
141
|
-
locale: Ref<{
|
|
142
|
-
name: string;
|
|
143
|
-
el: {
|
|
144
|
-
colorpicker: {
|
|
145
|
-
confirm: string;
|
|
146
|
-
clear: string;
|
|
147
|
-
};
|
|
148
|
-
datepicker: {
|
|
149
|
-
now: string;
|
|
150
|
-
today: string;
|
|
151
|
-
cancel: string;
|
|
152
|
-
clear: string;
|
|
153
|
-
confirm: string;
|
|
154
|
-
selectDate: string;
|
|
155
|
-
selectTime: string;
|
|
156
|
-
startDate: string;
|
|
157
|
-
startTime: string;
|
|
158
|
-
endDate: string;
|
|
159
|
-
endTime: string;
|
|
160
|
-
prevYear: string;
|
|
161
|
-
nextYear: string;
|
|
162
|
-
prevMonth: string;
|
|
163
|
-
nextMonth: string;
|
|
164
|
-
year: string;
|
|
165
|
-
month1: string;
|
|
166
|
-
month2: string;
|
|
167
|
-
month3: string;
|
|
168
|
-
month4: string;
|
|
169
|
-
month5: string;
|
|
170
|
-
month6: string;
|
|
171
|
-
month7: string;
|
|
172
|
-
month8: string;
|
|
173
|
-
month9: string;
|
|
174
|
-
month10: string;
|
|
175
|
-
month11: string;
|
|
176
|
-
month12: string;
|
|
177
|
-
week: string;
|
|
178
|
-
weeks: {
|
|
179
|
-
sun: string;
|
|
180
|
-
mon: string;
|
|
181
|
-
tue: string;
|
|
182
|
-
wed: string;
|
|
183
|
-
thu: string;
|
|
184
|
-
fri: string;
|
|
185
|
-
sat: string;
|
|
186
|
-
};
|
|
187
|
-
months: {
|
|
188
|
-
jan: string;
|
|
189
|
-
feb: string;
|
|
190
|
-
mar: string;
|
|
191
|
-
apr: string;
|
|
192
|
-
may: string;
|
|
193
|
-
jun: string;
|
|
194
|
-
jul: string;
|
|
195
|
-
aug: string;
|
|
196
|
-
sep: string;
|
|
197
|
-
oct: string;
|
|
198
|
-
nov: string;
|
|
199
|
-
dec: string;
|
|
200
|
-
};
|
|
201
|
-
};
|
|
202
|
-
select: {
|
|
203
|
-
loading: string;
|
|
204
|
-
noMatch: string;
|
|
205
|
-
noData: string;
|
|
206
|
-
placeholder: string;
|
|
207
|
-
};
|
|
208
|
-
cascader: {
|
|
209
|
-
noMatch: string;
|
|
210
|
-
loading: string;
|
|
211
|
-
placeholder: string;
|
|
212
|
-
noData: string;
|
|
213
|
-
};
|
|
214
|
-
pagination: {
|
|
215
|
-
goto: string;
|
|
216
|
-
pagesize: string;
|
|
217
|
-
total: string;
|
|
218
|
-
pageClassifier: string;
|
|
219
|
-
deprecationWarning: string;
|
|
220
|
-
};
|
|
221
|
-
messagebox: {
|
|
222
|
-
title: string;
|
|
223
|
-
confirm: string;
|
|
224
|
-
cancel: string;
|
|
225
|
-
error: string;
|
|
226
|
-
};
|
|
227
|
-
upload: {
|
|
228
|
-
deleteTip: string;
|
|
229
|
-
delete: string;
|
|
230
|
-
preview: string;
|
|
231
|
-
continue: string;
|
|
232
|
-
};
|
|
233
|
-
table: {
|
|
234
|
-
emptyText: string;
|
|
235
|
-
confirmFilter: string;
|
|
236
|
-
resetFilter: string;
|
|
237
|
-
clearFilter: string;
|
|
238
|
-
sumText: string;
|
|
239
|
-
};
|
|
240
|
-
tree: {
|
|
241
|
-
emptyText: string;
|
|
242
|
-
};
|
|
243
|
-
transfer: {
|
|
244
|
-
noMatch: string;
|
|
245
|
-
noData: string;
|
|
246
|
-
titles: string[];
|
|
247
|
-
filterPlaceholder: string;
|
|
248
|
-
noCheckedFormat: string;
|
|
249
|
-
hasCheckedFormat: string;
|
|
250
|
-
};
|
|
251
|
-
image: {
|
|
252
|
-
error: string;
|
|
253
|
-
};
|
|
254
|
-
pageHeader: {
|
|
255
|
-
title: string;
|
|
256
|
-
};
|
|
257
|
-
popconfirm: {
|
|
258
|
-
confirmButtonText: string;
|
|
259
|
-
cancelButtonText: string;
|
|
260
|
-
};
|
|
261
|
-
};
|
|
262
|
-
}>;
|
|
263
|
-
t: Translator;
|
|
264
|
-
};
|
|
13
|
+
export declare const buildLocaleContext: (locale: MaybeRef<Language>) => LocaleContext;
|
|
265
14
|
export declare const useLocale: () => LocaleContext;
|
|
@@ -1,46 +1,26 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { unref, computed, isRef, ref } from 'vue';
|
|
2
2
|
import get from 'lodash/get';
|
|
3
3
|
import English from '../../locale/lang/en.mjs';
|
|
4
|
-
import {
|
|
4
|
+
import { useGlobalConfig } from '../use-global-config/index.mjs';
|
|
5
5
|
|
|
6
|
-
const useLocaleProps = buildProps({
|
|
7
|
-
locale: {
|
|
8
|
-
type: definePropType(Object)
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const localeContextKey = Symbol("localeContextKey");
|
|
12
|
-
let cache;
|
|
13
|
-
const provideLocale = () => {
|
|
14
|
-
const vm = getCurrentInstance();
|
|
15
|
-
const props = vm.props;
|
|
16
|
-
const locale = computed(() => props.locale || English);
|
|
17
|
-
const lang = computed(() => locale.value.name);
|
|
18
|
-
const t = buildTranslator(locale);
|
|
19
|
-
const provides = {
|
|
20
|
-
locale,
|
|
21
|
-
lang,
|
|
22
|
-
t
|
|
23
|
-
};
|
|
24
|
-
cache = provides;
|
|
25
|
-
provide(localeContextKey, provides);
|
|
26
|
-
};
|
|
27
6
|
const buildTranslator = (locale) => (path, option) => translate(path, option, unref(locale));
|
|
28
7
|
const translate = (path, option, locale) => get(locale, path, path).replace(/\{(\w+)\}/g, (_, key) => {
|
|
29
8
|
var _a;
|
|
30
9
|
return `${(_a = option == null ? void 0 : option[key]) != null ? _a : `{${key}}`}`;
|
|
31
10
|
});
|
|
32
|
-
const
|
|
33
|
-
const lang =
|
|
34
|
-
const localeRef = ref(locale);
|
|
11
|
+
const buildLocaleContext = (locale) => {
|
|
12
|
+
const lang = computed(() => unref(locale).name);
|
|
13
|
+
const localeRef = isRef(locale) ? locale : ref(locale);
|
|
35
14
|
return {
|
|
36
15
|
lang,
|
|
37
16
|
locale: localeRef,
|
|
38
|
-
t: buildTranslator(
|
|
17
|
+
t: buildTranslator(locale)
|
|
39
18
|
};
|
|
40
19
|
};
|
|
41
20
|
const useLocale = () => {
|
|
42
|
-
|
|
21
|
+
const locale = useGlobalConfig("locale");
|
|
22
|
+
return buildLocaleContext(computed(() => locale.value || English));
|
|
43
23
|
};
|
|
44
24
|
|
|
45
|
-
export {
|
|
25
|
+
export { buildLocaleContext, buildTranslator, translate, useLocale };
|
|
46
26
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-locale/index.ts"],"sourcesContent":["import { computed,
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-locale/index.ts"],"sourcesContent":["import { computed, ref, unref, isRef } from 'vue'\nimport get from 'lodash/get'\nimport English from '@element-plus/locale/lang/en'\nimport { useGlobalConfig } from '../use-global-config'\nimport type { MaybeRef } from '@vueuse/core'\nimport type { Ref } from 'vue'\nimport type { Language } from '@element-plus/locale'\n\nexport type TranslatorOption = Record<string, string | number>\nexport type Translator = (path: string, option?: TranslatorOption) => string\nexport type LocaleContext = {\n locale: Ref<Language>\n lang: Ref<string>\n t: Translator\n}\n\nexport const buildTranslator =\n (locale: MaybeRef<Language>): Translator =>\n (path, option) =>\n translate(path, option, unref(locale))\n\nexport const translate = (\n path: string,\n option: undefined | TranslatorOption,\n locale: Language\n): string =>\n (get(locale, path, path) as string).replace(\n /\\{(\\w+)\\}/g,\n (_, key) => `${option?.[key] ?? `{${key}}`}`\n )\n\nexport const buildLocaleContext = (\n locale: MaybeRef<Language>\n): LocaleContext => {\n const lang = computed(() => unref(locale).name)\n const localeRef = isRef(locale) ? locale : ref(locale)\n return {\n lang,\n locale: localeRef,\n t: buildTranslator(locale),\n }\n}\n\nexport const useLocale = () => {\n const locale = useGlobalConfig('locale')\n return buildLocaleContext(computed(() => locale.value || English))\n}\n"],"names":[],"mappings":";;;;;AAIY,MAAC,eAAe,GAAG,CAAC,MAAM,KAAK,CAAC,IAAI,EAAE,MAAM,KAAK,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE;AACxF,MAAC,SAAS,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,KAAK,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK;AAC7G,EAAE,IAAI,EAAE,CAAC;AACT,EAAE,OAAO,CAAC,EAAE,CAAC,EAAE,GAAG,MAAM,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACrF,CAAC,EAAE;AACS,MAAC,kBAAkB,GAAG,CAAC,MAAM,KAAK;AAC9C,EAAE,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC;AAClD,EAAE,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;AACzD,EAAE,OAAO;AACT,IAAI,IAAI;AACR,IAAI,MAAM,EAAE,SAAS;AACrB,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC;AAC9B,GAAG,CAAC;AACJ,EAAE;AACU,MAAC,SAAS,GAAG,MAAM;AAC/B,EAAE,MAAM,MAAM,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;AAC3C,EAAE,OAAO,kBAAkB,CAAC,QAAQ,CAAC,MAAM,MAAM,CAAC,KAAK,IAAI,OAAO,CAAC,CAAC,CAAC;AACrE;;;;"}
|
package/es/index.d.ts
CHANGED
|
@@ -3,16 +3,19 @@ export * from 'element-plus/es/components';
|
|
|
3
3
|
export * from 'element-plus/es/directives';
|
|
4
4
|
export * from 'element-plus/es/hooks';
|
|
5
5
|
export * from 'element-plus/es/tokens';
|
|
6
|
+
export * from 'element-plus/es/utils/popup-manager';
|
|
6
7
|
export { makeInstaller } from './make-installer';
|
|
7
8
|
export declare const install: (app: import("vue").App<any>, options?: {
|
|
9
|
+
readonly locale?: unknown;
|
|
8
10
|
readonly size?: unknown;
|
|
9
11
|
readonly button?: unknown;
|
|
12
|
+
readonly message?: unknown;
|
|
10
13
|
readonly zIndex?: unknown;
|
|
11
|
-
readonly locale?: unknown;
|
|
12
14
|
} & {} & {
|
|
13
15
|
button?: import("element-plus/es/components").ButtonConfigContext | undefined;
|
|
14
16
|
size?: import("./utils/props").BuildPropType<StringConstructor, "small" | "default" | "large", unknown> | undefined;
|
|
15
17
|
locale?: import("./locale").Language | undefined;
|
|
18
|
+
message?: import("element-plus/es/components").MessageConfigContext | undefined;
|
|
16
19
|
zIndex?: number | undefined;
|
|
17
20
|
}) => void;
|
|
18
21
|
export declare const version: string;
|
package/es/index.mjs
CHANGED
|
@@ -4,6 +4,7 @@ import './components/index.mjs';
|
|
|
4
4
|
import './directives/index.mjs';
|
|
5
5
|
import './hooks/index.mjs';
|
|
6
6
|
import './tokens/index.mjs';
|
|
7
|
+
export { PopupManager } from './utils/popup-manager.mjs';
|
|
7
8
|
export { makeInstaller } from './make-installer.mjs';
|
|
8
9
|
export { affixEmits, affixProps } from './components/affix/src/affix.mjs';
|
|
9
10
|
export { ElAffix } from './components/affix/index.mjs';
|
|
@@ -37,7 +38,7 @@ export { ElCol } from './components/col/index.mjs';
|
|
|
37
38
|
export { ElCollapse, ElCollapseItem } from './components/collapse/index.mjs';
|
|
38
39
|
export { ElCollapseTransition } from './components/collapse-transition/index.mjs';
|
|
39
40
|
export { ElColorPicker } from './components/color-picker/index.mjs';
|
|
40
|
-
export { configProviderProps } from './components/config-provider/src/config-provider.mjs';
|
|
41
|
+
export { configProviderProps, messageConfig } from './components/config-provider/src/config-provider.mjs';
|
|
41
42
|
export { ElConfigProvider } from './components/config-provider/index.mjs';
|
|
42
43
|
export { ElAside, ElContainer, ElFooter, ElHeader, ElMain } from './components/container/index.mjs';
|
|
43
44
|
export { ElDatePicker } from './components/date-picker/index.mjs';
|
|
@@ -160,7 +161,7 @@ export { useDisabled, useSize, useSizeProp } from './hooks/use-common-props/inde
|
|
|
160
161
|
export { useFocus } from './hooks/use-focus/index.mjs';
|
|
161
162
|
export { useFormItem } from './hooks/use-form-item/index.mjs';
|
|
162
163
|
export { provideGlobalConfig, useGlobalConfig } from './hooks/use-global-config/index.mjs';
|
|
163
|
-
export {
|
|
164
|
+
export { buildLocaleContext, buildTranslator, translate, useLocale } from './hooks/use-locale/index.mjs';
|
|
164
165
|
export { useLockscreen } from './hooks/use-lockscreen/index.mjs';
|
|
165
166
|
export { useModal } from './hooks/use-modal/index.mjs';
|
|
166
167
|
export { createModelToggleComposable, useModelToggle, useModelToggleEmits, useModelToggleProps } from './hooks/use-model-toggle/index.mjs';
|
package/es/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../packages/element-plus/index.ts"],"sourcesContent":["import installer from './defaults'\nexport * from '@element-plus/components'\nexport * from '@element-plus/directives'\nexport * from '@element-plus/hooks'\nexport * from '@element-plus/tokens'\nexport { makeInstaller } from './make-installer'\n\nexport const install = installer.install\nexport const version = installer.version\nexport default installer\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../packages/element-plus/index.ts"],"sourcesContent":["import installer from './defaults'\nexport * from '@element-plus/components'\nexport * from '@element-plus/directives'\nexport * from '@element-plus/hooks'\nexport * from '@element-plus/tokens'\nexport * from '@element-plus/utils/popup-manager'\nexport { makeInstaller } from './make-installer'\n\nexport const install = installer.install\nexport const version = installer.version\nexport default installer\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOY,MAAC,OAAO,GAAG,SAAS,CAAC,QAAQ;AAC7B,MAAC,OAAO,GAAG,SAAS,CAAC;;;;"}
|
package/es/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "0.0.20220108";
|
package/es/version.mjs
CHANGED
package/es/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.
|
|
1
|
+
{"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.20220108'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
|
|
@@ -877,6 +877,7 @@ declare const _Cascader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
877
877
|
passwordVisible: import("vue").Ref<boolean>;
|
|
878
878
|
inputOrTextarea: import("vue").ComputedRef<HTMLInputElement | HTMLTextAreaElement | undefined>;
|
|
879
879
|
suffixVisible: import("vue").ComputedRef<boolean>;
|
|
880
|
+
needStatusIcon: import("vue").ComputedRef<boolean>;
|
|
880
881
|
resizeTextarea: () => void;
|
|
881
882
|
handleInput: (event: Event) => void;
|
|
882
883
|
handleChange: (event: Event) => void;
|
|
@@ -1025,6 +1026,7 @@ declare const _Cascader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1025
1026
|
passwordVisible: import("vue").Ref<boolean>;
|
|
1026
1027
|
inputOrTextarea: import("vue").ComputedRef<HTMLInputElement | HTMLTextAreaElement | undefined>;
|
|
1027
1028
|
suffixVisible: import("vue").ComputedRef<boolean>;
|
|
1029
|
+
needStatusIcon: import("vue").ComputedRef<boolean>;
|
|
1028
1030
|
resizeTextarea: () => void;
|
|
1029
1031
|
handleInput: (event: Event) => void;
|
|
1030
1032
|
handleChange: (event: Event) => void;
|
|
@@ -2548,6 +2550,7 @@ export declare const ElCascader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2548
2550
|
passwordVisible: import("vue").Ref<boolean>;
|
|
2549
2551
|
inputOrTextarea: import("vue").ComputedRef<HTMLInputElement | HTMLTextAreaElement | undefined>;
|
|
2550
2552
|
suffixVisible: import("vue").ComputedRef<boolean>;
|
|
2553
|
+
needStatusIcon: import("vue").ComputedRef<boolean>;
|
|
2551
2554
|
resizeTextarea: () => void;
|
|
2552
2555
|
handleInput: (event: Event) => void;
|
|
2553
2556
|
handleChange: (event: Event) => void;
|
|
@@ -2696,6 +2699,7 @@ export declare const ElCascader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2696
2699
|
passwordVisible: import("vue").Ref<boolean>;
|
|
2697
2700
|
inputOrTextarea: import("vue").ComputedRef<HTMLInputElement | HTMLTextAreaElement | undefined>;
|
|
2698
2701
|
suffixVisible: import("vue").ComputedRef<boolean>;
|
|
2702
|
+
needStatusIcon: import("vue").ComputedRef<boolean>;
|
|
2699
2703
|
resizeTextarea: () => void;
|
|
2700
2704
|
handleInput: (event: Event) => void;
|
|
2701
2705
|
handleChange: (event: Event) => void;
|
|
@@ -881,6 +881,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
881
881
|
passwordVisible: Ref<boolean>;
|
|
882
882
|
inputOrTextarea: ComputedRef<HTMLInputElement | HTMLTextAreaElement | undefined>;
|
|
883
883
|
suffixVisible: ComputedRef<boolean>;
|
|
884
|
+
needStatusIcon: ComputedRef<boolean>;
|
|
884
885
|
resizeTextarea: () => void;
|
|
885
886
|
handleInput: (event: Event) => void;
|
|
886
887
|
handleChange: (event: Event) => void;
|
|
@@ -1029,6 +1030,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1029
1030
|
passwordVisible: Ref<boolean>;
|
|
1030
1031
|
inputOrTextarea: ComputedRef<HTMLInputElement | HTMLTextAreaElement | undefined>;
|
|
1031
1032
|
suffixVisible: ComputedRef<boolean>;
|
|
1033
|
+
needStatusIcon: ComputedRef<boolean>;
|
|
1032
1034
|
resizeTextarea: () => void;
|
|
1033
1035
|
handleInput: (event: Event) => void;
|
|
1034
1036
|
handleChange: (event: Event) => void;
|