@opendesign-plus-test/components 0.0.1-rc.191 → 0.0.1-rc.192

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 (24) hide show
  1. package/dist/components/user-center/OAppHeader.vue.d.ts +2 -1
  2. package/dist/components/user-center/index.d.ts +3 -0
  3. package/dist/components/user-center/internal/OCommonHeader.vue.d.ts +5 -1
  4. package/dist/components.cjs.js +39 -39
  5. package/dist/components.css +1 -1
  6. package/dist/components.es.js +3878 -3869
  7. package/dist/treeshaking/components/header-source-code/OHeaderSourceCode.vue.mjs +2 -2
  8. package/dist/treeshaking/components/header-source-code/index.mjs +3 -3
  9. package/dist/treeshaking/components/user-center/OAccountSecurity.css +48 -46
  10. package/dist/treeshaking/components/user-center/OAccountSecurity.vue.mjs +1 -1
  11. package/dist/treeshaking/components/user-center/OAccountSetting.css +57 -52
  12. package/dist/treeshaking/components/user-center/OAccountSetting.vue.mjs +1 -1
  13. package/dist/treeshaking/components/user-center/OAppHeader.css +3 -12
  14. package/dist/treeshaking/components/user-center/OAppHeader.vue.d.ts +2 -1
  15. package/dist/treeshaking/components/user-center/OAppHeader.vue.mjs +1 -1
  16. package/dist/treeshaking/components/user-center/OAppHeader.vue2.mjs +18 -20
  17. package/dist/treeshaking/components/user-center/OThirdPartyBindings.css +23 -21
  18. package/dist/treeshaking/components/user-center/OThirdPartyBindings.vue.mjs +1 -1
  19. package/dist/treeshaking/components/user-center/index.d.ts +3 -0
  20. package/dist/treeshaking/components/user-center/internal/OCommonHeader.css +9 -9
  21. package/dist/treeshaking/components/user-center/internal/OCommonHeader.vue.d.ts +5 -1
  22. package/dist/treeshaking/components/user-center/internal/OCommonHeader.vue.mjs +1 -1
  23. package/dist/treeshaking/components/user-center/internal/OCommonHeader.vue2.mjs +17 -4
  24. package/package.json +1 -1
@@ -1,5 +1,6 @@
1
- import { defineComponent, computed, ref, watch, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode } from "vue";
1
+ import { defineComponent, computed, ref, watch, openBlock, createBlock, unref, withCtx, createVNode, createElementVNode, createCommentVNode } from "vue";
2
2
  import OHeaderSearch from "../header-search/OHeaderSearch.vue.mjs";
3
+ import OHeaderSourceCode from "../header-source-code/OHeaderSourceCode.vue.mjs";
3
4
  import OHeaderUser from "../header-user/OHeaderUser.vue.mjs";
4
5
  import OHeaderTheme from "../header-theme/OHeaderTheme.vue.mjs";
5
6
  import OHeaderLanguageSwitcher from "../header-language-switcher/OHeaderLanguageSwitcher.vue.mjs";
@@ -8,7 +9,6 @@ import OCommonHeader from "./internal/OCommonHeader.vue.mjs";
8
9
  import DefaultAvatar from "../../assets/user-center/images/avatar.png.mjs";
9
10
  import { useI18n } from "../../i18n/index.mjs";
10
11
  const _hoisted_1 = { class: "header-toolbar" };
11
- const _hoisted_2 = { class: "header-user-mb" };
12
12
  const _sfc_main = /* @__PURE__ */ defineComponent({
13
13
  __name: "OAppHeader",
14
14
  props: {
@@ -28,7 +28,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
28
28
  langOptions: { default: () => [
29
29
  { id: "zh", label: "简体中文", simple: "中" },
30
30
  { id: "en", label: "English", simple: "EN" }
31
- ] }
31
+ ] },
32
+ codeData: {}
32
33
  },
33
34
  emits: ["navigate", "theme-change"],
