yc-design-vue 1.7.9 → 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 (170) 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/ConfigProvider/index.d.ts +3 -0
  7. package/es/ConfigProvider/index.vue.d.ts +1 -0
  8. package/es/ConfigProvider/index.vue.js +13 -2
  9. package/es/ConfigProvider/type.d.ts +1 -0
  10. package/es/Drawer/Drawer.vue.js +6 -4
  11. package/es/Drawer/DrawerService.vue.js +2 -2
  12. package/es/Empty/index.vue.js +11 -4
  13. package/es/Image/Image.vue.js +4 -2
  14. package/es/Image/ImagePreviewToolbar.vue.js +13 -29
  15. package/es/Layout/hooks/useTheme.js +0 -1
  16. package/es/Modal/Modal.vue.js +6 -4
  17. package/es/Modal/ModalService.vue.js +2 -2
  18. package/es/Pagination/Pagination.vue.js +5 -3
  19. package/es/Pagination/hooks/useContext.d.ts +5 -0
  20. package/es/Pagination/hooks/useContext.js +5 -2
  21. package/es/Popconfirm/index.vue.js +6 -4
  22. package/es/Transfer/TransferPanel.vue.js +2 -2
  23. package/es/Typography/TypographyBase.vue.js +7 -6
  24. package/es/_shared/icons/IconCopy.vue.js +1 -17
  25. package/es/_shared/icons/IconCopy.vue2.js +17 -1
  26. package/es/_shared/icons/IconDelete.vue.js +1 -17
  27. package/es/_shared/icons/IconDelete.vue2.js +17 -1
  28. package/es/_shared/icons/IconEdit.vue.js +1 -17
  29. package/es/_shared/icons/IconEdit.vue2.js +17 -1
  30. package/es/_shared/icons/IconSearch.vue.js +1 -17
  31. package/es/_shared/icons/IconSearch.vue2.js +17 -1
  32. package/es/_shared/locale/i18n.d.ts +256 -0
  33. package/es/_shared/locale/i18n.js +35 -0
  34. package/es/_shared/locale/lang/ar-eg.d.ts +205 -0
  35. package/es/_shared/locale/lang/ar-eg.js +153 -0
  36. package/es/_shared/locale/lang/de-de.d.ts +205 -0
  37. package/es/_shared/locale/lang/de-de.js +153 -0
  38. package/es/_shared/locale/lang/en-us.d.ts +253 -0
  39. package/es/_shared/locale/lang/en-us.js +158 -0
  40. package/es/_shared/locale/lang/es-es.d.ts +205 -0
  41. package/es/_shared/locale/lang/es-es.js +153 -0
  42. package/es/_shared/locale/lang/fr-fr.d.ts +205 -0
  43. package/es/_shared/locale/lang/fr-fr.js +153 -0
  44. package/es/_shared/locale/lang/id-id.d.ts +205 -0
  45. package/es/_shared/locale/lang/id-id.js +153 -0
  46. package/es/_shared/locale/lang/it-it.d.ts +205 -0
  47. package/es/_shared/locale/lang/it-it.js +153 -0
  48. package/es/_shared/locale/lang/ja-jp.d.ts +253 -0
  49. package/es/_shared/locale/lang/ja-jp.js +201 -0
  50. package/es/_shared/locale/lang/km-kh.d.ts +205 -0
  51. package/es/_shared/locale/lang/km-kh.js +153 -0
  52. package/es/_shared/locale/lang/ko-kr.d.ts +205 -0
  53. package/es/_shared/locale/lang/ko-kr.js +153 -0
  54. package/es/_shared/locale/lang/ms-my.d.ts +205 -0
  55. package/es/_shared/locale/lang/ms-my.js +153 -0
  56. package/es/_shared/locale/lang/nl-nl.d.ts +253 -0
  57. package/es/_shared/locale/lang/nl-nl.js +201 -0
  58. package/es/_shared/locale/lang/pt-pt.d.ts +205 -0
  59. package/es/_shared/locale/lang/pt-pt.js +153 -0
  60. package/es/_shared/locale/lang/ru-ru.d.ts +253 -0
  61. package/es/_shared/locale/lang/ru-ru.js +201 -0
  62. package/es/_shared/locale/lang/th-th.d.ts +205 -0
  63. package/es/_shared/locale/lang/th-th.js +153 -0
  64. package/es/_shared/locale/lang/vi-vn.d.ts +205 -0
  65. package/es/_shared/locale/lang/vi-vn.js +153 -0
  66. package/es/_shared/locale/lang/zh-cn.d.ts +253 -0
  67. package/es/_shared/locale/lang/zh-cn.js +201 -0
  68. package/es/_shared/locale/lang/zh-tw.d.ts +253 -0
  69. package/es/_shared/locale/lang/zh-tw.js +201 -0
  70. package/es/_shared/utils/time.js +1 -1
  71. package/es/_virtual/dynamic-import-helper.js +19 -0
  72. package/es/index.js +2 -0
  73. package/es/node_modules/@intlify/core-base/dist/core-base.js +1129 -0
  74. package/es/node_modules/@intlify/message-compiler/dist/message-compiler.js +65 -0
  75. package/es/node_modules/@intlify/shared/dist/shared.js +199 -0
  76. package/es/node_modules/@intlify/vue-i18n-core/dist/vue-i18n-core.js +1381 -0
  77. package/es/node_modules/@vue/devtools-api/lib/esm/const.js +6 -0
  78. package/es/node_modules/@vue/devtools-api/lib/esm/env.js +12 -0
  79. package/es/node_modules/@vue/devtools-api/lib/esm/index.js +26 -0
  80. package/es/node_modules/@vue/devtools-api/lib/esm/proxy.js +103 -0
  81. package/es/node_modules/@vue/devtools-api/lib/esm/time.js +25 -0
  82. package/es/node_modules/b-validate/es/is.js +27 -0
  83. package/es/node_modules/b-validate/es/locale/en-US.js +50 -0
  84. package/es/node_modules/b-validate/es/rules/base.js +86 -0
  85. package/es/node_modules/b-validate/es/util.js +25 -0
  86. package/lib/Calendar/Calendar.vue.js +1 -1
  87. package/lib/Calendar/CalendarMonth.vue.js +1 -1
  88. package/lib/Calendar/CalendarYear.vue.js +1 -1
  89. package/lib/ColorPicker/ColorList.vue.js +1 -1
  90. package/lib/ColorPicker/ColorPanel.vue.js +1 -1
  91. package/lib/ConfigProvider/index.d.ts +3 -0
  92. package/lib/ConfigProvider/index.vue.d.ts +1 -0
  93. package/lib/ConfigProvider/index.vue.js +1 -1
  94. package/lib/ConfigProvider/type.d.ts +1 -0
  95. package/lib/Drawer/Drawer.vue.js +1 -1
  96. package/lib/Drawer/DrawerService.vue.js +1 -1
  97. package/lib/Empty/index.vue.js +1 -1
  98. package/lib/Image/Image.vue.js +1 -1
  99. package/lib/Image/ImagePreviewToolbar.vue.js +1 -1
  100. package/lib/Modal/Modal.vue.js +1 -1
  101. package/lib/Modal/ModalService.vue.js +1 -1
  102. package/lib/Pagination/Pagination.vue.js +1 -1
  103. package/lib/Pagination/hooks/useContext.d.ts +5 -0
  104. package/lib/Pagination/hooks/useContext.js +1 -1
  105. package/lib/Popconfirm/index.vue.js +1 -1
  106. package/lib/Transfer/TransferPanel.vue.js +1 -1
  107. package/lib/Typography/TypographyBase.vue.js +1 -1
  108. package/lib/_shared/icons/IconCopy.vue.js +1 -1
  109. package/lib/_shared/icons/IconCopy.vue2.js +1 -1
  110. package/lib/_shared/icons/IconDelete.vue.js +1 -1
  111. package/lib/_shared/icons/IconDelete.vue2.js +1 -1
  112. package/lib/_shared/icons/IconEdit.vue.js +1 -1
  113. package/lib/_shared/icons/IconEdit.vue2.js +1 -1
  114. package/lib/_shared/icons/IconSearch.vue.js +1 -1
  115. package/lib/_shared/icons/IconSearch.vue2.js +1 -1
  116. package/lib/_shared/locale/i18n.d.ts +256 -0
  117. package/lib/_shared/locale/i18n.js +1 -0
  118. package/lib/_shared/locale/lang/ar-eg.d.ts +205 -0
  119. package/lib/_shared/locale/lang/ar-eg.js +1 -0
  120. package/lib/_shared/locale/lang/de-de.d.ts +205 -0
  121. package/lib/_shared/locale/lang/de-de.js +1 -0
  122. package/lib/_shared/locale/lang/en-us.d.ts +253 -0
  123. package/lib/_shared/locale/lang/en-us.js +1 -0
  124. package/lib/_shared/locale/lang/es-es.d.ts +205 -0
  125. package/lib/_shared/locale/lang/es-es.js +1 -0
  126. package/lib/_shared/locale/lang/fr-fr.d.ts +205 -0
  127. package/lib/_shared/locale/lang/fr-fr.js +1 -0
  128. package/lib/_shared/locale/lang/id-id.d.ts +205 -0
  129. package/lib/_shared/locale/lang/id-id.js +1 -0
  130. package/lib/_shared/locale/lang/it-it.d.ts +205 -0
  131. package/lib/_shared/locale/lang/it-it.js +1 -0
  132. package/lib/_shared/locale/lang/ja-jp.d.ts +253 -0
  133. package/lib/_shared/locale/lang/ja-jp.js +1 -0
  134. package/lib/_shared/locale/lang/km-kh.d.ts +205 -0
  135. package/lib/_shared/locale/lang/km-kh.js +1 -0
  136. package/lib/_shared/locale/lang/ko-kr.d.ts +205 -0
  137. package/lib/_shared/locale/lang/ko-kr.js +1 -0
  138. package/lib/_shared/locale/lang/ms-my.d.ts +205 -0
  139. package/lib/_shared/locale/lang/ms-my.js +1 -0
  140. package/lib/_shared/locale/lang/nl-nl.d.ts +253 -0
  141. package/lib/_shared/locale/lang/nl-nl.js +1 -0
  142. package/lib/_shared/locale/lang/pt-pt.d.ts +205 -0
  143. package/lib/_shared/locale/lang/pt-pt.js +1 -0
  144. package/lib/_shared/locale/lang/ru-ru.d.ts +253 -0
  145. package/lib/_shared/locale/lang/ru-ru.js +1 -0
  146. package/lib/_shared/locale/lang/th-th.d.ts +205 -0
  147. package/lib/_shared/locale/lang/th-th.js +1 -0
  148. package/lib/_shared/locale/lang/vi-vn.d.ts +205 -0
  149. package/lib/_shared/locale/lang/vi-vn.js +1 -0
  150. package/lib/_shared/locale/lang/zh-cn.d.ts +253 -0
  151. package/lib/_shared/locale/lang/zh-cn.js +1 -0
  152. package/lib/_shared/locale/lang/zh-tw.d.ts +253 -0
  153. package/lib/_shared/locale/lang/zh-tw.js +1 -0
  154. package/lib/_shared/utils/time.js +1 -1
  155. package/lib/_virtual/dynamic-import-helper.js +1 -0
  156. package/lib/index.js +1 -1
  157. package/lib/node_modules/@intlify/core-base/dist/core-base.js +1 -0
  158. package/lib/node_modules/@intlify/message-compiler/dist/message-compiler.js +6 -0
  159. package/lib/node_modules/@intlify/shared/dist/shared.js +7 -0
  160. package/lib/node_modules/@intlify/vue-i18n-core/dist/vue-i18n-core.js +1 -0
  161. package/lib/node_modules/@vue/devtools-api/lib/esm/const.js +1 -0
  162. package/lib/node_modules/@vue/devtools-api/lib/esm/env.js +1 -0
  163. package/lib/node_modules/@vue/devtools-api/lib/esm/index.js +1 -0
  164. package/lib/node_modules/@vue/devtools-api/lib/esm/proxy.js +1 -0
  165. package/lib/node_modules/@vue/devtools-api/lib/esm/time.js +1 -0
  166. package/lib/node_modules/b-validate/es/is.js +1 -0
  167. package/lib/node_modules/b-validate/es/locale/en-US.js +1 -0
  168. package/lib/node_modules/b-validate/es/rules/base.js +1 -0
  169. package/lib/node_modules/b-validate/es/util.js +1 -0
  170. package/package.json +3 -2
