@opentiny/vue-docs 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/demos/apis/action-menu.js +11 -0
- package/demos/apis/cascader.js +10 -0
- package/demos/apis/config-provider.js +1 -1
- package/demos/apis/date-picker.js +1 -1
- package/demos/apis/float-button.js +22 -22
- package/demos/apis/form.js +21 -0
- package/demos/apis/hui.js +49 -0
- package/demos/apis/image.js +32 -7
- package/demos/apis/mind-map.js +36 -41
- package/demos/apis/numeric.js +12 -0
- package/demos/apis/popeditor.js +1 -1
- package/demos/apis/roles.js +13 -0
- package/demos/apis/select.js +34 -0
- package/demos/apis/skeleton.js +10 -10
- package/demos/apis/statistic.js +144 -0
- package/demos/apis/tag.js +17 -7
- package/demos/apis/time-line.js +2 -1
- package/demos/mobile/app/alert/basic-usage.spec.ts +36 -0
- package/demos/mobile/app/alert/center.spec.ts +11 -0
- package/demos/mobile/app/alert/custom-close.spec.ts +45 -0
- package/demos/mobile/app/alert/custom-close.vue +6 -3
- package/demos/mobile/app/alert/icon.spec.ts +11 -0
- package/demos/mobile/app/alert/size.spec.ts +17 -0
- package/demos/mobile/app/alert/size.vue +1 -2
- package/demos/mobile/app/alert/slot-default.spec.ts +12 -0
- package/demos/mobile/app/alert/target.spec.ts +8 -0
- package/demos/mobile/app/alert/webdoc/alert.js +4 -4
- package/demos/mobile/app/input/basic-usage.spec.ts +25 -0
- package/demos/mobile/app/input/clearable.spec.ts +13 -0
- package/demos/mobile/app/input/counter.spec.ts +19 -0
- package/demos/mobile/app/input/counter.vue +1 -1
- package/demos/mobile/app/input/disabled.spec.ts +17 -0
- package/demos/mobile/app/input/events.spec.ts +24 -0
- package/demos/mobile/app/input/methods.spec.ts +23 -0
- package/demos/mobile/app/input/native-attributes.spec.ts +14 -0
- package/demos/mobile/app/input/native-attributes.vue +0 -5
- package/demos/mobile/app/input/prefix-suffix-icon.spec.ts +12 -0
- package/demos/mobile/app/input/show-password.spec.ts +16 -0
- package/demos/mobile/app/input/slots.spec.ts +32 -0
- package/demos/mobile/app/input/slots.vue +7 -7
- package/demos/mobile/app/input/textarea-rows-cols.spec.ts +11 -0
- package/demos/mobile/app/input/textarea-rows-cols.vue +3 -3
- package/demos/mobile/app/input/textarea-scalable.spec.ts +25 -0
- package/demos/mobile/app/input/textarea-scalable.vue +21 -10
- package/demos/mobile/app/input/type-select.spec.ts +20 -0
- package/demos/mobile/app/input/type.spec.ts +20 -0
- package/demos/mobile/app/input/validate-event.spec.ts +22 -0
- package/demos/mobile/app/input/webdoc/input.js +36 -36
- package/demos/mobile-first/app/numeric/empty-value-composition-api.vue +15 -0
- package/demos/mobile-first/app/numeric/empty-value.vue +24 -0
- package/demos/mobile-first/app/numeric/webdoc/numeric.js +14 -0
- package/demos/mobile-first/app/select/collapse-tags.vue +1 -1
- package/demos/mobile-first/app/select/webdoc/select.js +3 -2
- package/demos/pc/app/action-menu/card-mode-composition-api.vue +31 -0
- package/demos/pc/app/action-menu/card-mode.spec.ts +16 -0
- package/demos/pc/app/action-menu/card-mode.vue +39 -0
- package/demos/pc/app/action-menu/webdoc/action-menu.js +14 -0
- package/demos/pc/app/calendar-view/calendar-event-composition-api.vue +5 -0
- package/demos/pc/app/calendar-view/calendar-event.spec.ts +5 -0
- package/demos/pc/app/calendar-view/calendar-event.vue +5 -1
- package/demos/pc/app/calendar-view/set-working-day-composition-api.vue +3 -0
- package/demos/pc/app/calendar-view/set-working-day.vue +3 -0
- package/demos/pc/app/calendar-view/webdoc/calendar-view.js +43 -20
- package/demos/pc/app/cascader/slot-composition-api.vue +226 -0
- package/demos/pc/app/cascader/slot.spec.ts +16 -0
- package/demos/pc/app/cascader/slot.vue +234 -0
- package/demos/pc/app/cascader/webdoc/cascader.js +18 -0
- package/demos/pc/app/chart/amap/amap.spec.ts +6 -0
- package/demos/pc/app/chart/amap/amap.spec.ts-snapshots/base-chromium-win32.png +0 -0
- package/demos/pc/app/chart/bar/bar.spec.ts +43 -0
- package/demos/pc/app/chart/bar/bar.spec.ts-snapshots/base-chromium-win32.png +0 -0
- package/demos/pc/app/chart/bar/bar.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
- package/demos/pc/app/chart/bar/bar.spec.ts-snapshots/demo3-chromium-win32.png +0 -0
- package/demos/pc/app/chart/bar/bar.spec.ts-snapshots/demo4-chromium-win32.png +0 -0
- package/demos/pc/app/chart/bar/bar.spec.ts-snapshots/demo5-chromium-win32.png +0 -0
- package/demos/pc/app/chart/bar/bar.spec.ts-snapshots/demo6-chromium-win32.png +0 -0
- package/demos/pc/app/chart/bar/bar.spec.ts-snapshots/demo7-chromium-win32.png +0 -0
- package/demos/pc/app/chart/bmap/bmap.spec.ts +7 -0
- package/demos/pc/app/chart/bmap/bmap.spec.ts-snapshots/base-chromium-win32.png +0 -0
- package/demos/pc/app/chart/boxplot/boxplot.spec.ts +19 -0
- package/demos/pc/app/chart/boxplot/boxplot.spec.ts-snapshots/base-chromium-win32.png +0 -0
- package/demos/pc/app/chart/boxplot/boxplot.spec.ts-snapshots/multiple-chromium-win32.png +0 -0
- package/demos/pc/app/chart/boxplot/boxplot.spec.ts-snapshots/vertical-chromium-win32.png +0 -0
- package/demos/pc/app/chart/candle/candle.spec.ts +43 -0
- package/demos/pc/app/chart/candle/candle.spec.ts-snapshots/base-chromium-win32.png +0 -0
- package/demos/pc/app/chart/candle/candle.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
- package/demos/pc/app/chart/candle/candle.spec.ts-snapshots/demo3-chromium-win32.png +0 -0
- package/demos/pc/app/chart/candle/candle.spec.ts-snapshots/demo4-chromium-win32.png +0 -0
- package/demos/pc/app/chart/candle/candle.spec.ts-snapshots/demo5-chromium-win32.png +0 -0
- package/demos/pc/app/chart/candle/candle.spec.ts-snapshots/demo6-chromium-win32.png +0 -0
- package/demos/pc/app/chart/candle/candle.spec.ts-snapshots/demo7-chromium-win32.png +0 -0
- package/demos/pc/app/chart/funnel/funnel.spec.ts +43 -0
- package/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/base-chromium-win32.png +0 -0
- package/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
- package/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/demo3-chromium-win32.png +0 -0
- package/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/demo4-chromium-win32.png +0 -0
- package/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/demo5-chromium-win32.png +0 -0
- package/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/demo6-chromium-win32.png +0 -0
- package/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/demo7-chromium-win32.png +0 -0
- package/demos/pc/app/chart/gauge/gauge.spec.ts +37 -0
- package/demos/pc/app/chart/gauge/gauge.spec.ts-snapshots/base-chromium-win32.png +0 -0
- package/demos/pc/app/chart/gauge/gauge.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
- package/demos/pc/app/chart/gauge/gauge.spec.ts-snapshots/demo3-chromium-win32.png +0 -0
- package/demos/pc/app/chart/gauge/gauge.spec.ts-snapshots/demo4-chromium-win32.png +0 -0
- package/demos/pc/app/chart/gauge/gauge.spec.ts-snapshots/demo5-chromium-win32.png +0 -0
- package/demos/pc/app/chart/gauge/gauge.spec.ts-snapshots/demo6-chromium-win32.png +0 -0
- package/demos/pc/app/chart/graph/graph.spec.ts +19 -0
- package/demos/pc/app/chart/graph/graph.spec.ts-snapshots/base-chromium-win32.png +0 -0
- package/demos/pc/app/chart/graph/graph.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
- package/demos/pc/app/chart/graph/graph.spec.ts-snapshots/demo3-chromium-win32.png +0 -0
- package/demos/pc/app/chart/heatmap/heatmap.spec.ts +31 -0
- package/demos/pc/app/chart/heatmap/heatmap.spec.ts-snapshots/base-chromium-win32.png +0 -0
- package/demos/pc/app/chart/heatmap/heatmap.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
- package/demos/pc/app/chart/heatmap/heatmap.spec.ts-snapshots/demo3-chromium-win32.png +0 -0
- package/demos/pc/app/chart/heatmap/heatmap.spec.ts-snapshots/demo4-chromium-win32.png +0 -0
- package/demos/pc/app/chart/heatmap/heatmap.spec.ts-snapshots/demo5-chromium-win32.png +0 -0
- package/demos/pc/app/chart/histogram/histogram.spec.ts +49 -0
- package/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/base-chromium-win32.png +0 -0
- package/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
- package/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo3-chromium-win32.png +0 -0
- package/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo4-chromium-win32.png +0 -0
- package/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo5-chromium-win32.png +0 -0
- package/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo6-chromium-win32.png +0 -0
- package/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo7-chromium-win32.png +0 -0
- package/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo8-chromium-win32.png +0 -0
- package/demos/pc/app/chart/line/line.spec.ts +55 -0
- package/demos/pc/app/chart/line/line.spec.ts-snapshots/base-chromium-win32.png +0 -0
- package/demos/pc/app/chart/line/line.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
- package/demos/pc/app/chart/line/line.spec.ts-snapshots/demo3-chromium-win32.png +0 -0
- package/demos/pc/app/chart/line/line.spec.ts-snapshots/demo4-chromium-win32.png +0 -0
- package/demos/pc/app/chart/line/line.spec.ts-snapshots/demo5-chromium-win32.png +0 -0
- package/demos/pc/app/chart/line/line.spec.ts-snapshots/demo6-chromium-win32.png +0 -0
- package/demos/pc/app/chart/line/line.spec.ts-snapshots/demo7-chromium-win32.png +0 -0
- package/demos/pc/app/chart/line/line.spec.ts-snapshots/demo8-chromium-win32.png +0 -0
- package/demos/pc/app/chart/line/line.spec.ts-snapshots/demo9-chromium-win32.png +0 -0
- package/demos/pc/app/chart/liquidfill/liquidfill.spec.ts +7 -0
- package/demos/pc/app/chart/liquidfill/liquidfill.spec.ts-snapshots/demo5-chromium-win32.png +0 -0
- package/demos/pc/app/chart/map/base-composition-api.vue +7 -2
- package/demos/pc/app/chart/map/base.vue +3 -2
- package/demos/pc/app/chart/map/map.spec.ts +7 -0
- package/demos/pc/app/chart/map/map.spec.ts-snapshots/base-chromium-win32.png +0 -0
- package/demos/pc/app/chart/pie/pie.spec.ts +43 -0
- package/demos/pc/app/chart/pie/pie.spec.ts-snapshots/base-chromium-win32.png +0 -0
- package/demos/pc/app/chart/pie/pie.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
- package/demos/pc/app/chart/pie/pie.spec.ts-snapshots/demo3-chromium-win32.png +0 -0
- package/demos/pc/app/chart/pie/pie.spec.ts-snapshots/demo4-chromium-win32.png +0 -0
- package/demos/pc/app/chart/pie/pie.spec.ts-snapshots/demo5-chromium-win32.png +0 -0
- package/demos/pc/app/chart/pie/pie.spec.ts-snapshots/demo6-chromium-win32.png +0 -0
- package/demos/pc/app/chart/pie/pie.spec.ts-snapshots/demo7-chromium-win32.png +0 -0
- package/demos/pc/app/chart/process/base-composition-api.vue +29 -0
- package/demos/pc/app/chart/process/base.vue +37 -0
- package/demos/pc/app/chart/process/demo2-composition-api.vue +32 -0
- package/demos/pc/app/chart/process/demo2.vue +40 -0
- package/demos/pc/app/chart/process/demo3-composition-api.vue +71 -0
- package/demos/pc/app/chart/process/demo3.vue +79 -0
- package/demos/pc/app/chart/process/demo4-composition-api.vue +29 -0
- package/demos/pc/app/chart/process/demo4.vue +37 -0
- package/demos/pc/app/chart/process/demo5-composition-api.vue +28 -0
- package/demos/pc/app/chart/process/demo5.vue +36 -0
- package/demos/pc/app/chart/process/demo6-composition-api.vue +44 -0
- package/demos/pc/app/chart/process/demo6.vue +52 -0
- package/demos/pc/app/chart/radar/radar.spec.ts +19 -0
- package/demos/pc/app/chart/radar/radar.spec.ts-snapshots/base-chromium-win32.png +0 -0
- package/demos/pc/app/chart/radar/radar.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
- package/demos/pc/app/chart/radar/radar.spec.ts-snapshots/demo3-chromium-win32.png +0 -0
- package/demos/pc/app/chart/ring/ring.spec.ts +43 -0
- package/demos/pc/app/chart/ring/ring.spec.ts-snapshots/base-chromium-win32.png +0 -0
- package/demos/pc/app/chart/ring/ring.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
- package/demos/pc/app/chart/ring/ring.spec.ts-snapshots/demo3-chromium-win32.png +0 -0
- package/demos/pc/app/chart/ring/ring.spec.ts-snapshots/demo4-chromium-win32.png +0 -0
- package/demos/pc/app/chart/ring/ring.spec.ts-snapshots/demo5-chromium-win32.png +0 -0
- package/demos/pc/app/chart/ring/ring.spec.ts-snapshots/demo6-chromium-win32.png +0 -0
- package/demos/pc/app/chart/ring/ring.spec.ts-snapshots/ring-title-chromium-win32.png +0 -0
- package/demos/pc/app/chart/sankey/sankey.spec.ts +13 -0
- package/demos/pc/app/chart/sankey/sankey.spec.ts-snapshots/base-chromium-win32.png +0 -0
- package/demos/pc/app/chart/sankey/sankey.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
- package/demos/pc/app/chart/scatter/scatter.spec.ts +49 -0
- package/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/base-chromium-win32.png +0 -0
- package/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
- package/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo3-chromium-win32.png +0 -0
- package/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo4-chromium-win32.png +0 -0
- package/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo5-chromium-win32.png +0 -0
- package/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo6-chromium-win32.png +0 -0
- package/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo7-chromium-win32.png +0 -0
- package/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo8-chromium-win32.png +0 -0
- package/demos/pc/app/chart/sunburst/sunburst.spec.ts +19 -0
- package/demos/pc/app/chart/sunburst/sunburst.spec.ts-snapshots/base-chromium-win32.png +0 -0
- package/demos/pc/app/chart/sunburst/sunburst.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
- package/demos/pc/app/chart/sunburst/sunburst.spec.ts-snapshots/demo3-chromium-win32.png +0 -0
- package/demos/pc/app/chart/tree/tree.spec.ts +31 -0
- package/demos/pc/app/chart/tree/tree.spec.ts-snapshots/base-chromium-win32.png +0 -0
- package/demos/pc/app/chart/tree/tree.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
- package/demos/pc/app/chart/tree/tree.spec.ts-snapshots/demo3-chromium-win32.png +0 -0
- package/demos/pc/app/chart/tree/tree.spec.ts-snapshots/demo4-chromium-win32.png +0 -0
- package/demos/pc/app/chart/tree/tree.spec.ts-snapshots/demo5-chromium-win32.png +0 -0
- package/demos/pc/app/chart/waterfall/waterfall.spec.ts +31 -0
- package/demos/pc/app/chart/waterfall/waterfall.spec.ts-snapshots/base-chromium-win32.png +0 -0
- package/demos/pc/app/chart/waterfall/waterfall.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
- package/demos/pc/app/chart/waterfall/waterfall.spec.ts-snapshots/demo3-chromium-win32.png +0 -0
- package/demos/pc/app/chart/waterfall/waterfall.spec.ts-snapshots/demo4-chromium-win32.png +0 -0
- package/demos/pc/app/chart/waterfall/waterfall.spec.ts-snapshots/demo5-chromium-win32.png +0 -0
- package/demos/pc/app/chart/webdoc/chart-process.cn.md +7 -0
- package/demos/pc/app/chart/webdoc/chart-process.en.md +7 -0
- package/demos/pc/app/chart/webdoc/chart-process.js +55 -0
- package/demos/pc/app/chart/webdoc/chart-process.json.cn.md +7 -0
- package/demos/pc/app/chart/webdoc/chart-process.json.en.md +7 -0
- package/demos/pc/app/chart/wordcloud/wordcloud.spec.ts +25 -0
- package/demos/pc/app/chart/wordcloud/wordcloud.spec.ts-snapshots/base-chromium-win32.png +0 -0
- package/demos/pc/app/chart/wordcloud/wordcloud.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
- package/demos/pc/app/chart/wordcloud/wordcloud.spec.ts-snapshots/demo3-chromium-win32.png +0 -0
- package/demos/pc/app/chart/wordcloud/wordcloud.spec.ts-snapshots/demo4-chromium-win32.png +0 -0
- package/demos/pc/app/company/custom-service.spec.ts +2 -1
- package/demos/pc/app/country/custom-service.spec.js +1 -1
- package/demos/pc/app/date-picker/basic-usage-composition-api.vue +2 -0
- package/demos/pc/app/date-picker/basic-usage.vue +2 -0
- package/demos/pc/app/date-picker/default-value.spec.ts +2 -2
- package/demos/pc/app/date-picker/events.spec.ts +3 -3
- package/demos/pc/app/date-picker/format.spec.ts +2 -2
- package/demos/pc/app/dropdown/options.spec.ts +3 -0
- package/demos/pc/app/dropdown/trigger.spec.ts +2 -2
- package/demos/pc/app/file-upload/http-request-composition-api.vue +5 -3
- package/demos/pc/app/file-upload/http-request.vue +4 -2
- package/demos/pc/app/float-button/backTop.spec.ts +14 -0
- package/demos/pc/app/float-button/basic-usage.spec.ts +34 -0
- package/demos/pc/app/float-button/icon.spec.ts +10 -0
- package/demos/pc/app/float-button/jump.spec.ts +8 -0
- package/demos/pc/app/float-button/reset-time.spec.ts +18 -0
- package/demos/pc/app/float-button/trigger.spec.ts +16 -0
- package/demos/pc/app/form/error-slot-composition-api.vue +62 -0
- package/demos/pc/app/form/error-slot.spec.ts +15 -0
- package/demos/pc/app/form/error-slot.vue +71 -0
- package/demos/pc/app/form/extra-tip-composition-api.vue +48 -0
- package/demos/pc/app/form/extra-tip.spec.ts +15 -0
- package/demos/pc/app/form/extra-tip.vue +57 -0
- package/demos/pc/app/form/webdoc/form.js +34 -4
- package/demos/pc/app/grid/filter/simple-date-filter.spec.ts +2 -1
- package/demos/pc/app/grid/fixed/group-header-fixed-composition-api.vue +212 -0
- package/demos/pc/app/grid/fixed/group-header-fixed.vue +232 -0
- package/demos/pc/app/grid/large-data/column-anchor-clear-active-composition-api.vue +190 -0
- package/demos/pc/app/grid/large-data/column-anchor-clear-active.vue +199 -0
- package/demos/pc/app/grid/large-data/column-anchor-composition-api.vue +124 -0
- package/demos/pc/app/grid/large-data/scroll-to.spec.js +1 -1
- package/demos/pc/app/grid/renderer/inner-renderer-rate-composition-api.vue +50 -0
- package/demos/pc/app/grid/renderer/inner-renderer-rate.spec.js +12 -0
- package/demos/pc/app/grid/renderer/inner-renderer-rate.vue +60 -0
- package/demos/pc/app/grid/size/grid-size.spec.js +2 -2
- package/demos/pc/app/grid/tree-table/set-tree-expansion-composition-api.vue +2 -2
- package/demos/pc/app/grid/tree-table/set-tree-expansion.vue +2 -2
- package/demos/pc/app/grid/tree-table/tree-grid-index-composition-api.vue +2 -2
- package/demos/pc/app/grid/tree-table/tree-grid-index.spec.js +16 -4
- package/demos/pc/app/grid/tree-table/tree-grid-index.vue +2 -2
- package/demos/pc/app/grid/tree-table/tree-grid-insert-delete-update-composition-api.vue +7 -2
- package/demos/pc/app/grid/tree-table/tree-grid-insert-delete-update.spec.js +6 -2
- package/demos/pc/app/grid/tree-table/tree-grid-insert-delete-update.vue +5 -2
- package/demos/pc/app/grid/webdoc/grid-fixed.js +11 -0
- package/demos/pc/app/grid/webdoc/grid-large-data.js +24 -0
- package/demos/pc/app/grid/webdoc/grid-renderer.js +11 -0
- package/demos/pc/app/image/count-slot-composition-api.vue +32 -0
- package/demos/pc/app/image/count-slot.spec.ts +16 -0
- package/demos/pc/app/image/count-slot.vue +40 -0
- package/demos/pc/app/image/index-change-composition-api.vue +29 -0
- package/demos/pc/app/image/index-change.spec.ts +16 -0
- package/demos/pc/app/image/index-change.vue +37 -0
- package/demos/pc/app/image/keep-style-composition-api.vue +24 -0
- package/demos/pc/app/image/keep-style.spec.ts +56 -0
- package/demos/pc/app/image/keep-style.vue +32 -0
- package/demos/pc/app/image/preview-composition-api.vue +1 -1
- package/demos/pc/app/image/preview.vue +1 -1
- package/demos/pc/app/image/webdoc/image.js +73 -11
- package/demos/pc/app/mind-map/basic-usage-composition-api.vue +4 -4
- package/demos/pc/app/mind-map/basic-usage.vue +4 -4
- package/demos/pc/app/mind-map/event-composition-api.vue +13 -45
- package/demos/pc/app/mind-map/event.spec.ts +11 -8
- package/demos/pc/app/mind-map/event.vue +27 -57
- package/demos/pc/app/mind-map/export-data-composition-api.vue +7 -9
- package/demos/pc/app/mind-map/export-data.vue +13 -13
- package/demos/pc/app/mind-map/webdoc/mind-map.js +38 -10
- package/demos/pc/app/numeric/controls-composition-api.vue +10 -4
- package/demos/pc/app/numeric/controls.vue +10 -4
- package/demos/pc/app/numeric/empty-value-composition-api.vue +15 -0
- package/demos/pc/app/numeric/empty-value.spec.ts +15 -0
- package/demos/pc/app/numeric/empty-value.vue +24 -0
- package/demos/pc/app/numeric/mouse-wheel.spec.ts +2 -2
- package/demos/pc/app/numeric/precision-composition-api.vue +10 -4
- package/demos/pc/app/numeric/precision.vue +10 -4
- package/demos/pc/app/numeric/webdoc/numeric.js +42 -29
- package/demos/pc/app/popconfirm/trigger.spec.ts +8 -6
- package/demos/pc/app/popconfirm/type.spec.ts +6 -5
- package/demos/pc/app/popeditor/condition-layout-composition-api.vue +3 -2
- package/demos/pc/app/popeditor/condition-layout.vue +3 -2
- package/demos/pc/app/popeditor/slot-footer-composition-api.vue +2 -2
- package/demos/pc/app/popeditor/slot-footer.vue +2 -2
- package/demos/pc/app/popeditor/webdoc/popeditor.js +11 -12
- package/demos/pc/app/radio/dynamic-disable-composition-api.vue +7 -4
- package/demos/pc/app/radio/dynamic-disable.vue +8 -5
- package/demos/pc/app/roles/base-composition-api.vue +2 -2
- package/demos/pc/app/roles/base.vue +2 -2
- package/demos/pc/app/select/collapse-tags-composition-api.vue +7 -1
- package/demos/pc/app/select/collapse-tags.spec.ts +50 -29
- package/demos/pc/app/select/collapse-tags.vue +10 -3
- package/demos/pc/app/select/copy-multi.spec.ts +1 -0
- package/demos/pc/app/select/copy-single.spec.ts +1 -0
- package/demos/pc/app/select/events-composition-api.vue +0 -1
- package/demos/pc/app/select/events.spec.ts +0 -1
- package/demos/pc/app/select/events.vue +0 -1
- package/demos/pc/app/select/nest-grid-remote-composition-api.vue +120 -0
- package/demos/pc/app/select/nest-grid-remote.spec.ts +135 -0
- package/demos/pc/app/select/nest-grid-remote.vue +136 -0
- package/demos/pc/app/select/size.spec.ts +4 -2
- package/demos/pc/app/select/webdoc/select.js +10 -24
- package/demos/pc/app/skeleton/animation-composition-api.vue +25 -0
- package/demos/pc/app/skeleton/animation.spec.ts +19 -0
- package/demos/pc/app/skeleton/animation.vue +36 -0
- package/demos/pc/app/skeleton/custom-layout-composition-api.vue +19 -3
- package/demos/pc/app/skeleton/custom-layout.spec.ts +4 -7
- package/demos/pc/app/skeleton/custom-layout.vue +19 -3
- package/demos/pc/app/skeleton/custom-paragraph-width-composition-api.vue +1 -1
- package/demos/pc/app/skeleton/custom-paragraph-width.spec.ts +1 -1
- package/demos/pc/app/skeleton/custom-paragraph-width.vue +1 -1
- package/demos/pc/app/skeleton/custom-rows.spec.ts +1 -1
- package/demos/pc/app/skeleton/fine-grained-mode-composition-api.vue +5 -22
- package/demos/pc/app/skeleton/fine-grained-mode.spec.ts +4 -40
- package/demos/pc/app/skeleton/fine-grained-mode.vue +6 -23
- package/demos/pc/app/skeleton/loading-completed-composition-api.vue +3 -13
- package/demos/pc/app/skeleton/loading-completed.spec.ts +1 -12
- package/demos/pc/app/skeleton/loading-completed.vue +4 -10
- package/demos/pc/app/skeleton/size-composition-api.vue +16 -0
- package/demos/pc/app/skeleton/size.spec.ts +14 -0
- package/demos/pc/app/skeleton/size.vue +23 -0
- package/demos/pc/app/skeleton/webdoc/skeleton.js +42 -21
- package/demos/pc/app/statistic/basic-usage-composition-api.vue +26 -0
- package/demos/pc/app/statistic/basic-usage.spec.ts +20 -0
- package/demos/pc/app/statistic/basic-usage.vue +38 -0
- package/demos/pc/app/statistic/statistic-slot-composition-api.vue +39 -0
- package/demos/pc/app/statistic/statistic-slot.spec.ts +13 -0
- package/demos/pc/app/statistic/statistic-slot.vue +51 -0
- package/demos/pc/app/statistic/statistic-style-composition-api.vue +29 -0
- package/demos/pc/app/statistic/statistic-style.spec.ts +7 -0
- package/demos/pc/app/statistic/statistic-style.vue +41 -0
- package/demos/pc/app/statistic/webdoc/statistic.cn.md +7 -0
- package/demos/pc/app/statistic/webdoc/statistic.en.md +7 -0
- package/demos/pc/app/statistic/webdoc/statistic.js +46 -0
- package/demos/pc/app/tag/color3-composition-api.vue +19 -1
- package/demos/pc/app/tag/color3.spec.ts +7 -11
- package/demos/pc/app/tag/color3.vue +19 -1
- package/demos/pc/app/tag/webdoc/tag.js +4 -4
- package/demos/pc/app/time-line/custom-field-composition-api.vue +4 -1
- package/demos/pc/app/time-line/custom-field.spec.ts +1 -0
- package/demos/pc/app/time-line/custom-field.vue +4 -1
- package/demos/pc/app/time-line/custom-icon-composition-api.vue +21 -0
- package/demos/pc/app/time-line/custom-icon.spec.ts +14 -0
- package/demos/pc/app/time-line/custom-icon.vue +34 -0
- package/demos/pc/app/time-line/status-composition-api.vue +24 -3
- package/demos/pc/app/time-line/status.spec.ts +53 -11
- package/demos/pc/app/time-line/status.vue +14 -3
- package/demos/pc/app/time-line/webdoc/time-line.js +57 -44
- package/demos/pc/app/time-picker/default-value.spec.ts +6 -4
- package/demos/pc/app/time-picker/disabled.spec.ts +2 -7
- package/demos/pc/app/time-picker/editable.spec.ts +4 -1
- package/demos/pc/app/time-picker/format.spec.ts +6 -8
- package/demos/pc/app/time-picker/is-range.spec.ts +1 -1
- package/demos/pc/app/time-picker/picker-options.spec.ts +16 -14
- package/demos/pc/app/tree-menu/lazy-load-composition-api.vue +1 -1
- package/demos/pc/app/tree-menu/lazy-load.vue +1 -1
- package/demos/pc/menus.js +73 -68
- package/demos/pc/webdoc/aui-adapter-en.md +207 -0
- package/demos/pc/webdoc/aui-adapter.md +207 -0
- package/demos/pc/webdoc/changelog.md +63 -0
- package/demos/saas/menus.js +2 -3
- package/index.html +1 -1
- package/package.json +11 -11
- package/src/tools/useApiMode.js +1 -1
- package/src/tools/useTheme.js +2 -1
- package/src/views/components/components.vue +17 -6
- package/src/views/layout/layout.vue +3 -4
- package/src/views/overview.vue +9 -5
- package/demos/apis/credit-card-form.js +0 -98
- package/demos/apis/detail-page.js +0 -126
- package/demos/apis/slide-bar.js +0 -104
- package/demos/pc/app/credit-card-form/background-image-composition-api.vue +0 -17
- package/demos/pc/app/credit-card-form/background-image.vue +0 -25
- package/demos/pc/app/credit-card-form/basic-usage-composition-api.vue +0 -16
- package/demos/pc/app/credit-card-form/basic-usage.vue +0 -24
- package/demos/pc/app/credit-card-form/credit-card-form-events-composition-api.vue +0 -51
- package/demos/pc/app/credit-card-form/credit-card-form-events.vue +0 -55
- package/demos/pc/app/credit-card-form/webdoc/credit-card-form.cn.md +0 -7
- package/demos/pc/app/credit-card-form/webdoc/credit-card-form.en.md +0 -7
- package/demos/pc/app/credit-card-form/webdoc/credit-card-form.js +0 -46
- package/demos/pc/app/detail-page/basic-usage-composition-api.vue +0 -32
- package/demos/pc/app/detail-page/basic-usage.spec.ts +0 -29
- package/demos/pc/app/detail-page/basic-usage.vue +0 -40
- package/demos/pc/app/detail-page/custom-show-text-composition-api.vue +0 -41
- package/demos/pc/app/detail-page/custom-show-text.spec.ts +0 -16
- package/demos/pc/app/detail-page/custom-show-text.vue +0 -49
- package/demos/pc/app/detail-page/webdoc/detail-page.cn.md +0 -7
- package/demos/pc/app/detail-page/webdoc/detail-page.en.md +0 -7
- package/demos/pc/app/detail-page/webdoc/detail-page.js +0 -38
- package/demos/pc/app/select/nest-grid-remote-multi-composition-api.vue +0 -106
- package/demos/pc/app/select/nest-grid-remote-multi.spec.ts +0 -68
- package/demos/pc/app/select/nest-grid-remote-multi.vue +0 -118
- package/demos/pc/app/select/nest-grid-remote-single-composition-api.vue +0 -230
- package/demos/pc/app/select/nest-grid-remote-single.spec.ts +0 -62
- package/demos/pc/app/select/nest-grid-remote-single.vue +0 -238
- package/demos/pc/app/slide-bar/basic-usage-composition-api.vue +0 -21
- package/demos/pc/app/slide-bar/basic-usage.spec.ts +0 -12
- package/demos/pc/app/slide-bar/basic-usage.vue +0 -29
- package/demos/pc/app/slide-bar/custom-content-composition-api.vue +0 -26
- package/demos/pc/app/slide-bar/custom-content.spec.ts +0 -10
- package/demos/pc/app/slide-bar/custom-content.vue +0 -34
- package/demos/pc/app/slide-bar/custom-tag-composition-api.vue +0 -93
- package/demos/pc/app/slide-bar/custom-tag.spec.ts +0 -10
- package/demos/pc/app/slide-bar/custom-tag.vue +0 -101
- package/demos/pc/app/slide-bar/slide-bar-events-composition-api.vue +0 -37
- package/demos/pc/app/slide-bar/slide-bar-events.spec.ts +0 -11
- package/demos/pc/app/slide-bar/slide-bar-events.vue +0 -45
- package/demos/pc/app/slide-bar/webdoc/slide-bar.cn.md +0 -7
- package/demos/pc/app/slide-bar/webdoc/slide-bar.en.md +0 -7
- package/demos/pc/app/slide-bar/webdoc/slide-bar.js +0 -72
- package/demos/pc/app/slide-bar/wheel-blocks-composition-api.vue +0 -21
- package/demos/pc/app/slide-bar/wheel-blocks.spec.ts +0 -13
- package/demos/pc/app/slide-bar/wheel-blocks.vue +0 -29
- package/demos/pc/overviewimage/credit-card-form.svg +0 -91
- package/demos/pc/overviewimage/detail-page.svg +0 -90
- package/demos/pc/overviewimage/slide-bar.svg +0 -96
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test'
|
|
2
|
+
|
|
3
|
+
test('实例方法', async ({ page }) => {
|
|
4
|
+
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
5
|
+
page.goto('input#methods')
|
|
6
|
+
|
|
7
|
+
const inputs = page.locator('.demo-input-methods .tiny-mobile-input')
|
|
8
|
+
|
|
9
|
+
await page.getByRole('button', { name: 'focus' }).click()
|
|
10
|
+
await expect(inputs.first()).toHaveClass(/is-focus/)
|
|
11
|
+
await page.getByRole('button', { name: 'blur' }).click()
|
|
12
|
+
await expect(inputs.first()).not.toHaveClass(/is-focus/)
|
|
13
|
+
|
|
14
|
+
await inputs.nth(1).locator('input').fill('123')
|
|
15
|
+
await page.getByRole('button', { name: 'select' }).click()
|
|
16
|
+
|
|
17
|
+
// 判断input内容是否选中
|
|
18
|
+
const selectedText = await page.evaluate(() => {
|
|
19
|
+
const selection = window.getSelection()
|
|
20
|
+
return selection.toString()
|
|
21
|
+
})
|
|
22
|
+
await expect(selectedText).toBe('123')
|
|
23
|
+
})
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test'
|
|
2
|
+
|
|
3
|
+
test('输入框原生属性', async ({ page }) => {
|
|
4
|
+
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
5
|
+
page.goto('input#native-attributes')
|
|
6
|
+
|
|
7
|
+
const inputs = page.locator('.demo-input .tiny-mobile-input input')
|
|
8
|
+
|
|
9
|
+
await expect(inputs.first()).toHaveAttribute('autofocus')
|
|
10
|
+
await expect(inputs.nth(1)).toHaveAttribute('readonly')
|
|
11
|
+
await expect(inputs.nth(2)).toHaveAttribute('autocomplete', 'on')
|
|
12
|
+
await expect(inputs.nth(3)).toHaveAttribute('step', '2')
|
|
13
|
+
await expect(inputs.nth(4)).toHaveAttribute('name', 'username')
|
|
14
|
+
})
|
|
@@ -18,10 +18,6 @@
|
|
|
18
18
|
<span>step=2</span>
|
|
19
19
|
<tiny-input type="number" v-model="inputStep" :step="2" placeholder="step 为 2"></tiny-input>
|
|
20
20
|
</div>
|
|
21
|
-
<div class="demo-input-item">
|
|
22
|
-
<span>min=2; max=11</span>
|
|
23
|
-
<tiny-input type="number" v-model="inputMaxMin" :min="2" :max="11"></tiny-input>
|
|
24
|
-
</div>
|
|
25
21
|
<div class="demo-input-item">
|
|
26
22
|
<span>name</span>
|
|
27
23
|
<tiny-input v-model="username" name="username"></tiny-input>
|
|
@@ -41,7 +37,6 @@ export default {
|
|
|
41
37
|
autofocusVal: '',
|
|
42
38
|
input: 'readonly',
|
|
43
39
|
inputStep: 2,
|
|
44
|
-
inputMaxMin: 1,
|
|
45
40
|
inputAutocomplete: '',
|
|
46
41
|
username: ''
|
|
47
42
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test'
|
|
2
|
+
|
|
3
|
+
test('输入框前置与后置图标', async ({ page }) => {
|
|
4
|
+
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
5
|
+
page.goto('input#prefix-suffix-icon')
|
|
6
|
+
|
|
7
|
+
const input1 = page.locator('.demo-input-icons .tiny-mobile-input').first()
|
|
8
|
+
const input2 = page.locator('.demo-input-icons .tiny-mobile-input').nth(1)
|
|
9
|
+
|
|
10
|
+
await expect(input1.locator('.tiny-mobile-input__prefix svg')).toBeVisible()
|
|
11
|
+
await expect(input2.locator('.tiny-mobile-input__suffix svg')).toBeVisible()
|
|
12
|
+
})
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test'
|
|
2
|
+
|
|
3
|
+
test('密码框铭文显示', async ({ page }) => {
|
|
4
|
+
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
5
|
+
await page.goto('input#show-password')
|
|
6
|
+
|
|
7
|
+
const input = page.locator('.demo-input .tiny-mobile-input')
|
|
8
|
+
await expect(input.locator('input')).toHaveAttribute('type', 'password')
|
|
9
|
+
await input.locator('input').fill('123abc')
|
|
10
|
+
await input.locator('.tiny-mobile-input__icon').click()
|
|
11
|
+
await expect(input.locator('input')).toHaveAttribute('type', 'text')
|
|
12
|
+
await expect(input.locator('input')).toHaveValue('123abc')
|
|
13
|
+
await input.locator('.tiny-mobile-input__icon').click()
|
|
14
|
+
await expect(input.locator('input')).toHaveAttribute('type', 'password')
|
|
15
|
+
await expect(input.locator('input')).toHaveValue('123abc')
|
|
16
|
+
})
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test'
|
|
2
|
+
|
|
3
|
+
test('插槽', async ({ page }) => {
|
|
4
|
+
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
5
|
+
page.goto('input#slots')
|
|
6
|
+
|
|
7
|
+
const inputs = page.locator('.demo-input .tiny-mobile-input')
|
|
8
|
+
const prependSlot = inputs.first().locator('.tiny-mobile-input-group__prepend')
|
|
9
|
+
const appendSlot = inputs.nth(1).locator('.tiny-mobile-input-group__append')
|
|
10
|
+
const prefixSlot = inputs.nth(2).locator('.tiny-mobile-input__prefix')
|
|
11
|
+
const suffixSlot = inputs.nth(3).locator('.tiny-mobile-input__suffix')
|
|
12
|
+
const titleSlot = inputs.nth(4).locator('.tiny-mobile-input__title')
|
|
13
|
+
const tipsSlot = inputs.nth(4).locator('.tiny-mobile-input__tips')
|
|
14
|
+
|
|
15
|
+
await expect(prependSlot).toBeVisible()
|
|
16
|
+
await expect(prependSlot).toContainText('Http://')
|
|
17
|
+
|
|
18
|
+
await expect(appendSlot).toBeVisible()
|
|
19
|
+
await expect(appendSlot).toContainText('.com')
|
|
20
|
+
|
|
21
|
+
await expect(prefixSlot).toBeVisible()
|
|
22
|
+
await expect(prefixSlot.locator('.tiny-svg')).toBeVisible()
|
|
23
|
+
|
|
24
|
+
await expect(suffixSlot).toBeVisible()
|
|
25
|
+
await expect(suffixSlot.locator('.tiny-svg')).toBeVisible()
|
|
26
|
+
|
|
27
|
+
await expect(titleSlot).toBeVisible()
|
|
28
|
+
await expect(titleSlot).toContainText('自定义标题')
|
|
29
|
+
|
|
30
|
+
await expect(tipsSlot).toBeVisible()
|
|
31
|
+
await expect(tipsSlot).toContainText('自定义提示')
|
|
32
|
+
})
|
|
@@ -8,23 +8,23 @@
|
|
|
8
8
|
</tiny-input>
|
|
9
9
|
<tiny-input placeholder="prefix" v-model="input">
|
|
10
10
|
<template #prefix>
|
|
11
|
-
<tiny-icon-search/>
|
|
11
|
+
<tiny-icon-search />
|
|
12
12
|
</template>
|
|
13
13
|
</tiny-input>
|
|
14
14
|
<tiny-input placeholder="suffix" v-model="input">
|
|
15
15
|
<template #suffix>
|
|
16
|
-
<tiny-icon-calendar/>
|
|
16
|
+
<tiny-icon-calendar />
|
|
17
17
|
</template>
|
|
18
18
|
</tiny-input>
|
|
19
19
|
<br />
|
|
20
|
-
|
|
20
|
+
|
|
21
21
|
<tiny-input placeholder="suffix" v-model="input">
|
|
22
22
|
<template #title>
|
|
23
|
-
<span
|
|
23
|
+
<span>自定义标题</span>
|
|
24
24
|
</template>
|
|
25
25
|
|
|
26
26
|
<template #tips>
|
|
27
|
-
<span class="tips"
|
|
27
|
+
<span class="tips">自定义提示</span>
|
|
28
28
|
</template>
|
|
29
29
|
</tiny-input>
|
|
30
30
|
</div>
|
|
@@ -38,7 +38,7 @@ export default {
|
|
|
38
38
|
components: {
|
|
39
39
|
TinyInput: Input,
|
|
40
40
|
TinyIconSearch: IconSearch(),
|
|
41
|
-
TinyIconCalendar: IconCalendar()
|
|
41
|
+
TinyIconCalendar: IconCalendar()
|
|
42
42
|
},
|
|
43
43
|
data() {
|
|
44
44
|
return {
|
|
@@ -55,7 +55,7 @@ export default {
|
|
|
55
55
|
background: #f5f5f5;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
.demo-input [class^=tiny-mobile] {
|
|
58
|
+
.demo-input [class^='tiny-mobile'] {
|
|
59
59
|
margin-bottom: 8px;
|
|
60
60
|
}
|
|
61
61
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test'
|
|
2
|
+
|
|
3
|
+
test('文本框行数与列数', async ({ page }) => {
|
|
4
|
+
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
5
|
+
await page.goto('input#textarea-rows-cols')
|
|
6
|
+
|
|
7
|
+
const textarea = page.locator('.demo-input .tiny-mobile-textarea textarea')
|
|
8
|
+
|
|
9
|
+
await expect(textarea).toHaveAttribute('rows', '3')
|
|
10
|
+
await expect(textarea).toHaveAttribute('cols', '30')
|
|
11
|
+
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="demo-input">
|
|
3
|
-
<p>rows=3 cols=
|
|
4
|
-
<tiny-input type="textarea" v-model="value" :rows="rows" :cols="cols"
|
|
3
|
+
<p>rows=3 cols=30</p>
|
|
4
|
+
<tiny-input type="textarea" v-model="value" :rows="rows" :cols="cols"></tiny-input>
|
|
5
5
|
</div>
|
|
6
6
|
</template>
|
|
7
7
|
|
|
@@ -16,7 +16,7 @@ export default {
|
|
|
16
16
|
return {
|
|
17
17
|
value: '杭州西湖是我国著名的旅游胜地,其位于浙江省杭州市西部。西湖是中国最美丽的湖泊之一。',
|
|
18
18
|
rows: 3,
|
|
19
|
-
cols: 30
|
|
19
|
+
cols: 30
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test'
|
|
2
|
+
|
|
3
|
+
test.describe('文本域可缩放', () => {
|
|
4
|
+
test('可拖拽特性', async ({ page }) => {
|
|
5
|
+
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
6
|
+
await page.goto('input#textarea-scalable')
|
|
7
|
+
|
|
8
|
+
const textarea = page.locator('.demo-input .tiny-mobile-textarea textarea')
|
|
9
|
+
|
|
10
|
+
await expect(textarea.first()).toHaveCSS('resize', 'none')
|
|
11
|
+
await expect(textarea.nth(1)).toHaveCSS('resize', 'vertical')
|
|
12
|
+
await expect(textarea.nth(2)).toHaveCSS('resize', 'both')
|
|
13
|
+
await expect(textarea.nth(3)).toHaveCSS('resize', 'horizontal')
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
test('可拖动改变大小', async ({ page }) => {
|
|
17
|
+
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
18
|
+
await page.goto('input#textarea-scalable')
|
|
19
|
+
|
|
20
|
+
const textarea = page.locator('.demo-input .tiny-mobile-textarea textarea')
|
|
21
|
+
|
|
22
|
+
await expect(textarea.nth(5)).toHaveClass(/is-autosize/)
|
|
23
|
+
await expect(textarea.nth(6)).toHaveClass(/is-autosize/)
|
|
24
|
+
})
|
|
25
|
+
})
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="demo-input">
|
|
3
|
-
<p>resize
|
|
4
|
-
<tiny-input type="textarea" v-model="
|
|
5
|
-
<tiny-input type="textarea" v-model="
|
|
6
|
-
<tiny-input type="textarea" v-model="
|
|
7
|
-
<tiny-input type="textarea" v-model="
|
|
3
|
+
<p>resize 可拖动调整大小</p>
|
|
4
|
+
<tiny-input type="textarea" v-model="value1" resize="none" placeholder="resize = none (default)"></tiny-input>
|
|
5
|
+
<tiny-input type="textarea" v-model="value2" resize="vertical" placeholder="resize = vertical"></tiny-input>
|
|
6
|
+
<tiny-input type="textarea" v-model="value3" resize="both" placeholder="resize = both" width="300px"></tiny-input>
|
|
7
|
+
<tiny-input type="textarea" v-model="value4" resize="horizontal" placeholder="resize = horizontal"></tiny-input>
|
|
8
8
|
|
|
9
|
-
<p>autosize
|
|
10
|
-
<tiny-input type="textarea" v-model="
|
|
11
|
-
<tiny-input
|
|
9
|
+
<p>autosize 自适应大小</p>
|
|
10
|
+
<tiny-input type="textarea" v-model="value5" placeholder="autosize = true" autosize></tiny-input>
|
|
11
|
+
<tiny-input
|
|
12
|
+
type="textarea"
|
|
13
|
+
v-model="value6"
|
|
14
|
+
placeholder="autosize = { minRows: 2, maxRows: 3 }"
|
|
15
|
+
:autosize="{ minRows: 2, maxRows: 3 }"
|
|
16
|
+
></tiny-input>
|
|
12
17
|
</div>
|
|
13
18
|
</template>
|
|
14
19
|
|
|
@@ -21,8 +26,12 @@ export default {
|
|
|
21
26
|
},
|
|
22
27
|
data() {
|
|
23
28
|
return {
|
|
24
|
-
|
|
25
|
-
|
|
29
|
+
value1: '',
|
|
30
|
+
value2: '',
|
|
31
|
+
value3: '',
|
|
32
|
+
value4: '',
|
|
33
|
+
value5: '',
|
|
34
|
+
value6: ''
|
|
26
35
|
}
|
|
27
36
|
}
|
|
28
37
|
}
|
|
@@ -33,6 +42,8 @@ export default {
|
|
|
33
42
|
height: 100%;
|
|
34
43
|
padding: 20px 16px;
|
|
35
44
|
background: #f5f5f5;
|
|
45
|
+
overflow-y: scroll;
|
|
46
|
+
box-sizing: border-box;
|
|
36
47
|
}
|
|
37
48
|
|
|
38
49
|
.demo-input .tiny-mobile-textarea {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test'
|
|
2
|
+
|
|
3
|
+
test('插槽', async ({ page }) => {
|
|
4
|
+
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
5
|
+
page.goto('input#type-select')
|
|
6
|
+
|
|
7
|
+
const input = page.locator('.demo-input .tiny-mobile-input')
|
|
8
|
+
const selectIcon = input.locator('.tiny-mobile-input__select-icon')
|
|
9
|
+
const menu = page.locator('.tiny-mobile-action-sheet__menu').nth(1)
|
|
10
|
+
const menuItem = page.getByText('选项2')
|
|
11
|
+
|
|
12
|
+
await expect(input.locator('.tiny-mobile-input__select')).toBeVisible()
|
|
13
|
+
await expect(selectIcon).toBeVisible()
|
|
14
|
+
|
|
15
|
+
await selectIcon.click()
|
|
16
|
+
await expect(menu).toBeVisible()
|
|
17
|
+
await menuItem.click()
|
|
18
|
+
await expect(menu).not.toBeVisible()
|
|
19
|
+
await expect(input.locator('input')).toHaveValue('选项2')
|
|
20
|
+
})
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test'
|
|
2
|
+
|
|
3
|
+
test('Input输入框类型', async ({ page }) => {
|
|
4
|
+
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
5
|
+
await page.goto('input#type')
|
|
6
|
+
|
|
7
|
+
const inputs = page.locator('.demo-input .tiny-mobile-input input')
|
|
8
|
+
|
|
9
|
+
await expect(inputs.first()).toHaveAttribute('type', 'text')
|
|
10
|
+
await expect(inputs.nth(1)).toHaveAttribute('type', 'password')
|
|
11
|
+
await expect(inputs.nth(2)).toHaveAttribute('type', 'email')
|
|
12
|
+
await expect(inputs.nth(3)).toHaveAttribute('type', 'number')
|
|
13
|
+
await expect(inputs.nth(4)).toHaveAttribute('type', 'tel')
|
|
14
|
+
await expect(inputs.nth(5)).toHaveAttribute('type', 'url')
|
|
15
|
+
await expect(inputs.nth(6)).toHaveAttribute('type', 'date')
|
|
16
|
+
await expect(inputs.nth(7)).toHaveAttribute('type', 'month')
|
|
17
|
+
await expect(inputs.nth(8)).toHaveAttribute('type', 'week')
|
|
18
|
+
await expect(inputs.nth(9)).toHaveAttribute('type', 'datetime-local')
|
|
19
|
+
await expect(inputs.nth(10)).toHaveAttribute('type', 'time')
|
|
20
|
+
})
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test'
|
|
2
|
+
|
|
3
|
+
test('表单校验', async ({ page }) => {
|
|
4
|
+
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
5
|
+
await page.goto('input#validate-event')
|
|
6
|
+
|
|
7
|
+
const input = page.locator('.demo-input .tiny-mobile-input input')
|
|
8
|
+
const label = page.locator('.demo-input .tiny-mobile-form-item__label')
|
|
9
|
+
const errorTip = page.locator('.demo-input .tiny-mobile-input-form__error')
|
|
10
|
+
|
|
11
|
+
await expect(errorTip).not.toBeVisible()
|
|
12
|
+
await input.click()
|
|
13
|
+
await label.click()
|
|
14
|
+
await expect(errorTip).toBeVisible()
|
|
15
|
+
await expect(errorTip).toContainText('请输入活动名称')
|
|
16
|
+
|
|
17
|
+
await input.fill('123')
|
|
18
|
+
await expect(errorTip).not.toBeVisible()
|
|
19
|
+
|
|
20
|
+
await input.fill('123456789')
|
|
21
|
+
await expect(errorTip).toContainText('长度在 3 到 5 个字符')
|
|
22
|
+
})
|
|
@@ -73,8 +73,8 @@ export default {
|
|
|
73
73
|
{
|
|
74
74
|
demoId: 'show-password',
|
|
75
75
|
name: {
|
|
76
|
-
'zh-CN': '
|
|
77
|
-
'en-US': 'Password Input'
|
|
76
|
+
'zh-CN': '密码框明文展示',
|
|
77
|
+
'en-US': 'Password Input Plaintext'
|
|
78
78
|
},
|
|
79
79
|
desc: {
|
|
80
80
|
'zh-CN':
|
|
@@ -113,13 +113,13 @@ export default {
|
|
|
113
113
|
{
|
|
114
114
|
demoId: 'prefix-suffix-icon',
|
|
115
115
|
name: {
|
|
116
|
-
'zh-CN': '
|
|
117
|
-
'en-US': 'Icon'
|
|
116
|
+
'zh-CN': '前置与后置图标',
|
|
117
|
+
'en-US': 'Prefix and Suffix Icon'
|
|
118
118
|
},
|
|
119
119
|
desc: {
|
|
120
|
-
'zh-CN': '<p>可通过 <code>prefix-icon, suffix-icon</code>
|
|
120
|
+
'zh-CN': '<p>可通过 <code>prefix-icon, suffix-icon</code> 属性分别设置输入框头部、尾部图标</p>',
|
|
121
121
|
'en-US':
|
|
122
|
-
'<p>You can set the header icon or the end icon of the text box through the <code>prefix-icon, suffix-icon</code> attribute
|
|
122
|
+
'<p>You can set the header icon or the end icon of the text box through the <code>prefix-icon, suffix-icon</code> attribute respectively.</p>'
|
|
123
123
|
},
|
|
124
124
|
codeFiles: ['prefix-suffix-icon.vue']
|
|
125
125
|
},
|
|
@@ -136,69 +136,69 @@ export default {
|
|
|
136
136
|
codeFiles: ['native-attributes.vue']
|
|
137
137
|
},
|
|
138
138
|
{
|
|
139
|
-
demoId: '
|
|
139
|
+
demoId: 'type-select',
|
|
140
140
|
name: {
|
|
141
|
-
'zh-CN': '
|
|
142
|
-
'en-US': '
|
|
141
|
+
'zh-CN': '下拉列表',
|
|
142
|
+
'en-US': 'events'
|
|
143
143
|
},
|
|
144
144
|
desc: {
|
|
145
|
-
'zh-CN': '<p
|
|
146
|
-
'en-US':
|
|
145
|
+
'zh-CN': '<p>通过使用 <code>is-select</code> 与 <code>select-menu</code> 搭配让输入框变为下拉列表。</p>',
|
|
146
|
+
'en-US':
|
|
147
|
+
'<p>By using <code>is-select</code> with <code>select-menu</code>, the input field can be turned into a dropdown list.</p>'
|
|
147
148
|
},
|
|
148
|
-
codeFiles: ['
|
|
149
|
+
codeFiles: ['type-select.vue']
|
|
149
150
|
},
|
|
150
151
|
{
|
|
151
|
-
demoId: '
|
|
152
|
+
demoId: 'validate-event',
|
|
152
153
|
name: {
|
|
153
|
-
'zh-CN': '
|
|
154
|
-
'en-US': '
|
|
154
|
+
'zh-CN': '表单校验',
|
|
155
|
+
'en-US': 'form validation'
|
|
155
156
|
},
|
|
156
157
|
desc: {
|
|
157
158
|
'zh-CN':
|
|
158
|
-
'
|
|
159
|
+
'<p>可通过 <code>validate-event</code> 属性设置输入时触发表单校验。通过 <code>trigger</code> 配置触发校验规则的方式,为 <code>change</code> 时,当输入框值改变即触发校验,为 <code>blur</code> 时则失焦后触发校验</p>',
|
|
159
160
|
'en-US':
|
|
160
|
-
'
|
|
161
|
+
'<p>You can set the <code>validate-event</code> attribute to trigger form validation upon input. Use <code>trigger</code> to configure the mode of triggering the validation rule. If <code>change</code> is used, the validation is triggered when the value in the text box changes. If <code>blur</code> is used, the validation is triggered after the focus is lost</p>'
|
|
161
162
|
},
|
|
162
|
-
codeFiles: ['
|
|
163
|
+
codeFiles: ['validate-event.vue']
|
|
163
164
|
},
|
|
164
165
|
{
|
|
165
|
-
demoId: '
|
|
166
|
+
demoId: 'methods',
|
|
166
167
|
name: {
|
|
167
|
-
'zh-CN': '
|
|
168
|
-
'en-US': '
|
|
168
|
+
'zh-CN': '实例方法',
|
|
169
|
+
'en-US': 'Methods'
|
|
169
170
|
},
|
|
170
171
|
desc: {
|
|
171
|
-
'zh-CN': '<p>
|
|
172
|
-
'en-US': '<p>
|
|
172
|
+
'zh-CN': '<p>可使用组件的实例方法:<code>focus | blur | select</code></p>',
|
|
173
|
+
'en-US': '<p>Those instance methods available: <code>focus | blur | select</code></p>'
|
|
173
174
|
},
|
|
174
|
-
codeFiles: ['
|
|
175
|
+
codeFiles: ['methods.vue']
|
|
175
176
|
},
|
|
176
177
|
{
|
|
177
|
-
demoId: '
|
|
178
|
+
demoId: 'slots',
|
|
178
179
|
name: {
|
|
179
|
-
'zh-CN': '
|
|
180
|
+
'zh-CN': '插槽',
|
|
180
181
|
'en-US': 'events'
|
|
181
182
|
},
|
|
182
183
|
desc: {
|
|
183
|
-
'zh-CN': '<p
|
|
184
|
-
'en-US':
|
|
185
|
-
'<p>By using <code>is-select</code> with <code>select-menu</code>, the input field can be turned into a dropdown list.</p>'
|
|
184
|
+
'zh-CN': '<p>Input 组件提供了丰富的插槽。</p>',
|
|
185
|
+
'en-US': '<p>Input component provides a rich set of slots.</p>'
|
|
186
186
|
},
|
|
187
|
-
codeFiles: ['
|
|
187
|
+
codeFiles: ['slots.vue']
|
|
188
188
|
},
|
|
189
189
|
{
|
|
190
|
-
demoId: '
|
|
190
|
+
demoId: 'events',
|
|
191
191
|
name: {
|
|
192
|
-
'zh-CN': '
|
|
193
|
-
'en-US': '
|
|
192
|
+
'zh-CN': '事件',
|
|
193
|
+
'en-US': 'Events'
|
|
194
194
|
},
|
|
195
195
|
desc: {
|
|
196
196
|
'zh-CN':
|
|
197
|
-
'<p
|
|
197
|
+
'<p>输入框的事件,包括 <code>input</code>(输入值时触发), <code>blur</code>(失去焦点时触发), <code>focus</code>(获取焦点时触发), <code>change</code>(值改变时触发), <code>clear</code>(清除按钮时触发)。</p>',
|
|
198
198
|
'en-US':
|
|
199
|
-
'<p>
|
|
199
|
+
'<p>Event of the text box, including: <code>input</code> (triggered when a value is entered) <code>blur</code> (triggered when the focus is lost)<code>focus</code> (triggered when the focus is obtained) <code>change</code> (triggered when the value changes) <code>clear</code> (triggered when the button is cleared).</p>'
|
|
200
200
|
},
|
|
201
|
-
codeFiles: ['
|
|
201
|
+
codeFiles: ['events.vue']
|
|
202
202
|
}
|
|
203
203
|
]
|
|
204
204
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<tiny-numeric v-model="stepNum" :step="step" :empty-value="null" @change="onChange" allow-empty></tiny-numeric>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { ref } from 'vue'
|
|
7
|
+
import { Numeric as TinyNumeric, Modal } from '@opentiny/vue'
|
|
8
|
+
|
|
9
|
+
const step = ref(2)
|
|
10
|
+
const stepNum = ref(1)
|
|
11
|
+
|
|
12
|
+
function onChange(val, oldVal) {
|
|
13
|
+
Modal.message({ message: `${val} ${oldVal}`, status: 'info' })
|
|
14
|
+
}
|
|
15
|
+
</script>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<tiny-numeric v-model="stepNum" :step="step" :empty-value="null" @change="onChange" allow-empty></tiny-numeric>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
import { Numeric, Modal } from '@opentiny/vue'
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
components: {
|
|
10
|
+
TinyNumeric: Numeric
|
|
11
|
+
},
|
|
12
|
+
data() {
|
|
13
|
+
return {
|
|
14
|
+
step: 2,
|
|
15
|
+
stepNum: 1
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
methods: {
|
|
19
|
+
onChange(val, oldVal) {
|
|
20
|
+
Modal.message({ message: `${val} ${oldVal}`, status: 'info' })
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
@@ -78,6 +78,20 @@ export default {
|
|
|
78
78
|
},
|
|
79
79
|
codeFiles: ['allow-empty.vue']
|
|
80
80
|
},
|
|
81
|
+
{
|
|
82
|
+
demoId: 'empty-value',
|
|
83
|
+
name: {
|
|
84
|
+
'zh-CN': '设定清空输入后的绑定值',
|
|
85
|
+
'en-US': 'Sets the binding value after the input is cleared'
|
|
86
|
+
},
|
|
87
|
+
desc: {
|
|
88
|
+
'zh-CN':
|
|
89
|
+
'可通过 <code>empty-value</code> 属性设置计数器在可清空下,清空后组件的绑定值。默认为 <code>undefined</code>。示例中将清空后组件绑定值改为<code>null</code>',
|
|
90
|
+
'en-US':
|
|
91
|
+
'You can use the <code>empty-value</code> attribute to set the binding value of the cleared component when the counter can be cleared. The default value is <code>undefined</code>. In the example, the component binding value is changed to <code>null</code>.'
|
|
92
|
+
},
|
|
93
|
+
codeFiles: ['empty-value.vue']
|
|
94
|
+
},
|
|
81
95
|
{
|
|
82
96
|
demoId: 'about-step',
|
|
83
97
|
name: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<tiny-select v-model="value" placeholder="请选择" multiple collapse-tags title="标题">
|
|
2
|
+
<tiny-select v-model="value" placeholder="请选择" multiple :show-proportion="true" collapse-tags title="标题">
|
|
3
3
|
<tiny-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </tiny-option>
|
|
4
4
|
</tiny-select>
|
|
5
5
|
</template>
|
|
@@ -36,9 +36,10 @@ export default {
|
|
|
36
36
|
'en-US': 'Collapse tags'
|
|
37
37
|
},
|
|
38
38
|
desc: {
|
|
39
|
-
'zh-CN':
|
|
39
|
+
'zh-CN':
|
|
40
|
+
'<p>通过 <code>collapse-tags</code> 属性设置选中多个选项时,多个标签缩略展示。设置 <code>show-proportion</code> 可展示当前选中条数和总条数占比,默认值为 <code>false</code> 。</p>\n',
|
|
40
41
|
'en-US':
|
|
41
|
-
'<p>When multiple options are selected through the <code>collapse-tags</code> attribute settings, multiple tags will be abbreviated and displayed.</p>\n'
|
|
42
|
+
'<p>When multiple options are selected through the <code>collapse-tags</code> attribute settings, multiple tags will be abbreviated and displayed. Set <code>show promotion</code> to display the current number of selected items and the proportion of total items. The default value is <code>false</code> .</p>\n'
|
|
42
43
|
},
|
|
43
44
|
codeFiles: ['collapse-tags.vue']
|
|
44
45
|
},
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<tiny-action-menu :options="options" mode="card"> </tiny-action-menu>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { ref } from 'vue'
|
|
7
|
+
import { ActionMenu as TinyActionMenu } from '@opentiny/vue'
|
|
8
|
+
import { iconWebPlus, iconSuccessful, iconCloseSquare } from '@opentiny/vue-icon'
|
|
9
|
+
|
|
10
|
+
const options = ref([
|
|
11
|
+
{
|
|
12
|
+
label: '远程登陆',
|
|
13
|
+
icon: iconWebPlus()
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
label: '开机',
|
|
17
|
+
icon: iconSuccessful()
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
label: '关机',
|
|
21
|
+
icon: iconCloseSquare()
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
label: '重启'
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
label: '网络设置',
|
|
28
|
+
children: [{ label: '更改安全组' }, { label: '切换VPC', divided: true }]
|
|
29
|
+
}
|
|
30
|
+
])
|
|
31
|
+
</script>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test'
|
|
2
|
+
|
|
3
|
+
test('基本用法', async ({ page }) => {
|
|
4
|
+
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
5
|
+
await page.goto('action-menu#card-mode')
|
|
6
|
+
|
|
7
|
+
const wrap = page.locator('#card-mode')
|
|
8
|
+
const actionMenu = wrap.locator('.tiny-action-menu')
|
|
9
|
+
const visibleItem = actionMenu.locator('.tiny-action-menu__item')
|
|
10
|
+
const moreItem = visibleItem.last()
|
|
11
|
+
|
|
12
|
+
await expect(visibleItem).toHaveCount(4)
|
|
13
|
+
await expect(moreItem).not.toHaveText(/更多/)
|
|
14
|
+
// 三点图标
|
|
15
|
+
await expect(moreItem.locator('circle')).toHaveCount(3)
|
|
16
|
+
})
|