34
35
  setup(__props, { emit: __emit }) {
@@ -134,6 +135,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
134
135
  community: "openEuler",
135
136
  logo: __props.logo,
136
137
  "nav-data": __props.navData,
138
+ "code-data": __props.codeData,
137
139
  "lang-options": langOptions.value,
138
140
  theme: __props.theme,
139
141
  "active-index": __props.activeIndex,
@@ -147,7 +149,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
147
149
  onLangChange: handleLangChange,
148
150
  onThemeChange: _cache[1] || (_cache[1] = (v) => emit("theme-change", v))
149
151
  }, {
150
- toolbar: withCtx(({ theme, setTheme, onLangChange, langOptions: langOptions2 }) => [
152
+ toolbar: withCtx(({ isMobile, theme, setTheme, onLangChange, langOptions: langOptions2 }) => [
151
153
  createElementVNode("div", _hoisted_1, [
152
154
  createVNode(OHeaderSearch, {
153
155
  modelValue: searchInput.value,
@@ -160,17 +162,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
160
162
  "search-url-open-blank": false,
161
163
  onFocus: fetchHotItems
162
164
  }, null, 8, ["modelValue", "hot-items", "suggest-items", "search-url"]),
163
- createVNode(OHeaderLanguageSwitcher, {
165
+ __props.codeData && !isMobile ? (openBlock(), createBlock(OHeaderSourceCode, {
166
+ key: 0,
167
+ title: __props.codeData.label,
168
+ options: __props.codeData.children
169
+ }, null, 8, ["title", "options"])) : createCommentVNode("", true),
170
+ !isMobile ? (openBlock(), createBlock(OHeaderLanguageSwitcher, {
171
+ key: 1,
164
172
  options: langOptions2,
165
173
  type: "common",
166
174
  auto: false,
167
175
  onChange: onLangChange
168
- }, null, 8, ["options", "onChange"]),
169
- createVNode(OHeaderTheme, {
176
+ }, null, 8, ["options", "onChange"])) : createCommentVNode("", true),
177
+ !isMobile ? (openBlock(), createBlock(OHeaderTheme, {
178
+ key: 2,
170
179
  type: "common",
171
180
  theme,
172
181
  onChange: setTheme
173
- }, null, 8, ["theme", "onChange"]),
182
+ }, null, 8, ["theme", "onChange"])) : createCommentVNode("", true),
174
183
  createVNode(OHeaderUser, {
175
184
  token: isLogined.value ? "1" : "",
176
185
  "user-info": userInfo.value,
@@ -187,19 +196,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
187
196
  onChange: setTheme
188
197
  }, null, 8, ["theme", "onChange"])
189
198
  ]),
190
- rightConfig: withCtx(() => [
191
- createElementVNode("div", _hoisted_2, [
192
- createVNode(OHeaderUser, {
193
- token: isLogined.value ? "1" : "",
194
- "user-info": userInfo.value,
195
- options: userOptions.value,
196
- onLogin: __props.onLogin,
197
- onLogout: __props.onLogout
198
- }, null, 8, ["token", "user-info", "options", "onLogin", "onLogout"])
199
- ])
200
- ]),
201
199
  _: 1
202
- }, 8, ["logo", "nav-data", "lang-options", "theme", "active-index", "simple-header", "header-title", "locale"]);
200
+ }, 8, ["logo", "nav-data", "code-data", "lang-options", "theme", "active-index", "simple-header", "header-title", "locale"]);
203
201
  };
204
202
  }
205
203
  });
