widget.qw 1.0.56 → 1.0.57

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.
@@ -17068,6 +17068,10 @@ const _sfc_main$o = {
17068
17068
  type: Boolean,
17069
17069
  default: false
17070
17070
  },
17071
+ disabled: {
17072
+ type: Boolean,
17073
+ default: false
17074
+ },
17071
17075
  defaultnow: {
17072
17076
  type: Boolean,
17073
17077
  default: false
@@ -17121,6 +17125,11 @@ const _sfc_main$o = {
17121
17125
  modelValue.value = "";
17122
17126
  }
17123
17127
  });
17128
+ const rightIcon = computed(() => {
17129
+ if (isReadonly.value || isDisabled.value)
17130
+ return "";
17131
+ return "arrow";
17132
+ });
17124
17133
  watch(() => props.modelValue, (n, o) => {
17125
17134
  if (!props.defaultnow)
17126
17135
  return;
@@ -17150,9 +17159,9 @@ const _sfc_main$o = {
17150
17159
  placeholder: props.placeholder,
17151
17160
  required: unref(isRequired),
17152
17161
  rules: props.rules,
17153
- "right-icon": "arrow",
17162
+ "right-icon": unref(rightIcon),
17154
17163
  onClickRightIcon: onToggleShow
17155
- }, null, 8, ["modelValue", "label", "disabled", "readonly", "placeholder", "required", "rules"])) : createCommentVNode("", true), createVNode(_sfc_main$p, {
17164
+ }, null, 8, ["modelValue", "label", "disabled", "readonly", "placeholder", "required", "rules", "right-icon"])) : createCommentVNode("", true), createVNode(_sfc_main$p, {
17156
17165
  isShow: data2.isShow,
17157
17166
  "onUpdate:isShow": _cache[1] || (_cache[1] = ($event) => data2.isShow = $event),
17158
17167
  modelValue: unref(modelValue),
@@ -17071,6 +17071,10 @@ var __async = (__this, __arguments, generator) => {
17071
17071
  type: Boolean,
17072
17072
  default: false
17073
17073
  },
17074
+ disabled: {
17075
+ type: Boolean,
17076
+ default: false
17077
+ },
17074
17078
  defaultnow: {
17075
17079
  type: Boolean,
17076
17080
  default: false
@@ -17124,6 +17128,11 @@ var __async = (__this, __arguments, generator) => {
17124
17128
  modelValue.value = "";
17125
17129
  }
17126
17130
  });
17131
+ const rightIcon = vue.computed(() => {
17132
+ if (isReadonly.value || isDisabled.value)
17133
+ return "";
17134
+ return "arrow";
17135
+ });
17127
17136
  vue.watch(() => props.modelValue, (n, o) => {
17128
17137
  if (!props.defaultnow)
17129
17138
  return;
@@ -17153,9 +17162,9 @@ var __async = (__this, __arguments, generator) => {
17153
17162
  placeholder: props.placeholder,
17154
17163
  required: vue.unref(isRequired),
17155
17164
  rules: props.rules,
17156
- "right-icon": "arrow",
17165
+ "right-icon": vue.unref(rightIcon),
17157
17166
  onClickRightIcon: onToggleShow
17158
- }, null, 8, ["modelValue", "label", "disabled", "readonly", "placeholder", "required", "rules"])) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$p, {
17167
+ }, null, 8, ["modelValue", "label", "disabled", "readonly", "placeholder", "required", "rules", "right-icon"])) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$p, {
17159
17168
  isShow: data2.isShow,
17160
17169
  "onUpdate:isShow": _cache[1] || (_cache[1] = ($event) => data2.isShow = $event),
17161
17170
  modelValue: vue.unref(modelValue),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "widget.qw",
3
3
  "private": false,
4
- "version": "1.0.56",
4
+ "version": "1.0.57",
5
5
  "description": "marqstree Vue3组件库",
6
6
  "main": "build/widget.qw.es.js",
7
7
  "keywords": [
@@ -5,7 +5,7 @@
5
5
  readonly
6
6
  clearable
7
7
  :placeholder="props.placeholder" :required="isRequired" :rules="props.rules"
8
- right-icon="arrow"
8
+ :right-icon="rightIcon"
9
9
  @click-right-icon="onToggleShow">
10
10
  </van-field>
11
11
 
@@ -33,6 +33,10 @@ const props = defineProps({
33
33
  type: Boolean,
34
34
  default: false
35
35
  },
36
+ disabled:{
37
+ type:Boolean,
38
+ default:false
39
+ },
36
40
  defaultnow: {
37
41
  type: Boolean,
38
42
  default: false
@@ -84,6 +88,13 @@ const formatTime = computed({
84
88
  }
85
89
  })
86
90
 
91
+ const rightIcon = computed(()=>{
92
+ if(isReadonly.value || isDisabled.value)
93
+ return ''
94
+
95
+ return 'arrow'
96
+ })
97
+
87
98
  // 默认当前时间
88
99
  watch(
89
100
  () => props.modelValue,
@@ -11,7 +11,7 @@
11
11
  import { onMounted, reactive, watch } from "vue";
12
12
 
13
13
  const data = reactive({
14
- auth:'require',
14
+ auth:'disabled',
15
15
  date:'2025-01-01 01:02:03'
16
16
  })
17
17