Selaa lähdekoodia

修改组件名为全称

visuddhinanda 2 vuotta sitten
vanhempi
sitoutus
661e1536d5

+ 2 - 2
dashboard/src/components/fts/FtsBookList.tsx

@@ -39,7 +39,7 @@ interface IWidget {
   onSelect?: Function;
 }
 
-const Widget = ({
+const FtsBookListWidget = ({
   keyWord,
   tags,
   bookId,
@@ -116,4 +116,4 @@ const Widget = ({
   );
 };
 
-export default Widget;
+export default FtsBookListWidget;

+ 9 - 3
dashboard/src/components/fts/FtsSetting.tsx

@@ -9,7 +9,12 @@ interface IWidget {
   match?: string | null;
   onChange?: Function;
 }
-const Widget = ({ trigger, orderBy = "rank", match, onChange }: IWidget) => {
+const FtsSettingWidget = ({
+  trigger,
+  orderBy = "rank",
+  match,
+  onChange,
+}: IWidget) => {
   const searchSetting: ISetting[] = [
     {
       key: "match",
@@ -40,8 +45,9 @@ const Widget = ({ trigger, orderBy = "rank", match, onChange }: IWidget) => {
       arrowPointAtCenter
       content={
         <>
-          {searchSetting.map((item) => (
+          {searchSetting.map((item, index) => (
             <SettingItem
+              key={index}
               data={item}
               onChange={(key: string, value: string | number | boolean) => {
                 if (typeof onChange !== "undefined") {
@@ -59,4 +65,4 @@ const Widget = ({ trigger, orderBy = "rank", match, onChange }: IWidget) => {
   );
 };
 
-export default Widget;
+export default FtsSettingWidget;

+ 2 - 2
dashboard/src/components/fts/FullTextSearchResult.tsx

@@ -47,7 +47,7 @@ interface IWidget {
   view?: string;
   pageType?: string;
 }
-const Widget = ({
+const FullTxtSearchResultWidget = ({
   keyWord,
   tags,
   bookId,
@@ -146,4 +146,4 @@ const Widget = ({
   );
 };
 
-export default Widget;
+export default FullTxtSearchResultWidget;