@quicktvui/ai 1.0.9 → 1.1.0

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 (345) hide show
  1. package/package.json +1 -1
  2. package/rules/.clinerules +1 -0
  3. package/rules/.cursorrules +1 -0
  4. package/rules/.github/copilot-instructions.md +1 -0
  5. package/rules/.source/hellotv/PROJECT-README.md +52 -0
  6. package/rules/.source/hellotv/app.d.ts +11 -0
  7. package/rules/.source/hellotv/package.json +146 -0
  8. package/rules/.source/hellotv/scripts/build-apk.ts +12 -0
  9. package/rules/.source/hellotv/scripts/build.ts +35 -0
  10. package/rules/.source/hellotv/scripts/dev.ts +12 -0
  11. package/rules/.source/hellotv/scripts/pack.ts +24 -0
  12. package/rules/.source/hellotv/scripts/process.ts +37 -0
  13. package/rules/.source/hellotv/scripts/quicktvui-webpack.android.ts +187 -0
  14. package/rules/.source/hellotv/scripts/quicktvui-webpack.dev.ts +147 -0
  15. package/rules/.source/hellotv/scripts/webpack-watch.ts +24 -0
  16. package/rules/.source/hellotv/src/App.vue +192 -0
  17. package/rules/.source/hellotv/src/api/my/index.ts +198 -0
  18. package/rules/.source/hellotv/src/api/user/impl-user.ts +52 -0
  19. package/rules/.source/hellotv/src/api/user/qr-code-mock.ts +2 -0
  20. package/rules/.source/hellotv/src/api/user/request-url.ts +11 -0
  21. package/rules/.source/hellotv/src/api/user/user-manager.ts +258 -0
  22. package/rules/.source/hellotv/src/app.scss +8 -0
  23. package/rules/.source/hellotv/src/assets/component-media/ic_media_btn_pause.png +0 -0
  24. package/rules/.source/hellotv/src/assets/component-media/ic_media_btn_play.png +0 -0
  25. package/rules/.source/hellotv/src/assets/component-media/ic_media_menu_setting_focused.png +0 -0
  26. package/rules/.source/hellotv/src/assets/component-media/ic_media_menu_setting_normal.png +0 -0
  27. package/rules/.source/hellotv/src/assets/component-media/ic_media_menu_xuanji_focused.png +0 -0
  28. package/rules/.source/hellotv/src/assets/component-media/ic_media_menu_xuanji_normal.png +0 -0
  29. package/rules/.source/hellotv/src/assets/component-media/ic_media_ok_focused.png +0 -0
  30. package/rules/.source/hellotv/src/assets/component-media/ic_media_ok_selected.png +0 -0
  31. package/rules/.source/hellotv/src/assets/detail/ic_collect_focused.png +0 -0
  32. package/rules/.source/hellotv/src/assets/detail/ic_collect_normal.png +0 -0
  33. package/rules/.source/hellotv/src/assets/detail/ic_full_focused.png +0 -0
  34. package/rules/.source/hellotv/src/assets/detail/ic_full_normal.png +0 -0
  35. package/rules/.source/hellotv/src/assets/detail/ic_info_focused.png +0 -0
  36. package/rules/.source/hellotv/src/assets/detail/ic_info_normal.png +0 -0
  37. package/rules/.source/hellotv/src/assets/detail/ic_introduction_bg.png +0 -0
  38. package/rules/.source/hellotv/src/assets/detail/ic_media_list_item_normal.png +0 -0
  39. package/rules/.source/hellotv/src/assets/detail/ic_media_list_item_selected.png +0 -0
  40. package/rules/.source/hellotv/src/assets/detail/ic_media_player_pause.png +0 -0
  41. package/rules/.source/hellotv/src/assets/detail/ic_media_player_placeholder.png +0 -0
  42. package/rules/.source/hellotv/src/assets/detail/ic_media_player_play.png +0 -0
  43. package/rules/.source/hellotv/src/assets/detail/ic_vip_focused.png +0 -0
  44. package/rules/.source/hellotv/src/assets/detail/ic_vip_normal.png +0 -0
  45. package/rules/.source/hellotv/src/assets/detail/skeleton.png +0 -0
  46. package/rules/.source/hellotv/src/assets/filter/ic_empty.png +0 -0
  47. package/rules/.source/hellotv/src/assets/filter/ic_filter_focused.png +0 -0
  48. package/rules/.source/hellotv/src/assets/filter/ic_filter_normal.png +0 -0
  49. package/rules/.source/hellotv/src/assets/filter/ic_filter_selected.png +0 -0
  50. package/rules/.source/hellotv/src/assets/filter/ic_left_focused.png +0 -0
  51. package/rules/.source/hellotv/src/assets/filter/ic_left_normal.png +0 -0
  52. package/rules/.source/hellotv/src/assets/filter/ic_left_selected.png +0 -0
  53. package/rules/.source/hellotv/src/assets/history/ic_delete.png +0 -0
  54. package/rules/.source/hellotv/src/assets/history/ic_empty.png +0 -0
  55. package/rules/.source/hellotv/src/assets/home/bg_history_item.png +0 -0
  56. package/rules/.source/hellotv/src/assets/home/bg_shadow.png +0 -0
  57. package/rules/.source/hellotv/src/assets/home/ic_4k_logo.png +0 -0
  58. package/rules/.source/hellotv/src/assets/home/ic_4k_play_focused.png +0 -0
  59. package/rules/.source/hellotv/src/assets/home/ic_4k_subtitle_normal.png +0 -0
  60. package/rules/.source/hellotv/src/assets/home/ic_arrow_focused.png +0 -0
  61. package/rules/.source/hellotv/src/assets/home/ic_arrow_normal.png +0 -0
  62. package/rules/.source/hellotv/src/assets/home/ic_exit_corner.png +0 -0
  63. package/rules/.source/hellotv/src/assets/home/ic_exit_header.png +0 -0
  64. package/rules/.source/hellotv/src/assets/home/ic_play.png +0 -0
  65. package/rules/.source/hellotv/src/assets/live/bg-error.png +0 -0
  66. package/rules/.source/hellotv/src/assets/live/bg-play-info.png +0 -0
  67. package/rules/.source/hellotv/src/assets/live/ic-arrow-left.png +0 -0
  68. package/rules/.source/hellotv/src/assets/live/ic-arrow-right.png +0 -0
  69. package/rules/.source/hellotv/src/assets/live/ic-back.png +0 -0
  70. package/rules/.source/hellotv/src/assets/live/ic-change.png +0 -0
  71. package/rules/.source/hellotv/src/assets/live/ic-corner-vip-tips.png +0 -0
  72. package/rules/.source/hellotv/src/assets/live/ic-corner-vip.png +0 -0
  73. package/rules/.source/hellotv/src/assets/live/ic-key.png +0 -0
  74. package/rules/.source/hellotv/src/assets/live/ic-loading-error.png +0 -0
  75. package/rules/.source/hellotv/src/assets/live/ic-menu-ext-arrow.png +0 -0
  76. package/rules/.source/hellotv/src/assets/live/ic-menu-ext.png +0 -0
  77. package/rules/.source/hellotv/src/assets/live/ic-menu.png +0 -0
  78. package/rules/.source/hellotv/src/assets/live/ic-mine.png +0 -0
  79. package/rules/.source/hellotv/src/assets/live/ic-network-error.png +0 -0
  80. package/rules/.source/hellotv/src/assets/live/ic-ok.png +0 -0
  81. package/rules/.source/hellotv/src/assets/live/ic-playing.png +0 -0
  82. package/rules/.source/hellotv/src/assets/live/ic-playing2.png +0 -0
  83. package/rules/.source/hellotv/src/assets/live/ic-playing3.png +0 -0
  84. package/rules/.source/hellotv/src/assets/live/ic-service.png +0 -0
  85. package/rules/.source/hellotv/src/assets/live/ic_live_broadcast.png +0 -0
  86. package/rules/.source/hellotv/src/assets/live/ic_live_broadcast_focused.png +0 -0
  87. package/rules/.source/hellotv/src/assets/my/ic_collect_focus.png +0 -0
  88. package/rules/.source/hellotv/src/assets/my/ic_collect_normal.png +0 -0
  89. package/rules/.source/hellotv/src/assets/my/ic_order_focus.png +0 -0
  90. package/rules/.source/hellotv/src/assets/my/ic_order_normal.png +0 -0
  91. package/rules/.source/hellotv/src/assets/my/ic_record_focus.png +0 -0
  92. package/rules/.source/hellotv/src/assets/my/ic_record_normal.png +0 -0
  93. package/rules/.source/hellotv/src/assets/my/ic_user.png +0 -0
  94. package/rules/.source/hellotv/src/assets/my/ic_vip_normal.png +0 -0
  95. package/rules/.source/hellotv/src/assets/search/ic_back.png +0 -0
  96. package/rules/.source/hellotv/src/assets/search/ic_back_focused.png +0 -0
  97. package/rules/.source/hellotv/src/assets/search/ic_clear.png +0 -0
  98. package/rules/.source/hellotv/src/assets/search/ic_clear_dark.png +0 -0
  99. package/rules/.source/hellotv/src/assets/search/ic_clear_focused.png +0 -0
  100. package/rules/.source/hellotv/src/assets/search/ic_search.png +0 -0
  101. package/rules/.source/hellotv/src/assets/top-view/ic_logo.png +0 -0
  102. package/rules/.source/hellotv/src/assets/top-view/ic_top_search_focused.png +0 -0
  103. package/rules/.source/hellotv/src/assets/top-view/ic_top_search_normal.png +0 -0
  104. package/rules/.source/hellotv/src/assets/top-view/ic_top_user_focused.png +0 -0
  105. package/rules/.source/hellotv/src/assets/top-view/ic_top_user_normal.png +0 -0
  106. package/rules/.source/hellotv/src/components/bg-animation.scss +14 -0
  107. package/rules/.source/hellotv/src/components/bg-animation.vue +176 -0
  108. package/rules/.source/hellotv/src/components/btn-pack-view.vue +172 -0
  109. package/rules/.source/hellotv/src/components/btn-pack.scss +53 -0
  110. package/rules/.source/hellotv/src/components/grid-item-horizontal.vue +203 -0
  111. package/rules/.source/hellotv/src/components/grid-item-vertical.vue +201 -0
  112. package/rules/.source/hellotv/src/components/media/build-data/media-config.ts +4 -0
  113. package/rules/.source/hellotv/src/components/media/build-data/media-control-adapter.ts +378 -0
  114. package/rules/.source/hellotv/src/components/media/build-data/media-imp.ts +44 -0
  115. package/rules/.source/hellotv/src/components/media/view/media-loading-component.vue +50 -0
  116. package/rules/.source/hellotv/src/components/media/view/media-loading-view.vue +154 -0
  117. package/rules/.source/hellotv/src/components/media/view/media-manager-view.vue +931 -0
  118. package/rules/.source/hellotv/src/components/media/view/media-menu-detail-item.vue +42 -0
  119. package/rules/.source/hellotv/src/components/media/view/media-menu-detail-view.vue +109 -0
  120. package/rules/.source/hellotv/src/components/media/view/media-menu-icon-item.vue +43 -0
  121. package/rules/.source/hellotv/src/components/media/view/media-menu-text-item.vue +27 -0
  122. package/rules/.source/hellotv/src/components/media/view/media-menu-view.vue +88 -0
  123. package/rules/.source/hellotv/src/components/media/view/media-player-view.vue +408 -0
  124. package/rules/.source/hellotv/src/components/media/view/scss/media-loading.scss +51 -0
  125. package/rules/.source/hellotv/src/components/media/view/scss/media-manager.scss +79 -0
  126. package/rules/.source/hellotv/src/components/media/view/scss/media-menu.scss +114 -0
  127. package/rules/.source/hellotv/src/components/media/view/scss/media-player.scss +6 -0
  128. package/rules/.source/hellotv/src/components/qt-tabs-component.ts +268 -0
  129. package/rules/.source/hellotv/src/components/qt-ul-component.ts +792 -0
  130. package/rules/.source/hellotv/src/components/top-view.scss +38 -0
  131. package/rules/.source/hellotv/src/components/top-view.vue +114 -0
  132. package/rules/.source/hellotv/src/config/README.md +22 -0
  133. package/rules/.source/hellotv/src/config/build-config.ts +22 -0
  134. package/rules/.source/hellotv/src/config/private-theme-config.ts +21 -0
  135. package/rules/.source/hellotv/src/config/public-config.scss +16 -0
  136. package/rules/.source/hellotv/src/config/test.scss +45 -0
  137. package/rules/.source/hellotv/src/config/theme-config.ts +51 -0
  138. package/rules/.source/hellotv/src/main.ts +45 -0
  139. package/rules/.source/hellotv/src/pages/activity/adapter/config.ts +37 -0
  140. package/rules/.source/hellotv/src/pages/activity/adapter/index.ts +849 -0
  141. package/rules/.source/hellotv/src/pages/activity/adapter/interface.ts +173 -0
  142. package/rules/.source/hellotv/src/pages/activity/api/index.ts +36 -0
  143. package/rules/.source/hellotv/src/pages/activity/api/interface.ts +11 -0
  144. package/rules/.source/hellotv/src/pages/activity/api/request-url.ts +10 -0
  145. package/rules/.source/hellotv/src/pages/activity/components/item/focus-change-img-item.vue +40 -0
  146. package/rules/.source/hellotv/src/pages/activity/components/item/inner-out-title-item.vue +59 -0
  147. package/rules/.source/hellotv/src/pages/activity/components/item/no-title-item.vue +45 -0
  148. package/rules/.source/hellotv/src/pages/activity/components/item/placeholder-item.vue +25 -0
  149. package/rules/.source/hellotv/src/pages/activity/index.vue +219 -0
  150. package/rules/.source/hellotv/src/pages/activity/scss/index.scss +46 -0
  151. package/rules/.source/hellotv/src/pages/activity/scss/item.scss +69 -0
  152. package/rules/.source/hellotv/src/pages/detail/adapter/index.ts +317 -0
  153. package/rules/.source/hellotv/src/pages/detail/adapter/interface.ts +150 -0
  154. package/rules/.source/hellotv/src/pages/detail/adapter/media-player.ts +378 -0
  155. package/rules/.source/hellotv/src/pages/detail/api/index.ts +77 -0
  156. package/rules/.source/hellotv/src/pages/detail/api/request-url.ts +8 -0
  157. package/rules/.source/hellotv/src/pages/detail/components/media-player/collapse/media-collapse-definition.vue +192 -0
  158. package/rules/.source/hellotv/src/pages/detail/components/media-player/collapse/media-collapse-list-item.vue +108 -0
  159. package/rules/.source/hellotv/src/pages/detail/components/media-player/collapse/media-collapse-media-series.vue +349 -0
  160. package/rules/.source/hellotv/src/pages/detail/components/media-player/collapse/media-collapse-order.vue +194 -0
  161. package/rules/.source/hellotv/src/pages/detail/components/media-player/collapse/media-collapse-speed.vue +192 -0
  162. package/rules/.source/hellotv/src/pages/detail/components/media-player/index.vue +404 -0
  163. package/rules/.source/hellotv/src/pages/detail/components/media-player/media-player-small-view.vue +382 -0
  164. package/rules/.source/hellotv/src/pages/detail/components/media-player/media-player-view.vue +1099 -0
  165. package/rules/.source/hellotv/src/pages/detail/components/recommend-item.vue +167 -0
  166. package/rules/.source/hellotv/src/pages/detail/components/section/basic-section.vue +218 -0
  167. package/rules/.source/hellotv/src/pages/detail/components/section/config.ts +6 -0
  168. package/rules/.source/hellotv/src/pages/detail/components/section/header-section.vue +15 -0
  169. package/rules/.source/hellotv/src/pages/detail/components/section/item/button-menu.vue +259 -0
  170. package/rules/.source/hellotv/src/pages/detail/components/section/item/media-introduction.vue +238 -0
  171. package/rules/.source/hellotv/src/pages/detail/components/section/item/media-series.vue +308 -0
  172. package/rules/.source/hellotv/src/pages/detail/components/section/item/player-placeholder.vue +88 -0
  173. package/rules/.source/hellotv/src/pages/detail/index.vue +571 -0
  174. package/rules/.source/hellotv/src/pages/detail/scss/index.scss +22 -0
  175. package/rules/.source/hellotv/src/pages/detail-full-player/components/media-player/full-player-loading.vue +78 -0
  176. package/rules/.source/hellotv/src/pages/detail-full-player/components/media-player/full-player-menu-view.vue +803 -0
  177. package/rules/.source/hellotv/src/pages/detail-full-player/components/media-player/full-player-view.vue +219 -0
  178. package/rules/.source/hellotv/src/pages/detail-full-player/index.vue +101 -0
  179. package/rules/.source/hellotv/src/pages/detail-full-player/scss/full-player-view.scss +6 -0
  180. package/rules/.source/hellotv/src/pages/detail-full-screen/adapter/index.ts +0 -0
  181. package/rules/.source/hellotv/src/pages/detail-full-screen/adapter/interface.ts +133 -0
  182. package/rules/.source/hellotv/src/pages/detail-full-screen/api/index.ts +77 -0
  183. package/rules/.source/hellotv/src/pages/detail-full-screen/api/request-url.ts +8 -0
  184. package/rules/.source/hellotv/src/pages/detail-full-screen/components/media-info.vue +263 -0
  185. package/rules/.source/hellotv/src/pages/detail-full-screen/components/media-player.vue +42 -0
  186. package/rules/.source/hellotv/src/pages/detail-full-screen/components/media-series-section.vue +26 -0
  187. package/rules/.source/hellotv/src/pages/detail-full-screen/components/recommend-item.vue +167 -0
  188. package/rules/.source/hellotv/src/pages/detail-full-screen/index.vue +163 -0
  189. package/rules/.source/hellotv/src/pages/detail-full-screen/scss/index.scss +41 -0
  190. package/rules/.source/hellotv/src/pages/device-info/index.vue +106 -0
  191. package/rules/.source/hellotv/src/pages/device-info/scss/device-info.scss +49 -0
  192. package/rules/.source/hellotv/src/pages/filter/README.md +66 -0
  193. package/rules/.source/hellotv/src/pages/filter/adapter/index.ts +180 -0
  194. package/rules/.source/hellotv/src/pages/filter/adapter/interface.ts +111 -0
  195. package/rules/.source/hellotv/src/pages/filter/api/index.ts +38 -0
  196. package/rules/.source/hellotv/src/pages/filter/api/interface.ts +44 -0
  197. package/rules/.source/hellotv/src/pages/filter/api/request-url.ts +8 -0
  198. package/rules/.source/hellotv/src/pages/filter/components/content/index.vue +469 -0
  199. package/rules/.source/hellotv/src/pages/filter/components/content/list-item-record.vue +16 -0
  200. package/rules/.source/hellotv/src/pages/filter/components/content/list-item.vue +78 -0
  201. package/rules/.source/hellotv/src/pages/filter/components/expand/index.vue +83 -0
  202. package/rules/.source/hellotv/src/pages/filter/components/sidebar/index.vue +81 -0
  203. package/rules/.source/hellotv/src/pages/filter/components/sidebar/list-item-filter-title.vue +78 -0
  204. package/rules/.source/hellotv/src/pages/filter/components/sidebar/list-item-filter.vue +68 -0
  205. package/rules/.source/hellotv/src/pages/filter/components/sidebar/list-item-line.vue +11 -0
  206. package/rules/.source/hellotv/src/pages/filter/components/sidebar/list-item-text.vue +43 -0
  207. package/rules/.source/hellotv/src/pages/filter/components/sidebar/list-item-title.vue +14 -0
  208. package/rules/.source/hellotv/src/pages/filter/config.ts +10 -0
  209. package/rules/.source/hellotv/src/pages/filter/expand-sidebar-contents.vue +203 -0
  210. package/rules/.source/hellotv/src/pages/filter/scss/filter-content-list-item.scss +42 -0
  211. package/rules/.source/hellotv/src/pages/filter/scss/filter-content.scss +60 -0
  212. package/rules/.source/hellotv/src/pages/filter/scss/filter-expand.scss +30 -0
  213. package/rules/.source/hellotv/src/pages/filter/scss/filter-sidebar.scss +45 -0
  214. package/rules/.source/hellotv/src/pages/filter/scss/filter.scss +21 -0
  215. package/rules/.source/hellotv/src/pages/filter/sidebar-contents.vue +145 -0
  216. package/rules/.source/hellotv/src/pages/filter/single-contents.vue +61 -0
  217. package/rules/.source/hellotv/src/pages/history/adapter/index.ts +51 -0
  218. package/rules/.source/hellotv/src/pages/history/adapter/interface.ts +22 -0
  219. package/rules/.source/hellotv/src/pages/history/api/index.ts +54 -0
  220. package/rules/.source/hellotv/src/pages/history/api/interface.ts +41 -0
  221. package/rules/.source/hellotv/src/pages/history/api/request-url.ts +10 -0
  222. package/rules/.source/hellotv/src/pages/history/components/confirm-dialog.vue +155 -0
  223. package/rules/.source/hellotv/src/pages/history/config.ts +8 -0
  224. package/rules/.source/hellotv/src/pages/history/index-raw.vue +540 -0
  225. package/rules/.source/hellotv/src/pages/history/index.vue +431 -0
  226. package/rules/.source/hellotv/src/pages/history/mock.ts +32 -0
  227. package/rules/.source/hellotv/src/pages/history/scss/history-raw.scss +181 -0
  228. package/rules/.source/hellotv/src/pages/history/scss/history.scss +148 -0
  229. package/rules/.source/hellotv/src/pages/home/adapter/exit/home-exit-adapter.ts +20 -0
  230. package/rules/.source/hellotv/src/pages/home/adapter/exit/home-exit-imp.ts +13 -0
  231. package/rules/.source/hellotv/src/pages/home/adapter/media/create-home-player-interceptor.ts +50 -0
  232. package/rules/.source/hellotv/src/pages/home/adapter/media/home-media-imp.ts +74 -0
  233. package/rules/.source/hellotv/src/pages/home/adapter/tab-bar/tab-bar-adapter.ts +151 -0
  234. package/rules/.source/hellotv/src/pages/home/adapter/tab-bar/tab-bar-config.ts +17 -0
  235. package/rules/.source/hellotv/src/pages/home/adapter/tab-bar/tab-bar-imp.ts +53 -0
  236. package/rules/.source/hellotv/src/pages/home/adapter/tab-bar/tab-bar-item-type.ts +6 -0
  237. package/rules/.source/hellotv/src/pages/home/adapter/tab-content/tab-content-adapter.ts +1304 -0
  238. package/rules/.source/hellotv/src/pages/home/adapter/tab-content/tab-content-config.ts +30 -0
  239. package/rules/.source/hellotv/src/pages/home/adapter/tab-content/tab-content-imp.ts +173 -0
  240. package/rules/.source/hellotv/src/pages/home/adapter/tab-content/tab-content-item-type.ts +17 -0
  241. package/rules/.source/hellotv/src/pages/home/api/index.ts +157 -0
  242. package/rules/.source/hellotv/src/pages/home/api/interface.ts +56 -0
  243. package/rules/.source/hellotv/src/pages/home/api/request-url.ts +22 -0
  244. package/rules/.source/hellotv/src/pages/home/components/exit-dialog.vue +148 -0
  245. package/rules/.source/hellotv/src/pages/home/components/media/bg-player.vue +440 -0
  246. package/rules/.source/hellotv/src/pages/home/components/nav-bar/bar-img-item.vue +39 -0
  247. package/rules/.source/hellotv/src/pages/home/components/nav-bar/bar-text-item.vue +100 -0
  248. package/rules/.source/hellotv/src/pages/home/components/tab-content/bg-player-cell-list-item-img.vue +54 -0
  249. package/rules/.source/hellotv/src/pages/home/components/tab-content/bg-player-cell-list-item-text.vue +67 -0
  250. package/rules/.source/hellotv/src/pages/home/components/tab-content/cell-list-player-item.vue +74 -0
  251. package/rules/.source/hellotv/src/pages/home/components/tab-content/cell-player-item.vue +40 -0
  252. package/rules/.source/hellotv/src/pages/home/components/tab-content/focus-change-img-item.vue +41 -0
  253. package/rules/.source/hellotv/src/pages/home/components/tab-content/history-item.vue +362 -0
  254. package/rules/.source/hellotv/src/pages/home/components/tab-content/inner-out-title-item.vue +60 -0
  255. package/rules/.source/hellotv/src/pages/home/components/tab-content/no-title-item.vue +46 -0
  256. package/rules/.source/hellotv/src/pages/home/components/tab-content/placeholder-item.vue +25 -0
  257. package/rules/.source/hellotv/src/pages/home/components/tab-content/short-video/short-video-section-item.vue +80 -0
  258. package/rules/.source/hellotv/src/pages/home/components/tab-content/short-video/short-video-section.vue +70 -0
  259. package/rules/.source/hellotv/src/pages/home/components/tab-content/small-4k/small-four-section.vue +76 -0
  260. package/rules/.source/hellotv/src/pages/home/components/tab-content/world-4k/world-four-section-item.vue +90 -0
  261. package/rules/.source/hellotv/src/pages/home/components/tab-content/world-4k/world-four-section.vue +57 -0
  262. package/rules/.source/hellotv/src/pages/home/components/waterfall-tabs.vue +1307 -0
  263. package/rules/.source/hellotv/src/pages/home/index.vue +117 -0
  264. package/rules/.source/hellotv/src/pages/home/scss/bar-img-item.scss +11 -0
  265. package/rules/.source/hellotv/src/pages/home/scss/bar-text-item.scss +80 -0
  266. package/rules/.source/hellotv/src/pages/home/scss/base.scss +8 -0
  267. package/rules/.source/hellotv/src/pages/home/scss/bg-player-cell-list-item.scss +24 -0
  268. package/rules/.source/hellotv/src/pages/home/scss/bg-player.scss +50 -0
  269. package/rules/.source/hellotv/src/pages/home/scss/cell-player-item.scss +24 -0
  270. package/rules/.source/hellotv/src/pages/home/scss/exit-dialog.scss +89 -0
  271. package/rules/.source/hellotv/src/pages/home/scss/focus-change-img-item.scss +12 -0
  272. package/rules/.source/hellotv/src/pages/home/scss/home.scss +32 -0
  273. package/rules/.source/hellotv/src/pages/home/scss/inner-out-title-item.scss +24 -0
  274. package/rules/.source/hellotv/src/pages/home/scss/no-title-item.scss +15 -0
  275. package/rules/.source/hellotv/src/pages/home/scss/placeholder-item.scss +14 -0
  276. package/rules/.source/hellotv/src/pages/home/scss/short-video-section.scss +59 -0
  277. package/rules/.source/hellotv/src/pages/home/scss/small-four-section.scss +14 -0
  278. package/rules/.source/hellotv/src/pages/home/scss/waterfall-tabs.scss +50 -0
  279. package/rules/.source/hellotv/src/pages/home/scss/world-four-section.scss +106 -0
  280. package/rules/.source/hellotv/src/pages/introduction/index.vue +227 -0
  281. package/rules/.source/hellotv/src/pages/live/components/menu/first-list-item-icon-text.vue +35 -0
  282. package/rules/.source/hellotv/src/pages/live/components/menu/first-list-item-img.vue +16 -0
  283. package/rules/.source/hellotv/src/pages/live/components/menu/first-list-item-text.vue +16 -0
  284. package/rules/.source/hellotv/src/pages/live/components/menu/index.vue +266 -0
  285. package/rules/.source/hellotv/src/pages/live/components/menu/second-list-item.vue +80 -0
  286. package/rules/.source/hellotv/src/pages/live/components/menu/third-list-item.vue +68 -0
  287. package/rules/.source/hellotv/src/pages/live/components/player/index.vue +168 -0
  288. package/rules/.source/hellotv/src/pages/live/components/player/player-error.vue +48 -0
  289. package/rules/.source/hellotv/src/pages/live/components/player/player-loading.vue +50 -0
  290. package/rules/.source/hellotv/src/pages/live/components/player/player-tips.vue +125 -0
  291. package/rules/.source/hellotv/src/pages/live/components/player/tips-icon-text.vue +27 -0
  292. package/rules/.source/hellotv/src/pages/live/css/menu.css +109 -0
  293. package/rules/.source/hellotv/src/pages/live/css/player.css +56 -0
  294. package/rules/.source/hellotv/src/pages/live/index.vue +128 -0
  295. package/rules/.source/hellotv/src/pages/live/mock/index.ts +263 -0
  296. package/rules/.source/hellotv/src/pages/live/types/index.ts +42 -0
  297. package/rules/.source/hellotv/src/pages/login/index.vue +116 -0
  298. package/rules/.source/hellotv/src/pages/login/scss/login.scss +61 -0
  299. package/rules/.source/hellotv/src/pages/m-test.vue +84 -0
  300. package/rules/.source/hellotv/src/pages/my/README.md +87 -0
  301. package/rules/.source/hellotv/src/pages/my/index.vue +177 -0
  302. package/rules/.source/hellotv/src/pages/my/my-data-manager.ts +606 -0
  303. package/rules/.source/hellotv/src/pages/my/my-templates.vue +24 -0
  304. package/rules/.source/hellotv/src/pages/my/poster/index.vue +98 -0
  305. package/rules/.source/hellotv/src/pages/my/poster/my-card2.vue +90 -0
  306. package/rules/.source/hellotv/src/pages/my/poster/my-icon-title-col.vue +72 -0
  307. package/rules/.source/hellotv/src/pages/my/poster/my-icon-title-row.vue +72 -0
  308. package/rules/.source/hellotv/src/pages/my/poster/my-info.vue +50 -0
  309. package/rules/.source/hellotv/src/pages/my/poster/my-user.vue +126 -0
  310. package/rules/.source/hellotv/src/pages/play-test.vue +95 -0
  311. package/rules/.source/hellotv/src/pages/search/README.md +57 -0
  312. package/rules/.source/hellotv/src/pages/search/adapter/index.ts +285 -0
  313. package/rules/.source/hellotv/src/pages/search/adapter/interface.ts +60 -0
  314. package/rules/.source/hellotv/src/pages/search/api/index.ts +100 -0
  315. package/rules/.source/hellotv/src/pages/search/api/interface.ts +64 -0
  316. package/rules/.source/hellotv/src/pages/search/api/request-url.ts +20 -0
  317. package/rules/.source/hellotv/src/pages/search/components/search-content-tabs.vue +153 -0
  318. package/rules/.source/hellotv/src/pages/search/components/search-content.vue +282 -0
  319. package/rules/.source/hellotv/src/pages/search/components/search-keyboard.vue +252 -0
  320. package/rules/.source/hellotv/src/pages/search/components/search-keyword-grid.vue +85 -0
  321. package/rules/.source/hellotv/src/pages/search/components/search-keyword.vue +346 -0
  322. package/rules/.source/hellotv/src/pages/search/config.ts +10 -0
  323. package/rules/.source/hellotv/src/pages/search/scss/search-content.scss +130 -0
  324. package/rules/.source/hellotv/src/pages/search/scss/search-keyboard.scss +91 -0
  325. package/rules/.source/hellotv/src/pages/search/scss/search-keyword-grid.scss +30 -0
  326. package/rules/.source/hellotv/src/pages/search/scss/search-keyword.scss +104 -0
  327. package/rules/.source/hellotv/src/pages/search/scss/search.scss +18 -0
  328. package/rules/.source/hellotv/src/pages/search/three-columns.vue +164 -0
  329. package/rules/.source/hellotv/src/pages/search/two-columns.vue +128 -0
  330. package/rules/.source/hellotv/src/pages/tabs-test.vue +339 -0
  331. package/rules/.source/hellotv/src/pages/webview/load-web-view.vue +44 -0
  332. package/rules/.source/hellotv/src/routes.ts +142 -0
  333. package/rules/.source/hellotv/src/tools/common.ts +18 -0
  334. package/rules/.source/hellotv/src/tools/format-date.ts +16 -0
  335. package/rules/.source/hellotv/src/tools/index.ts +58 -0
  336. package/rules/.source/hellotv/src/tools/launch.ts +339 -0
  337. package/rules/.source/hellotv/src/tools/request/index.ts +206 -0
  338. package/rules/.source/hellotv/src/tools/request/interface.ts +64 -0
  339. package/rules/.source/hellotv/src/typings/shims-vue.d.ts +6 -0
  340. package/rules/.source/hellotv/src/vue.config.js +3 -0
  341. package/rules/.source/hellotv/tsconfig.json +34 -0
  342. package/rules/.windsurfrules +1 -0
  343. package/rules/AGENTS.md +1 -0
  344. package/rules/CLAUDE.md +1 -0
  345. package/rules/GEMINI.md +1 -0
