widget.qw 1.0.18 → 1.0.20
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 +7 -7
- package/build/widget.qw.es.js +8 -13
- package/build/widget.qw.umd.js +8 -13
- package/package.json +1 -1
- package/src/components/SingleApiPicker.vue +7 -10
package/build/style.css
CHANGED
|
@@ -817,27 +817,27 @@
|
|
|
817
817
|
/* 防止压缩 */
|
|
818
818
|
}
|
|
819
819
|
|
|
820
|
-
.widget[data-v-
|
|
820
|
+
.widget[data-v-09be9e95] {
|
|
821
821
|
/* 统一字段间距 */
|
|
822
822
|
}
|
|
823
|
-
.widget[data-v-
|
|
823
|
+
.widget[data-v-09be9e95] .van-cell {
|
|
824
824
|
align-items: center;
|
|
825
825
|
}
|
|
826
|
-
.widget[data-v-
|
|
826
|
+
.widget[data-v-09be9e95] .van-field__label {
|
|
827
827
|
width: 90px;
|
|
828
828
|
flex: none;
|
|
829
829
|
}
|
|
830
|
-
.widget .readonly-field[data-v-
|
|
830
|
+
.widget .readonly-field[data-v-09be9e95] {
|
|
831
831
|
/* 添加必填星号对齐 */
|
|
832
832
|
}
|
|
833
|
-
.widget .readonly-field[data-v-
|
|
833
|
+
.widget .readonly-field[data-v-09be9e95] .van-field__control {
|
|
834
834
|
color: #323233;
|
|
835
835
|
/* 修改文字颜色与普通字段一致 */
|
|
836
836
|
padding-right: 16px;
|
|
837
837
|
}
|
|
838
|
-
.widget .readonly-field.van-field--required[data-v-
|
|
838
|
+
.widget .readonly-field.van-field--required[data-v-09be9e95] .van-field__label::before {
|
|
839
839
|
margin-right: 4px;
|
|
840
840
|
}
|
|
841
|
-
.widget .readonly-field[data-v-
|
|
841
|
+
.widget .readonly-field[data-v-09be9e95] {
|
|
842
842
|
margin: 4px 0;
|
|
843
843
|
}
|
package/build/widget.qw.es.js
CHANGED
|
@@ -20661,7 +20661,7 @@ const _sfc_main$1 = {
|
|
|
20661
20661
|
};
|
|
20662
20662
|
}
|
|
20663
20663
|
};
|
|
20664
|
-
var SingleApiPicker_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => '@charset "UTF-8";\n.widget[data-v-
|
|
20664
|
+
var SingleApiPicker_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => '@charset "UTF-8";\n.widget[data-v-09be9e95] {\n /* \u7EDF\u4E00\u5B57\u6BB5\u95F4\u8DDD */\n}\n.widget[data-v-09be9e95] .van-cell {\n align-items: center;\n}\n.widget[data-v-09be9e95] .van-field__label {\n width: 90px;\n flex: none;\n}\n.widget .readonly-field[data-v-09be9e95] {\n /* \u6DFB\u52A0\u5FC5\u586B\u661F\u53F7\u5BF9\u9F50 */\n}\n.widget .readonly-field[data-v-09be9e95] .van-field__control {\n color: #323233;\n /* \u4FEE\u6539\u6587\u5B57\u989C\u8272\u4E0E\u666E\u901A\u5B57\u6BB5\u4E00\u81F4 */\n padding-right: 16px;\n}\n.widget .readonly-field.van-field--required[data-v-09be9e95] .van-field__label::before {\n margin-right: 4px;\n}\n.widget .readonly-field[data-v-09be9e95] {\n margin: 4px 0;\n}')();
|
|
20665
20665
|
const _hoisted_1 = {
|
|
20666
20666
|
class: "widget"
|
|
20667
20667
|
};
|
|
@@ -20692,10 +20692,9 @@ const _sfc_main = {
|
|
|
20692
20692
|
type: String,
|
|
20693
20693
|
default: ""
|
|
20694
20694
|
},
|
|
20695
|
-
|
|
20696
|
-
type:
|
|
20697
|
-
default:
|
|
20698
|
-
}
|
|
20695
|
+
options: {
|
|
20696
|
+
type: Array,
|
|
20697
|
+
default: []
|
|
20699
20698
|
}
|
|
20700
20699
|
},
|
|
20701
20700
|
emits: ["update:modelValue", "select"],
|
|
@@ -20711,17 +20710,13 @@ const _sfc_main = {
|
|
|
20711
20710
|
isDisabled
|
|
20712
20711
|
} = util.props2auth(props);
|
|
20713
20712
|
const data2 = reactive({
|
|
20714
|
-
isShow: false
|
|
20715
|
-
options: []
|
|
20713
|
+
isShow: false
|
|
20716
20714
|
});
|
|
20717
20715
|
const formatLabel = computed(() => {
|
|
20718
|
-
let one =
|
|
20716
|
+
let one = props.options.find((item) => item.value == modelValue.value);
|
|
20719
20717
|
return one ? one.text : "";
|
|
20720
20718
|
});
|
|
20721
20719
|
onMounted(() => __async(this, null, function* () {
|
|
20722
|
-
props.query((options) => {
|
|
20723
|
-
data2.options = options;
|
|
20724
|
-
});
|
|
20725
20720
|
}));
|
|
20726
20721
|
const onShow = () => {
|
|
20727
20722
|
if (isReadonly.value || isDisabled.value || isGone.value)
|
|
@@ -20762,7 +20757,7 @@ const _sfc_main = {
|
|
|
20762
20757
|
position: "bottom"
|
|
20763
20758
|
}, {
|
|
20764
20759
|
default: withCtx(() => [createVNode(_component_van_picker, {
|
|
20765
|
-
columns:
|
|
20760
|
+
columns: props.options,
|
|
20766
20761
|
onCancel,
|
|
20767
20762
|
onConfirm
|
|
20768
20763
|
}, null, 8, ["columns"])]),
|
|
@@ -20771,7 +20766,7 @@ const _sfc_main = {
|
|
|
20771
20766
|
};
|
|
20772
20767
|
}
|
|
20773
20768
|
};
|
|
20774
|
-
var SingleApiPicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
20769
|
+
var SingleApiPicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-09be9e95"]]);
|
|
20775
20770
|
const secret_notify = () => {
|
|
20776
20771
|
showNotify({ type: "danger", message: "\u4E25\u683C\u6267\u884C\u4FE1\u606F\u4FDD\u5BC6\u8981\u6C42\uFF0C\u5207\u5B9E\u9632\u8303\u4F01\u4E1A\u6CC4\u5BC6\u98CE\u9669", duration: 3e3 });
|
|
20777
20772
|
};
|
package/build/widget.qw.umd.js
CHANGED
|
@@ -20664,7 +20664,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
20664
20664
|
};
|
|
20665
20665
|
}
|
|
20666
20666
|
};
|
|
20667
|
-
var SingleApiPicker_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => '@charset "UTF-8";\n.widget[data-v-
|
|
20667
|
+
var SingleApiPicker_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => '@charset "UTF-8";\n.widget[data-v-09be9e95] {\n /* \u7EDF\u4E00\u5B57\u6BB5\u95F4\u8DDD */\n}\n.widget[data-v-09be9e95] .van-cell {\n align-items: center;\n}\n.widget[data-v-09be9e95] .van-field__label {\n width: 90px;\n flex: none;\n}\n.widget .readonly-field[data-v-09be9e95] {\n /* \u6DFB\u52A0\u5FC5\u586B\u661F\u53F7\u5BF9\u9F50 */\n}\n.widget .readonly-field[data-v-09be9e95] .van-field__control {\n color: #323233;\n /* \u4FEE\u6539\u6587\u5B57\u989C\u8272\u4E0E\u666E\u901A\u5B57\u6BB5\u4E00\u81F4 */\n padding-right: 16px;\n}\n.widget .readonly-field.van-field--required[data-v-09be9e95] .van-field__label::before {\n margin-right: 4px;\n}\n.widget .readonly-field[data-v-09be9e95] {\n margin: 4px 0;\n}')();
|
|
20668
20668
|
const _hoisted_1 = {
|
|
20669
20669
|
class: "widget"
|
|
20670
20670
|
};
|
|
@@ -20695,10 +20695,9 @@ var __async = (__this, __arguments, generator) => {
|
|
|
20695
20695
|
type: String,
|
|
20696
20696
|
default: ""
|
|
20697
20697
|
},
|
|
20698
|
-
|
|
20699
|
-
type:
|
|
20700
|
-
default:
|
|
20701
|
-
}
|
|
20698
|
+
options: {
|
|
20699
|
+
type: Array,
|
|
20700
|
+
default: []
|
|
20702
20701
|
}
|
|
20703
20702
|
},
|
|
20704
20703
|
emits: ["update:modelValue", "select"],
|
|
@@ -20714,17 +20713,13 @@ var __async = (__this, __arguments, generator) => {
|
|
|
20714
20713
|
isDisabled
|
|
20715
20714
|
} = util.props2auth(props);
|
|
20716
20715
|
const data2 = vue.reactive({
|
|
20717
|
-
isShow: false
|
|
20718
|
-
options: []
|
|
20716
|
+
isShow: false
|
|
20719
20717
|
});
|
|
20720
20718
|
const formatLabel = vue.computed(() => {
|
|
20721
|
-
let one =
|
|
20719
|
+
let one = props.options.find((item) => item.value == modelValue.value);
|
|
20722
20720
|
return one ? one.text : "";
|
|
20723
20721
|
});
|
|
20724
20722
|
vue.onMounted(() => __async(this, null, function* () {
|
|
20725
|
-
props.query((options) => {
|
|
20726
|
-
data2.options = options;
|
|
20727
|
-
});
|
|
20728
20723
|
}));
|
|
20729
20724
|
const onShow = () => {
|
|
20730
20725
|
if (isReadonly.value || isDisabled.value || isGone.value)
|
|
@@ -20765,7 +20760,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
20765
20760
|
position: "bottom"
|
|
20766
20761
|
}, {
|
|
20767
20762
|
default: vue.withCtx(() => [vue.createVNode(_component_van_picker, {
|
|
20768
|
-
columns:
|
|
20763
|
+
columns: props.options,
|
|
20769
20764
|
onCancel,
|
|
20770
20765
|
onConfirm
|
|
20771
20766
|
}, null, 8, ["columns"])]),
|
|
@@ -20774,7 +20769,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
20774
20769
|
};
|
|
20775
20770
|
}
|
|
20776
20771
|
};
|
|
20777
|
-
var SingleApiPicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
20772
|
+
var SingleApiPicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-09be9e95"]]);
|
|
20778
20773
|
const secret_notify = () => {
|
|
20779
20774
|
showNotify({ type: "danger", message: "\u4E25\u683C\u6267\u884C\u4FE1\u606F\u4FDD\u5BC6\u8981\u6C42\uFF0C\u5207\u5B9E\u9632\u8303\u4F01\u4E1A\u6CC4\u5BC6\u98CE\u9669", duration: 3e3 });
|
|
20780
20775
|
};
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<van-field v-model="formatLabel" is-link :label="props.label" :placeholder="props.placeholder" readonly
|
|
4
4
|
:required="isRequired" :disabled="isDisabled" @click="onShow" />
|
|
5
5
|
<van-popup v-model:show="data.isShow" destroy-on-close round position="bottom">
|
|
6
|
-
<van-picker :columns="
|
|
6
|
+
<van-picker :columns="props.options" @cancel="onCancel" @confirm="onConfirm" />
|
|
7
7
|
</van-popup>
|
|
8
8
|
</div>
|
|
9
9
|
</template>
|
|
@@ -38,9 +38,9 @@ const props = defineProps({
|
|
|
38
38
|
type: String,
|
|
39
39
|
default: "",
|
|
40
40
|
},
|
|
41
|
-
|
|
42
|
-
type:
|
|
43
|
-
default:
|
|
41
|
+
options: {
|
|
42
|
+
type:Array,
|
|
43
|
+
default: []
|
|
44
44
|
}
|
|
45
45
|
})
|
|
46
46
|
|
|
@@ -48,18 +48,14 @@ const emit = defineEmits(['update:modelValue', 'select'])
|
|
|
48
48
|
const modelValue = useVModel(props, 'modelValue', emit)
|
|
49
49
|
const { isRequired, isReadonly, isGone, isDisabled } = util.props2auth(props);
|
|
50
50
|
const data = reactive({
|
|
51
|
-
isShow: false
|
|
52
|
-
options: []
|
|
51
|
+
isShow: false
|
|
53
52
|
})
|
|
54
53
|
const formatLabel = computed(() => {
|
|
55
|
-
let one =
|
|
54
|
+
let one = props.options.find(item => item.value == modelValue.value)
|
|
56
55
|
return one ? one.text : ''
|
|
57
56
|
})
|
|
58
57
|
|
|
59
58
|
onMounted(async () => {
|
|
60
|
-
props.query((options) => {
|
|
61
|
-
data.options = options
|
|
62
|
-
})
|
|
63
59
|
})
|
|
64
60
|
|
|
65
61
|
const onShow=()=>{
|
|
@@ -80,6 +76,7 @@ const onConfirm = ({ selectedOptions }) => {
|
|
|
80
76
|
const onCancel = () => {
|
|
81
77
|
data.isShow = false
|
|
82
78
|
}
|
|
79
|
+
|
|
83
80
|
</script>
|
|
84
81
|
|
|
85
82
|
<style lang="scss" scoped>
|