@opendesign-plus-test/components 0.0.1-rc.250 → 0.0.1-rc.251

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 (89) hide show
  1. package/dist/chunk-OElCookieNotice.cjs.js +1 -1
  2. package/dist/chunk-OElCookieNotice.es.js +2 -4
  3. package/dist/components/article/OArticle.vue.d.ts +14 -206
  4. package/dist/components/article/index.d.ts +25 -131
  5. package/dist/components/article/types.d.ts +2 -8
  6. package/dist/components/markdown/OMarkdown.vue.d.ts +16 -9
  7. package/dist/components/{article/components/DocTitle.vue.d.ts → markdown/components/MarkdownPageTitle.vue.d.ts} +5 -6
  8. package/dist/components/markdown/index.d.ts +45 -19
  9. package/dist/components/markdown/replacer/h1.d.ts +11 -0
  10. package/dist/components/summit/types.d.ts +7 -20
  11. package/dist/components/summit/utils.d.ts +1 -11
  12. package/dist/components.cjs.js +45 -45
  13. package/dist/components.css +2 -2
  14. package/dist/components.es.js +12725 -13018
  15. package/dist/index.d.ts +0 -1
  16. package/dist/treeshaking/_virtual/icon-email.mjs +8 -9
  17. package/dist/treeshaking/_virtual/icon-email2.mjs +9 -8
  18. package/dist/treeshaking/_virtual/icon-tips.mjs +2 -13
  19. package/dist/treeshaking/_virtual/icon-tips2.mjs +13 -2
  20. package/dist/treeshaking/components/article/OArticle.css +124 -18
  21. package/dist/treeshaking/components/article/OArticle.vue.d.ts +14 -206
  22. package/dist/treeshaking/components/article/OArticle.vue.mjs +1 -1
  23. package/dist/treeshaking/components/article/OArticle.vue2.mjs +82 -48
  24. package/dist/treeshaking/components/article/OArticleList.css +6 -7
  25. package/dist/treeshaking/components/article/OArticleList.vue.mjs +34 -48
  26. package/dist/treeshaking/components/article/index.d.ts +25 -131
  27. package/dist/treeshaking/components/article/types.d.ts +2 -8
  28. package/dist/treeshaking/components/article-anchor/OArticleAnchor.css +4 -4
  29. package/dist/treeshaking/components/article-anchor/OArticleAnchor.vue.mjs +1 -1
  30. package/dist/treeshaking/components/article-anchor/OArticleAnchor.vue2.mjs +5 -4
  31. package/dist/treeshaking/components/events/OEventsList.vue.mjs +1 -1
  32. package/dist/treeshaking/components/markdown/OMarkdown.vue.d.ts +16 -9
  33. package/dist/treeshaking/components/markdown/OMarkdown.vue.mjs +1 -1
  34. package/dist/treeshaking/components/markdown/OMarkdown.vue2.mjs +36 -68
  35. package/dist/treeshaking/components/markdown/OMarkdown2.css +3 -3
  36. package/dist/treeshaking/components/markdown/components/MarkdownPageTitle.css +261 -0
  37. package/dist/treeshaking/components/{article/components/DocTitle.vue.d.ts → markdown/components/MarkdownPageTitle.vue.d.ts} +5 -6
  38. package/dist/treeshaking/components/markdown/components/MarkdownPageTitle.vue.mjs +7 -0
  39. package/dist/treeshaking/components/{article/components/DocTitle.vue2.mjs → markdown/components/MarkdownPageTitle.vue2.mjs} +80 -131
  40. package/dist/treeshaking/components/markdown/components/MarkdownTitle.css +22 -22
  41. package/dist/treeshaking/components/markdown/components/MarkdownTitle.vue.mjs +1 -1
  42. package/dist/treeshaking/components/markdown/components/MarkdownTitle.vue2.mjs +5 -11
  43. package/dist/treeshaking/components/markdown/index.d.ts +45 -19
  44. package/dist/treeshaking/components/markdown/replacer/h1.d.ts +11 -0
  45. package/dist/treeshaking/components/markdown/replacer/h1.mjs +29 -0
  46. package/dist/treeshaking/components/meeting/OMeetingMyCalendar.vue.mjs +1 -5
  47. package/dist/treeshaking/components/meeting/OMeetingSigCalendar.vue.mjs +1 -1
  48. package/dist/treeshaking/components/meeting/components/OMeetingCalendarList.vue.mjs +1 -5
  49. package/dist/treeshaking/components/org/OOrgMembers.vue2.mjs +1 -1
  50. package/dist/treeshaking/components/recursion-menu/ORecursionMenu.vue.mjs +1 -1
  51. package/dist/treeshaking/components/summit/OSummitLive.css +22 -38
  52. package/dist/treeshaking/components/summit/OSummitLive.vue.mjs +1 -1
  53. package/dist/treeshaking/components/summit/OSummitLive.vue2.mjs +10 -37
  54. package/dist/treeshaking/components/summit/OSummitSchedule.css +33 -33
  55. package/dist/treeshaking/components/summit/OSummitSchedule.vue.mjs +1 -1
  56. package/dist/treeshaking/components/summit/OSummitSchedule.vue2.mjs +13 -7
  57. package/dist/treeshaking/components/summit/components/OSummitTabs.css +30 -31
  58. package/dist/treeshaking/components/summit/components/OSummitTabs.vue.mjs +1 -1
  59. package/dist/treeshaking/components/summit/types.d.ts +7 -20
  60. package/dist/treeshaking/components/summit/utils.d.ts +1 -11
  61. package/dist/treeshaking/components/summit/utils.mjs +0 -30
  62. package/dist/treeshaking/components/user-center/OAccountSetting.vue2.mjs +1 -1
  63. package/dist/treeshaking/components/user-center/OUserInfo.css +109 -109
  64. package/dist/treeshaking/components/user-center/OUserInfo.vue.mjs +1 -1
  65. package/dist/treeshaking/components/user-center/OUserInfo.vue2.mjs +5 -4
  66. package/dist/treeshaking/components/user-center/OUserInfo3.css +4 -4
  67. package/dist/treeshaking/components/user-center/rolesMap.mjs +2 -10
  68. package/dist/treeshaking/i18n/en.mjs +1 -2
  69. package/dist/treeshaking/i18n/zh.mjs +1 -2
  70. package/dist/treeshaking/index.d.ts +0 -1
  71. package/dist/treeshaking/index.mjs +0 -2
  72. package/package.json +3 -3
  73. package/dist/components/article/components/ArticleTitle.vue.d.ts +0 -22
  74. package/dist/components/doc-layout/ODocLayout.vue.d.ts +0 -38
  75. package/dist/components/doc-layout/index.d.ts +0 -59
  76. package/dist/treeshaking/_virtual/icon-menu-fold.mjs +0 -20
  77. package/dist/treeshaking/_virtual/icon-menu-unfold.mjs +0 -20
  78. package/dist/treeshaking/components/article/components/ArticleTitle.css +0 -123
  79. package/dist/treeshaking/components/article/components/ArticleTitle.vue.d.ts +0 -22
  80. package/dist/treeshaking/components/article/components/ArticleTitle.vue.mjs +0 -7
  81. package/dist/treeshaking/components/article/components/ArticleTitle.vue2.mjs +0 -97
  82. package/dist/treeshaking/components/article/components/DocTitle.css +0 -246
  83. package/dist/treeshaking/components/article/components/DocTitle.vue.mjs +0 -7
  84. package/dist/treeshaking/components/doc-layout/ODocLayout.css +0 -271
  85. package/dist/treeshaking/components/doc-layout/ODocLayout.vue.d.ts +0 -38
  86. package/dist/treeshaking/components/doc-layout/ODocLayout.vue.mjs +0 -7
  87. package/dist/treeshaking/components/doc-layout/ODocLayout.vue2.mjs +0 -165
  88. package/dist/treeshaking/components/doc-layout/index.d.ts +0 -59
  89. package/dist/treeshaking/components/doc-layout/index.mjs +0 -9
