diff --git a/.github/workflows/typos-config.toml b/.github/workflows/typos-config.toml index 97d4ad00c3..34b738b551 100644 --- a/.github/workflows/typos-config.toml +++ b/.github/workflows/typos-config.toml @@ -4,3 +4,4 @@ formated = "formated" formate = "formate" Colum = "Colum" ba = "ba" +ded = "ded" \ No newline at end of file diff --git a/examples/breadcrumbItem/breadcrumbItem.md b/examples/breadcrumbItem/breadcrumbItem.md deleted file mode 100644 index cd2974f3fb..0000000000 --- a/examples/breadcrumbItem/breadcrumbItem.md +++ /dev/null @@ -1,12 +0,0 @@ -## BreadcrumbItem - -::: demo demos/base 默认 -::: - -### 属性配置 - -| 属性 | 类型 | 默认值 | 必传 | 说明 | -|-----|-----|-----|-----|-----| -|to|object|无|否|路由跳转对象,同 vue-router 的 to| -|replace|boolean|false|否|在使用 to 进行路由跳转时,启用 replace 将不会向 history 添加新记录| -|overlay|list|无|否|下拉框内容| diff --git a/examples/breadcrumbItem/demos/base.vue b/examples/breadcrumbItem/demos/base.vue deleted file mode 100644 index c16d0ff5bf..0000000000 --- a/examples/breadcrumbItem/demos/base.vue +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/examples/breadcrumbItem/demos/overlay.vue b/examples/breadcrumbItem/demos/overlay.vue deleted file mode 100644 index c16d0ff5bf..0000000000 --- a/examples/breadcrumbItem/demos/overlay.vue +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/examples/breadcrumbItem/usage/index.vue b/examples/breadcrumbItem/usage/index.vue deleted file mode 100644 index 6b537675a3..0000000000 --- a/examples/breadcrumbItem/usage/index.vue +++ /dev/null @@ -1,18 +0,0 @@ - - - diff --git a/examples/breadcrumbItem/usage/props.json b/examples/breadcrumbItem/usage/props.json deleted file mode 100644 index 439b455c3b..0000000000 --- a/examples/breadcrumbItem/usage/props.json +++ /dev/null @@ -1,118 +0,0 @@ -[ - { - "name": "block", - "type": "Boolean", - "defaultValue": false, - "options": [] - }, - { - "name": "disabled", - "type": "Boolean", - "defaultValue": false, - "options": [] - }, - { - "name": "ghost", - "type": "Boolean", - "defaultValue": false, - "options": [] - }, - { - "name": "loading", - "type": "Boolean", - "defaultValue": false, - "options": [] - }, - { - "name": "shape", - "type": "enum", - "defaultValue": "rectangle", - "options": [ - { - "label": "rectangle", - "value": "rectangle" - }, - { - "label": "square", - "value": "square" - }, - { - "label": "round", - "value": "round" - }, - { - "label": "circle", - "value": "circle" - } - ] - }, - { - "name": "size", - "type": "enum", - "defaultValue": "medium", - "options": [ - { - "label": "small", - "value": "small" - }, - { - "label": "medium", - "value": "medium" - }, - { - "label": "large", - "value": "large" - } - ] - }, - { - "name": "theme", - "type": "enum", - "defaultValue": "default", - "options": [ - { - "label": "default", - "value": "default" - }, - { - "label": "primary", - "value": "primary" - }, - { - "label": "danger", - "value": "danger" - }, - { - "label": "warning", - "value": "warning" - }, - { - "label": "success", - "value": "success" - } - ] - }, - { - "name": "variant", - "type": "enum", - "defaultValue": "base", - "options": [ - { - "label": "base", - "value": "base" - }, - { - "label": "outline", - "value": "outline" - }, - { - "label": "dashed", - "value": "dashed" - }, - { - "label": "text", - "value": "text" - } - ] - } -] \ No newline at end of file diff --git a/examples/select/demos/custom-options.vue b/examples/select/demos/custom-options.vue index 08aff57bc7..9698522f66 100644 --- a/examples/select/demos/custom-options.vue +++ b/examples/select/demos/custom-options.vue @@ -42,8 +42,8 @@ const options = [ { label: '用户九', value: '9', description: '这是一段用户描述信息,可自定义内容' }, ]; -const value1 = ref([]); -const value2 = ref([]); +const value1 = ref(''); +const value2 = ref(''); const optionRender = (h, option) => (
diff --git a/package.json b/package.json index 41aadd7249..1ce66d9340 100644 --- a/package.json +++ b/package.json @@ -54,15 +54,13 @@ "lint:fix": "eslint --ext .vue,.js,.ts,.tsx ./src --max-warnings 0 --fix", "lint": "npm run lint:tsc && eslint --ext .vue,.js,.ts,.tsx ./src --max-warnings 0", "lint:tsc": "tsc --emitDeclarationOnly", - "test": "npm run test:demo && npm run test:unit && npm run test:node", - "test:demo": "node src/_common/test/script/generate-demo-test.js", - "test:update": "npm run test:demo && npm run test:unit-update && npm run test:node-update", - "test:unit": "jest --maxWorkers=4 --config script/test/jest.unit.conf.js", - "test:unit-update": "jest --maxWorkers=4 --config script/test/jest.unit.conf.js --updateSnapshot", - "test:node": "jest --config script/test/jest.ssr.conf.js", - "test:node-update": "jest --config script/test/jest.ssr.conf.js --updateSnapshot", - "test:watch": "jest --config script/test/jest.unit.conf.js --watch", - "test:coverage": "jest --config script/test/jest.unit.conf.js --coverage", + "test": "npm run test:unit && npm run test:snap", + "test:unit": "vitest run --config site/vite.config.js", + "test:update": "vitest run --config site/vite.config.js -u && cross-env NODE_ENV=test-snap vitest run --config site/vite.config.js -u", + "test:unit-dev": "vitest --config site/vite.config.js", + "test:unit-gui": "vitest --config site/vite.config.js --ui", + "test:unit-coverage": "vitest run --config site/vite.config.js --coverage", + "test:snap": "cross-env NODE_ENV=test-snap vitest run --config site/vite.config.js", "test:e2e": "cypress run --config-file script/test/cypress.json", "test:e2e-gui": "cypress open --config-file script/test/cypress.json", "changelog": "node script/generate-changelog.js", @@ -75,9 +73,9 @@ "@babel/runtime": "^7.14.8", "@popperjs/core": "^2.9.3", "@types/lodash": "^4.14.175", + "@types/sortablejs": "^1.10.7", "@types/tinycolor2": "^1.4.3", "@types/validator": "^13.6.3", - "@types/sortablejs": "^1.10.7", "dayjs": "^1.9.7", "jsx-to-string": "^1.4.0", "lodash": "^4.17.15", @@ -107,15 +105,16 @@ "@types/raf": "^3.4.0", "@typescript-eslint/eslint-plugin": "^4.23.0", "@typescript-eslint/parser": "^4.23.0", - "@vitejs/plugin-vue": "^2.0.1", + "@vitejs/plugin-vue": "^2.3.1", "@vitejs/plugin-vue-jsx": "^1.3.3", + "@vitest/ui": "^0.9.4", "@vue/compiler-sfc": "^3.2.26", "@vue/eslint-config-typescript": "^10.0.0", "@vue/server-renderer": "^3.2.4", - "@vue/test-utils": "^2.0.0-rc.12", + "@vue/test-utils": "^2.0.0-rc.21", "autoprefixer": "^10.4.0", "babel-eslint": "^10.1.0", - "babel-jest": "^26.0.0", + "c8": "^7.11.2", "camelcase": "^6.2.1", "cli-color": "^2.0.1", "clipboard": "^2.0.6", @@ -134,11 +133,7 @@ "gray-matter": "^4.0.3", "husky": "^7.0.4", "ignore": "^5.1.9", - "jest": "^26.6.3", - "jest-html-reporter": "^3.1.3", - "jest-serializer-vue": "^2.0.2", - "jest-transform-stub": "^2.0.0", - "jest-watch-typeahead": "^0.6.0", + "jsdom": "^19.0.0", "less": "^4.1.2", "lint-staged": "^12.1.2", "mockdate": "^3.0.5", @@ -162,13 +157,13 @@ "tdesign-icons-view": "0.1.0", "tdesign-publish-cli": "^0.0.9", "tdesign-site-components": "^0.9.9", - "ts-jest": "^26.0.0", "typescript": "^4.5.4", - "vite": "^2.7.7", + "vite": "^2.9.5", "vite-plugin-pwa": "^0.12.0", "vite-plugin-tdoc": "^2.0.2", + "vitest": "^0.9.4", + "vitest-fetch-mock": "^0.1.0", "vue": "^3.2.26", - "vue-jest": "^5.0.0-alpha.7", "vue-router": "^4.0.12", "vue-tsc": "^0.34.11", "workbox-precaching": "^6.4.1" diff --git a/script/init/config.js b/script/init/config.js index 4ae6b2c1b7..02bf892165 100644 --- a/script/init/config.js +++ b/script/init/config.js @@ -52,17 +52,6 @@ function getToBeCreatedFiles(component) { desc: 'e2e test', files: [`${component}.spec.js`], }, - // ['test/ssr']: { - // // no delete the whole folder, just delete these files in 'deleteFiles'. - // deleteFiles: [`test/ssr/${component}.test.js`], - // desc: 'ssr test', - // files: [ - // { - // file: `${component}.test.js`, - // template: 'ssr.demo.test.tpl', - // }, - // ], - // }, }; } diff --git a/script/test/jest.base.conf.js b/script/test/jest.base.conf.js deleted file mode 100644 index f4e9754829..0000000000 --- a/script/test/jest.base.conf.js +++ /dev/null @@ -1,45 +0,0 @@ -const path = require('path'); - -// To have consistent date time parsing both in local and CI environments we set -// the timezone of the Node process. -process.env.TZ = 'Asia/Shanghai'; - -module.exports = { - verbose: true, - rootDir: path.resolve(__dirname, '../../'), - testURL: 'http://localhost/', - moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx', 'vue', 'json'], - moduleNameMapper: { - '^@/(.*)$': '/$1', - '^tdesign-vue-next/es/(.*)': '/src/$1', - '^tdesign-vue-next(.*)': '/src/$1', - '^vue$': '/node_modules/vue/index.js', - }, - modulePathIgnorePatterns: ['/test/unit/coverage/'], - transform: { - '.*\\.js$': 'babel-jest', - '.*\\.(vue)$': 'vue-jest', - '.*\\.tsx?$': 'ts-jest', - '.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub', - }, - testRegex: '.*\\.test\\.js$', - testPathIgnorePatterns: ['/node_modules/', '.history'], - setupFiles: ['/script/test/setup.js'], - globals: { - 'ts-jest': { - tsconfig: '/tsconfig.json', - babelConfig: true, - }, - }, - reporters: [ - 'default', - [ - './node_modules/jest-html-reporter', - { - pageTitle: 'TDesign Test Report', - }, - ], - ], - snapshotSerializers: ['jest-serializer-vue'], - watchPlugins: ['jest-watch-typeahead/filename', 'jest-watch-typeahead/testname'], -}; diff --git a/script/test/jest.ssr.conf.js b/script/test/jest.ssr.conf.js deleted file mode 100644 index 44bcec6e09..0000000000 --- a/script/test/jest.ssr.conf.js +++ /dev/null @@ -1,7 +0,0 @@ -const baseConfig = require('./jest.base.conf.js'); - -module.exports = { - ...baseConfig, - testEnvironment: 'jsdom', - testRegex: 'ssr/.*\\.test\\.js$', -}; diff --git a/script/test/jest.unit.conf.js b/script/test/jest.unit.conf.js deleted file mode 100644 index 61d236b519..0000000000 --- a/script/test/jest.unit.conf.js +++ /dev/null @@ -1,12 +0,0 @@ -const baseConfig = require('./jest.base.conf.js'); - -module.exports = { - ...baseConfig, - testEnvironment: 'jsdom', - testRegex: 'unit/.*\\.test\\.js$', - // close coverage by default - collectCoverage: true, - coverageDirectory: '/test/unit/coverage', - collectCoverageFrom: ['src/**/*.{ts,tsx,js,vue}', '!**/node_modules/**'], - coverageReporters: ['html', 'text-summary', 'cobertura'], -}; diff --git a/script/test/setup.js b/script/test/test-setup.js similarity index 66% rename from script/test/setup.js rename to script/test/test-setup.js index 5c1c116ac7..4ea20d06f7 100644 --- a/script/test/setup.js +++ b/script/test/test-setup.js @@ -1,14 +1,18 @@ import { config } from '@vue/test-utils'; import { createApp } from 'vue'; import { renderToString } from '@vue/server-renderer'; +import createFetchMock from 'vitest-fetch-mock'; +import { vi } from 'vitest'; import TDesign from '@/src/index'; +const fetchMock = createFetchMock(vi); +fetchMock.enableMocks(); + config.global.plugins = [TDesign]; config.global.createSSRApp = (comp) => { const app = createApp(comp); app.config.globalProperties.$route = {}; app.use(TDesign); - const html = renderToString(app); - return html; + return renderToString(app); }; diff --git a/site/vite.config.js b/site/vite.config.js index 751120aece..f86b3f40ae 100644 --- a/site/vite.config.js +++ b/site/vite.config.js @@ -13,12 +13,31 @@ const publicPathMap = { production: 'https://static.tdesign.tencent.com/vue-next/', }; +// 单元测试相关配置 +const testConfig = { + include: + process.env.NODE_ENV === 'test-snap' + ? ['test/snap/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'] + : ['test/unit/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'], + globals: true, + environment: 'jsdom', + testTimeout: 5000, + setupFiles: process.env.NODE_ENV === 'test-snap' ? path.resolve(__dirname, '../script/test/test-setup.js') : '', + transformMode: { + web: [/\.[jt]sx$/], + }, + coverage: { + reporter: ['text', 'json', 'html'], + }, +}; + export default ({ mode }) => { return defineConfig({ base: publicPathMap[mode], resolve: { alias: { '@': path.resolve(__dirname, '../'), + '@/src': path.resolve(__dirname, '../src/'), '@common': path.resolve(__dirname, '../src/_common'), 'tdesign-vue-next/es': path.resolve(__dirname, '../src'), 'tdesign-vue-next': path.resolve(__dirname, '../src'), @@ -38,6 +57,7 @@ export default ({ mode }) => { }, plugins: [ vue({ + ssr: false, template: { compilerOptions: { isCustomElement: (tag) => tag.startsWith('td-'), @@ -50,5 +70,6 @@ export default ({ mode }) => { tDocPlugin(), VitePWA(pwaConfig), ], + test: testConfig, }); }; diff --git a/src/table/hooks/useFixed.ts b/src/table/hooks/useFixed.ts index 35656031e3..3c71a5ab98 100644 --- a/src/table/hooks/useFixed.ts +++ b/src/table/hooks/useFixed.ts @@ -247,12 +247,13 @@ export default function useFixed(props: TdBaseTableProps, context: SetupContext) const updateRowAndColFixedPosition = (tableContentElm: HTMLElement, initialColumnMap: RowAndColFixedPosition) => { rowAndColFixedPosition.value.clear(); - const thead = tableContentElm.querySelector('thead'); + // TODO,SSR 标记处理 + const thead = tableContentElm?.querySelector('thead'); // 处理固定列 thead && setFixedColPosition(thead.children, initialColumnMap); // 处理冻结行 - const tbody = tableContentElm.querySelector('tbody'); - const tfoot = tableContentElm.querySelector('tfoot'); + const tbody = tableContentElm?.querySelector('tbody'); + const tfoot = tableContentElm?.querySelector('tfoot'); tbody && setFixedRowPosition(tbody.children, initialColumnMap, thead, tfoot); // 更新最终 Map rowAndColFixedPosition.value = initialColumnMap; @@ -260,6 +261,7 @@ export default function useFixed(props: TdBaseTableProps, context: SetupContext) const updateColumnFixedShadow = (target: HTMLElement) => { if (!isFixedColumn.value) return; + if (!target) return; const isShowRight = target.clientWidth + target.scrollLeft < target.scrollWidth; showColumnShadow.left = target.scrollLeft > 0; showColumnShadow.right = isShowRight; @@ -354,7 +356,8 @@ export default function useFixed(props: TdBaseTableProps, context: SetupContext) }; const updateTableWidth = () => { - const rect = tableContentRef.value.getBoundingClientRect(); + const rect = tableContentRef.value?.getBoundingClientRect(); + if (!rect) return; // 存在纵向滚动条,且固定表头时,需去除滚动条宽度 const reduceWidth = isFixedHeader.value ? scrollbarWidth.value : 0; const fixedBordered = isFixedRightColumn.value ? 1 : 2; @@ -383,7 +386,8 @@ export default function useFixed(props: TdBaseTableProps, context: SetupContext) if (notNeedThWidthList.value) return; const timer = setTimeout(() => { updateTableWidth(); - const thead = tableContentRef.value.querySelector('thead'); + const thead = tableContentRef.value?.querySelector('thead'); + if (!thead) return; updateThWidthList(thead.children); clearTimeout(timer); }, 0); diff --git a/src/transfer/components/transfer-list.tsx b/src/transfer/components/transfer-list.tsx index 5fdc91cb61..ef6ba8fff7 100644 --- a/src/transfer/components/transfer-list.tsx +++ b/src/transfer/components/transfer-list.tsx @@ -8,7 +8,7 @@ import { TransferListType, TransferItemOption, } from '../interface'; -import { PageInfo, TdPaginationProps } from '../../pagination'; +import { PageInfo, TdPaginationProps, Pagination } from '../../pagination'; import { Checkbox as TCheckbox, CheckboxGroup as TCheckboxGroup, CheckboxProps } from '../../checkbox'; import { getLeefCount, getDataValues } from '../utils'; import Search from './transfer-search'; @@ -282,7 +282,7 @@ export default defineComponent({
{props.pagination && pageSize.value > 0 && pageTotal.value > 0 && (
- +
)} {renderFooter()} diff --git a/src/utils/dom.ts b/src/utils/dom.ts index 73c3a1cdae..218ff73c1e 100644 --- a/src/utils/dom.ts +++ b/src/utils/dom.ts @@ -188,8 +188,8 @@ export function scrollTo(target: number, opt: ScrollTopOptions): Promise csr test ./examples/affix/demos/base.vue 1`] = ` +
+
+ + + +
+
+`; + +exports[`csr snapshot test > csr test ./examples/affix/demos/container.vue 1`] = ` +
+
+
+
+ + + +
+
+
+
+`; + +exports[`csr snapshot test > csr test ./examples/alert/demos/base.vue 1`] = ` +
+
+
+ + + +
+
+ +
+
+ 这是一条成功的消息提示 + +
+ +
+
+ +
+
+
+ + + +
+
+ +
+
+
+ 这是一条普通的消息提示 +
+ +
+ +
+
+ +
+
+
+ + + +
+
+ +
+
+ + 这是一条警示信息 + + +
+ +
+
+ +
+
+
+ + + +
+
+ +
+
+ + 高危操作/出错信息提示 + + +
+ +
+
+ +
+
+`; + +exports[`csr snapshot test > csr test ./examples/alert/demos/close.vue 1`] = ` +
+
+
+ + + +
+
+ +
+
+ 这是一条成功的消息提示 + +
+ +
+
+
+ + + +
+
+
+
+ + + +
+
+ +
+
+ 这是一条普通的消息提示 + +
+ +
+
+
+ 知道了 +
+
+
+
+ + + +
+
+ +
+
+ 这是一条警示信息 + +
+ +
+
+
+ FunctionPropClose +
+
+
+
+ + + +
+
+ +
+
+ 高危操作/出错信息提示 + +
+ +
+
+
+ Slot Close +
+
+
+`; + +exports[`csr snapshot test > csr test ./examples/alert/demos/collapse.vue 1`] = ` +
+
+
+ + + +
+
+ +
+
+ +
+ + 这是折叠的第一条消息 + +
+
+ + 这是折叠的第二条消息 + +
+ +
+ 展开更多 +
+
+ +
+
+
+ + + +
+
+
+`; + +exports[`csr snapshot test > csr test ./examples/alert/demos/icon.vue 1`] = ` +
+
+
+ + + +
+
+ +
+
+ 这是一条成功的消息提示 + +
+ +
+
+ +
+
+
+ + + +
+
+ +
+
+ 这是一条普通的消息提示 + +
+ +
+
+ +
+
+
+ + + +
+
+ +
+
+ 这是一条警示消息提示 + +
+ +
+
+ +
+
+
+ + + +
+
+ +
+
+ 高危操作/出错信息提示 + +
+ +
+
+ +
+
+
+ + + +
+
+ +
+
+ 这是一条警示信息(以function形式自定义icon) + +
+ +
+
+ +
+
+
+ + + +
+
+ +
+
+ 高危操作/出错信息提示(以slot形式自定义icon) + +
+ +
+
+ +
+
+`; + +exports[`csr snapshot test > csr test ./examples/alert/demos/operation.vue 1`] = ` +
+
+
+ + + +
+
+ +
+
+ 这是一条普通的消息提示 + +
+
+ + + 相关操作 + + +
+
+
+
+ + + +
+
+
+`; + +exports[`csr snapshot test > csr test ./examples/alert/demos/title.vue 1`] = ` +
+
+
+ + + +
+
+
+ + 这是一条普通的消息提示 +
+
+
+ 这是与普通的消息提示相关的文字辅助说明 + +
+
+ + + 相关操作 + + +
+
+
+
+ + + +
+
+
+`; + +exports[`csr snapshot test > csr test ./examples/anchor/demos/base.vue 1`] = ` +
+
+
+ + +
+`; + +exports[`csr snapshot test > csr test ./examples/anchor/demos/container.vue 1`] = ` +
+
+
+
+
+
+
+ + + + + + +
+
+
+ anchor-content-1 +
+
+ anchor-content-2 +
+
+ anchor-content-3 +
+
+ anchor-content-4 +
+
+ anchor-content-5 +
+
+
+`; + +exports[`csr snapshot test > csr test ./examples/anchor/demos/cursor.vue 1`] = ` +
+ +`; + +exports[`csr snapshot test > csr test ./examples/anchor/demos/large.vue 1`] = ` +
+ +`; + +exports[`csr snapshot test > csr test ./examples/anchor/demos/multiple.vue 1`] = ` +
+ +`; + +exports[`csr snapshot test > csr test ./examples/anchor/demos/small.vue 1`] = ` +
+ +`; + +exports[`csr snapshot test > csr test ./examples/anchor/demos/target.vue 1`] = ` +
+
+ + 定义 + + + + + + + + +
+
+ + 服务功能 + + + + + + + + +
+
+ + 使用指南 + + + + + + + + +
+
+ + 创建签名 + + + + + + + + +
+
+ + 创建内容 + + + + + + + + +
+
+ + 保密协议 + + + + + + + + +
+
+ + 其他 + + + + + + + + +
+
+`; + +exports[`csr snapshot test > csr test ./examples/avatar/demos/adjust.vue 1`] = ` +
+
+ + + 王 + + +
+
+ + + 王亿 + + +
+
+ + + 王亿亿 + + +
+
+`; + +exports[`csr snapshot test > csr test ./examples/avatar/demos/base.vue 1`] = ` +
+
+ +
+
+ + + W + + +
+
+ + + + + + +
+
+ + + + + + + + +
+
+`; + +exports[`csr snapshot test > csr test ./examples/avatar/demos/group.vue 1`] = ` +
+
+
+ + +
+ +
+
+ + + W + + +
+
+ + + + + + +
+ + +
+
+
+
+ + +
+ +
+
+ + + W + + +
+
+ + + + + + +
+ + +
+
+
+`; + +exports[`csr snapshot test > csr test ./examples/avatar/demos/group-cascading.vue 1`] = ` +
+
+
+ + +
+ +
+
+ + + W + + +
+
+ + + + + + +
+ + +
+
+
+
+ + +
+ +
+
+ + + W + + +
+
+ + + + + + +
+ + +
+
+
+`; + +exports[`csr snapshot test > csr test ./examples/avatar/demos/group-max.vue 1`] = ` +
+
+
+ + + +
+ +
+
+ + + Avatar + + +
+
+ + + +1 + + +
+ + + +
+
+
+
+ + + +
+ +
+
+ + + Avatar + + +
+
+ + + + + + + + + + +
+ + + +
+
+
+
+ + + +
+ +
+
+ + + Avatar + + +
+
+ + + + + +
+ + + +
+
+
+`; + +exports[`csr snapshot test > csr test ./examples/avatar/demos/shape.vue 1`] = ` +
+
+ + + W + + +
+
+ + + W + + +
+
+`; + +exports[`csr snapshot test > csr test ./examples/avatar/demos/size.vue 1`] = ` +
+
+
+ + + W + + +
+
+ + + W + + +
+
+ + + W + + +
+
+ + + W + + +
+
+
+
+ + + W + + +
+
+ + + W + + +
+
+ + + W + + +
+
+ + + W + + +
+
+
+`; + +exports[`csr snapshot test > csr test ./examples/badge/demos/base.vue 1`] = ` +
+
+
+ +
+ + + + +
+
+ + 解锁新徽章 + + + + +
+
+ + + + + + + + +
+
+
+`; + +exports[`csr snapshot test > csr test ./examples/badge/demos/custom.vue 1`] = ` +
+
+ +
+ + + + +
+
+ +
+ + + new + +
+
+ +
+ + + 99 + +
+
+ +
+ + + 99+ + +
+
+`; + +exports[`csr snapshot test > csr test ./examples/badge/demos/number.vue 1`] = ` +
+
+ +
+ + + 2 + +
+
+ +
+ + + 0 + +
+
+ +
+ + + 99+ + +
+
+`; + +exports[`csr snapshot test > csr test ./examples/badge/demos/offset.vue 1`] = ` +
+
+ +
+ + + 2 + +
+
+ +
+ + + 2 + +
+
+ +
+ + + 2 + +
+
+ +
+ + + 2 + +
+
+ +
+ + + 2 + +
+
+`; + +exports[`csr snapshot test > csr test ./examples/badge/demos/shape.vue 1`] = ` +
+
+ +
+ + + 2 + +
+
+ +
+ + + 99 + +
+
+`; + +exports[`csr snapshot test > csr test ./examples/badge/demos/size.vue 1`] = ` +
+

