ZaiZai 1 year ago
parent
commit
a27a1562ee

+ 1 - 12
components/hc-sys/index.vue

@@ -11,8 +11,7 @@
 </template>
 
 <script setup>
-import {onMounted, ref, watch} from "vue";
-
+import {ref, watch} from "vue";
 const props = defineProps({
     ui: String,
     tabbar: Boolean,
@@ -31,16 +30,6 @@ watch(() => [
 ], ([val]) => {
     isNavBars.value = val
 })
-
-//渲染完成
-onMounted(() => {
-    //监听用户截屏事件
-    // #ifdef APP-PLUS
-    uni.onUserCaptureScreen((path) => {
-        console.log('用户截屏了', path)
-    });
-    // #endif
-})
 </script>
 
 <style scoped lang="scss">

+ 3 - 3
httpApi/request/httpApi.js

@@ -53,11 +53,11 @@ const getResData = async (response, error = false) => {
 //获取msg消息内容
 const getMsgVal = ({statusCode, data}) => {
     const { code, msg, error_description } = getObjValue(data)
-    if (statusCode === 404 || statusCode === 500 || statusCode === 504) {
+    if (statusCode === 404) {
         return '服务器异常,请联系管理员!'
     }
-    if (code === 404 || code === 500 || code === 504) {
-        return '服务器异常,请联系管理员!'
+    if (code === 500 || code === 504) {
+        return '该功能正在升级优化,请联系管理员!'
     } else {
         return msg || error_description || '未知错误'
     }

+ 0 - 10
uni_modules/uni-usercapturescreen/changelog.md

@@ -1,10 +0,0 @@
-## 1.0.4(2023-03-24)
-新增开启/关闭防截屏功能
-## 1.0.3(2023-03-17)
-修复android平台 部分场景下js可能报错的问题
-## 1.0.2(2023-03-16)
-修复Android平台在小米设备无法监听的问题 修复Android平台调用uni.onUserCaptureScreen必然会触发回调的问题
-## 1.0.1(2022-10-27)
-修改插件描述
-## 1.0.0(2022-10-26)
-支持安卓、iOS、微信小程序平台

+ 0 - 18
uni_modules/uni-usercapturescreen/index.d.ts

@@ -1,18 +0,0 @@
-declare namespace UniNamespace {
-  type OnUserCaptureScreenCallback = (res?: { errMsg: string }) => void
-}
-
-declare interface Uni {
-  /**
-   * 监听用户主动截屏事件,用户使用系统截屏按键截屏时触发此事件。
-   *
-   * 文档: [https://uniapp.dcloud.net.cn/api/system/capture-screen.html#onusercapturescreen](https://uniapp.dcloud.net.cn/api/system/capture-screen.html#onusercapturescreen)
-   */
-  onUserCaptureScreen(callback: UniNamespace.OnUserCaptureScreenCallback): void;
-  /**
-   * 用户主动截屏事件。取消事件监听。
-   *
-   * 文档: [https://uniapp.dcloud.net.cn/api/system/capture-screen.html#offusercapturescreen](https://uniapp.dcloud.net.cn/api/system/capture-screen.html#offusercapturescreen)
-   */
-  offUserCaptureScreen(callback: UniNamespace.OnUserCaptureScreenCallback): void;
-}

+ 0 - 92
uni_modules/uni-usercapturescreen/package.json

@@ -1,92 +0,0 @@
-{
-	"id": "uni-usercapturescreen",
-	"displayName": "uni-usercapturescreen",
-	"version": "1.0.4",
-	"description": "用户主动截屏事件监听",
-	"keywords": [
-        "截屏"
-    ],
-	"repository": "",
-	"engines": {
-		"HBuilderX": "^3.7.7"
-	},
-	"dcloudext": {
-		"type": "uts",
-		"sale": {
-			"regular": {
-				"price": "0.00"
-			},
-			"sourcecode": {
-				"price": "0.00"
-			}
-		},
-		"contact": {
-			"qq": ""
-		},
-		"declaration": {
-			"ads": "无",
-			"data": "插件不采集任何数据",
-			"permissions": "无"
-		},
-		"npmurl": ""
-	},
-	"uni_modules": {
-		"uni-ext-api":{
-			"uni": {
-				"onUserCaptureScreen": "onUserCaptureScreen",
-				"offUserCaptureScreen": "offUserCaptureScreen",
-				"setUserCaptureScreen": "setUserCaptureScreen"
-			}
-		},
-		"dependencies": [],
-		"encrypt": [],
-		"platforms": {
-			"cloud": {
-				"tcb": "y",
-				"aliyun": "y"
-			},
-			"client": {
-				"Vue": {
-					"vue2": "n",
-					"vue3": "y"
-				},
-				"App": {
-					"app-android": {
-                        "minVersion": "19"
-                    },
-					"app-ios": {
-                        "minVersion": "9"
-                    }
-				},
-				"H5-mobile": {
-					"Safari": "n",
-					"Android Browser": "n",
-					"微信浏览器(Android)": "n",
-					"QQ浏览器(Android)": "n"
-				},
-				"H5-pc": {
-					"Chrome": "n",
-					"IE": "n",
-					"Edge": "n",
-					"Firefox": "n",
-					"Safari": "n"
-				},
-				"小程序": {
-					"微信": "y",
-					"阿里": "n",
-					"百度": "n",
-					"字节跳动": "n",
-					"QQ": "n",
-					"钉钉": "n",
-					"快手": "n",
-					"飞书": "n",
-					"京东": "n"
-				},
-				"快应用": {
-					"华为": "n",
-					"联盟": "n"
-				}
-			}
-		}
-	}
-}

+ 0 - 21
uni_modules/uni-usercapturescreen/readme.md

@@ -1,21 +0,0 @@
-# uni-usercapturescreen
-
-用户主动截屏事件监听
-
-### uni.onUserCaptureScreen
-
-监听用户主动截屏事件,用户使用系统截屏按键截屏时触发此事件。
-
-> 使用文档:[https://uniapp.dcloud.net.cn/api/system/capture-screen.html#onusercapturescreen](https://uniapp.dcloud.net.cn/api/system/capture-screen.html#onusercapturescreen)
-
-### uni.offUserCaptureScreen
-
-用户主动截屏事件。取消事件监听。
-
-> 使用文档:[https://uniapp.dcloud.net.cn/api/system/capture-screen.html#offusercapturescreen](https://uniapp.dcloud.net.cn/api/system/capture-screen.html#offusercapturescreen)
-
-### uni.setUserCaptureScreen
-
-开启/关闭防截屏。
-
-> 使用文档:[https://uniapp.dcloud.net.cn/api/system/capture-screen.html#setusercapturescreen](https://uniapp.dcloud.net.cn/api/system/capture-screen.html#setusercapturescreen)

+ 0 - 3
uni_modules/uni-usercapturescreen/utssdk/app-android/config.json

@@ -1,3 +0,0 @@
-{
-  "minSdkVersion": "19"
-}

+ 0 - 139
uni_modules/uni-usercapturescreen/utssdk/app-android/index.uts

@@ -1,139 +0,0 @@
-import { UTSAndroid } from "io.dcloud.uts";
-import ActivityCompat from "androidx.core.app.ActivityCompat";
-import Manifest from "android.Manifest";
-import PackageManager from "android.content.pm.PackageManager";
-import Build from "android.os.Build";
-import FileObserver from "android.os.FileObserver";
-import File from "java.io.File";
-import Environment from "android.os.Environment";
-import System from 'java.lang.System';
-import WindowManager from 'android.view.WindowManager';
-import { OnUserCaptureScreenCallbackResult, UserCaptureScreenCallback, OnUserCaptureScreen, OffUserCaptureScreen, SetUserCaptureScreenSuccess, SetUserCaptureScreenOptions, SetUserCaptureScreen } from "../interface.uts";
-
-
-/**
-	* 文件监听器
-	*/
-let observer : ScreenFileObserver | null = null;
-/**
-	* 记录文件监听器上次监听的时间戳,避免重复监听
-	*/
-let lastObserverTime : number = 0;
-/**
-	* 截屏回调
-	*/
-let listener : UserCaptureScreenCallback | null = null;
-
-/**
-	* android 文件监听实现
-	*/
-class ScreenFileObserver extends FileObserver {
-
-	/**
-		* 截屏文件目录
-		*/
-	private screenFile : File;
-
-	constructor(screenFile : File) {
-		super(screenFile);
-		this.screenFile = screenFile;
-	}
-
-	override onEvent(event : Int, path : string | null) : void {
-		// 只监听文件新增事件
-		if (event == FileObserver.CREATE) {
-			if (path != null) {
-				const currentTime = System.currentTimeMillis();
-				if ((currentTime - lastObserverTime) < 1000) {
-					// 本地截屏行为比上一次超过1000ms, 才认为是一个有效的时间
-					return;
-				}
-				lastObserverTime = currentTime;
-
-				const screenShotPath = new File(this.screenFile, path).getPath();
-				const res : OnUserCaptureScreenCallbackResult = {
-					path: screenShotPath
-				}
-				listener?.(res);
-			}
-		}
-	}
-}
-
-/**
-	* 开启截图监听
-	*/
-export const onUserCaptureScreen : OnUserCaptureScreen = function (callback : UserCaptureScreenCallback | null) {
-	// 检查相关权限是否已授予
-	if (ActivityCompat.checkSelfPermission(UTSAndroid.getAppContext()!, Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
-		// 无权限,申请权限
-		ActivityCompat.requestPermissions(UTSAndroid.getUniActivity()!, arrayOf(Manifest.permission.READ_EXTERNAL_STORAGE), 1001);
-		return;
-	}
-	// 更新监听
-	listener = callback;
-
-	let directory_screenshot : File;
-	if (Build.MANUFACTURER.toLowerCase() == "xiaomi") {
-		// @Suppress("DEPRECATION")
-		directory_screenshot = new File(new File(Environment.getExternalStorageDirectory(), Environment.DIRECTORY_DCIM), "Screenshots");
-	} else {
-		// @Suppress("DEPRECATION")
-		directory_screenshot = new File(new File(Environment.getExternalStorageDirectory(), Environment.DIRECTORY_PICTURES), "Screenshots");
-	}
-	// 先结束监听 再开启监听
-	observer?.stopWatching();
-	observer = new ScreenFileObserver(directory_screenshot);
-	observer?.startWatching();
-	
-	
-	UTSAndroid.onAppActivityDestroy(function(){
-		observer?.stopWatching()
-		observer = null
-	})
-	
-	
-}
-
-/**
-	* 关闭截屏监听
-	*/
-export const offUserCaptureScreen : OffUserCaptureScreen = function (_ : UserCaptureScreenCallback | null) {
-	// android10以上,关闭监听通过移除文件监听器实现
-	observer?.stopWatching();
-	observer = null;
-	lastObserverTime = 0;
-}
-
-/**
-	* 设置是否禁止截屏
-	*/
-export const setUserCaptureScreen : SetUserCaptureScreen = function (option : SetUserCaptureScreenOptions) {
-	// 切换到UI线程
-	UTSAndroid.getUniActivity()?.runOnUiThread(new SetUserCaptureScreenRunnable(option.enable));
-	const res : SetUserCaptureScreenSuccess = {}
-	option.success?.(res);
-	option.complete?.(res);
-}
-
-class SetUserCaptureScreenRunnable extends Runnable {
-
-	/**
-		* ture: 允许用户截屏
-		* false: 不允许用户截屏,防止用户截屏到应用页面内容
-		*/
-	private enable : boolean;
-
-	constructor(enable : boolean) {
-		super();
-		this.enable = enable;
-	}
-
-	override run() : void {
-		if (this.enable) {
-			UTSAndroid.getUniActivity()?.getWindow()?.clearFlags(WindowManager.LayoutParams.FLAG_SECURE);
-		} else {
-			UTSAndroid.getUniActivity()?.getWindow()?.addFlags(WindowManager.LayoutParams.FLAG_SECURE);
-		}
-	}
-}

+ 0 - 3
uni_modules/uni-usercapturescreen/utssdk/app-ios/config.json

@@ -1,3 +0,0 @@
-{
-  "deploymentTarget": "9"
-}

+ 0 - 146
uni_modules/uni-usercapturescreen/utssdk/app-ios/index.uts

@@ -1,146 +0,0 @@
-import { NotificationCenter } from 'Foundation';
-import { CGRect } from "CoreFoundation";
-import { UIApplication, UIView, UITextField, UIScreen, UIDevice } from "UIKit"
-import { UTSiOS } from "DCloudUTSFoundation"
-import { DispatchQueue } from 'Dispatch';
-import { SetUserCaptureScreenOptions, OnUserCaptureScreenCallbackResult, OnUserCaptureScreen, OffUserCaptureScreen, SetUserCaptureScreen, UserCaptureScreenCallback, SetUserCaptureScreenSuccess, SetUserCaptureScreenFail  } from "../interface.uts"
-
-/**
-	* 定义监听截屏事件工具类
-	*/
-class CaptureScreenTool {
-	static listener : UserCaptureScreenCallback | null;
-	static secureView : UIView | null;
-
-	// 监听截屏
-	static listenCaptureScreen(callback : UserCaptureScreenCallback | null) {
-		this.listener = callback
- 
-		// 注册监听截屏事件及回调方法
-		// target-action 回调方法需要通过 Selector("方法名") 构建
-		const method = Selector("userDidTakeScreenshot")
-		NotificationCenter.default.addObserver(this, selector = method, name = UIApplication.userDidTakeScreenshotNotification, object = null)
-	}
-
-	// 捕获截屏回调的方法
-	// target-action 的方法前需要添加 @objc 前缀
-	@objc static userDidTakeScreenshot() {
-		// 回调
-		const res: OnUserCaptureScreenCallbackResult = {
-		}
-		this.listener?.(res)
-	}
-
-	// 移除监听事件
-	static removeListen(callback : UserCaptureScreenCallback | null) {
-		this.listener = null
-		NotificationCenter.default.removeObserver(this)
-	}
-
-	static createSecureView() : UIView | null {
-		let field = new UITextField(frame = CGRect.zero)
-		field.isSecureTextEntry = true
-		if (field.subviews.length > 0 && UIDevice.current.systemVersion != '15.1') {
-			let view = field.subviews[0]
-			view.subviews.forEach((item) => {
-				item.removeFromSuperview()
-			})
-			view.isUserInteractionEnabled = true
-			return view
-		}
-		return null
-	}
-
-	// 开启防截屏
-	static onAntiScreenshot(option : SetUserCaptureScreenOptions) {
-		// uts方法默认会在子线程中执行,涉及 UI 操作必须在主线程中运行,通过 DispatchQueue.main.async 方法可将代码在主线程中运行
-		DispatchQueue.main.async(execute = () : void => {
-			let secureView = this.createSecureView()
-			let window = UTSiOS.getKeyWindow()
-			let rootView = window.rootViewController == null ? null : window.rootViewController!.view
-			if (secureView != null && rootView != null) {
-				let rootSuperview = rootView!.superview
-				if (rootSuperview != null) {
-					this.secureView = secureView
-					rootSuperview!.addSubview(secureView!)
-					rootView!.removeFromSuperview()
-					secureView!.addSubview(rootView!)
-					let rect = rootView!.frame
-					secureView!.frame = UIScreen.main.bounds
-					rootView!.frame = rect
-				}
-			}
-			let res: SetUserCaptureScreenSuccess = {
-			}
-			option.success?.(res)
-			option.complete?.(res)
-		})
-	}
-
-	// 关闭防截屏
-	static offAntiScreenshot(option : SetUserCaptureScreenOptions) {
-		DispatchQueue.main.async(execute = () : void => {
-			if (this.secureView != null) {
-				let window = UTSiOS.getKeyWindow()
-				let rootView = window.rootViewController == null ? null : window.rootViewController!.view
-				if (rootView != null && this.secureView!.superview != null) {
-					let rootSuperview = this.secureView!.superview
-					if (rootSuperview != null) {
-						rootSuperview!.addSubview(rootView!)
-						this.secureView!.removeFromSuperview()
-					}
-				}
-				this.secureView = null
-			}
-			let res: SetUserCaptureScreenSuccess = {
-			}
-			option.success?.(res)
-			option.complete?.(res)
-		})
-	}
-}
-
-/**
-	* 开启截图监听
-	*/
-export const onUserCaptureScreen : OnUserCaptureScreen = function (callback : UserCaptureScreenCallback | null) {
-	CaptureScreenTool.listenCaptureScreen(callback)
-}
-
-/**
-	* 关闭截屏监听
-	*/
-export const offUserCaptureScreen : OffUserCaptureScreen = function (callback : UserCaptureScreenCallback | null) {
-	CaptureScreenTool.removeListen(callback)
-}
-
-/**
-	* 开启/关闭防截屏
-	*/
-export const setUserCaptureScreen : SetUserCaptureScreen = function (options : SetUserCaptureScreenOptions) {
-	if (UIDevice.current.systemVersion < "13.0") {
-		let res: SetUserCaptureScreenFail = {
-			errCode: 12001,
-			errSubject: "uni-usercapturescreen",
-			errMsg: "setUserCaptureScreen:system not support"
-		}
-		options.fail?.(res);
-		options.complete?.(res);
-
-	} else if (UIDevice.current.systemVersion == "15.1") {
-		let res: SetUserCaptureScreenFail = {
-			errCode: 12010,
-			errSubject: "uni-usercapturescreen",
-			errMsg: "setUserCaptureScreen:system internal error"
-		}
-		options.fail?.(res);
-		options.complete?.(res);
-	} else {
-		if (options.enable == true) {
-			CaptureScreenTool.offAntiScreenshot(options)
-		} else {
-			CaptureScreenTool.onAntiScreenshot(options)
-		}
-	}
-}
-

+ 0 - 122
uni_modules/uni-usercapturescreen/utssdk/interface.uts

@@ -1,122 +0,0 @@
-/**
-	* uni.onUserCaptureScreen/uni.offUserCaptureScreen回调参数
-	*/
-export type OnUserCaptureScreenCallbackResult = {
-	/**
-		* 截屏文件路径(仅Android返回)
-		*/
-	path ?: string
-}
-
-/**
-	* uni.onUserCaptureScreen/uni.offUserCaptureScreen回调函数定义
-	*/
-export type UserCaptureScreenCallback = (res : OnUserCaptureScreenCallbackResult) => void
-
-/**
-	* uni.onUserCaptureScreen函数定义
-	* 开启截屏监听 
-	* 
-	* @param {UserCaptureScreenCallback} callback 
-	* @tutorial https://uniapp.dcloud.net.cn/api/system/capture-screen.html#onusercapturescreen
-	* @platforms APP-IOS = ^9.0,APP-ANDROID = ^4.4
-	* @since 3.7.7
-	*/
-export type OnUserCaptureScreen = (callback : UserCaptureScreenCallback | null) => void
-
-/**
-	* uni.offUserCaptureScreen函数定义
-	* 关闭截屏监听  
-	* 
-	* @param {UserCaptureScreenCallback} callback 
-	* @tutorial https://uniapp.dcloud.net.cn/api/system/capture-screen.html#offusercapturescreen
-	* @platforms APP-IOS = ^9.0,APP-ANDROID = ^4.4
-	* @since 3.7.7
-	*/
-export type OffUserCaptureScreen = (callback : UserCaptureScreenCallback | null) => void
-
-/**
-	* uni.setUserCaptureScreen成功回调参数
-	*/
-export type SetUserCaptureScreenSuccess = {
-}
-
-/**
-	* uni.setUserCaptureScreen失败回调参数
-	*/
-export type SetUserCaptureScreenFail = {
-	/**
-		* 错误码
-		* 12001:system not support
-		* 12010:system internal error
-		*/
-	errCode : number,
-	/**
-		* 调用API的名称
-		*/
-	errSubject : string,
-	/**
-		* 错误的详细信息
-		*/
-	errMsg : string,
-}
-
-/**
-	* uni.setUserCaptureScreen成功回调函数定义
-	*/
-export type SetUserCaptureScreenSuccessCallback = (res : SetUserCaptureScreenSuccess) => void
-
-/**
-	* uni.setUserCaptureScreen失败回调函数定义
-	*/
-export type SetUserCaptureScreenFailCallback = (res : SetUserCaptureScreenFail) => void
-
-/**
-	* uni.setUserCaptureScreen完成回调函数定义
-	*/
-export type SetUserCaptureScreenCompleteCallback = (res : any) => void
-
-/**
-	* uni.setUserCaptureScreen参数
-	*/
-
-export type SetUserCaptureScreenOptions = {
-	/**
-	* true: 允许用户截屏 false: 不允许用户截屏,防止用户截屏到应用页面内容
-	*/
-	enable : boolean;
-	/**
-	* 接口调用成功的回调函数
-	*/
-	// success : SetUserCaptureScreenSuccessCallback | null,
-	success ?: SetUserCaptureScreenSuccessCallback,
-	/**
-	* 接口调用失败的回调函数
-	*/
-	// fail : SetUserCaptureScreenFailCallback | null,
-	fail ?: SetUserCaptureScreenFailCallback,
-	/**
-	* 接口调用结束的回调函数(调用成功、失败都会执行)
-	*/
-	// complete : SetUserCaptureScreenSuccessCallback | SetUserCaptureScreenFailCallback | null
-	complete ?: SetUserCaptureScreenCompleteCallback
-}
-
-
-/**
- * * uni.setUserCaptureScreen函数定义
-
-	* 设置防截屏  
-	* 
-	* @param {SetUserCaptureScreenOptions} options 
-	* @tutorial https://uniapp.dcloud.net.cn/api/system/capture-screen.html#setusercapturescreen
-	* @platforms APP-IOS = ^13.0,APP-ANDROID = ^4.4
-	* @since 3.7.7
-	*/
-export type SetUserCaptureScreen = (options : SetUserCaptureScreenOptions) => void
-
-export interface Uni {
-	onUserCaptureScreen : OnUserCaptureScreen,
-	offUserCaptureScreen : OffUserCaptureScreen,
-	setUserCaptureScreen : SetUserCaptureScreen
-}

+ 0 - 7
uni_modules/uni-usercapturescreen/utssdk/mp-weixin/index.js

@@ -1,7 +0,0 @@
-export function onUserCaptureScreen (callback) {
-  return wx.onUserCaptureScreen(callback)
-}
-
-export function offUserCaptureScreen (callback) {
-  return wx.offUserCaptureScreen(callback)
-}

+ 0 - 24
uni_modules/zb-tooltip/changelog.md

@@ -1,24 +0,0 @@
-## 1.0.11(2023-01-29)
-优化点击,加入点击自己再次点击也会关闭
-## 1.0.10(2023-01-17)
-优化
-## 1.0.9(2023-01-17)
-增加注释
-## 1.0.8(2022-08-18)
-优化细节
-## 1.0.67(2022-05-09)
-修复安卓报错
-## 1.0.6(2022-05-07)
-修改默认展示
-## 1.0.5(2022-04-28)
-进行优化
-## 1.0.4(2022-04-27)
-进行优化
-## 1.0.3(2022-04-25)
-去掉多余得注释
-## 1.0.2(2022-04-25)
-增加自定义主题颜色
-## 1.0.1(2022-04-25)
-进行优化显示
-## 1.0.0(2022-04-24)
-初始化

+ 0 - 290
uni_modules/zb-tooltip/components/zb-tooltip/zb-tooltip.vue

@@ -1,290 +0,0 @@
-<template>
-	<view class="zb-tooltip" :style="{
-		'--theme-bg-color':color
-	}">
-		<view  class="zb_tooltip_content" @click.stop="handleClick">
-			<slot></slot>
-			<view class="zb_tooltip__popper"
-        @click.stop="()=>{}"
-        :style="[style,{
-				visibility:isShow?'visible':'hidden',
-				color:color==='white'?'':'#fff',
-				boxShadow: color==='white'?'0 3px 6px -4px #0000001f, 0 6px 16px #00000014, 0 9px 28px 8px #0000000d':''
-			}]" >
-				<slot name="content">{{content}}</slot>
-				<view class="zb_popper__icon"  :style="[arrowStyle]" :class="[{
-					'zb_popper__up':placement.indexOf('bottom')===0,
-					'zb_popper__arrow':placement.indexOf('top')===0,
-					'zb_popper__right':placement.indexOf('right')===0,
-					'zb_popper__left':placement.indexOf('left')===0,
-				}]">
-				</view>
-			</view>
-		</view>
-
-	</view>
-</template>
-
-<script>
-	export default {
-		props:{
-			visible:Boolean,
-			color:{
-				type:String,
-				default:'#303133',
-			},
-			placement:{
-				type:String,
-				default:'top',
-			},
-			content:{
-				type:String,
-				default:''
-			},
-			show:{
-				type:Boolean,
-				default:false,
-			}
-		},
-
-		data() {
-			return {
-				isShow :this.visible,
-				title: 'Hello',
-				arrowLeft:0,
-				query:null,
-				style:{
-
-				},
-				arrowStyle:{}
-			}
-		},
-		onLoad() {
-
-		},
-		watch:{
-			isShow:{
-				handler(val){
-					this.$emit('update:visible', val)
-				},
-				immediate:true,
-			},
-			visible:{
-				 handler(val){
-					 if(val){
-						 this.$nextTick(()=>{
-							 this.getPosition()
-						 })
-					 }
-           this.isShow = val
-				 },
-				 immediate:true,
-			}
-		},
-		mounted(){
-			// #ifdef H5
-			window.addEventListener('click',()=>{
-				this.isShow = false
-			})
-			// #endif
-      this.getPosition()
-		},
-		methods: {
-			close(){
-				this.isShow = false
-			},
-			fixedWrap(){
-				this.isShow = false
-			},
-      async handleClick(){
-			  if(this.isShow){
-          return this.isShow = false
-        }
-        await this.getPosition()
-        this.isShow = true
-      },
-			getPosition(){
-			  return new Promise((resolve) => {
-          uni.createSelectorQuery().in(this).selectAll('.zb_tooltip_content,.zb_tooltip__popper').boundingClientRect(async (data)=>{
-            let {left,bottom,right,top,width,height} = data[0]
-            let obj1 = data[1]
-            let objStyle = {}
-            let objStyle1 = {}
-            switch(this.placement){
-              case 'top':
-                if(obj1.width > width){
-                  objStyle.left = `-${(obj1.width - width)/2}px`
-                }else{
-                  objStyle.left = `${Math.abs(obj1.width - width)/2}px`
-                }
-
-                objStyle.bottom =`${height+8}px`
-                objStyle1.left = (obj1.width/2-6)+'px'
-                break;
-              case 'top-start':
-                objStyle.left = `0px`
-                objStyle.bottom =`${height+8}px`
-                break;
-              case 'top-end':
-                objStyle.right = `0px`
-                objStyle.bottom =`${height+8}px`
-                objStyle1.right=`8px`
-                break;
-              case 'bottom':
-                if(obj1.width>width){
-                  objStyle.left = `-${(obj1.width - width)/2}px`
-                }else{
-                  objStyle.left = `${Math.abs(obj1.width - width)/2}px`
-                }
-                objStyle.top =`${height+8}px`
-                objStyle1.left = (obj1.width/2-6)+'px'
-                break;
-              case 'bottom-start':
-                objStyle.left = `0px`
-                objStyle.top =`${height+8}px`
-                objStyle1.left = `8px`
-                break;
-
-              case 'bottom-end':
-                objStyle.right = `0px`
-                objStyle.top =`${height+8}px`
-                objStyle1.right = `8px`
-                break;
-
-              case 'right':
-                objStyle.left = `${width+8}px`
-                if(obj1.height>height){
-                  objStyle.top =`-${(obj1.height - height)/2}px`
-                }else{
-                  objStyle.top =`${Math.abs((obj1.height - height)/2)}px`
-                }
-
-                objStyle1.top = `${obj1.height/2-6}px`
-                break;
-              case 'right-start':
-                objStyle.left = `${width+8}px`
-                objStyle.top =`0px`
-                objStyle1.top = `8px`
-                break;
-
-              case 'right-end':
-                objStyle.left = `${width+8}px`
-                objStyle.bottom =`0px`
-                objStyle1.bottom = `8px`
-                break;
-
-              case 'left':
-                objStyle.right = `${width+8}px`
-
-                if(obj1.height>height){
-                  objStyle.top =`-${(obj1.height - height)/2}px`
-                }else{
-                  objStyle.top =`${Math.abs((obj1.height - height)/2)}px`
-                }
-
-                objStyle1.top = `${obj1.height/2-6}px`
-                break;
-
-              case 'left-start':
-                objStyle.right = `${width+8}px`
-                objStyle.top =`0px`
-                objStyle1.top = `8px`
-                break;
-
-              case 'left-end':
-                objStyle.right = `${width+8}px`
-                objStyle.bottom =`0px`
-                objStyle1.bottom = `8px`
-                break;
-            }
-            this.style = objStyle
-            // 三角形箭头
-            this.arrowStyle = objStyle1
-            resolve()
-          }).exec()
-        })
-
-			}
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	$theme-bg-color: var(--theme-bg-color);
-
-	.zb-tooltip{
-		position: relative;
-
-	}
-	.zb_tooltip_content{
-		height: 100%;
-		/* float: left; */
-		position: relative;
-		display: inline-block;
-
-		// display: flex;
-		// flex-direction: row;
-		// align-items: center;
-		/* overflow: hidden; */
-	}
-	.zb_tooltip__popper{
-		/* transform-origin: center top; */
-		background: $theme-bg-color;
-
-		visibility: hidden;
-		// color:'#fff';
-		position: absolute;
-		    border-radius: 4px;
-			font-size: 12px;
-			padding: 10px;
-			min-width: 10px;
-			word-wrap: break-word;
-			display: inline-block;
-			white-space: nowrap;
-			z-index:9;
-	}
-	.zb_popper__icon{
-		width: 0;
-		height: 0;
-		z-index:9;
-		position: absolute;
-	}
-	.zb_popper__arrow{
-		bottom: -5px;
-		/* transform-origin: center top; */
-		border-left: 6px solid transparent;
-		    border-right: 6px solid transparent;
-		    border-top: 6px solid $theme-bg-color;
-
-	}
-	.zb_popper__right{
-		border-top: 6px solid transparent;
-		    border-bottom: 6px solid transparent;
-		    border-right: 6px solid $theme-bg-color;
-			left:-5px;
-	}
-
-	.zb_popper__left{
-		border-top: 6px solid transparent;
-		border-bottom: 6px solid transparent;
-		border-left: 6px solid $theme-bg-color;
-		right:-5px;
-	}
-
-	.zb_popper__up{
-		border-left: 6px solid transparent;
-		    border-right: 6px solid transparent;
-		    border-bottom: 6px solid $theme-bg-color;
-			top:-5px;
-	}
-	.fixed{
-		position: absolute;width: 100vw;
-		height:  100vh;
-		position: fixed;
-		left: 0;
-		top: 0;
-	pointer-events: auto;
-		background: red;
-		z-index:-1;
-	}
-</style>

+ 0 - 83
uni_modules/zb-tooltip/package.json

@@ -1,83 +0,0 @@
-{
-  "id": "zb-tooltip",
-  "displayName": "zb-tooltip (文字提示气泡框)",
-  "version": "1.0.11",
-  "description": "简单的文字提示气泡框,可以自定义皮肤颜色",
-  "keywords": [
-    "tooltip",
-    "tip",
-    "文字提示",
-    "气泡框",
-    "自定义皮肤颜色、Popover"
-],
-  "repository": "",
-"engines": {
-  },
-  "dcloudext": {
-    "category": [
-        "前端组件",
-        "通用组件"
-    ],
-    "sale": {
-      "regular": {
-        "price": "0.00"
-      },
-      "sourcecode": {
-        "price": "0.00"
-      }
-    },
-    "contact": {
-      "qq": ""
-    },
-    "declaration": {
-      "ads": "无",
-      "data": "无",
-      "permissions": "无"
-    },
-    "npmurl": ""
-  },
-  "uni_modules": {
-    "dependencies": [],
-    "encrypt": [],
-    "platforms": {
-      "cloud": {
-        "tcb": "y",
-        "aliyun": "y"
-      },
-      "client": {
-        "Vue": {
-          "vue2": "y",
-          "vue3": "y"
-        },
-        "App": {
-          "app-vue": "y",
-          "app-nvue": "u"
-        },
-        "H5-mobile": {
-          "Safari": "y",
-          "Android Browser": "y",
-          "微信浏览器(Android)": "y",
-          "QQ浏览器(Android)": "y"
-        },
-        "H5-pc": {
-          "Chrome": "y",
-          "IE": "y",
-          "Edge": "y",
-          "Firefox": "y",
-          "Safari": "y"
-        },
-        "小程序": {
-          "微信": "y",
-          "阿里": "y",
-          "百度": "y",
-          "字节跳动": "y",
-          "QQ": "y"
-        },
-        "快应用": {
-          "华为": "y",
-          "联盟": "y"
-        }
-      }
-    }
-  }
-}

+ 0 - 30
uni_modules/zb-tooltip/readme.md

@@ -1,30 +0,0 @@
-## 介绍
-基于uni-app开发的一个普通的提示组件,功能点击提示
-
-
-## 友情链接
-#### vue-admin-perfect —— [企业级、通用型中后台前端解决方案 预览地址](http://182.61.5.190:8889/)
-#### vue-admin-perfect —— [企业级、通用型中后台前端解决方案(基于vue3.0+TS+Element-Plus  最新版,同时支持电脑,手机,平板)](https://github.com/zouzhibin/vue-admin-perfect)
-
-
-## Tooltip 属性
-| 参数 | 说明 | 类型 | 可选值 | 默认值 |
-| ------ | ------ | ------ | ------ | ------ |
-| visible | 是否显示 tooltip,支持 .sync 修饰符 | Boolean |visible.sync | false |
-| content | 显示的内容,也可以通过 slot#content | String |-- | ' ' |
-| color | 自定义主题颜色| String |'#303133' | '#303133' |
-| placement | Tooltip 的出现位置 | String |top/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end | top |
-
-
-## Slot 插槽
-| 参数 | 说明 |
-| ------ | ------ |
-| content | 显示提示框得内容 |
-
-
-```
-因为uniapp 中小程序中没有window对象,需手动调用 关闭
- 第一种办法关闭:this.$refs.tooltip.close()
- 第二种办法关闭:visible.sync = false
-
-```