| | |
| | | </view> |
| | | <view class="item"> |
| | | <uv-radio-group v-model="selectedPreset" placement="column" @change="changePreset" labelSize="26rpx"> |
| | | <uv-radio class="spec_radio" v-for="(item, index) in presetList" :key="index" :label="'预制动画:'+item.name" |
| | | <uv-radio |
| | | class="spec_radio" |
| | | v-for="(item, index) in presetList" |
| | | :key="index" |
| | | :label="'预制动画:'+item.name+'('+item.fpsTotal+'帧)'" |
| | | :name="item.name"> |
| | | </uv-radio> |
| | | </uv-radio-group> |
| | |
| | | </view> |
| | | <view class="item"> |
| | | <uv-button text="编辑" @click="popupAnimationOpen(index)" shape="circle" size="small" color="linear-gradient( 142deg, #6FD2FF 0%, #268DFF 100%)"></uv-button> |
| | | <uv-button text="复制" @click="copyFrame(index)" shape="circle" size="small" color="linear-gradient( 142deg, #FFB347 0%, #FF8C00 100%)"></uv-button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | if (preset) { |
| | | this.specVal = preset.screen |
| | | this.modeVal = preset.mode |
| | | this.total = preset.cycle |
| | | this.total = preset.fpsTotal |
| | | this.speed = preset.speed |
| | | if (preset.fpsList) { |
| | | this.fpsList = JSON.parse(preset.fpsList) |
| | |
| | | const colCount = this.width * (this.modeVal == 2 ? 10 : 1) |
| | | this.pixelData = new Array(this.height * colCount).fill('') |
| | | }, |
| | | // 复制当前帧 |
| | | copyFrame(index) { |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '确定要复制当前帧吗?', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | const source = this.fpsList[index]; |
| | | const copy = source ? [...source] : null; |
| | | this.fpsList.splice(index + 1, 0, copy); |
| | | this.total = this.fpsList.length; |
| | | uni.showToast({ |
| | | title: '复制成功', |
| | | icon: 'success', |
| | | duration: 1500 |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | // 屏幕规格 |
| | | changeSpec(e) { |
| | | const ratio = e.split('*'); |
| | |
| | | |
| | | } |
| | | |
| | | .item {} |
| | | .item { |
| | | flex-direction:row; |
| | | gap:20rpx; |
| | | display:flex; |
| | | } |
| | | } |
| | | |
| | | .temp_item { |