@@ -1,18 +1,18 @@
1
- .hover-icon-rotate .o-icon[data-v-742c27f3] {
1
+ .hover-icon-rotate .o-icon[data-v-0492b80f] {
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-742c27f3] {
5
+ .hover-icon-rotate:hover .o-icon[data-v-0492b80f] {
6
6
  transform: rotate(-180deg);
7
7
  }
8
8
  }
9
- .title[data-v-742c27f3] {
9
+ .title[data-v-0492b80f] {
10
10
  font-size: var(--font-size3);
11
11
  line-height: var(--line-height3);
12
12
  font-weight: 600;
13
13
  padding-top: var(--layout-gap2);
14
14
  }
15
- .third-party-item[data-v-742c27f3] {
15
+ .third-party-item[data-v-0492b80f] {
16
16
  display: flex;
17
17
  align-items: center;
18
18
  justify-content: space-between;
@@ -21,53 +21,53 @@
21
21
  width: 592px;
22
22
  }
23
23
  @media (min-width: 841px) and (max-width: 1200px) {
24
- .third-party-item[data-v-742c27f3] {
24
+ .third-party-item[data-v-0492b80f] {
25
25
  width: 540px;
26
26
  }
27
27
  }
28
- .third-party-item .common-label[data-v-742c27f3] {
28
+ .third-party-item .common-label[data-v-0492b80f] {
29
29
  width: 120px;
30
30
  min-width: 120px;
31
31
  padding-left: 8px;
32
32
  color: var(--o-color-info2);
33
33
  }
34
34
  @media (max-width: 840px) {
35
- .third-party-item .common-label[data-v-742c27f3] {
35
+ .third-party-item .common-label[data-v-0492b80f] {
36
36
  color: var(--o-color-info1);
37
37
  }
38
38
  }
39
- .third-party-item .common-label-en[data-v-742c27f3] {
39
+ .third-party-item .common-label-en[data-v-0492b80f] {
40
40
  width: 160px;
41
41
  padding-left: 8px;
42
42
  }
43
- .third-party-item .icon svg[data-v-742c27f3] {
43
+ .third-party-item .icon svg[data-v-0492b80f] {
44
44
  width: 24px;
45
45
  height: 24px;
46
46
  }
47
- .third-party-item .left-content[data-v-742c27f3] {
47
+ .third-party-item .left-content[data-v-0492b80f] {
48
48
  display: flex;
49
49
  }
50
- .third-party-item .left-content .common-value[data-v-742c27f3] {
50
+ .third-party-item .left-content .common-value[data-v-0492b80f] {
51
51
  color: var(--o-color-info2);
52
52
  }
53
- .right-content .bind[data-v-742c27f3] {
53
+ .right-content .bind[data-v-0492b80f] {
54
54
  color: var(--o-color-link1);
55
55
  }
56
- .right-content .bind[data-v-742c27f3]:hover {
56
+ .right-content .bind[data-v-0492b80f]:hover {
57
57
  color: var(--o-color-primary2);
58
58
  }
59
- .right-content .unbind[data-v-742c27f3] .o-link-label {
59
+ .right-content .unbind[data-v-0492b80f] .o-link-label {
60
60
  color: var(--o-color-info3);
61
61
  transition: none;
62
62
  background: none;
63
63
  background-size: 0;
64
64
  }
65
- .third-seeting[data-v-742c27f3] {
65
+ .third-seeting[data-v-0492b80f] {
66
66
  font-size: var(--font-size5);
67
67
  padding-bottom: var(--layout-gap2);
68
68
  border-bottom: 1px solid var(--o-color-control4);
69
69
  }
70
- .third-seeting-pad[data-v-742c27f3] {
70
+ .third-seeting-pad[data-v-0492b80f] {
71
71
  padding-bottom: 0;
72
72
  border-bottom: none;
73
73
  background-color: var(--o-color-fill2);
@@ -75,22 +75,24 @@
75
75
  border-radius: 8px;
76
76
  padding: 0 16px;
77
77
  }
78
- .third-seeting-pad .third-party-item[data-v-742c27f3] {
78
+ .third-seeting-pad .third-party-item[data-v-0492b80f] {
79
79
  width: 100%;
80
+ /* 重置基础规则的 max-width:592px,移动端卡片行始终通栏 */
81
+ max-width: 100%;
80
82
  padding-top: 0;
81
83
  height: 52px;
82
84
  border-bottom: 1px solid var(--o-color-control4);
83
85
  }
84
- .third-seeting-pad .third-party-item[data-v-742c27f3]:last-child {
86
+ .third-seeting-pad .third-party-item[data-v-0492b80f]:last-child {
85
87
  border-bottom: none;
86
88
  }
87
- .third-seeting-pad .left-content[data-v-742c27f3] {
89
+ .third-seeting-pad .left-content[data-v-0492b80f] {
88
90
  flex: 1;
89
91
  align-items: center;
90
92
  }
91
- .third-seeting-pad .left-content > div[data-v-742c27f3]:last-child {
93
+ .third-seeting-pad .left-content > div[data-v-0492b80f]:last-child {
92
94
  margin-left: auto;
93
95
  }
94
- .third-seeting-pad .right-content .common-value[data-v-742c27f3] {
96
+ .third-seeting-pad .right-content .common-value[data-v-0492b80f] {
95
97
  color: var(--o-color-info2);
96
98
  }
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./OThirdPartyBindings.vue2.mjs";
2
2
  import './OThirdPartyBindings.css';
3
3
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const _OThirdPartyBindings = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-742c27f3"]]);
4
+ const _OThirdPartyBindings = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0492b80f"]]);
5
5
  export {
6
6
  _OThirdPartyBindings as default
7
7
  };
@@ -198,6 +198,7 @@ declare const OAppHeader: {
198
198
  onLogin?: () => void;
199
199
  onLogout?: () => void;
200
200
  langOptions?: import('./internal/OCommonHeader.vue').LanguageOptionT[];
201
+ codeData?: import('../header').CodeT;
201
202
  }> & Readonly<{
202
203
  "onTheme-change"?: ((val: string) => any) | undefined;
203
204
  onNavigate?: ((url: string) => any) | undefined;
@@ -246,6 +247,7 @@ declare const OAppHeader: {
246
247
  onLogin?: () => void;
247
248
  onLogout?: () => void;
248
249
  langOptions?: import('./internal/OCommonHeader.vue').LanguageOptionT[];
250
+ codeData?: import('../header').CodeT;
249
251
  }> & Readonly<{
250
252
  "onTheme-change"?: ((val: string) => any) | undefined;
251
253
  onNavigate?: ((url: string) => any) | undefined;
@@ -288,6 +290,7 @@ declare const OAppHeader: {
288
290
  onLogin?: () => void;
289
291
  onLogout?: () => void;
290
292
  langOptions?: import('./internal/OCommonHeader.vue').LanguageOptionT[];
293
+ codeData?: import('../header').CodeT;
291
294
  }> & Readonly<{
292
295
  "onTheme-change"?: ((val: string) => any) | undefined;
293
296
  onNavigate?: ((url: string) => any) | undefined;
@@ -1,34 +1,34 @@
1
- .hover-icon-rotate .o-icon[data-v-90c267fc] {
1
+ .hover-icon-rotate .o-icon[data-v-6da8051c] {
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-90c267fc] {
5
+ .hover-icon-rotate:hover .o-icon[data-v-6da8051c] {
6
6
  transform: rotate(-180deg);
7
7
  }
8
8
  }
9
- .common-header[data-v-90c267fc] {
9
+ .common-header[data-v-6da8051c] {
10
10
  /* inline 轴尺寸包含:header 本组件按文档流使用(.header-wrap 为 relative),
11
11
  桌面端英文导航 + 搜索工具条的固有宽度若向外传播,会在窄视口下把整页撑宽
12
12
  (表现为 main 居中偏移出左侧空区、右侧内容被视口裁切)。
13
13
  contain 后 header 自身渲染不变(宽度仍为撑满父级),但不再参与页面固有宽度计算 */
14
14
  contain: inline-size;
15
15
  }
16
- .common-header[data-v-90c267fc] .header {
16
+ .common-header[data-v-6da8051c] .header {
17
17
  position: relative;
18
18
  }
19
- .common-header[data-v-90c267fc] .header {
19
+ .common-header[data-v-6da8051c] .header {
20
20
  --o-header-height: var(--layout-header-height, 72px);
21
21
  }
22
- .common-header[data-v-90c267fc] .header-wrap {
22
+ .common-header[data-v-6da8051c] .header-wrap {
23
23
  position: relative;
24
24
  }
25
- .common-header[data-v-90c267fc] .header-nav-content {
25
+ .common-header[data-v-6da8051c] .header-nav-content {
26
26
  position: absolute;
27
27
  top: 100%;
28
28
  }
29
- .common-header[data-v-90c267fc] .header-box {
29
+ .common-header[data-v-6da8051c] .header-box {
30
30
  position: relative;
31
31
  }
32
- .common-header[data-v-90c267fc] .header-content-mb {
32
+ .common-header[data-v-6da8051c] .header-content-mb {
33
33
  position: absolute;
34
34
  }
@@ -1,4 +1,4 @@
1
- import { NavItemT, LangItemT } from '../../header/types';
1
+ import { NavItemT, LangItemT, CodeT } from '../../header/types';
2
2
  export type LanguageOptionT = {
3
3
  id: string;
4
4
  label: string;
@@ -30,6 +30,7 @@ type __VLS_Props = {
30
30
  simpleHeader?: boolean;
31
31
  headerTitle?: string;
32
32
  locale?: string;
33
+ codeData?: CodeT;
33
34
  };
34
35
  declare function __VLS_template(): {
35
36
  attrs: Partial<{}>;
@@ -57,6 +58,9 @@ declare function __VLS_template(): {
57
58
  theme: "light" | "dark";
58
59
  setTheme: (val?: string) => void;
59
60
  isMobile: boolean;
61
+ locale: string;
62
+ onLangChange: (lang: any) => void;
63
+ langOptions: LanguageOptionT[];
60
64
  }): any;
61
65
  };
62
66
  refs: {};
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./OCommonHeader.vue2.mjs";
2
2
  import './OCommonHeader.css';
3
3
  import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
4
- const OCommonHeader = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-90c267fc"]]);
4
+ const OCommonHeader = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6da8051c"]]);
5
5
  export {
6
6
  OCommonHeader as default
7
7
  };
@@ -16,7 +16,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
16
16
  activeIndex: { default: -1 },
17
17
  simpleHeader: { type: Boolean, default: false },
18
18
  headerTitle: { default: "" },
19
- locale: { default: "zh" }
19
+ locale: { default: "zh" },
20
+ codeData: {}
20
21
  },
21
22
  emits: ["go-home", "handle-click", "go-back", "lang-click", "lang-change", "theme-change"],
22
23
  setup(__props, { emit: __emit }) {
@@ -49,12 +50,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
49
50
  const onLangChange = (lang) => {
50
51
  emit("lang-change", lang);
51
52
  };
53
+ const langData = computed(() => ({
54
+ label: isZh.value ? "语言切换" : "Language",
55
+ children: langOptions.value
56
+ }));
52
57
  return (_ctx, _cache) => {
53
58
  return openBlock(), createElementBlock("header", _hoisted_1, [
54
59
  unref(lePadV) ? (openBlock(), createBlock(OHeaderMobile, {
55
60
  key: 0,
56
61
  logo: logoSrc.value,
57
62
  "nav-data": __props.navData,
63
+ "lang-data": langData.value,
64
+ "code-data": __props.codeData,
58
65
  "active-index": activeIndex.value,
59
66
  "is-simple-header": isSimpleHeader.value,
60
67
  "header-title": headerTitle.value,
@@ -64,7 +71,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
64
71
  onGoBack: _cache[0] || (_cache[0] = ($event) => emit("go-back")),
65
72
  onGoHome: _cache[1] || (_cache[1] = ($event) => emit("go-home")),
66
73
  onHandleClick: _cache[2] || (_cache[2] = (v) => emit("handle-click", v)),
67
- onLangClick: _cache[3] || (_cache[3] = (v) => emit("lang-click", v))
74
+ onLangClick: _cache[3] || (_cache[3] = (v) => {
75
+ emit("lang-click", v);
76
+ emit("lang-change", v);
77
+ })
68
78
  }, createSlots({ _: 2 }, [
69
79
  _ctx.$slots.rightConfig ? {
70
80
  name: "rightConfig",
@@ -94,12 +104,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
94
104
  renderSlot(_ctx.$slots, "tool", {
95
105
  theme: theme.value,
96
106
  setTheme,
97
- isMobile: true
107
+ isMobile: true,
108
+ locale: __props.locale,
109
+ onLangChange,
110
+ langOptions: langOptions.value
98
111
  }, void 0, true)
99
112
  ]),
100
113
  key: "2"
101
114
  } : void 0
102
- ]), 1032, ["logo", "nav-data", "active-index", "is-simple-header", "header-title", "community", "bg-left", "bg-right"])) : (openBlock(), createBlock(OHeader, {
115
+ ]), 1032, ["logo", "nav-data", "lang-data", "code-data", "active-index", "is-simple-header", "header-title", "community", "bg-left", "bg-right"])) : (openBlock(), createBlock(OHeader, {
103
116
  key: 1,
104
117
  community: __props.community,
105
118
  logo: logoSrc.value,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opendesign-plus-test/components",
3
- "version": "0.0.1-rc.191",
3
+ "version": "0.0.1-rc.192",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public",