Commit ffbd4520 authored by 刘文虎's avatar 刘文虎

收支设置

parent cda4a970
Pipeline #3310 canceled with stages
...@@ -96,7 +96,12 @@ ...@@ -96,7 +96,12 @@
"UniversalLinks" : "" "UniversalLinks" : ""
} }
}, },
"maps" : {}, "maps" : {
"baidu" : {
"appkey_ios" : "dFMUnxGBq8mB8CSotGMELp4EGUq9qlwo",
"appkey_android" : "32HwrFwjGUFno8GddnqSZtP72sDFucG1"
}
},
"geolocation" : { "geolocation" : {
"baidu" : { "baidu" : {
"__platform__" : [ "android" ], "__platform__" : [ "android" ],
......
<template> <template>
<view class="input-view"> <view class="input-view">
<NavbarNormal :title="info.title" background="transparent" titleColor="#191C27" :border-bottom="false" title-bold></NavbarNormal> <NavbarNormal :title="info.title" titleColor="#191C27" :border-bottom="false" title-bold></NavbarNormal>
<view class="content-view"> <view class="content-view">
<u-input <u-input
v-model="value" v-model="value"
...@@ -49,11 +49,7 @@ export default { ...@@ -49,11 +49,7 @@ export default {
}; };
}, },
placeholderStyle() { placeholderStyle() {
return { return 'color: #cccccc;font-size: 28rpx;font-weight: bold;'
color: '#cccccc',
'font-size': '28rpx',
'font-weight': 'bold'
};
}, },
inputStyle() { inputStyle() {
return { return {
...@@ -163,7 +159,6 @@ export default { ...@@ -163,7 +159,6 @@ export default {
if (options && options.disabled) { if (options && options.disabled) {
this.disabled = options.disabled; this.disabled = options.disabled;
} }
uni.hideShareMenu();
}, },
onUnload() { onUnload() {
let notification = `input-sure-${this.type}`; let notification = `input-sure-${this.type}`;
......
This diff is collapsed.
...@@ -3,29 +3,31 @@ ...@@ -3,29 +3,31 @@
<view class="edit-box" :style="{ top: 0 }"> <view class="edit-box" :style="{ top: 0 }">
<view class="zhuti"> <view class="zhuti">
<scroll-view :scroll-y="pageInfo.scrollY" class="product-section"> <scroll-view :scroll-y="pageInfo.scrollY" class="product-section">
<view class="list" @click="closeAll"> <view class="list">
<view class="swipe-action-outside" v-for="(item, index) in optionLists" :key="item.guid"> <uni-swipe-action>
<u-swipe-action :show="item.show" bg-color="#f6f7fa" :index="item.guid" @click="handleClick" @open="open" :options="options"> <view class="swipe-action-outside" v-for="(item, index) in optionLists" :key="item.guid">
<view <uni-swipe-action-item :right-options="options" bg-color="#f6f7fa" :index="item.guid" @click="onClick($event,item,index)" @change="swipeChange($event, index)">
class="row list-row" <view
:data-index="index" class="row list-row"
@longpress="longpress($event, item, index)" :data-index="index"
@touchmove="dragMove" @longpress="longpress($event, item, index)"
@touchend="dragEnd($enent, item)" @touchmove="dragMove"
:class="{ 'ready-place': pageInfo.readyPlaceIndex === index }" @touchend="dragEnd($event, item)"
:id="`item-view-${item.guid}`" :class="{ 'ready-place': pageInfo.readyPlaceIndex === index }"
:style="'height: ' + pageInfo.rowHeight + 'px;'" :id="`item-view-${item.guid}`"
@click.stop="closeAll" :style="'height: ' + pageInfo.rowHeight + 'px;'"
> @click.stop="closeAll"
<view class="item-view"> >
<view class="left-view"> <view class="item-view" @click.stop="clickCell(item,index)">
<view class="image-view"><image :src="billStaticBaseUrl + item.icon" v-if="item.icon"></image></view> <view class="left-view">
<view class="name-view">{{ item.label }}</view> <view class="image-view"><image :src="billStaticBaseUrl + item.icon" v-if="item.icon"></image></view>
<view class="name-view">{{ item.label }}</view>
</view>
</view> </view>
</view> </view>
</view> </uni-swipe-action-item>
</u-swipe-action> </view>
</view> </uni-swipe-action>
</view> </view>
</scroll-view> </scroll-view>
<movable-area class="movable-area" :style="'display:' + movableViewInfo.showClass + '; height:' + pageInfo.scrollHeight + '%'"> <movable-area class="movable-area" :style="'display:' + movableViewInfo.showClass + '; height:' + pageInfo.scrollHeight + '%'">
...@@ -51,19 +53,23 @@ ...@@ -51,19 +53,23 @@
</template> </template>
<script> <script>
import UniSwipeAction from '@/components/uni-swipe-action/uni-swipe-action.vue';
import UniSwipeActionItem from '@/components/uni-swipe-action-item/uni-swipe-action-item.vue';
import PopInput from '@/components/pop-input-view'; import PopInput from '@/components/pop-input-view';
import { billStaticBaseUrl } from '@/utils/config.js'; import { billStaticBaseUrl } from '@/utils/config.js';
export default { export default {
name: 'dragEdit', name: 'dragEdit',
props: ['list'], props: ['list'],
components: { components: {
PopInput UniSwipeAction,
UniSwipeActionItem,
PopInput,
}, },
data() { data() {
return { return {
billStaticBaseUrl, billStaticBaseUrl,
showConfirm: false, showConfirm: false,
readyDeleteIndex: null, readyDeleteItem: null,
options: [ options: [
{ {
text: '删除', text: '删除',
...@@ -114,45 +120,35 @@ export default { ...@@ -114,45 +120,35 @@ export default {
this.optionLists = [...this.list]; this.optionLists = [...this.list];
}, },
methods: { methods: {
contentClick(e) { clickCell(item) {
console.log('contentClick', e); let flag = true;
setTimeout(() => { this.optionLists.map(el => {
this.closeAll(); if (el.show) {
}, 300); flag = false;
}, }
handleClick(index, index1) { });
let current = this.optionLists.findIndex(item => item.guid === index); if (flag) {
if (index1 == 1) { this.toEdit(item);
this.toEdit(current);
setTimeout(() => {
this.closeAll();
}, 500);
} else {
this.beforeDelete(current);
} }
}, },
// 如果打开一个的时候,不需要关闭其他,则无需实现本方法 onClick(e,item) {
open(index) { console.log(e);
// 先将正在被操作的swipeAction标记为打开状态,否则由于props的特性限制, console.log('点击了' + (e.position === 'left' ? '左侧' : '右侧') + e.content.text + '按钮');
// 原本为'false',再次设置为'false'会无效 if(e.position === 'right'){
if (index === null) { if(e.content.text==='删除'){
this.optionLists.map((val, idx) => { this.beforeDelete(item)
this.optionLists[idx].show = false; }else if(e.content.text==='编辑'){
}); this.toEdit(item);
} else { }
let current = this.optionLists.findIndex(item => item.guid === index);
this.optionLists[current].show = true;
this.optionLists.map((val, idx) => {
if (current !== idx) {
this.optionLists[idx].show = false;
}
});
} }
console.log('open', this.optionLists); },
swipeChange(e, index) {
console.log('当前状态:' + e + ',下标:' + index);
this.list[index].show = e === 'right' ? true : false;
}, },
toEdit(index) { toEdit(item) {
let value = this.optionLists[index].label; let value = item.label;
this.$u.route({ this.$u.route({
url: '/pages/mine/input/input', url: '/pages/mine/input/input',
params: { params: {
...@@ -161,22 +157,32 @@ export default { ...@@ -161,22 +157,32 @@ export default {
} }
}); });
uni.$once(`input-sure-payments-setting`, res => { uni.$once(`input-sure-payments-setting`, res => {
this.optionLists[index].label = res.content; this.optionLists.map(el=>{
this.$emit('onEdit', this.optionLists[index]); if(el.id===item.id){
el.label=res.content
}
})
this.$emit('onEdit', item);
}); });
}, },
handleConfirm() { handleConfirm() {
let row = this.optionLists[this.readyDeleteIndex]; this.optionLists.map(item=>{
// this.optionLists.splice(this.readyDeleteIndex, 1); if(item.id===this.readyDeleteItem.id){
this.optionLists[this.readyDeleteIndex].show = false; item.show=false
this.$emit('onDelete', row); }
})
this.$emit('onDelete', this.readyDeleteItem);
}, },
handleCancel() { handleCancel() {
this.optionLists[this.readyDeleteIndex].show = false; this.optionLists.map(item=>{
if(item.id===this.readyDeleteItem.id){
item.show=false
}
})
}, },
beforeDelete(index) { beforeDelete(item) {
this.readyDeleteIndex = index; this.readyDeleteItem = item;
this.showConfirm = true; this.showConfirm = true;
}, },
// 通知父组件修改排序 // 通知父组件修改排序
...@@ -188,7 +194,9 @@ export default { ...@@ -188,7 +194,9 @@ export default {
}, },
closeAll() { closeAll() {
if (this.optionLists.length) { if (this.optionLists.length) {
this.open(null); this.optionLists.map(item=>{
item.show=false
})
} }
}, },
async longpress(event, item) { async longpress(event, item) {
......
...@@ -196,7 +196,6 @@ export default { ...@@ -196,7 +196,6 @@ export default {
try { try {
let {label,id,icon}=row let {label,id,icon}=row
let params={ let params={
name:row.label, name:row.label,
useType:this.form.type useType:this.form.type
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment