yc-design-vue 1.7.8 → 1.8.0

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.
Files changed (166) hide show
  1. package/es/Calendar/Calendar.vue.js +15 -14
  2. package/es/Calendar/CalendarMonth.vue.js +11 -1
  3. package/es/Calendar/CalendarYear.vue.js +20 -16
  4. package/es/ColorPicker/ColorList.vue.js +4 -2
  5. package/es/ColorPicker/ColorPanel.vue.js +6 -4
  6. package/es/ColorPicker/index.css +1 -1
  7. package/es/ConfigProvider/index.d.ts +3 -0
  8. package/es/ConfigProvider/index.vue.d.ts +1 -0
  9. package/es/ConfigProvider/index.vue.js +13 -2
  10. package/es/ConfigProvider/type.d.ts +1 -0
  11. package/es/Drawer/Drawer.vue.js +6 -4
  12. package/es/Drawer/DrawerService.vue.js +2 -2
  13. package/es/Drawer/index.css +1 -1
  14. package/es/Dropdown/index.css +1 -1
  15. package/es/Empty/index.vue.js +11 -4
  16. package/es/Image/Image.vue.js +4 -2
  17. package/es/Image/ImagePreviewToolbar.vue.js +13 -29
  18. package/es/Layout/hooks/useTheme.js +0 -1
  19. package/es/Modal/Modal.vue.js +6 -4
  20. package/es/Modal/ModalService.vue.js +2 -2
  21. package/es/Pagination/Pagination.vue.js +5 -3
  22. package/es/Pagination/hooks/useContext.d.ts +5 -0
  23. package/es/Pagination/hooks/useContext.js +5 -2
  24. package/es/Popconfirm/index.css +1 -1
  25. package/es/Popconfirm/index.vue.js +6 -4
  26. package/es/Popover/index.css +1 -1
  27. package/es/Tooltip/index.css +1 -1
  28. package/es/Typography/TypographyBase.vue.js +5 -4
  29. package/es/_shared/locale/i18n.d.ts +256 -0
  30. package/es/_shared/locale/i18n.js +35 -0
  31. package/es/_shared/locale/lang/ar-eg.d.ts +205 -0
  32. package/es/_shared/locale/lang/ar-eg.js +153 -0
  33. package/es/_shared/locale/lang/de-de.d.ts +205 -0
  34. package/es/_shared/locale/lang/de-de.js +153 -0
  35. package/es/_shared/locale/lang/en-us.d.ts +253 -0
  36. package/es/_shared/locale/lang/en-us.js +158 -0
  37. package/es/_shared/locale/lang/es-es.d.ts +205 -0
  38. package/es/_shared/locale/lang/es-es.js +153 -0
  39. package/es/_shared/locale/lang/fr-fr.d.ts +205 -0
  40. package/es/_shared/locale/lang/fr-fr.js +153 -0
  41. package/es/_shared/locale/lang/id-id.d.ts +205 -0
  42. package/es/_shared/locale/lang/id-id.js +153 -0
  43. package/es/_shared/locale/lang/it-it.d.ts +205 -0
  44. package/es/_shared/locale/lang/it-it.js +153 -0
  45. package/es/_shared/locale/lang/ja-jp.d.ts +253 -0
  46. package/es/_shared/locale/lang/ja-jp.js +201 -0
  47. package/es/_shared/locale/lang/km-kh.d.ts +205 -0
  48. package/es/_shared/locale/lang/km-kh.js +153 -0
  49. package/es/_shared/locale/lang/ko-kr.d.ts +205 -0
  50. package/es/_shared/locale/lang/ko-kr.js +153 -0
  51. package/es/_shared/locale/lang/ms-my.d.ts +205 -0
  52. package/es/_shared/locale/lang/ms-my.js +153 -0
  53. package/es/_shared/locale/lang/nl-nl.d.ts +253 -0
  54. package/es/_shared/locale/lang/nl-nl.js +201 -0
  55. package/es/_shared/locale/lang/pt-pt.d.ts +205 -0
  56. package/es/_shared/locale/lang/pt-pt.js +153 -0
  57. package/es/_shared/locale/lang/ru-ru.d.ts +253 -0
  58. package/es/_shared/locale/lang/ru-ru.js +201 -0
  59. package/es/_shared/locale/lang/th-th.d.ts +205 -0
  60. package/es/_shared/locale/lang/th-th.js +153 -0
  61. package/es/_shared/locale/lang/vi-vn.d.ts +205 -0
  62. package/es/_shared/locale/lang/vi-vn.js +153 -0
  63. package/es/_shared/locale/lang/zh-cn.d.ts +253 -0
  64. package/es/_shared/locale/lang/zh-cn.js +201 -0
  65. package/es/_shared/locale/lang/zh-tw.d.ts +253 -0
  66. package/es/_shared/locale/lang/zh-tw.js +201 -0
  67. package/es/_shared/utils/time.js +1 -1
  68. package/es/_virtual/dynamic-import-helper.js +19 -0
  69. package/es/index.js +2 -0
  70. package/es/node_modules/@intlify/core-base/dist/core-base.js +1129 -0
  71. package/es/node_modules/@intlify/message-compiler/dist/message-compiler.js +65 -0
  72. package/es/node_modules/@intlify/shared/dist/shared.js +199 -0
  73. package/es/node_modules/@intlify/vue-i18n-core/dist/vue-i18n-core.js +1381 -0
  74. package/es/node_modules/@vue/devtools-api/lib/esm/const.js +6 -0
  75. package/es/node_modules/@vue/devtools-api/lib/esm/env.js +12 -0
  76. package/es/node_modules/@vue/devtools-api/lib/esm/index.js +26 -0
  77. package/es/node_modules/@vue/devtools-api/lib/esm/proxy.js +103 -0
  78. package/es/node_modules/@vue/devtools-api/lib/esm/time.js +25 -0
  79. package/es/node_modules/b-validate/es/is.js +27 -0
  80. package/es/node_modules/b-validate/es/locale/en-US.js +50 -0
  81. package/es/node_modules/b-validate/es/rules/base.js +86 -0
  82. package/es/node_modules/b-validate/es/util.js +25 -0
  83. package/es/style.css +1 -1
  84. package/lib/Calendar/Calendar.vue.js +1 -1
  85. package/lib/Calendar/CalendarMonth.vue.js +1 -1
  86. package/lib/Calendar/CalendarYear.vue.js +1 -1
  87. package/lib/ColorPicker/ColorList.vue.js +1 -1
  88. package/lib/ColorPicker/ColorPanel.vue.js +1 -1
  89. package/lib/ColorPicker/index.css +1 -1
  90. package/lib/ConfigProvider/index.d.ts +3 -0
  91. package/lib/ConfigProvider/index.vue.d.ts +1 -0
  92. package/lib/ConfigProvider/index.vue.js +1 -1
  93. package/lib/ConfigProvider/type.d.ts +1 -0
  94. package/lib/Drawer/Drawer.vue.js +1 -1
  95. package/lib/Drawer/DrawerService.vue.js +1 -1
  96. package/lib/Drawer/index.css +1 -1
  97. package/lib/Dropdown/index.css +1 -1
  98. package/lib/Empty/index.vue.js +1 -1
  99. package/lib/Image/Image.vue.js +1 -1
  100. package/lib/Image/ImagePreviewToolbar.vue.js +1 -1
  101. package/lib/Modal/Modal.vue.js +1 -1
  102. package/lib/Modal/ModalService.vue.js +1 -1
  103. package/lib/Pagination/Pagination.vue.js +1 -1
  104. package/lib/Pagination/hooks/useContext.d.ts +5 -0
  105. package/lib/Pagination/hooks/useContext.js +1 -1
  106. package/lib/Popconfirm/index.css +1 -1
  107. package/lib/Popconfirm/index.vue.js +1 -1
  108. package/lib/Popover/index.css +1 -1
  109. package/lib/Tooltip/index.css +1 -1
  110. package/lib/Typography/TypographyBase.vue.js +1 -1
  111. package/lib/_shared/locale/i18n.d.ts +256 -0
  112. package/lib/_shared/locale/i18n.js +1 -0
  113. package/lib/_shared/locale/lang/ar-eg.d.ts +205 -0
  114. package/lib/_shared/locale/lang/ar-eg.js +1 -0
  115. package/lib/_shared/locale/lang/de-de.d.ts +205 -0
  116. package/lib/_shared/locale/lang/de-de.js +1 -0
  117. package/lib/_shared/locale/lang/en-us.d.ts +253 -0
  118. package/lib/_shared/locale/lang/en-us.js +1 -0
  119. package/lib/_shared/locale/lang/es-es.d.ts +205 -0
  120. package/lib/_shared/locale/lang/es-es.js +1 -0
  121. package/lib/_shared/locale/lang/fr-fr.d.ts +205 -0
  122. package/lib/_shared/locale/lang/fr-fr.js +1 -0
  123. package/lib/_shared/locale/lang/id-id.d.ts +205 -0
  124. package/lib/_shared/locale/lang/id-id.js +1 -0
  125. package/lib/_shared/locale/lang/it-it.d.ts +205 -0
  126. package/lib/_shared/locale/lang/it-it.js +1 -0
  127. package/lib/_shared/locale/lang/ja-jp.d.ts +253 -0
  128. package/lib/_shared/locale/lang/ja-jp.js +1 -0
  129. package/lib/_shared/locale/lang/km-kh.d.ts +205 -0
  130. package/lib/_shared/locale/lang/km-kh.js +1 -0
  131. package/lib/_shared/locale/lang/ko-kr.d.ts +205 -0
  132. package/lib/_shared/locale/lang/ko-kr.js +1 -0
  133. package/lib/_shared/locale/lang/ms-my.d.ts +205 -0
  134. package/lib/_shared/locale/lang/ms-my.js +1 -0
  135. package/lib/_shared/locale/lang/nl-nl.d.ts +253 -0
  136. package/lib/_shared/locale/lang/nl-nl.js +1 -0
  137. package/lib/_shared/locale/lang/pt-pt.d.ts +205 -0
  138. package/lib/_shared/locale/lang/pt-pt.js +1 -0
  139. package/lib/_shared/locale/lang/ru-ru.d.ts +253 -0
  140. package/lib/_shared/locale/lang/ru-ru.js +1 -0
  141. package/lib/_shared/locale/lang/th-th.d.ts +205 -0
  142. package/lib/_shared/locale/lang/th-th.js +1 -0
  143. package/lib/_shared/locale/lang/vi-vn.d.ts +205 -0
  144. package/lib/_shared/locale/lang/vi-vn.js +1 -0
  145. package/lib/_shared/locale/lang/zh-cn.d.ts +253 -0
  146. package/lib/_shared/locale/lang/zh-cn.js +1 -0
  147. package/lib/_shared/locale/lang/zh-tw.d.ts +253 -0
  148. package/lib/_shared/locale/lang/zh-tw.js +1 -0
  149. package/lib/_shared/utils/time.js +1 -1
  150. package/lib/_virtual/dynamic-import-helper.js +1 -0
  151. package/lib/index.js +1 -1
  152. package/lib/node_modules/@intlify/core-base/dist/core-base.js +1 -0
  153. package/lib/node_modules/@intlify/message-compiler/dist/message-compiler.js +6 -0
  154. package/lib/node_modules/@intlify/shared/dist/shared.js +7 -0
  155. package/lib/node_modules/@intlify/vue-i18n-core/dist/vue-i18n-core.js +1 -0
  156. package/lib/node_modules/@vue/devtools-api/lib/esm/const.js +1 -0
  157. package/lib/node_modules/@vue/devtools-api/lib/esm/env.js +1 -0
  158. package/lib/node_modules/@vue/devtools-api/lib/esm/index.js +1 -0
  159. package/lib/node_modules/@vue/devtools-api/lib/esm/proxy.js +1 -0
  160. package/lib/node_modules/@vue/devtools-api/lib/esm/time.js +1 -0
  161. package/lib/node_modules/b-validate/es/is.js +1 -0
  162. package/lib/node_modules/b-validate/es/locale/en-US.js +1 -0
  163. package/lib/node_modules/b-validate/es/rules/base.js +1 -0
  164. package/lib/node_modules/b-validate/es/util.js +1 -0
  165. package/lib/style.css +1 -1
  166. package/package.json +3 -2
