7.8.153 • Published 9 months ago

@firanorg/perferendis-iusto-vitae v7.8.153

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

@firanorg/perferendis-iusto-vitae

前端程序的一个公共方法库,包括:domReady、children、append、find、jsonFormData、setUrlParam等公共方法。

安装

npm i @firanorg/perferendis-iusto-vitae

使用

代码中先引入后正常调用其包括的方法

//根据实际需要引入方法
import {domReady,jsonFormData} from '@firanorg/perferendis-iusto-vitae';

方法说明

domReady

HTML页面加载完成后触发执行

代码示例

import {
    domReady
} from '@firanorg/perferendis-iusto-vitae'
import xqTabForm from "./xq-tab-form";

domReady(() => {
    xqTabForm()
})

windowReady

HTML网页窗口加载完成后触发执行

代码示例

import {
    windowReady
} from '@firanorg/perferendis-iusto-vitae'
import xqTabForm from "./xq-tab-form";

windowReady(() => {
    xqTabForm()
})

slideUp

HTML网页元素向上缩起(隐藏元素)

代码示例

import {
    slideUp
} from '@firanorg/perferendis-iusto-vitae'

const testElement=document.querySelector('#test')
//#test元素将被隐藏(向上缩小直到高度为0)
slideUp(testElement)
slideUp(testElement,500)//可以设置隐藏动画持续的时间

slideDown

HTML网页元素向下展示(显示元素)

代码示例

import {
    slideDown
} from '@firanorg/perferendis-iusto-vitae'

const testElement=document.querySelector('#test')
//#test元素将被向下展示出来(高度为元素能显示完的高度)
slideDown(testElement)
slideDown(testElement,500)//可以设置向下展示动画持续的时间

slideToggle

HTML网页元素显示与隐藏切换,显示变隐藏,隐藏会变显示

代码示例

import {
    slideToggle
} from '@firanorg/perferendis-iusto-vitae'

const testElement=document.querySelector('#test')
slideToggle(testElement)
slideToggle(testElement,500)//可以设置动画持续的时间

children

返回HTML元素匹配选择器的子元素数组

代码示例

import {
    children
} from '@firanorg/perferendis-iusto-vitae'

const testElement=document.querySelector('#test')
//返回#test下匹配#t1选择器的子元素数组
children(testElement,'#t1')

parent

返回HTML元素匹配选择器的一个父元素

代码示例

import {
    parent
} from '@firanorg/perferendis-iusto-vitae'

const testElement=document.querySelector('#test')
//返回#test下匹配#t1选择器的一个父元素
parent(testElement,'#t1')

parents

返回HTML元素匹配选择器的父元素数组

代码示例

import {
    parents
} from '@firanorg/perferendis-iusto-vitae'

const testElement=document.querySelector('#test')
//返回#test下匹配#t1选择器的父元素数组
parents(testElement,'#t1')

prev

返回HTML元素匹配选择器的前面相邻元素数组

代码示例

import {
    prev
} from '@firanorg/perferendis-iusto-vitae'

const testElement=document.querySelector('#test')
//返回#test下匹配#t1选择器的前面相邻元素数组
prev(testElement,'#t1')

next

返回HTML元素匹配选择器的后面相邻元素数组

代码示例

import {
    next
} from '@firanorg/perferendis-iusto-vitae'

const testElement=document.querySelector('#test')
//返回#test下匹配#t1选择器的后面相邻元素数组
next(testElement,'#t1')

append

在HTML元素内部最后面添加元素(字符串形式表示)

代码示例

import {
    append
} from '@firanorg/perferendis-iusto-vitae'

const testElement=document.querySelector('#test')
//返回#test元素内部最后面添加<p>添加的元素</p>
append(testElement,'<p>添加的元素</p>')

prepend

在HTML元素内部最前面添加元素(字符串形式表示)

代码示例

import {
    prepend
} from '@firanorg/perferendis-iusto-vitae'

const testElement=document.querySelector('#test')
//返回#test元素内部最前面添加<p>添加的元素</p>
prepend(testElement,'<p>添加的元素</p>')

before

在HTML元素前面添加元素(字符串形式表示)

代码示例

import {
    before
} from '@firanorg/perferendis-iusto-vitae'

const testElement=document.querySelector('#test')
//返回#test元素前面添加<p>添加的元素</p>
before(testElement,'<p>添加的元素</p>')

after

在HTML元素后面添加元素(字符串形式表示)

代码示例

import {
    after
} from '@firanorg/perferendis-iusto-vitae'

const testElement=document.querySelector('#test')
//返回#test元素后面添加<p>添加的元素</p>
after(testElement,'<p>添加的元素</p>')

find

查找指定选择器的HTML元素数组

代码示例

import {
    find
} from '@firanorg/perferendis-iusto-vitae'
//返回所有p标签元素数组
find('p')

findOne

查找指定选择器的一个HTML元素

代码示例

import {
    findOne
} from '@firanorg/perferendis-iusto-vitae'
//返回一个p标签元素
findOne('p')

jsonFormData

将指定的表单填写的数组转为json格式

代码示例

