my-selectCheckbox.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760
  1. <template>
  2. <view class="uni-stat__select">
  3. <span v-if="label" class="uni-label-text">{{label + ':'}}</span>
  4. <view class="uni-stat-box" :class="{'uni-stat__actived': current}">
  5. <view class="uni-select" :style="{height:multiple?'100%':' 35px;'}"
  6. :class="{'uni-select--disabled':disabled}">
  7. <view class="uni-select__input-box" :style="{height:multiple?'100%':'35px;'}" @click="toggleSelector">
  8. <view class="" style="display: flex;flex-wrap: wrap;width: 100%;" v-if="multiple&&current.length>0">
  9. <view class="tag-calss"
  10. v-for="(item,index) in collapseTags?current.slice(0,collapseTagsNum):current"
  11. :key="item[dataValue]">
  12. <span class="text">{{item[dataKey]}}</span>
  13. <view class="" @click.stop="delItem(item)">
  14. <uni-icons type="clear" style="margin-left: 4px;" color="#c0c4cc" />
  15. </view>
  16. </view>
  17. <view v-if="current.length>collapseTagsNum&&collapseTags" class="tag-calss">
  18. <span class="text">+{{current.length-collapseTagsNum}}</span>
  19. </view>
  20. </view>
  21. <view v-else-if="current&&current.length>0&&!filterable" class="uni-select__input-text">{{current}}
  22. </view>
  23. <input v-else-if="filterable" class="uni-select__input-text" type="text" style="font-size: 12px;"
  24. :placeholder="placeholderOld" v-model="current">
  25. <view v-else class="uni-select__input-text uni-select__input-placeholder">{{typePlaceholder}}</view>
  26. <uni-icons v-if="current && clear" type="clear" color="#c0c4cc" size="24" @click="clearVal" />
  27. <uni-icons v-else :type="showSelector? 'top' : 'bottom'" size="14" color="#999" />
  28. </view>
  29. <view class="uni-select--mask" v-if="showSelector" @click="toggleSelector" />
  30. <view class="uni-select__selector" v-if="showSelector">
  31. <view class="uni-popper__arrow"></view>
  32. <scroll-view scroll-y="true" class="uni-select__selector-scroll">
  33. <view class="uni-select__selector-empty" v-if="filterMixinDatacomResData.length === 0">
  34. <span>{{emptyTips}}</span>
  35. </view>
  36. <view v-else class="uni-select__selector-item"
  37. style="display: flex;justify-content: space-between;align-items: center;"
  38. v-for="(item,index) in filterMixinDatacomResData" :key="index" @click="change(item)">
  39. <span
  40. :class="{'uni-select__selector__disabled': item.disable}">{{formatItemName(item)}}</span>
  41. <uni-icons v-if="multiple&&currentArr.includes(item[dataValue])" type="checkmarkempty"
  42. color="#007aff" />
  43. </view>
  44. </scroll-view>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. </template>
  50. <script>
  51. /**
  52. * DataChecklist 数据选择器
  53. * @description 通过数据渲染的下拉框组件
  54. * @tutorial https://uniapp.dcloud.io/component/uniui/uni-data-select
  55. * @property {String} value 默认值
  56. * @property {Array} localdata 本地数据 ,格式 [{text:'',value:''}]
  57. * @property {Boolean} clear 是否可以清空已选项
  58. * @property {Boolean} emptyText 没有数据时显示的文字 ,本地数据无效
  59. * @property {String} label 左侧标题
  60. * @property {String} placeholder 输入框的提示文字
  61. * @property {Boolean} disabled 是否禁用
  62. * @event {Function} change 选中发生变化触发
  63. */
  64. export default {
  65. name: "my-selectCheckbox",
  66. mixins: [uniCloud.mixinDatacom || {}],
  67. props: {
  68. collapseTagsNum: {
  69. type: Number,
  70. default: 1
  71. },
  72. collapseTags: {
  73. type: Boolean,
  74. default: false
  75. },
  76. dataKey: {
  77. type: [String],
  78. default: 'text'
  79. },
  80. dataValue: {
  81. type: [String],
  82. default: 'value'
  83. },
  84. multiple: {
  85. type: Boolean,
  86. default: false
  87. },
  88. filterable: {
  89. type: Boolean,
  90. default: false
  91. },
  92. localdata: {
  93. type: Array,
  94. default () {
  95. return []
  96. }
  97. },
  98. // #ifndef VUE3
  99. value: {
  100. type: [String, Number, Array],
  101. default: ''
  102. },
  103. // #endif
  104. // #ifdef VUE3
  105. modelValue: {
  106. type: [String, Number, Array],
  107. default: ''
  108. },
  109. // #endif
  110. label: {
  111. type: String,
  112. default: ''
  113. },
  114. placeholder: {
  115. type: String,
  116. default: '请选择'
  117. },
  118. emptyTips: {
  119. type: String,
  120. default: '无选项'
  121. },
  122. clear: {
  123. type: Boolean,
  124. default: true
  125. },
  126. defItem: {
  127. type: Number,
  128. default: 0
  129. },
  130. disabled: {
  131. type: Boolean,
  132. default: false
  133. },
  134. // 格式化输出 用法 field="_id as value, version as text, uni_platform as label" format="{label} - {text}"
  135. format: {
  136. type: String,
  137. default: ''
  138. },
  139. },
  140. data() {
  141. return {
  142. showSelector: false,
  143. current: [],
  144. mixinDatacomResData: [],
  145. apps: [],
  146. channels: [],
  147. cacheKey: "uni-data-select-lastSelectedValue",
  148. placeholderOld: "",
  149. currentArr: []
  150. };
  151. },
  152. created() {
  153. if (this.multiple) {
  154. // #ifndef VUE3
  155. this.currentArr = this.value || []
  156. // #endif
  157. // #ifdef VUE3
  158. this.currentArr = this.modelValue || []
  159. // #endif
  160. if (!this.current) {
  161. this.current = []
  162. }
  163. // #ifndef VUE3
  164. if (this.value && this.value.length > 0 && this.filterMixinDatacomResData.length > 0) {
  165. this.value.forEach(item => {
  166. let current = this.filterMixinDatacomResData.find(e =>
  167. e[this.dataValue] == item
  168. )
  169. this.current.push(current)
  170. })
  171. }
  172. // #endif
  173. // #ifdef VUE3
  174. if (this.modelValue && this.modelValue.length > 0 && this.filterMixinDatacomResData.length > 0) {
  175. this.modelValue.forEach(item => {
  176. let current = this.filterMixinDatacomResData.find(e =>
  177. e[this.dataValue] == item
  178. )
  179. this.current.push(current)
  180. })
  181. }
  182. // #endif
  183. } else {
  184. // #ifndef VUE3
  185. if (this.value) {
  186. this.current = this.formatItemName(this.filterMixinDatacomResData.find(e =>
  187. e[this.dataValue] == this.value
  188. ))
  189. }
  190. // #endif
  191. // #ifdef VUE3
  192. if (this.modelValue) {
  193. this.current = this.formatItemName(this.filterMixinDatacomResData.find(e =>
  194. e[this.dataValue] == this.modelValue
  195. ))
  196. }
  197. // #endif
  198. }
  199. this.placeholderOld = this.placeholder
  200. this.debounceGet = this.debounce(() => {
  201. this.query();
  202. }, 300);
  203. if (this.collection && !this.localdata.length) {
  204. this.debounceGet();
  205. }
  206. },
  207. computed: {
  208. filterMixinDatacomResData() {
  209. if (this.filterable && this.current) {
  210. return this.mixinDatacomResData.filter(e => e[this.dataKey].includes(this.current))
  211. } else {
  212. return this.mixinDatacomResData
  213. }
  214. },
  215. typePlaceholder() {
  216. const text = {
  217. 'opendb-stat-app-versions': '版本',
  218. 'opendb-app-channels': '渠道',
  219. 'opendb-app-list': '应用'
  220. }
  221. const common = this.placeholder
  222. const placeholder = text[this.collection]
  223. return placeholder ?
  224. common + placeholder :
  225. common
  226. },
  227. valueCom() {
  228. // #ifdef VUE3
  229. return this.modelValue;
  230. // #endif
  231. // #ifndef VUE3
  232. return this.value;
  233. // #endif
  234. }
  235. },
  236. watch: {
  237. localdata: {
  238. immediate: true,
  239. handler(val, old) {
  240. if (Array.isArray(val) && old !== val) {
  241. this.mixinDatacomResData = val
  242. }
  243. }
  244. },
  245. valueCom(val, old) {
  246. this.initDefVal()
  247. },
  248. mixinDatacomResData: {
  249. immediate: true,
  250. handler(val) {
  251. if (val.length) {
  252. this.initDefVal()
  253. }
  254. }
  255. },
  256. // modelValue(val) {
  257. // if (this.multiple && val && val.length > 0) {
  258. // this.currentArr = val
  259. // if (!this.current) {
  260. // this.current = []
  261. // }
  262. // val.forEach(item => {
  263. // let current = this.filterMixinDatacomResData.find(e =>
  264. // e[this.dataValue] == item
  265. // )
  266. // this.current.push(current)
  267. // })
  268. // } else {
  269. // if (val) {
  270. // this.current = this.formatItemName(this.filterMixinDatacomResData.find(e =>
  271. // e[this.dataValue] == val
  272. // ))
  273. // }
  274. // }
  275. // },
  276. // value(val) {
  277. // if (this.multiple && val && val.length > 0) {
  278. // this.currentArr = val
  279. // if (!this.current) {
  280. // this.current = []
  281. // }
  282. // val.forEach(item => {
  283. // let current = this.filterMixinDatacomResData.find(e =>
  284. // e[this.dataValue] == item
  285. // )
  286. // this.current.push(current)
  287. // })
  288. // } else {
  289. // if (val) {
  290. // this.current = this.formatItemName(this.filterMixinDatacomResData.find(e =>
  291. // e[this.dataValue] == val
  292. // ))
  293. // }
  294. // }
  295. // }
  296. },
  297. methods: {
  298. debounce(fn, time = 100) {
  299. let timer = null
  300. return function(...args) {
  301. if (timer) clearTimeout(timer)
  302. timer = setTimeout(() => {
  303. fn.apply(this, args)
  304. }, time)
  305. }
  306. },
  307. // 执行数据库查询
  308. query() {
  309. this.mixinDatacomEasyGet();
  310. },
  311. // 监听查询条件变更事件
  312. onMixinDatacomPropsChange() {
  313. if (this.collection) {
  314. this.debounceGet();
  315. }
  316. },
  317. initDefVal() {
  318. let defValue = ''
  319. if ((this.valueCom || this.valueCom === 0) && !this.isDisabled(this.valueCom)) {
  320. defValue = this.valueCom
  321. } else {
  322. let strogeValue
  323. if (this.collection) {
  324. strogeValue = this.getCache()
  325. }
  326. if (strogeValue || strogeValue === 0) {
  327. defValue = strogeValue
  328. } else {
  329. let defItem = ''
  330. if (this.defItem > 0 && this.defItem <= this.mixinDatacomResData.length) {
  331. defItem = this.mixinDatacomResData[this.defItem - 1][this.dataValue]
  332. }
  333. defValue = defItem
  334. }
  335. if (defValue || defValue === 0) {
  336. this.emit(defValue)
  337. }
  338. }
  339. if (this.multiple) {
  340. this.current = []
  341. defValue.forEach(item => {
  342. let current = this.filterMixinDatacomResData.find(e =>
  343. e[this.dataValue] == item
  344. )
  345. this.current.push(current)
  346. })
  347. } else {
  348. const def = this.mixinDatacomResData.find(item => item[this.dataValue] === defValue)
  349. this.current = def ? this.formatItemName(def) : ''
  350. }
  351. },
  352. /**
  353. * @param {[String, Number]} value
  354. * 判断用户给的 value 是否同时为禁用状态
  355. */
  356. isDisabled(value) {
  357. let isDisabled = false;
  358. this.mixinDatacomResData.forEach(item => {
  359. if (item[this.dataValue] === value) {
  360. isDisabled = item.disable
  361. }
  362. })
  363. return isDisabled;
  364. },
  365. clearVal() {
  366. if (this.multiple) {
  367. this.current = []
  368. this.currentArr = []
  369. this.emit([])
  370. } else {
  371. this.current = ""
  372. this.currentArr = []
  373. this.emit('')
  374. }
  375. if (this.collection) {
  376. this.removeCache()
  377. }
  378. this.placeholderOld = this.placeholder
  379. },
  380. change(item) {
  381. if (!item.disable) {
  382. this.showSelector = false
  383. if (this.multiple) {
  384. if (!this.current) {
  385. this.current = []
  386. }
  387. if (!this.currentArr) {
  388. this.currentArr = []
  389. }
  390. if (this.currentArr.includes(item[this.dataValue])) {
  391. let index = this.current.findIndex(e => {
  392. return e[this.dataValue] == item[this.dataValue]
  393. })
  394. this.current.splice(index, 1)
  395. this.currentArr.splice(index, 1)
  396. this.emit(this.current)
  397. } else {
  398. this.current.push(item)
  399. this.currentArr.push(item[this.dataValue])
  400. this.emit(this.current)
  401. }
  402. } else {
  403. this.current = this.formatItemName(item)
  404. this.emit(item[this.dataValue])
  405. }
  406. }
  407. },
  408. delItem(item) {
  409. if (this.currentArr.includes(item[this.dataValue])) {
  410. let index = this.current.findIndex(e => {
  411. return e[this.dataValue] == item[this.dataValue]
  412. })
  413. this.current.splice(index, 1)
  414. this.currentArr.splice(index, 1)
  415. this.emit(this.current)
  416. }
  417. },
  418. emit(val) {
  419. this.$emit('change', val)
  420. if (this.multiple) {
  421. this.$emit('input', this.currentArr)
  422. this.$emit('update:modelValue', this.currentArr)
  423. } else {
  424. this.$emit('input', val)
  425. this.$emit('update:modelValue', val)
  426. }
  427. if (this.collection) {
  428. this.setCache(val);
  429. }
  430. },
  431. toggleSelector() {
  432. if (this.disabled) {
  433. return
  434. }
  435. if (this.filterable && this.current && this.mixinDatacomResData.findIndex(e => {
  436. return e[this.dataKey] == this
  437. .current
  438. }) < 0) {
  439. this.current = ""
  440. }
  441. this.showSelector = !this.showSelector
  442. if (this.filterable && this.current && this.showSelector) {
  443. this.placeholderOld = this.current
  444. this.current = ""
  445. } else if (this.filterable && !this.current && !this.showSelector) {
  446. if (this.placeholderOld != this.placeholder) {
  447. this.current = this.placeholderOld
  448. }
  449. }
  450. },
  451. formatItemName(item) {
  452. if (!item) {
  453. return ""
  454. }
  455. let text = item[this.dataKey]
  456. let value = item[this.dataValue]
  457. let {
  458. channel_code
  459. } = item
  460. channel_code = channel_code ? `(${channel_code})` : ''
  461. if (this.format) {
  462. // 格式化输出
  463. let str = "";
  464. str = this.format;
  465. for (let key in item) {
  466. str = str.replace(new RegExp(`{${key}}`, "g"), item[key]);
  467. }
  468. return str;
  469. } else {
  470. return this.collection.indexOf('app-list') > 0 ?
  471. `${text}(${value})` :
  472. (
  473. text ?
  474. text :
  475. `未命名${channel_code}`
  476. )
  477. }
  478. },
  479. // 获取当前加载的数据
  480. getLoadData() {
  481. return this.mixinDatacomResData;
  482. },
  483. // 获取当前缓存key
  484. getCurrentCacheKey() {
  485. return this.collection;
  486. },
  487. // 获取缓存
  488. getCache(name = this.getCurrentCacheKey()) {
  489. let cacheData = uni.getStorageSync(this.cacheKey) || {};
  490. return cacheData[name];
  491. },
  492. // 设置缓存
  493. setCache(value, name = this.getCurrentCacheKey()) {
  494. let cacheData = uni.getStorageSync(this.cacheKey) || {};
  495. cacheData[name] = value;
  496. uni.setStorageSync(this.cacheKey, cacheData);
  497. },
  498. // 删除缓存
  499. removeCache(name = this.getCurrentCacheKey()) {
  500. let cacheData = uni.getStorageSync(this.cacheKey) || {};
  501. delete cacheData[name];
  502. uni.setStorageSync(this.cacheKey, cacheData);
  503. },
  504. }
  505. }
  506. </script>
  507. <style lang="scss">
  508. $uni-base-color: #6a6a6a !default;
  509. $uni-main-color: #333 !default;
  510. $uni-secondary-color: #909399 !default;
  511. $uni-border-3: #e5e5e5;
  512. /* #ifndef APP-NVUE */
  513. @media screen and (max-width: 500px) {
  514. .hide-on-phone {
  515. display: none;
  516. }
  517. }
  518. /* #endif */
  519. .uni-stat__select {
  520. display: flex;
  521. align-items: center;
  522. // padding: 15px;
  523. cursor: pointer;
  524. // width: 100%;
  525. flex: 1;
  526. box-sizing: border-box;
  527. }
  528. .uni-stat-box {
  529. width: 100%;
  530. flex: 1;
  531. }
  532. .uni-stat__actived {
  533. width: 100%;
  534. flex: 1;
  535. // outline: 1px solid #2979ff;
  536. }
  537. .uni-label-text {
  538. font-size: 14px;
  539. font-weight: bold;
  540. color: $uni-base-color;
  541. margin: auto 0;
  542. margin-right: 5px;
  543. }
  544. .uni-select {
  545. font-size: 14px;
  546. border: 1px solid $uni-border-3;
  547. box-sizing: border-box;
  548. border-radius: 4px;
  549. padding: 0 5px;
  550. padding-left: 10px;
  551. position: relative;
  552. /* #ifndef APP-NVUE */
  553. display: flex;
  554. user-select: none;
  555. /* #endif */
  556. flex-direction: row;
  557. align-items: center;
  558. border-bottom: solid 1px $uni-border-3;
  559. width: 100%;
  560. flex: 1;
  561. height: 35px;
  562. min-height: 35px;
  563. &--disabled {
  564. background-color: #f5f7fa;
  565. cursor: not-allowed;
  566. }
  567. }
  568. .uni-select__label {
  569. font-size: 16px;
  570. // line-height: 22px;
  571. min-height: 35px;
  572. height: 35px;
  573. padding-right: 10px;
  574. color: $uni-secondary-color;
  575. }
  576. .uni-select__input-box {
  577. height: 35px;
  578. position: relative;
  579. /* #ifndef APP-NVUE */
  580. display: flex;
  581. /* #endif */
  582. flex: 1;
  583. flex-direction: row;
  584. align-items: center;
  585. .tag-calss {
  586. font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif;
  587. font-weight: 400;
  588. -webkit-font-smoothing: antialiased;
  589. -webkit-tap-highlight-color: transparent;
  590. font-size: 12px;
  591. border: 1px solid #d9ecff;
  592. border-radius: 4px;
  593. white-space: nowrap;
  594. height: 24px;
  595. padding: 0 4px 0px 8px;
  596. line-height: 22px;
  597. box-sizing: border-box;
  598. margin: 2px 0 2px 6px;
  599. display: flex;
  600. max-width: 100%;
  601. align-items: center;
  602. background-color: #f4f4f5;
  603. border-color: #e9e9eb;
  604. color: #909399;
  605. .text {
  606. font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif;
  607. font-weight: 400;
  608. -webkit-font-smoothing: antialiased;
  609. -webkit-tap-highlight-color: transparent;
  610. font-size: 12px;
  611. white-space: nowrap;
  612. line-height: 22px;
  613. color: #909399;
  614. overflow: hidden;
  615. text-overflow: ellipsis;
  616. }
  617. }
  618. }
  619. .uni-select__input {
  620. flex: 1;
  621. font-size: 14px;
  622. height: 22px;
  623. line-height: 22px;
  624. }
  625. .uni-select__input-plac {
  626. font-size: 14px;
  627. color: $uni-secondary-color;
  628. }
  629. .uni-select__selector {
  630. /* #ifndef APP-NVUE */
  631. box-sizing: border-box;
  632. /* #endif */
  633. position: absolute;
  634. top: calc(100% + 12px);
  635. left: 0;
  636. width: 100%;
  637. background-color: #FFFFFF;
  638. border: 1px solid #EBEEF5;
  639. border-radius: 6px;
  640. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  641. z-index: 3;
  642. padding: 4px 0;
  643. }
  644. .uni-select__selector-scroll {
  645. /* #ifndef APP-NVUE */
  646. max-height: 200px;
  647. box-sizing: border-box;
  648. /* #endif */
  649. }
  650. .uni-select__selector-empty,
  651. .uni-select__selector-item {
  652. /* #ifndef APP-NVUE */
  653. display: flex;
  654. cursor: pointer;
  655. /* #endif */
  656. line-height: 35px;
  657. font-size: 14px;
  658. text-align: center;
  659. /* border-bottom: solid 1px $uni-border-3; */
  660. padding: 0px 10px;
  661. }
  662. .uni-select__selector-item:hover {
  663. background-color: #f9f9f9;
  664. }
  665. .uni-select__selector-empty:last-child,
  666. .uni-select__selector-item:last-child {
  667. /* #ifndef APP-NVUE */
  668. border-bottom: none;
  669. /* #endif */
  670. }
  671. .uni-select__selector__disabled {
  672. opacity: 0.4;
  673. cursor: default;
  674. }
  675. /* picker 弹出层通用的指示小三角 */
  676. .uni-popper__arrow,
  677. .uni-popper__arrow::after {
  678. position: absolute;
  679. display: block;
  680. width: 0;
  681. height: 0;
  682. border-color: transparent;
  683. border-style: solid;
  684. border-width: 6px;
  685. }
  686. .uni-popper__arrow {
  687. filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
  688. top: -6px;
  689. left: 10%;
  690. margin-right: 3px;
  691. border-top-width: 0;
  692. border-bottom-color: #EBEEF5;
  693. }
  694. .uni-popper__arrow::after {
  695. content: " ";
  696. top: 1px;
  697. margin-left: -6px;
  698. border-top-width: 0;
  699. border-bottom-color: #fff;
  700. }
  701. .uni-select__input-text {
  702. // width: 280px;
  703. width: 100%;
  704. color: $uni-main-color;
  705. white-space: nowrap;
  706. text-overflow: ellipsis;
  707. -o-text-overflow: ellipsis;
  708. overflow: hidden;
  709. }
  710. .uni-select__input-placeholder {
  711. color: $uni-base-color;
  712. font-size: 12px;
  713. }
  714. .uni-select--mask {
  715. position: fixed;
  716. top: 0;
  717. bottom: 0;
  718. right: 0;
  719. left: 0;
  720. }
  721. </style>