当前位置:   article > 正文

uni-file-picker进行图片上传,回显的时候可以删除_uniapp uni-file-picker 删除图片

uniapp uni-file-picker 删除图片

  1. <template>
  2. <view class="viewport">
  3. <!-- 上 -->
  4. <view class="top-box">
  5. <!-- tab -->
  6. <view class="tabs">
  7. <text
  8. v-for="(item, index) in tabArr"
  9. :key="item.id"
  10. class="text"
  11. :class="{ active: index === activeIndex }"
  12. @tap="handleClickTab(item, index)"
  13. >{{ item.title }}</text
  14. >
  15. </view>
  16. <!-- tab的scroll-view -->
  17. <scroll-view
  18. v-for="(val, index) in tabArr"
  19. :key="val.id"
  20. v-show="activeIndex === index"
  21. :scroll-y="true"
  22. class="scroll-view"
  23. >
  24. <view v-show="activeIndex === 0" class="base-box">
  25. <uni-section title="基本信息核对"></uni-section>
  26. <view class="base-text-box">
  27. <view>姓名:{{ itemData?.applyName }}</view>
  28. <view>性别:{{ changeSex(itemData?.sex) }}</view>
  29. <view>年龄:{{ itemData?.age }}</view>
  30. <view>
  31. <text>现居住地址:</text>
  32. <text>{{ itemData?.address }}</text>
  33. </view>
  34. </view>
  35. </view>
  36. <view v-show="activeIndex === 1" class="contract-content-box">
  37. <!-- 新增按钮 -->
  38. <view class="new-add-btn">
  39. <u-button type="primary" shape="square" text="新增" @click="addNewData"></u-button>
  40. </view>
  41. <!-- 列表 -->
  42. <view class="item-wrap">
  43. <view class="item-box" v-for="item in remodelProductArr" :key="item.id">
  44. <view class="item-content">
  45. <view class="product-title">
  46. <text style="margin-right: 20rpx">产品名称</text>
  47. </view>
  48. <view class="product-content">
  49. <text style="margin-right: 20rpx">{{ item?.name }}</text>
  50. </view>
  51. </view>
  52. <view class="item-content">
  53. <view class="product-title">
  54. <text style="margin-right: 20rpx">单价(元)</text>
  55. </view>
  56. <view class="product-content">
  57. <text style="margin-right: 20rpx">{{ item?.unitPrice }}</text>
  58. </view>
  59. </view>
  60. <view class="item-content">
  61. <view class="product-title">
  62. <text style="margin-right: 20rpx">数量</text>
  63. </view>
  64. <view class="product-content">
  65. <text style="margin-right: 20rpx">{{ item?.number }}</text>
  66. </view>
  67. </view>
  68. <view class="item-content">
  69. <view class="product-title">
  70. <text style="margin-right: 20rpx">总价(元)</text>
  71. </view>
  72. <view class="product-content">
  73. <text style="margin-right: 20rpx; color: red">{{ item?.totalPrice }}</text>
  74. </view>
  75. </view>
  76. <view class="item-content">
  77. <view class="product-title">
  78. <text style="margin-right: 20rpx">施工单位</text>
  79. </view>
  80. <view class="product-content">
  81. <text style="margin-right: 20rpx">{{ item?.constructionUnit }}</text>
  82. </view>
  83. </view>
  84. <!-- 编辑-删除按钮 -->
  85. <view class="btn-box">
  86. <view class="look-more" @click="onClicKLookMore(item)">查看更多</view>
  87. <view class="btn-content-box">
  88. <view>
  89. <u-button
  90. type="success"
  91. shape="square"
  92. text="编辑"
  93. @click="onEdit(item)"
  94. ></u-button>
  95. </view>
  96. <view>
  97. <u-button
  98. type="error"
  99. shape="square"
  100. text="删除"
  101. @click="onDelete(item)"
  102. ></u-button>
  103. </view>
  104. </view>
  105. </view>
  106. </view>
  107. </view>
  108. </view>
  109. <view v-show="activeIndex === 2" class="service-plan-box">
  110. <uni-section title="改造前照片"></uni-section>
  111. <!-- 选择图片 -->
  112. <view class="before-img-box">
  113. <uni-file-picker
  114. @select="handleSelectImg"
  115. @delete="handleDeleteImg"
  116. :auto-upload="false"
  117. v-model="beforeImageValueArr"
  118. fileMediatype="image"
  119. mode="grid"
  120. limit="9"
  121. title="最多选择9张图片"
  122. ></uni-file-picker>
  123. </view>
  124. <uni-section title="改造后照片"></uni-section>
  125. <view class="before-img-box">
  126. <uni-file-picker
  127. v-model="afterImageValueArr"
  128. fileMediatype="image"
  129. mode="grid"
  130. @select="handleSelectImg2"
  131. @delete="handleDeleteImg2"
  132. limit="9"
  133. title="最多选择9张图片"
  134. ></uni-file-picker>
  135. </view>
  136. </view>
  137. </scroll-view>
  138. </view>
  139. <!-- 下 -->
  140. <view class="bottom-box">
  141. <view v-show="activeIndex === 1" class="bottom-price-box">
  142. <view class="item-content">
  143. <view class="product-title">
  144. <text style="margin-right: 20rpx">总价(元)</text>
  145. </view>
  146. <view class="product-content">
  147. <text style="margin-right: 20rpx; color: red">{{ itemData?.totalPrice }}</text>
  148. </view>
  149. </view>
  150. </view>
  151. <!-- 按钮-保存-提交 -->
  152. <view class="btn-box">
  153. <view class="btn-save">
  154. <u-button type="primary" shape="circle" text="保存" @click="onSave"></u-button>
  155. </view>
  156. <view class="btn-submit">
  157. <u-button
  158. color="#f59a23"
  159. type="primary"
  160. shape="circle"
  161. text="提交验收"
  162. @click="onSubmit"
  163. ></u-button>
  164. </view>
  165. </view>
  166. </view>
  167. </view>
  168. </template>
  169. <script setup lang="ts">
  170. import { onLoad, onReady, onShow } from "@dcloudio/uni-app"
  171. import { nextTick, ref } from "vue"
  172. import { getElderlyChangeDetailDataByIdAPI, deleteElderlyChangeDataAPI } from "@/services/change"
  173. // --------改造前-图片------------
  174. const beforeImageValueArr: any = ref([])
  175. const afterImageValueArr: any = ref([])
  176. const imgMain: any = ref([])
  177. // --------改造 临时图片数组------------
  178. const tempBeforeImageValueArr: any = ref([])
  179. const tempAfterImageValueArr: any = ref([])
  180. // -------适老化产品------------
  181. const remodelProductArr: any = ref([])
  182. // -------弹框--------------
  183. const isTankuang = ref(false)
  184. const tankuangTableData: any = ref([])
  185. // -------表格-----------
  186. const itemTableData: any = ref([])
  187. // 时间选择事件
  188. const qiandingDateClick = (e: any) => {
  189. console.log("点击时间改变事件:e", e)
  190. baseFormData.value.qiandingDate = e
  191. }
  192. const hetongStartDateClick = (e: any) => {
  193. console.log("点击时间改变事件:e", e)
  194. baseFormData.value.hetongStartDate = e
  195. }
  196. const hetongEndDateClick = (e: any) => {
  197. console.log("点击时间改变事件:e", e)
  198. baseFormData.value.hetongEndDate = e
  199. }
  200. // -----------表单---------------
  201. // 表单总数据
  202. const baseFormData = ref({
  203. hetongbianhao: "",
  204. qiandingshijian: "",
  205. hetongkaishishijian: "",
  206. hetongjieshushijian: "",
  207. jiafangxingming: "",
  208. jiafanglianxidianhua: "",
  209. jiafanglianxidizhi: "",
  210. yifangxingming: "",
  211. yifanglianxidianhua: "",
  212. yifanglianxidizhi: "",
  213. // 选择时间
  214. qiandingDate: "",
  215. hetongStartDate: "",
  216. hetongEndDate: "",
  217. })
  218. // -------------------
  219. // 高亮的下标
  220. const activeIndex = ref(2)
  221. // 老人id
  222. const peopleId = ref()
  223. // 详情
  224. const itemData = ref()
  225. const tabArr = ref([
  226. {
  227. id: 0,
  228. title: "基本信息",
  229. },
  230. {
  231. id: 1,
  232. title: "适老化产品",
  233. },
  234. {
  235. id: 2,
  236. title: "改造前后照片",
  237. },
  238. ])
  239. // 页面第1次加载生命周期
  240. onLoad((option) => {
  241. console.log(option, "<<<=== option 页面跳转-传递参数")
  242. peopleId.value = option!.itemDataId
  243. // 发请求拿到详细信息
  244. getList()
  245. })
  246. // 页面第1次全部渲染完毕后调用这个生命周期
  247. onReady(() => {})
  248. // 点击tab
  249. const handleClickTab = (item: any, index: any) => {
  250. console.log(item, "点击tab拿到的item")
  251. console.log(index, "点击tab拿到的index")
  252. activeIndex.value = index
  253. }
  254. // 将字典数据变成文字-性别
  255. const changeSex = (data: string) => {
  256. if (data === "0") {
  257. return ""
  258. } else if (data === "1") {
  259. return ""
  260. } else {
  261. return "未知"
  262. }
  263. }
  264. // 点击提交
  265. const onSubmit = () => {}
  266. // 点击服务频率
  267. const onClickServiceFrequency = (data: any, index: any) => {
  268. isTankuang.value = true
  269. console.log(data, "点击服务频率-data")
  270. tankuangTableData.value = data.serviceTimeList
  271. console.log(tankuangTableData.value, "tankuangTableData.value")
  272. }
  273. // 点击全局弹框的关闭icon
  274. const onClickCloseIcon = () => {
  275. isTankuang.value = false
  276. }
  277. // 点击保存按钮
  278. const onSave = () => {}
  279. // 点击新增按钮
  280. const addNewData = () => {
  281. // 跳转到新增页面
  282. uni.navigateTo({
  283. url:
  284. "/pages/change/add-edit?itemDataId=" + encodeURIComponent(JSON.stringify(itemData.value.id)),
  285. })
  286. }
  287. // ----------方法----------------
  288. // 拿数组数据
  289. const getList = () => {
  290. getElderlyChangeDetailDataByIdAPI(peopleId.value)
  291. .then((res: any) => {
  292. // console.log(res, "<<<=== res 改造 详细信息 请求成功")
  293. itemData.value = res.elderlyOrientedInfo
  294. // console.log(itemData.value, "<<<=== itemData 改造 详细信息")
  295. remodelProductArr.value = res.elderlyOrientedInfo.elderlyOrientedRemodelProductList
  296. // console.log(remodelProductArr.value, "<<<=== remodelProductArr 改造 产品列表")
  297. // 拿到改造前的图片数组
  298. tempBeforeImageValueArr.value = res.elderlyOrientedInfo.beforeElderlyRemodelGalleryList
  299. tempAfterImageValueArr.value = res.elderlyOrientedInfo.afterElderlyRemodelGalleryList
  300. // console.log(tempBeforeImageValueArr.value, "<<<=== tempBeforeImageValueArr 临时图片数组")
  301. // 对临时数组进行改造
  302. beforeImageValueArr.value = tempBeforeImageValueArr.value.map((item: any) => {
  303. return {
  304. extname: "",
  305. url: item.imgUrl,
  306. name: item.name,
  307. }
  308. })
  309. afterImageValueArr.value = tempAfterImageValueArr.value.map((item: any) => {
  310. return {
  311. extname: "",
  312. url: item.imgUrl,
  313. name: item.name,
  314. }
  315. })
  316. console.log(
  317. afterImageValueArr.value,
  318. "<<<=== afterImageValueArr 图片数组-数据改造后----->初始化",
  319. )
  320. console.log(
  321. beforeImageValueArr.value,
  322. "<<<=== beforeImageValueArr 图片数组-数据改造后----->初始化",
  323. )
  324. })
  325. .catch((error) => {
  326. console.log(error, "<<<=== error 请求失败")
  327. })
  328. }
  329. // 改造前-图片上传
  330. const handleSelectImg = (res: any) => {
  331. console.log("选择图片")
  332. // console.log(res, "点击上传图片-res")
  333. // console.log(res.tempFilePaths, "点击上传图片-e---tempFilePaths 数组")
  334. // 图片上传后,拿到临时文件路径,用uni.uploadFile方法上传
  335. const p = new Promise((resolve, reject) => {
  336. // 执行异步和同步代码
  337. uni.uploadFile({
  338. url: "/file/upload",
  339. name: "file",
  340. filePath: res.tempFilePaths[0],
  341. success: (res) => {
  342. // console.log(res, "<<<=== res 服务器返回的信息")
  343. if (res.statusCode === 200) {
  344. // 状态码为200,说明上传成功了
  345. const urlData = JSON.parse(res.data)
  346. resolve(urlData)
  347. // console.log(urlData, "<<<=== urlData 服务器返回的图片信息")
  348. // beforeImageValueArr.value.push({
  349. // url: urlData.data.url,
  350. // extname: "",
  351. // name: urlData.data.name,
  352. // })
  353. // console.log(beforeImageValueArr.value, "<<<=== beforeImageValueArr.value-图片数组1")
  354. // serviceBackImg.value = urlData.data.url
  355. // console.log(serviceBackImg.value, "<<<=== serviceBackImg.value 服务器返回的图片url")
  356. }
  357. },
  358. fail: (error) => {
  359. console.log(error, "<<<=== error 错误信息")
  360. reject(error)
  361. },
  362. })
  363. })
  364. p.then((res: any) => {
  365. console.log(res, "<<<=== res promise的实例对象-p")
  366. beforeImageValueArr.value.push({
  367. url: res.data.url,
  368. extname: "",
  369. name: res.data.name,
  370. })
  371. console.log(
  372. beforeImageValueArr.value,
  373. "<<<=== beforeImageValueArr 图片数组-----------> 异步处理后",
  374. )
  375. }).catch((error) => {
  376. console.log(error, "<<<=== error 错误信息")
  377. })
  378. }
  379. // 改造后-图片上传
  380. const handleSelectImg2 = (res: any) => {
  381. console.log("选择图片")
  382. // console.log(res, "点击上传图片-res")
  383. // console.log(res.tempFilePaths, "点击上传图片-e---tempFilePaths 数组")
  384. // 图片上传后,拿到临时文件路径,用uni.uploadFile方法上传
  385. const p = new Promise((resolve, reject) => {
  386. // 执行异步和同步代码
  387. uni.uploadFile({
  388. url: "/file/upload",
  389. name: "file",
  390. filePath: res.tempFilePaths[0],
  391. success: (res) => {
  392. // console.log(res, "<<<=== res 服务器返回的信息")
  393. if (res.statusCode === 200) {
  394. // 状态码为200,说明上传成功了
  395. const urlData = JSON.parse(res.data)
  396. resolve(urlData)
  397. // console.log(urlData, "<<<=== urlData 服务器返回的图片信息")
  398. // beforeImageValueArr.value.push({
  399. // url: urlData.data.url,
  400. // extname: "",
  401. // name: urlData.data.name,
  402. // })
  403. // console.log(beforeImageValueArr.value, "<<<=== beforeImageValueArr.value-图片数组1")
  404. // serviceBackImg.value = urlData.data.url
  405. // console.log(serviceBackImg.value, "<<<=== serviceBackImg.value 服务器返回的图片url")
  406. }
  407. },
  408. fail: (error) => {
  409. console.log(error, "<<<=== error 错误信息")
  410. reject(error)
  411. },
  412. })
  413. })
  414. p.then((res: any) => {
  415. console.log(res, "<<<=== res promise的实例对象-p")
  416. afterImageValueArr.value.push({
  417. url: res.data.url,
  418. extname: "",
  419. name: res.data.name,
  420. })
  421. console.log(
  422. afterImageValueArr.value,
  423. "<<<=== afterImageValueArr 图片数组-----------> 异步处理后",
  424. )
  425. }).catch((error) => {
  426. console.log(error, "<<<=== error 错误信息")
  427. })
  428. }
  429. // -----------删除图片--------------------
  430. const handleDeleteImg = (e: any) => {
  431. console.log(e, "<<<=== e 点击-删除图片")
  432. console.log(beforeImageValueArr.value, "<<<=== beforeImageValueArr 图片数组-----------> 删除后")
  433. const deleteItemName = e.tempFile.name
  434. // 根据名字找下标
  435. const index = beforeImageValueArr.value.findIndex((item: any) => {
  436. if (item.path) {
  437. console.log("进入本地")
  438. return item.url === e.tempFilePath
  439. }
  440. // if (!e.tempFile.url.startsWith("http://tmp")) {
  441. // console.log("进入本地")
  442. // return item.url === e.tempFilePath
  443. // }
  444. const one = item.name.split("_")
  445. // console.log(one, "<<<=== one 图片名字")
  446. const two = one[1].split(".")
  447. // console.log(two, "<<<=== two 图片名字")
  448. const wanzheng = one[0] + "." + two[1]
  449. console.log(wanzheng, "<<<=== wanzheng 图片名字")
  450. // console.log(item.name, "<<<=== item.name 查询名字")
  451. // console.log(deleteItemName, "<<<=== deleteItemName 删除的图片地址名字")
  452. return wanzheng === deleteItemName
  453. })
  454. console.log(index, "<<<=== index 删除的图片下标")
  455. beforeImageValueArr.value.splice(index, 1)
  456. console.log(
  457. beforeImageValueArr.value,
  458. "<<<=== beforeImageValueArr 图片数组-----------> 根据index 删除后",
  459. )
  460. }
  461. const handleDeleteImg2 = (e: any) => {
  462. console.log(e, "<<<=== e 点击-删除图片")
  463. console.log(afterImageValueArr.value, "<<<=== afterImageValueArr 图片数组-----------> 删除后")
  464. const deleteItemName = e.tempFile.name
  465. // 根据名字找下标
  466. const index = afterImageValueArr.value.findIndex((item: any) => {
  467. if (item.path) {
  468. console.log("进入本地")
  469. return item.url === e.tempFilePath
  470. }
  471. // if (!e.tempFile.url.startsWith("http://tmp")) {
  472. // console.log("进入本地")
  473. // return item.url === e.tempFilePath
  474. // }
  475. const one = item.name.split("_")
  476. // console.log(one, "<<<=== one 图片名字")
  477. const two = one[1].split(".")
  478. // console.log(two, "<<<=== two 图片名字")
  479. const wanzheng = one[0] + "." + two[1]
  480. console.log(wanzheng, "<<<=== wanzheng 图片名字")
  481. // console.log(item.name, "<<<=== item.name 查询名字")
  482. // console.log(deleteItemName, "<<<=== deleteItemName 删除的图片地址名字")
  483. return wanzheng === deleteItemName
  484. })
  485. console.log(index, "<<<=== index 删除的图片下标")
  486. afterImageValueArr.value.splice(index, 1)
  487. console.log(
  488. afterImageValueArr.value,
  489. "<<<=== afterImageValueArr 图片数组-----------> 根据index 删除后2",
  490. )
  491. }
  492. // 点击编辑按钮
  493. const onEdit = (data: any) => {
  494. console.log("onEdit -点击编辑按钮")
  495. console.log(data, "data -点击编辑--当前item的数据")
  496. // 跳转到编辑页面-和新增公用一个页面
  497. uni.navigateTo({
  498. url: "/pages/change/add-edit?editData=" + encodeURIComponent(JSON.stringify(data)),
  499. })
  500. }
  501. // 点击删除按钮
  502. const onDelete = (data: any) => {
  503. console.log("onDelete -点击删除按钮")
  504. console.log(data, "data -点击删除--当前item的数据")
  505. console.log([data.id], "data -点击删除--[data.homeBedApplyId]")
  506. deleteElderlyChangeDataAPI([data.id])
  507. .then((res: any) => {
  508. console.log(res, "<<<=== res 删除 请求成功")
  509. uni.showToast({
  510. title: "删除成功",
  511. icon: "success",
  512. duration: 1000,
  513. })
  514. setTimeout(() => {
  515. // 重新请求数据
  516. getList()
  517. }, 500)
  518. })
  519. .catch((error: any) => {
  520. console.log(error, "<<<=== error 请求失败")
  521. })
  522. }
  523. // 点击查看更多
  524. const onClicKLookMore = (data: any) => {
  525. console.log("onClicKLookMore -点击查看更多")
  526. console.log(data, "data -点击查看更多--当前item的数据")
  527. uni.navigateTo({
  528. url: "/pages/change/look-more?itemData=" + encodeURIComponent(JSON.stringify(data)),
  529. })
  530. }
  531. // -----------生命周期---------------
  532. onShow(() => {
  533. console.log("onShow 生命周期----当前页面显示在前台了")
  534. // getList()
  535. })
  536. </script>
  537. <style lang="scss">
  538. page {
  539. height: 100%;
  540. overflow: hidden;
  541. }
  542. .viewport {
  543. height: 100%;
  544. font-size: 14px;
  545. display: flex;
  546. flex-direction: column;
  547. justify-content: space-around;
  548. // background-color: #f2f2f2;
  549. // overflow: hidden;
  550. // position: relative;
  551. // border: 1px solid orangered;
  552. }
  553. .tabs {
  554. display: flex;
  555. justify-content: space-evenly;
  556. height: 100rpx;
  557. line-height: 90rpx;
  558. margin: 20rpx 20rpx 0rpx 20rpx;
  559. font-size: 28rpx;
  560. border-radius: 10rpx;
  561. box-shadow: 0 4rpx 5rpx rgba(200, 200, 200, 0.3);
  562. color: #333;
  563. background-color: #fff;
  564. position: relative;
  565. z-index: 9;
  566. .text {
  567. margin: 0 20rpx;
  568. position: relative;
  569. }
  570. .active {
  571. &::after {
  572. content: "";
  573. width: 40rpx;
  574. height: 4rpx;
  575. transform: translate(-50%);
  576. background-color: #27ba9b;
  577. position: absolute;
  578. left: 50%;
  579. bottom: 24rpx;
  580. }
  581. }
  582. }
  583. .contract-content-box {
  584. flex: 1;
  585. position: relative;
  586. }
  587. .service-plan-box {
  588. flex: 1;
  589. }
  590. .btn-box {
  591. // border: 1px solid red;
  592. margin-bottom: 20rpx;
  593. display: flex;
  594. flex-direction: row;
  595. .btn-save {
  596. padding: 0 20rpx;
  597. width: 400rpx;
  598. }
  599. .btn-submit {
  600. padding: 0 20rpx;
  601. width: 400rpx;
  602. }
  603. }
  604. // 下部分
  605. .bottom-box {
  606. background-color: #fafafa;
  607. width: 750rpx;
  608. border: 1px solid blue;
  609. display: flex;
  610. flex-direction: column;
  611. // justify-content: space-between;
  612. }
  613. .top-box {
  614. height: 100%;
  615. flex: 1;
  616. width: 750rpx;
  617. // border: 1px solid orangered;
  618. display: flex;
  619. flex-direction: column;
  620. }
  621. .scroll-view {
  622. margin-top: 10rpx;
  623. height: calc(100vh - 360rpx);
  624. // height: 100%;
  625. // height: 500rpx;
  626. // flex: 1;
  627. overflow-y: auto; //可写可不写
  628. border: 1px solid green;
  629. }
  630. // 基本信息的滚动区域
  631. .base-box {
  632. height: 100%;
  633. overflow-y: auto;
  634. // background-color: pink;
  635. }
  636. // 适老化产品-滚动区域
  637. .contract-content-box {
  638. height: 100%;
  639. overflow-y: auto;
  640. // background-color: orange;
  641. }
  642. // 服务计划的滚动区域
  643. .service-plan-box {
  644. height: 100%;
  645. // background-color: greenyellow;
  646. overflow-y: auto;
  647. }
  648. // ------签名---------------
  649. .ok-btn {
  650. width: 100rpx;
  651. height: 60rpx;
  652. margin-right: 20rpx;
  653. }
  654. // canvas盒子
  655. .canvas-box {
  656. width: 300rpx;
  657. height: 200rpx;
  658. border: 1px dashed blue;
  659. margin: auto;
  660. }
  661. // 图片
  662. .img-box {
  663. display: block;
  664. border: 1px dashed red;
  665. width: 300rpx;
  666. height: 200rpx;
  667. margin: auto;
  668. }
  669. // -------------
  670. .base-text-box {
  671. background-color: #fff;
  672. padding: 10px 10px 10px 10px;
  673. }
  674. // 标题模块改背景颜色
  675. .uni-section {
  676. background-color: #f2f2f2 !important;
  677. }
  678. // -------表格------------
  679. .uni-table-tr:first-child {
  680. background-color: #0285bd !important;
  681. .uni-table-th {
  682. color: #fff !important;
  683. }
  684. }
  685. // -------弹框---------------
  686. // ---------新增按钮------------------
  687. .new-add-btn {
  688. z-index: 9999;
  689. width: 710rpx;
  690. background-color: #f2f2f2;
  691. position: fixed;
  692. top: 132rpx;
  693. left: 20rpx;
  694. }
  695. .item-content {
  696. display: flex;
  697. flex-direction: row;
  698. // justify-content: space-between;
  699. .product-title {
  700. width: 155rpx;
  701. display: flex;
  702. flex-direction: row;
  703. justify-content: flex-end;
  704. }
  705. .product-content {
  706. display: flex;
  707. flex-direction: row;
  708. justify-content: flex-start;
  709. }
  710. }
  711. // -----------元素------------------
  712. .item-box {
  713. padding-top: 20rpx;
  714. padding-bottom: 20rpx;
  715. margin: 20rpx;
  716. position: relative;
  717. // border: 1px solid rgb(212, 206, 206);
  718. border-radius: 10rpx;
  719. background-color: #ffffff;
  720. }
  721. .item-box::after {
  722. content: "";
  723. position: absolute;
  724. width: 690rpx;
  725. height: 1px;
  726. border-bottom: 1px dashed #c0b9b9;
  727. left: 10rpx;
  728. top: 220rpx;
  729. z-index: 999;
  730. }
  731. //-----------编辑 删除 按钮------------------------
  732. .btn-box {
  733. border: 1px solied red;
  734. margin-top: 50rpx;
  735. display: flex;
  736. flex-direction: row;
  737. justify-content: space-between;
  738. align-items: center;
  739. }
  740. .btn-content-box {
  741. width: 260rpx;
  742. // border: 1px solid red;
  743. display: flex;
  744. flex-direction: row;
  745. justify-content: space-between;
  746. margin-right: 50rpx;
  747. }
  748. .look-more {
  749. margin-left: 50rpx;
  750. }
  751. .item-wrap {
  752. border: 1px solid red;
  753. background-color: #f2f2f2;
  754. margin-top: 80rpx;
  755. }
  756. // -----------底部价格-----------------------------
  757. .bottom-price-box {
  758. padding-right: 20rpx;
  759. .item-content {
  760. display: flex;
  761. flex-direction: row;
  762. justify-content: flex-end;
  763. .product-title {
  764. width: 155rpx;
  765. display: flex;
  766. flex-direction: row;
  767. justify-content: flex-end;
  768. }
  769. .product-content {
  770. display: flex;
  771. flex-direction: row;
  772. justify-content: flex-start;
  773. }
  774. }
  775. }
  776. // ---------改造图片-之前-------------
  777. .before-img-box {
  778. padding: 20rpx;
  779. padding-top: 10rpx;
  780. }
  781. </style>

本文内容由网友自发贡献,转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/183483
推荐阅读
相关标签
  

闽ICP备14008679号