import {
    jsonFormData
} from '@firanorg/perferendis-iusto-vitae'
const form=findOne('#form1')
const json=jsonFormData(form)
execdescriptorsBigUint64ArraytypedsymbolsInt16ArraycloudfrontdirectorydomECMAScript 3browserlistprocesses6loggerES6regularObject.assignhasOwnReflect.getPrototypeOfbufferhigher-orderfast-deep-cloneuplinknamecssargumentzeroreact-hooksStreamsforEachhasyamlECMAScript 2022Array.prototype.filterobjectpromiseconcatMaplibphonenumbercolumnstoolstimereplayES7amazonpackageObservablespersistentencryptionfluxURLless cssdropmimetypesArraywindowsexpressionregexflagrestfuldependencieslogpackage managercloudtrailstylesheetslicestringfile systemrouterES2021languagestringifierstyleshas-ownquotewatchFileyupcryptophonegetArray.prototype.flatsharedkeyObject.getPrototypeOfs3writestoragegatewaynativedefineonceemojiArray.prototype.includesweakmapgetintrinsicparseES8Observablees2016protobufjsdomcircularRFC-6455idleESa11ymonorepobyteLengthES2016xhrwafes-shimswhichexit-codedeepcloneformattingeskoreanES3regular expressionfindreduxFunction.prototype.namepolyfillcomputed-typesbindmapreduceequalityBigInt64Arrayreact-hook-formpredictableinstallparsingstreamscjkprivate datawarningquerystringvaluesnodejsopenRegExp.prototype.flagsUint8ClampedArraygradients csscontainsinspectinterruptsMapMicrosoftclassnameslinewrapasciieventDispatchertypesafecss-in-jsswfspeedi18nfilterglobalrobustworkflowjsonpathUint16Arraystartervaluel10nawaitsettingsinferencequeuecachebddbootstrap lessreducerasyncidsignaltyped arrayspinneres2017getPrototypeOfinternal slotgroupawesomesaucechromewalksyntaxObject.entriestypedarraysuninstallassertutil.inspectsigintRxnegativesetImmediatesetterstyleguidecolour.envWebSockettextponyfilldefinePropertyerror-handlingcheckcomparewatcheslint-pluginspinnersprivatestdlibarktypecoloroptimisteslintplugindataViewtc39fromfolderrm -frchaischeme-validationkinesisutilityReactiveExtensionstoArraysortedInt8ArraymatchAllsuperagentastES5classnameenderpropUint32ArrayECMAScript 2023regexpfseventsECMAScript 2020safeenvironmentswritablesuperstructpushTypedArraypnpm9ESnextschemacallboundTypeBoxes5readablesignalsfast-copyqsconsumeexpresspicomatchcommandercall-boundstableutilArray.prototype.flatMapjavascriptsetPrototypeOfpackagesutilitieswidthfastproxyprogressPushiterationparentsfullless mixinsmkdirpless.jsgetoptcss variabledescriptionvariables in csspasswordauthruntimemrufast-cloneclass-validatorartObject.keysJSONdayjsdescriptorenumerablepipelimitsyntaxerroransiwgetcompile lessfetch[[Prototype]]es2015iamserializerFloat32Arrayes-abstractequalcall-bindWeakSetoutputmapwatcherowniteratorpostcssdeleteimmerlistenersdeepcopy__proto__busyconfigurableappcorsECMAScript 6termvisualCSSStyleDeclarationform-validationtostringtagrestuuidzodstateFloat64ArrayECMAScript 2017jasminerangeerrorapinodeECMAScript 2021elbfileSetconsoledotenvdebuggerinternalcreateviewworkspace:*shamefficientschemepatchsomebatchthroatimmutablehttphasOwnPropertycallsesfunctionalhttpsSymbol.toStringTagajvargslengthhelperselasticachefull-widthreuseJSON-SchemaieemitdeterministicavatoobjectpreprocessorString.prototype.matchAllpathajaxbreakArray.prototype.containsglacieres2018arraybufferhookformenvelectrones8waitglobpropertieses7webworkerclonehookstypeofconfigdatemodulethrottlesetYAMLagenttoSortedArray.prototype.flattenoptimizertoolkitcommand-linedatastructureformwordbreakvariablesduplexshebangeventsbeanstalksameValueZeropruneio-tswalkingsymlinksdirObjecttrimStarttouch$.extendtraversenpmlastES2023genericsremovejsdiffTypeScripttapefastifyreact-testing-libraryrapidfast-deep-copymacosenvironmentdeepObject.definePropertyregular expressionsstylingObject.valuesrateescapeunicodefunctiontoStringTagvpcinputlookECMAScript 2019real-timekeyspreserve-symlinkstrimRightmomentnopebytepyyamltypedarrayjapaneseentriesfullwidthStreamtaskrequestlintfastcopytscode pointstesterjestprotocol-bufferswrapdeep-clonevalidatelinuxvestbannerexitRxJSmkdirreadablestreamprotoshrinkwrapflattenfind-upredux-toolkitjshintECMAScript 2015liveisConcatSpreadableconnectfslesstakedebugtrimLeftfpssequencewatchingjsxbrowserclassesclitelephoneoffsetrmdirpackage.jsonchannelpropertyaccessorWeakMaptrimindicatorAsyncIteratorReactiveXECMAScript 2018concatmetadatahardlinkscloudwatchbrowserslistbcryptoperating-systemcensorgetOwnPropertyDescriptorlrucryptguid
7.8.153