@@ -1,8 +1,22 @@
1
- import { defineComponent, computed, openBlock, createElementBlock, normalizeStyle, createElementVNode, normalizeClass, createVNode, mergeProps, withCtx, renderSlot, createBlock } from "vue";
1
+ import { defineComponent, useCssVars, computed, openBlock, createElementBlock, normalizeStyle, createElementVNode, toDisplayString, createBlock, unref, withCtx, createTextVNode, createCommentVNode, Fragment, renderList, normalizeClass, createVNode, normalizeProps, guardReactiveProps, renderSlot } from "vue";
2
+ import { OTag, ODivider } from "@opensig/opendesign";
2
3
  import _OMarkdown from "../markdown/OMarkdown.vue.mjs";
3
4
  import _OArticlePagination from "../article-pagination/OArticlePagination.vue.mjs";
4
- import ArticleTitle from "./components/ArticleTitle.vue.mjs";
5
- import DocTitle from "./components/DocTitle.vue.mjs";
5
+ import { useI18n } from "../../i18n/index.mjs";
6
+ const _hoisted_1 = { class: "o-article__header" };
7
+ const _hoisted_2 = { class: "o-article__title" };
8
+ const _hoisted_3 = {
9
+ key: 0,
10
+ class: "o-article__meta"
11
+ };
12
+ const _hoisted_4 = {
13
+ key: 0,
14
+ class: "o-article__tags"
15
+ };
16
+ const _hoisted_5 = {
17
+ key: 1,
18
+ class: "o-article__update-time"
19
+ };
6
20
  const _sfc_main = /* @__PURE__ */ defineComponent({
7
21
  __name: "OArticle",
8
22
  props: {
@@ -12,34 +26,39 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
12
26
  community: {},
13
27
  prev: { default: null },
14
28
  next: { default: null },
15
- type: { default: "article" },
16
29
  disableH2: { type: Boolean, default: false },
17
30
  disableTable: { type: Boolean, default: false },
18
31
  disableImg: { type: Boolean, default: false },
19
32
  disableCode: { type: Boolean, default: false },
20
33
  updateTime: {},
21
- sourceUrl: {},
22
- enableDownload: { type: Boolean, default: false },
23
- enableStar: { type: Boolean, default: false },
24
- enableCopyLink: { type: Boolean, default: false },
34
+ markdownBodyClass: { default: "o-markdown-body" },
35
+ removeFirstTopMargin: { type: Boolean, default: true },
36
+ autoHideFirstH1: { type: Boolean, default: true },
25
37
  prevLabel: {},
26
38
  nextLabel: {},
39
+ divider: { type: Boolean, default: true },
27
40
  radius: { default: "var(--o-radius-xs)" }
28
41
  },
29
- emits: ["navigate", "download", "collect"],
42
+ emits: ["navigate"],
30
43
  setup(__props, { emit: __emit }) {
44
+ useCssVars((_ctx) => ({
45
+ "v421a9b14": headerBgStyle.value
46
+ }));
31
47
  const props = __props;
32
48
  const emit = __emit;
49
+ const { t } = useI18n();
33
50
  const markdownProps = computed(() => ({
34
- hideFirstH1: true,
51
+ disableH1: true,
35
52
  disableH2: props.disableH2,
36
53
  disableTable: props.disableTable,
37
54
  disableImg: props.disableImg,
38
- disableCode: props.disableCode
55
+ disableCode: props.disableCode,
56
+ markdownBodyClass: props.markdownBodyClass
39
57
  }));
40
58
  const onNavigate = (type, item) => {
41
59
  emit("navigate", type, item);
42
60
  };
61
+ const headerBgStyle = computed(() => props.headerBg ? `url(${props.headerBg})` : "none");
43
62
  return (_ctx, _cache) => {
44
63
  return openBlock(), createElementBlock("div", {
45
64
  class: "o-article",
@@ -47,51 +66,66 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
47
66
  "--o-article-radius": __props.radius
48
67
  })
49
68
  }, [
69
+ createElementVNode("header", _hoisted_1, [
70
+ createElementVNode("h1", _hoisted_2, toDisplayString(__props.title), 1),
71
+ __props.tags.length || __props.updateTime || __props.community ? (openBlock(), createElementBlock("div", _hoisted_3, [
72
+ __props.tags.length || __props.community ? (openBlock(), createElementBlock("div", _hoisted_4, [
73
+ __props.community ? (openBlock(), createBlock(unref(OTag), {
74
+ key: 0,
75
+ class: "o-article__tag",
76
+ size: "large",
77
+ variant: "outline",
78
+ round: __props.community === "MindSpore" ? "pill" : __props.radius
79
+ }, {
80
+ default: withCtx(() => [
81
+ createTextVNode(toDisplayString(__props.community), 1)
82
+ ]),
83
+ _: 1
84
+ }, 8, ["round"])) : createCommentVNode("", true),
85
+ __props.community && __props.tags.length ? (openBlock(), createBlock(unref(ODivider), {
86
+ key: 1,
87
+ direction: "v",
88
+ class: "o-article__tags-divider"
89
+ })) : createCommentVNode("", true),
90
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.tags, (tag) => {
91
+ return openBlock(), createBlock(unref(OTag), {
92
+ key: tag,
93
+ class: "o-article__tag",
94
+ size: "large",
95
+ variant: "outline",
96
+ round: __props.community === "MindSpore" ? "pill" : __props.radius
97
+ }, {
98
+ default: withCtx(() => [
99
+ createTextVNode(toDisplayString(tag), 1)
100
+ ]),
101
+ _: 2
102
+ }, 1032, ["round"]);
103
+ }), 128))
104
+ ])) : createCommentVNode("", true),
105
+ __props.updateTime ? (openBlock(), createElementBlock("span", _hoisted_5, toDisplayString(unref(t)("md.updateTime")) + toDisplayString(__props.updateTime), 1)) : createCommentVNode("", true)
106
+ ])) : createCommentVNode("", true)
107
+ ]),
50
108
  createElementVNode("div", {
51
109
  class: normalizeClass(["o-article__content", {
52
- doc: __props.type === "doc"
110
+ "o-article__content--no-first-margin": __props.removeFirstTopMargin,
111
+ "o-article__content--hide-first-h1": __props.autoHideFirstH1
53
112
  }])
54
113
  }, [
55
- createVNode(_OMarkdown, mergeProps({ ref: "markdownRef" }, markdownProps.value), {
56
- header: withCtx(({ h1 }) => [
57
- __props.type === "article" ? (openBlock(), createBlock(ArticleTitle, {
58
- key: 0,
59
- title: __props.title,
60
- el: h1,
61
- "header-bg": __props.headerBg,
62
- tags: __props.tags,
63
- community: __props.community,
64
- "update-time": __props.updateTime,
65
- radius: __props.radius
66
- }, null, 8, ["title", "el", "header-bg", "tags", "community", "update-time", "radius"])) : (openBlock(), createBlock(DocTitle, {
67
- key: 1,
68
- title: __props.title,
69
- el: h1,
70
- "bg-image": __props.headerBg,
71
- "update-time": __props.updateTime,
72
- "source-url": __props.sourceUrl,
73
- "enable-download": __props.enableDownload,
74
- "enable-star": __props.enableStar,
75
- "enable-copy-link": __props.enableCopyLink,
76
- onDownload: _cache[0] || (_cache[0] = ($event) => emit("download")),
77
- onCollect: _cache[1] || (_cache[1] = ($event) => emit("collect"))
78
- }, null, 8, ["title", "el", "bg-image", "update-time", "source-url", "enable-download", "enable-star", "enable-copy-link"]))
79
- ]),
80
- footer: withCtx(() => [
81
- createVNode(_OArticlePagination, {
82
- prev: __props.prev,
83
- next: __props.next,
84
- "prev-label": __props.prevLabel,
85
- "next-label": __props.nextLabel,
86
- radius: __props.radius,
87
- onNavigate
88
- }, null, 8, ["prev", "next", "prev-label", "next-label", "radius"])
89
- ]),
114
+ createVNode(_OMarkdown, normalizeProps(guardReactiveProps(markdownProps.value)), {
90
115
  default: withCtx(() => [
91
116
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
92
117
  ]),
93
118
  _: 3
94
- }, 16)
119
+ }, 16),
120
+ createVNode(_OArticlePagination, {
121
+ prev: __props.prev,
122
+ next: __props.next,
123
+ "prev-label": __props.prevLabel,
124
+ "next-label": __props.nextLabel,
125
+ divider: __props.divider,
126
+ radius: __props.radius,
127
+ onNavigate
128
+ }, null, 8, ["prev", "next", "prev-label", "next-label", "divider", "radius"])
95
129
  ], 2)
96
130
  ], 4);
