my_form.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770
  1. <template>
  2. <view>
  3. <view class="head" v-if="requiredFieldOnly">
  4. <view class="label">
  5. 基本信息
  6. </view>
  7. <view class="content">
  8. 仅显示必填信息<text style="padding: 0 2.5px;" /> <u-switch activeColor="#C40C24" v-model="unShowAll" />
  9. </view>
  10. </view>
  11. <slot name="head" />
  12. <block v-for="(item, index) in list " :key="item.key">
  13. <block v-if="item.isMust || !unShowAll">
  14. <!-- 文本输入 -->
  15. <view class="input-box" v-if="item.type == 'text'"
  16. :style="{ marginTop: tovw(item.marginTop || 0), opacity: item.disabled ? 0.7 : 1 }"
  17. @click="focusLabel = item.label">
  18. <view class="box" :class="item.unBorBot ? '' : 'borBot'">
  19. <view class="label">
  20. <text class="must" v-if="item.isMust">*</text>
  21. {{ item.label }}:
  22. </view>
  23. <view class="content-box">
  24. <view class="content">
  25. <input v-if="item.inputmode == 'number'" type="number" :disabled="item.disabled"
  26. placeholder-style="color: #BBBBBB;font-family: Source Han Sans SC, Source Han Sans SC;"
  27. :focus="focusLabel == item.label" :placeholder="item.placeholder || '请填写' + item.label"
  28. :value="item.value" :style="{ width: item.value ? '220px' : '240px' }"
  29. @input="onInput($event, index)" :maxlength="item.maxlength || '499'"
  30. confirm-type="done" />
  31. <input v-else-if="item.inputmode == 'digit'" type="digit" :disabled="item.disabled"
  32. placeholder-style="color: #BBBBBB;font-family: Source Han Sans SC, Source Han Sans SC;"
  33. :focus="focusLabel == item.label" :placeholder="item.placeholder || '请填写' + item.label"
  34. :value="item.value" :style="{ width: item.value ? '220px' : '240px' }"
  35. @input="onInput($event, index)" :maxlength="item.maxlength || '499'"
  36. confirm-type="done" />
  37. <textarea v-else :disabled="item.disabled"
  38. placeholder-style="color: #BBBBBB;font-family: Source Han Sans SC, Source Han Sans SC;"
  39. auto-height type="text" :focus="focusLabel == item.label"
  40. :placeholder="item.placeholder || '请填写' + item.label" :value="item.value"
  41. :style="{ width: item.value ? '220px' : '240px' }" @input="onInput($event, index)"
  42. :maxlength="item.maxlength || '499'" confirm-type="done" />
  43. <icon v-if="item.value && !item.disabled" class="icon" type="clear" size="3.733vw"
  44. @click="onClearInput(index)" />
  45. </view>
  46. <view v-if="item.errText" class="err-text">
  47. <icon class="icon" color="#E3041F" type="clear" size="2.733vw" />
  48. {{ item.errText }}
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. <!-- 文本域 -->
  54. <view class="textarea-box" v-else-if="item.type == 'textarea'">
  55. <textarea class="textarea" :class="item.unBorBot ? '' : 'borBot'" :disabled="item.disabled"
  56. placeholder-style="color: #BBBBBB;font-family: Source Han Sans SC, Source Han Sans SC;" type="text"
  57. :placeholder="item.placeholder || '请填写' + item.label" :value="item.value"
  58. @input="onInput($event, index)" :maxlength="item.maxlength || '499'" confirm-type="done" />
  59. </view>
  60. <!-- 自定义选项分类 -->
  61. <view class="custom-class-box" v-else-if="item.type == 'customClass'"
  62. :style="{ marginTop: tovw(item.marginTop || 0) }">
  63. <view class="head">
  64. <view class="label">
  65. <text class="must" v-if="item.isMust">*</text>
  66. {{ item.label }}
  67. </view>
  68. <view class="state">
  69. {{ item.isMultipleChoice ? '可多选' : '仅单选' }}
  70. </view>
  71. </view>
  72. <view class="options">
  73. <view class="option"
  74. :class="item.isMultipleChoice ? (item.value.includes(option.value) ? 'active' : '') : (item.value == option.value ? 'active' : '')"
  75. v-for=" option in item.list " :key="option.value" hover-class="navigator-hover"
  76. @click="changOptions(option.value, index)">
  77. {{ option.remarks }}
  78. </view>
  79. </view>
  80. </view>
  81. <!-- 选择所在地区 -->
  82. <picker class="region" @change="selectRegion($event, index)" mode='region' :disabled="item.disabled"
  83. :value="item.value" v-else-if="item.type == 'region'"
  84. :style="{ marginTop: tovw(item.marginTop || 0), opacity: item.disabled ? 0.7 : 1 }">
  85. <view class="box" :class="item.unBorBot ? '' : 'borBot'">
  86. <view class="label">
  87. <text class="must" v-if="item.isMust">*</text>
  88. {{ item.label }}:
  89. </view>
  90. <view class="content-box">
  91. <view class="value" v-if="item.value.length">
  92. {{ item.value.join(",") }}
  93. </view>
  94. <view v-else class="placeholder" hover-class="none">
  95. {{ item.placeholder || '请选择' + item.label }}
  96. </view>
  97. <view v-if="!item.disabled" class="iconfont icon-a-wodetiaozhuan" />
  98. </view>
  99. </view>
  100. </picker>
  101. <!-- 日期 -->
  102. <picker class="region" @change="selectRegion($event, index)" mode='date' :disabled="item.disabled"
  103. :value="item.value" v-else-if="item.type == 'date'"
  104. :style="{ marginTop: tovw(item.marginTop || 0), opacity: item.disabled ? 0.7 : 1 }">
  105. <view class="box" :class="item.unBorBot ? '' : 'borBot'">
  106. <view class="label">
  107. <text class="must" v-if="item.isMust">*</text>
  108. {{ item.label }}:
  109. </view>
  110. <view class="content-box">
  111. <view class="value" v-if="item.value">
  112. {{ item.value }}
  113. </view>
  114. <view v-else class="placeholder" hover-class="none">
  115. {{ item.placeholder || '请选择' + item.label }}
  116. </view>
  117. <view v-if="!item.disabled" class="iconfont icon-a-wodetiaozhuan" />
  118. </view>
  119. </view>
  120. </picker>
  121. <!-- 上传附件 -->
  122. <view class="custom-class-box" v-else-if="item.type == 'upload'"
  123. :style="{ marginTop: tovw(item.marginTop || 0) }">
  124. <view class="head">
  125. <view class="label">
  126. <text class="must" v-if="item.isMust">*</text>
  127. {{ item.label }}
  128. </view>
  129. <view class="state">
  130. {{ item.placeholder }}
  131. </view>
  132. </view>
  133. <view class="content">
  134. <view class="file-box" v-for="file in item.value" :key="file.attachmentid">
  135. <image class="image" v-if="file.fileType == 'image'" :src="file.url" mode="aspectFill"
  136. lazy-load="true" @click="previewImg(file)" />
  137. <video v-else-if="file.fileType == 'video'" class="video" :poster="file.subfiles[0].url"
  138. :src="file.url" />
  139. <image class="delete" @click.stop="deleteFile(file, index)"
  140. src="https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202404241713944430197B47af9b2f.png"
  141. mode="widthFix" />
  142. </view>
  143. <My_upload v-if="item.allowUpload" :showLoading="false" :accept="item.accept"
  144. @uploadCallback="uploadCallback($event, index)" @onLoading="onUploadLoading($event, index)">
  145. <view class="upload-box" hover-class="navigator-hover">
  146. <u-loading-icon v-if="item.loading" />
  147. <text v-else class="iconfont icon-xiazai" />
  148. <text style="margin-left: 5px;">上传</text>
  149. </view>
  150. </My_upload>
  151. </view>
  152. </view>
  153. <!-- 开关 -->
  154. <view class="region" v-else-if="item.type == 'switch'">
  155. <view class="box" :class="item.unBorBot ? '' : 'borBot'">
  156. <view class="label">
  157. <text class="must" v-if="item.isMust">*</text>
  158. {{ item.label }}:
  159. </view>
  160. <view class="content-box">
  161. <view />
  162. <u-switch activeColor="#70D95D" v-model="item.value" :disabled="item.disabled"
  163. @change="switchChange($event, index)" />
  164. </view>
  165. </view>
  166. </view>
  167. <!-- 性别 -->
  168. <view class="region" v-else-if="item.type == 'sex'">
  169. <view class="box" :class="item.unBorBot ? '' : 'borBot'">
  170. <view class="label">
  171. <text class="must" v-if="item.isMust">*</text>
  172. {{ item.label }}:
  173. </view>
  174. <u-radio-group v-model="item.value" placement="row" @change="groupChange($event, index)">
  175. <u-radio :customStyle="{ marginRight: tovw(60) }" label="男" name="男" />
  176. <u-radio label="女" name="女" />
  177. </u-radio-group>
  178. </view>
  179. </view>
  180. <!-- 日期 -->
  181. <view class="region" @change="selectRegion($event, index)" v-else-if="item.type == 'route'"
  182. :style="{ marginTop: tovw(item.marginTop || 0), opacity: item.disabled ? 0.7 : 1 }"
  183. @click="item.disabled ? '' : toRoute(item, index)">
  184. <view class="box" :class="item.unBorBot ? '' : 'borBot'">
  185. <view class="label">
  186. <text class="must" v-if="item.isMust">*</text>
  187. {{ item.label }}:
  188. </view>
  189. <view class="content-box">
  190. <view class="value" v-if="item.value.length">
  191. {{ item.showValue.join(",") }}
  192. </view>
  193. <view v-else class="placeholder" hover-class="none">
  194. {{ item.placeholder || '请选择' + item.label }}
  195. </view>
  196. <view v-if="!item.disabled" class="iconfont icon-a-wodetiaozhuan" />
  197. </view>
  198. </view>
  199. </view>
  200. </block>
  201. </block>
  202. </view>
  203. </template>
  204. <script>
  205. import { formattedFiles, viewImage } from "../utils/settleFiles.js"
  206. export default {
  207. name: "my_form",
  208. props: {
  209. form: {
  210. type: Array,
  211. default: []
  212. },
  213. isUncomplete: {
  214. type: Function
  215. },
  216. onUploading: {
  217. type: Function
  218. },
  219. requiredFieldOnly: {
  220. type: Boolean
  221. },
  222. isShowAll: {
  223. type: Function
  224. },
  225. interrupt: {
  226. type: Function
  227. }
  228. },
  229. data() {
  230. return {
  231. list: [],
  232. focusLabel: "",
  233. unShowAll: false,
  234. }
  235. },
  236. watch: {
  237. form: {
  238. handler: function (newVal) {
  239. if (newVal) {
  240. this.list = JSON.parse(JSON.stringify(newVal));
  241. setTimeout(() => {
  242. this.verify()
  243. }, 200);
  244. }
  245. },
  246. immediate: true,
  247. },
  248. unShowAll: function (newVal) {
  249. this.$emit("isShowAll", newVal)
  250. }
  251. },
  252. async created() {
  253. /* let list = [{
  254. key: "name",
  255. type: "text",
  256. label: "标题",
  257. isMust: true,//是否必填
  258. value: "",
  259. inputmode:"", //https://uniapp.dcloud.net.cn/component/input.html#type
  260. marginTop: 10,
  261. verify:[],
  262. }, {
  263. key: "Class",
  264. type: "customClass",
  265. label: "标题",
  266. isMust: false,//是否必填
  267. isMultipleChoice: true,//是否多选
  268. value: [],// 多选[] 单选 ""
  269. isMust: true,//是否必填
  270. list: await this.getCustomClass('picturespace'),
  271. marginTop: 10
  272. },{
  273. key: "attachmentids",
  274. type: "upload",
  275. label: "图片/视频",
  276. accept:"all",
  277. placeholder: "可上传多个视频或图片",
  278. ownertable: "temporary",
  279. ownerid: 999,
  280. usetype: 'default',
  281. allowUpload: true,
  282. allowDelete: true,
  283. value:[],
  284. marginTop: 10
  285. }, {
  286. key: "region",
  287. type: "region",
  288. label: "所在地区",
  289. isMust: true,//是否必填
  290. value: [],
  291. }, {
  292. key: "address",
  293. type: "textarea",
  294. label: "详细地址",
  295. isMust: true,//是否必填
  296. value: '',
  297. }, {
  298. key: "isdefault",
  299. type: "switch",
  300. label: "设为默认地址",
  301. isMust: false,//是否必填
  302. value: false,
  303. isNum: true,
  304. unBorBot: true
  305. }] */
  306. },
  307. methods: {
  308. toRoute(item, index) {
  309. uni.navigateTo({
  310. url: item.path
  311. });
  312. this.$Http.routeSelected = function (selected) {
  313. this.$emit('interrupt', item, selected, index)
  314. delete this.$Http.routeSelected;
  315. }.bind(this)
  316. },
  317. onInput(e, index) {
  318. let item = this.list[index];
  319. item.errText = "";
  320. this.$set(this.list[index], 'value', e.detail.value)
  321. if (item.verify && item.verify.length && item.value != '') {
  322. let err = item.verify.find(r => !new RegExp(r.reg).test(item.value));
  323. if (err) this.$set(this.list[index], 'errText', err.errText)
  324. }
  325. this.verify()
  326. },
  327. setItem(index, item, back = false) {
  328. this.$set(this.list, index, item)
  329. this.verify()
  330. if (back) uni.navigateBack();
  331. },
  332. setValue(index, value, back = false) {
  333. this.$set(this.list[index], 'value', value)
  334. this.verify()
  335. if (back) uni.navigateBack();
  336. },
  337. onClearInput(index) {
  338. let item = this.list[index];
  339. item.errText = ''
  340. this.$set(this.list[index], 'value', '')
  341. this.verify()
  342. },
  343. switchChange(e, index) {
  344. this.$set(this.list[index], 'value', e)
  345. this.verify()
  346. },
  347. changOptions(value, index) {
  348. let item = this.list[index];
  349. if (item.isMultipleChoice) {
  350. let i = -1;
  351. try {
  352. i = item.value.findIndex(v => v == value)
  353. } catch (error) {
  354. }
  355. if (i == -1) {
  356. item.value.push(value)
  357. } else {
  358. item.value.splice(i, 1)
  359. }
  360. this.$set(this.list[index], 'value', item.value)
  361. } else {
  362. this.$set(this.list[index], 'value', value)
  363. }
  364. this.verify()
  365. },
  366. verify() {
  367. let list = this.list.filter(v => v.isMust);
  368. let Uncomplete = false;
  369. if (list.length) Uncomplete = list.some(v => {
  370. let res = false;
  371. if (v.type == 'customClass') {
  372. if (v.isMultipleChoice) {
  373. res = v.value.length == 0;
  374. } else {
  375. res = v.value == "";
  376. }
  377. } else if (v.type == 'upload') {
  378. res = v.value.length == 0;
  379. } else if (v.type == 'text') {
  380. res = v.value == "";
  381. if (v.errText) res = true;
  382. } else {
  383. res = v.value == "";
  384. }
  385. return res
  386. })
  387. if (!Uncomplete) Uncomplete = this.list.filter(v => !v.isMust).some(v => v.errText);
  388. this.$emit("isUncomplete", Uncomplete)
  389. },
  390. previewImg(item) {
  391. viewImage(item.url)
  392. },
  393. uploadCallback(attachmentids, index) {
  394. let item = this.list[index];
  395. this.$Http.basic({
  396. "classname": "system.attachment.Attachment",
  397. "method": "createFileLink",
  398. "content": {
  399. ownertable: item.ownertable,
  400. ownerid: item.ownerid,
  401. usetype: item.usetype,
  402. attachmentids
  403. }
  404. }).then(res => {
  405. console.log('绑定附件', res)
  406. if (this.cutoff(res.msg)) return;
  407. res.data = formattedFiles(res.data)
  408. item.value.push(res.data[0]);
  409. //临时文件
  410. if (res.data[0].ownertable == "temporary") try {
  411. item.temporarys.push(attachmentids[0])
  412. } catch (error) {
  413. item.temporarys = [attachmentids[0]]
  414. }
  415. this.$set(this.list[index], 'value', item.value)
  416. this.verify()
  417. })
  418. },
  419. deleteFiles() {
  420. this.list.forEach(v => {
  421. if (v.type == 'upload') {
  422. let linksids = v.value.filter(v => v.ownertable == "temporary").map(v => v.linksid)
  423. if (linksids.length) this.$Http.basic({
  424. "classname": "system.attachment.Attachment",
  425. "method": "deleteFileLink",
  426. "content": {
  427. linksids
  428. }
  429. }).then(res => {
  430. console.log("处理删除附件", res)
  431. if (this.cutoff(res.msg)) return;
  432. });
  433. }
  434. });
  435. },
  436. onUploadLoading(e, index) {
  437. this.$set(this.list[index], 'loading', e)
  438. this.$emit("onUploading", e)
  439. },
  440. groupChange(e, index) {
  441. this.$set(this.list[index], 'loading', e)
  442. this.verify()
  443. },
  444. selectRegion({ detail }, index) {
  445. this.$set(this.list[index], 'value', detail.value)
  446. this.verify()
  447. },
  448. deleteFile(flie, index) {
  449. let item = this.list[index];
  450. item.value = item.value.filter(v => v.attachmentid != flie.attachmentid)
  451. //临时文件
  452. if (flie.ownertable == "temporary") {
  453. item.temporarys = item.temporarys.filter(v => v != flie.attachmentid)
  454. this.$Http.basic({
  455. "classname": "system.attachment.Attachment",
  456. "method": "deleteFileLink",
  457. "content": {
  458. linksids: [flie.linksid]
  459. }
  460. }).then(res => {
  461. console.log("处理删除附件", res)
  462. if (this.cutoff(res.msg)) return;
  463. });
  464. } else {
  465. try {
  466. item.linksids.push(flie.linksid)
  467. } catch (error) {
  468. item.linksids = [flie.linksid]
  469. }
  470. }
  471. this.$set(this.list[index], 'value', item.value)
  472. this.verify()
  473. },
  474. submit() {
  475. return new Promise((resolve, reject) => {
  476. let res = {};
  477. this.list.forEach(v => {
  478. if (v.type == 'upload') {
  479. res.files = {
  480. temporarys: [],
  481. linksids: [],
  482. }
  483. try {
  484. res.files.temporarys = v.temporarys || []
  485. } catch (error) {
  486. }
  487. try {
  488. res.files.linksids = v.linksids || []
  489. } catch (error) {
  490. }
  491. } else if (v.type == 'region') {
  492. if (v.value.length) {
  493. res.province = v.value[0];
  494. res.city = v.value[1];
  495. res.county = v.value[2];
  496. } else {
  497. res.province = ''
  498. res.city = ''
  499. res.county = ''
  500. }
  501. } else if (v.type == 'switch') {
  502. if (v.isNum) {
  503. res[v.key] = v.value ? 1 : 0;
  504. } else {
  505. res[v.key] = v.value;
  506. }
  507. } else {
  508. try {
  509. res[v.key] = v.value.trim();
  510. } catch (error) {
  511. res[v.key] = v.value;
  512. }
  513. }
  514. })
  515. resolve(res)
  516. })
  517. }
  518. },
  519. }
  520. </script>
  521. <style lang="scss">
  522. .head {
  523. display: flex;
  524. align-items: center;
  525. justify-content: space-between;
  526. width: 100vw;
  527. height: 45px;
  528. background: #F7F7F7;
  529. padding: 0 10px;
  530. box-sizing: border-box;
  531. .label {
  532. font-family: PingFang SC, PingFang SC;
  533. font-weight: bold;
  534. font-size: 15px;
  535. color: #333333;
  536. line-height: 22px;
  537. }
  538. .content {
  539. display: flex;
  540. align-items: center;
  541. font-family: PingFang SC, PingFang SC;
  542. font-size: 14px;
  543. color: #999999;
  544. }
  545. }
  546. .borBot {
  547. border-bottom: 1px #DDDDDD solid;
  548. }
  549. .custom-class-box {
  550. width: 100%;
  551. background: #fff;
  552. padding: 15px 0 15px 10px;
  553. box-sizing: border-box;
  554. .head {
  555. width: 355px;
  556. height: 20px;
  557. display: flex;
  558. justify-content: space-between;
  559. align-items: flex-end;
  560. .label {
  561. font-size: 14px;
  562. color: #333333;
  563. line-height: 20px;
  564. }
  565. .state {
  566. font-family: Source Han Sans SC, Source Han Sans SC;
  567. font-size: 12px;
  568. color: #999999;
  569. }
  570. }
  571. .options {
  572. display: flex;
  573. flex-wrap: wrap;
  574. .option {
  575. padding: 6px 10px;
  576. text-align: center;
  577. min-width: 81px;
  578. font-family: PingFang SC, PingFang SC;
  579. font-size: 14px;
  580. color: #333333;
  581. border-radius: 5px;
  582. background: #F2F2F2;
  583. margin-top: 10px;
  584. margin-right: 10px;
  585. box-sizing: border-box;
  586. }
  587. .active {
  588. background: #C30D23;
  589. color: #fff;
  590. }
  591. }
  592. .content {
  593. .file-box {
  594. position: relative;
  595. width: 355px;
  596. height: 240px;
  597. margin-top: 10px;
  598. .video,
  599. .image {
  600. width: 355px;
  601. height: 240px;
  602. border-radius: 5px;
  603. }
  604. .delete {
  605. position: absolute;
  606. width: 30px;
  607. top: 0;
  608. right: 0;
  609. z-index: 1;
  610. }
  611. }
  612. .upload-box {
  613. display: flex;
  614. justify-content: center;
  615. align-items: center;
  616. width: 355px;
  617. height: 45px;
  618. background: #FFFFFF;
  619. border-radius: 5px;
  620. border: 1px dashed #C30D23;
  621. font-family: Source Han Sans SC, Source Han Sans SC;
  622. font-size: 14px;
  623. color: #C30D23;
  624. margin-top: 10px;
  625. }
  626. }
  627. }
  628. .textarea-box {
  629. width: 100%;
  630. .textarea {
  631. width: 355px;
  632. height: 160px;
  633. padding: 15px 10px;
  634. box-sizing: border-box;
  635. margin: 0 auto;
  636. }
  637. }
  638. .input-box {
  639. width: 100vw;
  640. background: #fff;
  641. box-sizing: border-box;
  642. padding-left: 10px;
  643. .box {
  644. display: flex;
  645. width: 100%;
  646. min-height: 54.4px;
  647. padding: 15px 0;
  648. box-sizing: border-box;
  649. align-items: center;
  650. }
  651. .label {
  652. width: 100px;
  653. margin-right: 10px;
  654. line-height: 20px;
  655. font-family: Source Han Sans SC, Source Han Sans SC;
  656. font-size: 14px;
  657. color: #666666;
  658. flex-shrink: 0;
  659. .must {
  660. color: #E3041F;
  661. margin-right: 5px;
  662. }
  663. }
  664. .content-box {
  665. padding-right: 10px;
  666. .content {
  667. flex: 1;
  668. display: flex;
  669. align-items: center;
  670. box-sizing: border-box;
  671. .icon {
  672. padding: 5px;
  673. }
  674. }
  675. .err-text {
  676. font-size: 12px;
  677. color: #E3041F;
  678. margin-bottom: -12px;
  679. .icon {
  680. margin-right: 2px;
  681. }
  682. }
  683. }
  684. }
  685. .region {
  686. width: 100vw;
  687. background: #fff;
  688. box-sizing: border-box;
  689. padding: 15px 0 0 10px;
  690. .box {
  691. display: flex;
  692. padding-bottom: 15px;
  693. padding-right: 10px;
  694. box-sizing: border-box;
  695. .label {
  696. width: 100px;
  697. margin-right: 10px;
  698. line-height: 20px;
  699. font-family: Source Han Sans SC, Source Han Sans SC;
  700. font-size: 14px;
  701. color: #666666;
  702. flex-shrink: 0;
  703. .must {
  704. color: #E3041F;
  705. margin-right: 5px;
  706. }
  707. }
  708. .content-box {
  709. flex: 1;
  710. display: flex;
  711. align-items: center;
  712. justify-content: space-between;
  713. height: 20px;
  714. line-height: 20px;
  715. .placeholder {
  716. font-family: Source Han Sans SC, Source Han Sans SC;
  717. font-size: 14px;
  718. color: #BBBBBB;
  719. }
  720. }
  721. }
  722. }
  723. </style>