diff --git a/package.json b/package.json index ca99c89..52a5b43 100644 --- a/package.json +++ b/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", diff --git a/src/components/PullDownScrollView/index.jsx b/src/components/PullDownScrollView/index.jsx index c61ad00..f0deac1 100644 --- a/src/components/PullDownScrollView/index.jsx +++ b/src/components/PullDownScrollView/index.jsx @@ -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; diff --git a/src/components/color-picker/index.jsx b/src/components/color-picker/index.jsx index e23deb3..a3249c8 100644 --- a/src/components/color-picker/index.jsx +++ b/src/components/color-picker/index.jsx @@ -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 ( - - - - - 颜色选取 - + + + + + 颜色选取 + - - - - + + + + - - - {data.hex} + + + {data.hex} - - - - + + + + diff --git a/src/pages/deviceList/index.jsx b/src/pages/deviceList/index.jsx index 1b328c6..ab2ed77 100644 --- a/src/pages/deviceList/index.jsx +++ b/src/pages/deviceList/index.jsx @@ -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 ( - - - - - - + + + + + + - 请确保手机蓝牙开启,同时待激活设备也处于上电开启状态,尽量靠近设备,强信号有助于提高设备激活的成功率! + 请确保手机蓝牙开启,同时待激活设备也处于上电开启状态,尽量靠近设备,强信号有助于提高设备激活的成功率! {deviceList.map(item => diff --git a/src/pages/game/index.jsx b/src/pages/game/index.jsx index cf218c3..203d2cb 100644 --- a/src/pages/game/index.jsx +++ b/src/pages/game/index.jsx @@ -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] }) } diff --git a/src/pages/history/index.jsx b/src/pages/history/index.jsx index 9975d38..f74b982 100644 --- a/src/pages/history/index.jsx +++ b/src/pages/history/index.jsx @@ -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 ( - + { history.length ? { - history.map((item, index) => - - {item.map((ite, ide) => )} + history.map((item, index) => + + {item.map((ite, ide) => )} - - delItem(index)}>删除 - useItem(item)}>使用 + + delItem(index)}>删除 + useItem(item)}>使用 ) } : - - - 暂无模板 + + + 暂无模板 }