123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372 |
- <template>
- <view class="container">
- <view style="">
- <textarea placeholder="说点什么吧..." class="tui-modal-input" v-model="textarea" />
- <tui-list-view>
- <tui-list-cell :arrow="true">
- <view class="tui-goods-title">
- <view>上传到</view>
- <view style="margin-right: 30rpx;">家族合影相册</image></view>
- </view>
- </tui-list-cell>
- </tui-list-view>
- <tui-upload style="margin-top: 30rpx;" :value="value" :serverUrl="serverUrl" @complete="result" @remove="remove"></tui-upload>
- </view>
- </view>
- </template>
- <script>
- import tuiUpload from "@/components/thorui/tui-upload/tui-upload"
- import tuiButton from "@/components/thorui/tui-button/tui-button"
- import tuiDropdownList from "@/components/thorui/tui-dropdown-list/tui-dropdown-list"
- import tNewsItem from '@/components/views/t-news-item/t-news-item.nvue';
- import tuiIcon from "@/components/thorui/tui-icon/tui-icon"
- import tuiTabs from "@/components/thorui/tui-tabs/tui-tabs"
- import tuiTimeAxis from "@/components/thorui/tui-time-axis/tui-time-axis"
- import tuiTimeaxisItem from "@/components/thorui/tui-timeaxis-item/tui-timeaxis-item"
- import tuiCard from "@/components/thorui/tui-card/tui-card"
- import tuiModal from "@/components/thorui/tui-modal/tui-modal"
- import tuiGrid from "@/components/thorui/tui-grid/tui-grid"
- import tuiGridItem from "@/components/thorui/tui-grid-item/tui-grid-item"
- import tuiSticky from "@/components/thorui/tui-sticky/tui-sticky"
- import tuiListCell from "@/components/thorui/tui-list-cell/tui-list-cell"
- import tuiListView from "@/components/thorui/tui-list-view/tui-list-view"
-
- //实际使用需要传入上传地址,以及上传接口返回数据进行调整组件
- export default {
- components: {
- tuiUpload,
- tuiButton,
- tuiDropdownList,
- tNewsItem,
- tuiIcon,
- tuiTabs,
- tuiTimeAxis,
- tuiTimeaxisItem,
- tuiCard,
- tuiModal,
- tuiGrid,
- tuiGridItem,
- tuiSticky,
- tuiListCell,
- tuiListView
- },
- data() {
- return {
- imageData: [],
- //上传地址
- serverUrl: "https://api.thorui.cn/",
- value:[] ,//初始化图片
- textarea:'',
- dropdownlistData: [{
- name: "微信支付",
- icon: "wechat",
- color: "#80D640",
- size: 30
- }, {
- name: "支付宝支付",
- icon: "alipay",
- color: "#00AAEE",
- size: 30
- }, {
- name: "银行卡支付",
- icon: "bankcard-fill",
- color: "#ff7900",
- size: 28
- }, {
- name: "微信支付",
- icon: "wechat",
- color: "#80D640",
- size: 30
- }, {
- name: "支付宝支付",
- icon: "alipay",
- color: "#00AAEE",
- size: 30
- }, {
- name: "银行卡支付",
- icon: "bankcard-fill",
- color: "#ff7900",
- size: 28
- }],
- dropdownShow: false,
- }
- },
- onNavigationBarButtonTap(e) {
- console.log('成功')
- },
- onLoad() {
- //实际应为请求返回数据,此处故意延时,实际中可去除
- setTimeout(()=>{
- //实际开发中图片地址应为网络地址
- this.value=['../../../../static/img/shop/1.jpg']
- },200)
- },
- methods: {
- btnDropChange(index) {
- this.proDropData = [...this.proDropList[index].list];
- this.proDropIndex = index;
- this.dropShow = true;
- this.dropdownShow=false
- },
- dropDownList(index) {
- if (index !== -1) {
- this.tui.toast("index:" + index)
- }
- this.dropdownShow = !this.dropdownShow
- },
- result: function(e) {
- console.log(e)
- this.imageData = e.imgArr;
- },
- remove: function(e) {
- //移除图片
- console.log(e)
- let index = e.index
- }
- }
- }
- </script>
- <style>
- page {
- background-color: #fff;
- }
- .container {
- padding: 20rpx;
- width: 100%;
- box-sizing: border-box;
- }
- .header {
- padding: 80rpx 90rpx 60rpx 90rpx;
- box-sizing: border-box;
- }
- .title {
- font-size: 34rpx;
- color: #333;
- font-weight: 500;
- }
- .tui-goods-title {
- width: 100%;
- font-size: 28rpx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
- .tui-item-box {
- width: 100%;
- display: flex;
- align-items: center;
- }
- .tui-list-cell_name {
- padding-left: 20rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .tui-ml-auto {
- margin-left: auto;
- }
- .tui-right {
- margin-left: auto;
- margin-right: 34rpx;
- font-size: 26rpx;
- color: #999;
- }
- .tui-logo {
- height: 52rpx;
- width: 52rpx;
- flex-shrink: 0;
- }
- .tui-flex {
- display: flex;
- align-items: center;
- }
- .tui-msg-box {
- display: flex;
- align-items: center;
- }
- .tui-msg-pic {
- width: 100rpx;
- height: 100rpx;
- border-radius: 50%;
- display: block;
- margin-right: 24rpx;
- flex-shrink: 0;
- }
- .tui-msg-item {
- max-width: 500rpx;
- min-height: 80rpx;
- overflow: hidden;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- }
- .tui-msg-name {
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- font-size: 34rpx;
- line-height: 1;
- color: #262b3a;
- }
- .tui-msg-content {
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- font-size: 26rpx;
- line-height: 1;
- color: #9397a4;
- }
- .tui-msg-right {
- max-width: 120rpx;
- height: 88rpx;
- margin-left: auto;
- text-align: right;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- align-items: flex-end;
- }
- .tui-right-dot {
- height: 76rpx !important;
- padding-bottom: 10rpx !important;
- }
- .tui-msg-time {
- width: 100%;
- font-size: 24rpx;
- line-height: 24rpx;
- color: #9397a4;
- }
- .sub-title {
- font-size: 24rpx;
- color: #7a7a7a;
- padding-top: 18rpx;
- }
- .tui-selected-list {
- background-color: #fff;
- border-radius: 20rpx;
- overflow: hidden;
- transform: translateZ(0);
- }
- .tui-dropdown-scroll {
- height: 400rpx;
- }
- .tui-cell-class {
- display: flex;
- align-items: center;
- padding: 26rpx 30rpx !important;
- }
- .tui-ml-20 {
- margin-left: 20rpx;
- }
- .tui-share {
- background: #e8e8e8;
- position: relative;
- padding-bottom: env(safe-area-inset-bottom);
- }
- .tui-share-title {
- font-size: 26rpx;
- color: #7E7E7E;
- text-align: center;
- line-height: 26rpx;
- padding: 20rpx 0 50rpx 0;
- }
- .tui-share-top,
- .tui-share-bottom {
- min-width: 101%;
- padding: 0 20rpx 0 30rpx;
- white-space: nowrap;
- }
- .tui-mt {
- margin-top: 30rpx;
- padding-bottom: 150rpx;
- }
- .tui-share-item {
- width: 126rpx;
- display: inline-block;
- margin-right: 24rpx;
- text-align: center;
- }
- .tui-item-last {
- margin: 0;
- }
- .tui-empty {
- display: inline-block;
- width: 30rpx;
- visibility: hidden;
- }
- .tui-share-icon {
- display: flex;
- align-items: center;
- justify-content: center;
- background: #fafafa;
- height: 126rpx;
- width: 126rpx;
- border-radius: 32rpx;
- }
- .tui-share-text {
- font-size: 24rpx;
- color: #7E7E7E;
- line-height: 24rpx;
- padding: 20rpx 0;
- white-space: nowrap;
- }
- .tui-btn-cancle {
- width: 100%;
- height: 100rpx;
- position: absolute;
- left: 0;
- bottom: 0;
- background: #f6f6f6;
- font-size: 36rpx;
- color: #3e3e3e;
- display: flex;
- align-items: center;
- justify-content: center;
- padding-bottom: env(safe-area-inset-bottom);
- }
- .tui-hover {
- background: rgba(0, 0, 0, 0.2)
- }
- .tui-box-upload {
- box-sizing: border-box;
- }
- .tui-modal-input {
- width: 100%;
- border-bottom: 1rpx solid #e6e6e6;
- padding-bottom: 20rpx;
- font-size: 32rpx;
- }
- </style>
|