@focus-teach/ui 1.0.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 (286) hide show
  1. package/.browserslistrc +2 -0
  2. package/.history/package_20230625121458.json +45 -0
  3. package/.history/package_20230626100440.json +45 -0
  4. package/.history/package_20230626100445.json +45 -0
  5. package/.history/package_20230626100447.json +45 -0
  6. package/.history/package_20230626100636.json +45 -0
  7. package/.history/package_20230626100801.json +45 -0
  8. package/.history/package_20230626100803.json +45 -0
  9. package/.history/package_20230626100838.json +45 -0
  10. package/.history/package_20230626103314.json +45 -0
  11. package/.history/package_20230626103317.json +45 -0
  12. package/.history/packages/assets/css/reset-element_20230605134721.scss +167 -0
  13. package/.history/packages/assets/css/reset-element_20230614205652.scss +173 -0
  14. package/.history/packages/assets/css/reset-element_20230614205654.scss +173 -0
  15. package/.history/packages/assets/css/reset-element_20230614211242.scss +169 -0
  16. package/.history/packages/assets/css/reset-element_20230614211245.scss +167 -0
  17. package/.history/packages/exam-detail/src/index_20230607220441.vue +548 -0
  18. package/.history/packages/exam-detail/src/index_20230613115618.vue +548 -0
  19. package/.history/packages/exam-detail/src/index_20230613115623.vue +548 -0
  20. package/.history/packages/exam-detail/src/index_20230613115629.vue +548 -0
  21. package/.history/packages/exam-detail/src/index_20230613115631.vue +548 -0
  22. package/.history/packages/exam-detail/src/index_20230613115640.vue +548 -0
  23. package/.history/packages/exam-detail/src/index_20230613115651.vue +548 -0
  24. package/.history/packages/exam-detail/src/index_20230613115659.vue +548 -0
  25. package/.history/packages/exam-detail/src/index_20230613115750.vue +548 -0
  26. package/.history/packages/exam-detail/src/index_20230613115806.vue +548 -0
  27. package/.history/packages/exam-detail/src/index_20230613115811.vue +548 -0
  28. package/.history/packages/exam-detail/src/index_20230613115815.vue +548 -0
  29. package/.history/packages/exam-detail/src/index_20230613120250.vue +548 -0
  30. package/.history/packages/exam-detail/src/index_20230613120252.vue +548 -0
  31. package/.history/packages/exam-detail/src/index_20230613120257.vue +547 -0
  32. package/.history/packages/exam-detail/src/index_20230613120323.vue +547 -0
  33. package/.history/packages/exam-detail/src/index_20230613120327.vue +547 -0
  34. package/.history/packages/exam-detail/src/index_20230613120328.vue +547 -0
  35. package/.history/packages/exam-detail/src/index_20230613120915.vue +548 -0
  36. package/.history/packages/exam-detail/src/index_20230613120917.vue +548 -0
  37. package/.history/packages/exam-detail/src/index_20230613120922.vue +549 -0
  38. package/.history/packages/exam-detail/src/index_20230613120924.vue +549 -0
  39. package/.history/packages/exam-detail/src/index_20230613120928.vue +550 -0
  40. package/.history/packages/exam-detail/src/index_20230613120930.vue +550 -0
  41. package/.history/packages/exam-detail/src/index_20230613120936.vue +549 -0
  42. package/.history/packages/exam-detail/src/index_20230613120938.vue +550 -0
  43. package/.history/packages/exam-detail/src/index_20230613120942.vue +550 -0
  44. package/.history/packages/exam-detail/src/index_20230613120944.vue +550 -0
  45. package/.history/packages/exam-detail/src/index_20230613121331.vue +549 -0
  46. package/.history/packages/exam-detail/src/index_20230613121333.vue +548 -0
  47. package/.history/packages/exam-detail/src/index_20230613121335.vue +547 -0
  48. package/.history/packages/exam-detail/src/index_20230613121341.vue +547 -0
  49. package/.history/packages/exam-detail/src/index_20230613121344.vue +546 -0
  50. package/.history/packages/exam-detail/src/index_20230613153022.vue +546 -0
  51. package/.history/packages/exam-detail/src/index_20230613153027.vue +546 -0
  52. package/.history/packages/exam-detail/src/index_20230613153620.vue +546 -0
  53. package/.history/packages/exam-detail/src/index_20230613164734.vue +546 -0
  54. package/.history/packages/exam-detail/src/index_20230613164746.vue +546 -0
  55. package/.history/packages/exam-detail/src/index_20230613164756.vue +546 -0
  56. package/.history/packages/exam-drawer/src/index_20230607103301.vue +1470 -0
  57. package/.history/packages/exam-drawer/src/index_20230613090746.vue +1469 -0
  58. package/.history/packages/exam-drawer/src/index_20230613090759.vue +1469 -0
  59. package/.history/packages/exam-drawer/src/index_20230613090802.vue +1469 -0
  60. package/.history/packages/exam-drawer/src/index_20230613090809.vue +1469 -0
  61. package/.history/packages/exam-drawer/src/index_20230613090850.vue +1470 -0
  62. package/.history/packages/exam-drawer/src/index_20230613090919.vue +1487 -0
  63. package/.history/packages/exam-drawer/src/index_20230613090930.vue +1486 -0
  64. package/.history/packages/exam-drawer/src/index_20230613090935.vue +1485 -0
  65. package/.history/packages/exam-drawer/src/index_20230613091124.vue +1488 -0
  66. package/.history/packages/exam-drawer/src/index_20230613091140.vue +1488 -0
  67. package/.history/packages/exam-drawer/src/index_20230613091141.vue +1488 -0
  68. package/.history/packages/exam-drawer/src/index_20230613092108.vue +1489 -0
  69. package/.history/packages/exam-drawer/src/index_20230613092111.vue +1489 -0
  70. package/.history/packages/exam-drawer/src/index_20230613093130.vue +1490 -0
  71. package/.history/packages/exam-drawer/src/index_20230613093135.vue +1489 -0
  72. package/.history/packages/exam-drawer/src/index_20230613093149.vue +1488 -0
  73. package/.history/packages/exam-drawer/src/index_20230613093156.vue +1487 -0
  74. package/.history/packages/exam-drawer/src/index_20230613093159.vue +1486 -0
  75. package/.history/packages/exam-drawer/src/index_20230613093202.vue +1485 -0
  76. package/.history/packages/exam-drawer/src/index_20230613093204.vue +1484 -0
  77. package/.history/packages/exam-drawer/src/index_20230613093207.vue +1483 -0
  78. package/.history/packages/exam-drawer/src/index_20230613093209.vue +1482 -0
  79. package/.history/packages/exam-drawer/src/index_20230613093212.vue +1483 -0
  80. package/.history/packages/exam-drawer/src/index_20230613093217.vue +1483 -0
  81. package/.history/packages/exam-drawer/src/index_20230613093228.vue +1483 -0
  82. package/.history/packages/exam-drawer/src/index_20230613093229.vue +1483 -0
  83. package/.history/packages/exam-drawer/src/index_20230613093843.vue +1482 -0
  84. package/.history/packages/exam-drawer/src/index_20230613093847.vue +1481 -0
  85. package/.history/packages/exam-drawer/src/index_20230613093851.vue +1480 -0
  86. package/.history/packages/exam-drawer/src/index_20230613115708.vue +1480 -0
  87. package/.history/packages/exam-drawer/src/index_20230613115823.vue +1480 -0
  88. package/.history/packages/exam-drawer/src/index_20230613115825.vue +1480 -0
  89. package/.history/packages/exam-drawer/src/index_20230613115827.vue +1480 -0
  90. package/.history/packages/exam-drawer/src/index_20230613120908.vue +1481 -0
  91. package/.history/packages/exam-drawer/src/index_20230613120910.vue +1481 -0
  92. package/.history/packages/exam-drawer/src/index_20230613121320.vue +1480 -0
  93. package/.history/packages/exam-drawer/src/index_20230613121326.vue +1480 -0
  94. package/.history/packages/exam-drawer/src/index_20230613144244.vue +1479 -0
  95. package/.history/packages/exam-drawer/src/index_20230613144246.vue +1478 -0
  96. package/.history/packages/exam-drawer/src/index_20230613144248.vue +1477 -0
  97. package/.history/packages/exam-drawer/src/index_20230613144251.vue +1476 -0
  98. package/.history/packages/exam-drawer/src/index_20230613152608.vue +1476 -0
  99. package/.history/packages/header/src/index_20230605134719.vue +59 -0
  100. package/.history/packages/header/src/index_20230613115723.vue +59 -0
  101. package/.history/packages/header/src/index_20230613115727.vue +59 -0
  102. package/.history/packages/header/src/index_20230613115733.vue +59 -0
  103. package/.history/packages/header/src/index_20230613115736.vue +59 -0
  104. package/.history/packages/header/src/index_20230613120901.vue +60 -0
  105. package/.history/packages/header/src/index_20230613120903.vue +60 -0
  106. package/.history/packages/header/src/index_20230613121316.vue +59 -0
  107. package/.history/packages/question-drawer/src/index_20230607160653.vue +1735 -0
  108. package/.history/packages/question-drawer/src/index_20230607160720.scss +265 -0
  109. package/.history/packages/question-drawer/src/index_20230613090910.vue +1735 -0
  110. package/.history/packages/question-drawer/src/index_20230613090928.vue +1734 -0
  111. package/.history/packages/question-drawer/src/index_20230613090937.vue +1733 -0
  112. package/.history/packages/question-drawer/src/index_20230613115842.vue +1733 -0
  113. package/.history/packages/question-drawer/src/index_20230613115844.vue +1733 -0
  114. package/.history/packages/question-drawer/src/index_20230613115848.vue +1733 -0
  115. package/.history/packages/question-drawer/src/index_20230613115902.vue +1733 -0
  116. package/.history/packages/question-drawer/src/index_20230613115911.vue +1733 -0
  117. package/.history/packages/question-drawer/src/index_20230613115914.vue +1733 -0
  118. package/.history/packages/question-drawer/src/index_20230613115922.vue +1733 -0
  119. package/.history/packages/question-drawer/src/index_20230613120356.vue +1733 -0
  120. package/.history/packages/question-drawer/src/index_20230613120359.vue +1732 -0
  121. package/.history/packages/question-drawer/src/index_20230613120710.vue +1731 -0
  122. package/.history/packages/question-drawer/src/index_20230613120839.vue +1732 -0
  123. package/.history/packages/question-drawer/src/index_20230613120841.vue +1732 -0
  124. package/.history/packages/question-drawer/src/index_20230613120844.vue +1733 -0
  125. package/.history/packages/question-drawer/src/index_20230613120846.vue +1733 -0
  126. package/.history/packages/question-drawer/src/index_20230613120850.vue +1734 -0
  127. package/.history/packages/question-drawer/src/index_20230613120852.vue +1734 -0
  128. package/.history/packages/question-drawer/src/index_20230613120856.vue +1735 -0
  129. package/.history/packages/question-drawer/src/index_20230613120858.vue +1735 -0
  130. package/.history/packages/question-drawer/src/index_20230613121150.vue +1735 -0
  131. package/.history/packages/question-drawer/src/index_20230613121238.vue +1734 -0
  132. package/.history/packages/question-drawer/src/index_20230613121252.vue +1734 -0
  133. package/.history/packages/question-drawer/src/index_20230613121256.vue +1734 -0
  134. package/.history/packages/question-drawer/src/index_20230613121258.vue +1733 -0
  135. package/.history/packages/question-drawer/src/index_20230613121303.vue +1733 -0
  136. package/.history/packages/question-drawer/src/index_20230613121307.vue +1733 -0
  137. package/.history/packages/question-drawer/src/index_20230613121310.vue +1732 -0
  138. package/.history/packages/question-drawer/src/index_20230613121313.vue +1731 -0
  139. package/.history/packages/question-drawer/src/index_20230613121549.vue +1731 -0
  140. package/.history/packages/question-drawer/src/index_20230613121623.vue +1731 -0
  141. package/.history/packages/question-drawer/src/index_20230613151515.vue +1730 -0
  142. package/.history/packages/question-drawer/src/index_20230613151517.vue +1729 -0
  143. package/.history/packages/question-drawer/src/index_20230613151612.vue +1729 -0
  144. package/.history/packages/question-drawer/src/index_20230613151618.vue +1729 -0
  145. package/.history/packages/question-drawer/src/index_20230613151928.vue +1729 -0
  146. package/.history/packages/question-drawer/src/index_20230613151929.vue +1729 -0
  147. package/.history/packages/question-drawer/src/index_20230613152233.vue +1728 -0
  148. package/.history/packages/question-drawer/src/index_20230613152235.vue +1727 -0
  149. package/.history/packages/question-drawer/src/index_20230613152237.vue +1726 -0
  150. package/.history/packages/question-drawer/src/index_20230613152239.vue +1726 -0
  151. package/.history/packages/question-drawer/src/index_20230613152243.vue +1725 -0
  152. package/.history/packages/question-drawer/src/index_20230613152245.vue +1724 -0
  153. package/.history/packages/question-drawer/src/index_20230613152247.vue +1723 -0
  154. package/.history/packages/question-drawer/src/index_20230613152248.vue +1723 -0
  155. package/.history/packages/question-drawer/src/index_20230613152543.vue +1723 -0
  156. package/.history/packages/question-drawer/src/index_20230613152613.vue +1723 -0
  157. package/.history/packages/question-drawer/src/index_20230614203619.vue +1725 -0
  158. package/.history/packages/question-drawer/src/index_20230614203633.vue +1729 -0
  159. package/.history/packages/question-drawer/src/index_20230614203637.vue +1729 -0
  160. package/.history/packages/question-drawer/src/index_20230614203912.vue +1729 -0
  161. package/.history/packages/question-drawer/src/index_20230614211516.scss +270 -0
  162. package/.history/packages/question-drawer/src/index_20230614212057.scss +265 -0
  163. package/.history/packages/question-drawer/src/index_20230614212140.scss +270 -0
  164. package/.history/packages/question-drawer/src/index_20230614212146.scss +270 -0
  165. package/.history/packages/question-drawer/src/index_20230614212158.scss +270 -0
  166. package/.history/packages/question-drawer/src/index_20230614212613.scss +270 -0
  167. package/.history/packages/question-drawer/src/index_20230614212615.scss +270 -0
  168. package/.history/packages/question-drawer/src/index_20230614212841.scss +270 -0
  169. package/.history/packages/question-drawer/src/index_20230614212939.scss +270 -0
  170. package/.history/packages/question-drawer/src/index_20230614213141.scss +270 -0
  171. package/.history/packages/question-drawer/src/index_20230614213255.scss +270 -0
  172. package/.history/packages/question-drawer/src/index_20230614213349.scss +265 -0
  173. package/.history/packages/question-drawer/src/index_20230614213350.scss +265 -0
  174. package/.history/packages/question-drawer/src/index_20230614213400.scss +265 -0
  175. package/.history/packages/question-drawer/src/index_20230614213401.scss +270 -0
  176. package/.history/packages/question-drawer/src/index_20230614213431.scss +265 -0
  177. package/.history/packages/question-drawer/src/index_20230615100944.vue +1730 -0
  178. package/.history/packages/question-drawer/src/index_20230615100946.vue +1730 -0
  179. package/.history/packages/question-drawer/src/index_20230615100952.vue +1730 -0
  180. package/.history/packages/question-drawer/src/index_20230615100957.vue +1730 -0
  181. package/.history/packages/question-drawer/src/index_20230615104839.vue +1730 -0
  182. package/.history/packages/tabs/src/index_20230607165331.scss +60 -0
  183. package/.history/packages/tabs/src/index_20230614211226.scss +60 -0
  184. package/.history/packages/tabs/src/index_20230614211227.scss +61 -0
  185. package/.history/packages/tabs/src/index_20230614211253.scss +65 -0
  186. package/.history/packages/tabs/src/index_20230614211332.scss +60 -0
  187. package/.history/packages/wrong-detail/src/index_20230607221202.vue +570 -0
  188. package/.history/packages/wrong-detail/src/index_20230613120416.vue +570 -0
  189. package/.history/packages/wrong-detail/src/index_20230613120418.vue +569 -0
  190. package/.history/packages/wrong-detail/src/index_20230613120738.vue +568 -0
  191. package/.history/packages/wrong-detail/src/index_20230613120800.vue +568 -0
  192. package/.history/packages/wrong-detail/src/index_20230613120803.vue +568 -0
  193. package/.history/packages/wrong-detail/src/index_20230613120825.vue +568 -0
  194. package/.history/packages/wrong-detail/src/index_20230613120834.vue +569 -0
  195. package/.history/packages/wrong-detail/src/index_20230613121246.vue +568 -0
  196. package/.history/packages/wrong-detail/src/index_20230613155421.vue +574 -0
  197. package/.history/packages/wrong-detail/src/index_20230613155423.vue +574 -0
  198. package/.history/packages/wrong-detail/src/index_20230613155426.vue +574 -0
  199. package/.history/packages/wrong-drawer/src/index_20230607213124.vue +450 -0
  200. package/.history/packages/wrong-drawer/src/index_20230613104307.vue +450 -0
  201. package/.history/packages/wrong-drawer/src/index_20230613104315.vue +451 -0
  202. package/.history/packages/wrong-drawer/src/index_20230613104317.vue +451 -0
  203. package/.history/packages/wrong-drawer/src/index_20230613104334.vue +451 -0
  204. package/.history/packages/wrong-drawer/src/index_20230613104403.vue +450 -0
  205. package/.history/packages/wrong-drawer/src/index_20230613104405.vue +449 -0
  206. package/.history/packages/wrong-drawer/src/index_20230613104621.vue +458 -0
  207. package/.history/packages/wrong-drawer/src/index_20230613104626.vue +459 -0
  208. package/.history/packages/wrong-drawer/src/index_20230613104629.vue +457 -0
  209. package/.history/packages/wrong-drawer/src/index_20230613104630.vue +457 -0
  210. package/.history/packages/wrong-drawer/src/index_20230613104747.vue +464 -0
  211. package/.history/packages/wrong-drawer/src/index_20230613104749.vue +464 -0
  212. package/.history/packages/wrong-drawer/src/index_20230613104753.vue +464 -0
  213. package/.history/packages/wrong-drawer/src/index_20230613111237.vue +464 -0
  214. package/.history/packages/wrong-drawer/src/index_20230613111314.vue +464 -0
  215. package/.history/packages/wrong-drawer/src/index_20230613114319.vue +464 -0
  216. package/.history/packages/wrong-drawer/src/index_20230613114322.vue +464 -0
  217. package/.history/packages/wrong-drawer/src/index_20230613114901.vue +463 -0
  218. package/.history/packages/wrong-drawer/src/index_20230613114903.vue +462 -0
  219. package/.history/packages/wrong-drawer/src/index_20230613114904.vue +462 -0
  220. package/.history/packages/wrong-drawer/src/index_20230613114909.vue +462 -0
  221. package/.history/packages/wrong-drawer/src/index_20230613114936.vue +463 -0
  222. package/.history/packages/wrong-drawer/src/index_20230613114940.vue +463 -0
  223. package/.history/packages/wrong-drawer/src/index_20230613114942.vue +463 -0
  224. package/.history/packages/wrong-drawer/src/index_20230613115348.vue +487 -0
  225. package/.history/packages/wrong-drawer/src/index_20230613115352.vue +487 -0
  226. package/.history/packages/wrong-drawer/src/index_20230613115356.vue +487 -0
  227. package/.history/packages/wrong-drawer/src/index_20230613115408.vue +500 -0
  228. package/.history/packages/wrong-drawer/src/index_20230613115411.vue +500 -0
  229. package/.history/packages/wrong-drawer/src/index_20230613115414.vue +500 -0
  230. package/.history/packages/wrong-drawer/src/index_20230613144213.vue +499 -0
  231. package/.history/packages/wrong-drawer/src/index_20230613144215.vue +498 -0
  232. package/.history/packages/wrong-drawer/src/index_20230613144218.vue +497 -0
  233. package/.history/packages/wrong-drawer/src/index_20230613144223.vue +497 -0
  234. package/.history/packages/wrong-drawer/src/index_20230613144225.vue +497 -0
  235. package/.history/packages/wrong-drawer/src/index_20230613144229.vue +498 -0
  236. package/.history/packages/wrong-drawer/src/index_20230613144232.vue +498 -0
  237. package/.history/packages/wrong-drawer/src/index_20230613144316.vue +500 -0
  238. package/.history/packages/wrong-drawer/src/index_20230613144345.vue +500 -0
  239. package/.history/packages/wrong-drawer/src/index_20230613144346.vue +500 -0
  240. package/.history/packages/wrong-drawer/src/index_20230613145546.vue +498 -0
  241. package/.history/packages/wrong-drawer/src/index_20230613145548.vue +501 -0
  242. package/.history/packages/wrong-drawer/src/index_20230613145550.vue +500 -0
  243. package/.history/packages/wrong-drawer/src/index_20230613145602.vue +500 -0
  244. package/.history/packages/wrong-drawer/src/index_20230613145611.vue +500 -0
  245. package/.history/packages/wrong-drawer/src/index_20230613145625.vue +500 -0
  246. package/.history/packages/wrong-drawer/src/index_20230613145634.vue +500 -0
  247. package/.history/packages/wrong-drawer/src/index_20230613150805.vue +500 -0
  248. package/.history/packages/wrong-drawer/src/index_20230613150806.vue +501 -0
  249. package/.history/packages/wrong-drawer/src/index_20230613150809.vue +501 -0
  250. package/.history/packages/wrong-drawer/src/index_20230613150810.vue +501 -0
  251. package/README.md +14 -0
  252. package/api/index.js +388 -0
  253. package/dist/@focus-teach/ui.common.js +93058 -0
  254. package/dist/@focus-teach/ui.css +1 -0
  255. package/dist/@focus-teach/ui.umd.js +93068 -0
  256. package/dist/@focus-teach/ui.umd.min.js +25 -0
  257. package/dist/demo.html +10 -0
  258. package/dist/fonts/icomoon.356dc15f.woff +0 -0
  259. package/dist/fonts/icomoon.71d64f31.woff +0 -0
  260. package/dist/fonts/icomoon.7c9a60d9.eot +0 -0
  261. package/dist/fonts/icomoon.ba18ad87.eot +0 -0
  262. package/dist/fonts/icomoon.de76432e.ttf +0 -0
  263. package/dist/fonts/icomoon.ec37e716.ttf +0 -0
  264. package/dist/img/cloud_txt_24.87b9d2ae.svg +1 -0
  265. package/dist/img/icomoon.428f3063.svg +346 -0
  266. package/dist/img/icomoon.532b3795.svg +345 -0
  267. package/dist/img/icon_question.e931b16c.svg +14 -0
  268. package/mixins/emitter.js +33 -0
  269. package/package.json +45 -0
  270. package/postcss.config.js +19 -0
  271. package/style/icon/Read Me.txt +7 -0
  272. package/style/icon/demo-files/demo.css +152 -0
  273. package/style/icon/demo-files/demo.js +30 -0
  274. package/style/icon/demo.html +4042 -0
  275. package/style/icon/fonts/icomoon.eot +0 -0
  276. package/style/icon/fonts/icomoon.svg +346 -0
  277. package/style/icon/fonts/icomoon.ttf +0 -0
  278. package/style/icon/fonts/icomoon.woff +0 -0
  279. package/style/icon/selection.json +1 -0
  280. package/style/icon/style.css +1191 -0
  281. package/tests/unit/example.spec.js +13 -0
  282. package/utils/Constants.js +59 -0
  283. package/utils/assist.js +100 -0
  284. package/utils/changNumber.js +26 -0
  285. package/utils/common.js +109 -0
  286. package/utils/random_str.js +9 -0
@@ -0,0 +1,13 @@
1
+ import { expect } from 'chai'
2
+ import { shallowMount } from '@vue/test-utils'
3
+ import HelloWorld from '@/components/HelloWorld.vue'
4
+
5
+ describe('HelloWorld.vue', () => {
6
+ it('renders props.msg when passed', () => {
7
+ const msg = 'new message'
8
+ const wrapper = shallowMount(HelloWorld, {
9
+ propsData: { msg }
10
+ })
11
+ expect(wrapper.text()).to.include(msg)
12
+ })
13
+ })
@@ -0,0 +1,59 @@
1
+ //题目资源类型 试卷(组卷 13)、课堂练习(教学课件 1)、网络资源(0)、教学设计(14)
2
+ export const ALL = "999";
3
+ export const EXAM = "13";
4
+ export const DESIGN = "14";
5
+ export const PRACTICE = "1";
6
+ export const NET_RESOURCE = "0";
7
+
8
+
9
+ //0全校,1全区,2全站,-1不分享
10
+ export const SHARE_SCHOOL = 0;
11
+ export const SHARE_DIST = 1;
12
+ export const SHARE_STATION = 2;
13
+ export const NOT_SHARE = -1;
14
+
15
+
16
+ export const PPT = "ppt";
17
+ export const PPTX = "pptx";
18
+ export const PPTM = "pptm";
19
+ export const WORD = "doc";
20
+ export const WORDX = "docx";
21
+ export const EXECL = "xls";
22
+ export const EXECLX = "xlsx";
23
+ export const TXT = "txt";
24
+ export const LOG = "log";
25
+ export const MP4 = "mp4";
26
+ export const MP3 = "mp3";
27
+ export const EXE = "exe";
28
+ export const FLASH = "flash";
29
+ export const ZIP = "zip";
30
+ export const RAR = "rar";
31
+ export const PDF = "pdf";
32
+ export const PNG = "png";
33
+ export const JPG = "jpg";
34
+ export const JPEG = "jpeg";
35
+ export const DPS = "dps";
36
+ export const DPT = "dpt";
37
+ export const WPS = "wps";
38
+ export const WPT = "wpt";
39
+ export const GIF = "gif";
40
+ export const MPG = "mpg";
41
+ export const MPEG = "mpeg";
42
+ export const FLV = "flv";
43
+ export const RMVB = "rmvb";
44
+ export const SWF = "swf";
45
+ export const WMV = "wmv";
46
+ export const AVI = "avi";
47
+ export const MKV = "mkv";
48
+ export const MOV = "mov";
49
+
50
+
51
+
52
+ //paperEdit 页面,打开下载框
53
+ export const DIALOG_TYPE_DEFAULT = 0;
54
+ //试卷 先打开选择纸张,再下载
55
+ export const DIALOG_TYPE_EXAM = 1;
56
+ //教学设计 直接下载
57
+ export const DIALOG_TYPE_DESIGN = 2;
58
+
59
+
@@ -0,0 +1,100 @@
1
+ // 由一个组件,向上找到最近的指定组件
2
+ function findComponentUpward(context, componentName) {
3
+ let parent = context.$parent;
4
+ let name = parent.$options.name;
5
+
6
+ while(parent && (!name || [componentName].indexOf(name) < 0)) {
7
+ parent = parent.$parent;
8
+ if (parent) name = parent.$options.name;
9
+ }
10
+ return parent;
11
+ }
12
+ // 由一个组件,向上找到所有的指定组件
13
+ function findComponentsUpward(context, componentName) {
14
+ let parents = [];
15
+ const parent = context.$parent;
16
+
17
+ if (parent) {
18
+ if (parent.$options.name === componentName) parents.push(parent);
19
+ return parents.concat(findComponentsUpward(parent, componentName));
20
+ } else {
21
+ return [];
22
+ }
23
+ }
24
+ // 由一个组件,向下找到最近的指定组件
25
+ function findComponentDownward(context, componentName) {
26
+ const childrens = context.$children;
27
+ let children = null;
28
+ if (childrens.length) {
29
+ for (const child of childrens) {
30
+ const name = child.$options.name;
31
+
32
+ if (name === componentName) {
33
+ children = child;
34
+ break;
35
+ } else {
36
+ children = findComponentDownward(child, componentName);
37
+ if (children) break;
38
+ }
39
+ }
40
+ }
41
+ return children;
42
+ }
43
+ // 由一个组件,向下找到所有指定的组件
44
+ function findComponentsDownward(context, componentName) {
45
+ return context.$children.reduce((components, child) => {
46
+ if (child.$options.name === componentName) components.push(child);
47
+ const foundChilds = findComponentsUpward(child, componentName);
48
+ return components.concat(foundChilds);
49
+ }, []);
50
+ }
51
+ // 由一个组件,找到指定组件的兄弟组件
52
+ function findBrothersComponents(context, componentName, exceptMe = true) {
53
+ let res = context.$parent.$children.filter(item => {
54
+ return item.$options.name === componentName;
55
+ });
56
+ let index = res.findIndex(item => item._uid === context._uid);
57
+ if (exceptMe) res.splice(index,1);
58
+ return res;
59
+ }
60
+ function typeOf(obj) {
61
+ const toString = Object.prototype.toString;
62
+ const map = {
63
+ '[object Boolean]': 'boolean',
64
+ '[object Number]': 'number',
65
+ '[object String]': 'string',
66
+ '[object Function]': 'function',
67
+ '[object Array]': 'array',
68
+ '[object Date]': 'date',
69
+ '[object RegExp]': 'regExp',
70
+ '[object Undefined]': 'undefined',
71
+ '[object Null]': 'null',
72
+ '[object Object]': 'object'
73
+ };
74
+ return map[toString.call(obj)];
75
+ }
76
+ function deepCopy(data){
77
+ const t = typeOf(data);
78
+ let o;
79
+
80
+ if (t === 'array') {
81
+ o = [];
82
+ } else if (t === 'object') {
83
+ o = {};
84
+ } else {
85
+ return data;
86
+ }
87
+
88
+ if (t === 'array') {
89
+ for (let i = 0;i<data.length;i++){
90
+ o.push(deepCopy(data[i]));
91
+ }
92
+ } else if (t === 'object') {
93
+ for (let i in data) {
94
+ o[i] = deepCopy(data[i]);
95
+ }
96
+ }
97
+
98
+ return o;
99
+ }
100
+ export {findComponentUpward, findComponentsUpward, findComponentDownward, findComponentsDownward, findBrothersComponents, deepCopy}
@@ -0,0 +1,26 @@
1
+ export default [
2
+ [0,'一'],
3
+ [1,'二'],
4
+ [2,'三'],
5
+ [3,'四'],
6
+ [4,'五'],
7
+ [5,'六'],
8
+ [6,'七'],
9
+ [7,'八'],
10
+ [8,'九'],
11
+ [9,'十'],
12
+ [10,'十一'],
13
+ [11,'十二'],
14
+ [12,'十三'],
15
+ [13,'十四'],
16
+ [14,'十五'],
17
+ [15,'十六'],
18
+ [16,'十七'],
19
+ [17,'十八'],
20
+ [18,'十九'],
21
+ [19,'二十'],
22
+ [20,'二十一'],
23
+ [21,'二十二'],
24
+ [22,'二十三'],
25
+ [23,'二十四'],
26
+ ]
@@ -0,0 +1,109 @@
1
+ function getFileTypeSuffix(fileName) {
2
+ var index = fileName.lastIndexOf(".");
3
+ if (index > -1) {
4
+ var suffix = fileName.substr(index + 1);
5
+ return suffix.toLowerCase();
6
+ } else {
7
+ return "";
8
+ }
9
+ }
10
+ export function getIcon(fileName,host) {
11
+ var suffix = getFileTypeSuffix(fileName);
12
+ switch (suffix) {
13
+ case CONSTANTS.PPT:
14
+ case CONSTANTS.PPTX:
15
+ case CONSTANTS.PPTM:
16
+ case CONSTANTS.DPS:
17
+ case CONSTANTS.DPT:
18
+ return host + "/assets/prepare-course/list/img/cloud_ppt_24.e87c3c79.svg";
19
+ case CONSTANTS.WORD:
20
+ case CONSTANTS.WORDX:
21
+ case CONSTANTS.WPS:
22
+ case CONSTANTS.WPT:
23
+ return host + "/assets/prepare-course/list/img/cloud_word_24.0f6ffddd.svg";
24
+ case CONSTANTS.EXECL:
25
+ case CONSTANTS.EXECLX:
26
+ return host + "/assets/prepare-course/list/img/cloud_excel_24.7b03f1b2.svg";
27
+ case CONSTANTS.TXT:
28
+ case CONSTANTS.LOG:
29
+ return host + "/assets/prepare-course/list/img/cloud_txt_24.87b9d2ae.svg";
30
+ case CONSTANTS.MP4:
31
+ case CONSTANTS.MPG:
32
+ case CONSTANTS.MPEG:
33
+ case CONSTANTS.FLV:
34
+ case CONSTANTS.RMVB:
35
+ case CONSTANTS.SWF:
36
+ case CONSTANTS.WMV:
37
+ case CONSTANTS.AVI:
38
+ case CONSTANTS.MKV:
39
+ case CONSTANTS.MOV:
40
+ return host + "/assets/prepare-course/list/img/cloud_mp4_24.ca4eb90e.svg";
41
+ case CONSTANTS.MP3:
42
+ return host + "/assets/prepare-course/list/img/cloud_mp3_24.60e44f0a.svg";
43
+ case CONSTANTS.EXE:
44
+ return host + "/assets/prepare-course/list/img/cloud_exe_24.874324e0.svg";
45
+ case CONSTANTS.PNG:
46
+ case CONSTANTS.JPG:
47
+ case CONSTANTS.JPEG:
48
+ case CONSTANTS.GIF:
49
+ return require(host + "/assets/prepare-course/list/img/cloud_pic_24.7459ad8a.svg");
50
+ case CONSTANTS.FLASH:
51
+ return require(host + "/assets/prepare-course/list/img/cloud_flash_24.14853816.svg");
52
+ case CONSTANTS.PDF:
53
+ return require(host + "/assets/prepare-course/list/img/cloud_pdf_24.28e41c4f.svg");
54
+ case CONSTANTS.ZIP:
55
+ case CONSTANTS.RAR:
56
+ return require(host + "/assets/prepare-course/list/img/cloud_zip_24.3c5192fc.svg");
57
+ default:
58
+ return require(host + "/assets/prepare-course/list/img/cloud_unknown_24.31e4ddb3.svg");
59
+ }
60
+ }
61
+ //获取页面参数
62
+ export function getUrlKey(name) {
63
+ return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [, ""])[1].replace(/\+/g, '%20')) || null;
64
+ }
65
+
66
+ /**
67
+ * 反转义
68
+ **/
69
+ export function decodeEntities(value) {
70
+ let hiddenPre = document.createElement("pre")
71
+ let spaceRe = /^(\s*)([\s\S]*?)(\s*)$/
72
+ if (!value) {
73
+ return ''
74
+ }
75
+ let parts = spaceRe.exec(value)
76
+ let spaceBefore = parts[1]
77
+ let spaceAfter = parts[3]
78
+ let content = parts[2]
79
+ if (content) {
80
+ hiddenPre.innerHTML = content.replace(/</g, "&lt;")
81
+ content = 'textContent' in hiddenPre ?
82
+ hiddenPre.textContent : hiddenPre.innerText
83
+ }
84
+ hiddenPre = null
85
+ return spaceBefore + content + spaceAfter
86
+ }
87
+
88
+ export function formatDate(date, fmt) {
89
+ if (/(y+)/.test(fmt)) {
90
+ fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
91
+ }
92
+ let o = {
93
+ 'M+': date.getMonth() + 1,
94
+ 'd+': date.getDate(),
95
+ 'h+': date.getHours(),
96
+ 'm+': date.getMinutes(),
97
+ 's+': date.getSeconds()
98
+ }
99
+ for (let k in o) {
100
+ if (new RegExp(`(${k})`).test(fmt)) {
101
+ let str = o[k] + ''
102
+ fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? str : padLeftZero(str))
103
+ }
104
+ }
105
+ return fmt
106
+ }
107
+ function padLeftZero(str) {
108
+ return ('00' + str).substr(str.length)
109
+ }
@@ -0,0 +1,9 @@
1
+ export default function (len = 32) {
2
+ const $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
3
+ const maxPos = $chars.length;
4
+ let str = '';
5
+ for (let i = 0;i<len;i++){
6
+ str += $chars.charAt(Math.floor(Math.random()*maxPos));
7
+ }
8
+ return str;
9
+ }