@@ -0,0 +1,792 @@
1
+ import {
2
+ defineComponent,
3
+ h,
4
+ nextTick,
5
+ onMounted,
6
+ ref,
7
+ renderSlot,
8
+ toRaw,
9
+ watch,
10
+ reactive,
11
+ } from "vue";
12
+ import { ESApp, Native, registerElement } from "@extscreen/es3-vue";
13
+ import { display } from "@extscreen/es3-core";
14
+ interface ESListViewItemDecoration {
15
+ left?: number;
16
+ top?: number;
17
+ right?: number;
18
+ bottom?: number;
19
+ }
20
+ interface ESListViewItem {
21
+ _id?: string;
22
+ type: number;
23
+ decoration?: ESListViewItemDecoration;
24
+
25
+ [prop: string]: any;
26
+ }
27
+ interface ESListViewItemFunctionParams {
28
+ itemPosition: number;
29
+ targetName: string;
30
+ functionTargetName: string;
31
+ data: Array<any>;
32
+ }
33
+ enum ESDirections {
34
+ ES_DIRECTION_UP = "up",
35
+ ES_DIRECTION_DOWN = "down",
36
+ ES_DIRECTION_RIGHT = "right",
37
+ ES_DIRECTION_LEFT = "left",
38
+ }
39
+ function registerQTULViewComponent(app: ESApp) {
40
+ registerElement("FastListView", {
41
+ component: {
42
+ name: "FastListView",
43
+ processEventData(
44
+ evtData: any,
45
+ nativeEventParams: {
46
+ isFocused: boolean;
47
+ position: number;
48
+ index: number;
49
+ y: number;
50
+ item: any;
51
+ hasFocus: boolean;
52
+ name: string;
53
+ parentPosition: number;
54
+ pageIndex: number;
55
+ child: any;
56
+ isLastLine: any;
57
+ itemCount: number;
58
+ direction: string;
59
+ contentOffset: any;
60
+ state: any;
61
+ hIndex: number;
62
+ },
63
+ ) {
64
+ const { handler: event, __evt: nativeEventName } = evtData;
65
+ switch (nativeEventName) {
66
+ case "onItemClick":
67
+ if (nativeEventParams) {
68
+ event.position = nativeEventParams.position;
69
+ event.index = nativeEventParams.index;
70
+ event.item = nativeEventParams.item;
71
+ event.name = nativeEventParams.name;
72
+ event.parentPosition = nativeEventParams.parentPosition;
73
+ }
74
+ break;
75
+ case "onItemFocused":
76
+ if (nativeEventParams) {
77
+ event.position = nativeEventParams.position;
78
+ event.index = nativeEventParams.index;
79
+ event.hasFocus = nativeEventParams.hasFocus;
80
+ event.isFocused = nativeEventParams.hasFocus;
81
+ event.item = nativeEventParams.item;
82
+ event.name = nativeEventParams.name;
83
+ event.parentPosition = nativeEventParams.parentPosition;
84
+ }
85
+ break;
86
+ case "onBindItem":
87
+ if (nativeEventParams) {
88
+ event.position = nativeEventParams.position;
89
+ event.pageIndex = nativeEventParams.pageIndex;
90
+ event.name = nativeEventParams.name;
91
+ event.item = nativeEventParams.item;
92
+ }
93
+ break;
94
+ case "onAttachedToWindow":
95
+ if (nativeEventParams) {
96
+ event.position = nativeEventParams.position;
97
+ event.pageIndex = nativeEventParams.pageIndex;
98
+ event.name = nativeEventParams.name;
99
+ event.item = nativeEventParams.item;
100
+ }
101
+ break;
102
+ case "onDetachedFromWindow":
103
+ if (nativeEventParams) {
104
+ event.position = nativeEventParams.position;
105
+ event.pageIndex = nativeEventParams.pageIndex;
106
+ event.name = nativeEventParams.name;
107
+ event.item = nativeEventParams.item;
108
+ }
109
+ break;
110
+ case "onUnbindItem":
111
+ if (nativeEventParams) {
112
+ event.position = nativeEventParams.position;
113
+ event.name = nativeEventParams.name;
114
+ }
115
+ break;
116
+ case "onScroll":
117
+ if (nativeEventParams) {
118
+ event.offsetX = nativeEventParams.contentOffset.x;
119
+ event.offsetY = nativeEventParams.contentOffset.y;
120
+ }
121
+ break;
122
+ case "onScrollOffset":
123
+ if (nativeEventParams) {
124
+ event.offsetY = nativeEventParams.y;
125
+ }
126
+ break;
127
+ case "onScrollStateChanged":
128
+ if (nativeEventParams) {
129
+ event.offsetX = nativeEventParams.contentOffset.x;
130
+ event.offsetY = nativeEventParams.contentOffset.y;
131
+ event.oldState = nativeEventParams.state.oldState;
132
+ event.newState = nativeEventParams.state.newState;
133
+ }
134
+ break;
135
+ case "onChildFocus":
136
+ if (nativeEventParams) {
137
+ event.child = {
138
+ index: nativeEventParams.child.index,
139
+ id: nativeEventParams.child.id,
140
+ name: nativeEventParams.child.name,
141
+ position: nativeEventParams.child.position,
142
+ };
143
+ event.focused = {
144
+ id: nativeEventParams.child.id,
145
+ name: nativeEventParams.child.name,
146
+ };
147
+ }
148
+ break;
149
+ case "onChildSelect":
150
+ if (nativeEventParams) {
151
+ event.child = {
152
+ index: nativeEventParams.child.index,
153
+ id: nativeEventParams.child.id,
154
+ name: nativeEventParams.child.name,
155
+ position: nativeEventParams.child.position,
156
+ };
157
+ }
158
+ break;
159
+ case "onFocusSearchFailed":
160
+ if (nativeEventParams) {
161
+ event.child = {
162
+ index: nativeEventParams.child.index,
163
+ id: nativeEventParams.child.id,
164
+ name: nativeEventParams.child.name,
165
+ position: nativeEventParams.child.position,
166
+ };
167
+ event.focused = {
168
+ id: nativeEventParams.child.id,
169
+ name: nativeEventParams.child.name,
170
+ };
171
+ event.direction = nativeEventParams.direction;
172
+ }
173
+ break;
174
+ case "onLoadMore":
175
+ if (nativeEventParams) {
176
+ event.name = nativeEventParams.name;
177
+ event.isLastLine = nativeEventParams.isLastLine;
178
+ event.itemCount = nativeEventParams.itemCount;
179
+ event.position = nativeEventParams.position;
180
+ }
181
+ break;
182
+ default:
183
+ break;
184
+ }
185
+ return event;
186
+ },
187
+ },
188
+ });
189
+ registerElement("RecyclePool", {
190
+ component: {
191
+ name: "RecyclePool",
192
+ processEventData(evtData: any, nativeEventParams: any) {
193
+ const { handler: event, __evt: nativeEventName } = evtData;
194
+ switch (nativeEventName) {
195
+ case "onCreateHolder":
196
+ //console.log(`process onCreateHolder nativeEventParams ${JSON.stringify(nativeEventParams)}`)
197
+ if (nativeEventParams) {
198
+ event.batch = nativeEventParams.batch;
199
+ event.hashTag = nativeEventParams.hashTag;
200
+ // event.position = nativeEventParams.position;
201
+ }
202
+ break;
203
+ case "onBindHolder":
204
+ if (nativeEventParams) {
205
+ event.batch = nativeEventParams.batch;
206
+ event.hashTag = nativeEventParams.hashTag;
207
+ }
208
+ //console.log('onBindHolder index', event.hIndex, 'position', event.position)
209
+ break;
210
+ case "onRecycleHolder":
211
+ if (nativeEventParams) {
212
+ event.batch = nativeEventParams.batch;
213
+ event.hashTag = nativeEventParams.hashTag;
214
+ }
215
+ //console.log('onBindHolder index', event.hIndex, 'position', event.position)
216
+ break;
217
+ case "onBatch":
218
+ if (nativeEventParams) {
219
+ event.createItem = nativeEventParams.createItem;
220
+ event.bindItem = nativeEventParams.bindItem;
221
+ event.recycleItem = nativeEventParams.recycleItem;
222
+ event.hashTag = nativeEventParams.hashTag;
223
+ }
224
+ //console.log('onBindHolder index', event.hIndex, 'position', event.position)
225
+ break;
226
+ }
227
+ return event;
228
+ },
229
+ },
230
+ });
231
+ const QTULViewImpl = defineComponent({
232
+ emits: [
233
+ "item-click",
234
+ "scroll",
235
+ "item-focused",
236
+ "item-attached",
237
+ "item-detached",
238
+ "item-bind",
239
+ "item-unbind",
240
+ "load-more",
241
+ "focus",
242
+ "scroll-state-changed",
243
+ "focus-search-failed",
244
+ "scrollYGreaterReference",
245
+ "scrollYLesserReference",
246
+ ],
247
+ props: {
248
+ data: {
249
+ type: Array,
250
+ default: () => [],
251
+ },
252
+ loadMore: {
253
+ type: Function,
254
+ default: function () {
255
+ return null;
256
+ },
257
+ },
258
+ disableVirtualDOM: {
259
+ type: Boolean,
260
+ default: true,
261
+ },
262
+ },
263
+ setup(props, context) {
264
+ const viewRef = ref();
265
+ function scrollToIndex(
266
+ x: number,
267
+ y: number,
268
+ animated?: boolean,
269
+ duration?: number,
270
+ offset?: number,
271
+ ) {
272
+ Native.callUIFunction(viewRef.value, "scrollToIndex", [
273
+ x,
274
+ y,
275
+ animated,
276
+ duration,
277
+ offset,
278
+ ]);
279
+ }
280
+ function startScroll(data) {
281
+ Native.callUIFunction(viewRef.value, "startScroll", [data]);
282
+ }
283
+ function setSelectChildPosition(position: number, requestFocus: boolean) {
284
+ Native.callUIFunction(viewRef.value, "setSelectChildPosition", [
285
+ position,
286
+ requestFocus,
287
+ ]);
288
+ }
289
+ function scrollToPositionWithOffset(
290
+ x: number,
291
+ y: number,
292
+ anim: boolean,
293
+ offset: number,
294
+ duration: number,
295
+ ) {
296
+ Native.callUIFunction(viewRef.value, "scrollToPositionWithOffset", [
297
+ y,
298
+ offset,
299
+ anim,
300
+ ]);
301
+ }
302
+ function scrollToPositionWithOffsetInfiniteMode(
303
+ position: number,
304
+ offset: number,
305
+ animated: boolean,
306
+ ): void {
307
+ Native.callUIFunction(
308
+ viewRef.value,
309
+ "scrollToPositionWithOffsetInfiniteMode",
310
+ [position, offset, animated],
311
+ );
312
+ }
313
+ function scrollToPosition(index: number) {
314
+ Native.callUIFunction(viewRef.value, "scrollToPosition", [index]);
315
+ }
316
+ function destroy() {
317
+ Native.callUIFunction(viewRef.value, "destroy", []);
318
+ }
319
+ function recycle(): void {
320
+ Native.callUIFunction(viewRef.value, "recycle", []);
321
+ }
322
+ function scrollToTop() {
323
+ Native.callUIFunction(viewRef.value, "scrollToTop", []);
324
+ }
325
+ function scrollToFocus(
326
+ position: number,
327
+ scrollOffset: number,
328
+ delay: number,
329
+ target: string,
330
+ ): void {
331
+ Native.callUIFunction(viewRef.value, "scrollToFocus", [
332
+ position,
333
+ scrollOffset,
334
+ delay,
335
+ target,
336
+ ]);
337
+ }
338
+ function prepareForRecycle() {
339
+ Native.callUIFunction(viewRef.value, "prepareForRecycle", []);
340
+ }
341
+ function setDisplay(value: boolean) {
342
+ Native.callUIFunction(viewRef.value, "setDisplay", [value]);
343
+ }
344
+ function changeDisplayState(display: string, autoDataState: any) {
345
+ Native.callUIFunction(viewRef.value, "changeDisplayState", [
346
+ display,
347
+ autoDataState,
348
+ ]);
349
+ }
350
+ function notifySaveInstance() {
351
+ Native.callUIFunction(viewRef.value, "notifySaveInstance", []);
352
+ }
353
+ function dispatchItemFunction(
354
+ position: number,
355
+ name: string,
356
+ funcName: string,
357
+ params: ESListViewItemFunctionParams,
358
+ ) {
359
+ Native.callUIFunction(viewRef.value, "dispatchItemFunction", [
360
+ position,
361
+ name,
362
+ funcName,
363
+ params,
364
+ ]);
365
+ }
366
+ function clearPostTask() {
367
+ Native.callUIFunction(viewRef.value, "clearAllPostTask", []);
368
+ }
369
+ function clearPostTaskByCate(data: Array<number>): void {
370
+ Native.callUIFunction(viewRef.value, "clearPostTaskByCate", [data]);
371
+ }
372
+ function clearData(): void {
373
+ Native.callUIFunction(viewRef.value, "clearData", []);
374
+ }
375
+ function pausePostTask() {
376
+ Native.callUIFunction(viewRef.value, "pausePostTask", []);
377
+ }
378
+ function resumePostTask() {
379
+ Native.callUIFunction(viewRef.value, "resumePostTask", []);
380
+ }
381
+ function requestLayoutManual(): void {
382
+ Native.callUIFunction(viewRef.value, "requestLayoutManual", []);
383
+ }
384
+ function setSpanCount(count: number) {
385
+ Native.callUIFunction(viewRef.value, "setSpanCount", [count]);
386
+ }
387
+ function searchReplaceItem(id: string, item: ESListViewItem): void {
388
+ Native.callUIFunction(viewRef.value, "searchReplaceItem", []);
389
+ }
390
+ function setCustomStateEnableOnFocus(
391
+ id: string,
392
+ params: Array<Array<string>>,
393
+ ): void {
394
+ Native.callUIFunction(viewRef.value, "setCustomStateEnableOnFocus", [
395
+ id,
396
+ params,
397
+ ]);
398
+ }
399
+ function setItemCustomState(
400
+ position: number,
401
+ stateName: string,
402
+ stateValue: boolean,
403
+ ) {
404
+ Native.callUIFunction(viewRef.value, "setItemCustomState", [
405
+ position,
406
+ stateName,
407
+ stateValue,
408
+ ]);
409
+ }
410
+ function dispatchItemFunctionWithPromise(
411
+ position: number,
412
+ targetName: string,
413
+ functionTargetName: string,
414
+ params: Array<Record<string, any>>,
415
+ ): Promise<Record<string, any>> {
416
+ return Native.callNativeWithPromise(
417
+ viewRef.value,
418
+ "dispatchItemFunctionWithPromise",
419
+ [position, targetName, functionTargetName, params],
420
+ );
421
+ }
422
+ function getScrollOffset(callback: () => void) {
423
+ Native.callUIFunction(viewRef.value, "getScrollOffset", [], callback);
424
+ }
425
+ //----------------------------------------------------------------------------------------
426
+ //########################################################################################
427
+ //########################################################################################
428
+ //########################################################################################
429
+ //----------------------------------------------------------------------------------------
430
+ function setInitPosition(position: number) {
431
+ Native.callUIFunction(viewRef.value, "setInitPosition", [position]);
432
+ }
433
+ function dispatchTVItemFunction(
434
+ id: number | string,
435
+ name: string,
436
+ funcName: string,
437
+ params: ESListViewItemFunctionParams,
438
+ ) {
439
+ Native.callUIFunction(viewRef.value, "dispatchTVItemFunction", [
440
+ id,
441
+ name,
442
+ funcName,
443
+ params,
444
+ ]);
445
+ }
446
+ function scrollToPositionOffset(
447
+ x: number,
448
+ y: number,
449
+ anim: boolean,
450
+ offset: number,
451
+ duration: number,
452
+ ) {
453
+ Native.callUIFunction(viewRef.value, "scrollToPositionWithOffset", [
454
+ y,
455
+ offset,
456
+ anim,
457
+ ]);
458
+ }
459
+ function notifyRestoreInstance() {
460
+ Native.callUIFunction(viewRef.value, "notifyRestoreInstance", []);
461
+ }
462
+ function setSelectPosition(position: number, requestFocus: boolean) {
463
+ Native.callUIFunction(viewRef.value, "setSelectChildPosition", [
464
+ position,
465
+ requestFocus,
466
+ ]);
467
+ }
468
+ function requestFocus(position: number) {
469
+ Native.callUIFunction(viewRef.value, "requestChildFocus", [position]);
470
+ }
471
+ function clearFocus() {
472
+ Native.callUIFunction(viewRef.value, "clearFocus", []);
473
+ }
474
+ function blockRootFocus() {
475
+ Native.callUIFunction(viewRef.value, "blockRootFocus", []);
476
+ }
477
+ function unBlockRootFocus() {
478
+ Native.callUIFunction(viewRef.value, "unBlockRootFocus", []);
479
+ }
480
+ function hasFocus(callback: (res) => void) {
481
+ Native.callUIFunction(viewRef.value, "hasFocus", (res) => {
482
+ callback(res);
483
+ });
484
+ }
485
+ function setBlockFocusDirectionsOnFail(data: Array<ESDirections>) {
486
+ Native.callUIFunction(viewRef.value, "setBlockFocusDirectionsOnFail", [
487
+ data,
488
+ ]);
489
+ }
490
+ function setBackgroundColor(color: string) {
491
+ Native.callUIFunction(viewRef.value, "setBackgroundColor", [color]);
492
+ }
493
+ function setAutoFocus(tag: string, delay: number) {
494
+ Native.callUIFunction(viewRef.value, "setAutoFocus", [tag, delay]);
495
+ }
496
+ const holders = reactive<any[]>([]);
497
+ const isReduce = ref(false);
498
+ watch(
499
+ () => props.data,
500
+ (hs) => {
501
+ isReduce.value = false;
502
+ const currentArrOLd = JSON.parse(JSON.stringify(hs));
503
+ const currentArrNew = toRaw(currentArrOLd);
504
+ console.log(currentArrNew.length, holders.length, "333333333333");
505
+ if (currentArrNew.length < 1) {
506
+ // 数据清空 清空holedes保持数据同步
507
+ holders.splice(0);
508
+ }
509
+ if (currentArrNew.length < holders.length) {
510
+ // 新增数据少于原始数据做减法处理
511
+ isReduce.value = true;
512
+ console.log(holders, "333333333333");
513
+ holders.splice(currentArrNew.length);
514
+ holders.map((item, index) => {
515
+ item.position = index;
516
+ item.itemType = currentArrNew[index].type;
517
+ return item;
518
+ });
519
+ console.log(holders, "333333333333");
520
+ }
521
+ Native.callUIFunction(viewRef.value, "setListDataWithParams", [
522
+ currentArrNew,
523
+ false,
524
+ false,
525
+ {
526
+ RealDOMTypes: [1, 2],
527
+ },
528
+ ]);
529
+ },
530
+ { deep: true, immediate: true },
531
+ );
532
+ function extractNum(input: string): number {
533
+ // 找到最后一个 '-' 的位置
534
+ const lastDashIndex = input.lastIndexOf("-");
535
+ // 如果未找到 '-',返回 -1
536
+ if (lastDashIndex === -1) {
537
+ return -1;
538
+ }
539
+ // 提取 '-' 之后的子字符串
540
+ const value = input.slice(lastDashIndex + 1);
541
+ // 尝试将提取的字符串转换为数字
542
+ const numberValue = Number(value);
543
+ // 检查是否为有效数字,返回 -1 如果无效
544
+ return isNaN(numberValue) ? -1 : numberValue;
545
+ }
546
+ function crateH(batch: [], hashTag: string) {
547
+ console.log("++createHolder", batch.length, "hashTag", hashTag);
548
+ // let {batch ,hashTag} = evt
549
+ const list = [...(Array.isArray(batch) ? batch : [batch])];
550
+ console.log(holders.length, list, "1333333333333");
551
+ for (let i = 0; i < list.length; i++) {
552
+ console.log("++createHolder list[i]:", list[i]);
553
+ const { itemType, position } = list[i];
554
+ if (isReduce.value) {
555
+ holders[position].itemType = itemType;
556
+ holders[position].sid = `hd-${hashTag}-${position}}`;
557
+ } else {
558
+ holders.push({
559
+ itemType: itemType,
560
+ sid: -1,
561
+ position: position,
562
+ });
563
+ holders[holders.length - 1].sid =
564
+ `hd-${hashTag}-${holders.length - 1}`;
565
+ }
566
+ }
567
+ //children.push(h(type, params))
568
+ }
569
+ function bindH(batch: []) {
570
+ console.log("++bindHolder", batch);
571
+ // let {batch } = params
572
+ const list = [...(Array.isArray(batch) ? batch : [batch])];
573
+ for (let i = 0; i < list.length; i++) {
574
+ const { position, sid, itemType } = list[i];
575
+ const hIndex = extractNum(sid);
576
+ if (hIndex != -1 && holders[hIndex]) {
577
+ console.log(
578
+ "--bindHolder",
579
+ `position:${position}, childIndex:${hIndex} holder:${holders[hIndex]}-sid:${sid}`,
580
+ );
581
+ holders[hIndex].position = position;
582
+ holders[hIndex].itemType = itemType;
583
+ }
584
+ }
585
+ console.log(holders, "2333333333333333333333");
586
+ }
587
+ function handleBatch(params: any) {
588
+ console.log("batchbatch1", "++handleBatch", params);
589
+ const { createItem, bindItem, recycleItem, hashTag } = params;
590
+ // Native.callUIFunction(viewRef.value, 'notifyBatchStart', [hashTag]);
591
+ // if(recycleItem){
592
+ // recycleH(recycleItem)
593
+ // }
594
+ if (createItem) {
595
+ console.log("batchbatch2", "++createHolder", createItem);
596
+ crateH(createItem, hashTag);
597
+ }
598
+ if (bindItem) {
599
+ console.log("batchbatch2", "++bindHolder", bindItem);
600
+ bindH(bindItem);
601
+ if (bindItem[bindItem.length - 1].position == props.data.length - 1) {
602
+ props.loadMore();
603
+ }
604
+ }
605
+ // nextTick(() => {
606
+ // Native.callUIFunction(viewRef.value, 'notifyBatchEnd', []);
607
+ // })
608
+ }
609
+ function recycleH(batch: []) {
610
+ console.log("++recycleH", batch);
611
+ // let {batch} = params
612
+ const list = [...(Array.isArray(batch) ? batch : [batch])];
613
+ for (let i = 0; i < list.length; i++) {
614
+ const { sid } = list[i];
615
+ const hIndex = extractNum(sid);
616
+ if (hIndex != -1 && holders[hIndex]) {
617
+ console.log(
618
+ "--recycleHolder",
619
+ `childIndex:${hIndex} holder:${holders[hIndex]}-sid:${sid}`,
620
+ );
621
+ holders[hIndex].position = -1;
622
+ }
623
+ }
624
+ }
625
+ onMounted(() => {});
626
+ const renderItems = (hd) => {
627
+ return [
628
+ renderSlot(context.slots, "default", {
629
+ index: hd.position,
630
+ item:
631
+ props.data && props.data[hd.position]
632
+ ? props.data[hd.position]
633
+ : {},
634
+ }),
635
+ ];
636
+ };
637
+ const renderHolders = (holders) => {
638
+ console.log(
639
+ "holders called ",
640
+ holders,
641
+ `holderCount:${holders.length}`,
642
+ );
643
+ const children = holders.map((hd: any, index: number) => {
644
+ console.log(hd, "234879jghjgjgjgjgjg");
645
+ // console.log('holders called ', `index:${index} position:${hd.position},holderCount:${holders.length},sid:${hd.sid}`)
646
+ // console.log('holders called ', `index:${index} item:${JSON.stringify(listData[hd.position])}`)
647
+ return h(
648
+ "FastItemView",
649
+ {
650
+ key: hd.sid,
651
+ sid: hd.sid,
652
+ type: hd.itemType,
653
+ },
654
+ renderItems(hd),
655
+ );
656
+ });
657
+ nextTick(() => {
658
+ nextTick(() => {
659
+ Native.callUIFunction(viewRef.value, "notifyBatchEnd", []);
660
+ });
661
+ });
662
+ return children;
663
+ };
664
+ context.expose({
665
+ viewRef,
666
+ scrollToIndex,
667
+ startScroll,
668
+ setSelectChildPosition,
669
+ scrollToPositionWithOffset,
670
+ scrollToPositionWithOffsetInfiniteMode,
671
+ scrollToPosition,
672
+ destroy,
673
+ recycle,
674
+ scrollToTop,
675
+ scrollToFocus,
676
+ prepareForRecycle,
677
+ setDisplay,
678
+ changeDisplayState,
679
+ notifySaveInstance,
680
+ dispatchItemFunction,
681
+ clearPostTask,
682
+ clearPostTaskByCate,
683
+ clearData,
684
+ pausePostTask,
685
+ resumePostTask,
686
+ requestLayoutManual,
687
+ setSpanCount,
688
+ searchReplaceItem,
689
+ setCustomStateEnableOnFocus,
690
+ setItemCustomState,
691
+ dispatchItemFunctionWithPromise,
692
+ getScrollOffset,
693
+ setInitPosition,
694
+ dispatchTVItemFunction,
695
+ scrollToPositionOffset,
696
+ notifyRestoreInstance,
697
+ setSelectPosition,
698
+ requestFocus,
699
+ clearFocus,
700
+ blockRootFocus,
701
+ unBlockRootFocus,
702
+ hasFocus,
703
+ setBlockFocusDirectionsOnFail,
704
+ setBackgroundColor,
705
+ setAutoFocus,
706
+ });
707
+ return () => {
708
+ nextTick(() => {
709
+ console.log("tv-list render end ");
710
+ });
711
+ const defaultSlot = context.slots.default
712
+ ? h(
713
+ "RecyclePool",
714
+ {
715
+ onCreateHolder: (evt: any) => {
716
+ //crateH(evt)
717
+ },
718
+ onBindHolder: (evt: any) => {
719
+ //bindH(evt)
720
+ },
721
+ onRecycleHolder: (evt: any) => {
722
+ //recycleH(evt)
723
+ },
724
+ onBatch: (evt: any) => {
725
+ handleBatch(evt);
726
+ },
727
+ },
728
+ renderHolders(holders),
729
+ )
730
+ : [];
731
+ return h(
732
+ "FastListView",
733
+ {
734
+ ref: viewRef,
735
+ disableVirtualDOM: props.disableVirtualDOM,
736
+ onItemClick: (evt) => {
737
+ context.emit("item-click", evt);
738
+ },
739
+ onScroll: (evt) => {
740
+ context.emit("scroll", evt);
741
+ },
742
+ onItemFocused: (evt) => {
743
+ context.emit("item-focused", evt);
744
+ },
745
+ onAttachedToWindow: (evt) => {
746
+ context.emit("item-attached", evt);
747
+ },
748
+ onDetachedFromWindow: (evt) => {
749
+ context.emit("item-detached", evt);
750
+ },
751
+ onBindItem: (evt) => {
752
+ // if (evt.position == props.data.length - 1) {
753
+ // props.loadMore()
754
+ // }
755
+ context.emit("item-bind", evt);
756
+ },
757
+ onUnbindItem: (evt) => {
758
+ context.emit("item-unbind", evt);
759
+ },
760
+ onLoadMore: (evt) => {
761
+ context.emit("load-more", evt);
762
+ },
763
+ onScrollStateChanged: (evt) => {
764
+ context.emit("scroll-state-changed", evt);
765
+ },
766
+ onFocusSearchFailed: (evt) => {
767
+ context.emit("focus-search-failed", evt);
768
+ },
769
+ onScrollYGreaterReference: (evt) => {
770
+ context.emit("scrollYGreaterReference", evt);
771
+ },
772
+ onScrollYLesserReference: (evt) => {
773
+ context.emit("scrollYLesserReference", evt);
774
+ },
775
+ // onCreateHolder:(evt:any)=>{
776
+ // //crateH(evt)
777
+ // },
778
+ // onBindHolder:(evt:any)=>{
779
+ // //bindH(evt)
780
+ // },
781
+ },
782
+ [defaultSlot],
783
+ );
784
+ };
785
+ },
786
+ });
787
+ app.component("qt-ul", QTULViewImpl);
788
+ }
789
+
790
+ export const MYComponent = (Vue) => {
791
+ registerQTULViewComponent(Vue);
792
+ };