Changes between Version 23 and Version 24 of UZ
- Timestamp:
- 2022.10.05 20:08:03 (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UZ
v23 v24 29 29 Described component is based on a simple state machine. It has no UI by itself so you need to provide some UI on your own. To accomplish this not only component instantation is needed but there is also need to fill its //slots//. The component has several config options from which actually only one needs to be provided (i.e. target upload URL). Other options control component behavior but they will be explained later. After providing target upload URL there is need to fill component slots by your own UI. Here I will describe generic browser UI only. If you are familiar with e.g. Quasar you can implement the UI on your own. 30 30 31 In case of doubt please refer to source:/uz/src/UploadTest.vue file. It's complex because it demonstrates all the features. You'll probably use only some of them. Feel free to experiment. 32 31 33 == Basic component usage 32 34 … … 45 47 46 48 As you see nothing will appear in browser. Why? You need to provide some UI. To remain generic the component has no UI by itself. This allows it to be extremely flexible. You need to use //slots// and provide some CSS styles. To remain concise this step is demonstrated in the repository (source:/uz/src/UploadTest.vue). After creating the UI and navigating to proper URL you should see the uploader. 49 50 In general there are two control options - using slots or to mix slots with control outside of the component. File source:/uz/src/UploadTest.vue demonstrates both of them. 47 51 48 52 == Component properties … … 97 101 == Exposed items 98 102 99 ||= item =||= purpose =|| = kind =||103 ||= item =||= purpose =||||= kind =|| 100 104 || pick || launches standard file picker || callback || no args || 101 105 || reset || resets to //idle// state || callback || no args || 102 106 || start || begin files upload || callback || no args || 103 107 || abort || abort pending files upload || callback || no args || 104 || can_pick || is file picking allowed? || computed property|| boolean ||105 || can_start || is upload start allowed? || computed property|| boolean ||106 || can_abort || is upload abort allowed? || computed property|| boolean ||107 || can_reset || is component reset allowed? || computed property|| boolean ||108 || can_pick || is file picking allowed? || computed || boolean || 109 || can_start || is upload start allowed? || computed || boolean || 110 || can_abort || is upload abort allowed? || computed || boolean || 111 || can_reset || is component reset allowed? || computed || boolean || 108 112 109 113 == Emitted events