@@ -1,4 +1,4 @@
1
- import { defineComponent, toRefs, ref, watch, computed, createElementBlock, openBlock, normalizeClass, unref, createElementVNode, createVNode, withCtx, renderSlot, createTextVNode, toDisplayString, isRef, createBlock, createSlots, normalizeProps, guardReactiveProps } from "vue";
1
+ import { defineComponent, toRefs, ref, computed, watch, createElementBlock, openBlock, normalizeClass, unref, createElementVNode, createVNode, withCtx, renderSlot, createTextVNode, toDisplayString, isRef, createBlock, createSlots, normalizeProps, guardReactiveProps } from "vue";
2
2
  import dayjs from "../node_modules/dayjs/dayjs.min.js";
3
3
  import "../node_modules/tinycolor2/esm/tinycolor.js";
4
4
  import "../_shared/utils/dom.js";
@@ -16,6 +16,7 @@ import _sfc_main$4 from "./CalendarMonth.vue.js";
16
16
  /* empty css */
17
17
  import _sfc_main$5 from "./CalendarYear.vue.js";
18
18
  /* empty css */
19
+ import { useI18n } from "../node_modules/@intlify/vue-i18n-core/dist/vue-i18n-core.js";
19
20
  import _sfc_main$3 from "../Radio/RadioGroup.vue.js";