9 months ago

7.8.152

9 months ago

7.7.146

9 months ago

7.7.147

9 months ago

7.8.150

9 months ago

7.8.149

9 months ago

7.8.148

9 months ago

7.8.147

9 months ago

7.6.145

10 months ago

7.6.144

10 months ago

7.6.143

10 months ago

7.6.142

10 months ago

7.8.151

9 months ago

7.6.146

9 months ago

7.6.141

10 months ago

7.6.140

10 months ago

7.6.139

10 months ago

7.6.138

10 months ago

7.6.137

10 months ago

7.6.136

10 months ago

7.6.135

10 months ago

6.6.135

10 months ago

6.6.134

10 months ago

6.6.133

10 months ago

6.6.132

10 months ago

6.6.131

10 months ago

6.6.124

10 months ago

6.6.126

10 months ago

6.6.125

10 months ago

6.6.128

10 months ago

6.6.127

10 months ago

6.6.129

10 months ago

6.6.130

10 months ago

6.6.123

10 months ago

6.6.122

10 months ago

6.6.121

10 months ago

6.6.119

10 months ago

6.6.118

10 months ago

6.6.120

10 months ago

6.6.117

10 months ago

6.6.115

11 months ago

6.6.116

11 months ago

6.6.114

11 months ago

6.6.113

11 months ago

6.6.112

11 months ago

6.6.111

11 months ago

6.6.110

11 months ago

6.6.109

11 months ago

6.6.108

11 months ago

6.6.107

11 months ago

6.5.107

11 months ago

4.5.72

12 months ago

4.5.73

12 months ago

4.5.70

12 months ago

4.5.71

12 months ago

4.5.76

12 months ago

4.5.77

12 months ago

4.5.74

12 months ago

4.5.75

12 months ago

5.5.103

11 months ago

5.5.101

11 months ago

4.5.78

12 months ago

5.5.102

11 months ago

4.5.79

12 months ago

2.3.38

1 year ago

4.5.69

1 year ago

2.5.58

1 year ago

2.3.35

1 year ago

2.5.59

1 year ago

2.3.34

1 year ago

2.3.37

1 year ago

2.3.36

1 year ago

2.3.31

1 year ago

2.5.55

1 year ago

2.5.56

1 year ago

2.3.33

1 year ago

2.5.57

1 year ago

2.3.32

1 year ago

2.5.60

1 year ago

4.5.90

11 months ago

4.5.91

11 months ago

4.5.94

11 months ago

4.5.95

11 months ago

4.5.92

11 months ago

4.5.93

11 months ago

4.5.96

11 months ago

2.5.61

1 year ago

2.5.62

1 year ago

2.5.63

1 year ago

5.5.96

11 months ago

5.5.100

11 months ago

4.5.80

12 months ago

4.5.83

12 months ago

4.5.84

12 months ago

4.5.81

12 months ago

4.5.82

12 months ago

4.5.87

12 months ago

4.5.88

12 months ago

4.5.85

12 months ago

4.5.86

12 months ago

4.5.89

12 months ago

5.5.99

11 months ago

5.5.97

11 months ago

5.5.98

11 months ago

2.2.17

1 year ago

2.4.39

1 year ago

2.2.18

1 year ago

2.4.38

1 year ago

3.5.69

1 year ago

3.5.68

1 year ago

3.5.67

1 year ago

3.5.66

1 year ago

3.5.65

1 year ago

3.5.64

1 year ago

3.5.63

1 year ago

2.2.19

1 year ago

2.2.28

1 year ago

2.2.29

1 year ago

2.2.26

1 year ago

2.2.27

1 year ago

2.4.47

1 year ago

2.2.24

1 year ago

2.4.46

1 year ago

2.2.25

1 year ago

2.4.49

1 year ago

2.2.22

1 year ago

2.4.48

1 year ago

2.2.23

1 year ago

2.4.43

1 year ago

2.2.20

1 year ago

2.4.42

1 year ago

2.2.21

1 year ago

2.4.45

1 year ago

2.4.44

1 year ago

2.4.41

1 year ago

2.4.40

1 year ago

2.4.54

1 year ago

2.2.31

1 year ago

2.4.53

1 year ago

2.4.55

1 year ago

2.2.30

1 year ago

2.4.50

1 year ago

2.4.52

1 year ago

2.4.51

1 year ago

6.5.103

11 months ago

6.5.104

11 months ago

6.5.105

11 months ago

6.5.106

11 months ago

2.1.17

1 year ago

2.1.16

1 year ago

2.1.14

1 year ago

2.1.15

1 year ago

1.1.14

1 year ago

1.1.13

1 year ago

1.1.12

1 year ago

1.1.11

1 year ago

1.1.10

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago