@opentiny/vue-docs 3.24.6 → 3.26.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/.stylelintrc.js +2 -2
- package/demos/apis/button.js +15 -0
- package/demos/apis/calendar-view.js +3 -2
- package/demos/apis/chart-demo.js +1 -1
- package/demos/apis/chart-docs.js +1 -1
- package/demos/apis/chart-events.js +1 -1
- package/demos/apis/chart-question.js +1 -1
- package/demos/apis/chart.js +1 -1
- package/demos/apis/form.js +3 -0
- package/demos/apis/grid.js +76 -16
- package/demos/apis/modal.js +1 -1
- package/demos/apis/numeric.js +3 -3
- package/demos/apis/search.js +28 -0
- package/demos/apis/slider-button.js +22 -0
- package/demos/apis/split.js +11 -0
- package/demos/apis/steps.js +3 -3
- package/demos/apis/tabs.js +12 -0
- package/demos/apis/time-line.js +20 -0
- package/demos/mobile-first/app/button/type.vue +1 -1
- package/demos/mobile-first/app/button/webdoc/button.js +2 -2
- package/demos/mobile-first/app/slider-button/basic-usage.vue +5 -5
- package/demos/mobile-first/app/slider-button/webdoc/slider-button.js +1 -1
- package/demos/mobile-first/app/steps/advanced-steps.vue +8 -1
- package/demos/mobile-first/menus.js +16 -9
- package/demos/pc/app/action-menu/basic-usage-composition-api.vue +1 -1
- package/demos/pc/app/action-menu/basic-usage.vue +1 -1
- package/demos/pc/app/action-menu/card-mode-composition-api.vue +1 -1
- package/demos/pc/app/action-menu/card-mode.vue +1 -1
- package/demos/pc/app/action-menu/disabled-composition-api.vue +2 -2
- package/demos/pc/app/action-menu/disabled.vue +2 -2
- package/demos/pc/app/action-menu/events-composition-api.vue +1 -1
- package/demos/pc/app/action-menu/events.vue +1 -1
- package/demos/pc/app/action-menu/icon-composition-api.vue +2 -2
- package/demos/pc/app/action-menu/icon.vue +2 -2
- package/demos/pc/app/action-menu/max-show-num-composition-api.vue +1 -1
- package/demos/pc/app/action-menu/max-show-num.vue +1 -1
- package/demos/pc/app/action-menu/more-text-composition-api.vue +1 -1
- package/demos/pc/app/action-menu/more-text.vue +1 -1
- package/demos/pc/app/action-menu/popper-class-composition-api.vue +1 -1
- package/demos/pc/app/action-menu/popper-class.vue +1 -1
- package/demos/pc/app/action-menu/slot-item-composition-api.vue +1 -1
- package/demos/pc/app/action-menu/slot-item.vue +1 -1
- package/demos/pc/app/action-menu/spacing-composition-api.vue +1 -1
- package/demos/pc/app/action-menu/spacing.vue +1 -1
- package/demos/pc/app/action-menu/text-field-composition-api.vue +1 -1
- package/demos/pc/app/action-menu/text-field.spec.ts +1 -1
- package/demos/pc/app/action-menu/text-field.vue +1 -1
- package/demos/pc/app/amount/custom-service.spec.js +4 -4
- package/demos/pc/app/base-select/slot-reference.spec.ts +1 -1
- package/demos/pc/app/button/icon-composition-api.vue +3 -1
- package/demos/pc/app/button/icon.vue +3 -1
- package/demos/pc/app/button/webdoc/button.js +3 -2
- package/demos/pc/app/calendar-view/calendar-mode-composition-api.vue +7 -1
- package/demos/pc/app/calendar-view/calendar-mode.spec.ts +3 -0
- package/demos/pc/app/calendar-view/calendar-mode.vue +7 -1
- package/demos/pc/app/carousel/webdoc/carousel.js +0 -18
- package/demos/pc/app/color-picker/alpha-composition-api.vue +1 -1
- package/demos/pc/app/color-picker/alpha.spec.ts +2 -2
- package/demos/pc/app/color-picker/alpha.vue +1 -1
- package/demos/pc/app/color-picker/base.spec.ts +2 -2
- package/demos/pc/app/color-picker/default-visible.spec.ts +1 -1
- package/demos/pc/app/color-picker/event-composition-api.vue +2 -2
- package/demos/pc/app/color-picker/event.spec.ts +4 -4
- package/demos/pc/app/color-picker/event.vue +1 -1
- package/demos/pc/app/color-picker/format.spec.ts +6 -6
- package/demos/pc/app/color-picker/history.spec.ts +1 -7
- package/demos/pc/app/color-picker/predefine.spec.ts +3 -10
- package/demos/pc/app/color-picker/size.spec.ts +4 -4
- package/demos/pc/app/color-select-panel/format.spec.ts +2 -8
- package/demos/pc/app/color-select-panel/history.spec.ts +0 -2
- package/demos/pc/app/color-select-panel/predefine.spec.ts +0 -3
- package/demos/pc/app/container/basic-usage-composition-api.vue +10 -10
- package/demos/pc/app/container/basic-usage.vue +10 -10
- package/demos/pc/app/container/custom-with-height-composition-api.vue +8 -8
- package/demos/pc/app/container/custom-with-height.vue +10 -10
- package/demos/pc/app/date-panel/custom-week.spec.ts +2 -2
- package/demos/pc/app/dialog-select/nest-grid-single.spec.ts +40 -0
- package/demos/pc/app/dialog-select/nest-tree-multi.spec.ts +53 -0
- package/demos/pc/app/dialog-select/nest-tree-single.spec.ts +25 -0
- package/demos/pc/app/dialog-select/set-selection.spec.ts +20 -0
- package/demos/pc/app/file-upload/before-upload-limit-composition-api.vue +1 -1
- package/demos/pc/app/file-upload/before-upload-limit.spec.ts +1 -1
- package/demos/pc/app/file-upload/before-upload-limit.vue +1 -1
- package/demos/pc/app/file-upload/custom-trigger-composition-api.vue +1 -1
- package/demos/pc/app/file-upload/custom-trigger.spec.ts +1 -1
- package/demos/pc/app/file-upload/custom-trigger.vue +1 -1
- package/demos/pc/app/file-upload/custom-upload-tip-composition-api.vue +1 -1
- package/demos/pc/app/file-upload/custom-upload-tip.vue +1 -1
- package/demos/pc/app/file-upload/form-validation-composition-api.vue +1 -1
- package/demos/pc/app/file-upload/form-validation.vue +1 -1
- package/demos/pc/app/file-upload/image-size-composition-api.vue +1 -1
- package/demos/pc/app/file-upload/image-size.spec.ts +1 -1
- package/demos/pc/app/file-upload/image-size.vue +1 -1
- package/demos/pc/app/file-upload/multiple-file-composition-api.vue +1 -1
- package/demos/pc/app/file-upload/multiple-file.spec.ts +1 -1
- package/demos/pc/app/file-upload/multiple-file.vue +1 -1
- package/demos/pc/app/file-upload/prevent-delete-file-composition-api.vue +1 -1
- package/demos/pc/app/file-upload/prevent-delete-file.vue +1 -1
- package/demos/pc/app/file-upload/upload-request-composition-api.vue +1 -1
- package/demos/pc/app/file-upload/upload-request.spec.ts +2 -2
- package/demos/pc/app/file-upload/upload-request.vue +1 -1
- package/demos/pc/app/grid/base/basic-usage-composition-api.vue +1 -17
- package/demos/pc/app/grid/custom/column-fixed.spec.js +2 -1
- package/demos/pc/app/grid/custom/page-size.spec.js +1 -1
- package/demos/pc/app/grid/data-source/auto-load.spec.js +0 -1
- package/demos/pc/app/grid/data-source/request-service.spec.js +1 -1
- package/demos/pc/app/grid/data-source/static-data.spec.js +1 -1
- package/demos/pc/app/grid/dynamically-columns/dynamically-columns.spec.js +2 -1
- package/demos/pc/app/grid/edit/scrollbar-not-blur-composition-api.vue +119 -0
- package/demos/pc/app/grid/edit/scrollbar-not-blur.spec.ts +28 -0
- package/demos/pc/app/grid/edit/scrollbar-not-blur.vue +129 -0
- package/demos/pc/app/grid/editor/custom-edit.spec.js +7 -2
- package/demos/pc/app/grid/empty/empty-data-iscenter.spec.js +1 -1
- package/demos/pc/app/grid/event/toolbar-button-click-event.spec.js +1 -1
- package/demos/pc/app/grid/expand/expand-trigger-slot-composition-api.vue +85 -0
- package/demos/pc/app/grid/expand/expand-trigger-slot.spec.ts +11 -0
- package/demos/pc/app/grid/expand/expand-trigger-slot.vue +95 -0
- package/demos/pc/app/grid/expand/set-row-expansion.spec.js +4 -0
- package/demos/pc/app/grid/filter/custom-filter.spec.js +3 -3
- package/demos/pc/app/grid/filter/default-filter-composition-api.vue +6 -0
- package/demos/pc/app/grid/filter/default-filter.vue +6 -0
- package/demos/pc/app/grid/filter/default-relation.spec.js +1 -1
- package/demos/pc/app/grid/filter/server-filter.spec.js +1 -1
- package/demos/pc/app/grid/filter/simple-filter.spec.ts +5 -4
- package/demos/pc/app/grid/fixed/right-fixed-composition-api.vue +4 -4
- package/demos/pc/app/grid/fixed/right-fixed.vue +4 -4
- package/demos/pc/app/grid/footer/footer-summation-empty.spec.js +0 -1
- package/demos/pc/app/grid/large-data/full-data-loading.spec.js +10 -3
- package/demos/pc/app/grid/large-data/virtual-rolling.spec.js +9 -2
- package/demos/pc/app/grid/mouse-keyboard/keyboard-navigation.spec.js +4 -1
- package/demos/pc/app/grid/renderer/inner-renderer-date-composition-api.vue +4 -3
- package/demos/pc/app/grid/renderer/inner-renderer-date.spec.js +2 -2
- package/demos/pc/app/grid/renderer/inner-renderer-date.vue +3 -3
- package/demos/pc/app/grid/renderer/inner-renderer.spec.js +4 -0
- package/demos/pc/app/grid/size/max-min-grid-height.spec.js +2 -2
- package/demos/pc/app/grid/slot/slot-conf-composition-api.vue +141 -0
- package/demos/pc/app/grid/slot/slot-conf.spec.js +12 -0
- package/demos/pc/app/grid/slot/slot-conf.vue +151 -0
- package/demos/pc/app/grid/sort/combinations-sort.spec.js +2 -2
- package/demos/pc/app/grid/webdoc/grid-edit.js +12 -0
- package/demos/pc/app/grid/webdoc/grid-empty.js +1 -1
- package/demos/pc/app/grid/webdoc/grid-expand.js +11 -0
- package/demos/pc/app/grid/webdoc/grid-slot.js +9 -0
- package/demos/pc/app/icon/iconGroups.js +8 -2
- package/demos/pc/app/input/basic-usage.spec.ts +1 -1
- package/demos/pc/app/loading/background.spec.ts +3 -1
- package/demos/pc/app/loading/custom-class.spec.ts +4 -2
- package/demos/pc/app/loading/fullscreen.spec.ts +6 -4
- package/demos/pc/app/loading/loading-tip-text.spec.ts +3 -1
- package/demos/pc/app/loading/size.spec.ts +5 -3
- package/demos/pc/app/locales/custom-service-composition-api.vue +3 -3
- package/demos/pc/app/locales/custom-service.spec.ts +1 -1
- package/demos/pc/app/locales/custom-service.vue +3 -3
- package/demos/pc/app/modal/basic-usage.spec.ts +2 -1
- package/demos/pc/app/modal/message-close.spec.ts +2 -2
- package/demos/pc/app/modal/message-id.spec.ts +2 -2
- package/demos/pc/app/modal/modal-fn-slots.spec.ts +5 -7
- package/demos/pc/app/modal/modal-header.spec.ts +2 -1
- package/demos/pc/app/numeric/input-event-composition-api.vue +26 -0
- package/demos/pc/app/numeric/input-event.spec.ts +15 -0
- package/demos/pc/app/numeric/input-event.vue +34 -0
- package/demos/pc/app/numeric/webdoc/numeric.js +12 -0
- package/demos/pc/app/pager/align-composition-api.vue +10 -13
- package/demos/pc/app/pager/align.spec.ts +8 -3
- package/demos/pc/app/pager/align.vue +11 -5
- package/demos/pc/app/pager/page-size-composition-api.vue +2 -2
- package/demos/pc/app/pager/page-size.spec.ts +1 -1
- package/demos/pc/app/pager/page-size.vue +2 -2
- package/demos/pc/app/pager/pager-in-grid-composition-api.vue +0 -1
- package/demos/pc/app/pager/pager-in-grid.vue +0 -1
- package/demos/pc/app/pager/popper-append-to-body-composition-api.vue +1 -7
- package/demos/pc/app/pager/popper-append-to-body.vue +1 -7
- package/demos/pc/app/pager/popper-class-composition-api.vue +1 -7
- package/demos/pc/app/pager/popper-class.vue +1 -7
- package/demos/pc/app/popeditor/conditions.spec.ts +1 -1
- package/demos/pc/app/popeditor/suggest.spec.ts +1 -1
- package/demos/pc/app/qr-code/icon-composition-api.vue +17 -3
- package/demos/pc/app/qr-code/icon.spec.ts +19 -0
- package/demos/pc/app/qr-code/icon.vue +25 -4
- package/demos/pc/app/qr-code/style-composition-api.vue +2 -9
- package/demos/pc/app/qr-code/style.spec.ts +18 -1
- package/demos/pc/app/qr-code/style.vue +11 -8
- package/demos/pc/app/query-builder/webdoc/query-builder.js +5 -3
- package/demos/pc/app/search/events.spec.ts +1 -1
- package/demos/pc/app/search/events.vue +9 -0
- package/demos/pc/app/search/slot-prefix-suffix.spec.ts +1 -1
- package/demos/pc/app/search/webdoc/search.js +12 -4
- package/demos/pc/app/select/nest-grid-remote.spec.ts +3 -3
- package/demos/pc/app/select/nest-grid.spec.ts +1 -1
- package/demos/pc/app/select/nest-radio-grid-much-data.spec.ts +5 -7
- package/demos/pc/app/tabs/basic-usage.spec.ts +2 -2
- package/demos/pc/app/tabs/header-only.vue +56 -0
- package/demos/pc/app/tabs/size.spec.ts +2 -2
- package/demos/pc/app/tabs/webdoc/tabs.js +12 -0
- package/demos/pc/app/time-line/slot-default-composition-api.vue +81 -0
- package/demos/pc/app/time-line/slot-default.spec.ts +13 -0
- package/demos/pc/app/time-line/slot-default.vue +95 -0
- package/demos/pc/app/time-line/webdoc/time-line.js +12 -0
- package/demos/pc/menus.js +20 -10
- package/demos/pc/webdoc/changelog-en.md +224 -197
- package/demos/pc/webdoc/changelog.md +167 -387
- package/demos/pc/webdoc/faq.md +14 -0
- package/demos/saas/menus.js +2 -14
- package/env/.env +3 -0
- package/package.json +25 -24
- package/playground/App.vue +2 -2
- package/postcss.config.cjs +1 -0
- package/src/App.vue +26 -59
- package/src/components/anchor.vue +5 -1
- package/src/components/demo.vue +18 -7
- package/src/components/design-token.vue +90 -0
- package/src/components/float-settings.vue +4 -23
- package/src/components/mcp-docs.vue +4 -26
- package/src/components/version-tip.vue +1 -1
- package/src/composable/useTinyRemoter.ts +176 -0
- package/src/composable/utils.ts +2 -166
- package/src/const.ts +6 -1
- package/src/i18n/en.json +2 -0
- package/src/i18n/es.json +47 -0
- package/src/i18n/index.js +24 -5
- package/src/i18n/pt.json +47 -0
- package/src/i18n/zh.json +2 -0
- package/src/main.js +17 -13
- package/src/{menus.jsx → menus.js} +0 -1
- package/src/router.js +3 -18
- package/src/tools/appData.js +6 -16
- package/src/tools/storage.js +5 -3
- package/src/tools/useApiMode.js +11 -3
- package/src/tools/useBulletin.jsx +9 -8
- package/src/tools/useStyleSettings.js +8 -0
- package/src/tools/useTemplateMode.js +5 -1
- package/src/tools/utils.js +32 -1
- package/src/views/components-doc/cmp-config.js +13 -1
- package/src/views/components-doc/common.vue +42 -15
- package/src/views/layout/layout.vue +5 -8
- package/src/views/overview.vue +1 -1
- package/tsconfig.node.json +2 -4
- package/src/components/MessageCard.vue +0 -117
- package/src/components/tiny-robot-chat.vue +0 -128
- package/src/composable/DifyModelProvider.ts +0 -65
- package/src/composable/useTinyRobot.ts +0 -167
- package/src/tools/useAllTaskFinish.ts +0 -0
- package/src/views/comprehensive/Demo.vue +0 -212
- package/src/views/comprehensive/index.vue +0 -380
- package/src/views/comprehensive/products.json +0 -98
- package/src/views/comprehensive/types/index.ts +0 -37
- package/src/views/remoter/index.vue +0 -63
- package/src/views/remoter/sound.vue +0 -349
- /package/demos/pc/app/grid/expand/{expand-config.spec.js → expand-config.spec.ts} +0 -0
|
@@ -8,7 +8,7 @@ test('locales-custom-service', async ({ page }) => {
|
|
|
8
8
|
const reference = demo.locator('.reference-wrapper')
|
|
9
9
|
const popper = page.locator('.tiny-locales__popper')
|
|
10
10
|
|
|
11
|
-
await expect(reference).toHaveText('
|
|
11
|
+
await expect(reference).toHaveText('中文')
|
|
12
12
|
await expect(popper).toBeHidden()
|
|
13
13
|
await reference.hover()
|
|
14
14
|
await page.waitForTimeout(200)
|
|
@@ -16,13 +16,13 @@ export default {
|
|
|
16
16
|
methods: {
|
|
17
17
|
getLocale() {
|
|
18
18
|
// resolve 出来的必须是国际化的 key
|
|
19
|
-
return Promise.resolve(['
|
|
19
|
+
return Promise.resolve(['zhCN', 'enUS', 'zhTW'])
|
|
20
20
|
},
|
|
21
21
|
getCurrentLocale() {
|
|
22
|
-
return Promise.resolve(['
|
|
22
|
+
return Promise.resolve(['zhCN'])
|
|
23
23
|
},
|
|
24
24
|
getChangeLocaleUrl(targetLocale) {
|
|
25
|
-
if (targetLocale === '
|
|
25
|
+
if (targetLocale === 'enUS') {
|
|
26
26
|
return Promise.resolve(`${window.location.origin}/#/webenglish/en-US/component/locales/custom-service`)
|
|
27
27
|
} else {
|
|
28
28
|
return Promise.resolve(`${window.location.origin}/#/zh-CN/component/custom-service`)
|
|
@@ -19,7 +19,8 @@ test('基本用法', async ({ page }) => {
|
|
|
19
19
|
|
|
20
20
|
// 消息提示
|
|
21
21
|
await page.getByRole('button', { name: '消息提示' }).click()
|
|
22
|
-
|
|
22
|
+
const info = page.locator('div')
|
|
23
|
+
await expect(info.filter({ hasText: '简单的消息' }).nth(1)).toHaveText(/简单的/)
|
|
23
24
|
|
|
24
25
|
// 打开弹窗 1
|
|
25
26
|
await page.getByRole('button', { name: '打开弹窗 1' }).click()
|
|
@@ -3,7 +3,7 @@ import { test, expect } from '@playwright/test'
|
|
|
3
3
|
test('消息的关闭和延时', async ({ page }) => {
|
|
4
4
|
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
5
5
|
await page.goto('modal#message-close')
|
|
6
|
-
const content = page.locator('.tiny-modal__text')
|
|
7
6
|
await page.getByRole('button', { name: '消息可关闭' }).click()
|
|
8
|
-
|
|
7
|
+
const info = page.locator('div').filter({ hasText: '自定义消息的内容可关闭,5s 后得自动关闭' })
|
|
8
|
+
await expect(info.nth(1)).toHaveText(/5s 后得自动关闭/)
|
|
9
9
|
})
|
|
@@ -3,7 +3,7 @@ import { test, expect } from '@playwright/test'
|
|
|
3
3
|
test('防止重复消息提示', async ({ page }) => {
|
|
4
4
|
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
5
5
|
await page.goto('modal#message-id')
|
|
6
|
-
const content = page.locator('.tiny-modal__text')
|
|
7
6
|
await page.getByRole('button', { name: '重复点击不出现多个' }).click()
|
|
8
|
-
await
|
|
7
|
+
const info = await page.locator('div').filter({ hasText: '自定义消息具有唯一 id,所以不会重复出现' })
|
|
8
|
+
await expect(info.nth(1)).toHaveText(/唯一 id/)
|
|
9
9
|
})
|
|
@@ -3,13 +3,11 @@ import { test, expect } from '@playwright/test'
|
|
|
3
3
|
test('弹窗的插槽', async ({ page }) => {
|
|
4
4
|
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
5
5
|
await page.goto('modal#modal-fn-slots')
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
await expect(content.nth(
|
|
6
|
+
const demoElement = page.locator('#modal-fn-slots')
|
|
7
|
+
await demoElement.getByRole('button', { name: '打开带插槽弹窗' }).first().click()
|
|
8
|
+
const content = page.locator('div').filter({ hasText: /^使用默认插槽$/ })
|
|
9
|
+
await expect(content.nth(3)).toHaveText(/使用默认插槽/)
|
|
10
|
+
const inner = page.locator('a').filter({ hasText: '记录最近事项' })
|
|
10
11
|
await expect(inner.nth(1)).toHaveText(/记录最近事项/)
|
|
11
12
|
await page.getByRole('button', { name: '取消' }).click()
|
|
12
|
-
await page.getByRole('button', { name: '打开带插槽弹窗' }).nth(1).click()
|
|
13
|
-
await expect(content.nth(1)).toHaveText(/使用默认插槽/)
|
|
14
|
-
await expect(inner).toHaveText(/记录最近事项/)
|
|
15
13
|
})
|
|
@@ -3,10 +3,11 @@ import { test, expect } from '@playwright/test'
|
|
|
3
3
|
test('自定义弹窗标题', async ({ page }) => {
|
|
4
4
|
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
5
5
|
await page.goto('modal#modal-header')
|
|
6
|
+
const demo = page.locator('#modal-header')
|
|
6
7
|
const header = page.locator('.tiny-modal__title')
|
|
7
8
|
|
|
8
9
|
// 自定义弹窗标题
|
|
9
|
-
await
|
|
10
|
+
await demo.getByRole('button', { name: '自定义弹窗标题' }).first().click()
|
|
10
11
|
await expect(header.first()).toHaveText(/自定义弹窗标题/)
|
|
11
12
|
await page.getByRole('button', { name: '确定' }).click()
|
|
12
13
|
})
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<tiny-numeric v-model="value" @input="onInput"></tiny-numeric>
|
|
4
|
+
<div>
|
|
5
|
+
input事件触发了:<span class="count">{{ inputCount }}</span> 次
|
|
6
|
+
</div>
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script setup lang="ts">
|
|
11
|
+
import { ref } from 'vue'
|
|
12
|
+
|
|
13
|
+
import { TinyModal, TinyNumeric } from '@opentiny/vue'
|
|
14
|
+
|
|
15
|
+
const value = ref(1)
|
|
16
|
+
const inputCount = ref(0)
|
|
17
|
+
|
|
18
|
+
const onInput = (event: InputEvent) => {
|
|
19
|
+
const currentValue = (event.target as HTMLInputElement).value
|
|
20
|
+
TinyModal.message({
|
|
21
|
+
message: `新值: ${currentValue}`,
|
|
22
|
+
status: 'info'
|
|
23
|
+
})
|
|
24
|
+
inputCount.value++
|
|
25
|
+
}
|
|
26
|
+
</script>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { expect, test } from '@playwright/test'
|
|
2
|
+
|
|
3
|
+
test('输入事件', async ({ page }) => {
|
|
4
|
+
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
5
|
+
await page.goto('numeric#input-event')
|
|
6
|
+
let count
|
|
7
|
+
|
|
8
|
+
for (let i = 0; i < 5; i++) {
|
|
9
|
+
await page.locator('.tiny-numeric__input-inner').fill(String(Math.random()))
|
|
10
|
+
|
|
11
|
+
count = await page.locator('.count').textContent()
|
|
12
|
+
|
|
13
|
+
expect(Number(count)).toBe(i + 1)
|
|
14
|
+
}
|
|
15
|
+
})
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<tiny-numeric v-model="value" @input="onInput"></tiny-numeric>
|
|
4
|
+
<div>
|
|
5
|
+
input事件触发了:<span class="count">{{ inputCount }}</span> 次
|
|
6
|
+
</div>
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script lang="ts">
|
|
11
|
+
import { TinyModal, TinyNumeric } from '@opentiny/vue'
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
components: {
|
|
15
|
+
TinyNumeric
|
|
16
|
+
},
|
|
17
|
+
data() {
|
|
18
|
+
return {
|
|
19
|
+
value: 1,
|
|
20
|
+
inputCount: 0
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
methods: {
|
|
24
|
+
onInput(event: InputEvent) {
|
|
25
|
+
const currentValue = (event.target as HTMLInputElement).value
|
|
26
|
+
TinyModal.message({
|
|
27
|
+
message: `新值: ${currentValue}`,
|
|
28
|
+
status: 'info'
|
|
29
|
+
})
|
|
30
|
+
this.inputCount++
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
</script>
|
|
@@ -165,6 +165,18 @@ export default {
|
|
|
165
165
|
},
|
|
166
166
|
codeFiles: ['change-event.vue']
|
|
167
167
|
},
|
|
168
|
+
{
|
|
169
|
+
demoId: 'input-event',
|
|
170
|
+
name: {
|
|
171
|
+
'zh-CN': '输入事件',
|
|
172
|
+
'en-US': 'Input Event'
|
|
173
|
+
},
|
|
174
|
+
desc: {
|
|
175
|
+
'zh-CN': '<p>输入时触发<code>input</code>事件。<p>',
|
|
176
|
+
'en-US': '<p>Trigger the <code>input</code> event upon input. </p>'
|
|
177
|
+
},
|
|
178
|
+
codeFiles: ['input-event.vue']
|
|
179
|
+
},
|
|
168
180
|
{
|
|
169
181
|
demoId: 'focus-event',
|
|
170
182
|
name: {
|
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="content">
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
<tiny-pager align="right" :total="100"></tiny-pager>
|
|
3
|
+
<TinyRadioGroup v-model="state.align" type="button" :options="state.options"></TinyRadioGroup>
|
|
4
|
+
<TinyPager :align="state.align" :total="100"></TinyPager>
|
|
6
5
|
</div>
|
|
7
6
|
</template>
|
|
8
7
|
|
|
9
8
|
<script setup>
|
|
10
|
-
import {
|
|
11
|
-
|
|
9
|
+
import { reactive } from 'vue'
|
|
10
|
+
|
|
11
|
+
import { TinyPager, TinyRadioGroup } from '@opentiny/vue'
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
margin-bottom: 10px;
|
|
19
|
-
}
|
|
20
|
-
</style>
|
|
13
|
+
const state = reactive({
|
|
14
|
+
align: 'left',
|
|
15
|
+
options: ['left', 'center', 'right'].map((item) => ({ label: item, text: item }))
|
|
16
|
+
})
|
|
17
|
+
</script>
|
|
@@ -7,7 +7,12 @@ test('对齐方式', async ({ page }) => {
|
|
|
7
7
|
const demo = page.locator('#align')
|
|
8
8
|
const pager = demo.locator('.tiny-pager')
|
|
9
9
|
|
|
10
|
-
await expect(pager
|
|
11
|
-
|
|
12
|
-
await
|
|
10
|
+
await expect(pager).toHaveCSS('text-align', 'left')
|
|
11
|
+
|
|
12
|
+
await page.click('text=center')
|
|
13
|
+
await expect(pager).toHaveCSS('text-align', 'center')
|
|
14
|
+
await page.click('text=right')
|
|
15
|
+
await expect(pager).toHaveCSS('text-align', 'right')
|
|
16
|
+
await page.click('text=left')
|
|
17
|
+
await expect(pager).toHaveCSS('text-align', 'left')
|
|
13
18
|
})
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="content">
|
|
3
|
-
<
|
|
4
|
-
<tiny-pager align="
|
|
5
|
-
<tiny-pager align="right" :total="100"></tiny-pager>
|
|
3
|
+
<TinyRadioGroup v-model="align" type="button" :options="options"></TinyRadioGroup>
|
|
4
|
+
<tiny-pager :align="align" :total="100"></tiny-pager>
|
|
6
5
|
</div>
|
|
7
6
|
</template>
|
|
8
7
|
|
|
9
8
|
<script>
|
|
10
|
-
import { TinyPager } from '@opentiny/vue'
|
|
9
|
+
import { TinyPager, TinyRadioGroup } from '@opentiny/vue'
|
|
11
10
|
|
|
12
11
|
export default {
|
|
13
12
|
components: {
|
|
14
|
-
TinyPager
|
|
13
|
+
TinyPager,
|
|
14
|
+
TinyRadioGroup
|
|
15
|
+
},
|
|
16
|
+
data() {
|
|
17
|
+
return {
|
|
18
|
+
align: 'left',
|
|
19
|
+
options: ['left', 'center', 'right'].map((item) => ({ label: item, text: item }))
|
|
20
|
+
}
|
|
15
21
|
}
|
|
16
22
|
}
|
|
17
23
|
</script>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<tiny-pager mode="number" :page-size="
|
|
2
|
+
<tiny-pager mode="number" :page-size="20" :page-sizes="[10, 20, 50, 100]" :total="100"> </tiny-pager>
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script setup>
|
|
6
|
-
import { TinyPager
|
|
6
|
+
import { TinyPager } from '@opentiny/vue'
|
|
7
7
|
</script>
|
|
@@ -7,7 +7,7 @@ test('每页显示数量', async ({ page }) => {
|
|
|
7
7
|
const preview = page.locator('#page-size')
|
|
8
8
|
const pager = preview.locator('.tiny-pager')
|
|
9
9
|
const total = 100
|
|
10
|
-
const initPageSize =
|
|
10
|
+
const initPageSize = 20
|
|
11
11
|
const getPageCount = (pageSize: number) => String(Math.ceil(total / pageSize))
|
|
12
12
|
const sizeChange = pager.locator('.tiny-pager__page-size')
|
|
13
13
|
const sizeSelect = page.locator('.tiny-pager__selector')
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<tiny-pager mode="number" :page-size="
|
|
2
|
+
<tiny-pager mode="number" :page-size="20" :page-sizes="[10, 20, 50, 100]" :total="100"> </tiny-pager>
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script>
|
|
6
|
-
import { TinyPager
|
|
6
|
+
import { TinyPager } from '@opentiny/vue'
|
|
7
7
|
|
|
8
8
|
export default {
|
|
9
9
|
components: {
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<tiny-pager
|
|
3
|
-
:popper-append-to-body="false"
|
|
4
|
-
layout="sizes,prev, pager, next"
|
|
5
|
-
:page-size="5"
|
|
6
|
-
:page-sizes="[5, 10, 20, 30, 40, 50, 100]"
|
|
7
|
-
:total="50"
|
|
8
|
-
></tiny-pager>
|
|
2
|
+
<tiny-pager :popper-append-to-body="false" layout="sizes,prev, pager, next" :total="50"></tiny-pager>
|
|
9
3
|
</template>
|
|
10
4
|
|
|
11
5
|
<script setup>
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<tiny-pager
|
|
3
|
-
:popper-append-to-body="false"
|
|
4
|
-
layout="sizes,prev, pager, next"
|
|
5
|
-
:page-size="5"
|
|
6
|
-
:page-sizes="[5, 10, 20, 30, 40, 50, 100]"
|
|
7
|
-
:total="50"
|
|
8
|
-
></tiny-pager>
|
|
2
|
+
<tiny-pager :popper-append-to-body="false" layout="sizes,prev, pager, next" :total="50"></tiny-pager>
|
|
9
3
|
</template>
|
|
10
4
|
|
|
11
5
|
<script>
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<tiny-pager
|
|
3
|
-
popper-class="custom-pager"
|
|
4
|
-
layout="sizes,prev, pager, next"
|
|
5
|
-
:page-size="5"
|
|
6
|
-
:page-sizes="[5, 10, 20, 30, 40, 50, 100]"
|
|
7
|
-
:total="50"
|
|
8
|
-
></tiny-pager>
|
|
2
|
+
<tiny-pager popper-class="custom-pager" layout="sizes,prev, pager, next" :total="50"></tiny-pager>
|
|
9
3
|
</template>
|
|
10
4
|
|
|
11
5
|
<script setup>
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<tiny-pager
|
|
3
|
-
popper-class="custom-pager"
|
|
4
|
-
layout="sizes,prev, pager, next"
|
|
5
|
-
:page-size="5"
|
|
6
|
-
:page-sizes="[5, 10, 20, 30, 40, 50, 100]"
|
|
7
|
-
:total="50"
|
|
8
|
-
></tiny-pager>
|
|
2
|
+
<tiny-pager popper-class="custom-pager" layout="sizes,prev, pager, next" :total="50"></tiny-pager>
|
|
9
3
|
</template>
|
|
10
4
|
|
|
11
5
|
<script>
|
|
@@ -21,5 +21,5 @@ test('PopEditor 自定义查询条件', async ({ page }) => {
|
|
|
21
21
|
await company.fill('')
|
|
22
22
|
await city.fill('福州')
|
|
23
23
|
await searchBtn.press('Enter')
|
|
24
|
-
await expect(dialogBox.locator('.tiny-grid-body__row')).toHaveCount(1)
|
|
24
|
+
await expect(dialogBox.locator('.tiny-grid-body__row:visible')).toHaveCount(1)
|
|
25
25
|
})
|
|
@@ -1,16 +1,30 @@
|
|
|
1
1
|
<template>
|
|
2
|
+
<div class="qr-code-attr">
|
|
3
|
+
iconSize:
|
|
4
|
+
<tiny-numeric v-model="params.iconSize" :min="1" :max="params.size * 0.3" />
|
|
5
|
+
size: <tiny-numeric v-model="params.size" :min="1" :max="1e4" />
|
|
6
|
+
</div>
|
|
2
7
|
<tiny-qr-code v-bind="params"></tiny-qr-code>
|
|
3
8
|
</template>
|
|
4
9
|
|
|
5
10
|
<script setup>
|
|
6
|
-
import {
|
|
11
|
+
import { reactive } from 'vue'
|
|
12
|
+
import { TinyNumeric, TinyQrCode } from '@opentiny/vue'
|
|
7
13
|
|
|
8
|
-
const params = {
|
|
14
|
+
const params = reactive({
|
|
9
15
|
value: '测试二维码数据',
|
|
10
16
|
icon: import.meta.env.VITE_APP_BUILD_BASE_URL
|
|
11
17
|
? `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/mountain.png`
|
|
12
18
|
: 'https://res.hc-cdn.com/tinyui-design-common/1.0.5.20230707170109/assets/tinyvue.svg',
|
|
13
19
|
iconSize: 60,
|
|
14
20
|
size: 250
|
|
15
|
-
}
|
|
21
|
+
})
|
|
16
22
|
</script>
|
|
23
|
+
|
|
24
|
+
<style scoped>
|
|
25
|
+
.qr-code-attr {
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
gap: 20px;
|
|
29
|
+
}
|
|
30
|
+
</style>
|
|
@@ -8,4 +8,23 @@ test('自定义 icon', async ({ page }) => {
|
|
|
8
8
|
const canvasImg = page.locator('.tiny-qr-code .mask-icon img')
|
|
9
9
|
await expect(canvas).toBeVisible()
|
|
10
10
|
await expect(canvasImg).toBeVisible()
|
|
11
|
+
|
|
12
|
+
await page.getByLabel('示例', { exact: true }).getByRole('button').nth(1).click()
|
|
13
|
+
const iconSize = await canvasImg.evaluate((el) => {
|
|
14
|
+
return window.getComputedStyle(el)
|
|
15
|
+
})
|
|
16
|
+
const inputIconSizeWidth = await page.getByRole('spinbutton').first().inputValue()
|
|
17
|
+
|
|
18
|
+
expect(iconSize.width === `${inputIconSizeWidth}px`).toBe(true)
|
|
19
|
+
expect(iconSize.height === `${inputIconSizeWidth}px`).toBe(true)
|
|
20
|
+
await page.getByLabel('示例', { exact: true }).getByRole('button').nth(3).click()
|
|
21
|
+
const [qrWidth, qrHeight] = await page.locator('.tiny-qr-code').evaluate((el) => {
|
|
22
|
+
const style = window.getComputedStyle(el)
|
|
23
|
+
return [style.width, style.height]
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
const inputSizeWidth = await page.getByRole('spinbutton').nth(1).inputValue()
|
|
27
|
+
|
|
28
|
+
expect(qrWidth === `${inputSizeWidth}px`).toBe(true)
|
|
29
|
+
expect(qrHeight === `${inputSizeWidth}px`).toBe(true)
|
|
11
30
|
})
|
|
@@ -1,25 +1,46 @@
|
|
|
1
1
|
<template>
|
|
2
|
+
<div class="qr-code-attr">
|
|
3
|
+
iconSize:
|
|
4
|
+
<tiny-numeric v-model="iconSize" :min="1" :max="size * 0.3" />
|
|
5
|
+
size: <tiny-numeric v-model="size" :min="1" :max="1e4" />
|
|
6
|
+
</div>
|
|
7
|
+
|
|
2
8
|
<tiny-qr-code v-bind="params"></tiny-qr-code>
|
|
3
9
|
</template>
|
|
4
10
|
|
|
5
11
|
<script>
|
|
6
|
-
import { TinyQrCode } from '@opentiny/vue'
|
|
12
|
+
import { TinyNumeric, TinyQrCode } from '@opentiny/vue'
|
|
7
13
|
|
|
8
14
|
export default {
|
|
9
15
|
components: {
|
|
16
|
+
TinyNumeric,
|
|
10
17
|
TinyQrCode
|
|
11
18
|
},
|
|
12
19
|
data() {
|
|
13
20
|
return {
|
|
14
|
-
|
|
21
|
+
size: 250,
|
|
22
|
+
iconSize: 60
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
computed: {
|
|
26
|
+
params() {
|
|
27
|
+
return {
|
|
15
28
|
value: '测试二维码数据',
|
|
16
29
|
icon: import.meta.env.VITE_APP_BUILD_BASE_URL
|
|
17
30
|
? `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/mountain.png`
|
|
18
31
|
: 'https://res.hc-cdn.com/tinyui-design-common/1.0.5.20230707170109/assets/tinyvue.svg',
|
|
19
|
-
iconSize:
|
|
20
|
-
size:
|
|
32
|
+
iconSize: this.iconSize,
|
|
33
|
+
size: this.size
|
|
21
34
|
}
|
|
22
35
|
}
|
|
23
36
|
}
|
|
24
37
|
}
|
|
25
38
|
</script>
|
|
39
|
+
|
|
40
|
+
<style scoped>
|
|
41
|
+
.qr-code-attr {
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
gap: 20px;
|
|
45
|
+
}
|
|
46
|
+
</style>
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="qr-code-container">
|
|
3
|
-
<
|
|
4
|
-
<tiny-button @click="changeColor">改变颜色</tiny-button>
|
|
5
|
-
</div>
|
|
6
|
-
<br />
|
|
3
|
+
<tiny-color-picker v-model="params.color" />
|
|
7
4
|
<tiny-qr-code v-bind="params"></tiny-qr-code>
|
|
8
5
|
</div>
|
|
9
6
|
</template>
|
|
10
7
|
|
|
11
8
|
<script setup>
|
|
12
|
-
import { TinyQrCode,
|
|
9
|
+
import { TinyQrCode, TinyColorPicker } from '@opentiny/vue'
|
|
13
10
|
import { ref } from 'vue'
|
|
14
11
|
|
|
15
12
|
const params = ref({
|
|
@@ -18,8 +15,4 @@ const params = ref({
|
|
|
18
15
|
size: 250,
|
|
19
16
|
style: { background: '#f5f5f5', padding: '24px' }
|
|
20
17
|
})
|
|
21
|
-
|
|
22
|
-
const changeColor = () => {
|
|
23
|
-
params.value.color = '#666'
|
|
24
|
-
}
|
|
25
18
|
</script>
|
|
@@ -4,6 +4,23 @@ test('自定义样式', async ({ page }) => {
|
|
|
4
4
|
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
5
5
|
await page.goto('qr-code#style')
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const demo = page.locator('#style')
|
|
8
|
+
const wrapper = demo.locator('.tiny-qr-code')
|
|
9
|
+
const canvas = demo.locator('.tiny-qr-code canvas')
|
|
8
10
|
await expect(canvas).toBeVisible()
|
|
11
|
+
|
|
12
|
+
const backgroundColor0 = await canvas.evaluate(
|
|
13
|
+
(el: any, { x, y }) => {
|
|
14
|
+
const ctx = el.getContext('2d')
|
|
15
|
+
const pixel = ctx.getImageData(x, y, 1, 1).data
|
|
16
|
+
const toHex = (num: number) => num.toString(16).padStart(2, '0')
|
|
17
|
+
return `#${toHex(pixel[0])}${toHex(pixel[1])}${toHex(pixel[2])}`
|
|
18
|
+
},
|
|
19
|
+
{ x: 1, y: 1 }
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
expect(backgroundColor0 === '#1677ff').toBeTruthy()
|
|
23
|
+
|
|
24
|
+
const box = await wrapper.boundingBox()
|
|
25
|
+
expect(box?.width).toEqual(250)
|
|
9
26
|
})
|
|
@@ -1,26 +1,29 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="qr-code-container">
|
|
3
|
-
<div>
|
|
4
|
-
|
|
5
|
-
</div>
|
|
6
|
-
<br />
|
|
3
|
+
<div>改变颜色<tiny-color-picker v-model="color" /></div>
|
|
4
|
+
|
|
7
5
|
<tiny-qr-code v-bind="params"></tiny-qr-code>
|
|
8
6
|
</div>
|
|
9
7
|
</template>
|
|
10
8
|
|
|
11
9
|
<script>
|
|
12
|
-
import { TinyQrCode,
|
|
10
|
+
import { TinyQrCode, TinyColorPicker } from '@opentiny/vue'
|
|
13
11
|
|
|
14
12
|
export default {
|
|
15
13
|
components: {
|
|
16
14
|
TinyQrCode,
|
|
17
|
-
|
|
15
|
+
TinyColorPicker
|
|
18
16
|
},
|
|
19
17
|
data() {
|
|
20
18
|
return {
|
|
21
|
-
|
|
19
|
+
color: '#1677ff'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
computed: {
|
|
23
|
+
params() {
|
|
24
|
+
return {
|
|
22
25
|
value: '测试二维码数据',
|
|
23
|
-
color:
|
|
26
|
+
color: this.color,
|
|
24
27
|
size: 250,
|
|
25
28
|
style: { background: '#f5f5f5', padding: '24px' }
|
|
26
29
|
}
|
|
@@ -9,8 +9,10 @@ export default {
|
|
|
9
9
|
'en-US': 'Basic Usage'
|
|
10
10
|
},
|
|
11
11
|
desc: {
|
|
12
|
-
'zh-CN':
|
|
13
|
-
|
|
12
|
+
'zh-CN': `
|
|
13
|
+
<div class="tip custom-block">
|
|
14
|
+
<p class=\"custom-block-title\"> config 属性说明 </p>
|
|
15
|
+
<code>autoSelectField</code>:范围域是否会默认选择,勾选则默认为第一个选项;反之则默认为----- \n <code>autoSelectOperator</code>:运算符是否会默认选择,勾选则默认选择第一个选项,反之则默认为----- \n <code>disabled</code>:禁用所有规则 \n <code>parsenumbers</code>:数字会被转化为 Number 类型,而非 String 类型 \n <code>showCloneButtons</code>:展示复制按钮,即整条规则可以被复制 \n <code>showCombinatorsBetweenRules</code>:组合子数组统一修改,且不再展示在连线上,以下拉选择形式出现 \n <code>showLockButtons</code>:展示锁定按钮,即整条规则可以被锁定 \n <code>showNotToggle</code>:展示 not 条件切换框 \n <code>displayOnlyField</code>:是否仅展示字段选择器 \n </div> \n 二、fields 数据配置 \n <pre> <code>\n fields 中的数据(只用于说明各字段含义,无业务特定性) \n { \n name: 'isMusician', //name:格式化数据中的值(形参) \n label: 'Is a musician', //label:范围域在规则生成器中对外展示名称 \n valueEditorType: 'checkbox', //placeholder:值域的默认缺省值 \n operators: [ //运算符自定义,name 为格式化数据中的值,label 为范围域对外展示的名称 \n { \n name: '=', \n label: '=' \n } \n ], \n bindProps: { // 通过 bindProps 参数可对某一类组件进行参数控制 \n input:{ \n clearable:true \n }, \n select:{ \n filterable:true \n } \n }, \n defaultValue: false, //defaultOperator:运算符的默认缺省选择 \n validator: (r) => !!r.value //validator:校验规则(该功能点还在迭代开发中……) \n inputType: 'number', //值域的数值类型 \n valueEditorType: 'radio' //值域编辑器的类型 \n defaultValue: false, //值域的默认值 \n values: [ //值域的可选域配置(下拉) \n { \n label: 'Percussion instruments', \n options: [ \n { \n name: 'Clapstick', \n label: 'Clapstick' \n } \n ] \n } \n ], \n values: [ //值域的可选域配置(单选) \n { \n name: 'M', \n label: 'Male' \n }, \n { \n name: 'F', \n label: 'Female' \n }, \n { \n name: 'O', \n label: 'Other' \n } \n ], \n valueSources: ['field', 'value'], //值域类型可选择 \n comparator: 'groupNumber', //分组时的比较器 \n groupNumber: 'group1', //分组的组别 \n }, \n // 组合子数组配置,label 为展示字符,name 为数据值 \n combinators: [ \n { \n name: 'and', \n label: '且' \n }, \n { \n name: 'or', \n label: '或' \n } \n ] \n </code></pre> <br>`,
|
|
14
16
|
'en-US': ''
|
|
15
17
|
},
|
|
16
18
|
codeFiles: ['basic-usage.vue']
|
|
@@ -60,7 +62,7 @@ export default {
|
|
|
60
62
|
},
|
|
61
63
|
desc: {
|
|
62
64
|
'zh-CN':
|
|
63
|
-
'config 配置添加 bindProps 属性可控制某一类组件的参数,中间操作符类组件暂不支持传参,具体配置见以下说明:
|
|
65
|
+
'config 配置添加 bindProps 属性可控制某一类组件的参数,中间操作符类组件暂不支持传参,具体配置见以下说明: \n<div class="tip custom-block">\n<p class="custom-block-title"> bindProps 属性说明 </p>\nleftSelect:左侧 Select 参数,统一控制左侧所有 Select \nselect:右侧 Select 参数 \ninput:输入框参数,包括 textarea \nnumeric:计数器 \ndate:日期选择器 \ntime:时间选择器 \nradio:单选框 \ncheckbox:多选框 \n</div> \n',
|
|
64
66
|
'en-US': ' '
|
|
65
67
|
},
|
|
66
68
|
codeFiles: ['sub-component-param.vue']
|