97
131
  };
@@ -107,16 +107,15 @@
107
107
  flex-wrap: wrap;
108
108
  gap: var(--o-gap-1);
109
109
  }
110
- .o-article-list .article-content .o-card .o-card-detail .item-tags {
111
- display: flex;
112
- flex-wrap: wrap; /* 换行时上下间距同为 --o-gap-2 */
110
+ .o-article-list .article-content .o-card .o-card-detail .item-type {
111
+ display: inline-flex;
113
112
  align-items: center;
114
- gap: var(--o-gap-2);
115
- }
116
- .o-article-list .article-content .o-card .o-card-detail .item-tags .item-tag {
117
113
  padding: var(--o-gap-1);
118
114
  }
119
- .o-article-list .article-content .o-card .o-card-detail .item-tags .item-tag .o-tag-icon {
115
+ .o-article-list .article-content .o-card .o-card-detail .item-type.empty-tag {
116
+ border-color: transparent;
117
+ }
118
+ .o-article-list .article-content .o-card .o-card-detail .item-type .o-tag-icon {
120
119
  display: flex;
121
120
  align-items: center;
122
121
  }
@@ -1,4 +1,4 @@
1
- import { defineComponent, useSlots, ref, computed, watch, openBlock, createElementBlock, unref, renderSlot, createCommentVNode, createElementVNode, createBlock, withCtx, Fragment, renderList, createVNode, createSlots, toDisplayString, resolveDynamicComponent, createTextVNode } from "vue";
1
+ import { defineComponent, useSlots, ref, computed, watch, openBlock, createElementBlock, unref, renderSlot, createCommentVNode, createElementVNode, createBlock, withCtx, Fragment, renderList, createVNode, createSlots, normalizeClass, toDisplayString, resolveDynamicComponent, createTextVNode } from "vue";
2
2
  import { ORow, OCol, OCard, OTag, OIcon, OPagination } from "@opensig/opendesign";
3
3
  import { useScreen } from "@opendesign-plus/composables";
4
4
  import OEmpty from "../empty/OEmpty.vue.mjs";
@@ -11,18 +11,14 @@ const _hoisted_2 = {
11
11
  };
12
12
  const _hoisted_3 = { class: "article-content" };
13
13
  const _hoisted_4 = {
14
- key: 0,
15
- class: "item-tags"
16
- };
17
- const _hoisted_5 = {
18
14
  key: 1,
19
15
  class: "item-desc"
20
16
  };
21
- const _hoisted_6 = { class: "item-info" };
22
- const _hoisted_7 = { key: 0 };
23
- const _hoisted_8 = { key: 1 };
24
- const _hoisted_9 = { key: 2 };
25
- const _hoisted_10 = {
17
+ const _hoisted_5 = { class: "item-info" };
18
+ const _hoisted_6 = { key: 0 };
19
+ const _hoisted_7 = { key: 1 };
20
+ const _hoisted_8 = { key: 2 };
21
+ const _hoisted_9 = {
26
22
  key: 1,
27
23
  class: "article-pagination"
28
24
  };
@@ -111,49 +107,39 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
111
107
  href: item.href,
112
108
  layout: unref(lePadV) ? __props.mobileLayout : "v"
113
109
  }, createSlots({
114
- detail: withCtx(() => {
115
- var _a;
116
- return [
117
- ((_a = item.tags) == null ? void 0 : _a.length) ? (openBlock(), createElementBlock("div", _hoisted_4, [
118
- (openBlock(true), createElementBlock(Fragment, null, renderList(item.tags, (tag, idx) => {
119
- return openBlock(), createBlock(unref(OTag), {
120
- key: idx,
121
- class: "item-tag",
122
- color: tag.color,
123
- variant: tag.variant ?? "outline",
124
- size: tag.size,
125
- round: tag.round
126
- }, createSlots({
110
+ detail: withCtx(() => [
111
+ item.tag ? (openBlock(), createBlock(unref(OTag), {
112
+ key: 0,
113
+ variant: "outline",
114
+ class: normalizeClass(["item-type", !item.tag.label && "empty-tag"])
115
+ }, createSlots({
116
+ default: withCtx(() => [
117
+ createElementVNode("span", null, toDisplayString(item.tag.label), 1)
118
+ ]),
119
+ _: 2
120
+ }, [
121
+ item.tag.icon ? {
122
+ name: "icon",
123
+ fn: withCtx(() => [
124
+ createVNode(unref(OIcon), null, {
127
125
  default: withCtx(() => [
128
- createElementVNode("span", null, toDisplayString(tag.label), 1)
126
+ (openBlock(), createBlock(resolveDynamicComponent(item.tag.icon)))
129
127
  ]),
130
128
  _: 2
131
- }, [
132
- tag.icon ? {
133
- name: "icon",
134
- fn: withCtx(() => [
135
- createVNode(unref(OIcon), null, {
136
- default: withCtx(() => [
137
- (openBlock(), createBlock(resolveDynamicComponent(tag.icon)))
138
- ]),
139
- _: 2
140
- }, 1024)
141
- ]),
142
- key: "0"
143
- } : void 0
144
- ]), 1032, ["color", "variant", "size", "round"]);
145
- }), 128))
146
- ])) : createCommentVNode("", true),
147
- item.description ? (openBlock(), createElementBlock("div", _hoisted_5, toDisplayString(item.description), 1)) : createCommentVNode("", true)
148
- ];
149
- }),
129
+ }, 1024)
130
+ ]),
131
+ key: "0"
132
+ } : void 0
133
+ ]), 1032, ["class"])) : createCommentVNode("", true),
134
+ item.description ? (openBlock(), createElementBlock("div", _hoisted_4, toDisplayString(item.description), 1)) : createCommentVNode("", true)
135
+ ]),
150
136
  _: 2
151
137
  }, [
152
138
  item.date || item.author || item.location ? {
153
139
  name: "footer",
154
140
  fn: withCtx(() => [
155
- createElementVNode("div", _hoisted_6, [
156
- item.date ? (openBlock(), createElementBlock("span", _hoisted_7, [
141
+ createElementVNode("div", _hoisted_5, [
142
+ item.date ? (openBlock(), createElementBlock("span", _hoisted_6, [
157
143
  createVNode(unref(OIcon), null, {
158
144
  default: withCtx(() => [
159
145
  createVNode(unref(IconTime))
@@ -162,7 +148,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
162
148
  }),
163
149
  createTextVNode(" " + toDisplayString(item.date), 1)
164
150
  ])) : createCommentVNode("", true),
165
- item.author ? (openBlock(), createElementBlock("span", _hoisted_8, [
151
+ item.author ? (openBlock(), createElementBlock("span", _hoisted_7, [
166
152
  createVNode(unref(OIcon), null, {
167
153
  default: withCtx(() => [
168
154
  createVNode(unref(IconAvatar))
@@ -171,7 +157,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
171
157
  }),
172
158
  createTextVNode(" " + toDisplayString(authorText(item.author)), 1)
173
159
  ])) : createCommentVNode("", true),
174
- item.location ? (openBlock(), createElementBlock("span", _hoisted_9, [
160
+ item.location ? (openBlock(), createElementBlock("span", _hoisted_8, [
175
161
  createVNode(unref(OIcon), null, {
176
162
  default: withCtx(() => [
177
163
  createVNode(unref(IconAvatar))
@@ -199,7 +185,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
199
185
  }, null, 8, ["img"])
200
186
  ])
201
187
  ]),
202
- showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_10, [
188
+ showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_9, [
203
189
  createVNode(unref(OPagination), {
204
190
  page: current.value,
205
191
  simple: unref(lePadV),
@@ -7,134 +7,36 @@ declare const OArticle: {
7
7
  community?: string;
8
8
  prev?: import('../article-pagination').OArticlePaginationItemT | null;
9
9
  next?: import('../article-pagination').OArticlePaginationItemT | null;
10
- type?: "article" | "doc";
11
10
  disableH2?: boolean;
12
11
  disableTable?: boolean;
13
12
  disableImg?: boolean;
14
13
  disableCode?: boolean;
15
14
  updateTime?: string;
16
- sourceUrl?: string;
17
- enableDownload?: boolean;
18
- enableStar?: boolean;
19
- enableCopyLink?: boolean;
15
+ markdownBodyClass?: string;
16
+ removeFirstTopMargin?: boolean;
17
+ autoHideFirstH1?: boolean;
20
18
  prevLabel?: string;
21
19
  nextLabel?: string;
20
+ divider?: boolean;
22
21
  radius?: string;
23
22
  }> & Readonly<{
24
23
  onNavigate?: ((type: "prev" | "next", item: import('../article-pagination').OArticlePaginationItemT) => any) | undefined;
25
- onDownload?: (() => any) | undefined;
26
- onCollect?: (() => any) | undefined;
27
24
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
28
25
  navigate: (type: "prev" | "next", item: import('../article-pagination').OArticlePaginationItemT) => any;
29
- download: () => any;
30
- collect: () => any;
31
26
  }, import('vue').PublicProps, {
32
- type: "article" | "doc";
33
27
  disableH2: boolean;
34
28
  disableTable: boolean;
35
29
  disableImg: boolean;
36
30
  disableCode: boolean;
31
+ markdownBodyClass: string;
37
32
  prev: import('../article-pagination').OArticlePaginationItemT | null;
38
33
  next: import('../article-pagination').OArticlePaginationItemT | null;
34
+ divider: boolean;
39
35
  radius: string;
40
36
  tags: string[];
41
- enableDownload: boolean;
42
- enableStar: boolean;
43
- enableCopyLink: boolean;
44
- }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
45
- markdownRef: ({
46
- $: import('vue').ComponentInternalInstance;
47
- $data: {};
48
- $props: {
49
- readonly disableH2?: boolean | undefined;
50
- readonly disableTable?: boolean | undefined;
51
- readonly disableImg?: boolean | undefined;
52
- readonly disableCode?: boolean | undefined;
53
- readonly disableChangeCodeTheme?: boolean | undefined;
54
- readonly markdownBodyClass?: string | undefined;
55
- readonly hideFirstH1?: boolean | undefined;
56
- readonly hideFirstElementMarginTop?: boolean | undefined;
57
- } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
58
- $attrs: import('vue').Attrs;
59
- $refs: {
60
- [x: string]: unknown;
61
- } & {
62
- markdownBodyRef: HTMLDivElement;
63
- };
64
- $slots: Readonly<{
65
- [name: string]: import('vue').Slot<any> | undefined;
66
- }>;
67
- $root: import('vue').ComponentPublicInstance | null;
68
- $parent: import('vue').ComponentPublicInstance | null;
69
- $host: Element | null;
70
- $emit: (event: string, ...args: any[]) => void;
71
- $el: HTMLDivElement;
72
- $options: import('vue').ComponentOptionsBase<Readonly<{
73
- disableH2?: boolean;
74
- disableTable?: boolean;
75
- disableImg?: boolean;
76
- disableCode?: boolean;
77
- disableChangeCodeTheme?: boolean;
78
- markdownBodyClass?: string;
79
- hideFirstH1?: boolean;
80
- hideFirstElementMarginTop?: boolean;
81
- }> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
82
- disableChangeCodeTheme: boolean;
83
- disableH2: boolean;
84
- disableTable: boolean;
85
- disableImg: boolean;
86
- disableCode: boolean;
87
- markdownBodyClass: string;
88
- hideFirstH1: boolean;
89
- hideFirstElementMarginTop: boolean;
90
- }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
91
- beforeCreate?: (() => void) | (() => void)[];
92
- created?: (() => void) | (() => void)[];
93
- beforeMount?: (() => void) | (() => void)[];
94
- mounted?: (() => void) | (() => void)[];
95
- beforeUpdate?: (() => void) | (() => void)[];
96
- updated?: (() => void) | (() => void)[];
97
- activated?: (() => void) | (() => void)[];
98
- deactivated?: (() => void) | (() => void)[];
99
- beforeDestroy?: (() => void) | (() => void)[];
100
- beforeUnmount?: (() => void) | (() => void)[];
101
- destroyed?: (() => void) | (() => void)[];
102
- unmounted?: (() => void) | (() => void)[];
103
- renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
104
- renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
105
- errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
106
- };
107
- $forceUpdate: () => void;
108
- $nextTick: typeof import('vue').nextTick;
109
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
110
- } & Readonly<{
111
- disableChangeCodeTheme: boolean;
112
- disableH2: boolean;
113
- disableTable: boolean;
114
- disableImg: boolean;
115
- disableCode: boolean;
116
- markdownBodyClass: string;
117
- hideFirstH1: boolean;
118
- hideFirstElementMarginTop: boolean;
119
- }> & Omit<Readonly<{
120
- disableH2?: boolean;
121
- disableTable?: boolean;
122
- disableImg?: boolean;
123
- disableCode?: boolean;
124
- disableChangeCodeTheme?: boolean;
125
- markdownBodyClass?: string;
126
- hideFirstH1?: boolean;
127
- hideFirstElementMarginTop?: boolean;
128
- }> & Readonly<{}>, "disableChangeCodeTheme" | "disableH2" | "disableTable" | "disableImg" | "disableCode" | "markdownBodyClass" | "hideFirstH1" | "hideFirstElementMarginTop"> & {} & import('vue').ComponentCustomProperties & {} & {
129
- $slots: {
130
- header?(_: {
131
- h1: HTMLElement | undefined;
132
- }): any;
133
- default?(_: {}): any;
134
- footer?(_: {}): any;
135
- };
136
- }) | null;
137
- }, HTMLDivElement, import('vue').ComponentProvideOptions, {
37
+ removeFirstTopMargin: boolean;
38
+ autoHideFirstH1: boolean;
39
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
138
40
  P: {};
139
41
  B: {};
140
42
  D: {};
@@ -148,36 +50,33 @@ declare const OArticle: {
148
50
  community?: string;
149
51
  prev?: import('../article-pagination').OArticlePaginationItemT | null;
150
52
  next?: import('../article-pagination').OArticlePaginationItemT | null;
151
- type?: "article" | "doc";
152
53
  disableH2?: boolean;
153
54
  disableTable?: boolean;
154
55
  disableImg?: boolean;
155
56
  disableCode?: boolean;
156
57
  updateTime?: string;
157
- sourceUrl?: string;
158
- enableDownload?: boolean;
159
- enableStar?: boolean;
160
- enableCopyLink?: boolean;
58
+ markdownBodyClass?: string;
59
+ removeFirstTopMargin?: boolean;
60
+ autoHideFirstH1?: boolean;
161
61
  prevLabel?: string;
162
62
  nextLabel?: string;
63
+ divider?: boolean;
163
64
  radius?: string;
164
65
  }> & Readonly<{
165
66
  onNavigate?: ((type: "prev" | "next", item: import('../article-pagination').OArticlePaginationItemT) => any) | undefined;
166
- onDownload?: (() => any) | undefined;
167
- onCollect?: (() => any) | undefined;
168
67
  }>, {}, {}, {}, {}, {
169
- type: "article" | "doc";
170
68
  disableH2: boolean;
171
69
  disableTable: boolean;
172
70
  disableImg: boolean;
173
71
  disableCode: boolean;
72
+ markdownBodyClass: string;
174
73
  prev: import('../article-pagination').OArticlePaginationItemT | null;
175
74
  next: import('../article-pagination').OArticlePaginationItemT | null;
75
+ divider: boolean;
176
76
  radius: string;
177
77
  tags: string[];
178
- enableDownload: boolean;
179
- enableStar: boolean;
180
- enableCopyLink: boolean;
78
+ removeFirstTopMargin: boolean;
79
+ autoHideFirstH1: boolean;
181
80
  }>;
182
81
  __isFragment?: never;
183
82
  __isTeleport?: never;
@@ -189,40 +88,35 @@ declare const OArticle: {
189
88
  community?: string;
190
89
  prev?: import('../article-pagination').OArticlePaginationItemT | null;
191
90
  next?: import('../article-pagination').OArticlePaginationItemT | null;
192
- type?: "article" | "doc";
193
91
  disableH2?: boolean;
194
92
  disableTable?: boolean;
195
93
  disableImg?: boolean;
196
94
  disableCode?: boolean;
197
95
  updateTime?: string;
198
- sourceUrl?: string;
199
- enableDownload?: boolean;
200
- enableStar?: boolean;
201
- enableCopyLink?: boolean;
96
+ markdownBodyClass?: string;
97
+ removeFirstTopMargin?: boolean;
98
+ autoHideFirstH1?: boolean;
202
99
  prevLabel?: string;
203
100
  nextLabel?: string;
101
+ divider?: boolean;
204
102
  radius?: string;
205
103
  }> & Readonly<{
206
104
  onNavigate?: ((type: "prev" | "next", item: import('../article-pagination').OArticlePaginationItemT) => any) | undefined;
207
- onDownload?: (() => any) | undefined;
208
- onCollect?: (() => any) | undefined;
209
105
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
210
106
  navigate: (type: "prev" | "next", item: import('../article-pagination').OArticlePaginationItemT) => any;
211
- download: () => any;
212
- collect: () => any;
213
107
  }, string, {
214
- type: "article" | "doc";
215
108
  disableH2: boolean;
216
109
  disableTable: boolean;
217
110
  disableImg: boolean;
218
111
  disableCode: boolean;
112
+ markdownBodyClass: string;
219
113
  prev: import('../article-pagination').OArticlePaginationItemT | null;
220
114
  next: import('../article-pagination').OArticlePaginationItemT | null;
115
+ divider: boolean;
221
116
  radius: string;
222
117
  tags: string[];
223
- enableDownload: boolean;
224
- enableStar: boolean;
225
- enableCopyLink: boolean;
118
+ removeFirstTopMargin: boolean;
119
+ autoHideFirstH1: boolean;
226
120
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
227
121
  $slots: {
228
122
  default?(_: {}): any;
@@ -1,14 +1,8 @@
1
1
  import { Component } from 'vue';
2
- import { TagColorT, TagVariantT } from '@opensig/opendesign';
3
- import { RoundT, SizeT } from '@opensig/opendesign/es/_utils/types';
4
- /** 文章类型标签(卡片详情区顶部展示,从左往右排列可换行,间距 --o-gap-2) */
2
+ /** 文章类型标签(卡片详情区顶部展示) */
5
3
  export interface ArticleTagT {
6
4
  label: string;
7
5
  icon?: Component;
8
- color?: TagColorT;
9
- variant?: TagVariantT;
10
- size?: SizeT;
11
- round?: RoundT;
12
6
  }
13
7
  /** 文章列表项(新闻/博客通用) */
14
8
  export interface ArticleItemT {
@@ -19,7 +13,7 @@ export interface ArticleItemT {
19
13
  date?: string;
20
14
  author?: string | string[];
21
15
  location?: string;
22
- tags?: ArticleTagT[];
16
+ tag?: ArticleTagT;
23
17
  [key: string]: any;
24
18
  }
25
19
  export interface ArticleListPropsT {
@@ -1,18 +1,18 @@
1
- .hover-icon-rotate .o-icon[data-v-6e032ecb] {
1
+ .hover-icon-rotate .o-icon[data-v-f561da4e] {
2
2
  transition: all var(--o-duration-m1) var(--o-easing-standard-in);
3
3
  }
4
4
  @media (hover: hover) {
5
- .hover-icon-rotate:hover .o-icon[data-v-6e032ecb] {
5
+ .hover-icon-rotate:hover .o-icon[data-v-f561da4e] {
6
6
  transform: rotate(-180deg);
7
7
  }
8
8
  }
9
- .o-article-anchor__body[data-v-6e032ecb] .o-anchor {
9
+ .o-article-anchor__body[data-v-f561da4e] .o-anchor {
10
10
  --anchor-item-link-color: var(--o-color-info2);
11
11
  --anchor-item-link-color-active: var(--o-color-primary1);
12
12
  --anchor-item-link-color-hover: var(--o-color-primary2);
13
13
  --anchor-item-link-color-press: var(--o-color-primary3);
14
14
  --anchor-line-bg-color: var(--o-color-control4);
15
15
  }
16
- .o-article-anchor--hidden[data-v-6e032ecb] {
16
+ .o-article-anchor--hidden[data-v-f561da4e] {
17
17
  display: none;
18
18
  }
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./OArticleAnchor.vue2.mjs";
2
2
  import './OArticleAnchor.css';
3
3
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const _OArticleAnchor = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6e032ecb"]]);
4
+ const _OArticleAnchor = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f561da4e"]]);
5
5
  export {
6
6
  _OArticleAnchor as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, computed, watch, onMounted, onBeforeUnmount, openBlock, createElementBlock, createBlock, withCtx, createElementVNode, createCommentVNode, Teleport, createVNode, unref } from "vue";
1
+ import { defineComponent, ref, computed, watch, onMounted, onBeforeUnmount, openBlock, createElementBlock, createBlock, withCtx, createElementVNode, createCommentVNode, withDirectives, createVNode, vShow, Teleport, unref } from "vue";
2
2
  import { OAnchor } from "@opensig/opendesign";
3
3
  import { useI18n } from "../../i18n/index.mjs";
4
4
  import ArticleAnchorItems from "./components/ArticleAnchorItems.vue.mjs";
@@ -192,8 +192,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
192
192
  ]),
193
193
  _: 1
194
194
  }, 8, ["show-title", "title", "radius", "expanded"])) : createCommentVNode("", true),
195
- __props.size === "mobile" ? (openBlock(), createBlock(ArticleAnchorMobile, {
196
- key: 2,
195
+ withDirectives(createVNode(ArticleAnchorMobile, {
197
196
  title: titleText.value,
198
197
  radius: __props.radius,
199
198
  expanded: expanded.value,
@@ -202,7 +201,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
202
201
  "target-offset": __props.targetOffset,
203
202
  onToggle: _cache[2] || (_cache[2] = ($event) => expanded.value = true),
204
203
  onClose: _cache[3] || (_cache[3] = ($event) => expanded.value = false)
205
- }, null, 8, ["title", "radius", "expanded", "items", "container", "target-offset"])) : createCommentVNode("", true),
204
+ }, null, 8, ["title", "radius", "expanded", "items", "container", "target-offset"]), [
205
+ [vShow, __props.size === "mobile"]
206
+ ]),
206
207
  createElementVNode("div", {
207
208
  ref_key: "hiddenSlotRef",
208
209
  ref: hiddenSlotRef,