20
21
  /* empty css */
21
22
  const _hoisted_1 = { class: "yc-calendar-header" };
@@ -46,6 +47,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
46
47
  defaultMode,
47
48
  modes: _modes
48
49
  } = toRefs(props);
50
+ const { t } = useI18n();
49
51
  const computedValue = useControlValue(
50
52
  modelValue,
51
53
  defaultValue.value,
@@ -55,6 +57,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
55
57
  }
56
58
  );
57
59
  const recordDate = ref({});
60
+ const recordDateFormat = computed(() => {
61
+ const { year, month } = recordDate.value;
62
+ return dayjs().set("year", year).set("month", month).format(t("calendar.formatMonth"));
63
+ });
58
64
  watch(
59
65
  () => computedValue.value,
60
66
  (val) => {
@@ -78,14 +84,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
78
84
  }
79
85
  );
80
86
  const modes = computed(() => {
81
- const map = {
82
- month: "月",
83
- year: "年"
84
- };
85
- return _modes.value.map((item) => {
87
+ return _modes.value.map((v) => {
86
88
  return {
87
- label: map[item],
88
- value: item
89
+ label: t(`calendar.view.${v}`),
90
+ value: v
89
91
  };
90
92
  });
91
93
  });
@@ -136,7 +138,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
136
138
  year: recordDate.value.year,
137
139
  month: recordDate.value.month
138
140
  }, () => [
139
- createTextVNode(toDisplayString(recordDate.value.year) + " 年 " + toDisplayString(recordDate.value.month) + " 月 ", 1)
141
+ createTextVNode(toDisplayString(recordDateFormat.value), 1)
140
142
  ])
141
143
  ]),
