@yoooloo42/joker 1.0.64 → 1.0.66
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/index.cjs.js +42 -27
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +42 -27
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -21967,7 +21967,7 @@ const upload$1 = '/ly0/upload-req/image';
|
|
|
21967
21967
|
const upload_carplate = '/ly0/upload-req/carplate';
|
|
21968
21968
|
|
|
21969
21969
|
// 后端请求
|
|
21970
|
-
async function request$
|
|
21970
|
+
async function request$1(_ref) {
|
|
21971
21971
|
let {
|
|
21972
21972
|
domain,
|
|
21973
21973
|
url,
|
|
@@ -21997,7 +21997,7 @@ async function ly0request(_ref2) {
|
|
|
21997
21997
|
data // 请求数据
|
|
21998
21998
|
} = _ref2;
|
|
21999
21999
|
try {
|
|
22000
|
-
const response = await request$
|
|
22000
|
+
const response = await request$1({
|
|
22001
22001
|
domain,
|
|
22002
22002
|
url,
|
|
22003
22003
|
data
|
|
@@ -22036,7 +22036,7 @@ async function storpro(_ref3) {
|
|
|
22036
22036
|
} = _ref3;
|
|
22037
22037
|
try {
|
|
22038
22038
|
const result = await ly0request({
|
|
22039
|
-
domain,
|
|
22039
|
+
domain: domain ? domain : domainPara,
|
|
22040
22040
|
url: '/ly0/storpro/exec',
|
|
22041
22041
|
data: {
|
|
22042
22042
|
noSession: noSession && (noSession === true || noSession === 'true') ? noSession : false,
|
|
@@ -22120,7 +22120,7 @@ var ly0request$1 = {
|
|
|
22120
22120
|
domain: domainPara,
|
|
22121
22121
|
upload: upload$1,
|
|
22122
22122
|
upload_carplate,
|
|
22123
|
-
request: request$
|
|
22123
|
+
request: request$1,
|
|
22124
22124
|
ly0request,
|
|
22125
22125
|
storpro,
|
|
22126
22126
|
ly0sessionSave,
|
|
@@ -22130,7 +22130,7 @@ var ly0request$1 = {
|
|
|
22130
22130
|
ly0sessionLoseWithUsertbl
|
|
22131
22131
|
};
|
|
22132
22132
|
|
|
22133
|
-
var request
|
|
22133
|
+
var request = {
|
|
22134
22134
|
ly0: ly0request$1
|
|
22135
22135
|
};
|
|
22136
22136
|
|
|
@@ -40688,26 +40688,41 @@ import '@vueup/vue-quill/dist/vue-quill.snow.css' // snow主题
|
|
|
40688
40688
|
import '@vueup/vue-quill/dist/vue-quill.bubble.css'
|
|
40689
40689
|
*/
|
|
40690
40690
|
|
|
40691
|
+
/*
|
|
40692
|
+
在外部引用您的富文本组件时,您应该使用以下写法:
|
|
40693
|
+
<ly0Richtext v-model="richtextValue" :myProps="richtextProps"></ly0Richtext>
|
|
40694
|
+
v-model 是一个语法糖(syntactic sugar)。当你在一个自定义组件上使用 v-model 时,它会自动扩展为:
|
|
40695
|
+
1. 传入一个名为 modelValue 的 prop(用于接收值)
|
|
40696
|
+
2. 监听一个名为 update:modelValue 的自定义事件(用于更新值)
|
|
40697
|
+
*/
|
|
40691
40698
|
|
|
40692
40699
|
var script$c = {
|
|
40693
40700
|
__name: 'index',
|
|
40694
|
-
props:
|
|
40701
|
+
props: {
|
|
40702
|
+
// v-model 对应的 prop
|
|
40703
|
+
modelValue: {
|
|
40704
|
+
type: String,
|
|
40705
|
+
default: '',
|
|
40706
|
+
},
|
|
40707
|
+
myProps: {
|
|
40708
|
+
type: Object,
|
|
40709
|
+
default: () => ({}),
|
|
40710
|
+
}
|
|
40711
|
+
},
|
|
40695
40712
|
emits: ['update:modelValue'],
|
|
40696
40713
|
setup(__props, { emit: __emit }) {
|
|
40697
40714
|
|
|
40698
40715
|
const props = __props;
|
|
40699
40716
|
const emit = __emit;
|
|
40700
40717
|
|
|
40701
|
-
// 富文本的值
|
|
40702
|
-
const modelValue = vue.ref('');
|
|
40703
40718
|
// 文件上传地址
|
|
40704
|
-
const uploadUrl =
|
|
40719
|
+
const uploadUrl = props.myProps.uploadUrl || request.ly0.upload;
|
|
40705
40720
|
// 指定上传文件的参数名称(Field Name)
|
|
40706
|
-
const uploadFieldName =
|
|
40721
|
+
const uploadFieldName = props.myProps.uploadFieldName || "upload_file";
|
|
40707
40722
|
// 限制文件上传的最大大小,默认5MB
|
|
40708
|
-
const maxSize =
|
|
40709
|
-
const theme =
|
|
40710
|
-
vue.reactive(props.myProps.customOptions
|
|
40723
|
+
const maxSize = props.myProps.maxSize || 1024 * 5;
|
|
40724
|
+
const theme = props.myProps.theme || "snow"; // 默认snow主题
|
|
40725
|
+
const customOptions = vue.reactive(props.myProps.customOptions || {});
|
|
40711
40726
|
|
|
40712
40727
|
const quillEditor = vue.ref(null);
|
|
40713
40728
|
|
|
@@ -40723,7 +40738,7 @@ const imageHandler = () => {
|
|
|
40723
40738
|
if (!file) return
|
|
40724
40739
|
|
|
40725
40740
|
// 检查文件大小
|
|
40726
|
-
if (file.size / 1024 > maxSize) {
|
|
40741
|
+
if (file.size / 1024 > maxSize.value) {
|
|
40727
40742
|
alert(`图片大小不能超过 ${maxSize} KB`);
|
|
40728
40743
|
return
|
|
40729
40744
|
}
|
|
@@ -40737,15 +40752,15 @@ const imageHandler = () => {
|
|
|
40737
40752
|
quill.insertEmbed(length, 'image', 'uploading...');
|
|
40738
40753
|
|
|
40739
40754
|
const formData = new FormData();
|
|
40740
|
-
formData.append(uploadFieldName, file);
|
|
40755
|
+
formData.append(uploadFieldName.value, file);
|
|
40741
40756
|
|
|
40742
40757
|
try {
|
|
40743
40758
|
// ⚠️ 模拟/替换为你真实的上传逻辑 (例如使用 axios 或 fetch)
|
|
40744
40759
|
// 注意:这里需要你处理好响应,确保返回图片 URL
|
|
40745
40760
|
|
|
40746
40761
|
// 假设使用 fetch
|
|
40747
|
-
const response = await request
|
|
40748
|
-
uploadUrl: uploadUrl ? uploadUrl : request
|
|
40762
|
+
const response = await request.ly0.request({
|
|
40763
|
+
uploadUrl: uploadUrl ? uploadUrl : request.ly0.domain + request.ly0.upload,
|
|
40749
40764
|
data: formData
|
|
40750
40765
|
});
|
|
40751
40766
|
|
|
@@ -40797,7 +40812,7 @@ const editorOptions = vue.computed(() => {
|
|
|
40797
40812
|
}
|
|
40798
40813
|
}
|
|
40799
40814
|
},
|
|
40800
|
-
...
|
|
40815
|
+
...customOptions // 允许用户覆盖默认选项
|
|
40801
40816
|
}
|
|
40802
40817
|
});
|
|
40803
40818
|
|
|
@@ -40811,9 +40826,9 @@ return (_ctx, _cache) => {
|
|
|
40811
40826
|
vue.createVNode(vue.unref(QuillEditor), {
|
|
40812
40827
|
ref_key: "quillEditor",
|
|
40813
40828
|
ref: quillEditor,
|
|
40814
|
-
content: modelValue
|
|
40829
|
+
content: __props.modelValue,
|
|
40815
40830
|
options: editorOptions.value,
|
|
40816
|
-
theme: theme
|
|
40831
|
+
theme: vue.unref(theme),
|
|
40817
40832
|
contentType: "html",
|
|
40818
40833
|
"onUpdate:content": handleContentUpdate
|
|
40819
40834
|
}, null, 8 /* PROPS */, ["content", "options", "theme"])
|
|
@@ -41827,7 +41842,7 @@ const popup = vue.ref({
|
|
|
41827
41842
|
});
|
|
41828
41843
|
|
|
41829
41844
|
vue.onMounted(()=>{
|
|
41830
|
-
request
|
|
41845
|
+
request.ly0.storpro({
|
|
41831
41846
|
noSession: true,
|
|
41832
41847
|
storproName: 'ly0d3.gbt2260code2.init',
|
|
41833
41848
|
}).then(result=>{
|
|
@@ -41837,7 +41852,7 @@ vue.onMounted(()=>{
|
|
|
41837
41852
|
|
|
41838
41853
|
vue.watch(() => props.myProps.value,
|
|
41839
41854
|
(valNew, valOld) => {
|
|
41840
|
-
request
|
|
41855
|
+
request.ly0.storpro({
|
|
41841
41856
|
noSession: true,
|
|
41842
41857
|
storproName: 'ly0d3.gbt2260code6.get',
|
|
41843
41858
|
data: {
|
|
@@ -41869,7 +41884,7 @@ const hdlPopup = () => {
|
|
|
41869
41884
|
|
|
41870
41885
|
const hdlChangeCode2 = value => {
|
|
41871
41886
|
return new Promise((resolve, reject) => {
|
|
41872
|
-
request
|
|
41887
|
+
request.ly0.storpro({
|
|
41873
41888
|
noSession: true,
|
|
41874
41889
|
storproName: 'ly0d3.gbt2260code4.code2',
|
|
41875
41890
|
data: {code2: value},
|
|
@@ -41885,7 +41900,7 @@ const hdlChangeCode2 = value => {
|
|
|
41885
41900
|
|
|
41886
41901
|
const hdlChangeCode4 = value => {
|
|
41887
41902
|
return new Promise((resolve, reject) => {
|
|
41888
|
-
request
|
|
41903
|
+
request.storpro({
|
|
41889
41904
|
noSession: true,
|
|
41890
41905
|
storproName: 'ly0d3.gbt2260code6.code4',
|
|
41891
41906
|
data: {code4: value},
|
|
@@ -42351,7 +42366,7 @@ const hdl = {
|
|
|
42351
42366
|
let arrPromise = [];
|
|
42352
42367
|
value.value.forEach(i => {
|
|
42353
42368
|
arrPromise.push(
|
|
42354
|
-
request
|
|
42369
|
+
request.ly0.storpro({
|
|
42355
42370
|
noSession: true,
|
|
42356
42371
|
storproName: 'ly0d3.gbt2260code6.get',
|
|
42357
42372
|
data: { code6: i.gbt2260code },
|
|
@@ -43264,10 +43279,10 @@ var index = {
|
|
|
43264
43279
|
app.component('ly0d7thumb', script);
|
|
43265
43280
|
},
|
|
43266
43281
|
FileSaver: FileSaver$1,
|
|
43267
|
-
request
|
|
43282
|
+
request
|
|
43268
43283
|
};
|
|
43269
43284
|
|
|
43270
43285
|
exports.FileSaver = FileSaver$1;
|
|
43271
43286
|
exports.default = index;
|
|
43272
|
-
exports.request = request
|
|
43287
|
+
exports.request = request;
|
|
43273
43288
|
//# sourceMappingURL=index.cjs.js.map
|