node.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678
  1. <template>
  2. <view :id="attrs.id" :class="'_block _'+name+' '+attrs.class" :style="attrs.style">
  3. <block v-for="(n, i) in childs" v-bind:key="i">
  4. <!-- 图片 -->
  5. <!-- 占位图 -->
  6. <image v-if="n.name==='img'&&!n.t&&((opts[1]&&!ctrl[i])||ctrl[i]<0)" class="_img" :style="n.attrs.style" :src="ctrl[i]<0?opts[2]:opts[1]" mode="widthFix" />
  7. <!-- 显示图片 -->
  8. <!-- #ifdef H5 || (APP-PLUS && VUE2) -->
  9. <img v-if="n.name==='img'" :id="n.attrs.id" :class="'_img '+n.attrs.class" :style="(ctrl[i]===-1?'display:none;':'')+n.attrs.style" :src="n.attrs.src||(ctrl.load?n.attrs['data-src']:'')" :data-i="i" @load="imgLoad" @error="mediaError" @tap.stop="imgTap" @longpress="imgLongTap" />
  10. <!-- #endif -->
  11. <!-- #ifndef H5 || (APP-PLUS && VUE2) -->
  12. <!-- 表格中的图片,使用 rich-text 防止大小不正确 -->
  13. <rich-text v-if="n.name==='img'&&n.t" :style="'display:'+n.t" :nodes="[{attrs:{style:n.attrs.style,src:n.attrs.src},name:'img'}]" :data-i="i" @tap.stop="imgTap" />
  14. <!-- #endif -->
  15. <!-- #ifndef H5 || APP-PLUS -->
  16. <image v-else-if="n.name==='img'" :id="n.attrs.id" :class="'_img '+n.attrs.class" :style="(ctrl[i]===-1?'display:none;':'')+'width:'+(ctrl[i]||1)+'px;height:1px;'+n.attrs.style" :src="n.attrs.src" :mode="!n.h?'widthFix':(!n.w?'heightFix':'')" :lazy-load="opts[0]" :webp="n.webp" :show-menu-by-longpress="opts[3]&&!n.attrs.ignore" :image-menu-prevent="!opts[3]||n.attrs.ignore" :data-i="i" @load="imgLoad" @error="mediaError" @tap.stop="imgTap" @longpress="imgLongTap" />
  17. <!-- #endif -->
  18. <!-- #ifdef APP-PLUS && VUE3 -->
  19. <image v-else-if="n.name==='img'" :id="n.attrs.id" :class="'_img '+n.attrs.class" :style="(ctrl[i]===-1?'display:none;':'')+'width:'+(ctrl[i]||1)+'px;'+n.attrs.style" :src="n.attrs.src||(ctrl.load?n.attrs['data-src']:'')" :mode="!n.h?'widthFix':(!n.w?'heightFix':'')" :data-i="i" @load="imgLoad" @error="mediaError" @tap.stop="imgTap" @longpress="imgLongTap" />
  20. <!-- #endif -->
  21. <!-- 文本 -->
  22. <!-- #ifdef MP-WEIXIN -->
  23. <text v-else-if="n.text" :user-select="opts[4]=='force'&&isiOS" decode>{{n.text}}</text>
  24. <!-- #endif -->
  25. <!-- #ifndef MP-WEIXIN || MP-BAIDU || MP-ALIPAY || MP-TOUTIAO -->
  26. <text v-else-if="n.text" decode>{{n.text}}</text>
  27. <!-- #endif -->
  28. <text v-else-if="n.name==='br'">\n</text>
  29. <!-- 链接 -->
  30. <view v-else-if="n.name==='a'" :id="n.attrs.id" :class="(n.attrs.href?'_a ':'')+n.attrs.class" hover-class="_hover" :style="'display:inline;'+n.attrs.style" :data-i="i" @tap.stop="linkTap">
  31. <node name="span" :childs="n.children" :opts="opts" style="display:inherit" />
  32. </view>
  33. <!-- 视频 -->
  34. <!-- #ifdef APP-PLUS -->
  35. <view v-else-if="n.html" :id="n.attrs.id" :class="'_video '+n.attrs.class" :style="n.attrs.style" v-html="n.html" @vplay.stop="play" />
  36. <!-- #endif -->
  37. <!-- #ifndef APP-PLUS -->
  38. <video v-else-if="n.name==='video'" :id="n.attrs.id" :class="n.attrs.class" :style="n.attrs.style" :autoplay="n.attrs.autoplay" :controls="n.attrs.controls" :loop="n.attrs.loop" :muted="n.attrs.muted" :object-fit="n.attrs['object-fit']" :poster="n.attrs.poster" :src="n.src[ctrl[i]||0]" :data-i="i" @play="play" @error="mediaError" />
  39. <!-- #endif -->
  40. <!-- #ifdef H5 || APP-PLUS -->
  41. <iframe v-else-if="n.name==='iframe'" :style="n.attrs.style" :allowfullscreen="n.attrs.allowfullscreen" :frameborder="n.attrs.frameborder" :src="n.attrs.src" />
  42. <embed v-else-if="n.name==='embed'" :style="n.attrs.style" :src="n.attrs.src" />
  43. <!-- #endif -->
  44. <!-- #ifndef MP-TOUTIAO || ((H5 || APP-PLUS) && VUE3) -->
  45. <!-- 音频 -->
  46. <audio v-else-if="n.name==='audio'" :id="n.attrs.id" :class="n.attrs.class" :style="n.attrs.style" :author="n.attrs.author" :controls="n.attrs.controls" :loop="n.attrs.loop" :name="n.attrs.name" :poster="n.attrs.poster" :src="n.src[ctrl[i]||0]" :data-i="i" @play="play" @error="mediaError" />
  47. <!-- #endif -->
  48. <view v-else-if="(n.name==='table'&&n.c)||n.name==='li'" :id="n.attrs.id" :class="'_'+n.name+' '+n.attrs.class" :style="n.attrs.style">
  49. <node v-if="n.name==='li'" :childs="n.children" :opts="opts" />
  50. <view v-else v-for="(tbody, x) in n.children" v-bind:key="x" :class="'_'+tbody.name+' '+tbody.attrs.class" :style="tbody.attrs.style">
  51. <node v-if="tbody.name==='td'||tbody.name==='th'" :childs="tbody.children" :opts="opts" />
  52. <block v-else v-for="(tr, y) in tbody.children" v-bind:key="y">
  53. <view v-if="tr.name==='td'||tr.name==='th'" :class="'_'+tr.name+' '+tr.attrs.class" :style="tr.attrs.style">
  54. <node :childs="tr.children" :opts="opts" />
  55. </view>
  56. <view v-else :class="'_'+tr.name+' '+tr.attrs.class" :style="tr.attrs.style">
  57. <view v-for="(td, z) in tr.children" v-bind:key="z" :class="'_'+td.name+' '+td.attrs.class" :style="td.attrs.style">
  58. <node :childs="td.children" :opts="opts" />
  59. </view>
  60. </view>
  61. </block>
  62. </view>
  63. </view>
  64. <!-- 富文本 -->
  65. <!-- #ifdef H5 || ((MP-WEIXIN || MP-QQ || APP-PLUS || MP-360) && VUE2) -->
  66. <rich-text v-else-if="!n.c&&!handler.isInline(n.name, n.attrs.style)" :id="n.attrs.id" :style="n.f" :user-select="opts[4]" :nodes="[n]" @tap.stop="codeLongTap(n)"/>
  67. <!-- #endif -->
  68. <!-- #ifndef H5 || ((MP-WEIXIN || MP-QQ || APP-PLUS || MP-360) && VUE2) -->
  69. <rich-text v-else-if="!n.c" :id="n.attrs.id" :style="'display:inline;'+n.f" :preview="false" :selectable="opts[4]" :user-select="opts[4]" :nodes="[n]" @tap.stop="codeLongTap(n)"/>
  70. <!-- #endif -->
  71. <!-- 继续递归 -->
  72. <view v-else-if="n.c===2" :id="n.attrs.id" :class="'_block _'+n.name+' '+n.attrs.class" :style="n.f+';'+n.attrs.style">
  73. <node v-for="(n2, j) in n.children" v-bind:key="j" :style="n2.f" :name="n2.name" :attrs="n2.attrs" :childs="n2.children" :opts="opts" />
  74. </view>
  75. <node v-else :style="n.f" :name="n.name" :attrs="n.attrs" :childs="n.children" :opts="opts"/>
  76. </block>
  77. </view>
  78. </template>
  79. <script module="handler" lang="wxs">
  80. // 行内标签列表
  81. var inlineTags = {
  82. abbr: true,
  83. b: true,
  84. big: true,
  85. code: true,
  86. del: true,
  87. em: true,
  88. i: true,
  89. ins: true,
  90. label: true,
  91. q: true,
  92. small: true,
  93. span: true,
  94. strong: true,
  95. sub: true,
  96. sup: true
  97. }
  98. /**
  99. * @description 判断是否为行内标签
  100. */
  101. module.exports = {
  102. isInline: function (tagName, style) {
  103. return inlineTags[tagName] || (style || '').indexOf('display:inline') !== -1
  104. }
  105. }
  106. </script>
  107. <script>
  108. import node from './node'
  109. export default {
  110. name: 'node',
  111. options: {
  112. // #ifdef MP-WEIXIN
  113. virtualHost: true,
  114. // #endif
  115. // #ifdef MP-TOUTIAO
  116. addGlobalClass: false
  117. // #endif
  118. },
  119. data () {
  120. return {
  121. ctrl: {},
  122. // #ifdef MP-WEIXIN
  123. isiOS: uni.getSystemInfoSync().system.includes('iOS')
  124. // #endif
  125. }
  126. },
  127. props: {
  128. name: String,
  129. attrs: {
  130. type: Object,
  131. default () {
  132. return {}
  133. }
  134. },
  135. childs: Array,
  136. opts: Array
  137. },
  138. components: {
  139. // #ifndef (H5 || APP-PLUS) && VUE3
  140. node
  141. // #endif
  142. },
  143. mounted () {
  144. this.$nextTick(() => {
  145. for (this.root = this.$parent; this.root.$options.name !== 'mp-html'; this.root = this.root.$parent);
  146. })
  147. // #ifdef H5 || APP-PLUS
  148. if (this.opts[0]) {
  149. let i
  150. for (i = this.childs.length; i--;) {
  151. if (this.childs[i].name === 'img') break
  152. }
  153. if (i !== -1) {
  154. this.observer = uni.createIntersectionObserver(this).relativeToViewport({
  155. top: 500,
  156. bottom: 500
  157. })
  158. this.observer.observe('._img', res => {
  159. if (res.intersectionRatio) {
  160. this.$set(this.ctrl, 'load', 1)
  161. this.observer.disconnect()
  162. }
  163. })
  164. }
  165. }
  166. // #endif
  167. },
  168. beforeDestroy () {
  169. // #ifdef H5 || APP-PLUS
  170. if (this.observer) {
  171. this.observer.disconnect()
  172. }
  173. // #endif
  174. },
  175. methods:{
  176. codeLongTap(e){
  177. if(e.attrs.class=='hl-pre'){
  178. uni.setClipboardData({
  179. data: e.attrs['data-content'],
  180. showToast:false,
  181. success: () => {
  182. uni.showToast({
  183. title: '代码复制成功',
  184. duration: 1000
  185. });
  186. },
  187. fail: (err) => {
  188. console.log('err', err);
  189. }
  190. });
  191. }
  192. },
  193. // codeLongTap(e){
  194. // console.log('codeLongTap',e.attrs);
  195. // if(e.attrs.class=='hl-pre'){
  196. // uni.showActionSheet({
  197. // itemList: ['复制代码'],
  198. // success: function (res) {
  199. // uni.setClipboardData({
  200. // data: e.attrs['data-content'],
  201. // showToast:false,
  202. // success: () => {
  203. // uni.showToast({
  204. // title: '代码复制成功',
  205. // duration: 1000
  206. // });
  207. // },
  208. // fail: (err) => {
  209. // console.log('err', err);
  210. // }
  211. // });
  212. // },
  213. // fail: function (res) {
  214. // console.log(res.errMsg);
  215. // }
  216. // });
  217. // }
  218. // },
  219. // #ifdef MP-WEIXIN
  220. toJSON () { return this },
  221. // #endif
  222. /**
  223. * @description 播放视频事件
  224. * @param {Event} e
  225. */
  226. play (e) {
  227. this.root.$emit('play')
  228. // #ifndef APP-PLUS
  229. if (this.root.pauseVideo) {
  230. let flag = false
  231. const id = e.target.id
  232. for (let i = this.root._videos.length; i--;) {
  233. if (this.root._videos[i].id === id) {
  234. flag = true
  235. } else {
  236. this.root._videos[i].pause() // 自动暂停其他视频
  237. }
  238. }
  239. // 将自己加入列表
  240. if (!flag) {
  241. const ctx = uni.createVideoContext(id
  242. // #ifndef MP-BAIDU
  243. , this
  244. // #endif
  245. )
  246. ctx.id = id
  247. if (this.root.playbackRate) {
  248. ctx.playbackRate(this.root.playbackRate)
  249. }
  250. this.root._videos.push(ctx)
  251. }
  252. }
  253. // #endif
  254. },
  255. /**
  256. * @description 图片点击事件
  257. * @param {Event} e
  258. */
  259. imgTap (e) {
  260. const node = this.childs[e.currentTarget.dataset.i]
  261. if (node.a) {
  262. this.linkTap(node.a)
  263. return
  264. }
  265. if (node.attrs.ignore) return
  266. // #ifdef H5 || APP-PLUS
  267. node.attrs.src = node.attrs.src || node.attrs['data-src']
  268. // #endif
  269. this.root.$emit('imgtap', node.attrs)
  270. // 自动预览图片
  271. if (this.root.previewImg) {
  272. uni.previewImage({
  273. // #ifdef MP-WEIXIN
  274. showmenu: this.root.showImgMenu,
  275. // #endif
  276. // #ifdef MP-ALIPAY
  277. enablesavephoto: this.root.showImgMenu,
  278. enableShowPhotoDownload: this.root.showImgMenu,
  279. // #endif
  280. current: parseInt(node.attrs.i),
  281. urls: this.root.imgList
  282. })
  283. }
  284. },
  285. /**
  286. * @description 图片长按
  287. */
  288. imgLongTap (e) {
  289. // #ifdef APP-PLUS
  290. const attrs = this.childs[e.currentTarget.dataset.i].attrs
  291. if (this.opts[3] && !attrs.ignore) {
  292. uni.showActionSheet({
  293. itemList: ['保存图片'],
  294. success: () => {
  295. const save = path => {
  296. uni.saveImageToPhotosAlbum({
  297. filePath: path,
  298. success () {
  299. uni.showToast({
  300. title: '保存成功'
  301. })
  302. }
  303. })
  304. }
  305. if (this.root.imgList[attrs.i].startsWith('http')) {
  306. uni.downloadFile({
  307. url: this.root.imgList[attrs.i],
  308. success: res => save(res.tempFilePath)
  309. })
  310. } else {
  311. save(this.root.imgList[attrs.i])
  312. }
  313. }
  314. })
  315. }
  316. // #endif
  317. },
  318. /**
  319. * @description 图片加载完成事件
  320. * @param {Event} e
  321. */
  322. imgLoad (e) {
  323. const i = e.currentTarget.dataset.i
  324. /* #ifndef H5 || (APP-PLUS && VUE2) */
  325. if (!this.childs[i].w) {
  326. // 设置原宽度
  327. this.$set(this.ctrl, i, e.detail.width)
  328. } else /* #endif */ if ((this.opts[1] && !this.ctrl[i]) || this.ctrl[i] === -1) {
  329. // 加载完毕,取消加载中占位图
  330. this.$set(this.ctrl, i, 1)
  331. }
  332. this.checkReady()
  333. },
  334. /**
  335. * @description 检查是否所有图片加载完毕
  336. */
  337. checkReady () {
  338. if (this.root && !this.root.lazyLoad) {
  339. this.root._unloadimgs -= 1
  340. if (!this.root._unloadimgs) {
  341. setTimeout(() => {
  342. this.root.getRect().then(rect => {
  343. this.root.$emit('ready', rect)
  344. }).catch(() => {
  345. this.root.$emit('ready', {})
  346. })
  347. }, 350)
  348. }
  349. }
  350. },
  351. /**
  352. * @description 链接点击事件
  353. * @param {Event} e
  354. */
  355. linkTap (e) {
  356. const node = e.currentTarget ? this.childs[e.currentTarget.dataset.i] : {}
  357. const attrs = node.attrs || e
  358. const href = attrs.href
  359. this.root.$emit('linktap', Object.assign({
  360. innerText: this.root.getText(node.children || []) // 链接内的文本内容
  361. }, attrs))
  362. if (href) {
  363. if (href[0] === '#') {
  364. // 跳转锚点
  365. this.root.navigateTo(href.substring(1)).catch(() => { })
  366. } else if (href.split('?')[0].includes('://')) {
  367. // 复制外部链接
  368. if (this.root.copyLink) {
  369. // #ifdef H5
  370. window.open(href)
  371. // #endif
  372. // #ifdef MP
  373. uni.setClipboardData({
  374. data: href,
  375. success: () =>
  376. uni.showToast({
  377. title: '链接已复制'
  378. })
  379. })
  380. // #endif
  381. // #ifdef APP-PLUS
  382. plus.runtime.openWeb(href)
  383. // #endif
  384. }
  385. } else {
  386. // 跳转页面
  387. uni.navigateTo({
  388. url: href,
  389. fail () {
  390. uni.switchTab({
  391. url: href,
  392. fail () { }
  393. })
  394. }
  395. })
  396. }
  397. }
  398. },
  399. /**
  400. * @description 错误事件
  401. * @param {Event} e
  402. */
  403. mediaError (e) {
  404. const i = e.currentTarget.dataset.i
  405. const node = this.childs[i]
  406. // 加载其他源
  407. if (node.name === 'video' || node.name === 'audio') {
  408. let index = (this.ctrl[i] || 0) + 1
  409. if (index > node.src.length) {
  410. index = 0
  411. }
  412. if (index < node.src.length) {
  413. this.$set(this.ctrl, i, index)
  414. return
  415. }
  416. } else if (node.name === 'img') {
  417. // #ifdef H5 && VUE3
  418. if (this.opts[0] && !this.ctrl.load) return
  419. // #endif
  420. // 显示错误占位图
  421. if (this.opts[2]) {
  422. this.$set(this.ctrl, i, -1)
  423. }
  424. this.checkReady()
  425. }
  426. if (this.root) {
  427. this.root.$emit('error', {
  428. source: node.name,
  429. attrs: node.attrs,
  430. // #ifndef H5 && VUE3
  431. errMsg: e.detail.errMsg
  432. // #endif
  433. })
  434. }
  435. }
  436. }
  437. }
  438. </script>
  439. <style>/deep/ .hl-code,/deep/ .hl-pre{color:#ccc;background:0 0;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}/deep/ .hl-pre{padding:1em;margin:.5em 0;overflow:auto}/deep/ .hl-pre{background:#2d2d2d}/deep/ .hl-block-comment,/deep/ .hl-cdata,/deep/ .hl-comment,/deep/ .hl-doctype,/deep/ .hl-prolog{color:#999}/deep/ .hl-punctuation{color:#ccc}/deep/ .hl-attr-name,/deep/ .hl-deleted,/deep/ .hl-namespace,/deep/ .hl-tag{color:#e2777a}/deep/ .hl-function-name{color:#6196cc}/deep/ .hl-boolean,/deep/ .hl-function,/deep/ .hl-number{color:#f08d49}/deep/ .hl-class-name,/deep/ .hl-constant,/deep/ .hl-property,/deep/ .hl-symbol{color:#f8c555}/deep/ .hl-atrule,/deep/ .hl-builtin,/deep/ .hl-important,/deep/ .hl-keyword,/deep/ .hl-selector{color:#cc99cd}/deep/ .hl-attr-value,/deep/ .hl-char,/deep/ .hl-regex,/deep/ .hl-string,/deep/ .hl-variable{color:#7ec699}/deep/ .hl-entity,/deep/ .hl-operator,/deep/ .hl-url{color:#67cdcc}/deep/ .hl-bold,/deep/ .hl-important{font-weight:700}/deep/ .hl-italic{font-style:italic}/deep/ .hl-entity{cursor:help}/deep/ .hl-inserted{color:green}/deep/ .md-p {
  440. margin-block-start: 1em;
  441. margin-block-end: 1em;
  442. }
  443. /deep/.hl-copy{
  444. color:#cccccc;
  445. }
  446. /deep/ .md-table,
  447. /deep/ .md-blockquote {
  448. margin-bottom: 16px;
  449. }
  450. /deep/ .md-table {
  451. box-sizing: border-box;
  452. width: 100%;
  453. overflow: auto;
  454. border-spacing: 0;
  455. border-collapse: collapse;
  456. }
  457. /deep/ .md-tr {
  458. background-color: #fff;
  459. border-top: 1px solid #c6cbd1;
  460. }
  461. .md-table .md-tr:nth-child(2n) {
  462. background-color: #f6f8fa;
  463. }
  464. /deep/ .md-th,
  465. /deep/ .md-td {
  466. padding: 6px 13px !important;
  467. border: 1px solid #dfe2e5;
  468. }
  469. /deep/ .md-th {
  470. font-weight: 600;
  471. }
  472. /deep/ .md-blockquote {
  473. padding: 0 1em;
  474. color: #6a737d;
  475. border-left: 0.25em solid #dfe2e5;
  476. }
  477. /deep/ .md-code {
  478. padding: 0.2em 0.4em;
  479. font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
  480. font-size: 85%;
  481. background-color: rgba(27, 31, 35, 0.05);
  482. border-radius: 3px;
  483. }
  484. /deep/ .md-pre .md-code {
  485. padding: 0;
  486. font-size: 100%;
  487. background: transparent;
  488. border: 0;
  489. }
  490. /* a 标签默认效果 */
  491. ._a {
  492. padding: 1.5px 0 1.5px 0;
  493. color: #366092;
  494. word-break: break-all;
  495. }
  496. /* a 标签点击态效果 */
  497. ._hover {
  498. text-decoration: underline;
  499. opacity: 0.7;
  500. }
  501. /* 图片默认效果 */
  502. ._img {
  503. max-width: 100%;
  504. -webkit-touch-callout: none;
  505. }
  506. /* 内部样式 */
  507. ._block {
  508. display: block;
  509. }
  510. ._b,
  511. ._strong {
  512. font-weight: bold;
  513. }
  514. ._code {
  515. font-family: monospace;
  516. }
  517. ._del {
  518. text-decoration: line-through;
  519. }
  520. ._em,
  521. ._i {
  522. font-style: italic;
  523. }
  524. ._h1 {
  525. font-size: 2em;
  526. }
  527. ._h2 {
  528. font-size: 1.5em;
  529. }
  530. ._h3 {
  531. font-size: 1.17em;
  532. }
  533. ._h5 {
  534. font-size: 0.83em;
  535. }
  536. ._h6 {
  537. font-size: 0.67em;
  538. }
  539. ._h1,
  540. ._h2,
  541. ._h3,
  542. ._h4,
  543. ._h5,
  544. ._h6 {
  545. display: block;
  546. font-weight: bold;
  547. }
  548. ._image {
  549. height: 1px;
  550. }
  551. ._ins {
  552. text-decoration: underline;
  553. }
  554. ._li {
  555. display: list-item;
  556. }
  557. ._ol {
  558. list-style-type: decimal;
  559. }
  560. ._ol,
  561. ._ul {
  562. display: block;
  563. padding-left: 40px;
  564. margin: 1em 0;
  565. }
  566. ._q::before {
  567. content: '"';
  568. }
  569. ._q::after {
  570. content: '"';
  571. }
  572. ._sub {
  573. font-size: smaller;
  574. vertical-align: sub;
  575. }
  576. ._sup {
  577. font-size: smaller;
  578. vertical-align: super;
  579. }
  580. ._thead,
  581. ._tbody,
  582. ._tfoot {
  583. display: table-row-group;
  584. }
  585. ._tr {
  586. display: table-row;
  587. }
  588. ._td,
  589. ._th {
  590. display: table-cell;
  591. vertical-align: middle;
  592. }
  593. ._th {
  594. font-weight: bold;
  595. text-align: center;
  596. }
  597. ._ul {
  598. list-style-type: disc;
  599. }
  600. ._ul ._ul {
  601. margin: 0;
  602. list-style-type: circle;
  603. }
  604. ._ul ._ul ._ul {
  605. list-style-type: square;
  606. }
  607. ._abbr,
  608. ._b,
  609. ._code,
  610. ._del,
  611. ._em,
  612. ._i,
  613. ._ins,
  614. ._label,
  615. ._q,
  616. ._span,
  617. ._strong,
  618. ._sub,
  619. ._sup {
  620. display: inline;
  621. }
  622. /* #ifdef APP-PLUS */
  623. ._video {
  624. width: 300px;
  625. height: 225px;
  626. }
  627. /* #endif */
  628. </style>