@icreate/ics-mui
Version:
京东风格的轻量级移动端 Vue2、Vue3 组件库(支持小程序开发)
90 lines (89 loc) • 2.88 kB
JavaScript
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
import { defineComponent, toRef, computed, openBlock, createElementBlock, createVNode, unref, withCtx } from "vue";
import { X as v } from "../style_icon-C4_0S-Vm.js";
import "../input/Input.js";
import { u as useFormDisabled } from "../common-DXugw-he.js";
import { _ as _sfc_main$1 } from "../input.vue_vue_type_script_setup_true_lang-CUVjcKoZ.js";
import { w as withInstall } from "../with-install-DWwOiZS3.js";
const _hoisted_1 = { class: "ics-input-picker" };
const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
name: "IcsAssessment"
}), {
__name: "index",
props: {
modelValue: {
type: [String],
default: ""
},
title: {
type: String,
default: "意识"
},
cancelText: {
type: String,
default: "取消"
},
okText: {
type: String,
default: "确认"
},
disabled: {
type: Boolean,
default: false
}
},
emits: ["cancel", "confirm", "update:modelValue"],
setup(__props, { emit: __emit }) {
const props = __props;
const disabled = useFormDisabled(toRef(props, "disabled"));
const emits = __emit;
const selectVal = computed({
get() {
return props.modelValue ? props.modelValue + "分" : "";
},
set(value) {
emits("update:modelValue", value);
}
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", _hoisted_1, [
createVNode(unref(_sfc_main$1), {
modelValue: selectVal.value,
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectVal.value = $event),
border: false,
placeholder: "请选择",
readonly: "",
disabled: unref(disabled)
}, {
right: withCtx(() => [
createVNode(unref(v), { class: "arrow" })
]),
_: 1
}, 8, ["modelValue", "disabled"])
]);
};
}
}));
withInstall(_sfc_main);
export {
_sfc_main as Assessment,
_sfc_main as default
};