import { View, Text } from '@tarojs/components'
import './MetricModalOrder.scss'
import { alphaToHex } from '@/utils/tools'
import { useTranslation } from 'react-i18next'
import { useEffect, useState } from 'react'
import MoveOrderList from './MoveOrderList'
import { IconDrag } from '@/components/basic/Icons'
export default function Component(props: { themeColor: string, cancel: Function, confirm: Function, array: any }) {
var color = props.themeColor ? props.themeColor : '#ff0000'
const [list, setList] = useState(props.array)
const { t } = useTranslation()
var alpha = alphaToHex(0.4)
useEffect(()=>{
setList(props.array)
},[props.array])
function cancel() {
props.cancel()
}
function confirm() {
props.confirm(list)
}
// function items() {
// var array:any = []
// for (var i = 0; i < list.length; i++) {
// var item = (
//
// {list[i].name}
//
//
// )
// array.push(item)
// }
// return array
// }
return
{t('feature.track_something.metric.order')}
长按可拖动排序
{setList(temps)}}/>
{global.metricAdd ? '上一步' : '取消'}
{global.metricAdd ? '完成' : '确定'}
}