widget.qw 1.0.31 → 1.0.33

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/build/style.css CHANGED
@@ -387,18 +387,18 @@
387
387
  color: #969799;
388
388
  margin-right: 5px;
389
389
  }
390
- [data-v-87dcb274] .label {
390
+ [data-v-454a9fba] .label {
391
391
  color: #000 !important;
392
392
  }
393
- [data-v-87dcb274] .van-field__control:disabled {
393
+ [data-v-454a9fba] .van-field__control:disabled {
394
394
  color: #000 !important;
395
395
  cursor: not-allowed;
396
396
  opacity: 1;
397
397
  -webkit-text-fill-color: #000;
398
- }.widget[data-v-93421532] {
398
+ }.widget[data-v-a6f1f22a] {
399
399
  text-align: center;
400
400
  }
401
- .widget .btn[data-v-93421532] {
401
+ .widget .btn[data-v-a6f1f22a] {
402
402
  position: fixed;
403
403
  bottom: 1rem;
404
404
  left: 0;
@@ -18362,7 +18362,7 @@ const _sfc_main$j = {
18362
18362
  }
18363
18363
  };
18364
18364
  var UserSelector = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-6c4b4fc8"]]);
18365
- var image_picker_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "[data-v-87dcb274] .label {\n color: #000 !important;\n}\n[data-v-87dcb274] .van-field__control:disabled {\n color: #000 !important;\n cursor: not-allowed;\n opacity: 1;\n -webkit-text-fill-color: #000;\n}")();
18365
+ var image_picker_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "[data-v-454a9fba] .label {\n color: #000 !important;\n}\n[data-v-454a9fba] .van-field__control:disabled {\n color: #000 !important;\n cursor: not-allowed;\n opacity: 1;\n -webkit-text-fill-color: #000;\n}")();
18366
18366
  const _hoisted_1$b = {
18367
18367
  class: "image-box"
18368
18368
  };
@@ -18389,6 +18389,10 @@ const _sfc_main$i = {
18389
18389
  type: String,
18390
18390
  default: ""
18391
18391
  },
18392
+ capture: {
18393
+ type: String,
18394
+ default: "environment"
18395
+ },
18392
18396
  compress: {
18393
18397
  type: Boolean,
18394
18398
  default: true
@@ -18462,19 +18466,20 @@ const _sfc_main$i = {
18462
18466
  modelValue: files.value,
18463
18467
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => files.value = $event),
18464
18468
  "max-count": 1,
18469
+ capture: props.capture,
18465
18470
  accept: "image/jpeg,image/png",
18466
18471
  afterRead: onAfterRead,
18467
18472
  disabled: unref(isDisabled),
18468
18473
  deletable: !unref(isDisabled),
18469
18474
  "before-delete": onBeforeDelete
18470
- }, null, 8, ["modelValue", "disabled", "deletable"])])]),
18475
+ }, null, 8, ["modelValue", "capture", "disabled", "deletable"])])]),
18471
18476
  _: 1
18472
18477
  }, 8, ["label", "required", "rules", "placeholder"])) : createCommentVNode("", true);
18473
18478
  };
18474
18479
  }
18475
18480
  };
18476
- var ImagePicker = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-87dcb274"]]);
18477
- var images_picker_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".widget[data-v-93421532] {\n text-align: center;\n}\n.widget .btn[data-v-93421532] {\n position: fixed;\n bottom: 1rem;\n left: 0;\n right: 0;\n margin: auto auto;\n color: white;\n font-size: 14px;\n background: rgb(58, 136, 255);\n padding: 8px 35px;\n width: 100px;\n text-align: center;\n display: inline-block;\n border-radius: 2px;\n}")();
18481
+ var ImagePicker = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-454a9fba"]]);
18482
+ var images_picker_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".widget[data-v-a6f1f22a] {\n text-align: center;\n}\n.widget .btn[data-v-a6f1f22a] {\n position: fixed;\n bottom: 1rem;\n left: 0;\n right: 0;\n margin: auto auto;\n color: white;\n font-size: 14px;\n background: rgb(58, 136, 255);\n padding: 8px 35px;\n width: 100px;\n text-align: center;\n display: inline-block;\n border-radius: 2px;\n}")();
18478
18483
  const _hoisted_1$a = {
18479
18484
  class: "image-box"
18480
18485
  };
@@ -18498,6 +18503,10 @@ const _sfc_main$h = {
18498
18503
  default: false
18499
18504
  },
18500
18505
  placeholder: {
18506
+ type: String,
18507
+ default: "environment"
18508
+ },
18509
+ capture: {
18501
18510
  type: String,
18502
18511
  default: ""
18503
18512
  },
@@ -18588,18 +18597,19 @@ const _sfc_main$h = {
18588
18597
  modelValue: files.value,
18589
18598
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => files.value = $event),
18590
18599
  "max-count": props.max,
18600
+ capture: props.capture,
18591
18601
  accept: "image/jpeg,image/png",
18592
18602
  disabled: unref(isDisabled),
18593
18603
  deletable: !unref(isDisabled),