@@ -27,6 +27,7 @@ const _hoisted_5 = {
27
27
  key: 2,
28
28
  class: "yc-pagination-jumper"
29
29
  };
30
+ const _hoisted_6 = { class: "yc-pagination-jumper-text-goto" };
30
31
  const _sfc_main = /* @__PURE__ */ defineComponent({
31
32
  ...{
32
33
  name: "Pagination"
@@ -71,7 +72,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
71
72
  computedPageSize,
72
73
  size,
73
74
  total,
74
- sizeOptions
75
+ sizeOptions,
76
+ t
75
77
  } = useContext().provide(props, emits);
76
78
  const tempCurrent = ref(computedCurrent.value);
77
79
  watch(
@@ -98,7 +100,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
98
100
  }, [
99
101
  _ctx.showTotal ? (openBlock(), createElementBlock("span", _hoisted_1, [
100
102
  renderSlot(_ctx.$slots, "total", { total: unref(total) }, () => [
101
- createTextVNode("" + toDisplayString(unref(total)) + " 条 ", 1)
103
+ createTextVNode(toDisplayString(unref(t)("pagination.total", [unref(total)])), 1)
102
104
  ])
103
105
  ])) : createCommentVNode("", true),
104
106
  createElementVNode("ul", {
@@ -170,7 +172,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
170
172
  }, _ctx.pageSizeProps, { disabled: _ctx.disabled }), null, 16, ["modelValue", "options", "size", "disabled"])
171
173
  ])) : createCommentVNode("", true),
