2025年06月05日10:20:35
This commit is contained in:
parent
b91f4738f2
commit
a30fa763e4
19
package.json
19
package.json
@ -10,24 +10,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"build:weapp": "taro build --type weapp",
|
||||
"build:swan": "taro build --type swan",
|
||||
"build:alipay": "taro build --type alipay",
|
||||
"build:tt": "taro build --type tt",
|
||||
"build:h5": "taro build --type h5",
|
||||
"build:rn": "taro build --type rn",
|
||||
"build:qq": "taro build --type qq",
|
||||
"build:jd": "taro build --type jd",
|
||||
"build:quickapp": "taro build --type quickapp",
|
||||
"dev:weapp": "npm run build:weapp -- --watch",
|
||||
"dev:swan": "npm run build:swan -- --watch",
|
||||
"dev:alipay": "npm run build:alipay -- --watch",
|
||||
"dev:tt": "npm run build:tt -- --watch",
|
||||
"dev:h5": "npm run build:h5 -- --watch",
|
||||
"dev:rn": "npm run build:rn -- --watch",
|
||||
"dev:qq": "npm run build:qq -- --watch",
|
||||
"dev:jd": "npm run build:jd -- --watch",
|
||||
"dev:quickapp": "npm run build:quickapp -- --watch",
|
||||
"test": "jest"
|
||||
"dev:weapp": "npm run build:weapp -- --watch"
|
||||
},
|
||||
"browserslist": [
|
||||
"last 3 versions",
|
||||
|
@ -1,6 +1,5 @@
|
||||
import { memo, useRef, useState } from 'react';
|
||||
import { ScrollView } from '@tarojs/components';
|
||||
import Taro from '@tarojs/taro';
|
||||
|
||||
const Index = (props) => {
|
||||
const { children, refreshFetcher } = props;
|
||||
|
@ -1,9 +1,8 @@
|
||||
import { View } from '@tarojs/components'
|
||||
|
||||
import './index.less'
|
||||
import { useEffect, useState } from 'react'
|
||||
import Taro from '@tarojs/taro'
|
||||
import { Popup } from "@taroify/core"
|
||||
import './index.less'
|
||||
|
||||
export default function Index({ open, onChange }) {
|
||||
let [data, setData] = useState({
|
||||
@ -338,29 +337,29 @@ export default function Index({ open, onChange }) {
|
||||
useEffect(() => {
|
||||
}, [])
|
||||
return (
|
||||
<Popup open={open} rounded placement="bottom" >
|
||||
<View className="cp-box">
|
||||
<View className="cp-header">
|
||||
<View className="cp-header-icon cancel" onClick={close}></View>
|
||||
<View className="cp-header-title" >颜色选取</View>
|
||||
<View className="cp-header-icon confirm" onClick={confirm}></View>
|
||||
<Popup open={open} rounded placement='bottom' >
|
||||
<View className='cp-box'>
|
||||
<View className='cp-header'>
|
||||
<View className='cp-header-icon cancel' onClick={close}></View>
|
||||
<View className='cp-header-title' >颜色选取</View>
|
||||
<View className='cp-header-icon confirm' onClick={confirm}></View>
|
||||
</View>
|
||||
|
||||
<View className="cp-color-box" style={'background:' + ('rgb(' + bgcolor.r + ',' + bgcolor.g + ',' + bgcolor.b + ')') + ';'}>
|
||||
<View className="cp-background range-box" data-index="0" onTouchStart={touchstart} onTouchMove={touchmove} >
|
||||
<View className="cp-color-mask"></View>
|
||||
<View className="cp-pointer" style={'top:' + (point[0].top - 8 + 'px') + ';' + ('left:' + (point[0].left - 8 + 'px') + ';')}></View>
|
||||
<View className='cp-color-box' style={'background:' + ('rgb(' + bgcolor.r + ',' + bgcolor.g + ',' + bgcolor.b + ')') + ';'}>
|
||||
<View className='cp-background range-box' data-index='0' onTouchStart={touchstart} onTouchMove={touchmove} >
|
||||
<View className='cp-color-mask'></View>
|
||||
<View className='cp-pointer' style={'top:' + (point[0].top - 8 + 'px') + ';' + ('left:' + (point[0].left - 8 + 'px') + ';')}></View>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<View className="cp-control-box">
|
||||
<View className="cp-control-color">
|
||||
<View className="cp-control-color-content" style={'background:' + ('rgba(' + rgba.r + ',' + rgba.g + ',' + rgba.b + ',' + rgba.a + ')') + ';'}>{data.hex}</View>
|
||||
<View className='cp-control-box'>
|
||||
<View className='cp-control-color'>
|
||||
<View className='cp-control-color-content' style={'background:' + ('rgba(' + rgba.r + ',' + rgba.g + ',' + rgba.b + ',' + rgba.a + ')') + ';'}>{data.hex}</View>
|
||||
</View>
|
||||
<View className="cp-control-box-item">
|
||||
<View className="cp-controller range-box" data-index="1" onTouchStart={touchstart} onTouchMove={touchmove}>
|
||||
<View className="cp-hue">
|
||||
<View className="cp-circle" style={'left:' + (point[1].left - 12 + 'px') + ';'}></View>
|
||||
<View className='cp-control-box-item'>
|
||||
<View className='cp-controller range-box' data-index='1' onTouchStart={touchstart} onTouchMove={touchmove}>
|
||||
<View className='cp-hue'>
|
||||
<View className='cp-circle' style={'left:' + (point[1].left - 12 + 'px') + ';'}></View>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { View } from '@tarojs/components'
|
||||
import './index.less'
|
||||
import Taro from '@tarojs/taro'
|
||||
import { useState, useEffect } from 'react'
|
||||
import router from '@/baseRouter/index'
|
||||
import BLESDK from '@/utils/ble'
|
||||
import './index.less'
|
||||
|
||||
export default function Index() {
|
||||
let [deviceList, setDeviceList] = useState([])
|
||||
@ -40,14 +40,14 @@ export default function Index() {
|
||||
})
|
||||
|
||||
return (
|
||||
<View className="index deviceList">
|
||||
<View className="head">
|
||||
<View className="radar">
|
||||
<View className="yuan1 yuan"></View>
|
||||
<View className="yuan2 yuan"></View>
|
||||
<View className="yuan3 yuan"></View>
|
||||
<View className='index deviceList'>
|
||||
<View className='head'>
|
||||
<View className='radar'>
|
||||
<View className='yuan1 yuan'></View>
|
||||
<View className='yuan2 yuan'></View>
|
||||
<View className='yuan3 yuan'></View>
|
||||
</View>
|
||||
<View className="text">请确保手机蓝牙开启,同时待激活设备也处于上电开启状态,尽量靠近设备,强信号有助于提高设备激活的成功率!</View>
|
||||
<View className='text'>请确保手机蓝牙开启,同时待激活设备也处于上电开启状态,尽量靠近设备,强信号有助于提高设备激活的成功率!</View>
|
||||
</View>
|
||||
<View className='list'>
|
||||
{deviceList.map(item => <View className='item'>
|
||||
|
@ -28,7 +28,11 @@ export default function Index() {
|
||||
}
|
||||
const addColor = (index) => {
|
||||
setList((state) => {
|
||||
state[index] = curColor.rgba
|
||||
if (state[index] != curColor.rgba) {
|
||||
state[index] = curColor.rgba
|
||||
} else {
|
||||
state[index] = '255, 255, 255'
|
||||
}
|
||||
return [...state]
|
||||
})
|
||||
}
|
||||
|
@ -1,10 +1,9 @@
|
||||
import { View, Image } from "@tarojs/components";
|
||||
|
||||
import "./index.less";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useState } from "react";
|
||||
import Taro from "@tarojs/taro";
|
||||
import empty from "@/assets/empty.png";
|
||||
import router from '@/baseRouter/index'
|
||||
import "./index.less";
|
||||
|
||||
export default function Index() {
|
||||
let [history, setHistory] = useState(Taro.getStorageSync("colorList") || [])
|
||||
@ -29,25 +28,25 @@ export default function Index() {
|
||||
|
||||
|
||||
return (
|
||||
<View className="history index">
|
||||
<View className='history index'>
|
||||
{
|
||||
history.length ?
|
||||
<View>
|
||||
{
|
||||
history.map((item, index) => <View className="card" key={index}>
|
||||
<View className="grid">
|
||||
{item.map((ite, ide) => <View className="grid-item" style={{ backgroundColor: `rgb(${ite})` }} key={`_${ide}`}></View>)}
|
||||
history.map((item, index) => <View className='card' key={index}>
|
||||
<View className='grid'>
|
||||
{item.map((ite, ide) => <View className='grid-item' style={{ backgroundColor: `rgb(${ite})` }} key={`_${ide}`}></View>)}
|
||||
</View >
|
||||
<View className="btns">
|
||||
<View className="btn del" onClick={() => delItem(index)}>删除</View>
|
||||
<View className="btn use" onClick={() => useItem(item)}>使用</View>
|
||||
<View className='btns'>
|
||||
<View className='btn del' onClick={() => delItem(index)}>删除</View>
|
||||
<View className='btn use' onClick={() => useItem(item)}>使用</View>
|
||||
</View>
|
||||
</View>)
|
||||
}
|
||||
</View> :
|
||||
<View className="empty">
|
||||
<Image src={empty} className="empty-img" />
|
||||
<View className="empty-text">暂无模板</View>
|
||||
<View className='empty'>
|
||||
<Image src={empty} className='empty-img' />
|
||||
<View className='empty-text'>暂无模板</View>
|
||||
</View>
|
||||
}
|
||||
</View>
|
||||
|
Loading…
x
Reference in New Issue
Block a user