aI问答支持流式输出,效果非常好
This commit is contained in:
@@ -141,7 +141,7 @@ function uploadCloudFiles(files, max = 5, onUploadProgress) {
|
||||
const index = self.files.findIndex((v) => v.uuid === fileItem.uuid);
|
||||
fileItem.url = "";
|
||||
delete fileItem.errMsg;
|
||||
common_vendor.tr.uploadFile({
|
||||
common_vendor._r.uploadFile({
|
||||
filePath: fileItem.path,
|
||||
cloudPath: fileItem.cloudPath,
|
||||
fileType: fileItem.fileType,
|
||||
|
||||
@@ -166,9 +166,9 @@ const _sfc_main = {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (!(common_vendor.tr.config && common_vendor.tr.config.provider)) {
|
||||
if (!(common_vendor._r.config && common_vendor._r.config.provider)) {
|
||||
this.noSpace = true;
|
||||
common_vendor.tr.chooseAndUploadFile = uni_modules_uniFilePicker_components_uniFilePicker_chooseAndUploadFile.chooseAndUploadFile;
|
||||
common_vendor._r.chooseAndUploadFile = uni_modules_uniFilePicker_components_uniFilePicker_chooseAndUploadFile.chooseAndUploadFile;
|
||||
}
|
||||
this.form = this.getForm("uniForms");
|
||||
this.formItem = this.getForm("uniFormsItem");
|
||||
@@ -268,7 +268,7 @@ const _sfc_main = {
|
||||
*/
|
||||
chooseFiles() {
|
||||
const _extname = uni_modules_uniFilePicker_components_uniFilePicker_utils.get_extname(this.fileExtname);
|
||||
common_vendor.tr.chooseAndUploadFile({
|
||||
common_vendor._r.chooseAndUploadFile({
|
||||
type: this.fileMediatype,
|
||||
compressed: false,
|
||||
sizeType: this.sizeType,
|
||||
@@ -492,7 +492,7 @@ const _sfc_main = {
|
||||
fileList = {
|
||||
fileList: [].concat(fileList)
|
||||
};
|
||||
const urls = await common_vendor.tr.getTempFileURL(fileList);
|
||||
const urls = await common_vendor._r.getTempFileURL(fileList);
|
||||
return urls.fileList[0].tempFileURL || "";
|
||||
},
|
||||
/**
|
||||
@@ -526,9 +526,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
} : {}, {
|
||||
e: $props.fileMediatype === "image" && $options.showType === "grid"
|
||||
}, $props.fileMediatype === "image" && $options.showType === "grid" ? {
|
||||
f: common_vendor.o($options.uploadFiles),
|
||||
g: common_vendor.o($options.choose),
|
||||
h: common_vendor.o($options.delFile),
|
||||
f: common_vendor.o($options.uploadFiles, "6f"),
|
||||
g: common_vendor.o($options.choose, "28"),
|
||||
h: common_vendor.o($options.delFile, "89"),
|
||||
i: common_vendor.p({
|
||||
readonly: $props.readonly,
|
||||
["image-styles"]: $props.imageStyles,
|
||||
@@ -540,9 +540,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
} : {}, {
|
||||
j: $props.fileMediatype !== "image" || $options.showType !== "grid"
|
||||
}, $props.fileMediatype !== "image" || $options.showType !== "grid" ? {
|
||||
k: common_vendor.o($options.uploadFiles),
|
||||
l: common_vendor.o($options.choose),
|
||||
m: common_vendor.o($options.delFile),
|
||||
k: common_vendor.o($options.uploadFiles, "ce"),
|
||||
l: common_vendor.o($options.choose, "ed"),
|
||||
m: common_vendor.o($options.delFile, "45"),
|
||||
n: common_vendor.p({
|
||||
readonly: $props.readonly,
|
||||
["list-styles"]: $props.listStyles,
|
||||
|
||||
@@ -140,7 +140,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: !$props.readonly
|
||||
}, !$props.readonly ? {
|
||||
b: common_vendor.o((...args) => $options.choose && $options.choose(...args))
|
||||
b: common_vendor.o((...args) => $options.choose && $options.choose(...args), "a4")
|
||||
} : {}, {
|
||||
c: $options.list.length > 0
|
||||
}, $options.list.length > 0 ? {
|
||||
|
||||
@@ -174,7 +174,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
e: $props.filesList.length < $props.limit && !$props.readonly
|
||||
}, $props.filesList.length < $props.limit && !$props.readonly ? {
|
||||
f: common_vendor.s($options.borderStyle),
|
||||
g: common_vendor.o((...args) => $options.choose && $options.choose(...args)),
|
||||
g: common_vendor.o((...args) => $options.choose && $options.choose(...args), "d6"),
|
||||
h: common_vendor.s($options.boxStyle)
|
||||
} : {});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user