yc-agent-ui 1.0.0 → 1.1.0
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/README.md +22 -0
- package/es/components/data-table/src/data-table-pagination.vue.d.ts +3 -3
- package/es/components/data-table/src/data-table-toolbar.vue.d.ts +1 -1
- package/es/components/data-table/src/data-table.vue.d.ts +3 -3
- package/es/components/dialog-form/index.d.ts +4 -4
- package/es/components/dialog-form/src/index.vue.d.ts +4 -4
- package/es/components/display-item/index.d.ts +12 -12
- package/es/components/display-item/src/index.vue.d.ts +12 -12
- package/es/components/drawer-form/index.d.ts +10 -10
- package/es/components/drawer-form/src/index.vue.d.ts +6 -6
- package/es/components/form/index.d.ts +36 -36
- package/es/components/form/src/form-content.vue.d.ts +15 -15
- package/es/components/form/src/index.vue.d.ts +18 -18
- package/es/components/form-item/index.d.ts +37 -37
- package/es/components/form-item/src/index.vue.d.ts +16 -16
- package/es/components/index.d.ts +4 -0
- package/es/components/page/index.d.ts +897 -897
- package/es/components/page/src/index.vue.d.ts +302 -302
- package/es/components/search/index.d.ts +242 -242
- package/es/components/search/src/index.vue.d.ts +84 -84
- package/es/components/table/index.d.ts +18 -18
- package/es/components/table/src/index.vue.d.ts +2 -2
- package/es/components/table/src/table-column.vue.d.ts +24 -24
- package/es/components/virtual-table/index.d.ts +10 -10
- package/es/components/virtual-table/src/index.vue.d.ts +3 -3
- package/es/components/yc-controls/capability.d.ts +4 -0
- package/es/components/yc-controls/index.d.ts +17 -0
- package/es/components/yc-controls/src/choice-cards.vue.d.ts +16 -0
- package/es/components/yc-controls/src/segmented.vue.d.ts +16 -0
- package/es/components/yc-controls/src/switch-row.vue.d.ts +13 -0
- package/es/components/yc-controls/src/type.d.ts +39 -0
- package/es/components/yc-coss-table/src/coss-table.vue.d.ts +2 -2
- package/es/components/yc-coss-table/src/table-head.vue.d.ts +1 -1
- package/es/components/yc-date-picker/src/date-picker.vue.d.ts +1 -1
- package/es/components/yc-feedback/capability.d.ts +4 -0
- package/es/components/yc-feedback/index.d.ts +21 -0
- package/es/components/yc-feedback/src/banner.vue.d.ts +22 -0
- package/es/components/yc-feedback/src/empty-state.vue.d.ts +20 -0
- package/es/components/yc-feedback/src/key-value-list.vue.d.ts +22 -0
- package/es/components/yc-feedback/src/timeline.vue.d.ts +7 -0
- package/es/components/yc-feedback/src/type.d.ts +46 -0
- package/es/components/yc-input/capability.d.ts +4 -0
- package/es/components/yc-input/index.d.ts +21 -0
- package/es/components/yc-input/src/input.vue.d.ts +50 -0
- package/es/components/yc-input/src/money-input.vue.d.ts +26 -0
- package/es/components/yc-input/src/stepper-input.vue.d.ts +18 -0
- package/es/components/yc-input/src/textarea.vue.d.ts +35 -0
- package/es/components/yc-input/src/type.d.ts +82 -0
- package/es/components/yc-plus-page/src/header-filter-cell.vue.d.ts +8 -8
- package/es/components/yc-plus-page/src/index.vue.d.ts +917 -917
- package/es/components/yc-plus-tree/src/index.vue.d.ts +1 -1
- package/es/components/yc-property-table/capability.d.ts +4 -0
- package/es/components/yc-property-table/index.d.ts +30 -0
- package/es/components/yc-property-table/src/asset-table.vue.d.ts +17 -0
- package/es/components/yc-property-table/src/bill-table.vue.d.ts +18 -0
- package/es/components/yc-property-table/src/device-table.vue.d.ts +17 -0
- package/es/components/yc-property-table/src/order-table.vue.d.ts +18 -0
- package/es/components/yc-property-table/src/property-table.vue.d.ts +91 -0
- package/es/components/yc-property-table/src/type.d.ts +214 -0
- package/es/components/yc-questionnaire/src/index.vue.d.ts +1 -1
- package/es/components/yc-select-v2/src/index.vue.d.ts +1 -1
- package/es/hooks/usePlusFormReset.d.ts +66 -66
- package/es/index.css +9 -9
- package/es/index.mjs +4 -0
- package/es/packages/components/index.mjs +4 -0
- package/es/packages/components/table/capability.mjs +10 -29
- package/es/packages/components/yc-card/capability.mjs +53 -13
- package/es/packages/components/yc-controls/capability.mjs +100 -0
- package/es/packages/components/yc-controls/index.mjs +13 -0
- package/es/packages/components/yc-controls/src/choice-cards.vue.mjs +5 -0
- package/es/packages/components/yc-controls/src/choice-cards2.vue.mjs +157 -0
- package/es/packages/components/yc-controls/src/segmented.vue.mjs +5 -0
- package/es/packages/components/yc-controls/src/segmented2.vue.mjs +78 -0
- package/es/packages/components/yc-controls/src/switch-row.vue.mjs +5 -0
- package/es/packages/components/yc-controls/src/switch-row2.vue.mjs +95 -0
- package/es/packages/components/yc-controls/src/type.mjs +1 -0
- package/es/packages/components/yc-feedback/capability.mjs +109 -0
- package/es/packages/components/yc-feedback/index.mjs +16 -0
- package/es/packages/components/yc-feedback/src/banner.vue.mjs +5 -0
- package/es/packages/components/yc-feedback/src/banner2.vue.mjs +230 -0
- package/es/packages/components/yc-feedback/src/empty-state.vue.mjs +5 -0
- package/es/packages/components/yc-feedback/src/empty-state2.vue.mjs +97 -0
- package/es/packages/components/yc-feedback/src/key-value-list.vue.mjs +5 -0
- package/es/packages/components/yc-feedback/src/key-value-list2.vue.mjs +194 -0
- package/es/packages/components/yc-feedback/src/timeline.vue.mjs +5 -0
- package/es/packages/components/yc-feedback/src/timeline2.vue.mjs +134 -0
- package/es/packages/components/yc-feedback/src/type.mjs +1 -0
- package/es/packages/components/yc-input/capability.mjs +112 -0
- package/es/packages/components/yc-input/index.mjs +16 -0
- package/es/packages/components/yc-input/src/input.vue.mjs +5 -0
- package/es/packages/components/yc-input/src/input2.vue.mjs +427 -0
- package/es/packages/components/yc-input/src/money-input.vue.mjs +5 -0
- package/es/packages/components/yc-input/src/money-input2.vue.mjs +242 -0
- package/es/packages/components/yc-input/src/stepper-input.vue.mjs +5 -0
- package/es/packages/components/yc-input/src/stepper-input2.vue.mjs +211 -0
- package/es/packages/components/yc-input/src/textarea.vue.mjs +5 -0
- package/es/packages/components/yc-input/src/textarea2.vue.mjs +158 -0
- package/es/packages/components/yc-input/src/type.mjs +1 -0
- package/es/packages/components/yc-property-table/capability.mjs +350 -0
- package/es/packages/components/yc-property-table/index.mjs +24 -0
- package/es/packages/components/yc-property-table/src/asset-table.vue.mjs +5 -0
- package/es/packages/components/yc-property-table/src/asset-table2.vue.mjs +405 -0
- package/es/packages/components/yc-property-table/src/bill-table.vue.mjs +5 -0
- package/es/packages/components/yc-property-table/src/bill-table2.vue.mjs +654 -0
- package/es/packages/components/yc-property-table/src/device-table.vue.mjs +5 -0
- package/es/packages/components/yc-property-table/src/device-table2.vue.mjs +324 -0
- package/es/packages/components/yc-property-table/src/order-table.vue.mjs +5 -0
- package/es/packages/components/yc-property-table/src/order-table2.vue.mjs +363 -0
- package/es/packages/components/yc-property-table/src/property-table.vue.mjs +5 -0
- package/es/packages/components/yc-property-table/src/property-table2.vue.mjs +1228 -0
- package/es/packages/components/yc-property-table/src/type.mjs +1 -0
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/index.css +1 -1
- package/index.js +6385 -1362
- package/index.min.js +24 -24
- package/index.min.mjs +26 -26
- package/index.mjs +6341 -1355
- package/lib/components/data-table/src/data-table-pagination.vue.d.ts +3 -3
- package/lib/components/data-table/src/data-table-toolbar.vue.d.ts +1 -1
- package/lib/components/data-table/src/data-table.vue.d.ts +3 -3
- package/lib/components/dialog-form/index.d.ts +4 -4
- package/lib/components/dialog-form/src/index.vue.d.ts +4 -4
- package/lib/components/display-item/index.d.ts +12 -12
- package/lib/components/display-item/src/index.vue.d.ts +12 -12
- package/lib/components/drawer-form/index.d.ts +10 -10
- package/lib/components/drawer-form/src/index.vue.d.ts +6 -6
- package/lib/components/form/index.d.ts +36 -36
- package/lib/components/form/src/form-content.vue.d.ts +15 -15
- package/lib/components/form/src/index.vue.d.ts +18 -18
- package/lib/components/form-item/index.d.ts +37 -37
- package/lib/components/form-item/src/index.vue.d.ts +16 -16
- package/lib/components/index.d.ts +4 -0
- package/lib/components/page/index.d.ts +897 -897
- package/lib/components/page/src/index.vue.d.ts +302 -302
- package/lib/components/search/index.d.ts +242 -242
- package/lib/components/search/src/index.vue.d.ts +84 -84
- package/lib/components/table/index.d.ts +18 -18
- package/lib/components/table/src/index.vue.d.ts +2 -2
- package/lib/components/table/src/table-column.vue.d.ts +24 -24
- package/lib/components/virtual-table/index.d.ts +10 -10
- package/lib/components/virtual-table/src/index.vue.d.ts +3 -3
- package/lib/components/yc-controls/capability.d.ts +4 -0
- package/lib/components/yc-controls/index.d.ts +17 -0
- package/lib/components/yc-controls/src/choice-cards.vue.d.ts +16 -0
- package/lib/components/yc-controls/src/segmented.vue.d.ts +16 -0
- package/lib/components/yc-controls/src/switch-row.vue.d.ts +13 -0
- package/lib/components/yc-controls/src/type.d.ts +39 -0
- package/lib/components/yc-coss-table/src/coss-table.vue.d.ts +2 -2
- package/lib/components/yc-coss-table/src/table-head.vue.d.ts +1 -1
- package/lib/components/yc-date-picker/src/date-picker.vue.d.ts +1 -1
- package/lib/components/yc-feedback/capability.d.ts +4 -0
- package/lib/components/yc-feedback/index.d.ts +21 -0
- package/lib/components/yc-feedback/src/banner.vue.d.ts +22 -0
- package/lib/components/yc-feedback/src/empty-state.vue.d.ts +20 -0
- package/lib/components/yc-feedback/src/key-value-list.vue.d.ts +22 -0
- package/lib/components/yc-feedback/src/timeline.vue.d.ts +7 -0
- package/lib/components/yc-feedback/src/type.d.ts +46 -0
- package/lib/components/yc-input/capability.d.ts +4 -0
- package/lib/components/yc-input/index.d.ts +21 -0
- package/lib/components/yc-input/src/input.vue.d.ts +50 -0
- package/lib/components/yc-input/src/money-input.vue.d.ts +26 -0
- package/lib/components/yc-input/src/stepper-input.vue.d.ts +18 -0
- package/lib/components/yc-input/src/textarea.vue.d.ts +35 -0
- package/lib/components/yc-input/src/type.d.ts +82 -0
- package/lib/components/yc-plus-page/src/header-filter-cell.vue.d.ts +8 -8
- package/lib/components/yc-plus-page/src/index.vue.d.ts +917 -917
- package/lib/components/yc-plus-tree/src/index.vue.d.ts +1 -1
- package/lib/components/yc-property-table/capability.d.ts +4 -0
- package/lib/components/yc-property-table/index.d.ts +30 -0
- package/lib/components/yc-property-table/src/asset-table.vue.d.ts +17 -0
- package/lib/components/yc-property-table/src/bill-table.vue.d.ts +18 -0
- package/lib/components/yc-property-table/src/device-table.vue.d.ts +17 -0
- package/lib/components/yc-property-table/src/order-table.vue.d.ts +18 -0
- package/lib/components/yc-property-table/src/property-table.vue.d.ts +91 -0
- package/lib/components/yc-property-table/src/type.d.ts +214 -0
- package/lib/components/yc-questionnaire/src/index.vue.d.ts +1 -1
- package/lib/components/yc-select-v2/src/index.vue.d.ts +1 -1
- package/lib/hooks/usePlusFormReset.d.ts +66 -66
- package/lib/index.css +11 -11
- package/lib/index.js +176 -135
- package/lib/packages/components/index.js +172 -131
- package/lib/packages/components/table/capability.js +10 -29
- package/lib/packages/components/yc-card/capability.js +53 -13
- package/lib/packages/components/yc-controls/capability.js +104 -0
- package/lib/packages/components/yc-controls/index.js +23 -0
- package/lib/packages/components/yc-controls/src/choice-cards.vue.js +9 -0
- package/lib/packages/components/yc-controls/src/choice-cards2.vue.js +161 -0
- package/lib/packages/components/yc-controls/src/segmented.vue.js +9 -0
- package/lib/packages/components/yc-controls/src/segmented2.vue.js +82 -0
- package/lib/packages/components/yc-controls/src/switch-row.vue.js +9 -0
- package/lib/packages/components/yc-controls/src/switch-row2.vue.js +99 -0
- package/lib/packages/components/yc-controls/src/type.js +2 -0
- package/lib/packages/components/yc-feedback/capability.js +113 -0
- package/lib/packages/components/yc-feedback/index.js +28 -0
- package/lib/packages/components/yc-feedback/src/banner.vue.js +9 -0
- package/lib/packages/components/yc-feedback/src/banner2.vue.js +234 -0
- package/lib/packages/components/yc-feedback/src/empty-state.vue.js +9 -0
- package/lib/packages/components/yc-feedback/src/empty-state2.vue.js +101 -0
- package/lib/packages/components/yc-feedback/src/key-value-list.vue.js +9 -0
- package/lib/packages/components/yc-feedback/src/key-value-list2.vue.js +198 -0
- package/lib/packages/components/yc-feedback/src/timeline.vue.js +9 -0
- package/lib/packages/components/yc-feedback/src/timeline2.vue.js +138 -0
- package/lib/packages/components/yc-feedback/src/type.js +2 -0
- package/lib/packages/components/yc-input/capability.js +116 -0
- package/lib/packages/components/yc-input/index.js +28 -0
- package/lib/packages/components/yc-input/src/input.vue.js +9 -0
- package/lib/packages/components/yc-input/src/input2.vue.js +431 -0
- package/lib/packages/components/yc-input/src/money-input.vue.js +9 -0
- package/lib/packages/components/yc-input/src/money-input2.vue.js +246 -0
- package/lib/packages/components/yc-input/src/stepper-input.vue.js +9 -0
- package/lib/packages/components/yc-input/src/stepper-input2.vue.js +215 -0
- package/lib/packages/components/yc-input/src/textarea.vue.js +9 -0
- package/lib/packages/components/yc-input/src/textarea2.vue.js +162 -0
- package/lib/packages/components/yc-input/src/type.js +2 -0
- package/lib/packages/components/yc-property-table/capability.js +354 -0
- package/lib/packages/components/yc-property-table/index.js +43 -0
- package/lib/packages/components/yc-property-table/src/asset-table.vue.js +9 -0
- package/lib/packages/components/yc-property-table/src/asset-table2.vue.js +409 -0
- package/lib/packages/components/yc-property-table/src/bill-table.vue.js +9 -0
- package/lib/packages/components/yc-property-table/src/bill-table2.vue.js +658 -0
- package/lib/packages/components/yc-property-table/src/device-table.vue.js +9 -0
- package/lib/packages/components/yc-property-table/src/device-table2.vue.js +328 -0
- package/lib/packages/components/yc-property-table/src/order-table.vue.js +9 -0
- package/lib/packages/components/yc-property-table/src/order-table2.vue.js +367 -0
- package/lib/packages/components/yc-property-table/src/property-table.vue.js +9 -0
- package/lib/packages/components/yc-property-table/src/property-table2.vue.js +1232 -0
- package/lib/packages/components/yc-property-table/src/type.js +2 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/locale/en.js +1 -1
- package/locale/en.min.js +1 -1
- package/locale/en.min.mjs +1 -1
- package/locale/en.mjs +1 -1
- package/locale/ja.js +1 -1
- package/locale/ja.min.js +1 -1
- package/locale/ja.min.mjs +1 -1
- package/locale/ja.mjs +1 -1
- package/locale/ko.js +1 -1
- package/locale/ko.min.js +1 -1
- package/locale/ko.min.mjs +1 -1
- package/locale/ko.mjs +1 -1
- package/locale/zh-cn.js +1 -1
- package/locale/zh-cn.min.js +1 -1
- package/locale/zh-cn.min.mjs +1 -1
- package/locale/zh-cn.mjs +1 -1
- package/locale/zh-tw.js +1 -1
- package/locale/zh-tw.min.js +1 -1
- package/locale/zh-tw.min.mjs +1 -1
- package/locale/zh-tw.mjs +1 -1
- package/package.json +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/plus-yc-controls.css +1 -0
- package/theme-chalk/plus-yc-feedback.css +1 -0
- package/theme-chalk/plus-yc-input.css +1 -0
- package/theme-chalk/plus-yc-property-table.css +1 -0
- package/theme-chalk/src/index.scss +4 -0
- package/theme-chalk/src/yc-controls.scss +316 -0
- package/theme-chalk/src/yc-feedback.scss +452 -0
- package/theme-chalk/src/yc-input.scss +473 -0
- package/theme-chalk/src/yc-property-table.scss +1700 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { defineComponent, ref, h } from 'vue';
|
|
2
|
+
import { YcInput, YcMoneyInput, YcStepperInput, YcTextarea } from './index.mjs';
|
|
3
|
+
|
|
4
|
+
const YcInputGalleryDemo = defineComponent({
|
|
5
|
+
name: "YcInputGalleryDemo",
|
|
6
|
+
setup() {
|
|
7
|
+
const keyword = ref("");
|
|
8
|
+
const room = ref("1202");
|
|
9
|
+
return () => h("div", { class: "yc-input-demo-stack" }, [
|
|
10
|
+
h(YcInput, {
|
|
11
|
+
modelValue: keyword.value,
|
|
12
|
+
"onUpdate:modelValue": (val) => {
|
|
13
|
+
keyword.value = val;
|
|
14
|
+
},
|
|
15
|
+
type: "search",
|
|
16
|
+
placeholder: "\u641C\u7D22\u623F\u53F7\u3001\u59D3\u540D\u6216\u624B\u673A\u53F7",
|
|
17
|
+
shortcut: "\u2318K",
|
|
18
|
+
clearable: true
|
|
19
|
+
}),
|
|
20
|
+
h(YcInput, {
|
|
21
|
+
modelValue: room.value,
|
|
22
|
+
"onUpdate:modelValue": (val) => {
|
|
23
|
+
room.value = val;
|
|
24
|
+
},
|
|
25
|
+
label: "\u697C\u680B\u623F\u53F7",
|
|
26
|
+
addonBefore: "3\u680B 2\u5355\u5143",
|
|
27
|
+
suffixText: "\u5BA4",
|
|
28
|
+
monospace: true
|
|
29
|
+
})
|
|
30
|
+
]);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
const YcMoneyInputGalleryDemo = defineComponent({
|
|
34
|
+
name: "YcMoneyInputGalleryDemo",
|
|
35
|
+
setup() {
|
|
36
|
+
const amount = ref(3480);
|
|
37
|
+
return () => h(YcMoneyInput, {
|
|
38
|
+
modelValue: amount.value,
|
|
39
|
+
"onUpdate:modelValue": (val) => {
|
|
40
|
+
amount.value = val;
|
|
41
|
+
},
|
|
42
|
+
label: "\u5E94\u6536\u91D1\u989D",
|
|
43
|
+
hint: "\u5931\u7126\u81EA\u52A8\u6309\u5343\u5206\u4F4D\u5BF9\u9F50\u4E24\u4F4D\u5C0F\u6570",
|
|
44
|
+
clearable: true
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
const YcStepperInputGalleryDemo = defineComponent({
|
|
49
|
+
name: "YcStepperInputGalleryDemo",
|
|
50
|
+
setup() {
|
|
51
|
+
const area = ref(128.5);
|
|
52
|
+
return () => h(YcStepperInput, {
|
|
53
|
+
modelValue: area.value,
|
|
54
|
+
"onUpdate:modelValue": (val) => {
|
|
55
|
+
area.value = val;
|
|
56
|
+
},
|
|
57
|
+
label: "\u8BA1\u8D39\u5EFA\u7B51\u9762\u79EF",
|
|
58
|
+
step: 0.5,
|
|
59
|
+
precision: 1,
|
|
60
|
+
min: 0,
|
|
61
|
+
unit: "\u33A1"
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
const YcTextareaGalleryDemo = defineComponent({
|
|
66
|
+
name: "YcTextareaGalleryDemo",
|
|
67
|
+
setup() {
|
|
68
|
+
const note = ref("\u5730\u4E0B\u8F66\u5E93 B108 \u8F66\u4F4D\u4E0A\u65B9\u7ED9\u6C34\u652F\u7BA1\u6E17\u6C34\uFF0C\u5DF2\u5173\u95ED\u5206\u533A\u9600\u95E8\uFF0C\u5F85\u5DE5\u7A0B\u7EC4\u66F4\u6362\u5BC6\u5C01\u5708\u3002");
|
|
69
|
+
return () => h(YcTextarea, {
|
|
70
|
+
modelValue: note.value,
|
|
71
|
+
"onUpdate:modelValue": (val) => {
|
|
72
|
+
note.value = val;
|
|
73
|
+
},
|
|
74
|
+
label: "\u73B0\u573A\u6838\u67E5\u8BF4\u660E",
|
|
75
|
+
placeholder: "\u586B\u5199\u73B0\u573A\u60C5\u51B5\u3001\u5904\u7F6E\u63AA\u65BD\u4E0E\u540E\u7EED\u8DDF\u8FDB\u4E8B\u9879",
|
|
76
|
+
rows: 3,
|
|
77
|
+
maxlength: 200,
|
|
78
|
+
showCount: true
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
const capability = {
|
|
83
|
+
install: [YcInput, YcMoneyInput, YcTextarea, YcStepperInput],
|
|
84
|
+
gallery: [
|
|
85
|
+
{
|
|
86
|
+
id: "yc-input",
|
|
87
|
+
title: "YcInput \u6587\u672C\u4E0E\u7EC4\u5408\u8F93\u5165",
|
|
88
|
+
categories: ["\u8868\u5355\u5F55\u5165"],
|
|
89
|
+
component: YcInputGalleryDemo
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
id: "yc-money-input",
|
|
93
|
+
title: "YcMoneyInput \u91D1\u989D\u8F93\u5165",
|
|
94
|
+
categories: ["\u8868\u5355\u5F55\u5165"],
|
|
95
|
+
component: YcMoneyInputGalleryDemo
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
id: "yc-stepper-input",
|
|
99
|
+
title: "YcStepperInput \u6B65\u8FDB\u6570\u503C\u8F93\u5165",
|
|
100
|
+
categories: ["\u8868\u5355\u5F55\u5165"],
|
|
101
|
+
component: YcStepperInputGalleryDemo
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
id: "yc-textarea",
|
|
105
|
+
title: "YcTextarea \u591A\u884C\u5907\u6CE8\u8F93\u5165",
|
|
106
|
+
categories: ["\u8868\u5355\u5F55\u5165"],
|
|
107
|
+
component: YcTextareaGalleryDemo
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export { capability as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { withInstall } from '../../utils/src/component.mjs';
|
|
2
|
+
import _sfc_main from './src/input2.vue.mjs';
|
|
3
|
+
import _sfc_main$1 from './src/money-input2.vue.mjs';
|
|
4
|
+
import _sfc_main$2 from './src/textarea2.vue.mjs';
|
|
5
|
+
import _sfc_main$3 from './src/stepper-input2.vue.mjs';
|
|
6
|
+
|
|
7
|
+
const YcInput = withInstall(_sfc_main);
|
|
8
|
+
const ReInput = YcInput;
|
|
9
|
+
const YcMoneyInput = withInstall(_sfc_main$1);
|
|
10
|
+
const ReMoneyInput = YcMoneyInput;
|
|
11
|
+
const YcTextarea = withInstall(_sfc_main$2);
|
|
12
|
+
const ReTextarea = YcTextarea;
|
|
13
|
+
const YcStepperInput = withInstall(_sfc_main$3);
|
|
14
|
+
const ReStepperInput = YcStepperInput;
|
|
15
|
+
|
|
16
|
+
export { ReInput, ReMoneyInput, ReStepperInput, ReTextarea, YcInput, YcMoneyInput, YcStepperInput, YcTextarea, YcInput as default };
|
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
import { defineComponent, useSlots, ref, computed, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, createCommentVNode, renderSlot, createTextVNode, withKeys, withModifiers } from 'vue';
|
|
2
|
+
|
|
3
|
+
const _hoisted_1 = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "yc-field__top"
|
|
6
|
+
};
|
|
7
|
+
const _hoisted_2 = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "yc-field__req",
|
|
10
|
+
"aria-hidden": "true"
|
|
11
|
+
};
|
|
12
|
+
const _hoisted_3 = {
|
|
13
|
+
key: 1,
|
|
14
|
+
class: "yc-field__extra"
|
|
15
|
+
};
|
|
16
|
+
const _hoisted_4 = {
|
|
17
|
+
key: 0,
|
|
18
|
+
class: "yc-input-addon is-before"
|
|
19
|
+
};
|
|
20
|
+
const _hoisted_5 = {
|
|
21
|
+
key: 0,
|
|
22
|
+
class: "yc-input__prefix"
|
|
23
|
+
};
|
|
24
|
+
const _hoisted_6 = {
|
|
25
|
+
key: 0,
|
|
26
|
+
viewBox: "0 0 24 24",
|
|
27
|
+
width: "14",
|
|
28
|
+
height: "14",
|
|
29
|
+
fill: "none",
|
|
30
|
+
stroke: "currentColor",
|
|
31
|
+
"stroke-width": "1.8",
|
|
32
|
+
"stroke-linecap": "round",
|
|
33
|
+
"stroke-linejoin": "round",
|
|
34
|
+
"aria-hidden": "true"
|
|
35
|
+
};
|
|
36
|
+
const _hoisted_7 = {
|
|
37
|
+
key: 1,
|
|
38
|
+
class: "yc-input__affix-text"
|
|
39
|
+
};
|
|
40
|
+
const _hoisted_8 = ["type", "value", "placeholder", "disabled", "readonly", "maxlength", "name", "autocomplete"];
|
|
41
|
+
const _hoisted_9 = {
|
|
42
|
+
key: 1,
|
|
43
|
+
class: "yc-input__suffix"
|
|
44
|
+
};
|
|
45
|
+
const _hoisted_10 = ["aria-label"];
|
|
46
|
+
const _hoisted_11 = {
|
|
47
|
+
key: 0,
|
|
48
|
+
viewBox: "0 0 24 24",
|
|
49
|
+
width: "14",
|
|
50
|
+
height: "14",
|
|
51
|
+
fill: "none",
|
|
52
|
+
stroke: "currentColor",
|
|
53
|
+
"stroke-width": "1.8",
|
|
54
|
+
"stroke-linecap": "round",
|
|
55
|
+
"stroke-linejoin": "round"
|
|
56
|
+
};
|
|
57
|
+
const _hoisted_12 = {
|
|
58
|
+
key: 1,
|
|
59
|
+
viewBox: "0 0 24 24",
|
|
60
|
+
width: "14",
|
|
61
|
+
height: "14",
|
|
62
|
+
fill: "none",
|
|
63
|
+
stroke: "currentColor",
|
|
64
|
+
"stroke-width": "1.8",
|
|
65
|
+
"stroke-linecap": "round",
|
|
66
|
+
"stroke-linejoin": "round"
|
|
67
|
+
};
|
|
68
|
+
const _hoisted_13 = {
|
|
69
|
+
key: 0,
|
|
70
|
+
class: "yc-input__affix-text"
|
|
71
|
+
};
|
|
72
|
+
const _hoisted_14 = {
|
|
73
|
+
key: 2,
|
|
74
|
+
class: "yc-input__count"
|
|
75
|
+
};
|
|
76
|
+
const _hoisted_15 = {
|
|
77
|
+
key: 3,
|
|
78
|
+
class: "yc-input__kbd"
|
|
79
|
+
};
|
|
80
|
+
const _hoisted_16 = {
|
|
81
|
+
key: 1,
|
|
82
|
+
class: "yc-input-addon is-after"
|
|
83
|
+
};
|
|
84
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
85
|
+
...{
|
|
86
|
+
name: "YcInput"
|
|
87
|
+
},
|
|
88
|
+
__name: "input",
|
|
89
|
+
props: {
|
|
90
|
+
modelValue: { default: "" },
|
|
91
|
+
label: {},
|
|
92
|
+
hint: {},
|
|
93
|
+
error: {},
|
|
94
|
+
placeholder: {},
|
|
95
|
+
type: { default: "text" },
|
|
96
|
+
size: { default: "default" },
|
|
97
|
+
variant: { default: "outline" },
|
|
98
|
+
status: { default: "default" },
|
|
99
|
+
prefixText: {},
|
|
100
|
+
suffixText: {},
|
|
101
|
+
addonBefore: {},
|
|
102
|
+
addonAfter: {},
|
|
103
|
+
shortcut: {},
|
|
104
|
+
clearable: { type: Boolean, default: false },
|
|
105
|
+
showPassword: { type: Boolean, default: true },
|
|
106
|
+
disabled: { type: Boolean, default: false },
|
|
107
|
+
readonly: { type: Boolean, default: false },
|
|
108
|
+
required: { type: Boolean, default: false },
|
|
109
|
+
maxlength: {},
|
|
110
|
+
showCount: { type: Boolean, default: false },
|
|
111
|
+
monospace: { type: Boolean, default: false },
|
|
112
|
+
name: {},
|
|
113
|
+
autocomplete: {}
|
|
114
|
+
},
|
|
115
|
+
emits: ["update:modelValue", "input", "change", "focus", "blur", "clear", "enter"],
|
|
116
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
117
|
+
let uid = 0;
|
|
118
|
+
const inputId = `yc-input-${++uid}`;
|
|
119
|
+
const props = __props;
|
|
120
|
+
const emit = __emit;
|
|
121
|
+
const slots = useSlots();
|
|
122
|
+
const inputRef = ref(null);
|
|
123
|
+
const focused = ref(false);
|
|
124
|
+
const passwordVisible = ref(false);
|
|
125
|
+
const stringValue = computed(
|
|
126
|
+
() => props.modelValue === void 0 || props.modelValue === null ? "" : String(props.modelValue)
|
|
127
|
+
);
|
|
128
|
+
const resolvedStatus = computed(() => props.error ? "error" : props.status);
|
|
129
|
+
const nativeType = computed(() => {
|
|
130
|
+
if (props.type === "password") {
|
|
131
|
+
return passwordVisible.value ? "text" : "password";
|
|
132
|
+
}
|
|
133
|
+
if (props.type === "search") return "text";
|
|
134
|
+
return props.type;
|
|
135
|
+
});
|
|
136
|
+
const showClear = computed(
|
|
137
|
+
() => props.clearable && !props.disabled && !props.readonly && stringValue.value.length > 0
|
|
138
|
+
);
|
|
139
|
+
const hasSuffix = computed(
|
|
140
|
+
() => showClear.value || props.type === "password" && props.showPassword && !props.disabled || !!props.suffixText || !!slots.suffix || !!(props.showCount && props.maxlength) || !!(props.shortcut && !stringValue.value)
|
|
141
|
+
);
|
|
142
|
+
const focusInput = () => {
|
|
143
|
+
var _a;
|
|
144
|
+
if (!props.disabled) {
|
|
145
|
+
(_a = inputRef.value) == null ? void 0 : _a.focus();
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
const onInput = (event) => {
|
|
149
|
+
const next = event.target.value;
|
|
150
|
+
emit("update:modelValue", next);
|
|
151
|
+
emit("input", next);
|
|
152
|
+
};
|
|
153
|
+
const onFocus = (event) => {
|
|
154
|
+
focused.value = true;
|
|
155
|
+
emit("focus", event);
|
|
156
|
+
};
|
|
157
|
+
const onBlur = (event) => {
|
|
158
|
+
focused.value = false;
|
|
159
|
+
emit("blur", event);
|
|
160
|
+
emit("change", stringValue.value);
|
|
161
|
+
};
|
|
162
|
+
const clearValue = () => {
|
|
163
|
+
var _a;
|
|
164
|
+
emit("update:modelValue", "");
|
|
165
|
+
emit("input", "");
|
|
166
|
+
emit("change", "");
|
|
167
|
+
emit("clear");
|
|
168
|
+
(_a = inputRef.value) == null ? void 0 : _a.focus();
|
|
169
|
+
};
|
|
170
|
+
__expose({
|
|
171
|
+
focus: focusInput,
|
|
172
|
+
blur: () => {
|
|
173
|
+
var _a;
|
|
174
|
+
return (_a = inputRef.value) == null ? void 0 : _a.blur();
|
|
175
|
+
},
|
|
176
|
+
input: inputRef
|
|
177
|
+
});
|
|
178
|
+
return (_ctx, _cache) => {
|
|
179
|
+
return openBlock(), createElementBlock(
|
|
180
|
+
"div",
|
|
181
|
+
{
|
|
182
|
+
class: normalizeClass(["yc-field", [
|
|
183
|
+
`is-size-${__props.size}`,
|
|
184
|
+
`is-variant-${__props.variant}`,
|
|
185
|
+
`is-status-${resolvedStatus.value}`,
|
|
186
|
+
{ "is-disabled": __props.disabled, "is-focused": focused.value }
|
|
187
|
+
]])
|
|
188
|
+
},
|
|
189
|
+
[
|
|
190
|
+
__props.label || _ctx.$slots["label-extra"] ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
191
|
+
__props.label ? (openBlock(), createElementBlock("label", {
|
|
192
|
+
key: 0,
|
|
193
|
+
class: "yc-field__label",
|
|
194
|
+
for: inputId
|
|
195
|
+
}, [
|
|
196
|
+
createElementVNode(
|
|
197
|
+
"span",
|
|
198
|
+
null,
|
|
199
|
+
toDisplayString(__props.label),
|
|
200
|
+
1
|
|
201
|
+
/* TEXT */
|
|
202
|
+
),
|
|
203
|
+
__props.required ? (openBlock(), createElementBlock("span", _hoisted_2, "*")) : createCommentVNode("v-if", true)
|
|
204
|
+
])) : createCommentVNode("v-if", true),
|
|
205
|
+
_ctx.$slots["label-extra"] ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
206
|
+
renderSlot(_ctx.$slots, "label-extra")
|
|
207
|
+
])) : createCommentVNode("v-if", true)
|
|
208
|
+
])) : createCommentVNode("v-if", true),
|
|
209
|
+
createElementVNode(
|
|
210
|
+
"div",
|
|
211
|
+
{
|
|
212
|
+
class: normalizeClass(["yc-input-group", { "has-addon-before": !!(__props.addonBefore || _ctx.$slots["addon-before"]), "has-addon-after": !!(__props.addonAfter || _ctx.$slots["addon-after"]) }])
|
|
213
|
+
},
|
|
214
|
+
[
|
|
215
|
+
__props.addonBefore || _ctx.$slots["addon-before"] ? (openBlock(), createElementBlock("span", _hoisted_4, [
|
|
216
|
+
renderSlot(_ctx.$slots, "addon-before", {}, () => [
|
|
217
|
+
createTextVNode(
|
|
218
|
+
toDisplayString(__props.addonBefore),
|
|
219
|
+
1
|
|
220
|
+
/* TEXT */
|
|
221
|
+
)
|
|
222
|
+
])
|
|
223
|
+
])) : createCommentVNode("v-if", true),
|
|
224
|
+
createElementVNode("div", {
|
|
225
|
+
class: "yc-input-control",
|
|
226
|
+
onClick: focusInput
|
|
227
|
+
}, [
|
|
228
|
+
__props.type === "search" || _ctx.$slots.prefix || __props.prefixText ? (openBlock(), createElementBlock("span", _hoisted_5, [
|
|
229
|
+
renderSlot(_ctx.$slots, "prefix", {}, () => [
|
|
230
|
+
__props.type === "search" && !__props.prefixText ? (openBlock(), createElementBlock("svg", _hoisted_6, [..._cache[4] || (_cache[4] = [
|
|
231
|
+
createElementVNode(
|
|
232
|
+
"circle",
|
|
233
|
+
{
|
|
234
|
+
cx: "11",
|
|
235
|
+
cy: "11",
|
|
236
|
+
r: "7.5"
|
|
237
|
+
},
|
|
238
|
+
null,
|
|
239
|
+
-1
|
|
240
|
+
/* CACHED */
|
|
241
|
+
),
|
|
242
|
+
createElementVNode(
|
|
243
|
+
"path",
|
|
244
|
+
{ d: "m20 20-3.6-3.6" },
|
|
245
|
+
null,
|
|
246
|
+
-1
|
|
247
|
+
/* CACHED */
|
|
248
|
+
)
|
|
249
|
+
])])) : __props.prefixText ? (openBlock(), createElementBlock(
|
|
250
|
+
"span",
|
|
251
|
+
_hoisted_7,
|
|
252
|
+
toDisplayString(__props.prefixText),
|
|
253
|
+
1
|
|
254
|
+
/* TEXT */
|
|
255
|
+
)) : createCommentVNode("v-if", true)
|
|
256
|
+
])
|
|
257
|
+
])) : createCommentVNode("v-if", true),
|
|
258
|
+
createElementVNode("input", {
|
|
259
|
+
id: inputId,
|
|
260
|
+
ref_key: "inputRef",
|
|
261
|
+
ref: inputRef,
|
|
262
|
+
class: normalizeClass(["yc-input__inner", { "is-mono": __props.monospace }]),
|
|
263
|
+
type: nativeType.value,
|
|
264
|
+
value: stringValue.value,
|
|
265
|
+
placeholder: __props.placeholder,
|
|
266
|
+
disabled: __props.disabled,
|
|
267
|
+
readonly: __props.readonly,
|
|
268
|
+
maxlength: __props.maxlength,
|
|
269
|
+
name: __props.name,
|
|
270
|
+
autocomplete: __props.autocomplete,
|
|
271
|
+
onInput,
|
|
272
|
+
onFocus,
|
|
273
|
+
onBlur,
|
|
274
|
+
onKeydown: _cache[0] || (_cache[0] = withKeys(($event) => emit("enter", $event), ["enter"]))
|
|
275
|
+
}, null, 42, _hoisted_8),
|
|
276
|
+
hasSuffix.value ? (openBlock(), createElementBlock("span", _hoisted_9, [
|
|
277
|
+
showClear.value ? (openBlock(), createElementBlock(
|
|
278
|
+
"button",
|
|
279
|
+
{
|
|
280
|
+
key: 0,
|
|
281
|
+
type: "button",
|
|
282
|
+
class: "yc-input__icon-btn",
|
|
283
|
+
tabindex: "-1",
|
|
284
|
+
"aria-label": "\u6E05\u7A7A",
|
|
285
|
+
onMousedown: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
286
|
+
}, ["prevent"])),
|
|
287
|
+
onClick: withModifiers(clearValue, ["stop"])
|
|
288
|
+
},
|
|
289
|
+
[..._cache[5] || (_cache[5] = [
|
|
290
|
+
createElementVNode(
|
|
291
|
+
"svg",
|
|
292
|
+
{
|
|
293
|
+
viewBox: "0 0 24 24",
|
|
294
|
+
width: "13",
|
|
295
|
+
height: "13",
|
|
296
|
+
fill: "none",
|
|
297
|
+
stroke: "currentColor",
|
|
298
|
+
"stroke-width": "2",
|
|
299
|
+
"stroke-linecap": "round"
|
|
300
|
+
},
|
|
301
|
+
[
|
|
302
|
+
createElementVNode("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
303
|
+
],
|
|
304
|
+
-1
|
|
305
|
+
/* CACHED */
|
|
306
|
+
)
|
|
307
|
+
])],
|
|
308
|
+
32
|
|
309
|
+
/* NEED_HYDRATION */
|
|
310
|
+
)) : createCommentVNode("v-if", true),
|
|
311
|
+
__props.type === "password" && __props.showPassword && !__props.disabled ? (openBlock(), createElementBlock("button", {
|
|
312
|
+
key: 1,
|
|
313
|
+
type: "button",
|
|
314
|
+
class: "yc-input__icon-btn",
|
|
315
|
+
tabindex: "-1",
|
|
316
|
+
"aria-label": passwordVisible.value ? "\u9690\u85CF\u5BC6\u7801" : "\u663E\u793A\u5BC6\u7801",
|
|
317
|
+
onMousedown: _cache[2] || (_cache[2] = withModifiers(() => {
|
|
318
|
+
}, ["prevent"])),
|
|
319
|
+
onClick: _cache[3] || (_cache[3] = withModifiers(($event) => passwordVisible.value = !passwordVisible.value, ["stop"]))
|
|
320
|
+
}, [
|
|
321
|
+
passwordVisible.value ? (openBlock(), createElementBlock("svg", _hoisted_11, [..._cache[6] || (_cache[6] = [
|
|
322
|
+
createElementVNode(
|
|
323
|
+
"path",
|
|
324
|
+
{ d: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z" },
|
|
325
|
+
null,
|
|
326
|
+
-1
|
|
327
|
+
/* CACHED */
|
|
328
|
+
),
|
|
329
|
+
createElementVNode(
|
|
330
|
+
"circle",
|
|
331
|
+
{
|
|
332
|
+
cx: "12",
|
|
333
|
+
cy: "12",
|
|
334
|
+
r: "3"
|
|
335
|
+
},
|
|
336
|
+
null,
|
|
337
|
+
-1
|
|
338
|
+
/* CACHED */
|
|
339
|
+
)
|
|
340
|
+
])])) : (openBlock(), createElementBlock("svg", _hoisted_12, [..._cache[7] || (_cache[7] = [
|
|
341
|
+
createElementVNode(
|
|
342
|
+
"path",
|
|
343
|
+
{ d: "M9.88 9.88a3 3 0 1 0 4.24 4.24" },
|
|
344
|
+
null,
|
|
345
|
+
-1
|
|
346
|
+
/* CACHED */
|
|
347
|
+
),
|
|
348
|
+
createElementVNode(
|
|
349
|
+
"path",
|
|
350
|
+
{ d: "M10.73 5.08A10.43 10.43 0 0 1 12 5c6.5 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" },
|
|
351
|
+
null,
|
|
352
|
+
-1
|
|
353
|
+
/* CACHED */
|
|
354
|
+
),
|
|
355
|
+
createElementVNode(
|
|
356
|
+
"path",
|
|
357
|
+
{ d: "M6.61 6.61A13.52 13.52 0 0 0 2 12s3.5 7 10 7a9.74 9.74 0 0 0 5.39-1.61" },
|
|
358
|
+
null,
|
|
359
|
+
-1
|
|
360
|
+
/* CACHED */
|
|
361
|
+
),
|
|
362
|
+
createElementVNode(
|
|
363
|
+
"path",
|
|
364
|
+
{ d: "m2 2 20 20" },
|
|
365
|
+
null,
|
|
366
|
+
-1
|
|
367
|
+
/* CACHED */
|
|
368
|
+
)
|
|
369
|
+
])]))
|
|
370
|
+
], 40, _hoisted_10)) : createCommentVNode("v-if", true),
|
|
371
|
+
renderSlot(_ctx.$slots, "suffix", {}, () => [
|
|
372
|
+
__props.suffixText ? (openBlock(), createElementBlock(
|
|
373
|
+
"span",
|
|
374
|
+
_hoisted_13,
|
|
375
|
+
toDisplayString(__props.suffixText),
|
|
376
|
+
1
|
|
377
|
+
/* TEXT */
|
|
378
|
+
)) : createCommentVNode("v-if", true)
|
|
379
|
+
]),
|
|
380
|
+
__props.showCount && __props.maxlength ? (openBlock(), createElementBlock(
|
|
381
|
+
"span",
|
|
382
|
+
_hoisted_14,
|
|
383
|
+
toDisplayString(stringValue.value.length) + "/" + toDisplayString(__props.maxlength),
|
|
384
|
+
1
|
|
385
|
+
/* TEXT */
|
|
386
|
+
)) : createCommentVNode("v-if", true),
|
|
387
|
+
__props.shortcut && !stringValue.value ? (openBlock(), createElementBlock(
|
|
388
|
+
"kbd",
|
|
389
|
+
_hoisted_15,
|
|
390
|
+
toDisplayString(__props.shortcut),
|
|
391
|
+
1
|
|
392
|
+
/* TEXT */
|
|
393
|
+
)) : createCommentVNode("v-if", true)
|
|
394
|
+
])) : createCommentVNode("v-if", true)
|
|
395
|
+
]),
|
|
396
|
+
__props.addonAfter || _ctx.$slots["addon-after"] ? (openBlock(), createElementBlock("span", _hoisted_16, [
|
|
397
|
+
renderSlot(_ctx.$slots, "addon-after", {}, () => [
|
|
398
|
+
createTextVNode(
|
|
399
|
+
toDisplayString(__props.addonAfter),
|
|
400
|
+
1
|
|
401
|
+
/* TEXT */
|
|
402
|
+
)
|
|
403
|
+
])
|
|
404
|
+
])) : createCommentVNode("v-if", true)
|
|
405
|
+
],
|
|
406
|
+
2
|
|
407
|
+
/* CLASS */
|
|
408
|
+
),
|
|
409
|
+
__props.error || __props.hint ? (openBlock(), createElementBlock(
|
|
410
|
+
"p",
|
|
411
|
+
{
|
|
412
|
+
key: 1,
|
|
413
|
+
class: normalizeClass(["yc-field__message", { "is-error": !!__props.error }])
|
|
414
|
+
},
|
|
415
|
+
toDisplayString(__props.error || __props.hint),
|
|
416
|
+
3
|
|
417
|
+
/* TEXT, CLASS */
|
|
418
|
+
)) : createCommentVNode("v-if", true)
|
|
419
|
+
],
|
|
420
|
+
2
|
|
421
|
+
/* CLASS */
|
|
422
|
+
);
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
});
|
|
426
|
+
|
|
427
|
+
export { _sfc_main as default };
|