diff --git a/components.d.ts b/components.d.ts
index c14c5095ab7216ec75bffcb17e270afaa998d0d7..be93fe611f119e28c5e05826888a4e36940785b5 100644
--- a/components.d.ts
+++ b/components.d.ts
@@ -61,4 +61,7 @@ declare module 'vue' {
StatusFeedback: typeof import('./src/components/collaboration/StatusFeedback.vue')['default']
TableShowOverflowTips: typeof import('./src/components/collaboration/TableShowOverflowTips.vue')['default']
}
+ export interface ComponentCustomProperties {
+ vLoading: typeof import('element-plus/es')['ElLoadingDirective']
+ }
}
diff --git a/package.json b/package.json
index afc51e66ad3c7d95ff8aadf0ec6f8a29a62b37be..e6deabbab2288dd818601bc5b9fd91dbf3d2ae1b 100644
--- a/package.json
+++ b/package.json
@@ -15,7 +15,7 @@
},
"dependencies": {
"@opensig/open-analytics": "^0.0.9",
- "@opensig/opendesign": "0.0.64",
+ "@opensig/opendesign": "0.0.75",
"@vueuse/core": "10.11.1",
"axios": "1.8.2",
"clipboard": "2.0.11",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 3c00576b0dc56f4869bc77e02a29dff8ecc32652..df80bf1f30f4dbd740c81644d3e029ed073bfd9b 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -12,8 +12,8 @@ importers:
specifier: ^0.0.9
version: 0.0.9
'@opensig/opendesign':
- specifier: 0.0.64
- version: 0.0.64(vue@3.4.38(typescript@4.9.5))
+ specifier: 0.0.75
+ version: 0.0.75(vue@3.4.38(typescript@4.9.5))
'@vueuse/core':
specifier: 10.11.1
version: 10.11.1(vue@3.4.38(typescript@4.9.5))
@@ -494,10 +494,10 @@ packages:
'@opensig/open-analytics@0.0.9':
resolution: {integrity: sha512-D+4VWxgBc1ABsQjWEjWfBfoBQ4PQbc1lNZeEYpQXkTJLLFcj6nSa+LwcYZFXtZdGz9dzOhhbwRwXv66WFw2qJw==}
- '@opensig/opendesign@0.0.64':
- resolution: {integrity: sha512-JA/YoFZVMlTyio+7yACHCs7097E0jlb/6oev1CfjRQd8eN5LU1NYnV/9j4dTALMAGXe2khqniOLNYXKS6Wrm+g==}
+ '@opensig/opendesign@0.0.75':
+ resolution: {integrity: sha512-/0pdeb/jnY4KA9Zlwo4EI2EWHlRCvDqrj06E1JzlbcKzhvz6fGT5LkwgLUmG7+VIeobpnS+JP1sK5a6M1EMzFQ==}
peerDependencies:
- vue: ^3.1.0
+ vue: ^3.3.0
'@pkgr/core@0.1.1':
resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==}
@@ -2381,7 +2381,7 @@ snapshots:
uuid: 10.0.0
web-vitals: 4.2.4
- '@opensig/opendesign@0.0.64(vue@3.4.38(typescript@4.9.5))':
+ '@opensig/opendesign@0.0.75(vue@3.4.38(typescript@4.9.5))':
dependencies:
date-fns: 2.30.0
vue: 3.4.38(typescript@4.9.5)
diff --git a/src/assets/style/markdown.scss b/src/assets/style/markdown.scss
index 7aba4f244d3ec4dc6d8585bbf3b90f6168c7a200..bbe5ba88a995810d92b51414f4ff918ece2468c6 100644
--- a/src/assets/style/markdown.scss
+++ b/src/assets/style/markdown.scss
@@ -60,7 +60,7 @@
background-color: var(--o-color-control2-light) !important;
padding: 0;
overflow: hidden;
-
+ color: var(--o-color-info1);
code {
display: block;
overflow-x: auto;
diff --git a/src/assets/style/theme/index.scss b/src/assets/style/theme/index.scss
index dd6e7269fb267c850b93b442f8025ac3e5c28196..c49a02a5fe0af5b5a226c5f2a4ce32d40c1f8d26 100644
--- a/src/assets/style/theme/index.scss
+++ b/src/assets/style/theme/index.scss
@@ -12,3 +12,5 @@
@use './tab.scss' as *;
@use './rate.scss' as *;
@use './result.scss' as *;
+@use './pagination.scss' as *;
+@use './textarea.scss' as *;
diff --git a/src/assets/style/theme/input.scss b/src/assets/style/theme/input.scss
index eadcc6d22b6e77ec9f15fd4cd3b6f2534a2113ee..f939b25922fcdfdf0886ee2ac0b7499894009b6c 100644
--- a/src/assets/style/theme/input.scss
+++ b/src/assets/style/theme/input.scss
@@ -1,3 +1,8 @@
-.o-input-clear {
- font-size: 20px;
+.o-input {
+ .o_input-limit {
+ display: none;
+ }
+ .o-input-clear {
+ font-size: 20px;
+ }
}
diff --git a/src/assets/style/theme/pagination.scss b/src/assets/style/theme/pagination.scss
new file mode 100644
index 0000000000000000000000000000000000000000..2f1df66e89b1c8ffd7bbe185b14c65406dac8816
--- /dev/null
+++ b/src/assets/style/theme/pagination.scss
@@ -0,0 +1,13 @@
+.o-pagination {
+ --pagination-item-bg-color: var(--o-color-fill2);
+ --pagination-item-bg-color-current: var(--o-color-primary1);
+ --pagination-item-color-current: var(--o-color-white);
+ // 鼠标划过时颜色
+ --pagination-item-bg-color-hover: var(--o-color-primary2);
+ --pagination-item-color-hover: var(--o-color-white);
+
+ .o-pagination-item {
+ width: auto;
+ min-width: var(--pagination-item-size);
+ }
+}
diff --git a/src/assets/style/theme/textarea.scss b/src/assets/style/theme/textarea.scss
new file mode 100644
index 0000000000000000000000000000000000000000..992ea88319de0cc6f97024b5d5de087e0577e151
--- /dev/null
+++ b/src/assets/style/theme/textarea.scss
@@ -0,0 +1,8 @@
+.o_textarea {
+ --limit-color: var(--o-color-info4);
+}
+.o-textarea {
+ .o_box-main {
+ --_box-radius: 4px;
+ }
+}
diff --git a/src/components/AppPagination.vue b/src/components/AppPagination.vue
index 7db948bcb246b28aa11cfab07ba68d3e64d00f25..f7e4f2629c587196af2694df78c82c7baf98b92e 100644
--- a/src/components/AppPagination.vue
+++ b/src/components/AppPagination.vue
@@ -1,11 +1,8 @@
-
-
-
+
diff --git a/src/components/FilterableTableHeader.vue b/src/components/FilterableTableHeader.vue
index dd66d31ec693ab146645ddafb5014125f39be620..01fbb32c01b1270b1a6a6b78f32e4971b6335df0 100644
--- a/src/components/FilterableTableHeader.vue
+++ b/src/components/FilterableTableHeader.vue
@@ -207,7 +207,7 @@ const reset = () => {
>
-
+ onFilterInput('clear')" @input="() => onFilterInput('input')" class="filter-input" placeholder="搜索">
diff --git a/src/components/OTableItemNew.vue b/src/components/OTableItemNew.vue
index 6626d1f7a30c4930df90eab9a30646509ca4b941..d32ba3e0ce789f1268a1515701e1ca7353069ef7 100644
--- a/src/components/OTableItemNew.vue
+++ b/src/components/OTableItemNew.vue
@@ -246,6 +246,10 @@ const onClickLink = (row: any) => {
{{ row.subPath }}
-
+
+ {{ row.openeulerVersion }}
+ -
+
diff --git a/src/components/filter/FilterHeader.vue b/src/components/filter/FilterHeader.vue
index 43a39028d82cf6ca02c70b61978f0ad135a8988a..3fc1eb0769692657d5fb39067bad1f2f55000162 100644
--- a/src/components/filter/FilterHeader.vue
+++ b/src/components/filter/FilterHeader.vue
@@ -55,17 +55,16 @@ const searchValue = ref(route.query.name as string | '');
const showPanel = ref(false);
// 搜索
-const changeSearchInput = (v: string) => {
- changePkgInput(v);
- searchValue.value = v;
+const changeSearchInput = () => {
+ changePkgInput();
replaceWinUrl();
};
-const changePkgInput = (v: string) => {
- if (v === '') {
+const changePkgInput = () => {
+ if (searchValue.value === '') {
return;
}
- if (v.length > 100) {
+ if (searchValue.value.length > 100) {
return msg.danger({
content: '文字长度不能超过100字符',
});
@@ -94,16 +93,13 @@ const replaceWinUrl = () => {
const collectDownloadData = (keyword: string) => {
const { href } = window.location;
const downloadTime = new Date();
- searchReport(
- 'search',
- {
- origin: href,
- keyword,
- filter: 'all',
- pkg: props.title,
- downloadTime,
- }
- );
+ searchReport('search', {
+ origin: href,
+ keyword,
+ filter: 'all',
+ pkg: props.title,
+ downloadTime,
+ });
};
const isTimeOrder = ref(false);
@@ -194,14 +190,15 @@ watch(
size="large"
:max-length="100"
clearable
+ round="4px"
@focus="showPanel = true"
v-model="searchValue"
- @press-enter="(v) => changeSearchInput(v)"
- @input="(v) => changePkgInput(v)"
- @clear="clearSearchData"
+ @press-enter="() => changeSearchInput('press-enter')"
+ @input="() => changePkgInput('input')"
+ @clear="() => clearSearchData('clear')"
>
-
+
diff --git a/src/components/header/AppHeader.vue b/src/components/header/AppHeader.vue
index 0da7d0290e89eb68e392b30a13e6db6aeb3661af..2407110c1133cb6d7bca8f563241f7acba88b9b0 100644
--- a/src/components/header/AppHeader.vue
+++ b/src/components/header/AppHeader.vue
@@ -182,7 +182,7 @@ watch(
position: fixed;
top: 0;
left: 0;
- z-index: 1010;
+ z-index: 99;
background: var(--o-color-fill2);
box-shadow: var(--o-shadow-1);
min-width: 1440px;
diff --git a/src/components/search/SearchFilter.vue b/src/components/search/SearchFilter.vue
index 1c675b3119fa60f4d770791ae6059b283471c597..43f6a097a19f2045df21c585e406461f8d2e19b5 100644
--- a/src/components/search/SearchFilter.vue
+++ b/src/components/search/SearchFilter.vue
@@ -43,39 +43,36 @@ const tabName = ref('all');
const fliterSelected = ref(defaultValue.value);
const reportAnalytics = (data: Record
, event = 'click') => {
- searchReport(
- event,
- {
- module: isPageHome.value ? 'home_page' : 'search_page',
- ...data,
- }
- );
+ searchReport(event, {
+ module: isPageHome.value ? 'home_page' : 'search_page',
+ ...data,
+ });
};
-const changeFilter = (v: string) => {
- fliterSelected.value = v;
+const changeFilter = () => {
+ fliterSelected.value = searchInput.value;
+
if (searchInput.value !== '') {
replaceWinUrl();
}
};
// 搜索框事件
-const changeSearchInput = (v: string) => {
- if (v === '') {
+const changeSearchInput = () => {
+ if (searchInput.value === '') {
return;
}
- if (v.length > 100) {
+ if (searchInput.value.length > 100) {
return msg.danger({
content: '文字长度不能超过100字符',
});
}
reportAnalytics({
type: 'search',
- content: v,
+ content: searchInput.value,
});
isLoading.value = false;
isFocus.value = false;
- searchInput.value = v;
replaceWinUrl();
};
@@ -101,6 +98,12 @@ const clearInput = () => {
isLoading.value = false;
};
+const clickInput = () => {
+ if (!isFocus.value) {
+ isFocus.value = true;
+ }
+};
+
const searchRecommendRef = ref();
const clickRecommend = (v: string) => {
searchInput.value = v;
@@ -171,8 +174,8 @@ const debouncedFn = useDebounceFn(() => {
queryDocsAll();
}, 350);
-const trottleSearch = (v: string) => {
- if (v.length > 100) {
+const trottleSearch = () => {
+ if (searchInput.value.length > 100) {
return msg.danger({
content: '文字长度不能超过100字符',
});
@@ -242,16 +245,17 @@ watch(
changeSearchInput(v)"
- @input="trottleSearch"
- @clear="clearInput"
- @focus="changeSearchFocus(true)"
- @blur="changeSearchBlur"
+ @press-enter="(v) => changeSearchInput('press-enter')"
+ @input="() => trottleSearch('input')"
+ @clear="() => clearInput('clear')"
+ @click="() => clickInput()"
+ @focus="() => changeSearchFocus('focus')"
+ @blur="() => changeSearchBlur('blur')"
>
@@ -402,11 +406,21 @@ watch(
width: 680px;
}
}
-:deep(.o-input-wrap) {
- background: none;
- border: 0 none;
- padding: 0 4px 0 12px;
- align-items: center;
+:deep(.o-input) {
+ .o_box {
+ width: 100%;
+ height: 100%;
+ --box-bg-color: transparent;
+ --box-bg-color-hover: transparent;
+ --box-bd: 0 none;
+ }
+ .o-input-wrap {
+ width: 100%;
+ background: none;
+ border: 0 none;
+ padding: 0;
+ align-items: center;
+ }
}
.search-input {
diff --git a/src/utils/common.ts b/src/utils/common.ts
index a15197562a515f656c5046860a5f5bffc4027972..3d80cc45b202a2bd825d0c6f83d280d75a2d3166 100644
--- a/src/utils/common.ts
+++ b/src/utils/common.ts
@@ -40,7 +40,7 @@ export const formatDateTime = (v: string, isTime?: boolean) => {
return `${year}/${month}/${day}`;
}
- return '-'
+ return '-';
};
/**
@@ -138,13 +138,6 @@ export const getPkgName = (type: string) => {
return name;
};
-// 是否是搜索页面
-import { useRoute } from 'vue-router';
-const route = useRoute();
-export const isSearchPage = () => {
- return route.name === 'search';
-};
-
// 去重
export const getTarget = (data: any, key: any) => {
@@ -157,10 +150,8 @@ export const getTarget = (data: any, key: any) => {
return [...map.values()];
};
-
-
// 输入框文字校验
-export const inputValidator = new RegExp("^[\u4E00-\u9FA5A-Za-z0-9.()$\\-]+$");
+export const inputValidator = new RegExp('^[\u4E00-\u9FA5A-Za-z0-9.()$\\-]+$');
/**
* 对象转URL参数
@@ -176,19 +167,17 @@ export const generateQuery = (queries: Record): string => {
return arr;
}, [] as string[]);
if (parseResultArr?.length) {
- return `?${parseResultArr.join("&")}`;
+ return `?${parseResultArr.join('&')}`;
}
return '';
-}
-
-
+};
/**
* 获取指定时区偏移量的年份
* @param {number} offset - 时区偏移量(单位:小时)。例如,UTC+8 时区,传入 8。
* @returns {number} - 指定时区偏移量对应的年份
*/
-export const getYearByOffset = ()=> {
+export const getYearByOffset = () => {
// 获取当前时间的 UTC 时间
const now = new Date();
const utcTime = new Date(now.getTime() + now.getTimezoneOffset() * 60000);
@@ -197,4 +186,4 @@ export const getYearByOffset = ()=> {
utcTime.setHours(utcTime.getHours() + 8);
return utcTime.getFullYear();
-}
+};
diff --git a/src/views/home/HomeHeader.vue b/src/views/home/HomeHeader.vue
index 874f19e8fb17f0cca64361b4fb652b522ecc6e01..fb9e8962194b5e33f88da9e8cb57832bc55cdebd 100644
--- a/src/views/home/HomeHeader.vue
+++ b/src/views/home/HomeHeader.vue
@@ -67,7 +67,7 @@ onMounted(() => {
align-items: center;
height: 280px;
position: relative;
- z-index: 99;
+ z-index: 97;
.home-banner {
position: absolute;
inset: 0;