cnhis-design-vue 3.1.42-beta.29 → 3.1.42-beta.30
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/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +73 -0
- package/es/components/vod-chunk-upload/index.d.ts +73 -0
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.d.ts +73 -0
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as t,computed as a,inject as l,watch as r,createVNode as o,nextTick as n}from"vue";import{isEqual as i,isArray as u}from"lodash-es";import"../../../index.js";import{useCommonInjection as s}from"../../hooks/useCommonInjection.js";import{InjectionAsyncQueue as c,InjectionFormUUID as p}from"../../constants/index.js";import"../../../../../shared/utils/index.js";import"../../utils/index.js";import{useFormField as d}from"../../hooks/useFormField.js";import{NCascader as m}from"naive-ui";import"@vueuse/core";import"date-fns";import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import"../../hooks/useFormValidator.js";import"@formily/core";import"@formily/reactive";import{connect as v,mapProps as f}from"@formily/vue";import"@vue/shared";import"./index.js";import"../../hooks/useFormRenderOptions.js";import{createVisitedSetter as h,assignUpdateValue as y,traverseDependKey as j}from"../../utils/schema.js";const b=v(e({name:"FormCascader",props:{options:{type:Array,default:()=>[]},depth:{type:[Number,String]},urlConfig:{type:Object},requestCache:{type:Boolean,default:!0},onFocus:{type:Function},filterable:{type:Boolean,default:!1},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},onChange:{},value:{}},emits:["update:value"],setup(e,{slots:v,emit:f}){const y=t(),{field:b,title:k}=d(),C=a((()=>{var t,a,l;return null!=(l=null!=(a=null==(t=e.urlConfig)?void 0:t.nameKey)?a:e.labelField)?l:"text"})),g=a((()=>{var t,a,l;return null!=(l=null!=(a=null==(t=e.urlConfig)?void 0:t.valueKey)?a:e.valueField)?l:"value"})),F=a((()=>{try{const t=Array.isArray(e.value)?e.value:JSON.parse(e.value||"");return Array.isArray(t)&&t.length?t.map((e=>e[C.value])).join(" / "):null}catch(e){return null}}));function S(e,t,a){f("update:value",a.map((function(e){return{...e,label:e[C.value],children:void 0,parent:void 0}})))}const A=l(c);async function w(t){e.filterable?await async function(){if(!e.urlConfig||y.value&&e.requestCache)return;const t=await A.addAsync({...e.urlConfig,params:{lvlnr:"1"},key:k.value,cache:e.requestCache});function a(e,t){const l={[C.value]:e[C.value],[g.value]:e[g.value],depth:t+1,isLeaf:!0};return u(e.children)&&(l.children=e.children.map((e=>a(e,t+1))),l.isLeaf=!e.children.length),l}y.value=t.map((e=>a(e,0)))}():await async function(t){if(r(e,t))return;const a=await A.addAsync(o(s(t),u(e),k.value,t));if(!a.length&&t)return t.isLeaf=!0,S(0,0,n(t)),void(K.value=!1);const l=a.map((e=>i(e,s(t))));function r(e,t){return!u(e)||!t&&y.value&&e.requestCache||s(t)>=s(e)-1}function o(t,a,l,r){const o={lvlnr:t+1+""};return r&&a.dependKey&&j(a.dependKey,((e,t)=>{o[t]=r[e]})),{params:o,...a,key:l,cache:e.requestCache}}function n(e){let t=e;const a=[e];for(;t.parent;)a.unshift(t.parent),t=t.parent;return a}function i(a,l){return{[C.value]:a[C.value],[g.value]:a[g.value],depth:l+1,parent:t,isLeaf:l+2>=s(e)}}function u(e){return e.urlConfig}function s(e){var t;return null!=(t=null==e?void 0:e.depth)?t:-1}t?t.children=l:y.value=l}(t),await x()}const H=`form-render__cascade--menu-${l(p)}`;async function x(){await n();const e=document.querySelector(`.${H} .v-vl`);e&&e.dispatchEvent(new CustomEvent("scroll"))}const{injectValueValidate:L,injectValueWatchFromEmpty:q,injectValueBindKey:B}=s();q((()=>e.value),w),L((()=>e.value)),r((()=>e.urlConfig),(async(e,t)=>{i(e,t)||(y.value=null,await w())}));const K=t(!1);function V(e){K.value=!!e,e&&w()}const E=a((()=>y.value||e.options||[])),O=a((()=>!e.filterable)),W=B(F);return()=>o(m,{key:W.value,remote:O.value,filterable:e.filterable,"menu-props":{class:H,onClick:x},checkStrategy:"child",show:!!K.value,"onUpdate:show":V,value:F.value,"onUpdate:value":S,labelField:C.value,valueField:g.value,options:E.value,onLoad:w,onFocus:h(b)},v)}}),f({dataSource:"options"},y));export{b as SEARCH_CASCADER};
|
|
1
|
+
import{defineComponent as e,ref as t,computed as a,inject as l,watch as r,createVNode as o,nextTick as n}from"vue";import{isEqual as i,isArray as u}from"lodash-es";import"../../../index.js";import{useCommonInjection as s}from"../../hooks/useCommonInjection.js";import{InjectionAsyncQueue as c,InjectionFormUUID as p}from"../../constants/index.js";import"../../../../../shared/utils/index.js";import"../../utils/index.js";import{useFormField as d}from"../../hooks/useFormField.js";import{NCascader as m}from"naive-ui";import"@vueuse/core";import"date-fns";import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import"../../hooks/useFormValidator.js";import"@formily/core";import"@formily/reactive";import{connect as v,mapProps as f}from"@formily/vue";import"@vue/shared";import"./index.js";import"../../hooks/useFormRenderOptions.js";import{createVisitedSetter as h,assignUpdateValue as y,traverseDependKey as j}from"../../utils/schema.js";const b=v(e({name:"FormCascader",props:{options:{type:Array,default:()=>[]},depth:{type:[Number,String]},urlConfig:{type:Object},requestCache:{type:Boolean,default:!0},onFocus:{type:Function},filterable:{type:Boolean,default:!1},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},onChange:{},value:{}},emits:["update:value"],setup(e,{slots:v,emit:f}){const y=t(),{field:b,title:k}=d(),C=a((()=>{var t,a,l;return null!=(l=null!=(a=null==(t=e.urlConfig)?void 0:t.nameKey)?a:e.labelField)?l:"text"})),g=a((()=>{var t,a,l;return null!=(l=null!=(a=null==(t=e.urlConfig)?void 0:t.valueKey)?a:e.valueField)?l:"value"})),F=a((()=>{try{const t=Array.isArray(e.value)?e.value:JSON.parse(e.value||"");return Array.isArray(t)&&t.length?t.map((e=>e[C.value])).join(" / "):null}catch(e){return null}}));function S(e,t,a){f("update:value",u(a)?a.map((function(e){return{...e,label:e[C.value],children:void 0,parent:void 0}})):null)}const A=l(c);async function w(t){e.filterable?await async function(){if(!e.urlConfig||y.value&&e.requestCache)return;const t=await A.addAsync({...e.urlConfig,params:{lvlnr:"1"},key:k.value,cache:e.requestCache});function a(e,t){const l={[C.value]:e[C.value],[g.value]:e[g.value],depth:t+1,isLeaf:!0};return u(e.children)&&(l.children=e.children.map((e=>a(e,t+1))),l.isLeaf=!e.children.length),l}y.value=t.map((e=>a(e,0)))}():await async function(t){if(r(e,t))return;const a=await A.addAsync(o(s(t),u(e),k.value,t));if(!a.length&&t)return t.isLeaf=!0,S(0,0,n(t)),void(K.value=!1);const l=a.map((e=>i(e,s(t))));function r(e,t){return!u(e)||!t&&y.value&&e.requestCache||s(t)>=s(e)-1}function o(t,a,l,r){const o={lvlnr:t+1+""};return r&&a.dependKey&&j(a.dependKey,((e,t)=>{o[t]=r[e]})),{params:o,...a,key:l,cache:e.requestCache}}function n(e){let t=e;const a=[e];for(;t.parent;)a.unshift(t.parent),t=t.parent;return a}function i(a,l){return{[C.value]:a[C.value],[g.value]:a[g.value],depth:l+1,parent:t,isLeaf:l+2>=s(e)}}function u(e){return e.urlConfig}function s(e){var t;return null!=(t=null==e?void 0:e.depth)?t:-1}t?t.children=l:y.value=l}(t),await x()}const H=`form-render__cascade--menu-${l(p)}`;async function x(){await n();const e=document.querySelector(`.${H} .v-vl`);e&&e.dispatchEvent(new CustomEvent("scroll"))}const{injectValueValidate:L,injectValueWatchFromEmpty:q,injectValueBindKey:B}=s();q((()=>e.value),w),L((()=>e.value)),r((()=>e.urlConfig),(async(e,t)=>{i(e,t)||(y.value=null,await w())}));const K=t(!1);function V(e){K.value=!!e,e&&w()}const E=a((()=>y.value||e.options||[])),O=a((()=>!e.filterable)),W=B(F);return()=>o(m,{key:W.value,remote:O.value,filterable:e.filterable,"menu-props":{class:H,onClick:x},checkStrategy:"child",show:!!K.value,"onUpdate:show":V,value:F.value,"onUpdate:value":S,labelField:C.value,valueField:g.value,options:E.value,onLoad:w,onFocus:h(b)},v)}}),f({dataSource:"options"},y));export{b as SEARCH_CASCADER};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{toRaw as e,h as t,inject as i,createVNode as l}from"vue";import{arrayed as o,widthAppend as s}from"../../../../../shared/utils/index.js";import{isObject as n,isFunction as d,cloneDeep as a,isString as r}from"lodash-es";import{NEllipsis as u}from"naive-ui";import f from"../../../../annotation-edit/index.js";import{HIGHEST_PRIORITY as m,IHO_TABLE_FIXED_STATUS as c,LOWEST_PRIORITY as p,WIDGET_TYPE as h,InjectionIhoTableAnnotation as v,InjectionIhoTableConfig as b}from"../../constants/index.js";import{defineTablePlugin as g}from"../../hooks/useTablePlugin.js";import{IhoTableStatusHelper as R,IhoTableUtils as j,IhoTableRenderHelper as x}from"../../utils/index.js";import{getDefaultValue as P}from"../rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js";function S(){const S="lowCodeFieldAdaptorPlugin";return g({name:S,apply(g){g.fieldHooks.field.tap({name:S,stage:m},((m,p,g)=>{const S=m,F={className:S.bold?"iho-table__boldCell":"",field:S.columnName,showOverflow:"tooltip",visible:R.notNegative(S.isShow),minWidth:S.colWidth,sortable:R.isPositive(S.isSort),fixed:c[S.isFixed],...S,title:S.alias||S.title};return function(e,a){const m={default:a.slotFn,header:a.headerSlotFn,edit:a.editSlotFn,footer:a.footerSlotFn,...a.slots};if(d(a.checkEditStatus)){const{default:e}=m;d(e)&&(m.default=i=>a.checkEditStatus(i)?e(i):[t("span",null,P(i.row,i.column.editRender.props))])}const c=m.header;m.header=e=>function(e,t,a){const m=i(v),c=i(b),p=e.column||{},h=n(null==m?void 0:m.value)&&!1!==t.annotation,g=x.isEditableColumn(c.value,p),R=p.sortable||x.hasFilter(t.fieldSetting),j=r(a)?a:d(a)?a(e):null;let P=!1;if(c.value){const e=c.value.editRules&&c.value.editRules[p.field];e&&(P=o(e).some((e=>e.required)))}return l("section",{class:"iho-table__headerWrapper"},[l("section",{style:{width:s(Math.max(0,p.renderWidth-20-(P?14:0)-(h?
|
|
1
|
+
import{toRaw as e,h as t,inject as i,createVNode as l}from"vue";import{arrayed as o,widthAppend as s}from"../../../../../shared/utils/index.js";import{isObject as n,isFunction as d,cloneDeep as a,isString as r}from"lodash-es";import{NEllipsis as u}from"naive-ui";import f from"../../../../annotation-edit/index.js";import{HIGHEST_PRIORITY as m,IHO_TABLE_FIXED_STATUS as c,LOWEST_PRIORITY as p,WIDGET_TYPE as h,InjectionIhoTableAnnotation as v,InjectionIhoTableConfig as b}from"../../constants/index.js";import{defineTablePlugin as g}from"../../hooks/useTablePlugin.js";import{IhoTableStatusHelper as R,IhoTableUtils as j,IhoTableRenderHelper as x}from"../../utils/index.js";import{getDefaultValue as P}from"../rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js";function S(){const S="lowCodeFieldAdaptorPlugin";return g({name:S,apply(g){g.fieldHooks.field.tap({name:S,stage:m},((m,p,g)=>{const S=m,F={className:S.bold?"iho-table__boldCell":"",field:S.columnName,showOverflow:"tooltip",visible:R.notNegative(S.isShow),minWidth:S.colWidth,sortable:R.isPositive(S.isSort),fixed:c[S.isFixed],...S,title:S.alias||S.title};return function(e,a){const m={default:a.slotFn,header:a.headerSlotFn,edit:a.editSlotFn,footer:a.footerSlotFn,...a.slots};if(d(a.checkEditStatus)){const{default:e}=m;d(e)&&(m.default=i=>a.checkEditStatus(i)?e(i):[t("span",null,P(i.row,i.column.editRender.props))])}const c=m.header;m.header=e=>function(e,t,a){const m=i(v),c=i(b),p=e.column||{},h=n(null==m?void 0:m.value)&&!1!==t.annotation,g=x.isEditableColumn(c.value,p),R=p.sortable||x.hasFilter(t.fieldSetting),j=r(a)?a:d(a)?a(e):null;let P=!1;if(c.value){const e=c.value.editRules&&c.value.editRules[p.field];e&&(P=o(e).some((e=>e.required)))}return l("section",{class:"iho-table__headerWrapper"},[l("section",{style:{width:s(Math.max(0,p.renderWidth-20-(P?14:0)-(h?18:0)-(R?22:0)-(g?22:0)))}},[null!=j?j:l(u,{style:{maxWidth:"100%"}},{default:()=>p.title})]),h?l(f,{modelValue:m.value[p.field],"onUpdate:modelValue":e=>m.value[p.field]=e},null):null])}(e,a,c),e.slots=m}(F,S),function(t,i,l){var o,s;const r=a(e(i));r.componentProps={size:"mini"===l.size?"small":l.size,...r.componentProps},t.editRender={autofocus:"input",name:j.getCellType(i),props:r},t.editRender.enabled=!Reflect.get(h,t.editRender.name),d(null==(o=t.slots)?void 0:o.default)&&(t.editRender.enabled=t.editRender.enabled&&d(null==(s=t.slots)?void 0:s.edit));if(!n(i.settingObj))return;Reflect.has(i.settingObj,"isHide")&&(t.visible=t.visible&&R.notPositive(i.settingObj.isHide))}(F,S,g),F})),g.fieldHooks.field.tap({name:S+"After",stage:p},(e=>(n(e.slots)&&Object.entries(e.slots).forEach((([t,i])=>{null==i&&Reflect.deleteProperty(e.slots,t)})),e)))}})}export{S as lowCodeFieldAdaptorPlugin};
|
|
@@ -1315,6 +1315,79 @@ export declare const componentMap: {
|
|
|
1315
1315
|
RemoveCircleSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
1316
1316
|
videoImg: string;
|
|
1317
1317
|
success: string;
|
|
1318
|
+
Draggable: import("vue").DefineComponent<{
|
|
1319
|
+
list: {
|
|
1320
|
+
type: ArrayConstructor;
|
|
1321
|
+
required: boolean;
|
|
1322
|
+
default: any;
|
|
1323
|
+
};
|
|
1324
|
+
modelValue: {
|
|
1325
|
+
type: ArrayConstructor;
|
|
1326
|
+
required: boolean;
|
|
1327
|
+
default: any;
|
|
1328
|
+
};
|
|
1329
|
+
itemKey: {
|
|
1330
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
1331
|
+
required: boolean;
|
|
1332
|
+
};
|
|
1333
|
+
clone: {
|
|
1334
|
+
type: FunctionConstructor;
|
|
1335
|
+
default: (original: any) => any;
|
|
1336
|
+
};
|
|
1337
|
+
tag: {
|
|
1338
|
+
type: StringConstructor;
|
|
1339
|
+
default: string;
|
|
1340
|
+
};
|
|
1341
|
+
move: {
|
|
1342
|
+
type: FunctionConstructor;
|
|
1343
|
+
default: any;
|
|
1344
|
+
};
|
|
1345
|
+
componentData: {
|
|
1346
|
+
type: ObjectConstructor;
|
|
1347
|
+
required: boolean;
|
|
1348
|
+
default: any;
|
|
1349
|
+
};
|
|
1350
|
+
}, unknown, {
|
|
1351
|
+
error: boolean;
|
|
1352
|
+
}, {
|
|
1353
|
+
realList(): any;
|
|
1354
|
+
getKey(): any;
|
|
1355
|
+
}, {
|
|
1356
|
+
getUnderlyingVm(domElement: any): any;
|
|
1357
|
+
getUnderlyingPotencialDraggableComponent(htmElement: any): any;
|
|
1358
|
+
emitChanges(evt: any): void;
|
|
1359
|
+
alterList(onList: any): void;
|
|
1360
|
+
spliceList(): void;
|
|
1361
|
+
updatePosition(oldIndex: any, newIndex: any): void;
|
|
1362
|
+
getRelatedContextFromMoveEvent({ to, related }: {
|
|
1363
|
+
to: any;
|
|
1364
|
+
related: any;
|
|
1365
|
+
}): any;
|
|
1366
|
+
getVmIndexFromDomIndex(domIndex: any): any;
|
|
1367
|
+
onDragStart(evt: any): void;
|
|
1368
|
+
onDragAdd(evt: any): void;
|
|
1369
|
+
onDragRemove(evt: any): void;
|
|
1370
|
+
onDragUpdate(evt: any): void;
|
|
1371
|
+
computeFutureIndex(relatedContext: any, evt: any): any;
|
|
1372
|
+
onDragMove(evt: any, originalEvent: any): any;
|
|
1373
|
+
onDragEnd(): void;
|
|
1374
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any[], any, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
1375
|
+
move: Function;
|
|
1376
|
+
tag: string;
|
|
1377
|
+
clone: Function;
|
|
1378
|
+
list: unknown[];
|
|
1379
|
+
modelValue: unknown[];
|
|
1380
|
+
componentData: Record<string, any>;
|
|
1381
|
+
} & {
|
|
1382
|
+
itemKey?: string | Function | undefined;
|
|
1383
|
+
}>, {
|
|
1384
|
+
move: Function;
|
|
1385
|
+
tag: string;
|
|
1386
|
+
clone: Function;
|
|
1387
|
+
list: unknown[];
|
|
1388
|
+
modelValue: unknown[];
|
|
1389
|
+
componentData: Record<string, any>;
|
|
1390
|
+
}>;
|
|
1318
1391
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "vodFileList"[], "vodFileList", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1319
1392
|
formData: {
|
|
1320
1393
|
type: ObjectConstructor;
|
|
@@ -195,6 +195,79 @@ declare const VodChunkUpload: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
195
195
|
RemoveCircleSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
196
196
|
videoImg: string;
|
|
197
197
|
success: string;
|
|
198
|
+
Draggable: import("vue").DefineComponent<{
|
|
199
|
+
list: {
|
|
200
|
+
type: ArrayConstructor;
|
|
201
|
+
required: boolean;
|
|
202
|
+
default: any;
|
|
203
|
+
};
|
|
204
|
+
modelValue: {
|
|
205
|
+
type: ArrayConstructor;
|
|
206
|
+
required: boolean;
|
|
207
|
+
default: any;
|
|
208
|
+
};
|
|
209
|
+
itemKey: {
|
|
210
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
211
|
+
required: boolean;
|
|
212
|
+
};
|
|
213
|
+
clone: {
|
|
214
|
+
type: FunctionConstructor;
|
|
215
|
+
default: (original: any) => any;
|
|
216
|
+
};
|
|
217
|
+
tag: {
|
|
218
|
+
type: StringConstructor;
|
|
219
|
+
default: string;
|
|
220
|
+
};
|
|
221
|
+
move: {
|
|
222
|
+
type: FunctionConstructor;
|
|
223
|
+
default: any;
|
|
224
|
+
};
|
|
225
|
+
componentData: {
|
|
226
|
+
type: ObjectConstructor;
|
|
227
|
+
required: boolean;
|
|
228
|
+
default: any;
|
|
229
|
+
};
|
|
230
|
+
}, unknown, {
|
|
231
|
+
error: boolean;
|
|
232
|
+
}, {
|
|
233
|
+
realList(): any;
|
|
234
|
+
getKey(): any;
|
|
235
|
+
}, {
|
|
236
|
+
getUnderlyingVm(domElement: any): any;
|
|
237
|
+
getUnderlyingPotencialDraggableComponent(htmElement: any): any;
|
|
238
|
+
emitChanges(evt: any): void;
|
|
239
|
+
alterList(onList: any): void;
|
|
240
|
+
spliceList(): void;
|
|
241
|
+
updatePosition(oldIndex: any, newIndex: any): void;
|
|
242
|
+
getRelatedContextFromMoveEvent({ to, related }: {
|
|
243
|
+
to: any;
|
|
244
|
+
related: any;
|
|
245
|
+
}): any;
|
|
246
|
+
getVmIndexFromDomIndex(domIndex: any): any;
|
|
247
|
+
onDragStart(evt: any): void;
|
|
248
|
+
onDragAdd(evt: any): void;
|
|
249
|
+
onDragRemove(evt: any): void;
|
|
250
|
+
onDragUpdate(evt: any): void;
|
|
251
|
+
computeFutureIndex(relatedContext: any, evt: any): any;
|
|
252
|
+
onDragMove(evt: any, originalEvent: any): any;
|
|
253
|
+
onDragEnd(): void;
|
|
254
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any[], any, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
255
|
+
move: Function;
|
|
256
|
+
tag: string;
|
|
257
|
+
clone: Function;
|
|
258
|
+
list: unknown[];
|
|
259
|
+
modelValue: unknown[];
|
|
260
|
+
componentData: Record<string, any>;
|
|
261
|
+
} & {
|
|
262
|
+
itemKey?: string | Function | undefined;
|
|
263
|
+
}>, {
|
|
264
|
+
move: Function;
|
|
265
|
+
tag: string;
|
|
266
|
+
clone: Function;
|
|
267
|
+
list: unknown[];
|
|
268
|
+
modelValue: unknown[];
|
|
269
|
+
componentData: Record<string, any>;
|
|
270
|
+
}>;
|
|
198
271
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "vodFileList"[], "vodFileList", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
199
272
|
formData: {
|
|
200
273
|
type: ObjectConstructor;
|
|
@@ -193,6 +193,79 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
193
193
|
RemoveCircleSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
194
194
|
videoImg: string;
|
|
195
195
|
success: string;
|
|
196
|
+
Draggable: import("vue").DefineComponent<{
|
|
197
|
+
list: {
|
|
198
|
+
type: ArrayConstructor;
|
|
199
|
+
required: boolean;
|
|
200
|
+
default: any;
|
|
201
|
+
};
|
|
202
|
+
modelValue: {
|
|
203
|
+
type: ArrayConstructor;
|
|
204
|
+
required: boolean;
|
|
205
|
+
default: any;
|
|
206
|
+
};
|
|
207
|
+
itemKey: {
|
|
208
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
209
|
+
required: boolean;
|
|
210
|
+
};
|
|
211
|
+
clone: {
|
|
212
|
+
type: FunctionConstructor;
|
|
213
|
+
default: (original: any) => any;
|
|
214
|
+
};
|
|
215
|
+
tag: {
|
|
216
|
+
type: StringConstructor;
|
|
217
|
+
default: string;
|
|
218
|
+
};
|
|
219
|
+
move: {
|
|
220
|
+
type: FunctionConstructor;
|
|
221
|
+
default: any;
|
|
222
|
+
};
|
|
223
|
+
componentData: {
|
|
224
|
+
type: ObjectConstructor;
|
|
225
|
+
required: boolean;
|
|
226
|
+
default: any;
|
|
227
|
+
};
|
|
228
|
+
}, unknown, {
|
|
229
|
+
error: boolean;
|
|
230
|
+
}, {
|
|
231
|
+
realList(): any;
|
|
232
|
+
getKey(): any;
|
|
233
|
+
}, {
|
|
234
|
+
getUnderlyingVm(domElement: any): any;
|
|
235
|
+
getUnderlyingPotencialDraggableComponent(htmElement: any): any;
|
|
236
|
+
emitChanges(evt: any): void;
|
|
237
|
+
alterList(onList: any): void;
|
|
238
|
+
spliceList(): void;
|
|
239
|
+
updatePosition(oldIndex: any, newIndex: any): void;
|
|
240
|
+
getRelatedContextFromMoveEvent({ to, related }: {
|
|
241
|
+
to: any;
|
|
242
|
+
related: any;
|
|
243
|
+
}): any;
|
|
244
|
+
getVmIndexFromDomIndex(domIndex: any): any;
|
|
245
|
+
onDragStart(evt: any): void;
|
|
246
|
+
onDragAdd(evt: any): void;
|
|
247
|
+
onDragRemove(evt: any): void;
|
|
248
|
+
onDragUpdate(evt: any): void;
|
|
249
|
+
computeFutureIndex(relatedContext: any, evt: any): any;
|
|
250
|
+
onDragMove(evt: any, originalEvent: any): any;
|
|
251
|
+
onDragEnd(): void;
|
|
252
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any[], any, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
253
|
+
move: Function;
|
|
254
|
+
tag: string;
|
|
255
|
+
clone: Function;
|
|
256
|
+
list: unknown[];
|
|
257
|
+
modelValue: unknown[];
|
|
258
|
+
componentData: Record<string, any>;
|
|
259
|
+
} & {
|
|
260
|
+
itemKey?: string | Function | undefined;
|
|
261
|
+
}>, {
|
|
262
|
+
move: Function;
|
|
263
|
+
tag: string;
|
|
264
|
+
clone: Function;
|
|
265
|
+
list: unknown[];
|
|
266
|
+
modelValue: unknown[];
|
|
267
|
+
componentData: Record<string, any>;
|
|
268
|
+
}>;
|
|
196
269
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "vodFileList"[], "vodFileList", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
197
270
|
formData: {
|
|
198
271
|
type: ObjectConstructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,reactive as o,computed as l,onMounted as i,
|
|
1
|
+
import{defineComponent as e,reactive as o,computed as l,onMounted as i,openBlock as s,createElementBlock as t,withDirectives as a,normalizeClass as r,unref as n,createElementVNode as d,Fragment as u,vShow as p,createCommentVNode as m,createVNode as c,withCtx as v,normalizeStyle as f,toDisplayString as g,createTextVNode as h,withModifiers as k,createBlock as y}from"vue";import b from"xe-utils";import"moment";import{getVodData as C}from"../hooks/vod-data.js";import{VodComputed as U}from"../hooks/vod-computed.js";import L from"../../../../shared/components/player-vod/video-modal.js";import V from"../vod-upload-modal.js";import{NIcon as _,NButton as D}from"naive-ui";import{PlayCircleSharp as O,PlayCircleOutline as w,RemoveCircleSharp as S}from"@vicons/ionicons5";import x from"../../../../shared/assets/img/video_default_cover.png.js";import j from"../../../../shared/assets/img/video.png.js";import F from"../../../../shared/assets/img/success.png.js";import z from"../../../../shared/components/VueDraggable/src/vuedraggable.js";import N from"../../../../_virtual/plugin-vue_export-helper.js";const M={class:"c-upload"},A={class:"chunk-btn-content"},J={class:"c-uploader-btn"},B=["src"],P=d("div",{class:"uploader-text"},[d("p",null,"点击上传"),d("span",{class:"guage-text"},"上传视频(不超过50M)")],-1),E=["src"],T=d("div",{class:"uploader-text"},[d("p",null,"上传视频")],-1),R={class:"vod-wrap c-uploader-preview-wrap"},G={key:0,class:"vod-def-bg vod-uploading"},H={class:"vod-def-bg vod-done"},K=["src"],$=["src"],q={class:"c-icon-wrap"},I={class:"vod-def-bg vod-error"},Q=["src"],W={class:"tooltip-wrap error-wrap"},X=["onClick"];var Y=N(e({__name:"vod-chunk-upload",props:{formData:{type:Object,default:()=>({})},source:String,limitNum:{default:1},defFileList:{default:""},isLock:Boolean,isDetail:{type:Boolean,default:!1},getChunkUploadConfig:{type:Function,default:()=>Promise.resolve({})}},emits:["vodFileList"],setup(e,{emit:N}){const Y=e,{VodState:Z}=C(),ee=o(Z),oe={},{isShowBtn:le,maskHeight:ie,showPercent:se,allow_format:te,defaultValue:ae,isDisabled:re,max_size:ne,maxlength:de}=U(Y,ee,{mainForm:oe});console.log(le.value,"----isShowBtn---",Y.formData.title),l((()=>ue()));const ue=()=>{const{formData:e}=Y;let o=[];if(o="guage"===Y.source?Y.defFileList:null==oe?void 0:oe.handleSysParams(oe.defaultValue[e.name]||e.default_val),o=JSON.parse(JSON.stringify(o)),!o)return[];let l=[];return Array.isArray(o)&&(l=[...o]),b.isJSON(o)&&(l=JSON.parse(o)),Array.isArray(l)?(l.forEach((e=>{e.thumbUrl=e.vodCoverUrl||void 0,e.uid=(-Math.random()).toString(),e.status="done"})),ee.fileList=l,console.log(ee.fileList,"----list---list"),pe(l),l):[]},pe=e=>{if(!Array.isArray(e))return"";const{formData:o,source:l}=Y;let i=[];e.forEach((e=>{if("done"===e.status&&(e.response&&"00000"==e.response.code||e.url)){const{data:o={}}=e.response||{};e.url||o.videoUrl;let l=e.vodCoverUrl||o.vodCoverUrl;i.push({name:e.name,size:e.size,url:e.url||o.videoUrl,vodCoverUrl:l,uid:e.id||e.uid||(-Math.random()).toString()})}})),console.log(i,"---resList---",Y.formData.title);let s=JSON.stringify(i);"guage"!==l?oe.baseForm.setFieldsValue({[o.val_key]:s}):N("vodFileList",s,Y.formData)},me=(e,o)=>{let l,i;if(e.type&&(i=e.type),e.url||e.videoUrl){if(l=e.url||e.videoUrl,!i){let e=l.split(".");i=`video/${e[e.length-1]}`}}else l=URL.createObjectURL(e.originFileObj);ee.playerOptions={sources:[{type:i,src:l}]},ee.videoVisible=!0},ce=()=>{ee.videoVisible=!1},ve=()=>{re.value||(ee.chunkUploadVisible=!0)},fe=e=>{let o=[];e.forEach((e=>{let l=e.videoCoverPic||void 0;o.push({name:e.videoName||e.name,url:e.videoUrl||e.url,size:e.size,vodCoverUrl:l,status:"done",uid:(-Math.random()).toString()})})),ee.fileList.push(...o),pe(ee.fileList)},ge=()=>{pe(ee.fileList)};return i((()=>{ue()})),(o,l)=>(s(),t("div",M,[e.isDetail||Y.isLock?m("v-if",!0):a((s(),t("div",{key:0,class:r(["c-chunk-uploader-btn",{"disable-upload":n(re)}]),onClick:ve},[d("div",A,[d("div",J,["guage"==Y.source?(s(),t(u,{key:0},[d("img",{src:n(j),class:"guage-img"},null,8,B),P],64)):(s(),t(u,{key:1},[d("img",{src:n(j),class:"guage-img"},null,8,E),T],64))])])],2)),[[p,n(le)]]),c(n(z),{modelValue:ee.fileList,"onUpdate:modelValue":l[0]||(l[0]=e=>ee.fileList=e),animation:"150",itemKey:"uid",disabled:n(re).value,options:ee.draggableOptions,onUpdate:ge,class:"drag-content"},{item:v((({element:o,index:l})=>{return[d("div",R,[m(" 上传中 "),"uploading"===o.status?(s(),t("div",G,[m(" TODO: 封面图补充 "),d("div",{class:"uploading-mask",style:f({height:n(ie)(o)})},[d("span",null,g(n(se)(o.percent))+"%",1)],4)])):"done"===o.status?(s(),t(u,{key:1},[m(" 上传完成 "),d("div",H,[d("img",{src:(i=o,i.thumbUrl?i.thumbUrl:x),class:"vod-cover-img"},null,8,K),d("div",{class:r(["tooltip-wrap",{"is-new":o.isNew}])},[d("img",{src:n(F),class:"upload-img"},null,8,$),h(" 上传成功 ")],2),m(" 播放图标 "),d("div",q,[c(n(_),{component:n(O),class:"icon-play theme_filled",onClick:k((e=>me(o)),["prevent","stop"])},null,8,["component","onClick"]),c(n(_),{component:n(w),class:"icon-play theme_outlined",onClick:k((e=>me(o)),["prevent","stop"])},null,8,["component","onClick"])])])],2112)):"error"===o.status?(s(),t(u,{key:2},[m(" 上传失败 "),d("div",I,[d("img",{src:o.thumbUrl,class:"vod-cover-img"},null,8,Q),d("div",W,[d("span",null,g(o.message?o.message:"上传失败,继续上传?"),1),c(n(D),{size:"small",onClick:k((e=>{}),["prevent","stop"])},{default:v((()=>[h("确定")])),_:2},1032,["onClick"])])])],2112)):m("v-if",!0),!["done","error"].includes(o.status)||n(re)||e.isDetail?m("v-if",!0):(s(),t("div",{key:3,onClick:k((e=>{return o=l,ee.fileList.splice(o,1),void pe(ee.fileList);var o}),["stop"]),class:"uploader-preview-delete"},[c(n(_),{class:"pre-delete",component:n(S)},null,8,["component"])],8,X))])];var i})),_:1},8,["modelValue","disabled","options"]),ee.videoVisible?(s(),y(n(L),{key:1,visible:ee.videoVisible,formData:Y.formData,playerOptions:ee.playerOptions,onCloseVideoModal:ce},null,8,["visible","formData","playerOptions"])):m("v-if",!0),c(n(V),{modelValue:ee.chunkUploadVisible,"onUpdate:modelValue":l[1]||(l[1]=e=>ee.chunkUploadVisible=e),modalTitle:Y.formData.name,max_size:n(ne),maxLength:n(de),propsCategoryMap:n(te),defaultList:ee.fileList,getChunkUploadConfig:e.getChunkUploadConfig,onGetSumbitList:fe},null,8,["modelValue","modalTitle","max_size","maxLength","propsCategoryMap","defaultList","getChunkUploadConfig"])]))}}),[["__file","vod-chunk-upload.vue"]]);export{Y as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.42-beta.
|
|
3
|
+
"version": "3.1.42-beta.30",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"iOS 7",
|
|
62
62
|
"last 3 iOS versions"
|
|
63
63
|
],
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "74d427aea5c24738f7167350f0c3c203b6426af7"
|
|
65
65
|
}
|