+ 1.默认大小 +

+
+ +
+ + + 2 + +
+
+ +
+ + + 99 + +
+
+ +
+ + + 99+ + +
+

+ 2.小 +

+
+ +
+ + + 2 + +
+
+ +
+ + + 99 + +
+
+ +
+ + + 99+ + +
+
+`; + +exports[`csr snapshot test > csr test ./examples/breadcrumb/demos/base.vue 1`] = ` +
+ +
+ + + + 页面1 + + + + + + + + +
+
+ + + + 页面2面包屑文案超长时悬浮显示文案全部信息 + + + + + + + + +
+
+ + + + 面包屑中文案过长时可缩略显示,鼠标hover时显示全部 + + + + + + + + +
+ +
+`; + +exports[`csr snapshot test > csr test ./examples/breadcrumb/demos/custom.vue 1`] = ` +
+ +
+ + + + 页面1 + + + + + + > + + +
+
+ + + + 页面2 + + + + + + > + + +
+
+ + + + 页面3 + + + + + + > + + +
+ +
+`; + +exports[`csr snapshot test > csr test ./examples/breadcrumb/demos/dropdown.vue 1`] = ` +
+ +
+ + + + 页面1 + + + + + / + +
+
+ + + + 页面2 + + + + + + + + / + +
+
+ + + + 页面3 + + + + + / + +
+ +
+`; + +exports[`csr snapshot test > csr test ./examples/breadcrumb/demos/href.vue 1`] = ` +
+
+ +
+ + + + 首页 + + + + + + + + +
+ +
+ + + + 页面2 + + + + + + + + +
+
+ + + + 页面3(disabled) + + + + + + + + +
+
+ + + + 页面4自定义点击 + + + + + + + + +
+ +
+
+ 点击计数器:0 +
+
+`; + +exports[`csr snapshot test > csr test ./examples/breadcrumb/demos/icon.vue 1`] = ` +
+ +
+ + + + + + + 页面1 + + + + + + + + +
+
+ + + + + + + 页面2 + + + + + + + + +
+
+ + + + + + + 页面3 + + + + + + + + +
+ +
+`; + +exports[`csr snapshot test > csr test ./examples/breadcrumb/demos/options.vue 1`] = ` +
+ +
+ + + + 页面1 + + + + + + + + +
+
+ + + + 页面2 + + + + + + + + +
+
+ + + + 页面3 + + + + + + + + +
+ +
+`; + +exports[`csr snapshot test > csr test ./examples/breadcrumb/demos/to.vue 1`] = ` +
+ +
+ + + + 首页 + + + + + + + + +
+
+ + + + 页面1 + + + + + + + + +
+ +
+`; + +exports[`csr snapshot test > csr test ./examples/button/demos/base.vue 1`] = ` +
+ + + + +
+`; + +exports[`csr snapshot test > csr test ./examples/button/demos/block.vue 1`] = ` +
+
+ + + + +
+
+`; + +exports[`csr snapshot test > csr test ./examples/button/demos/ghost.vue 1`] = ` +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+`; + +exports[`csr snapshot test > csr test ./examples/button/demos/group.vue 1`] = ` +
+
+ + +
+
+ + +
+
+ + + + +
+
+`; + +exports[`csr snapshot test > csr test ./examples/button/demos/icon.vue 1`] = ` +
+
+
+ + +
+
+ + +
+ +
+ +
+
+
+`; + +exports[`csr snapshot test > csr test ./examples/button/demos/loading.vue 1`] = ` +
+