@kyfe/hroa-ui 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hroa-ui.common.js +898 -3635
- package/dist/hroa-ui.css +1 -6
- package/dist/hroa-ui.umd.js +898 -3635
- package/dist/hroa-ui.umd.min.js +2 -2
- package/dist/img/add.713653a8.svg +1 -0
- package/dist/img/close.6ef706b9.svg +1 -0
- package/lib/getJsModule/index.css +1 -6
- package/lib/getJsModule/index.js +2 -2
- package/lib/hr-add-list/index.css +1 -0
- package/lib/hr-add-list/index.js +1 -0
- package/lib/hr-bottom-button/index.js +1 -1
- package/lib/hr-breadcrumb/index.css +1 -0
- package/lib/hr-breadcrumb/index.js +9 -0
- package/lib/hr-button/index.js +1 -1
- package/lib/hr-clipboard/index.js +1 -1
- package/lib/hr-condition-filtrate/index.js +1 -1
- package/lib/hr-condition-filtrate-popup/index.js +1 -1
- package/lib/hr-elasticity-box/index.js +1 -1
- package/lib/hr-elasticity-box-item/index.js +1 -1
- package/lib/hr-emotional-picture/index.js +1 -1
- package/lib/hr-employee-choose/index.js +1 -1
- package/lib/hr-img-list/index.css +1 -1
- package/lib/hr-img-list/index.js +1 -1
- package/lib/hr-info-card/index.js +1 -1
- package/lib/hr-information/index.css +1 -0
- package/lib/hr-information/index.js +1 -0
- package/lib/hr-license-plate-number/index.js +1 -1
- package/lib/hr-module-card/index.js +1 -1
- package/lib/hr-multiterm-choose/index.css +1 -1
- package/lib/hr-multiterm-choose/index.js +1 -1
- package/lib/hr-no-data/index.js +1 -1
- package/lib/hr-notice-bar/index.js +1 -1
- package/lib/hr-open-ks/index.js +1 -1
- package/lib/hr-pager/index.js +1 -1
- package/lib/hr-popup/index.css +1 -1
- package/lib/hr-popup/index.js +1 -1
- package/lib/hr-preview-file/index.js +1 -1
- package/lib/hr-rate/index.js +1 -1
- package/lib/hr-reason-textarea/index.js +1 -1
- package/lib/hr-search-input/index.js +1 -1
- package/lib/hr-select/index.js +1 -1
- package/lib/hr-select-list/index.css +1 -1
- package/lib/hr-select-list/index.js +2 -2
- package/lib/hr-single-choose/index.css +1 -1
- package/lib/hr-single-choose/index.js +1 -1
- package/lib/hr-slide-pager/index.js +1 -1
- package/lib/hr-sort/index.js +1 -1
- package/lib/hr-stack-image/index.js +1 -1
- package/lib/hr-tab-nav/index.js +1 -1
- package/lib/hr-view-item/index.js +1 -1
- package/lib/img/add.713653a8.svg +1 -0
- package/lib/img/close.6ef706b9.svg +1 -0
- package/lib/index/index.css +1 -6
- package/lib/index/index.js +2 -2
- package/lib/utils/index.js +1 -1
- package/package.json +1 -1
- package/packages/hr-add-list/image/add.svg +1 -0
- package/packages/hr-add-list/image/close.svg +1 -0
- package/packages/hr-add-list/index.js +7 -0
- package/packages/hr-add-list/src/index.vue +125 -0
- package/packages/hr-breadcrumb/index.js +3 -0
- package/packages/hr-breadcrumb/src/index.vue +87 -0
- package/packages/hr-breadcrumb//351/235/242/345/214/205/345/261/221.md +0 -0
- package/packages/hr-information/index.js +7 -0
- package/packages/hr-information/src/index.vue +71 -0
- package/packages/hr-multiterm-choose/src/index.vue +30 -17
- package/packages/hr-popup/src/index.vue +5 -1
- package/packages/hr-select-list/src/index.vue +34 -6
- package/packages/hr-single-choose/src/index.vue +2 -2
- package/packages/hr-slide-pager/src/index.vue +6 -1
- package/lib/hr-at-input/index.css +0 -6
- package/lib/hr-at-input/index.js +0 -1
- package/packages/hr-at-input/index.js +0 -7
- package/packages/hr-at-input/src/blot/atPerson.js +0 -43
- package/packages/hr-at-input/src/index.vue +0 -472
- package/packages/hr-at-input/src/quill.snow.css +0 -945
- package/packages/hr-at-input/src/utils/index.js +0 -60
- /package/packages/{hr-at-input//346/224/257/346/214/201@/351/200/211/344/272/272/350/276/223/345/205/245/346/241/206.md" → hr-add-list//346/226/260/345/242/236/345/244/232/347/254/224/346/225/260/346/215/256.md"} +0 -0
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description at标签转化为自定义标识文本
|
|
3
|
-
* @param {String} content
|
|
4
|
-
* @returns {String}
|
|
5
|
-
*/
|
|
6
|
-
export function atTranslateStr (content) {
|
|
7
|
-
try {
|
|
8
|
-
let reg = /<at\b[^>][^>]*>([\s\S]*?)<\/at>/g
|
|
9
|
-
const ats = content.match(reg)
|
|
10
|
-
if (ats && ats.length > 0) {
|
|
11
|
-
ats.forEach(item => {
|
|
12
|
-
let alts = item.matchAll(/alt="(\S+, \S+)"/g)
|
|
13
|
-
alts = [...alts]
|
|
14
|
-
console.log('alts', alts)
|
|
15
|
-
if (alts && alts.length > 0) {
|
|
16
|
-
const alt = alts[0][1]
|
|
17
|
-
const str = '$_hl{' + alt + '}'
|
|
18
|
-
content = content.replace(item, str)
|
|
19
|
-
}
|
|
20
|
-
})
|
|
21
|
-
}
|
|
22
|
-
return content
|
|
23
|
-
} catch (err) {
|
|
24
|
-
return content
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const IsIOS = window.navigator.userAgent.indexOf('iPhone') > -1
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* @description 将自定义标记文本转为at标签
|
|
32
|
-
* @param {String} content
|
|
33
|
-
* @param {Boolean} isQuillUse 是否在quill富文本使用(默认是)
|
|
34
|
-
* @returns {String}
|
|
35
|
-
*/
|
|
36
|
-
export function strTranslateAt (content, isQuillUse = true) {
|
|
37
|
-
try {
|
|
38
|
-
let reg = /\$_hl{(\S+, \S+)}/g
|
|
39
|
-
let alts = content.matchAll(reg)
|
|
40
|
-
alts = [...alts]
|
|
41
|
-
|
|
42
|
-
if (alts && alts.length > 0) {
|
|
43
|
-
alts.forEach(item => {
|
|
44
|
-
let tag = item[0] // '$_hl{130338, @余达睿}'
|
|
45
|
-
let alt = item[1] // '130338, @余达睿'
|
|
46
|
-
let employeeNumber = alt.split(',')[0]
|
|
47
|
-
let employeeName = alt.split(',')[1].slice(1)
|
|
48
|
-
let html = `<at>${employeeName}/${employeeNumber}</at>`
|
|
49
|
-
// 不在quill使用时需转成完整的html
|
|
50
|
-
if (!isQuillUse) {
|
|
51
|
-
html = `<at class="at" alt="${employeeNumber}, ${employeeName}" style="color: rgb(121, 114, 254); display: ${ IsIOS ? 'inline-flex' : 'inline-block' };"><span contenteditable="false">@${employeeName} </span></at>`
|
|
52
|
-
}
|
|
53
|
-
content = content.replaceAll(tag, html)
|
|
54
|
-
})
|
|
55
|
-
}
|
|
56
|
-
return content
|
|
57
|
-
} catch (err) {
|
|
58
|
-
return content
|
|
59
|
-
}
|
|
60
|
-
}
|