You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

437 lines
9.4 KiB

  1. <template>
  2. <view class="main">
  3. <rich-text :nodes="content"></rich-text>
  4. </view>
  5. </template>
  6. <script>
  7. var util = require("../../utils/util.js");
  8. var config = require("../../config");
  9. import uParse from '../../components/gaoyia-parse/parse.vue'
  10. export default {
  11. data() {
  12. return {
  13. content:"",
  14. id:""
  15. };
  16. },
  17. components: {
  18. uParse
  19. },
  20. onLoad(e){
  21. this.id = e.id || 0;
  22. let link=JSON.parse(decodeURIComponent(e.content))
  23. this.content = link
  24. this.read()
  25. },
  26. methods:{
  27. read(){
  28. this.$u.get('/zkPrivate/findById', { id: this.id }).then(res => {
  29. console.log(res)
  30. // this.content = res
  31. }).catch(error => {
  32. console.log(error)
  33. })
  34. }
  35. }
  36. }
  37. </script>
  38. <style lang="scss">
  39. .main{
  40. padding: 20rpx;
  41. }
  42. .ql-container {
  43. box-sizing: border-box;
  44. font-family: Helvetica, Arial, sans-serif;
  45. font-size: 13px;
  46. height: 100%;
  47. margin: 0px;
  48. position: relative;
  49. }
  50. .ql-container.ql-disabled .ql-tooltip {
  51. visibility: hidden;
  52. }
  53. .ql-container.ql-disabled .ql-editor ul[data-checked] > li::before {
  54. pointer-events: none;
  55. }
  56. .ql-clipboard {
  57. left: -100000px;
  58. height: 1px;
  59. overflow-y: hidden;
  60. position: absolute;
  61. top: 50%;
  62. }
  63. .ql-clipboard p {
  64. margin: 0;
  65. padding: 0;
  66. }
  67. .ql-editor {
  68. box-sizing: border-box;
  69. line-height: 1.42;
  70. height: 100%;
  71. outline: none;
  72. overflow-y: auto;
  73. padding: 12px 15px;
  74. tab-size: 4;
  75. -moz-tab-size: 4;
  76. text-align: left;
  77. white-space: pre-wrap;
  78. word-wrap: break-word;
  79. }
  80. .ql-editor > * {
  81. cursor: text;
  82. }
  83. .ql-editor p,
  84. .ql-editor ol,
  85. .ql-editor ul,
  86. .ql-editor pre,
  87. .ql-editor blockquote,
  88. .ql-editor h1,
  89. .ql-editor h2,
  90. .ql-editor h3,
  91. .ql-editor h4,
  92. .ql-editor h5,
  93. .ql-editor h6 {
  94. margin: 0;
  95. padding: 0;
  96. counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
  97. }
  98. .ql-editor ol,
  99. .ql-editor ul {
  100. padding-left: 1.5em;
  101. }
  102. .ql-editor ol > li,
  103. .ql-editor ul > li {
  104. list-style-type: none;
  105. }
  106. .ql-editor ul > li::before {
  107. content: '\2022';
  108. }
  109. .ql-editor ul[data-checked=true],
  110. .ql-editor ul[data-checked=false] {
  111. pointer-events: none;
  112. }
  113. .ql-editor ul[data-checked=true] > li *,
  114. .ql-editor ul[data-checked=false] > li * {
  115. pointer-events: all;
  116. }
  117. .ql-editor ul[data-checked=true] > li::before,
  118. .ql-editor ul[data-checked=false] > li::before {
  119. color: #777;
  120. cursor: pointer;
  121. pointer-events: all;
  122. }
  123. .ql-editor ul[data-checked=true] > li::before {
  124. content: '\2611';
  125. }
  126. .ql-editor ul[data-checked=false] > li::before {
  127. content: '\2610';
  128. }
  129. .ql-editor li::before {
  130. display: inline-block;
  131. white-space: nowrap;
  132. width: 1.2em;
  133. }
  134. .ql-editor li:not(.ql-direction-rtl)::before {
  135. margin-left: -1.5em;
  136. margin-right: 0.3em;
  137. text-align: right;
  138. }
  139. .ql-editor li.ql-direction-rtl::before {
  140. margin-left: 0.3em;
  141. margin-right: -1.5em;
  142. }
  143. .ql-editor ol li:not(.ql-direction-rtl),
  144. .ql-editor ul li:not(.ql-direction-rtl) {
  145. padding-left: 1.5em;
  146. }
  147. .ql-editor ol li.ql-direction-rtl,
  148. .ql-editor ul li.ql-direction-rtl {
  149. padding-right: 1.5em;
  150. }
  151. .ql-editor ol li {
  152. counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
  153. counter-increment: list-0;
  154. }
  155. .ql-editor ol li:before {
  156. content: counter(list-0, decimal) '. ';
  157. }
  158. .ql-editor ol li.ql-indent-1 {
  159. counter-increment: list-1;
  160. }
  161. .ql-editor ol li.ql-indent-1:before {
  162. content: counter(list-1, lower-alpha) '. ';
  163. }
  164. .ql-editor ol li.ql-indent-1 {
  165. counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
  166. }
  167. .ql-editor ol li.ql-indent-2 {
  168. counter-increment: list-2;
  169. }
  170. .ql-editor ol li.ql-indent-2:before {
  171. content: counter(list-2, lower-roman) '. ';
  172. }
  173. .ql-editor ol li.ql-indent-2 {
  174. counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9;
  175. }
  176. .ql-editor ol li.ql-indent-3 {
  177. counter-increment: list-3;
  178. }
  179. .ql-editor ol li.ql-indent-3:before {
  180. content: counter(list-3, decimal) '. ';
  181. }
  182. .ql-editor ol li.ql-indent-3 {
  183. counter-reset: list-4 list-5 list-6 list-7 list-8 list-9;
  184. }
  185. .ql-editor ol li.ql-indent-4 {
  186. counter-increment: list-4;
  187. }
  188. .ql-editor ol li.ql-indent-4:before {
  189. content: counter(list-4, lower-alpha) '. ';
  190. }
  191. .ql-editor ol li.ql-indent-4 {
  192. counter-reset: list-5 list-6 list-7 list-8 list-9;
  193. }
  194. .ql-editor ol li.ql-indent-5 {
  195. counter-increment: list-5;
  196. }
  197. .ql-editor ol li.ql-indent-5:before {
  198. content: counter(list-5, lower-roman) '. ';
  199. }
  200. .ql-editor ol li.ql-indent-5 {
  201. counter-reset: list-6 list-7 list-8 list-9;
  202. }
  203. .ql-editor ol li.ql-indent-6 {
  204. counter-increment: list-6;
  205. }
  206. .ql-editor ol li.ql-indent-6:before {
  207. content: counter(list-6, decimal) '. ';
  208. }
  209. .ql-editor ol li.ql-indent-6 {
  210. counter-reset: list-7 list-8 list-9;
  211. }
  212. .ql-editor ol li.ql-indent-7 {
  213. counter-increment: list-7;
  214. }
  215. .ql-editor ol li.ql-indent-7:before {
  216. content: counter(list-7, lower-alpha) '. ';
  217. }
  218. .ql-editor ol li.ql-indent-7 {
  219. counter-reset: list-8 list-9;
  220. }
  221. .ql-editor ol li.ql-indent-8 {
  222. counter-increment: list-8;
  223. }
  224. .ql-editor ol li.ql-indent-8:before {
  225. content: counter(list-8, lower-roman) '. ';
  226. }
  227. .ql-editor ol li.ql-indent-8 {
  228. counter-reset: list-9;
  229. }
  230. .ql-editor ol li.ql-indent-9 {
  231. counter-increment: list-9;
  232. }
  233. .ql-editor ol li.ql-indent-9:before {
  234. content: counter(list-9, decimal) '. ';
  235. }
  236. .ql-editor .ql-indent-1:not(.ql-direction-rtl) {
  237. padding-left: 3em;
  238. }
  239. .ql-editor li.ql-indent-1:not(.ql-direction-rtl) {
  240. padding-left: 4.5em;
  241. }
  242. .ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right {
  243. padding-right: 3em;
  244. }
  245. .ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right {
  246. padding-right: 4.5em;
  247. }
  248. .ql-editor .ql-indent-2:not(.ql-direction-rtl) {
  249. padding-left: 6em;
  250. }
  251. .ql-editor li.ql-indent-2:not(.ql-direction-rtl) {
  252. padding-left: 7.5em;
  253. }
  254. .ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right {
  255. padding-right: 6em;
  256. }
  257. .ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right {
  258. padding-right: 7.5em;
  259. }
  260. .ql-editor .ql-indent-3:not(.ql-direction-rtl) {
  261. padding-left: 9em;
  262. }
  263. .ql-editor li.ql-indent-3:not(.ql-direction-rtl) {
  264. padding-left: 10.5em;
  265. }
  266. .ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right {
  267. padding-right: 9em;
  268. }
  269. .ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right {
  270. padding-right: 10.5em;
  271. }
  272. .ql-editor .ql-indent-4:not(.ql-direction-rtl) {
  273. padding-left: 12em;
  274. }
  275. .ql-editor li.ql-indent-4:not(.ql-direction-rtl) {
  276. padding-left: 13.5em;
  277. }
  278. .ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right {
  279. padding-right: 12em;
  280. }
  281. .ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right {
  282. padding-right: 13.5em;
  283. }
  284. .ql-editor .ql-indent-5:not(.ql-direction-rtl) {
  285. padding-left: 15em;
  286. }
  287. .ql-editor li.ql-indent-5:not(.ql-direction-rtl) {
  288. padding-left: 16.5em;
  289. }
  290. .ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right {
  291. padding-right: 15em;
  292. }
  293. .ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right {
  294. padding-right: 16.5em;
  295. }
  296. .ql-editor .ql-indent-6:not(.ql-direction-rtl) {
  297. padding-left: 18em;
  298. }
  299. .ql-editor li.ql-indent-6:not(.ql-direction-rtl) {
  300. padding-left: 19.5em;
  301. }
  302. .ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right {
  303. padding-right: 18em;
  304. }
  305. .ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right {
  306. padding-right: 19.5em;
  307. }
  308. .ql-editor .ql-indent-7:not(.ql-direction-rtl) {
  309. padding-left: 21em;
  310. }
  311. .ql-editor li.ql-indent-7:not(.ql-direction-rtl) {
  312. padding-left: 22.5em;
  313. }
  314. .ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right {
  315. padding-right: 21em;
  316. }
  317. .ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right {
  318. padding-right: 22.5em;
  319. }
  320. .ql-editor .ql-indent-8:not(.ql-direction-rtl) {
  321. padding-left: 24em;
  322. }
  323. .ql-editor li.ql-indent-8:not(.ql-direction-rtl) {
  324. padding-left: 25.5em;
  325. }
  326. .ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right {
  327. padding-right: 24em;
  328. }
  329. .ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right {
  330. padding-right: 25.5em;
  331. }
  332. .ql-editor .ql-indent-9:not(.ql-direction-rtl) {
  333. padding-left: 27em;
  334. }
  335. .ql-editor li.ql-indent-9:not(.ql-direction-rtl) {
  336. padding-left: 28.5em;
  337. }
  338. .ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right {
  339. padding-right: 27em;
  340. }
  341. .ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right {
  342. padding-right: 28.5em;
  343. }
  344. .ql-editor .ql-video {
  345. display: block;
  346. max-width: 100%;
  347. }
  348. .ql-editor .ql-video.ql-align-center {
  349. margin: 0 auto;
  350. }
  351. .ql-editor .ql-video.ql-align-right {
  352. margin: 0 0 0 auto;
  353. }
  354. .ql-editor .ql-bg-black {
  355. background-color: #000;
  356. }
  357. .ql-editor .ql-bg-red {
  358. background-color: #e60000;
  359. }
  360. .ql-editor .ql-bg-orange {
  361. background-color: #f90;
  362. }
  363. .ql-editor .ql-bg-yellow {
  364. background-color: #ff0;
  365. }
  366. .ql-editor .ql-bg-green {
  367. background-color: #008a00;
  368. }
  369. .ql-editor .ql-bg-blue {
  370. background-color: #06c;
  371. }
  372. .ql-editor .ql-bg-purple {
  373. background-color: #93f;
  374. }
  375. .ql-editor .ql-color-white {
  376. color: #fff;
  377. }
  378. .ql-editor .ql-color-red {
  379. color: #e60000;
  380. }
  381. .ql-editor .ql-color-orange {
  382. color: #f90;
  383. }
  384. .ql-editor .ql-color-yellow {
  385. color: #ff0;
  386. }
  387. .ql-editor .ql-color-green {
  388. color: #008a00;
  389. }
  390. .ql-editor .ql-color-blue {
  391. color: #06c;
  392. }
  393. .ql-editor .ql-color-purple {
  394. color: #93f;
  395. }
  396. .ql-editor .ql-font-serif {
  397. font-family: Georgia, Times New Roman, serif;
  398. }
  399. .ql-editor .ql-font-monospace {
  400. font-family: Monaco, Courier New, monospace;
  401. }
  402. .ql-editor .ql-size-small {
  403. font-size: 0.75em;
  404. }
  405. .ql-editor .ql-size-large {
  406. font-size: 1.5em;
  407. }
  408. .ql-editor .ql-size-huge {
  409. font-size: 2.5em;
  410. }
  411. .ql-editor .ql-direction-rtl {
  412. direction: rtl;
  413. text-align: inherit;
  414. }
  415. .ql-editor .ql-align-center {
  416. text-align: center;
  417. }
  418. .ql-editor .ql-align-justify {
  419. text-align: justify;
  420. }
  421. .ql-editor .ql-align-right {
  422. text-align: right;
  423. }
  424. .ql-editor.ql-blank::before {
  425. color: rgba(0,0,0,0.6);
  426. content: attr(data-placeholder);
  427. font-style: italic;
  428. left: 15px;
  429. pointer-events: none;
  430. position: absolute;
  431. right: 15px;
  432. }
  433. </style>