18594
18604
  afterRead: onAfterRead,
18595
18605
  "before-delete": onBeforeDelete
18596
- }, null, 8, ["modelValue", "max-count", "disabled", "deletable"])])]),
18606
+ }, null, 8, ["modelValue", "max-count", "capture", "disabled", "deletable"])])]),
18597
18607
  _: 1
18598
18608
  }, 8, ["label", "required", "rules", "placeholder"]);
18599
18609
  };
18600
18610
  }
18601
18611
  };
18602
- var ImagesPicker = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-93421532"]]);
18612
+ var ImagesPicker = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-a6f1f22a"]]);
18603
18613
  var FilePicker_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "[data-v-a0846250] .label {\n color: #000 !important;\n}\n[data-v-a0846250] .van-field__control:disabled {\n color: #000 !important;\n cursor: not-allowed;\n opacity: 1;\n -webkit-text-fill-color: #000;\n}")();
18604
18614
  const _hoisted_1$9 = {
18605
18615
  class: "image-box"
@@ -18365,7 +18365,7 @@ var __async = (__this, __arguments, generator) => {
18365
18365
  }
18366
18366
  };
18367
18367
  var UserSelector = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-6c4b4fc8"]]);
18368
- var image_picker_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "[data-v-87dcb274] .label {\n color: #000 !important;\n}\n[data-v-87dcb274] .van-field__control:disabled {\n color: #000 !important;\n cursor: not-allowed;\n opacity: 1;\n -webkit-text-fill-color: #000;\n}")();
18368
+ var image_picker_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "[data-v-454a9fba] .label {\n color: #000 !important;\n}\n[data-v-454a9fba] .van-field__control:disabled {\n color: #000 !important;\n cursor: not-allowed;\n opacity: 1;\n -webkit-text-fill-color: #000;\n}")();
18369
18369
  const _hoisted_1$b = {
18370
18370
  class: "image-box"
18371
18371
  };
@@ -18392,6 +18392,10 @@ var __async = (__this, __arguments, generator) => {
18392
18392
  type: String,
18393
18393
  default: ""
18394
18394
  },
18395
+ capture: {
18396
+ type: String,
18397
+ default: "environment"
18398
+ },
18395
18399
  compress: {
18396
18400
  type: Boolean,
18397
18401
  default: true
@@ -18465,19 +18469,20 @@ var __async = (__this, __arguments, generator) => {
18465
18469
  modelValue: files.value,
18466
18470
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => files.value = $event),
18467
18471
  "max-count": 1,
18472
+ capture: props.capture,
18468
18473
  accept: "image/jpeg,image/png",
18469
18474
  afterRead: onAfterRead,
18470
18475
  disabled: vue.unref(isDisabled),
18471
18476
  deletable: !vue.unref(isDisabled),
18472
18477
  "before-delete": onBeforeDelete
18473
- }, null, 8, ["modelValue", "disabled", "deletable"])])]),
18478
+ }, null, 8, ["modelValue", "capture", "disabled", "deletable"])])]),
18474
18479
  _: 1
18475
18480
  }, 8, ["label", "required", "rules", "placeholder"])) : vue.createCommentVNode("", true);
18476
18481
  };
18477
18482
  }
18478
18483
  };
18479
- var ImagePicker = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-87dcb274"]]);
18480
- var images_picker_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".widget[data-v-93421532] {\n text-align: center;\n}\n.widget .btn[data-v-93421532] {\n position: fixed;\n bottom: 1rem;\n left: 0;\n right: 0;\n margin: auto auto;\n color: white;\n font-size: 14px;\n background: rgb(58, 136, 255);\n padding: 8px 35px;\n width: 100px;\n text-align: center;\n display: inline-block;\n border-radius: 2px;\n}")();
18484
+ var ImagePicker = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-454a9fba"]]);
18485
+ var images_picker_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".widget[data-v-a6f1f22a] {\n text-align: center;\n}\n.widget .btn[data-v-a6f1f22a] {\n position: fixed;\n bottom: 1rem;\n left: 0;\n right: 0;\n margin: auto auto;\n color: white;\n font-size: 14px;\n background: rgb(58, 136, 255);\n padding: 8px 35px;\n width: 100px;\n text-align: center;\n display: inline-block;\n border-radius: 2px;\n}")();
18481
18486
  const _hoisted_1$a = {
18482
18487
  class: "image-box"
18483
18488
  };
@@ -18501,6 +18506,10 @@ var __async = (__this, __arguments, generator) => {
18501
18506
  default: false
18502
18507
  },
18503
18508
  placeholder: {
18509
+ type: String,
18510
+ default: "environment"
18511
+ },
18512
+ capture: {
18504
18513
  type: String,
18505
18514
  default: ""
18506
18515
  },
@@ -18591,18 +18600,19 @@ var __async = (__this, __arguments, generator) => {
18591
18600
  modelValue: files.value,
18592
18601
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => files.value = $event),
18593
18602
  "max-count": props.max,
18603
+ capture: props.capture,
18594
18604
  accept: "image/jpeg,image/png",
