Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 9df82257
authored
Aug 13, 2024
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit 提交
1 parent
c357829e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
7 deletions
components/Canvas/wn-canvas.vue
components/Insurance/Insurance.vue
components/Insurance/components/InsurancePopup.vue
components/Insurance/components/InsuranceTable.vue
components/Canvas/wn-canvas.vue
View file @
9df8225
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<view
class=
"wn-canvas"
>
<view
class=
"wn-canvas"
>
<zoom-pan
<zoom-pan
:class=
"['canvas-box',
{fill:custom}]"
:class=
"['canvas-box',
{fill:custom}]"
:disabled="drawStatus"
:disabled="drawStatus
|| !scaleSwitch
"
:scale-max="5"
:scale-max="5"
:scale-min="1"
:scale-min="1"
@scale="scale"
@scale="scale"
...
@@ -169,6 +169,10 @@ export default {
...
@@ -169,6 +169,10 @@ export default {
default
:
'drawCanvas'
default
:
'drawCanvas'
},
},
custom
:
Boolean
,
//自定义
custom
:
Boolean
,
//自定义
scaleSwitch
:{
type
:
Boolean
,
default
:
true
}
},
},
computed
:
{
computed
:
{
watchStatus
()
{
watchStatus
()
{
...
...
components/Insurance/Insurance.vue
View file @
9df8225
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
:drawStatus=
"penSwitch"
:drawStatus=
"penSwitch"
custom
custom
@
scale=
"$emit('scale',$event)"
@
scale=
"$emit('scale',$event)"
:scaleSwitch=
"false"
>
>
<template
slot=
"customContent"
>
<template
slot=
"customContent"
>
<view
class=
"title"
>
<view
class=
"title"
>
...
...
components/Insurance/components/InsurancePopup.vue
View file @
9df8225
...
@@ -117,6 +117,7 @@ export default {
...
@@ -117,6 +117,7 @@ export default {
color
:
#292d33
;
color
:
#292d33
;
line-height
:
48
rpx
;
line-height
:
48
rpx
;
overflow-y
:
auto
;
overflow-y
:
auto
;
word-break
:
break-all
;
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
\ No newline at end of file
components/Insurance/components/InsuranceTable.vue
View file @
9df8225
...
@@ -207,7 +207,7 @@ export default {
...
@@ -207,7 +207,7 @@ export default {
e
.
checked
=
true
e
.
checked
=
true
e
.
main
=
e
.
itemName
==
'交强险'
?
'交强险'
:
'商业险'
e
.
main
=
e
.
itemName
==
'交强险'
?
'交强险'
:
'商业险'
e
.
show
=
false
e
.
show
=
false
e
.
itemDesc
=
this
.
processHtmlString
(
e
.
itemDesc
)
e
.
itemDesc
=
e
.
itemDesc
?
this
.
processHtmlString
(
e
.
itemDesc
)
:
''
})
})
if
(
!
storageInsuranceList
)
{
if
(
!
storageInsuranceList
)
{
uni
.
showLoading
({
uni
.
showLoading
({
...
@@ -246,11 +246,17 @@ export default {
...
@@ -246,11 +246,17 @@ export default {
this
.
flag
=
true
this
.
flag
=
true
},
},
processHtmlString
(
htmlString
)
{
processHtmlString
(
htmlString
)
{
const
regexStyle
=
/style="
[^
"
]
*"/g
// 移除 `<br>` 及其变体,并用 `<div></div>` 替换
const
regexBr
=
/<
\/
br>|<br>|<br
\/
>|
\n
/g
let
processedString
=
htmlString
.
replace
(
/<
\/?
br
\s
*
\/?
>|
\n
/g
,
'<div></div>'
)
let
processedString
=
htmlString
.
replace
(
regexBr
,
'<div></div>'
)
// 移除 `style` 属性
let
newHtmlString
=
processedString
.
replace
(
regexStyle
,
''
)
processedString
=
processedString
.
replace
(
/style="
[^
"
]
*"/g
,
''
);
return
newHtmlString
// 移除 `<strong>`, `</strong>`, `<em>`, `</em>` 和孤立的 `<` 标签
processedString
=
processedString
.
replace
(
/<strong>|<
\/
strong>|<em>|<
\/
em>|<>/g
,
''
);
// 替换非 `div` 和非 `span` 的 HTML 标签
processedString
=
processedString
.
replace
(
/<
(?!
div|span
)[^
>
]
*>/g
,
'<div>'
);
processedString
=
processedString
.
replace
(
/<
\/(?!
div|span
)
>/g
,
'</div>'
);
return
processedString
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment