🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

complex-plugin

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

complex-plugin - npm Package Compare versions

Comparing version
4.8.1
to
4.8.2
+3
-0
history.md
### ToDo
### 4.8.2
- 基于AI优化代码
### 4.8.1

@@ -4,0 +7,0 @@ - 稳定版升级

+1
-1

@@ -16,3 +16,3 @@ import date from "./src/date"

if (options.date === false) {
date.destory()
date.destroy()
}

@@ -19,0 +19,0 @@ }

{
"name": "complex-plugin",
"version": "4.8.1",
"version": "4.8.2",
"description": "a complex plugin",

@@ -11,3 +11,3 @@ "main": "index.ts",

"dependencies": {
"complex-utils": "2.8.1 - 2.8.99"
"complex-utils": "2.8.3 - 2.8.99"
},

@@ -14,0 +14,0 @@ "devDependencies": {

@@ -27,7 +27,6 @@ import { _Data } from "complex-utils"

$timer: number
constructor(initOption: PluginDateInitOption = {}) {
constructor({ rule = {}, parser = {}, offset = defaultOffset }: PluginDateInitOption = {}) {
super()
this.$rule = initOption.rule || {}
this.$parser = initOption.parser || {}
const offset = initOption.offset || defaultOffset
this.$rule = rule
this.$parser = parser
this.$offset = {

@@ -128,3 +127,3 @@ value: offset,

}
destory() {
destroy() {
this.clear()

@@ -131,0 +130,0 @@ }

@@ -177,3 +177,3 @@ import { _Data, Life, throttle } from "complex-utils"

}
destory() {
destroy() {
window.removeEventListener('resize', this.func)

@@ -180,0 +180,0 @@ }

@@ -37,3 +37,3 @@ import { Wait } from "complex-utils"

const notice: noticeType = {
message: function(_content, _type, _title, _duration, _option = {}) {
message: (_content, _type, _title, _duration, _option = {}) => {
wait!.push(() => {

@@ -43,3 +43,3 @@ notice.message(_content, _type, _title, _duration, _option)

},
alert: function(_content, _title, _next, _okText) {
alert: (_content, _title, _next, _okText) => {
wait!.push(() => {

@@ -49,3 +49,3 @@ notice.alert(_content, _title, _next, _okText)

},
confirm: function(_content, _title, _next, _okText, _cancelText) {
confirm: (_content, _title, _next, _okText, _cancelText) => {
wait!.push(() => {

@@ -55,20 +55,16 @@ notice.confirm(_content, _title, _next, _okText, _cancelText)

},
$debugConfirm(development: boolean, debugLevel: number, option: debugConfirmOption) {
const targerDebugLevel = option.debugLevel || 0
if (debugLevel > targerDebugLevel || (development && option.development !== false)) {
$debugConfirm(development, debugLevel, option) {
const targetDebugLevel = option.debugLevel || 0
if (debugLevel > targetDebugLevel || (development && option.development !== false)) {
// debug级别大于设置的触发级别时或开发模式下且未设置开发模式不确认情况
let isTimeout = false
const timer = setTimeout(function() {
const timer = setTimeout(() => {
isTimeout = true
option.next('timeout', development, debugLevel)
}, option.offset || 5000)
notice.confirm(option.content, debugLevel > targerDebugLevel ? '调试模式操作确认' : '开发模式操作确认', function(act) {
notice.confirm(option.content, debugLevel > targetDebugLevel ? '调试模式操作确认' : '开发模式操作确认', (act) => {
if (!isTimeout) {
// 未超时则操作后取消定时器
clearTimeout(timer)
if (act === 'ok') {
option.next('ok', development, debugLevel)
} else {
option.next('cancel', development, debugLevel)
}
option.next(act === 'ok' ? 'ok' : 'cancel', development, debugLevel)
}

@@ -81,3 +77,3 @@ // 超时已经触发回调,此处不做任何处理,避免回调的2次调用

},
debugConfirm: function(_option) {
debugConfirm: (_option) => {
wait!.push(() => {

@@ -87,3 +83,3 @@ notice.debugConfirm(_option)

},
init(options: noticeOption) {
init(options) {
for (const prop in options) {

@@ -90,0 +86,0 @@ this[prop as keyof noticeOption] = options[prop as keyof noticeOption] as any