18595
18605
  disabled: vue.unref(isDisabled),
18596
18606
  deletable: !vue.unref(isDisabled),
18597
18607
  afterRead: onAfterRead,
18598
18608
  "before-delete": onBeforeDelete
18599
- }, null, 8, ["modelValue", "max-count", "disabled", "deletable"])])]),
18609
+ }, null, 8, ["modelValue", "max-count", "capture", "disabled", "deletable"])])]),
18600
18610
  _: 1
18601
18611
  }, 8, ["label", "required", "rules", "placeholder"]);
18602
18612
  };
18603
18613
  }
18604
18614
  };
18605
- var ImagesPicker = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-93421532"]]);
18615
+ var ImagesPicker = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-a6f1f22a"]]);
18606
18616
  var FilePicker_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "[data-v-a0846250] .label {\n color: #000 !important;\n}\n[data-v-a0846250] .van-field__control:disabled {\n color: #000 !important;\n cursor: not-allowed;\n opacity: 1;\n -webkit-text-fill-color: #000;\n}")();
18607
18617
  const _hoisted_1$9 = {
18608
18618
  class: "image-box"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "widget.qw",
3
3
  "private": false,
4
- "version": "1.0.31",
4
+ "version": "1.0.33",
5
5
  "description": "marqstree Vue3组件库",
6
6
  "main": "build/widget.qw.es.js",
7
7
  "keywords": [
@@ -3,7 +3,9 @@
3
3
  label-class="label" :placeholder="props.placeholder">
4
4
  <template #input>
5
5
  <div class="image-box">
6
- <van-uploader v-model="files" :max-count="1" accept="image/jpeg,image/png" :afterRead="onAfterRead" :disabled="isDisabled"
6
+ <van-uploader v-model="files" :max-count="1"
7
+ :capture="props.capture"
8
+ accept="image/jpeg,image/png" :afterRead="onAfterRead" :disabled="isDisabled"
7
9
  :deletable="!isDisabled"
8
10
  :before-delete="onBeforeDelete" />
9
11
  </div>
@@ -37,6 +39,10 @@ const props = defineProps({
37
39
  type:String,
38
40
  default:''
39
41
  },
42
+ capture:{
43
+ type:String,
44
+ default:'environment'
45
+ },
40
46
  compress: {
41
47
  type: Boolean,
42
48
  default: true
@@ -1,13 +1,11 @@
1
1
  <template>
2
- <van-field name="image" :label="props.label" :required="isRequired" :rules="props.rules"
3
- label-class="label" :placeholder="props.placeholder">
2
+ <van-field name="image" :label="props.label" :required="isRequired" :rules="props.rules" label-class="label"
3
+ :placeholder="props.placeholder">
4
4
  <template #input>
5
5
  <div class="image-box">
6
- <van-uploader v-model="files" :max-count="props.max" accept="image/jpeg,image/png"
7
- :disabled="isDisabled"
8
- :deletable="!isDisabled"
9
- :afterRead="onAfterRead"
10
- :before-delete="onBeforeDelete" />
6
+ <van-uploader v-model="files" :max-count="props.max" :capture="props.capture"
7
+ accept="image/jpeg,image/png" :disabled="isDisabled" :deletable="!isDisabled"
8
+ :afterRead="onAfterRead" :before-delete="onBeforeDelete" />
11
9
  </div>
12
10
  </template>
13
11
  </van-field>
@@ -36,6 +34,10 @@ const props = defineProps({
36
34
  default: false
37
35
  },
38
36
  placeholder: {
37
+ type: String,
38
+ default: 'environment'
39
+ },
40
+ capture: {
39
41
  type: String,
40
42
  default: ''
41
43
  },
@@ -43,8 +45,8 @@ const props = defineProps({
43
45
  type: Boolean,
44
46
  default: true
45
47
  },
46
- max:{
47
- type:Number,
48
+ max: {
49
+ type: Number,
48
50
  default: 1000
49
51
  },
50
52
  rules: {
@@ -65,7 +67,7 @@ onMounted(() => {
65
67
 
66
68
  })
67
69
 
68
- const onAfterRead = async(file) => {
70
+ const onAfterRead = async (file) => {
69
71
  console.log(file)
70
72
 
71
73
  let compress_file = file.file
@@ -1,31 +0,0 @@
1
- <template>
2
- <div class="page">
3
- <van-dropdown-menu>
4
- <widget-qw-project-dropdown v-model="formData.id" />
5
- </van-dropdown-menu>
6
- </div>
7
- </template>
8
-
9
- <script setup>
10
- import { reactive, onMounted } from "vue";
11
- const formData = reactive({
12
- id:''
13
- })
14
-
15
- onMounted(() => {
16
- })
17
- </script>
18
-
19
- <style lang="scss" scoped>
20
- .page {
21
- height: 100vh;
22
- background: #fff;
23
- text-align: center;
24
- background-size: cover;
25
- display: flex;
26
- flex-direction: column;
27
- justify-content: flex-start;
28
- padding: 80px 15px 0 15px;
29
- box-sizing: border-box;
30
- }
31
- </style>