plain-design 1.0.0-beta.80 → 1.0.0-beta.81
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.
package/package.json
CHANGED
@@ -2,7 +2,8 @@ import {computed, designComponent, iMouseEvent, PropType, reactive, useRefs} fro
|
|
2
2
|
import {iSearchDataMeta, iSearchServiceConfig, SearchOptionButton, SearchTreeIcon, SearchType2Icon} from "./search.utils";
|
3
3
|
import {createListUtils} from "../../utils/createListUtils";
|
4
4
|
import {delay} from "plain-utils/utils/delay";
|
5
|
-
import VirtualList from "../VirtualList";
|
5
|
+
import {VirtualList} from "../VirtualList";
|
6
|
+
import {i18n} from "../i18n";
|
6
7
|
|
7
8
|
export const SearchList = designComponent({
|
8
9
|
props: {
|
@@ -152,8 +153,8 @@ export const SearchList = designComponent({
|
|
152
153
|
{isLastSubHeader != null && SearchTreeIcon[isLastSubHeader ? 'last' : 'normal']()}
|
153
154
|
{SearchType2Icon[item.type]()}
|
154
155
|
<div className="search-service-option-item-default-label">
|
155
|
-
{item.title && <span>{item.title}</span>}
|
156
|
-
{item.desc && <span>{item.desc}</span>}
|
156
|
+
{item.title && <span>{i18n.$intl(item.title).d(item.title)}</span>}
|
157
|
+
{item.desc && <span>{i18n.$intl(item.desc).d(item.desc)}</span>}
|
157
158
|
</div>
|
158
159
|
{item.type === 'favorite' ?
|
159
160
|
SearchOptionButton.remove((e) => methods.removeItem(e, item)) :
|
@@ -8,15 +8,15 @@ import {SearchServicePanel} from "./SearchServicePanel";
|
|
8
8
|
|
9
9
|
export function createSearchService(defaultConfig?: Partial<iSearchServiceDefaultConfig>) {
|
10
10
|
|
11
|
-
const _defaultConfig: iSearchServiceDefaultConfig = {
|
12
|
-
width: defaultConfig?.width || 560,
|
13
|
-
footer: defaultConfig?.footer,
|
14
|
-
render: defaultConfig?.render,
|
15
|
-
placeholder: defaultConfig?.placeholder || i18n.$it('table.pleaseEnterSearchKey').d('请输入搜索关键词')
|
16
|
-
};
|
17
|
-
|
18
11
|
return (customConfig: iSearchServiceCustomConfig & Partial<iSearchServiceDefaultConfig>) => {
|
19
12
|
|
13
|
+
const _defaultConfig: iSearchServiceDefaultConfig = {
|
14
|
+
width: defaultConfig?.width || 560,
|
15
|
+
footer: defaultConfig?.footer,
|
16
|
+
render: defaultConfig?.render,
|
17
|
+
placeholder: defaultConfig?.placeholder || i18n.$it('table.pleaseEnterSearchKey').d('请输入搜索关键词')
|
18
|
+
};
|
19
|
+
|
20
20
|
const config: iSearchServiceConfig = {
|
21
21
|
..._defaultConfig,
|
22
22
|
...customConfig,
|