172
174
  _ctx.showJumper ? (openBlock(), createElementBlock("span", _hoisted_5, [
173
- _cache[5] || (_cache[5] = createElementVNode("span", { class: "yc-pagination-jumper-text-goto" }, " 前往 ", -1)),
175
+ createElementVNode("span", _hoisted_6, toDisplayString(unref(t)("pagination.goto")), 1),
174
176
  createVNode(unref(InputNumber), {
175
177
  modelValue: tempCurrent.value,
176
178
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => tempCurrent.value = $event),
@@ -23,6 +23,11 @@ declare const _default: () => {
23
23
  label: string;
24
24
  value: number;
25
25
  }[]>;
26
+ t: import('vue-i18n').ComposerTranslation<{
27
+ [x: string]: import('@intlify/core-base').LocaleMessage<import('vue-i18n').VueMessageType>;
28
+ }, string, import('@intlify/core-base').RemoveIndexSignature<{
29
+ [x: string]: import('vue-i18n').LocaleMessageValue<import('vue-i18n').VueMessageType>;
30
+ }>, never, never, never>;
26
31
  };
27
32
  inject: () => PaginationContext;
28
33
  };
@@ -4,6 +4,7 @@ import "../../_shared/utils/dom.js";
4
4
  import "../../_shared/utils/time.js";
5
5
  import { getGlobalConfig } from "../../_shared/utils/global-config.js";
6
6
  import useControlValue from "../../_shared/utils/control.js";
7
+ import { useI18n } from "../../node_modules/@intlify/vue-i18n-core/dist/vue-i18n-core.js";
7
8
  const PAGINATION_CONTEXT_KEY = "pagination-context";
8
9
  const useContext = () => {
9
10
  const provide$1 = (props, emits) => {
@@ -22,6 +23,7 @@ const useContext = () => {
22
23
  total: _total
23
24
  } = toRefs(props);
24
25
  const { size } = getGlobalConfig(props);
26
+ const { t } = useI18n();
25
27
  const total = useControlValue(
26
28
  autoAdjust.value ? _total : ref(),
27
29
  autoAdjust.value ? 0 : _total.value
@@ -82,7 +84,7 @@ const useContext = () => {
82
84
  const sizeOptions = computed(() => {
83
85
  return pageSizeOptions.value.map((item) => {
84
86
  return {
85
- label: `${item}条/页`,
87
+ label: `${item}${t("pagination.countPerPage")}`,
86
88
  value: item
87
89
  };
88
90
  });
@@ -104,7 +106,8 @@ const useContext = () => {
104
106
  pagesArray,
105
107
  computedCurrent,
106
108
  computedPageSize,
107
- sizeOptions
109
+ sizeOptions,
110
+ t
108
111
  };
109
112
  };
110
113
  const inject$1 = () => {
@@ -1 +1 @@
1
- .yc-trigger.yc-popconfirm .yc-popconfirm-popup-content{padding:16px;background-color:var(--color-bg-popup);border:1px solid var(--color-neutral-3);border-radius:4px;box-shadow:0 4px 10px rgba(0,0,0,0.1);color:var(--color-text-2);font-size:14px;line-height:1.5715;display:flex;flex-direction:column;gap:16px}.yc-trigger.yc-popconfirm .yc-popconfirm-popup-content .yc-popconfirm-body{display:flex;align-items:center;gap:8px}.yc-trigger.yc-popconfirm .yc-popconfirm-popup-content .yc-popconfirm-body .yc-popconfirm-icon{font-size:18px;height:22px;width:18px;display:flex;justify-content:center;align-items:center}.yc-trigger.yc-popconfirm .yc-popconfirm-popup-content .yc-popconfirm-body .yc-popconfirm-content{text-align:left;word-wrap:break-word}.yc-trigger.yc-popconfirm .yc-popconfirm-popup-content .yc-popconfirm-footer{display:flex;justify-content:flex-end;align-items:center;gap:8px}.yc-trigger.yc-popconfirm .yc-popconfirm-popup-arrow{z-index:1;background-color:var(--color-bg-popup);border:1px solid var(--color-neutral-3)}.yc-trigger.yc-popconfirm-info .yc-popconfirm-icon{color:rgb(var(--primary-6))}.yc-trigger.yc-popconfirm-success .yc-popconfirm-icon{color:rgb(var(--success-6))}.yc-trigger.yc-popconfirm-warning .yc-popconfirm-icon{color:rgb(var(--warning-6))}.yc-trigger.yc-popconfirm-error .yc-popconfirm-icon{color:rgb(var(--danger-6))}
1
+ .yc-popconfirm .yc-popconfirm-popup-content{padding:16px;background-color:var(--color-bg-popup);border:1px solid var(--color-neutral-3);border-radius:4px;box-shadow:0 4px 10px rgba(0,0,0,0.1);color:var(--color-text-2);font-size:14px;line-height:1.5715;display:flex;flex-direction:column;gap:16px}.yc-popconfirm .yc-popconfirm-popup-content .yc-popconfirm-body{display:flex;align-items:center;gap:8px}.yc-popconfirm .yc-popconfirm-popup-content .yc-popconfirm-body .yc-popconfirm-icon{font-size:18px;height:22px;width:18px;display:flex;justify-content:center;align-items:center}.yc-popconfirm .yc-popconfirm-popup-content .yc-popconfirm-body .yc-popconfirm-content{text-align:left;word-wrap:break-word}.yc-popconfirm .yc-popconfirm-popup-content .yc-popconfirm-footer{display:flex;justify-content:flex-end;align-items:center;gap:8px}.yc-popconfirm .yc-popconfirm-popup-arrow{z-index:1;background-color:var(--color-bg-popup);border:1px solid var(--color-neutral-3)}.yc-popconfirm-info .yc-popconfirm-icon{color:rgb(var(--primary-6))}.yc-popconfirm-success .yc-popconfirm-icon{color:rgb(var(--success-6))}.yc-popconfirm-warning .yc-popconfirm-icon{color:rgb(var(--warning-6))}.yc-popconfirm-error .yc-popconfirm-icon{color:rgb(var(--danger-6))}
@@ -9,6 +9,7 @@ import useControlValue from "../_shared/utils/control.js";
9
9
  import useOnBeforeClose from "../Modal/hooks/useOnBeforeClose.js";
10
10
  import Trigger from "../Trigger/index.js";
11
11
  import Button from "../Button/index.js";
12
+ import { useI18n } from "../node_modules/@intlify/vue-i18n-core/dist/vue-i18n-core.js";
12
13
  const _hoisted_1 = { class: "yc-popconfirm-body" };
13
14
  const _hoisted_2 = { class: "yc-popconfirm-icon" };
14
15
  const _hoisted_3 = { class: "yc-popconfirm-content" };
@@ -24,8 +25,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
24
25
  popupVisible: { type: Boolean, default: void 0 },
25
26
  defaultPopupVisible: { type: Boolean, default: false },
26
27
  type: { default: "info" },
27
- okText: { default: "确定" },
28
- cancelText: { default: "取消" },
28
+ okText: { default: "" },
29
+ cancelText: { default: "" },
29
30
  okLoading: { type: Boolean, default: false },
30
31
  okButtonProps: { default: () => {
31
32
  return {};
@@ -54,6 +55,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
54
55
  const emits = __emit;
55
56
  const { popupVisible, defaultPopupVisible, type } = toRefs(props);
56
57
  const { onBeforeOk, onBeforeCancel } = props;
58
+ const { t } = useI18n();
57
59
  const asyncLoading = ref(false);
58
60
  const triggerRef = ref();
59
61
  const computedVisible = useControlValue(
@@ -132,7 +134,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
132
134
  createElementVNode("div", _hoisted_4, [
133
135
  createVNode(unref(Button), mergeProps({ size: "mini" }, _ctx.cancelButtonProps, { onClick: handleCancel }), {
134
136
  default: withCtx(() => [
135
- createTextVNode(toDisplayString(_ctx.cancelText), 1)
137
+ createTextVNode(toDisplayString(_ctx.cancelText || unref(t)("popconfirm.cancelText")), 1)
136
138
  ]),
137
139
  _: 1
138
140
  }, 16),
@@ -142,7 +144,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
142
144
  loading: _ctx.okLoading || asyncLoading.value
143
145
  }, _ctx.okButtonProps, { onClick: handleOk }), {
144
146
  default: withCtx(() => [
145
- createTextVNode(toDisplayString(_ctx.okText), 1)
147
+ createTextVNode(toDisplayString(_ctx.okText || unref(t)("popconfirm.okText")), 1)
146
148
  ]),
147
149
  _: 1
148
150
  }, 16, ["loading"])
@@ -1 +1 @@
1
- .yc-trigger.yc-popover .yc-popover-popup-content{padding:12px 16px;background-color:var(--color-bg-popup);border:1px solid var(--color-neutral-3);border-radius:4px;box-shadow:0 4px 10px rgba(0,0,0,0.1);color:var(--color-text-2);font-size:14px;line-height:1.5715}.yc-trigger.yc-popover .yc-popover-popup-content .yc-popover-title{margin-bottom:4px;color:var(--color-text-1);font-weight:500;font-size:16px}.yc-trigger.yc-popover .yc-popover-popup-arrow{z-index:1;background-color:var(--color-bg-popup);border:1px solid var(--color-neutral-3)}
1
+ .yc-popover .yc-popover-popup-content{padding:12px 16px;background-color:var(--color-bg-popup);border:1px solid var(--color-neutral-3);border-radius:4px;box-shadow:0 4px 10px rgba(0,0,0,0.1);color:var(--color-text-2);font-size:14px;line-height:1.5715}.yc-popover .yc-popover-popup-content .yc-popover-title{margin-bottom:4px;color:var(--color-text-1);font-weight:500;font-size:16px}.yc-popover .yc-popover-popup-arrow{z-index:1;background-color:var(--color-bg-popup);border:1px solid var(--color-neutral-3)}
@@ -1 +1 @@
1
- .yc-trigger.yc-tooltip .yc-tooltip-popup-content{max-width:350px;padding:8px 12px;border-radius:2px;color:var(--color-white);background-color:var(--color-tooltip-bg);font-size:14px;line-height:1.5715;text-align:left;word-wrap:break-word}.yc-trigger.yc-tooltip .yc-tooltip-popup-content.yc-tooltip-mini{padding:4px 12px;font-size:14px}
1
+ .yc-tooltip .yc-tooltip-popup-content{max-width:350px;padding:8px 12px;border-radius:2px;color:var(--color-white);background-color:var(--color-tooltip-bg);font-size:14px;line-height:1.5715;text-align:left;word-wrap:break-word}.yc-tooltip .yc-tooltip-popup-content.yc-tooltip-mini{padding:4px 12px;font-size:14px}
@@ -11,6 +11,7 @@ import _sfc_main$2 from "../_shared/icons/IconInfo.vue.js";
11
11
  import useControlValue from "../_shared/utils/control.js";
12
12
  import Input from "../Input/index.js";
13
13
  import Tooltip from "../Tooltip/index.js";
14
+ import { useI18n } from "../node_modules/@intlify/vue-i18n-core/dist/vue-i18n-core.js";
14
15
  const _sfc_main = /* @__PURE__ */ defineComponent({
15
16
  ...{
16
17
  name: "TypographyBase"
@@ -57,6 +58,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
57
58
  underline,
58
59
  bold
59
60
  } = toRefs(props);
61
+ const { t } = useI18n();
60
62
  const { isSupported, copy } = useClipboard();
61
63
  const isCopied = ref(false);
62
64
  const contentRef = ref();
@@ -72,7 +74,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
72
74
  emits("update:editText", val);
73
75
  emits("change", val);
74
76
  });
75
- ref({});
76
77
  const tags = computed(() => {
77
78
  const tags2 = ["mark", "code", "del", "u", "b"];
78
79
  const attrs = [
@@ -158,7 +159,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
158
159
  onClick: handleEdit
159
160
  }, [
160
161
  createVNode(unref(Tooltip), mergeProps({
161
- content: "编辑",
162
+ content: unref(t)("typography.edit"),
162
163
  position: "top"
163
164
  }, _ctx.editTooltiProps), {
164
165
  default: withCtx(() => [
@@ -167,7 +168,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
167
168
  ])
168
169
  ]),
169
170
  _: 1
170
- }, 16)
171
+ }, 16, ["content"])
171
172
  ])) : createCommentVNode("", true),
172
173
  unref(copyable) ? (openBlock(), createElementBlock("span", {
173
174
  key: 3,
@@ -177,7 +178,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
177
178
  createVNode(unref(Tooltip), mergeProps({ position: "top" }, _ctx.copyTooltiProps), {
178
179
  content: withCtx(() => [
179
180
  renderSlot(_ctx.$slots, "copy-tooltip", { copied: isCopied.value }, () => [
180
- createTextVNode(toDisplayString(`${isCopied.value ? "已复制" : "复制"}`), 1)
181
+ createTextVNode(toDisplayString(unref(t)(`typography.${isCopied.value ? "copied" : "copy"}`)), 1)
181
182
  ])
182
183
  ]),
183
184
  default: withCtx(() => [
@@ -0,0 +1,256 @@
1
+ declare const i18n: import('vue-i18n').I18n<{
2
+ 'zh-CN': {
3
+ empty: {
4
+ description: string;
5
+ };
6
+ drawer: {
7
+ okText: string;
8
+ cancelText: string;
9
+ };
10
+ popconfirm: {
11
+ okText: string;
12
+ cancelText: string;
13
+ };
14
+ modal: {
15
+ okText: string;
16
+ cancelText: string;
17
+ };
18
+ pagination: {
19
+ goto: string;
20
+ page: string;
21
+ countPerPage: string;
22
+ total: string;
23
+ };
24
+ calendar: {
25
+ formatYear: string;
26
+ formatMonth: string;
27
+ today: string;
28
+ view: {
29
+ month: string;
30
+ year: string;
31
+ week: string;
32
+ day: string;
33
+ };
34
+ month: {
35
+ long: {
36
+ January: string;
37
+ February: string;
38
+ March: string;
39
+ April: string;
40
+ May: string;
41
+ June: string;
42
+ July: string;
43
+ August: string;
44
+ September: string;
45
+ October: string;
46
+ November: string;
47
+ December: string;
48
+ };
49
+ short: {
50
+ January: string;
51
+ February: string;
52
+ March: string;
53
+ April: string;
54
+ May: string;
55
+ June: string;
56
+ July: string;
57
+ August: string;
58
+ September: string;
59
+ October: string;
60
+ November: string;
61
+ December: string;
62
+ };
63
+ };
64
+ week: {
65
+ long: {
66
+ self: string;
67
+ monday: string;
68
+ tuesday: string;
69
+ wednesday: string;
70
+ thursday: string;
71
+ friday: string;
72
+ saturday: string;
73
+ sunday: string;
74
+ };
75
+ short: {
76
+ self: string;
77
+ monday: string;
78
+ tuesday: string;
79
+ wednesday: string;
80
+ thursday: string;
81
+ friday: string;
82
+ saturday: string;
83
+ sunday: string;
84
+ };
85
+ };
86
+ };
87
+ image: {
88
+ loading: string;
89
+ };
90
+ imagePreview: {
91
+ fullScreen: string;
92
+ rotateRight: string;
93
+ rotateLeft: string;
94
+ zoomIn: string;
95
+ zoomOut: string;
96
+ originalSize: string;
97
+ };
98
+ typography: {
99
+ copied: string;
100
+ copy: string;
101
+ expand: string;
102
+ collapse: string;
103
+ edit: string;
104
+ };
105
+ colorPicker: {
106
+ history: string;
107
+ preset: string;
108
+ empty: string;
109
+ };
110
+ table: {
111
+ okText: string;
112
+ resetText: string;
113
+ };
114
+ upload: {
115
+ start: string;
116
+ cancel: string;
117
+ delete: string;
118
+ retry: string;
119
+ buttonText: string;
120
+ preview: string;
121
+ drag: string;
122
+ dragHover: string;
123
+ error: string;
124
+ };
125
+ datePicker: {
126
+ view: {
127
+ month: string;
128
+ year: string;
129
+ week: string;
130
+ day: string;
131
+ };
132
+ month: {
133
+ long: {
134
+ January: string;
135
+ February: string;
136
+ March: string;
137
+ April: string;
138
+ May: string;
139
+ June: string;
140
+ July: string;
141
+ August: string;
142
+ September: string;
143
+ October: string;
144
+ November: string;
145
+ December: string;
146
+ };
147
+ short: {
148
+ January: string;
149
+ February: string;
150
+ March: string;
151
+ April: string;
152
+ May: string;
153
+ June: string;
154
+ July: string;
155
+ August: string;
156
+ September: string;
157
+ October: string;
158
+ November: string;
159
+ December: string;
160
+ };
161
+ };
162
+ week: {
163
+ long: {
164
+ self: string;
165
+ monday: string;
166
+ tuesday: string;
167
+ wednesday: string;
168
+ thursday: string;
169
+ friday: string;
170
+ saturday: string;
171
+ sunday: string;
172
+ };
173
+ short: {
174
+ self: string;
175
+ monday: string;
176
+ tuesday: string;
177
+ wednesday: string;
178
+ thursday: string;
179
+ friday: string;
180
+ saturday: string;
181
+ sunday: string;
182
+ };
183
+ };
184
+ placeholder: {
185
+ date: string;
186
+ week: string;
187
+ month: string;
188
+ year: string;
189
+ quarter: string;
190
+ time: string;
191
+ };
192
+ rangePlaceholder: {
193
+ date: string[];
194
+ week: string[];
195
+ month: string[];
196
+ year: string[];
197
+ quarter: string[];
198
+ time: string[];
199
+ };
200
+ selectTime: string;
201
+ today: string;
202
+ now: string;
203
+ ok: string;
204
+ };
205
+ form: {
206
+ validateMessages: {
207
+ required: string;
208
+ type: {
209
+ string: string;
210
+ number: string;
211
+ boolean: string;
212
+ array: string;
213
+ object: string;
214
+ url: string;
215
+ email: string;
216
+ ip: string;
217
+ };
218
+ number: {
219
+ min: string;
220
+ max: string;
221
+ equal: string;
222
+ range: string;
223
+ positive: string;
224
+ negative: string;
225
+ };
226
+ array: {
227
+ length: string;
228
+ minLength: string;
229
+ maxLength: string;
230
+ includes: string;
231
+ deepEqual: string;
232
+ empty: string;
233
+ };
234
+ string: {
235
+ minLength: string;
236
+ maxLength: string;
237
+ length: string;
238
+ match: string;
239
+ uppercase: string;
240
+ lowercase: string;
241
+ };
242
+ object: {
243
+ deepEqual: string;
244
+ hasKeys: string;
245
+ empty: string;
246
+ };
247
+ boolean: {
248
+ true: string;
249
+ false: string;
250
+ };
251
+ };
252
+ };
253
+ };
254
+ }, {}, {}, string>;
255
+ export declare function loadLanguageAsync(locale: string): Promise<string>;
256
+ export default i18n;
@@ -0,0 +1,35 @@
1
+ import __variableDynamicImportRuntimeHelper from "../../_virtual/dynamic-import-helper.js";
2
+ import lang from "./lang/zh-cn.js";
3
+ import { createI18n } from "../../node_modules/@intlify/vue-i18n-core/dist/vue-i18n-core.js";
4
+ const i18n = createI18n({
5
+ locale: "zh-CN",
6
+ fallbackLocale: "zh-CN",
7
+ messages: {
8
+ "zh-CN": lang
9
+ },
10
+ globalInjection: true,
11
+ missingWarn: false,
12
+ fallbackWarn: false
13
+ });
14
+ const i18nGlobal = i18n.global;
15
+ async function loadLanguageAsync(locale) {
16
+ const loadedLanguages = Object.keys(i18nGlobal.messages.value);
17
+ if (i18nGlobal.locale.value === locale || loadedLanguages.includes(locale)) {
18
+ i18nGlobal.locale.value = locale;
19
+ return locale;
20
+ }
21
+ try {
22
+ const localeName = locale.split("-").map((v) => v.toLocaleLowerCase()).join("-");
23
+ const messages = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./lang/ar-eg.ts": () => import("./lang/ar-eg.js"), "./lang/de-de.ts": () => import("./lang/de-de.js"), "./lang/en-us.ts": () => import("./lang/en-us.js"), "./lang/es-es.ts": () => import("./lang/es-es.js"), "./lang/fr-fr.ts": () => import("./lang/fr-fr.js"), "./lang/id-id.ts": () => import("./lang/id-id.js"), "./lang/it-it.ts": () => import("./lang/it-it.js"), "./lang/ja-jp.ts": () => import("./lang/ja-jp.js"), "./lang/km-kh.ts": () => import("./lang/km-kh.js"), "./lang/ko-kr.ts": () => import("./lang/ko-kr.js"), "./lang/ms-my.ts": () => import("./lang/ms-my.js"), "./lang/nl-nl.ts": () => import("./lang/nl-nl.js"), "./lang/pt-pt.ts": () => import("./lang/pt-pt.js"), "./lang/ru-ru.ts": () => import("./lang/ru-ru.js"), "./lang/th-th.ts": () => import("./lang/th-th.js"), "./lang/vi-vn.ts": () => import("./lang/vi-vn.js"), "./lang/zh-cn.ts": () => import("./lang/zh-cn.js"), "./lang/zh-tw.ts": () => import("./lang/zh-tw.js") }), `./lang/${localeName}.ts`, 3);
24
+ i18nGlobal.setLocaleMessage(locale, messages.default);
25
+ i18nGlobal.locale.value = locale;
26
+ return locale;
27
+ } catch (error) {
28
+ console.error(`无法加载语言文件 ${locale}.ts:`, error);
29
+ return i18nGlobal.locale.value;
30
+ }
31
+ }
32
+ export {
33
+ i18n as default,
34
+ loadLanguageAsync
35
+ };