142
144
  createVNode(unref(_sfc_main$1), {
@@ -156,11 +158,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
156
158
  onClick: _cache[2] || (_cache[2] = ($event) => handleDateChange("today")),
157
159
  size: "small"
158
160
  }, {
159
- default: withCtx(() => _cache[4] || (_cache[4] = [
160
- createTextVNode(" 今天 ", -1)
161
- ])),
162
- _: 1,
163
- __: [4]
161
+ default: withCtx(() => [
162
+ createTextVNode(toDisplayString(unref(t)("calendar.today")), 1)
163
+ ]),
164
+ _: 1
164
165
  })
165
166
  ]),
166
167
  createElementVNode("div", _hoisted_4, [
@@ -6,6 +6,7 @@ import { generateMonthCalendar } from "../_shared/utils/time.js";
6
6
  import "../Empty/index.js";
7
7
  /* empty css */
8
8
  import useControlValue from "../_shared/utils/control.js";
9
+ import { useI18n } from "../node_modules/@intlify/vue-i18n-core/dist/vue-i18n-core.js";
9
10
  const _hoisted_1 = { class: "yc-calendar-week-list" };
10
11
  const _hoisted_2 = { class: "yc-calendar-month-cell-body" };
11
12
  const _hoisted_3 = ["onClick"];
@@ -24,8 +25,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
24
25
  setup(__props) {
25
26
  const props = __props;
26
27
  const { computedValue, calendar: _calendar, small, recordDate } = toRefs(props);
28
+ const { t } = useI18n();
27
29
  const weekList = computed(() => {
28
- return small.value ? ["日", "一", "二", "三", "四", "五", "六"] : ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];
30
+ return [
31
+ "sunday",
32
+ "monday",
33
+ "tuesday",
34
+ "wednesday",
35
+ "thursday",
36
+ "friday",
37
+ "saturday"
38
+ ].map((v) => t(`calendar.week.${small.value ? "short" : "long"}.${v}`));
29
39
  });
30
40
  const calendar = useControlValue(_calendar, []);
31
41
  watch(
@@ -1,4 +1,4 @@
1
- import { defineComponent, toRefs, ref, watch, createElementBlock, openBlock, Fragment, renderList, createElementVNode, createVNode, toDisplayString, unref, createSlots, withCtx, renderSlot } from "vue";
1
+ import { defineComponent, toRefs, ref, computed, watch, createElementBlock, openBlock, Fragment, renderList, createElementVNode, createVNode, toDisplayString, unref, createSlots, withCtx, renderSlot } from "vue";
2
2
  import "../node_modules/tinycolor2/esm/tinycolor.js";
3
3
  import "../_shared/utils/dom.js";
4
4
  import { generateMonthCalendar } from "../_shared/utils/time.js";
@@ -6,6 +6,7 @@ import "../Empty/index.js";
6
6
  /* empty css */
7
7
  import _sfc_main$1 from "./CalendarMonth.vue.js";
8
8
  /* empty css */
9
+ import { useI18n } from "../node_modules/@intlify/vue-i18n-core/dist/vue-i18n-core.js";
9
10
  const _hoisted_1 = { class: "yc-calendar-year" };
10
11
  const _hoisted_2 = { class: "yc-calendar-year-cell-title" };
11
12
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -18,21 +19,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
18
19
  setup(__props) {
19
20
  const props = __props;
20
21
  const { computedValue, recordDate } = toRefs(props);
22
+ const { t } = useI18n();
21
23
  const calendar = ref([]);
22
- const monthList = [
23
- "一月",
24
- "二月",
25
- "三月",
26
- "四月",
27
- "五月",
28
- "六月",
29
- "七月",
30
- "八月",
31
- "九月",
32
- "十月",
33
- "十一月",
34
- "十二月"
35
- ];
24
+ const monthList = computed(() => {
25
+ return [
26
+ "January",
27
+ "February",
28
+ "March",
29
+ "April",
30
+ "May",
31
+ "June",
32
+ "July",
33
+ "August",
34
+ "September",
35
+ "October",
36
+ "November",
37
+ "December"
38
+ ].map((v) => t(`calendar.month.short.${v}`));
39
+ });
36
40
  watch(
37
41
  () => recordDate.value.year,
38
42
  () => {
@@ -63,7 +67,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
63
67
  key: i1,
64
68
  class: "yc-calendar-year-cell"
65
69
  }, [
66
- createElementVNode("div", _hoisted_2, toDisplayString(monthList[i * 4 + i1]), 1),
70
+ createElementVNode("div", _hoisted_2, toDisplayString(monthList.value[i * 4 + i1]), 1),
67
71
  createVNode(_sfc_main$1, {
68
72
  "computed-value": unref(computedValue),
69
73
  calendar: col,
@@ -1,4 +1,5 @@
1
- import { defineComponent, createElementBlock, openBlock, createElementVNode, createCommentVNode, toDisplayString, Fragment, renderList, normalizeStyle } from "vue";
1
+ import { defineComponent, createElementBlock, openBlock, createElementVNode, createCommentVNode, toDisplayString, unref, Fragment, renderList, normalizeStyle } from "vue";
2
+ import { useI18n } from "../node_modules/@intlify/vue-i18n-core/dist/vue-i18n-core.js";
2
3
  const _hoisted_1 = { class: "yc-color-picker-colors-section" };
3
4
  const _hoisted_2 = { class: "yc-color-picker-colors-text" };
4
5
  const _hoisted_3 = {
@@ -15,10 +16,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
15
16
  },
16
17
  emits: ["colorClick"],
17
18
  setup(__props) {
19
+ const { t } = useI18n();
18
20
  return (_ctx, _cache) => {
19
21
  return openBlock(), createElementBlock("div", _hoisted_1, [
20
22
  createElementVNode("div", _hoisted_2, toDisplayString(_ctx.label), 1),
21
- !_ctx.colors.length ? (openBlock(), createElementBlock("div", _hoisted_3, "暂无")) : createCommentVNode("", true),
23
+ !_ctx.colors.length ? (openBlock(), createElementBlock("div", _hoisted_3, toDisplayString(unref(t)("colorPicker.empty")), 1)) : createCommentVNode("", true),
22
24
  createElementVNode("div", _hoisted_4, [
23
25
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.colors, (color, index) => {
24
26
  return openBlock(), createElementBlock("div", {
@@ -8,6 +8,7 @@ import _sfc_main$4 from "./ColorList.vue.js";
8
8
  /* empty css */
9
9
  import _sfc_main$2 from "./ColorControl.vue.js";
10
10
  /* empty css */
11
+ import { useI18n } from "../node_modules/@intlify/vue-i18n-core/dist/vue-i18n-core.js";
11
12
  const _hoisted_1 = { class: "yc-color-picker-panel-control" };
12
13
  const _hoisted_2 = { class: "yc-color-picker-control-wrapper" };
13
14
  const _hoisted_3 = { class: "yc-color-picker-control-bar-bg" };
@@ -31,6 +32,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
31
32
  presetColors,
32
33
  historyColors
33
34
  } = useContext().inject();
35
+ const { t } = useI18n();
34
36
  const colorBarRef = ref();
35
37
  const alphaBarRef = ref();
36
38
  const paletteRef = ref();
@@ -128,16 +130,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
128
130
  unref(showHistory) || unref(showPreset) ? (openBlock(), createElementBlock("div", _hoisted_4, [
129
131
  unref(showHistory) ? (openBlock(), createBlock(_sfc_main$4, {
130
132
  key: 0,
131
- label: "最近使用的颜色",
133
+ label: unref(t)("colorPicker.history"),
132
134
  colors: unref(historyColors),
133
135
  onColorClick: handleColorClick
134
- }, null, 8, ["colors"])) : createCommentVNode("", true),
136
+ }, null, 8, ["label", "colors"])) : createCommentVNode("", true),
135
137
  unref(showPreset) ? (openBlock(), createBlock(_sfc_main$4, {
136
138
  key: 1,
137
- label: "系统预设的颜色",
139
+ label: unref(t)("colorPicker.preset"),
138
140
  colors: unref(presetColors),
139
141
  onColorClick: handleColorClick
140
- }, null, 8, ["colors"])) : createCommentVNode("", true)
142
+ }, null, 8, ["label", "colors"])) : createCommentVNode("", true)
141
143
  ])) : createCommentVNode("", true)
142
144
  ], 2);
143
145
  };
@@ -9,6 +9,7 @@ declare const ConfigProvider: {
9
9
  updateAtScroll: boolean;
10
10
  scrollToClose: boolean;
11
11
  zIndex: number;
12
+ locale: "ar-EG" | "de-DE" | "en-US" | "es-ES" | "fr-FR" | "id-ID" | "it-it" | "ja-JP" | "km-KH" | "ko-KR" | "ms-MY" | "nl-NL" | "pt-PT" | "ru-RU" | "th-TH" | "vi-VN" | "zh-CN" | "zh-TW";
12
13
  }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
13
14
  P: {};
14
15
  B: {};
@@ -22,6 +23,7 @@ declare const ConfigProvider: {
22
23
  updateAtScroll: boolean;
23
24
  scrollToClose: boolean;
24
25
  zIndex: number;
26
+ locale: "ar-EG" | "de-DE" | "en-US" | "es-ES" | "fr-FR" | "id-ID" | "it-it" | "ja-JP" | "km-KH" | "ko-KR" | "ms-MY" | "nl-NL" | "pt-PT" | "ru-RU" | "th-TH" | "vi-VN" | "zh-CN" | "zh-TW";
25
27
  }>;
26
28
  __isFragment?: never;
27
29
  __isTeleport?: never;
@@ -32,6 +34,7 @@ declare const ConfigProvider: {
32
34
  updateAtScroll: boolean;
33
35
  scrollToClose: boolean;
34
36
  zIndex: number;
37
+ locale: "ar-EG" | "de-DE" | "en-US" | "es-ES" | "fr-FR" | "id-ID" | "it-it" | "ja-JP" | "km-KH" | "ko-KR" | "ms-MY" | "nl-NL" | "pt-PT" | "ru-RU" | "th-TH" | "vi-VN" | "zh-CN" | "zh-TW";
35
38
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
36
39
  $slots: Readonly<import('./type').ConfigconfigSlots> & import('./type').ConfigconfigSlots;
37
40
  }) & {
@@ -12,6 +12,7 @@ declare const __VLS_component: import('vue').DefineComponent<ConfigProviderProps
12
12
  updateAtScroll: boolean;
13
13
  scrollToClose: boolean;
14
14
  zIndex: number;
15
+ locale: "ar-EG" | "de-DE" | "en-US" | "es-ES" | "fr-FR" | "id-ID" | "it-it" | "ja-JP" | "km-KH" | "ko-KR" | "ms-MY" | "nl-NL" | "pt-PT" | "ru-RU" | "th-TH" | "vi-VN" | "zh-CN" | "zh-TW";
15
16
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
16
17
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
17
18
  export default _default;
@@ -1,14 +1,16 @@
1
- import { defineComponent, useSlots, toRefs, provide, renderSlot } from "vue";
1
+ import { defineComponent, useSlots, toRefs, provide, watch, renderSlot } from "vue";
2
2
  import "../node_modules/tinycolor2/esm/tinycolor.js";
3
3
  import "../_shared/utils/dom.js";
4
4
  import "../_shared/utils/time.js";
5
5
  import { CONFIG_PROVIDER_PROVIDE_KEY } from "../_shared/utils/global-config.js";
6
+ import { loadLanguageAsync } from "../_shared/locale/i18n.js";
6
7
  const _sfc_main = /* @__PURE__ */ defineComponent({
7
8
  ...{
8
9
  name: "ConfigProvider"
9
10
  },
10
11
  __name: "index",
11
12
  props: {
13
+ locale: { default: "zh-CN" },
12
14
  zIndex: { default: 1001 },
13
15
  size: { default: "medium" },
14
16
  popupContainer: { default: "body" },
@@ -18,7 +20,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
18
20
  setup(__props) {
19
21
  const slots = useSlots();
20
22
  const props = __props;
21
- const { zIndex, size, updateAtScroll, scrollToClose, popupContainer } = toRefs(props);
23
+ const { locale, zIndex, size, updateAtScroll, scrollToClose, popupContainer } = toRefs(props);
22
24
  provide(CONFIG_PROVIDER_PROVIDE_KEY, {
23
25
  slots,
24
26
  zIndex,
@@ -27,6 +29,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
27
29
  scrollToClose,
28
30
  popupContainer
29
31
  });
32
+ watch(
33
+ () => locale.value,
34
+ (v) => {
35
+ loadLanguageAsync(v);
36
+ },
37
+ {
38
+ immediate: true
39
+ }
40
+ );
30
41
  return (_ctx, _cache) => {
31
42
  return renderSlot(_ctx.$slots, "default");
32
43
  };
@@ -1,6 +1,7 @@
1
1
  import { Size, PopupContainer } from '../_shared/type';
2
2
  import { VNode } from 'vue';
3
3
  export interface ConfigProviderProps {
4
+ locale?: 'ar-EG' | 'de-DE' | 'en-US' | 'es-ES' | 'fr-FR' | 'id-ID' | 'it-it' | 'ja-JP' | 'km-KH' | 'ko-KR' | 'ms-MY' | 'nl-NL' | 'pt-PT' | 'ru-RU' | 'th-TH' | 'vi-VN' | 'zh-CN' | 'zh-TW';
4
5
  zIndex?: number;
5
6
  size?: Size;
6
7
  popupContainer?: PopupContainer;
@@ -9,6 +9,7 @@ import _sfc_main$1 from "../_shared/components/IconButton.vue.js";
9
9
  /* empty css */
10
10
  /* empty css */
11
11
  /* empty css */
12
+ import { useI18n } from "../node_modules/@intlify/vue-i18n-core/dist/vue-i18n-core.js";
12
13
  const _hoisted_1 = {
13
14
  key: 0,
14
15
  class: "yc-drawer-header"
@@ -33,8 +34,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
33
34
  mask: { type: Boolean, default: true },
34
35
  maskClosable: { type: Boolean, default: true },
35
36
  closable: { type: Boolean, default: true },
36
- okText: { default: "确认" },
37
- cancelText: { default: "取消" },
37
+ okText: { default: "" },
38
+ cancelText: { default: "" },
38
39
  okLoading: { type: Boolean, default: false },
39
40
  okButtonProps: { default: () => {
40
41
  return {};
@@ -79,6 +80,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
79
80
  } = toRefs(props);
80
81
  const { onBeforeOk, onBeforeCancel } = props;
81
82
  const { zIndex, popupContainer } = getGlobalConfig(props);
83
+ const { t } = useI18n();
82
84
  const drawerStyle = computed(() => {
83
85
  return {
84
86
  height: placement.value == "left" || placement.value == "right" ? "" : valueToPx(height.value),
@@ -169,7 +171,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
169
171
  onClick: _cache[2] || (_cache[2] = ($event) => unref(handleClose)("cancelBtn", $event))
170
172
  }), {
171
173
  default: withCtx(() => [
172
- createTextVNode(toDisplayString(_ctx.cancelText), 1)
174
+ createTextVNode(toDisplayString(_ctx.cancelText || unref(t)("drawer.cancelText")), 1)
173
175
  ]),
174
176
  _: 1
175
177
  }, 16)) : createCommentVNode("", true),
@@ -180,7 +182,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
180
182
  onClick: _cache[3] || (_cache[3] = ($event) => unref(handleClose)("confirmBtn", $event))
181
183
  }), {
182
184
  default: withCtx(() => [
183
- createTextVNode(toDisplayString(_ctx.okText), 1)
185
+ createTextVNode(toDisplayString(_ctx.okText || unref(t)("drawer.okText")), 1)
184
186
  ]),
185
187
  _: 1
186
188
  }, 16, ["loading"])
@@ -16,8 +16,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
16
16
  mask: { type: Boolean, default: true },
17
17
  maskClosable: { type: Boolean, default: true },
18
18
  closable: { type: Boolean, default: true },
19
- okText: { default: "确认" },
20
- cancelText: { default: "取消" },
19
+ okText: { default: "" },
20
+ cancelText: { default: "" },
21
21
  okLoading: { type: Boolean, default: false },
22
22
  okButtonProps: { default: () => {
23
23
  return {};
@@ -1,10 +1,11 @@
1
- import { defineComponent, createElementBlock, openBlock, createElementVNode, createCommentVNode, renderSlot, createVNode, unref, createTextVNode, toDisplayString } from "vue";
1
+ import { defineComponent, toRefs, computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, renderSlot, createVNode, unref, createTextVNode, toDisplayString } from "vue";
2
2
  import "../node_modules/tinycolor2/esm/tinycolor.js";
3
3
  import "../_shared/utils/dom.js";
4
4
  import "../_shared/utils/time.js";
5
5
  import "./index.js";
6
6
  /* empty css */
7
7
  import _sfc_main$1 from "../_shared/icons/IconEmpty.vue.js";
8
+ import { useI18n } from "../node_modules/@intlify/vue-i18n-core/dist/vue-i18n-core.js";
8
9
  const _hoisted_1 = { class: "yc-empty" };
9
10
  const _hoisted_2 = { class: "yc-empty-image" };
10
11
  const _hoisted_3 = ["src"];
@@ -18,10 +19,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
18
19
  },
19
20
  __name: "index",
20
21
  props: {
21
- description: { default: "暂无数据" },
22
+ description: { default: "" },
22
23
  imgSrc: { default: "" }
23
24
  },
24
25
  setup(__props) {
26
+ const props = __props;
27
+ const { description: _description } = toRefs(props);
28
+ const { t } = useI18n();
29
+ const description = computed(
30
+ () => _description.value || t("empty.description")
31
+ );
25
32
  return (_ctx, _cache) => {
26
33
  return openBlock(), createElementBlock("div", _hoisted_1, [
27
34
  createElementVNode("div", _hoisted_2, [
@@ -34,9 +41,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
34
41
  createVNode(unref(_sfc_main$1))
35
42
  ])
36
43
  ]),
37
- _ctx.description ? (openBlock(), createElementBlock("div", _hoisted_4, [
44
+ description.value ? (openBlock(), createElementBlock("div", _hoisted_4, [
38
45
  renderSlot(_ctx.$slots, "default", {}, () => [
39
- createTextVNode(toDisplayString(_ctx.description), 1)
46
+ createTextVNode(toDisplayString(description.value), 1)
40
47
  ])
41
48
  ])) : createCommentVNode("", true)
42
49
  ]);
@@ -10,6 +10,7 @@ import useContext from "./hooks/useContext.js";
10
10
  import Spin from "../Spin/index.js";
11
11
  import _sfc_main$1 from "./ImagePreview.vue.js";
12
12
  /* empty css */
13
+ import { useI18n } from "../node_modules/@intlify/vue-i18n-core/dist/vue-i18n-core.js";
13
14
  const _hoisted_1 = ["src", "title", "alt"];
14
15
  const _hoisted_2 = {
15
16
  key: 1,
@@ -60,6 +61,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
60
61
  const emits = __emit;
61
62
  const { src, preview, previewVisible, defaultPreviewVisible } = toRefs(props);
62
63
  const { hasGroupFather, handleClick: previewImage } = useContext().inject();
64
+ const { t } = useI18n();
63
65
  const computedVisible = useControlValue(
64
66
  previewVisible,
65
67
  defaultPreviewVisible.value,
@@ -136,8 +138,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
136
138
  renderSlot(_ctx.$slots, "loader", {}, () => [
137
139
  createVNode(unref(Spin), {
138
140
  size: 30,
139
- tip: "加载中"
140
- })
141
+ tip: unref(t)("image.loading")
142
+ }, null, 8, ["tip"])
141
143
  ])
142
144
  ])
143
145
  ])) : createCommentVNode("", true),
@@ -1,4 +1,4 @@
1
- import { defineComponent, createElementBlock, createCommentVNode, openBlock, renderSlot, Fragment, renderList, createBlock, withCtx, resolveDynamicComponent } from "vue";
1
+ import { defineComponent, createElementBlock, createCommentVNode, openBlock, renderSlot, Fragment, renderList, createBlock, unref, withCtx, resolveDynamicComponent } from "vue";
2
2
  import "../node_modules/tinycolor2/esm/tinycolor.js";
3
3
  import "../_shared/utils/dom.js";
4
4
  import "../_shared/utils/time.js";
@@ -12,6 +12,7 @@ import _sfc_main$3 from "../_shared/icons/IconZoomIn.vue2.js";
12
12
  import _sfc_main$2 from "../_shared/icons/IconZoomOut.vue2.js";
13
13
  import _sfc_main$7 from "./ImagePreviewAction.vue.js";
14
14
  /* empty css */
15
+ import { useI18n } from "../node_modules/@intlify/vue-i18n-core/dist/vue-i18n-core.js";
15
16
  const _hoisted_1 = {
16
17
  key: 0,
17
18
  class: "yc-image-preview-toolbar"
@@ -23,43 +24,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23
24
  },
24
25
  emits: ["click"],
25
26
  setup(__props) {
26
- const actionMap = {
27
- fullScreen: {
28
- icon: _sfc_main$6,
29
- name: "全屏"
30
- },
31
- rotateRight: {
32
- icon: _sfc_main$5,
33
- name: "向右旋转"
34
- },
35
- rotateLeft: {
36
- icon: _sfc_main$4,
37
- name: "向左旋转"
38
- },
39
- zoomIn: {
40
- icon: _sfc_main$3,
41
- name: "放大"
42
- },
43
- zoomOut: {
44
- icon: _sfc_main$2,
45
- name: "缩小"
46
- },
47
- originalSize: {
48
- icon: _sfc_main$1,
49
- name: "还原"
50
- }
27
+ const { t } = useI18n();
28
+ const iconMap = {
29
+ fullScreen: _sfc_main$6,
30
+ rotateRight: _sfc_main$5,
31
+ rotateLeft: _sfc_main$4,
32
+ zoomIn: _sfc_main$3,
33
+ zoomOut: _sfc_main$2,
34
+ originalSize: _sfc_main$1
51
35
  };
52
36
  return (_ctx, _cache) => {
53
37
  return _ctx.actionsLayout.length ? (openBlock(), createElementBlock("div", _hoisted_1, [
54
38
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.actionsLayout, (action) => {
55
39
  return openBlock(), createElementBlock(Fragment, { key: action }, [
56
- actionMap[action] ? (openBlock(), createBlock(_sfc_main$7, {
40
+ iconMap[action] ? (openBlock(), createBlock(_sfc_main$7, {
57
41
  key: 0,
58
- name: actionMap[action].name,
42
+ name: unref(t)(`imagePreview.${action}`),
59
43
  onClick: (ev) => _ctx.$emit("click", action, ev)
60
44
  }, {
61
45
  default: withCtx(() => [
62
- (openBlock(), createBlock(resolveDynamicComponent(actionMap[action].icon)))
46
+ (openBlock(), createBlock(resolveDynamicComponent(iconMap[action])))
63
47
  ]),
64
48
  _: 2
65
49
  }, 1032, ["name", "onClick"])) : createCommentVNode("", true)
@@ -15,7 +15,6 @@ const useTheme = () => {
15
15
  "yc-design-theme"
16
16
  );
17
17
  theme.value = value === "dark" ? "dark" : "light";
18
- console.log(theme.value, "theme");
19
18
  }
20
19
  }
21
20
  },
@@ -10,6 +10,7 @@ import _sfc_main$1 from "../_shared/components/IconButton.vue.js";
10
10
  /* empty css */
11
11
  /* empty css */
12
12
  /* empty css */
13
+ import { useI18n } from "../node_modules/@intlify/vue-i18n-core/dist/vue-i18n-core.js";
13
14
  const _hoisted_1 = {
14
15
  key: 0,
15
16
  class: "yc-modal-footer"
@@ -33,8 +34,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
33
34
  maskClosable: { type: Boolean, default: true },
34
35
  hideCancel: { type: Boolean, default: false },
35
36
  closable: { type: Boolean, default: true },
36
- okText: { default: "确认" },
37
- cancelText: { default: "取消" },
37
+ okText: { default: "" },
38
+ cancelText: { default: "" },
38
39
  okLoading: { type: Boolean, default: false },
39
40
  okButtonProps: { default: () => {
40
41
  return {};
@@ -90,6 +91,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
90
91
  } = toRefs(props);
91
92
  const { onBeforeOk, onBeforeCancel } = props;
92
93
  const { popupContainer, zIndex } = getGlobalConfig(props);
94
+ const { t } = useI18n();
93
95
  const {
94
96
  outerVisible,
95
97
  innerVisible,
@@ -221,7 +223,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
221
223
  onClick: _cache[1] || (_cache[1] = ($event) => unref(handleClose)("cancelBtn", $event))
222
224
  }), {
223
225
  default: withCtx(() => [
224
- createTextVNode(toDisplayString(_ctx.cancelText), 1)
226
+ createTextVNode(toDisplayString(_ctx.cancelText || unref(t)("modal.cancelText")), 1)
225
227
  ]),
226
228
  _: 1
227
229
  }, 16)) : createCommentVNode("", true),
@@ -232,7 +234,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
232
234
  onClick: _cache[2] || (_cache[2] = ($event) => unref(handleClose)("confirmBtn", $event))
233
235
  }), {
234
236
  default: withCtx(() => [
235
- createTextVNode(toDisplayString(_ctx.okText), 1)
237
+ createTextVNode(toDisplayString(_ctx.okText || unref(t)("modal.okText")), 1)
236
238
  ]),
237
239
  _: 1
238
240
  }, 16, ["loading"])
@@ -27,8 +27,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
27
27
  maskClosable: { type: Boolean, default: true },
28
28
  hideCancel: { type: Boolean, default: false },
29
29
  closable: { type: Boolean, default: true },
30
- okText: { default: "确认" },
31
- cancelText: { default: "取消" },
30
+ okText: { default: "" },
31
+ cancelText: { default: "" },
32
32
  okLoading: { type: Boolean, default: false },
33
33
  okButtonProps: { default: () => {
34
34
  return {};
@@ -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
  };