node.vue 18 KB

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