ll-plus 2.2.20 → 2.2.21
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/es/components/key-value/src/key-value.vue2.mjs +1 -1
- package/es/components/key-value/src/key-value.vue2.mjs.map +1 -1
- package/es/utils/props/runtime.d.ts +2 -2
- package/index.full.js +1 -1
- package/index.full.min.js +1 -1
- package/index.full.min.js.map +1 -1
- package/index.full.min.mjs +1 -1
- package/index.full.min.mjs.map +1 -1
- package/index.full.mjs +1 -1
- package/lib/components/key-value/src/key-value.vue2.js +1 -1
- package/lib/components/key-value/src/key-value.vue2.js.map +1 -1
- package/lib/utils/props/runtime.d.ts +2 -2
- package/package.json +1 -1
- package/types/packages/utils/props/runtime.d.ts +2 -2
package/index.full.mjs
CHANGED
|
@@ -58506,7 +58506,7 @@ var _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
58506
58506
|
null,
|
|
58507
58507
|
renderList(innerValue.value, (_item, idx) => {
|
|
58508
58508
|
return openBlock(), createBlock(keyValueItem, {
|
|
58509
|
-
key:
|
|
58509
|
+
key: _item,
|
|
58510
58510
|
ref_for: true,
|
|
58511
58511
|
ref: (el) => keyValueItems.value[idx] = el,
|
|
58512
58512
|
value: innerValue.value[idx],
|
|
@@ -79,7 +79,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
79
79
|
null,
|
|
80
80
|
vue.renderList(innerValue.value, (_item, idx) => {
|
|
81
81
|
return vue.openBlock(), vue.createBlock(keyValueItem.default, {
|
|
82
|
-
key:
|
|
82
|
+
key: _item,
|
|
83
83
|
ref_for: true,
|
|
84
84
|
ref: (el) => keyValueItems.value[idx] = el,
|
|
85
85
|
value: innerValue.value[idx],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"key-value.vue2.js","sources":["../../../../../packages/components/key-value/src/key-value.vue"],"sourcesContent":["<template>\n <div :class=\"bem.b()\">\n <a-spin :spinning=\"props.loading\">\n <key-value-item\n v-for=\"(_item, idx) in innerValue\"\n :key=\"
|
|
1
|
+
{"version":3,"file":"key-value.vue2.js","sources":["../../../../../packages/components/key-value/src/key-value.vue"],"sourcesContent":["<template>\n <div :class=\"bem.b()\">\n <a-spin :spinning=\"props.loading\">\n <key-value-item\n v-for=\"(_item, idx) in innerValue\"\n :key=\"_item\"\n :ref=\"el => (keyValueItems[idx] = el)\"\n v-model:value=\"innerValue[idx]\"\n :idx=\"idx\"\n :key-label=\"props.keyLabel\"\n :value-label=\"props.valueLabel\"\n :key-value-type-dict=\"keyValueTypeDict\"\n :show-delete=\"idx > 0\"\n :key-value-type=\"props.keyValueType\"\n :key-type=\"props.keyType\"\n :key-types=\"props.keyTypes\"\n :value-type=\"props.valueType\"\n :disabled=\"props.disabled\"\n :disabled-value=\"props.disabledValue\"\n :disabled-key=\"props.disabledKey\"\n :disabled-delete=\"props.disabledDelete\"\n @delete=\"handleDelete(idx)\"\n @change=\"handleChange\"\n >\n <template\n v-for=\"item in Object.keys($slots)\"\n :key=\"item\"\n #[item]=\"data\"\n >\n <slot :name=\"item\" v-bind=\"data || {}\" :index=\"idx\"></slot>\n </template>\n </key-value-item>\n <ll-button\n :class=\"bem.e('add')\"\n :loading=\"loading\"\n :disabled=\"props.disabled || props.disabledAdd\"\n @click=\"handleAddItem\"\n >\n <div :class=\"bem.e('plus')\">\n <ll-icon\n v-if=\"!loading\"\n icon-name=\"icon-add\"\n :class=\"bem.e('icon-add')\"\n />\n {{ props.addText }}\n </div>\n </ll-button>\n </a-spin>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, computed, watch } from 'vue'\nimport { createNamespace } from '@ll-plus/utils'\nimport {\n keyValueProps,\n keyValueEmits,\n getKeyValueItem,\n type KeyValueItem\n} from './config'\nimport keyValueItem from './components/key-value-item.vue'\n\ndefineOptions({ name: 'LlKeyValue' })\n\nconst props = defineProps(keyValueProps)\nconst emits = defineEmits(keyValueEmits)\nconst bem = createNamespace('key-value')\n\nconst innerValue = ref<KeyValueItem[]>([])\n\nconst keyValueItems = ref<any[]>([])\n\nconst keyValueTypeDict = computed(() => {\n const obj = {}\n props.keyTypes.map(e => {\n obj[e.value] = e.option\n })\n return obj\n})\n\nconst handleAddItem = () => {\n innerValue.value.push(getKeyValueItem())\n emits('add', {\n index: innerValue.value.length - 1,\n item: innerValue.value[innerValue.value.length - 1],\n value: innerValue.value\n })\n handleChange()\n}\n\nconst handleDelete = (idx: number) => {\n innerValue.value.splice(idx, 1)\n emits('delete', idx)\n handleChange()\n}\n\nconst handleChange = () => {\n try {\n emits('change', innerValue.value)\n emits('update:value', innerValue.value)\n } catch (error) {\n console.error(error)\n }\n}\n\nwatch(\n () => props.value,\n n => {\n innerValue.value = n && n.length > 0 ? n : [{ key: null, value: null }]\n },\n {\n immediate: true,\n deep: true\n }\n)\n</script>\n"],"names":["createNamespace","ref","computed","getKeyValueItem","watch"],"mappings":";;;;;;;;;;;;;;;;;;AAgEA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAA,MAAM,KAAQ,GAAA,MAAA,CAAA;AACd,IAAM,MAAA,GAAA,GAAMA,gCAAgB,WAAW,CAAA,CAAA;AAEvC,IAAM,MAAA,UAAA,GAAaC,OAAoB,CAAA,EAAE,CAAA,CAAA;AAEzC,IAAM,MAAA,aAAA,GAAgBA,OAAW,CAAA,EAAE,CAAA,CAAA;AAEnC,IAAM,MAAA,gBAAA,GAAmBC,aAAS,MAAM;AACtC,MAAA,MAAM,MAAM,EAAC,CAAA;AACb,MAAM,KAAA,CAAA,QAAA,CAAS,IAAI,CAAK,CAAA,KAAA;AACtB,QAAI,GAAA,CAAA,CAAA,CAAE,KAAK,CAAA,GAAI,CAAE,CAAA,MAAA,CAAA;AAAA,OAClB,CAAA,CAAA;AACD,MAAO,OAAA,GAAA,CAAA;AAAA,KACR,CAAA,CAAA;AAED,IAAA,MAAM,gBAAgB,MAAM;AAC1B,MAAW,UAAA,CAAA,KAAA,CAAM,IAAK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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -27,6 +27,6 @@ export declare const buildProp: <Type = never, Value = never, Validator = never,
|
|
|
27
27
|
export type TestProps = Record<string, {
|
|
28
28
|
[epPropKey]: true;
|
|
29
29
|
} | NativePropType | EpPropInput<any, any, any, any, any>>;
|
|
30
|
-
export declare const buildProps: <Props extends Record<string, {
|
|
30
|
+
export declare const buildProps: <Props extends Record<string, NativePropType | EpPropInput<any, any, any, any, any> | {
|
|
31
31
|
__epPropKey: true;
|
|
32
|
-
}
|
|
32
|
+
}>>(props: Props) => { [K in keyof Props]: IfEpProp<Props[K], Props[K], IfNativePropType<Props[K], Props[K], EpPropConvert<Props[K]>>>; };
|
package/package.json
CHANGED
|
@@ -27,6 +27,6 @@ export declare const buildProp: <Type = never, Value = never, Validator = never,
|
|
|
27
27
|
export type TestProps = Record<string, {
|
|
28
28
|
[epPropKey]: true;
|
|
29
29
|
} | NativePropType | EpPropInput<any, any, any, any, any>>;
|
|
30
|
-
export declare const buildProps: <Props extends Record<string, {
|
|
30
|
+
export declare const buildProps: <Props extends Record<string, NativePropType | EpPropInput<any, any, any, any, any> | {
|
|
31
31
|
__epPropKey: true;
|
|
32
|
-
}
|
|
32
|
+
}>>(props: Props) => { [K in keyof Props]: IfEpProp<Props[K], Props[K], IfNativePropType<Props[K], Props[K], EpPropConvert<Props[K]>>>; };
|