Compare commits

...

2 Commits

Author SHA1 Message Date
zh
8025a298a2 修复线段标签背景修改无效的问提 2025-08-22 14:23:06 +08:00
zh
0f518ef6cb 富文本添加图片设置上传 2025-08-22 10:14:12 +08:00
2 changed files with 36 additions and 14 deletions

View File

@ -825,7 +825,6 @@ class PolylineObject extends Base {
set labelLineColor(v) { set labelLineColor(v) {
this.options.label.lineColor = v this.options.label.lineColor = v
this.label.lineColor = v this.label.lineColor = v
let _this = this
if (this._elms.labelLineColor) { if (this._elms.labelLineColor) {
this._elms.labelLineColor.forEach((item, i) => { this._elms.labelLineColor.forEach((item, i) => {
let lineColorPicker = new YJColorPicker({ let lineColorPicker = new YJColorPicker({
@ -840,6 +839,29 @@ class PolylineObject extends Base {
}, //点击确认按钮事件回调 }, //点击确认按钮事件回调
clear: () => { clear: () => {
this.labelLineColor = 'rgba(0,255,255,0.5)' this.labelLineColor = 'rgba(0,255,255,0.5)'
} //点击清空按钮事件回调
})
this._elms.labelLineColor[i] = lineColorPicker
})
}
}
get labelBackgroundColorStart() {
return this.options.label.backgroundColor[0]
}
set labelBackgroundColorStart(v) {
this.options.label.backgroundColor[0] = v
this.label.backgroundColor = [v, this.label.backgroundColor[1]]
if (this._elms.labelBackgroundColorStart) {
this._elms.labelBackgroundColorStart.forEach((item, i) => {
let labelBackgroundColorStartPicker = new YJColorPicker({
el: item.el,
size: 'mini', //颜色box类型
alpha: true, //是否开启透明度
defaultColor: this.labelBackgroundColorStart,
disabled: false, //是否禁止打开颜色选择器
openPickerAni: 'opacity', //打开颜色选择器动画
sure: color => {
this.labelBackgroundColorStart = color this.labelBackgroundColorStart = color
}, //点击确认按钮事件回调 }, //点击确认按钮事件回调
clear: () => { clear: () => {
@ -848,7 +870,7 @@ class PolylineObject extends Base {
}) })
this._elms.labelBackgroundColorStart[ this._elms.labelBackgroundColorStart[
i i
] = _this.labelBackgroundColorStartPicker ] = labelBackgroundColorStartPicker
}) })
} }
} }

View File

@ -56,8 +56,8 @@ class richText {
MENU_CONF: { MENU_CONF: {
uploadImage: { uploadImage: {
fieldName: 'file', fieldName: 'file',
maxFileSize: 50 * 1024 * 1024, // maxFileSize: 50 * 1024 * 1024,
base64LimitSize: 50 * 1024 * 1024, // 50M 以下插入 base64 // base64LimitSize: 50 * 1024 * 1024, // 50M 以下插入 base64
server: this.uploadImageServer, server: this.uploadImageServer,
// // 上传之前触发 // // 上传之前触发
// onBeforeUpload(file) { // TS 语法 // onBeforeUpload(file) { // TS 语法
@ -95,18 +95,18 @@ class richText {
// console.log(`${file.name} 上传出错`, err, res) // console.log(`${file.name} 上传出错`, err, res)
// }, // },
// // 自定义上传 // 自定义上传
// async customUpload(file, insertFn) { // TS 语法 async customUpload(file, insertFn) { // TS 语法
// // async customUpload(file, insertFn) { // JS 语法 // async customUpload(file, insertFn) { // JS 语法
// // file 即选中的文件 // file 即选中的文件
// // 自己实现上传,并得到图片 url alt href // 自己实现上传,并得到图片 url alt href
// // 最后插入图片 // 最后插入图片
// console.log(file, insertFn) let url = await _this.upload(file)
// insertFn(url, file.name) insertFn((_this.host = _this.host || getHost()) + '/' + url)
// } }
}, },
uploadVideo: { uploadVideo: {
maxFileSize: 500 * 1024 * 1024, // maxFileSize: 500 * 1024 * 1024,
server: this.uploadVideoServer, server: this.uploadVideoServer,
allowedFileTypes: ['video/mp4', 'video/mp3', 'video/ogg', 'video/webm', 'video/avi'], allowedFileTypes: ['video/mp4', 'video/mp3', 'video/ogg', 'video/webm', 'video/avi'],
// 自定义上传 // 自定义上传