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

收支设置

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