mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
test: migrate test runner to vitest (#12206)
This commit is contained in:
parent
633e48a645
commit
694daef6ea
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@ -48,7 +48,7 @@ jobs:
|
||||
run: pnpm install
|
||||
|
||||
- name: Run test cases
|
||||
run: npm test
|
||||
run: pnpm run test:coverage
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v1
|
||||
|
@ -7,6 +7,7 @@
|
||||
"test": "pnpm --dir ./packages/vant test",
|
||||
"test:watch": "pnpm --dir ./packages/vant test:watch",
|
||||
"test:update": "pnpm --dir ./packages/vant test:update",
|
||||
"test:coverage": "pnpm --dir ./packages/vant test:coverage",
|
||||
"build": "pnpm --dir ./packages/vant build",
|
||||
"build:site": "pnpm --dir ./packages/vant build:site"
|
||||
},
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
## Unreleased
|
||||
|
||||
- 移除 vant-cli test 命令
|
||||
- 移除 vant-cli release 命令
|
||||
- 移除 vant-cli changelog 命令
|
||||
- 升级 commander v11
|
||||
|
@ -1,51 +0,0 @@
|
||||
const { join } = require('path');
|
||||
const { existsSync } = require('fs');
|
||||
const { ROOT } = require('./shared.cjs');
|
||||
|
||||
const JEST_SETUP_FILE = join(__dirname, 'jest.setup.cjs');
|
||||
const JEST_FILE_MOCK_FILE = join(__dirname, 'jest.file-mock.cjs');
|
||||
const JEST_STYLE_MOCK_FILE = join(__dirname, 'jest.style-mock.cjs');
|
||||
|
||||
const DEFAULT_CONFIG = {
|
||||
testEnvironment: 'jsdom',
|
||||
moduleNameMapper: {
|
||||
'\\.(css|less|scss)$': JEST_STYLE_MOCK_FILE,
|
||||
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
|
||||
JEST_FILE_MOCK_FILE,
|
||||
},
|
||||
setupFilesAfterEnv: [JEST_SETUP_FILE],
|
||||
moduleFileExtensions: ['js', 'jsx', 'vue', 'ts', 'tsx'],
|
||||
transform: {
|
||||
'\\.(js|jsx|ts|tsx|vue)$':
|
||||
'<rootDir>/node_modules/@vant/cli/cjs/jest.transformer.cjs',
|
||||
},
|
||||
transformIgnorePatterns: ['/node_modules/(?!(@vant/cli))/'],
|
||||
snapshotSerializers: ['jest-serializer-html'],
|
||||
collectCoverage: true,
|
||||
collectCoverageFrom: [
|
||||
'src/**/*.{js,jsx,ts,tsx,vue}',
|
||||
'!**/demo/**',
|
||||
'!**/test/**',
|
||||
],
|
||||
coverageReporters: ['html', 'lcov', 'text-summary'],
|
||||
coverageDirectory: './test/coverage',
|
||||
testEnvironmentOptions: {
|
||||
// https://stackoverflow.com/questions/72428323/jest-referenceerror-vue-is-not-defined
|
||||
customExportConditions: ['node', 'node-addons'],
|
||||
},
|
||||
};
|
||||
|
||||
function readRootConfig() {
|
||||
const ROOT_CONFIG_PATH = join(ROOT, 'jest.config.js');
|
||||
|
||||
if (existsSync(ROOT_CONFIG_PATH)) {
|
||||
return require(ROOT_CONFIG_PATH);
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
...DEFAULT_CONFIG,
|
||||
...readRootConfig(),
|
||||
};
|
@ -1 +0,0 @@
|
||||
module.exports = 'test-file-stub';
|
@ -1 +0,0 @@
|
||||
require('jest-canvas-mock');
|
@ -1 +0,0 @@
|
||||
module.exports = {};
|
@ -1,94 +0,0 @@
|
||||
const sfc = require('vue/compiler-sfc');
|
||||
const babel = require('@babel/core');
|
||||
const esbuild = require('esbuild');
|
||||
const nodePath = require('path');
|
||||
|
||||
const isJsxFile = (path) => /\.(j|t)sx$/.test(path);
|
||||
const isTsxFile = (path) => /\.tsx$/.test(path);
|
||||
const isVueFile = (path) => /\.vue$/.test(path);
|
||||
|
||||
const transformJsx = (code, path) => {
|
||||
const babelResult = babel.transformSync(code, {
|
||||
filename: path,
|
||||
babelrc: false,
|
||||
presets: isTsxFile(path) ? ['@babel/preset-typescript'] : [],
|
||||
plugins: [['@vue/babel-plugin-jsx']],
|
||||
});
|
||||
return babelResult?.code || '';
|
||||
};
|
||||
|
||||
const transformSFC = (code, path) => {
|
||||
const parsedPath = nodePath.parse(path);
|
||||
const { descriptor, errors } = sfc.parse(code, {
|
||||
filename: parsedPath.base,
|
||||
sourceRoot: parsedPath.dir,
|
||||
});
|
||||
|
||||
if (errors.length) {
|
||||
errors.forEach((error) => console.error(error));
|
||||
return '';
|
||||
}
|
||||
|
||||
const output = [];
|
||||
let bindingMetadata = {};
|
||||
|
||||
if (descriptor.script) {
|
||||
const content = descriptor.script.content.replace(
|
||||
'export default',
|
||||
'const script =',
|
||||
);
|
||||
output.push(content);
|
||||
} else if (descriptor.scriptSetup) {
|
||||
const result = sfc.compileScript(descriptor, {
|
||||
id: 'mock',
|
||||
});
|
||||
|
||||
const content = result.content.replace('export default', 'const script =');
|
||||
output.push(content);
|
||||
|
||||
if (result.bindings) {
|
||||
bindingMetadata = result.bindings;
|
||||
}
|
||||
} else {
|
||||
output.push(`const script = {};`);
|
||||
}
|
||||
|
||||
if (descriptor.template) {
|
||||
const render = sfc.compileTemplate({
|
||||
id: 'mock',
|
||||
source: descriptor.template.content,
|
||||
filename: path,
|
||||
compilerOptions: {
|
||||
bindingMetadata,
|
||||
},
|
||||
}).code;
|
||||
output.push(render);
|
||||
output.push('script.render = render;');
|
||||
}
|
||||
|
||||
output.push('export default script;');
|
||||
|
||||
return output.join('\n');
|
||||
};
|
||||
|
||||
const transformScript = (code) =>
|
||||
esbuild.transformSync(code, {
|
||||
target: 'es2016',
|
||||
format: 'cjs',
|
||||
loader: 'ts',
|
||||
}).code;
|
||||
|
||||
module.exports = {
|
||||
canInstrument: true,
|
||||
process(code, path) {
|
||||
if (isVueFile(path)) {
|
||||
code = transformSFC(code, path);
|
||||
}
|
||||
if (isJsxFile(path)) {
|
||||
code = transformJsx(code, path);
|
||||
}
|
||||
return {
|
||||
code: transformScript(code),
|
||||
};
|
||||
},
|
||||
};
|
@ -38,7 +38,6 @@
|
||||
"author": "chenjiahan",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@jest/types": "^29.1.2",
|
||||
"@types/fs-extra": "^11.0.1",
|
||||
"@types/less": "^3.0.3",
|
||||
"@types/lodash": "^4.14.191",
|
||||
@ -49,7 +48,6 @@
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.18.13",
|
||||
"@babel/preset-typescript": "^7.18.6",
|
||||
"@types/jest": "^29.5.1",
|
||||
"@vant/eslint-config": "^4.0.0",
|
||||
"@vant/touch-emulator": "^1.4.0",
|
||||
"@vitejs/plugin-vue": "^4.0.0",
|
||||
@ -66,10 +64,6 @@
|
||||
"hash-sum": "^2.0.0",
|
||||
"highlight.js": "^11.6.0",
|
||||
"husky": "^8.0.1",
|
||||
"jest": "^29.5.0",
|
||||
"jest-canvas-mock": "^2.4.0",
|
||||
"jest-environment-jsdom": "^29.1.2",
|
||||
"jest-serializer-html": "^7.1.0",
|
||||
"less": "^4.1.3",
|
||||
"lodash": "^4.17.21",
|
||||
"markdown-it": "^13.0.1",
|
||||
|
@ -22,39 +22,6 @@ program
|
||||
return lint();
|
||||
});
|
||||
|
||||
program
|
||||
.command('test')
|
||||
.description('Run unit tests through jest')
|
||||
.option(
|
||||
'--watch',
|
||||
'Watch files for changes and rerun tests related to changed files',
|
||||
)
|
||||
.option(
|
||||
'--clearCache',
|
||||
'Clears the configured Jest cache directory and then exits',
|
||||
)
|
||||
.option(
|
||||
'--changedSince <changedSince>',
|
||||
'Runs tests related to the changes since the provided branch or commit hash',
|
||||
)
|
||||
.option(
|
||||
'--logHeapUsage',
|
||||
'Logs the heap usage after every test. Useful to debug memory leaks',
|
||||
)
|
||||
.option(
|
||||
'--runInBand',
|
||||
'Run all tests serially in the current process, rather than creating a worker pool of child processes that run tests',
|
||||
)
|
||||
.option(
|
||||
'--updateSnapshot',
|
||||
'Re-record every snapshot that fails during this test run',
|
||||
)
|
||||
.option('--debug', 'Print debugging info about your Jest config')
|
||||
.action(async (options) => {
|
||||
const { test } = await import('./commands/jest.js');
|
||||
return test(options);
|
||||
});
|
||||
|
||||
program
|
||||
.command('clean')
|
||||
.description('Clean all dist files')
|
||||
|
@ -1,47 +0,0 @@
|
||||
import jest from 'jest';
|
||||
import { setNodeEnv } from '../common/index.js';
|
||||
import { genPackageEntry } from '../compiler/gen-package-entry.js';
|
||||
import {
|
||||
ROOT,
|
||||
JEST_CONFIG_FILE,
|
||||
PACKAGE_ENTRY_FILE,
|
||||
} from '../common/constant.js';
|
||||
import type { Config } from '@jest/types';
|
||||
|
||||
export function test(command: Config.Argv) {
|
||||
setNodeEnv('test');
|
||||
|
||||
genPackageEntry({
|
||||
outputPath: PACKAGE_ENTRY_FILE,
|
||||
});
|
||||
|
||||
const config = {
|
||||
rootDir: ROOT,
|
||||
watch: command.watch,
|
||||
debug: command.debug,
|
||||
config: JEST_CONFIG_FILE,
|
||||
runInBand: command.runInBand,
|
||||
clearCache: command.clearCache,
|
||||
changedSince: command.changedSince,
|
||||
logHeapUsage: command.logHeapUsage,
|
||||
updateSnapshot: command.updateSnapshot,
|
||||
// make jest tests faster
|
||||
// see: https://ivantanev.com/make-jest-faster/
|
||||
maxWorkers: '50%',
|
||||
} as Config.Argv;
|
||||
|
||||
jest
|
||||
.runCLI(config, [ROOT])
|
||||
.then((response) => {
|
||||
if (!response.results.success && !command.watch) {
|
||||
process.exit(1);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
|
||||
if (!command.watch) {
|
||||
process.exit(1);
|
||||
}
|
||||
});
|
||||
}
|
@ -40,7 +40,6 @@ export const STYLE_DEPS_JSON_FILE = join(DIST_DIR, 'style-deps.json');
|
||||
|
||||
// Config files
|
||||
export const POSTCSS_CONFIG_FILE = join(CJS_DIR, 'postcss.config.cjs');
|
||||
export const JEST_CONFIG_FILE = join(CJS_DIR, 'jest.config.cjs');
|
||||
|
||||
export const SCRIPT_EXTS = [
|
||||
'.js',
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { raf, cancelRaf } from '../src/utils';
|
||||
|
||||
test('raf', async () => {
|
||||
const spy = jest.fn();
|
||||
const spy = vi.fn();
|
||||
raf(spy);
|
||||
|
||||
expect(spy).toHaveBeenCalledTimes(1);
|
||||
|
@ -4,6 +4,9 @@
|
||||
"rules": {
|
||||
"prefer-object-spread": "off"
|
||||
},
|
||||
"globals": {
|
||||
"vi": true
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["src/**/*"],
|
||||
|
@ -1,10 +0,0 @@
|
||||
module.exports = {
|
||||
testPathIgnorePatterns: ['/node_modules/'],
|
||||
collectCoverageFrom: [
|
||||
'src/**/*.{js,jsx,ts,tsx,vue}',
|
||||
'!src/lazyload/vue-lazyload/**',
|
||||
'!**/demo/**',
|
||||
'!**/test/**',
|
||||
'!**/lang/**',
|
||||
],
|
||||
};
|
@ -15,14 +15,15 @@
|
||||
"scripts": {
|
||||
"dev": "vant-cli dev",
|
||||
"lint": "vant-cli lint",
|
||||
"test": "vant-cli test",
|
||||
"test": "vitest run",
|
||||
"build": "vant-cli build",
|
||||
"build:site": "vant-cli build-site",
|
||||
"release": "cp ../../README.md ./ && vant-cli release --gitTag && rm ./README.md",
|
||||
"release:site": "pnpm build:site && npx gh-pages -d site-dist --add",
|
||||
"test:update": "vant-cli test --updateSnapshot",
|
||||
"test:watch": "vant-cli test --watch",
|
||||
"test:coverage": "open test/coverage/index.html"
|
||||
"test:update": "vitest run -u",
|
||||
"test:watch": "vitest",
|
||||
"test:coverage": "vitest run --coverage",
|
||||
"open:coverage": "open test/coverage/index.html"
|
||||
},
|
||||
"publishConfig": {
|
||||
"registry": "https://registry.npmjs.org/"
|
||||
@ -53,15 +54,22 @@
|
||||
"vue": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^29.5.1",
|
||||
"@types/node": "^18.16.3",
|
||||
"@vant/area-data": "workspace:*",
|
||||
"@vant/cli": "workspace:*",
|
||||
"@vant/eslint-config": "workspace:*",
|
||||
"@vant/icons": "workspace:*",
|
||||
"@vitejs/plugin-vue": "^4.0.0",
|
||||
"@vitejs/plugin-vue-jsx": "^3.0.0",
|
||||
"@vitest/coverage-v8": "0.34.2",
|
||||
"@vue/runtime-core": "^3.3.4",
|
||||
"@vue/test-utils": "^2.3.2",
|
||||
"diffable-html": "^5.0.0",
|
||||
"jsdom": "^22.1.0",
|
||||
"typescript": "^5.0.4",
|
||||
"vite": "^4.4.2",
|
||||
"vitest": "^0.34.2",
|
||||
"vitest-canvas-mock": "^0.3.2",
|
||||
"vue": "^3.3.4",
|
||||
"vue-router": "^4.1.6"
|
||||
},
|
||||
|
@ -1,7 +1,8 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render default slot correctly 1`] = `
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--default van-button--large van-action-bar-button"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
|
@ -1,7 +1,8 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render default slot correctly 1`] = `
|
||||
<div role="button"
|
||||
<div
|
||||
role="button"
|
||||
class="van-action-bar-icon"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -12,7 +13,8 @@ exports[`should render default slot correctly 1`] = `
|
||||
`;
|
||||
|
||||
exports[`should render icon slot correctly 1`] = `
|
||||
<div role="button"
|
||||
<div
|
||||
role="button"
|
||||
class="van-action-bar-icon"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -24,7 +26,8 @@ exports[`should render icon slot correctly 1`] = `
|
||||
`;
|
||||
|
||||
exports[`should render icon slot with badge correctly 1`] = `
|
||||
<div role="button"
|
||||
<div
|
||||
role="button"
|
||||
class="van-action-bar-icon"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -39,7 +42,8 @@ exports[`should render icon slot with badge correctly 1`] = `
|
||||
`;
|
||||
|
||||
exports[`should render icon slot with dot correctly 1`] = `
|
||||
<div role="button"
|
||||
<div
|
||||
role="button"
|
||||
class="van-action-bar-icon"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -53,7 +57,8 @@ exports[`should render icon slot with dot correctly 1`] = `
|
||||
`;
|
||||
|
||||
exports[`should render icon-prefix correctly 1`] = `
|
||||
<div role="button"
|
||||
<div
|
||||
role="button"
|
||||
class="van-action-bar-icon"
|
||||
tabindex="0"
|
||||
>
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
@ -6,40 +6,47 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div class="van-action-bar van-safe-area-bottom">
|
||||
<!--[-->
|
||||
<div role="button"
|
||||
<div
|
||||
role="button"
|
||||
class="van-action-bar-icon"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-badge__wrapper van-icon van-icon-chat-o van-action-bar-icon__icon"
|
||||
<div
|
||||
class="van-badge__wrapper van-icon van-icon-chat-o van-action-bar-icon__icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</div>
|
||||
Icon1
|
||||
</div>
|
||||
<div role="button"
|
||||
<div
|
||||
role="button"
|
||||
class="van-action-bar-icon"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-badge__wrapper van-icon van-icon-cart-o van-action-bar-icon__icon"
|
||||
<div
|
||||
class="van-badge__wrapper van-icon van-icon-cart-o van-action-bar-icon__icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</div>
|
||||
Icon2
|
||||
</div>
|
||||
<div role="button"
|
||||
<div
|
||||
role="button"
|
||||
class="van-action-bar-icon"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-badge__wrapper van-icon van-icon-shop-o van-action-bar-icon__icon"
|
||||
<div
|
||||
class="van-badge__wrapper van-icon van-icon-shop-o van-action-bar-icon__icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</div>
|
||||
Icon3
|
||||
</div>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--danger van-button--large van-action-bar-button van-action-bar-button--danger van-action-bar-button--last van-action-bar-button--first"
|
||||
style
|
||||
>
|
||||
@ -56,30 +63,36 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div class="van-action-bar van-safe-area-bottom">
|
||||
<!--[-->
|
||||
<div role="button"
|
||||
<div
|
||||
role="button"
|
||||
class="van-action-bar-icon"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-badge__wrapper van-icon van-icon-chat-o van-action-bar-icon__icon"
|
||||
<div
|
||||
class="van-badge__wrapper van-icon van-icon-chat-o van-action-bar-icon__icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-badge van-badge--top-right van-badge--dot van-badge--fixed"
|
||||
<div
|
||||
class="van-badge van-badge--top-right van-badge--dot van-badge--fixed"
|
||||
style
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
Icon1
|
||||
</div>
|
||||
<div role="button"
|
||||
<div
|
||||
role="button"
|
||||
class="van-action-bar-icon"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-badge__wrapper van-icon van-icon-cart-o van-action-bar-icon__icon"
|
||||
<div
|
||||
class="van-badge__wrapper van-icon van-icon-cart-o van-action-bar-icon__icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-badge van-badge--top-right van-badge--fixed"
|
||||
<div
|
||||
class="van-badge van-badge--top-right van-badge--fixed"
|
||||
style
|
||||
>
|
||||
5
|
||||
@ -87,15 +100,18 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
Icon2
|
||||
</div>
|
||||
<div role="button"
|
||||
<div
|
||||
role="button"
|
||||
class="van-action-bar-icon"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-badge__wrapper van-icon van-icon-shop-o van-action-bar-icon__icon"
|
||||
<div
|
||||
class="van-badge__wrapper van-icon van-icon-shop-o van-action-bar-icon__icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-badge van-badge--top-right van-badge--fixed"
|
||||
<div
|
||||
class="van-badge van-badge--top-right van-badge--fixed"
|
||||
style
|
||||
>
|
||||
12
|
||||
@ -103,7 +119,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
Icon3
|
||||
</div>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--warning van-button--large van-action-bar-button van-action-bar-button--warning van-action-bar-button--last van-action-bar-button--first"
|
||||
style
|
||||
>
|
||||
@ -114,7 +131,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--danger van-button--large van-action-bar-button van-action-bar-button--danger van-action-bar-button--last"
|
||||
style
|
||||
>
|
||||
@ -131,40 +149,47 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div class="van-action-bar van-safe-area-bottom">
|
||||
<!--[-->
|
||||
<div role="button"
|
||||
<div
|
||||
role="button"
|
||||
class="van-action-bar-icon"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-badge__wrapper van-icon van-icon-chat-o van-action-bar-icon__icon"
|
||||
<div
|
||||
class="van-badge__wrapper van-icon van-icon-chat-o van-action-bar-icon__icon"
|
||||
style="color:#ee0a24;"
|
||||
>
|
||||
<!--[-->
|
||||
</div>
|
||||
Icon1
|
||||
</div>
|
||||
<div role="button"
|
||||
<div
|
||||
role="button"
|
||||
class="van-action-bar-icon"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-badge__wrapper van-icon van-icon-cart-o van-action-bar-icon__icon"
|
||||
<div
|
||||
class="van-badge__wrapper van-icon van-icon-cart-o van-action-bar-icon__icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</div>
|
||||
Icon2
|
||||
</div>
|
||||
<div role="button"
|
||||
<div
|
||||
role="button"
|
||||
class="van-action-bar-icon"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-badge__wrapper van-icon van-icon-star van-action-bar-icon__icon"
|
||||
<div
|
||||
class="van-badge__wrapper van-icon van-icon-star van-action-bar-icon__icon"
|
||||
style="color:#ff5000;"
|
||||
>
|
||||
<!--[-->
|
||||
</div>
|
||||
Collected
|
||||
</div>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--warning van-button--large van-action-bar-button van-action-bar-button--warning van-action-bar-button--last van-action-bar-button--first"
|
||||
style
|
||||
>
|
||||
@ -175,7 +200,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--danger van-button--large van-action-bar-button van-action-bar-button--danger van-action-bar-button--last"
|
||||
style
|
||||
>
|
||||
@ -192,29 +218,34 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div class="van-action-bar van-safe-area-bottom">
|
||||
<!--[-->
|
||||
<div role="button"
|
||||
<div
|
||||
role="button"
|
||||
class="van-action-bar-icon"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-badge__wrapper van-icon van-icon-chat-o van-action-bar-icon__icon"
|
||||
<div
|
||||
class="van-badge__wrapper van-icon van-icon-chat-o van-action-bar-icon__icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</div>
|
||||
Icon1
|
||||
</div>
|
||||
<div role="button"
|
||||
<div
|
||||
role="button"
|
||||
class="van-action-bar-icon"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-badge__wrapper van-icon van-icon-cart-o van-action-bar-icon__icon"
|
||||
<div
|
||||
class="van-badge__wrapper van-icon van-icon-cart-o van-action-bar-icon__icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</div>
|
||||
Icon2
|
||||
</div>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--warning van-button--large van-action-bar-button van-action-bar-button--warning van-action-bar-button--last van-action-bar-button--first"
|
||||
style="color:white;background:#be99ff;border-color:#be99ff;"
|
||||
>
|
||||
@ -225,7 +256,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--danger van-button--large van-action-bar-button van-action-bar-button--danger van-action-bar-button--last"
|
||||
style="color:white;background:#7232dd;border-color:#7232dd;"
|
||||
>
|
||||
|
@ -1,9 +1,10 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
<div class="van-action-bar van-safe-area-bottom">
|
||||
<div role="button"
|
||||
<div
|
||||
role="button"
|
||||
class="van-action-bar-icon"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -11,7 +12,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
Icon1
|
||||
</div>
|
||||
<div role="button"
|
||||
<div
|
||||
role="button"
|
||||
class="van-action-bar-icon"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -19,7 +21,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
Icon2
|
||||
</div>
|
||||
<div role="button"
|
||||
<div
|
||||
role="button"
|
||||
class="van-action-bar-icon"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -27,7 +30,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
Icon3
|
||||
</div>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--danger van-button--large van-action-bar-button van-action-bar-button--danger van-action-bar-button--last van-action-bar-button--first"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -40,7 +44,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-action-bar van-safe-area-bottom">
|
||||
<div role="button"
|
||||
<div
|
||||
role="button"
|
||||
class="van-action-bar-icon"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -50,7 +55,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
Icon1
|
||||
</div>
|
||||
<div role="button"
|
||||
<div
|
||||
role="button"
|
||||
class="van-action-bar-icon"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -61,7 +67,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
Icon2
|
||||
</div>
|
||||
<div role="button"
|
||||
<div
|
||||
role="button"
|
||||
class="van-action-bar-icon"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -72,7 +79,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
Icon3
|
||||
</div>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--warning van-button--large van-action-bar-button van-action-bar-button--warning van-action-bar-button--first"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -81,7 +89,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--danger van-button--large van-action-bar-button van-action-bar-button--danger van-action-bar-button--last"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -94,17 +103,20 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-action-bar van-safe-area-bottom">
|
||||
<div role="button"
|
||||
<div
|
||||
role="button"
|
||||
class="van-action-bar-icon"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-badge__wrapper van-icon van-icon-chat-o van-action-bar-icon__icon"
|
||||
<div
|
||||
class="van-badge__wrapper van-icon van-icon-chat-o van-action-bar-icon__icon"
|
||||
style="color: rgb(238, 10, 36);"
|
||||
>
|
||||
</div>
|
||||
Icon1
|
||||
</div>
|
||||
<div role="button"
|
||||
<div
|
||||
role="button"
|
||||
class="van-action-bar-icon"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -112,17 +124,20 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
Icon2
|
||||
</div>
|
||||
<div role="button"
|
||||
<div
|
||||
role="button"
|
||||
class="van-action-bar-icon"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-badge__wrapper van-icon van-icon-star van-action-bar-icon__icon"
|
||||
<div
|
||||
class="van-badge__wrapper van-icon van-icon-star van-action-bar-icon__icon"
|
||||
style="color: rgb(255, 80, 0);"
|
||||
>
|
||||
</div>
|
||||
Collected
|
||||
</div>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--warning van-button--large van-action-bar-button van-action-bar-button--warning van-action-bar-button--first"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -131,7 +146,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--danger van-button--large van-action-bar-button van-action-bar-button--danger van-action-bar-button--last"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -144,7 +160,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-action-bar van-safe-area-bottom">
|
||||
<div role="button"
|
||||
<div
|
||||
role="button"
|
||||
class="van-action-bar-icon"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -152,7 +169,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
Icon1
|
||||
</div>
|
||||
<div role="button"
|
||||
<div
|
||||
role="button"
|
||||
class="van-action-bar-icon"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -160,7 +178,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
Icon2
|
||||
</div>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--warning van-button--large van-action-bar-button van-action-bar-button--warning van-action-bar-button--first"
|
||||
style="color: white; border-color: #be99ff; background: rgb(190, 153, 255);"
|
||||
>
|
||||
@ -170,7 +189,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--danger van-button--large van-action-bar-button van-action-bar-button--danger van-action-bar-button--last"
|
||||
style="color: white; background: rgb(114, 50, 221); border-color: #7232dd;"
|
||||
>
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should allow to disable safe-area-inset-bottom prop 1`] = `
|
||||
<div class="van-action-bar">
|
||||
@ -6,7 +6,8 @@ exports[`should allow to disable safe-area-inset-bottom prop 1`] = `
|
||||
`;
|
||||
|
||||
exports[`should render placeholder element when using placeholder prop 1`] = `
|
||||
<div class="van-action-bar__placeholder"
|
||||
<div
|
||||
class="van-action-bar__placeholder"
|
||||
style="height: 50px;"
|
||||
>
|
||||
<div class="van-action-bar van-safe-area-bottom">
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @jest-environment node
|
||||
* @vitest-environment node
|
||||
*/
|
||||
import Demo from '../demo/index.vue';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
@ -1,55 +1,64 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div>
|
||||
<!--[-->
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
Basic Usage
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
Show Cancel Button
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
Show Description
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -58,18 +67,21 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
Option Status
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -78,18 +90,21 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
Custom Panel
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
|
@ -1,8 +1,9 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -14,7 +15,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon">
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -26,7 +28,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon">
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -40,7 +43,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -54,7 +58,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -67,7 +72,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</i>
|
||||
</div>
|
||||
</div>
|
||||
<transition-stub name="van-fade"
|
||||
<transition-stub
|
||||
name="van-fade"
|
||||
appear="true"
|
||||
persisted="false"
|
||||
css="true"
|
||||
@ -75,13 +81,15 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
tabindex="0"
|
||||
>
|
||||
</transition-stub>
|
||||
<transition-stub name="van-popup-slide-bottom"
|
||||
<transition-stub
|
||||
name="van-popup-slide-bottom"
|
||||
appear="false"
|
||||
persisted="false"
|
||||
css="true"
|
||||
>
|
||||
</transition-stub>
|
||||
<transition-stub name="van-fade"
|
||||
<transition-stub
|
||||
name="van-fade"
|
||||
appear="true"
|
||||
persisted="false"
|
||||
css="true"
|
||||
@ -89,13 +97,15 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
tabindex="0"
|
||||
>
|
||||
</transition-stub>
|
||||
<transition-stub name="van-popup-slide-bottom"
|
||||
<transition-stub
|
||||
name="van-popup-slide-bottom"
|
||||
appear="false"
|
||||
persisted="false"
|
||||
css="true"
|
||||
>
|
||||
</transition-stub>
|
||||
<transition-stub name="van-fade"
|
||||
<transition-stub
|
||||
name="van-fade"
|
||||
appear="true"
|
||||
persisted="false"
|
||||
css="true"
|
||||
@ -103,13 +113,15 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
tabindex="0"
|
||||
>
|
||||
</transition-stub>
|
||||
<transition-stub name="van-popup-slide-bottom"
|
||||
<transition-stub
|
||||
name="van-popup-slide-bottom"
|
||||
appear="false"
|
||||
persisted="false"
|
||||
css="true"
|
||||
>
|
||||
</transition-stub>
|
||||
<transition-stub name="van-fade"
|
||||
<transition-stub
|
||||
name="van-fade"
|
||||
appear="true"
|
||||
persisted="false"
|
||||
css="true"
|
||||
@ -117,13 +129,15 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
tabindex="0"
|
||||
>
|
||||
</transition-stub>
|
||||
<transition-stub name="van-popup-slide-bottom"
|
||||
<transition-stub
|
||||
name="van-popup-slide-bottom"
|
||||
appear="false"
|
||||
persisted="false"
|
||||
css="true"
|
||||
>
|
||||
</transition-stub>
|
||||
<transition-stub name="van-fade"
|
||||
<transition-stub
|
||||
name="van-fade"
|
||||
appear="true"
|
||||
persisted="false"
|
||||
css="true"
|
||||
@ -131,7 +145,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
tabindex="0"
|
||||
>
|
||||
</transition-stub>
|
||||
<transition-stub name="van-popup-slide-bottom"
|
||||
<transition-stub
|
||||
name="van-popup-slide-bottom"
|
||||
appear="false"
|
||||
persisted="false"
|
||||
css="true"
|
||||
|
@ -1,12 +1,16 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should allow to custom close icon with closeIcon prop 1`] = `
|
||||
<i class="van-badge__wrapper van-icon van-icon-cross van-action-sheet__close van-haptics-feedback">
|
||||
</i>
|
||||
"<i class=\\"van-badge__wrapper van-icon van-icon-cross van-action-sheet__close van-haptics-feedback\\">
|
||||
<!---->
|
||||
<!---->
|
||||
<!---->
|
||||
</i>"
|
||||
`;
|
||||
|
||||
exports[`should render action slot correctly 1`] = `
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-action-sheet__item"
|
||||
>
|
||||
name: Option, index: 0
|
||||
@ -14,7 +18,8 @@ exports[`should render action slot correctly 1`] = `
|
||||
`;
|
||||
|
||||
exports[`should render cancel slot correctly 1`] = `
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-action-sheet__cancel"
|
||||
>
|
||||
Custom Cancel
|
||||
@ -22,7 +27,8 @@ exports[`should render cancel slot correctly 1`] = `
|
||||
`;
|
||||
|
||||
exports[`should render default slot correctly 1`] = `
|
||||
<transition-stub name="van-fade"
|
||||
<transition-stub
|
||||
name="van-fade"
|
||||
appear="true"
|
||||
persisted="false"
|
||||
css="true"
|
||||
@ -32,12 +38,14 @@ exports[`should render default slot correctly 1`] = `
|
||||
<div class="van-overlay">
|
||||
</div>
|
||||
</transition-stub>
|
||||
<transition-stub name="van-popup-slide-bottom"
|
||||
<transition-stub
|
||||
name="van-popup-slide-bottom"
|
||||
appear="false"
|
||||
persisted="false"
|
||||
css="true"
|
||||
>
|
||||
<div role="dialog"
|
||||
<div
|
||||
role="dialog"
|
||||
tabindex="0"
|
||||
class="van-popup van-popup--round van-popup--bottom van-safe-area-bottom van-action-sheet"
|
||||
>
|
||||
@ -66,7 +74,8 @@ exports[`should render description slot when match snapshot 1`] = `
|
||||
`;
|
||||
|
||||
exports[`should render subname correctly 1`] = `
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-action-sheet__item"
|
||||
>
|
||||
<span class="van-action-sheet__name">
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @jest-environment node
|
||||
* @vitest-environment node
|
||||
*/
|
||||
import Demo from '../demo/index.vue';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
@ -23,7 +23,7 @@ test('should emit select event after clicking option', async () => {
|
||||
});
|
||||
|
||||
test('should call callback function after clicking option', () => {
|
||||
const callback = jest.fn();
|
||||
const callback = vi.fn();
|
||||
const wrapper = mount(ActionSheet, {
|
||||
props: {
|
||||
show: true,
|
||||
@ -230,7 +230,7 @@ test('should close after clicking option if close-on-click-action prop is true',
|
||||
});
|
||||
|
||||
test('should emit click-overlay event and closed after clicking the overlay', () => {
|
||||
const onClickOverlay = jest.fn();
|
||||
const onClickOverlay = vi.fn();
|
||||
const wrapper = mount(ActionSheet, {
|
||||
props: {
|
||||
show: true,
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
@ -7,11 +7,13 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div class="van-address-edit__fields">
|
||||
<div class="van-cell van-field">
|
||||
<div class="van-cell__title van-field__label"
|
||||
<div
|
||||
class="van-cell__title van-field__label"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
for="van-field-input"
|
||||
style
|
||||
>
|
||||
@ -21,7 +23,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-cell__value van-field__value">
|
||||
<!--[-->
|
||||
<div class="van-field__body">
|
||||
<input type="text"
|
||||
<input
|
||||
type="text"
|
||||
id="van-field-input"
|
||||
class="van-field__control"
|
||||
placeholder="Name"
|
||||
@ -31,11 +34,13 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-cell van-field">
|
||||
<div class="van-cell__title van-field__label"
|
||||
<div
|
||||
class="van-cell__title van-field__label"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
for="van-field-input"
|
||||
style
|
||||
>
|
||||
@ -45,7 +50,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-cell__value van-field__value">
|
||||
<!--[-->
|
||||
<div class="van-field__body">
|
||||
<input type="tel"
|
||||
<input
|
||||
type="tel"
|
||||
id="van-field-input"
|
||||
class="van-field__control"
|
||||
placeholder="Phone"
|
||||
@ -54,15 +60,18 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable van-field"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-field"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title van-field__label"
|
||||
<div
|
||||
class="van-cell__title van-field__label"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
for="van-field-input"
|
||||
style
|
||||
>
|
||||
@ -72,7 +81,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-cell__value van-field__value">
|
||||
<!--[-->
|
||||
<div class="van-field__body">
|
||||
<input type="text"
|
||||
<input
|
||||
type="text"
|
||||
id="van-field-input"
|
||||
class="van-field__control"
|
||||
readonly
|
||||
@ -81,7 +91,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -89,11 +100,13 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<!--[-->
|
||||
<div class="van-cell van-field van-address-edit-detail">
|
||||
<div class="van-cell__title van-field__label"
|
||||
<div
|
||||
class="van-cell__title van-field__label"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
for="van-field-input"
|
||||
style
|
||||
>
|
||||
@ -103,7 +116,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-cell__value van-field__value">
|
||||
<!--[-->
|
||||
<div class="van-field__body">
|
||||
<textarea id="van-field-input"
|
||||
<textarea
|
||||
id="van-field-input"
|
||||
rows="1"
|
||||
class="van-field__control"
|
||||
placeholder="Address"
|
||||
@ -115,7 +129,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-cell van-cell--center van-cell--borderless van-address-edit__default">
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
@ -123,7 +138,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
<!--[-->
|
||||
<div role="switch"
|
||||
<div
|
||||
role="switch"
|
||||
class="van-switch"
|
||||
style
|
||||
tabindex="0"
|
||||
@ -134,7 +150,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-address-edit__buttons">
|
||||
<button type="submit"
|
||||
<button
|
||||
type="submit"
|
||||
class="van-button van-button--primary van-button--normal van-button--block van-button--round van-address-edit__button"
|
||||
style
|
||||
>
|
||||
@ -144,7 +161,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--default van-button--normal van-button--block van-button--round van-address-edit__button"
|
||||
style
|
||||
>
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
@ -6,7 +6,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-address-edit__fields">
|
||||
<div class="van-cell van-field">
|
||||
<div class="van-cell__title van-field__label">
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
for="van-field-input"
|
||||
>
|
||||
Name
|
||||
@ -14,7 +15,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
<div class="van-field__body">
|
||||
<input type="text"
|
||||
<input
|
||||
type="text"
|
||||
id="van-field-input"
|
||||
class="van-field__control"
|
||||
placeholder="Name"
|
||||
@ -25,7 +27,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div class="van-cell van-field">
|
||||
<div class="van-cell__title van-field__label">
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
for="van-field-input"
|
||||
>
|
||||
Phone
|
||||
@ -33,7 +36,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
<div class="van-field__body">
|
||||
<input type="tel"
|
||||
<input
|
||||
type="tel"
|
||||
id="van-field-input"
|
||||
class="van-field__control"
|
||||
placeholder="Phone"
|
||||
@ -42,12 +46,14 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable van-field"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-field"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title van-field__label">
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
for="van-field-input"
|
||||
>
|
||||
Area
|
||||
@ -55,7 +61,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
<div class="van-field__body">
|
||||
<input type="text"
|
||||
<input
|
||||
type="text"
|
||||
id="van-field-input"
|
||||
class="van-field__control"
|
||||
readonly
|
||||
@ -69,7 +76,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div class="van-cell van-field van-address-edit-detail">
|
||||
<div class="van-cell__title van-field__label">
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
for="van-field-input"
|
||||
>
|
||||
Address
|
||||
@ -77,7 +85,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
<div class="van-field__body">
|
||||
<textarea id="van-field-input"
|
||||
<textarea
|
||||
id="van-field-input"
|
||||
rows="1"
|
||||
class="van-field__control"
|
||||
placeholder="Address"
|
||||
@ -95,7 +104,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Set as the default address
|
||||
</span>
|
||||
</div>
|
||||
<div role="switch"
|
||||
<div
|
||||
role="switch"
|
||||
class="van-switch"
|
||||
tabindex="0"
|
||||
aria-checked="false"
|
||||
@ -105,7 +115,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-address-edit__buttons">
|
||||
<button type="submit"
|
||||
<button
|
||||
type="submit"
|
||||
class="van-button van-button--primary van-button--normal van-button--block van-button--round van-address-edit__button"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -114,7 +125,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--default van-button--normal van-button--block van-button--round van-address-edit__button"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should allow to custom validator with validator prop 1`] = `
|
||||
<div class="van-field__error-message">
|
||||
@ -11,7 +11,8 @@ exports[`should render AddressEdit correctly 1`] = `
|
||||
<div class="van-address-edit__fields">
|
||||
<div class="van-cell van-field">
|
||||
<div class="van-cell__title van-field__label">
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
for="van-field-input"
|
||||
>
|
||||
Name
|
||||
@ -19,7 +20,8 @@ exports[`should render AddressEdit correctly 1`] = `
|
||||
</div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
<div class="van-field__body">
|
||||
<input type="text"
|
||||
<input
|
||||
type="text"
|
||||
id="van-field-input"
|
||||
class="van-field__control"
|
||||
placeholder="Name"
|
||||
@ -30,7 +32,8 @@ exports[`should render AddressEdit correctly 1`] = `
|
||||
</div>
|
||||
<div class="van-cell van-field">
|
||||
<div class="van-cell__title van-field__label">
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
for="van-field-input"
|
||||
>
|
||||
Phone
|
||||
@ -38,7 +41,8 @@ exports[`should render AddressEdit correctly 1`] = `
|
||||
</div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
<div class="van-field__body">
|
||||
<input type="tel"
|
||||
<input
|
||||
type="tel"
|
||||
id="van-field-input"
|
||||
class="van-field__control"
|
||||
placeholder="Phone"
|
||||
@ -47,12 +51,14 @@ exports[`should render AddressEdit correctly 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable van-field"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-field"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title van-field__label">
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
for="van-field-input"
|
||||
>
|
||||
Area
|
||||
@ -60,7 +66,8 @@ exports[`should render AddressEdit correctly 1`] = `
|
||||
</div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
<div class="van-field__body">
|
||||
<input type="text"
|
||||
<input
|
||||
type="text"
|
||||
id="van-field-input"
|
||||
class="van-field__control"
|
||||
readonly
|
||||
@ -74,7 +81,8 @@ exports[`should render AddressEdit correctly 1`] = `
|
||||
</div>
|
||||
<div class="van-cell van-field van-address-edit-detail">
|
||||
<div class="van-cell__title van-field__label">
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
for="van-field-input"
|
||||
>
|
||||
Address
|
||||
@ -82,7 +90,8 @@ exports[`should render AddressEdit correctly 1`] = `
|
||||
</div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
<div class="van-field__body">
|
||||
<textarea id="van-field-input"
|
||||
<textarea
|
||||
id="van-field-input"
|
||||
rows="1"
|
||||
class="van-field__control"
|
||||
placeholder="Address"
|
||||
@ -94,7 +103,8 @@ exports[`should render AddressEdit correctly 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-address-edit__buttons">
|
||||
<button type="submit"
|
||||
<button
|
||||
type="submit"
|
||||
class="van-button van-button--primary van-button--normal van-button--block van-button--round van-address-edit__button"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -112,7 +122,8 @@ exports[`should render AddressEdit with props correctly 1`] = `
|
||||
<div class="van-address-edit__fields">
|
||||
<div class="van-cell van-field">
|
||||
<div class="van-cell__title van-field__label">
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
for="van-field-input"
|
||||
>
|
||||
Name
|
||||
@ -120,7 +131,8 @@ exports[`should render AddressEdit with props correctly 1`] = `
|
||||
</div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
<div class="van-field__body">
|
||||
<input type="text"
|
||||
<input
|
||||
type="text"
|
||||
id="van-field-input"
|
||||
class="van-field__control"
|
||||
placeholder="Name"
|
||||
@ -131,7 +143,8 @@ exports[`should render AddressEdit with props correctly 1`] = `
|
||||
</div>
|
||||
<div class="van-cell van-field">
|
||||
<div class="van-cell__title van-field__label">
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
for="van-field-input"
|
||||
>
|
||||
Phone
|
||||
@ -139,7 +152,8 @@ exports[`should render AddressEdit with props correctly 1`] = `
|
||||
</div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
<div class="van-field__body">
|
||||
<input type="tel"
|
||||
<input
|
||||
type="tel"
|
||||
id="van-field-input"
|
||||
class="van-field__control"
|
||||
placeholder="Phone"
|
||||
@ -148,12 +162,14 @@ exports[`should render AddressEdit with props correctly 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable van-field"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-field"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title van-field__label">
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
for="van-field-input"
|
||||
>
|
||||
Area
|
||||
@ -161,7 +177,8 @@ exports[`should render AddressEdit with props correctly 1`] = `
|
||||
</div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
<div class="van-field__body">
|
||||
<input type="text"
|
||||
<input
|
||||
type="text"
|
||||
id="van-field-input"
|
||||
class="van-field__control"
|
||||
readonly
|
||||
@ -175,7 +192,8 @@ exports[`should render AddressEdit with props correctly 1`] = `
|
||||
</div>
|
||||
<div class="van-cell van-field van-address-edit-detail">
|
||||
<div class="van-cell__title van-field__label">
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
for="van-field-input"
|
||||
>
|
||||
Address
|
||||
@ -183,7 +201,8 @@ exports[`should render AddressEdit with props correctly 1`] = `
|
||||
</div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
<div class="van-field__body">
|
||||
<textarea id="van-field-input"
|
||||
<textarea
|
||||
id="van-field-input"
|
||||
rows="1"
|
||||
class="van-field__control"
|
||||
placeholder="Address"
|
||||
@ -200,7 +219,8 @@ exports[`should render AddressEdit with props correctly 1`] = `
|
||||
Set as the default address
|
||||
</span>
|
||||
</div>
|
||||
<div role="switch"
|
||||
<div
|
||||
role="switch"
|
||||
class="van-switch van-switch--on"
|
||||
tabindex="0"
|
||||
aria-checked="true"
|
||||
@ -210,7 +230,8 @@ exports[`should render AddressEdit with props correctly 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-address-edit__buttons">
|
||||
<button type="submit"
|
||||
<button
|
||||
type="submit"
|
||||
class="van-button van-button--primary van-button--normal van-button--block van-button--round van-address-edit__button"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -226,7 +247,8 @@ exports[`should render AddressEdit with props correctly 1`] = `
|
||||
exports[`should valid address detail and render error message correctly 1`] = `
|
||||
<div class="van-cell van-field van-address-edit-detail">
|
||||
<div class="van-cell__title van-field__label">
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
for="van-field-input"
|
||||
>
|
||||
Address
|
||||
@ -234,7 +256,8 @@ exports[`should valid address detail and render error message correctly 1`] = `
|
||||
</div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
<div class="van-field__body">
|
||||
<textarea id="van-field-input"
|
||||
<textarea
|
||||
id="van-field-input"
|
||||
rows="1"
|
||||
class="van-field__control"
|
||||
placeholder="Address"
|
||||
@ -251,12 +274,14 @@ exports[`should valid address detail and render error message correctly 1`] = `
|
||||
`;
|
||||
|
||||
exports[`should valid area code and render error message correctly 1`] = `
|
||||
<div class="van-cell van-cell--clickable van-field"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-field"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title van-field__label">
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
for="van-field-input"
|
||||
>
|
||||
Area
|
||||
@ -264,7 +289,8 @@ exports[`should valid area code and render error message correctly 1`] = `
|
||||
</div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
<div class="van-field__body">
|
||||
<input type="text"
|
||||
<input
|
||||
type="text"
|
||||
id="van-field-input"
|
||||
class="van-field__control"
|
||||
readonly
|
||||
@ -281,7 +307,8 @@ exports[`should valid area code and render error message correctly 1`] = `
|
||||
exports[`should valid name and render error message correctly 1`] = `
|
||||
<div class="van-cell van-field">
|
||||
<div class="van-cell__title van-field__label">
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
for="van-field-input"
|
||||
>
|
||||
Name
|
||||
@ -289,7 +316,8 @@ exports[`should valid name and render error message correctly 1`] = `
|
||||
</div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
<div class="van-field__body">
|
||||
<input type="text"
|
||||
<input
|
||||
type="text"
|
||||
id="van-field-input"
|
||||
class="van-field__control"
|
||||
placeholder="Name"
|
||||
@ -306,7 +334,8 @@ exports[`should valid name and render error message correctly 1`] = `
|
||||
exports[`should valid tel and render error message correctly 1`] = `
|
||||
<div class="van-cell van-field">
|
||||
<div class="van-cell__title van-field__label">
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
for="van-field-input"
|
||||
>
|
||||
Phone
|
||||
@ -314,7 +343,8 @@ exports[`should valid tel and render error message correctly 1`] = `
|
||||
</div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
<div class="van-field__body">
|
||||
<input type="tel"
|
||||
<input
|
||||
type="tel"
|
||||
id="van-field-input"
|
||||
class="van-field__control"
|
||||
placeholder="Phone"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @jest-environment node
|
||||
* @vitest-environment node
|
||||
*/
|
||||
import Demo from '../demo/index.vue';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
@ -1,30 +1,35 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
<!--[-->
|
||||
<div class="van-address-list">
|
||||
<div class="van-radio-group"
|
||||
<div
|
||||
class="van-radio-group"
|
||||
role="radiogroup"
|
||||
>
|
||||
<!--[-->
|
||||
<!--[-->
|
||||
<div class="van-address-item">
|
||||
<div class="van-cell van-cell--borderless">
|
||||
<div class="van-cell__title van-address-item__title"
|
||||
<div
|
||||
class="van-cell__title van-address-item__title"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
<div role="radio"
|
||||
<div
|
||||
role="radio"
|
||||
class="van-radio"
|
||||
tabindex="0"
|
||||
aria-checked="true"
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-radio__icon van-radio__icon--round van-radio__icon--checked"
|
||||
<div
|
||||
class="van-radio__icon van-radio__icon--round van-radio__icon--checked"
|
||||
style="font-size:18px;"
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-success"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-success"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -35,7 +40,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div class="van-address-item__name">
|
||||
John Snow 13000000000
|
||||
<span style
|
||||
<span
|
||||
style
|
||||
class="van-tag van-tag--round van-tag--primary van-address-item__tag"
|
||||
>
|
||||
<!--[-->
|
||||
@ -49,7 +55,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<!--[-->
|
||||
<i class="van-badge__wrapper van-icon van-icon-edit van-address-item__edit"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-edit van-address-item__edit"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -58,20 +65,24 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div class="van-address-item">
|
||||
<div class="van-cell van-cell--borderless">
|
||||
<div class="van-cell__title van-address-item__title"
|
||||
<div
|
||||
class="van-cell__title van-address-item__title"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
<div role="radio"
|
||||
<div
|
||||
role="radio"
|
||||
class="van-radio"
|
||||
tabindex="0"
|
||||
aria-checked="false"
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-radio__icon van-radio__icon--round"
|
||||
<div
|
||||
class="van-radio__icon van-radio__icon--round"
|
||||
style="font-size:18px;"
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-success"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-success"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -90,7 +101,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<!--[-->
|
||||
<i class="van-badge__wrapper van-icon van-icon-edit van-address-item__edit"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-edit van-address-item__edit"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -104,7 +116,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div class="van-address-item van-address-item--disabled">
|
||||
<div class="van-cell van-cell--borderless">
|
||||
<div class="van-cell__title van-address-item__title"
|
||||
<div
|
||||
class="van-cell__title van-address-item__title"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -116,7 +129,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<!--[-->
|
||||
<i class="van-badge__wrapper van-icon van-icon-edit van-address-item__edit"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-edit van-address-item__edit"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -124,7 +138,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-address-list__bottom van-safe-area-bottom">
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal van-button--block van-button--round van-address-list__add"
|
||||
style
|
||||
>
|
||||
|
@ -1,20 +1,23 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
<div class="van-address-list">
|
||||
<div class="van-radio-group"
|
||||
<div
|
||||
class="van-radio-group"
|
||||
role="radiogroup"
|
||||
>
|
||||
<div class="van-address-item">
|
||||
<div class="van-cell van-cell--borderless">
|
||||
<div class="van-cell__title van-address-item__title">
|
||||
<div role="radio"
|
||||
<div
|
||||
role="radio"
|
||||
class="van-radio"
|
||||
tabindex="0"
|
||||
aria-checked="true"
|
||||
>
|
||||
<div class="van-radio__icon van-radio__icon--round van-radio__icon--checked"
|
||||
<div
|
||||
class="van-radio__icon van-radio__icon--round van-radio__icon--checked"
|
||||
style="font-size: 18px;"
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-success">
|
||||
@ -23,7 +26,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<span class="van-radio__label">
|
||||
<div class="van-address-item__name">
|
||||
John Snow 13000000000
|
||||
<transition-stub appear="false"
|
||||
<transition-stub
|
||||
appear="false"
|
||||
persisted="false"
|
||||
css="true"
|
||||
class="van-address-item__tag"
|
||||
@ -46,12 +50,14 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-address-item">
|
||||
<div class="van-cell van-cell--borderless">
|
||||
<div class="van-cell__title van-address-item__title">
|
||||
<div role="radio"
|
||||
<div
|
||||
role="radio"
|
||||
class="van-radio"
|
||||
tabindex="0"
|
||||
aria-checked="false"
|
||||
>
|
||||
<div class="van-radio__icon van-radio__icon--round"
|
||||
<div
|
||||
class="van-radio__icon van-radio__icon--round"
|
||||
style="font-size: 18px;"
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-success">
|
||||
@ -90,7 +96,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-address-list__bottom van-safe-area-bottom">
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal van-button--block van-button--round van-address-list__add"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
|
@ -1,13 +1,15 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render tag slot correctly 1`] = `
|
||||
<div class="van-address-list">
|
||||
<div class="van-radio-group"
|
||||
<div
|
||||
class="van-radio-group"
|
||||
role="radiogroup"
|
||||
>
|
||||
</div>
|
||||
<div class="van-address-list__bottom van-safe-area-bottom">
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal van-button--block van-button--round van-address-list__add"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @jest-environment node
|
||||
* @vitest-environment node
|
||||
*/
|
||||
import Demo from '../demo/index.vue';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
@ -7,7 +7,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-picker van-area">
|
||||
<div class="van-picker__toolbar">
|
||||
<!--[-->
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-picker__cancel van-haptics-feedback"
|
||||
>
|
||||
Cancel
|
||||
@ -15,22 +16,26 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-picker__title van-ellipsis">
|
||||
Title
|
||||
</div>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-picker__confirm van-haptics-feedback"
|
||||
>
|
||||
Confirm
|
||||
</button>
|
||||
</div>
|
||||
<div class="van-picker__columns"
|
||||
<div
|
||||
class="van-picker__columns"
|
||||
style="height:264px;"
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-picker-column">
|
||||
<ul style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
|
||||
<ul
|
||||
style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
|
||||
class="van-picker-column__wrapper"
|
||||
>
|
||||
<!--[-->
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item van-picker-column__item--selected"
|
||||
@ -39,7 +44,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Beijing
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -48,7 +54,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Zhejiang
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -60,11 +67,13 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</ul>
|
||||
</div>
|
||||
<div class="van-picker-column">
|
||||
<ul style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
|
||||
<ul
|
||||
style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
|
||||
class="van-picker-column__wrapper"
|
||||
>
|
||||
<!--[-->
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item van-picker-column__item--selected"
|
||||
@ -76,11 +85,13 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</ul>
|
||||
</div>
|
||||
<div class="van-picker-column">
|
||||
<ul style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
|
||||
<ul
|
||||
style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
|
||||
class="van-picker-column__wrapper"
|
||||
>
|
||||
<!--[-->
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item van-picker-column__item--selected"
|
||||
@ -89,7 +100,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Dongcheng
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -98,7 +110,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Xicheng
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -107,7 +120,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Chaoyang
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -116,7 +130,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Fengtai
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -125,7 +140,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Haidian
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -134,7 +150,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Fangshan
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -143,7 +160,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Tongzhou
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -152,7 +170,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Shunyi
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -161,7 +180,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Changping
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -173,11 +193,13 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</ul>
|
||||
</div>
|
||||
<!--[-->
|
||||
<div class="van-picker__mask"
|
||||
<div
|
||||
class="van-picker__mask"
|
||||
style="background-size:100% 110px;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-hairline-unset--top-bottom van-picker__frame"
|
||||
<div
|
||||
class="van-hairline-unset--top-bottom van-picker__frame"
|
||||
style="height:44px;"
|
||||
>
|
||||
</div>
|
||||
@ -189,7 +211,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-picker van-area">
|
||||
<div class="van-picker__toolbar">
|
||||
<!--[-->
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-picker__cancel van-haptics-feedback"
|
||||
>
|
||||
Cancel
|
||||
@ -197,22 +220,26 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-picker__title van-ellipsis">
|
||||
Title
|
||||
</div>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-picker__confirm van-haptics-feedback"
|
||||
>
|
||||
Confirm
|
||||
</button>
|
||||
</div>
|
||||
<div class="van-picker__columns"
|
||||
<div
|
||||
class="van-picker__columns"
|
||||
style="height:264px;"
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-picker-column">
|
||||
<ul style="transform:translate3d(0, 66px, 0);transition-duration:0ms;transition-property:none;"
|
||||
<ul
|
||||
style="transform:translate3d(0, 66px, 0);transition-duration:0ms;transition-property:none;"
|
||||
class="van-picker-column__wrapper"
|
||||
>
|
||||
<!--[-->
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -221,7 +248,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Beijing
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item van-picker-column__item--selected"
|
||||
@ -230,7 +258,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Zhejiang
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -242,11 +271,13 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</ul>
|
||||
</div>
|
||||
<div class="van-picker-column">
|
||||
<ul style="transform:translate3d(0, 22px, 0);transition-duration:0ms;transition-property:none;"
|
||||
<ul
|
||||
style="transform:translate3d(0, 22px, 0);transition-duration:0ms;transition-property:none;"
|
||||
class="van-picker-column__wrapper"
|
||||
>
|
||||
<!--[-->
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -255,7 +286,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Hangzhou
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -264,7 +296,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Ningbo
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item van-picker-column__item--selected"
|
||||
@ -273,7 +306,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Wenzhou
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -282,7 +316,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Jiaxin
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -294,11 +329,13 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</ul>
|
||||
</div>
|
||||
<div class="van-picker-column">
|
||||
<ul style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
|
||||
<ul
|
||||
style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
|
||||
class="van-picker-column__wrapper"
|
||||
>
|
||||
<!--[-->
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item van-picker-column__item--selected"
|
||||
@ -307,7 +344,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Lucheng
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -316,7 +354,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Wencheng
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -325,7 +364,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Shuntai
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -334,7 +374,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Ruian
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -346,11 +387,13 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</ul>
|
||||
</div>
|
||||
<!--[-->
|
||||
<div class="van-picker__mask"
|
||||
<div
|
||||
class="van-picker__mask"
|
||||
style="background-size:100% 110px;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-hairline-unset--top-bottom van-picker__frame"
|
||||
<div
|
||||
class="van-hairline-unset--top-bottom van-picker__frame"
|
||||
style="height:44px;"
|
||||
>
|
||||
</div>
|
||||
@ -362,7 +405,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-picker van-area">
|
||||
<div class="van-picker__toolbar">
|
||||
<!--[-->
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-picker__cancel van-haptics-feedback"
|
||||
>
|
||||
Cancel
|
||||
@ -370,22 +414,26 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-picker__title van-ellipsis">
|
||||
Title
|
||||
</div>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-picker__confirm van-haptics-feedback"
|
||||
>
|
||||
Confirm
|
||||
</button>
|
||||
</div>
|
||||
<div class="van-picker__columns"
|
||||
<div
|
||||
class="van-picker__columns"
|
||||
style="height:264px;"
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-picker-column">
|
||||
<ul style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
|
||||
<ul
|
||||
style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
|
||||
class="van-picker-column__wrapper"
|
||||
>
|
||||
<!--[-->
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item van-picker-column__item--selected"
|
||||
@ -394,7 +442,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Beijing
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -403,7 +452,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Zhejiang
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -415,11 +465,13 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</ul>
|
||||
</div>
|
||||
<div class="van-picker-column">
|
||||
<ul style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
|
||||
<ul
|
||||
style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
|
||||
class="van-picker-column__wrapper"
|
||||
>
|
||||
<!--[-->
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item van-picker-column__item--selected"
|
||||
@ -431,11 +483,13 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</ul>
|
||||
</div>
|
||||
<!--[-->
|
||||
<div class="van-picker__mask"
|
||||
<div
|
||||
class="van-picker__mask"
|
||||
style="background-size:100% 110px;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-hairline-unset--top-bottom van-picker__frame"
|
||||
<div
|
||||
class="van-hairline-unset--top-bottom van-picker__frame"
|
||||
style="height:44px;"
|
||||
>
|
||||
</div>
|
||||
@ -447,7 +501,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-picker van-area">
|
||||
<div class="van-picker__toolbar">
|
||||
<!--[-->
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-picker__cancel van-haptics-feedback"
|
||||
>
|
||||
Cancel
|
||||
@ -455,22 +510,26 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-picker__title van-ellipsis">
|
||||
Title
|
||||
</div>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-picker__confirm van-haptics-feedback"
|
||||
>
|
||||
Confirm
|
||||
</button>
|
||||
</div>
|
||||
<div class="van-picker__columns"
|
||||
<div
|
||||
class="van-picker__columns"
|
||||
style="height:264px;"
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-picker-column">
|
||||
<ul style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
|
||||
<ul
|
||||
style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
|
||||
class="van-picker-column__wrapper"
|
||||
>
|
||||
<!--[-->
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item van-picker-column__item--selected"
|
||||
@ -479,7 +538,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Choose
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -488,7 +548,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Beijing
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -497,7 +558,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Zhejiang
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -509,11 +571,13 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</ul>
|
||||
</div>
|
||||
<div class="van-picker-column">
|
||||
<ul style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
|
||||
<ul
|
||||
style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
|
||||
class="van-picker-column__wrapper"
|
||||
>
|
||||
<!--[-->
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item van-picker-column__item--selected"
|
||||
@ -525,11 +589,13 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</ul>
|
||||
</div>
|
||||
<div class="van-picker-column">
|
||||
<ul style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
|
||||
<ul
|
||||
style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
|
||||
class="van-picker-column__wrapper"
|
||||
>
|
||||
<!--[-->
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height:44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item van-picker-column__item--selected"
|
||||
@ -541,11 +607,13 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</ul>
|
||||
</div>
|
||||
<!--[-->
|
||||
<div class="van-picker__mask"
|
||||
<div
|
||||
class="van-picker__mask"
|
||||
style="background-size:100% 110px;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-hairline-unset--top-bottom van-picker__frame"
|
||||
<div
|
||||
class="van-hairline-unset--top-bottom van-picker__frame"
|
||||
style="height:44px;"
|
||||
>
|
||||
</div>
|
||||
|
@ -1,10 +1,11 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
<div class="van-picker van-area">
|
||||
<div class="van-picker__toolbar">
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-picker__cancel van-haptics-feedback"
|
||||
>
|
||||
Cancel
|
||||
@ -12,20 +13,24 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-picker__title van-ellipsis">
|
||||
Title
|
||||
</div>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-picker__confirm van-haptics-feedback"
|
||||
>
|
||||
Confirm
|
||||
</button>
|
||||
</div>
|
||||
<div class="van-picker__columns"
|
||||
<div
|
||||
class="van-picker__columns"
|
||||
style="height: 264px;"
|
||||
>
|
||||
<div class="van-picker-column">
|
||||
<ul style="transform: translate3d(0, 110px, 0); transition-duration: 0ms; transition-property: none;"
|
||||
<ul
|
||||
style="transform: translate3d(0, 110px, 0); transition-duration: 0ms; transition-property: none;"
|
||||
class="van-picker-column__wrapper"
|
||||
>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item van-picker-column__item--selected"
|
||||
@ -34,7 +39,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Beijing
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -43,7 +49,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Zhejiang
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -55,10 +62,12 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</ul>
|
||||
</div>
|
||||
<div class="van-picker-column">
|
||||
<ul style="transform: translate3d(0, 110px, 0); transition-duration: 0ms; transition-property: none;"
|
||||
<ul
|
||||
style="transform: translate3d(0, 110px, 0); transition-duration: 0ms; transition-property: none;"
|
||||
class="van-picker-column__wrapper"
|
||||
>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item van-picker-column__item--selected"
|
||||
@ -70,10 +79,12 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</ul>
|
||||
</div>
|
||||
<div class="van-picker-column">
|
||||
<ul style="transform: translate3d(0, 110px, 0); transition-duration: 0ms; transition-property: none;"
|
||||
<ul
|
||||
style="transform: translate3d(0, 110px, 0); transition-duration: 0ms; transition-property: none;"
|
||||
class="van-picker-column__wrapper"
|
||||
>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item van-picker-column__item--selected"
|
||||
@ -82,7 +93,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Dongcheng
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -91,7 +103,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Xicheng
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -100,7 +113,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Chaoyang
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -109,7 +123,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Fengtai
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -118,7 +133,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Haidian
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -127,7 +143,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Fangshan
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -136,7 +153,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Tongzhou
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -145,7 +163,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Shunyi
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -154,7 +173,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Changping
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -165,11 +185,13 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="van-picker__mask"
|
||||
<div
|
||||
class="van-picker__mask"
|
||||
style="background-size: 100% 110px;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-hairline-unset--top-bottom van-picker__frame"
|
||||
<div
|
||||
class="van-hairline-unset--top-bottom van-picker__frame"
|
||||
style="height: 44px;"
|
||||
>
|
||||
</div>
|
||||
@ -179,7 +201,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
<div class="van-picker van-area">
|
||||
<div class="van-picker__toolbar">
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-picker__cancel van-haptics-feedback"
|
||||
>
|
||||
Cancel
|
||||
@ -187,20 +210,24 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-picker__title van-ellipsis">
|
||||
Title
|
||||
</div>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-picker__confirm van-haptics-feedback"
|
||||
>
|
||||
Confirm
|
||||
</button>
|
||||
</div>
|
||||
<div class="van-picker__columns"
|
||||
<div
|
||||
class="van-picker__columns"
|
||||
style="height: 264px;"
|
||||
>
|
||||
<div class="van-picker-column">
|
||||
<ul style="transform: translate3d(0, 66px, 0); transition-duration: 0ms; transition-property: none;"
|
||||
<ul
|
||||
style="transform: translate3d(0, 66px, 0); transition-duration: 0ms; transition-property: none;"
|
||||
class="van-picker-column__wrapper"
|
||||
>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -209,7 +236,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Beijing
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item van-picker-column__item--selected"
|
||||
@ -218,7 +246,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Zhejiang
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -230,10 +259,12 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</ul>
|
||||
</div>
|
||||
<div class="van-picker-column">
|
||||
<ul style="transform: translate3d(0, 22px, 0); transition-duration: 0ms; transition-property: none;"
|
||||
<ul
|
||||
style="transform: translate3d(0, 22px, 0); transition-duration: 0ms; transition-property: none;"
|
||||
class="van-picker-column__wrapper"
|
||||
>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -242,7 +273,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Hangzhou
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -251,7 +283,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Ningbo
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item van-picker-column__item--selected"
|
||||
@ -260,7 +293,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Wenzhou
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -269,7 +303,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Jiaxin
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -281,10 +316,12 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</ul>
|
||||
</div>
|
||||
<div class="van-picker-column">
|
||||
<ul style="transform: translate3d(0, 110px, 0); transition-duration: 0ms; transition-property: none;"
|
||||
<ul
|
||||
style="transform: translate3d(0, 110px, 0); transition-duration: 0ms; transition-property: none;"
|
||||
class="van-picker-column__wrapper"
|
||||
>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item van-picker-column__item--selected"
|
||||
@ -293,7 +330,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Lucheng
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -302,7 +340,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Wencheng
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -311,7 +350,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Shuntai
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -320,7 +360,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Ruian
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -331,11 +372,13 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="van-picker__mask"
|
||||
<div
|
||||
class="van-picker__mask"
|
||||
style="background-size: 100% 110px;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-hairline-unset--top-bottom van-picker__frame"
|
||||
<div
|
||||
class="van-hairline-unset--top-bottom van-picker__frame"
|
||||
style="height: 44px;"
|
||||
>
|
||||
</div>
|
||||
@ -345,7 +388,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
<div class="van-picker van-area">
|
||||
<div class="van-picker__toolbar">
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-picker__cancel van-haptics-feedback"
|
||||
>
|
||||
Cancel
|
||||
@ -353,20 +397,24 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-picker__title van-ellipsis">
|
||||
Title
|
||||
</div>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-picker__confirm van-haptics-feedback"
|
||||
>
|
||||
Confirm
|
||||
</button>
|
||||
</div>
|
||||
<div class="van-picker__columns"
|
||||
<div
|
||||
class="van-picker__columns"
|
||||
style="height: 264px;"
|
||||
>
|
||||
<div class="van-picker-column">
|
||||
<ul style="transform: translate3d(0, 110px, 0); transition-duration: 0ms; transition-property: none;"
|
||||
<ul
|
||||
style="transform: translate3d(0, 110px, 0); transition-duration: 0ms; transition-property: none;"
|
||||
class="van-picker-column__wrapper"
|
||||
>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item van-picker-column__item--selected"
|
||||
@ -375,7 +423,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Beijing
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -384,7 +433,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Zhejiang
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -396,10 +446,12 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</ul>
|
||||
</div>
|
||||
<div class="van-picker-column">
|
||||
<ul style="transform: translate3d(0, 110px, 0); transition-duration: 0ms; transition-property: none;"
|
||||
<ul
|
||||
style="transform: translate3d(0, 110px, 0); transition-duration: 0ms; transition-property: none;"
|
||||
class="van-picker-column__wrapper"
|
||||
>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item van-picker-column__item--selected"
|
||||
@ -410,11 +462,13 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="van-picker__mask"
|
||||
<div
|
||||
class="van-picker__mask"
|
||||
style="background-size: 100% 110px;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-hairline-unset--top-bottom van-picker__frame"
|
||||
<div
|
||||
class="van-hairline-unset--top-bottom van-picker__frame"
|
||||
style="height: 44px;"
|
||||
>
|
||||
</div>
|
||||
@ -424,7 +478,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
<div class="van-picker van-area">
|
||||
<div class="van-picker__toolbar">
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-picker__cancel van-haptics-feedback"
|
||||
>
|
||||
Cancel
|
||||
@ -432,20 +487,24 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-picker__title van-ellipsis">
|
||||
Title
|
||||
</div>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-picker__confirm van-haptics-feedback"
|
||||
>
|
||||
Confirm
|
||||
</button>
|
||||
</div>
|
||||
<div class="van-picker__columns"
|
||||
<div
|
||||
class="van-picker__columns"
|
||||
style="height: 264px;"
|
||||
>
|
||||
<div class="van-picker-column">
|
||||
<ul style="transform: translate3d(0, 110px, 0); transition-duration: 0ms; transition-property: none;"
|
||||
<ul
|
||||
style="transform: translate3d(0, 110px, 0); transition-duration: 0ms; transition-property: none;"
|
||||
class="van-picker-column__wrapper"
|
||||
>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item van-picker-column__item--selected"
|
||||
@ -454,7 +513,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Choose
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -463,7 +523,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Beijing
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -472,7 +533,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Zhejiang
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -484,10 +546,12 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</ul>
|
||||
</div>
|
||||
<div class="van-picker-column">
|
||||
<ul style="transform: translate3d(0, 110px, 0); transition-duration: 0ms; transition-property: none;"
|
||||
<ul
|
||||
style="transform: translate3d(0, 110px, 0); transition-duration: 0ms; transition-property: none;"
|
||||
class="van-picker-column__wrapper"
|
||||
>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item van-picker-column__item--selected"
|
||||
@ -499,10 +563,12 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</ul>
|
||||
</div>
|
||||
<div class="van-picker-column">
|
||||
<ul style="transform: translate3d(0, 110px, 0); transition-duration: 0ms; transition-property: none;"
|
||||
<ul
|
||||
style="transform: translate3d(0, 110px, 0); transition-duration: 0ms; transition-property: none;"
|
||||
class="van-picker-column__wrapper"
|
||||
>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item van-picker-column__item--selected"
|
||||
@ -513,11 +579,13 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="van-picker__mask"
|
||||
<div
|
||||
class="van-picker__mask"
|
||||
style="background-size: 100% 110px;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-hairline-unset--top-bottom van-picker__frame"
|
||||
<div
|
||||
class="van-hairline-unset--top-bottom van-picker__frame"
|
||||
style="height: 44px;"
|
||||
>
|
||||
</div>
|
||||
|
@ -1,25 +1,29 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render columns-top、columns-bottom slot correctly 1`] = `
|
||||
<div class="van-picker van-area">
|
||||
<div class="van-picker__toolbar">
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-picker__cancel van-haptics-feedback"
|
||||
>
|
||||
Cancel
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-picker__confirm van-haptics-feedback"
|
||||
>
|
||||
Confirm
|
||||
</button>
|
||||
</div>
|
||||
Top
|
||||
<div class="van-picker__columns"
|
||||
<div
|
||||
class="van-picker__columns"
|
||||
style="height: 264px;"
|
||||
>
|
||||
<div class="van-picker-column">
|
||||
<ul style="transform: translate3d(0, 110px, 0); transition-duration: 0ms; transition-property: none;"
|
||||
<ul
|
||||
style="transform: translate3d(0, 110px, 0); transition-duration: 0ms; transition-property: none;"
|
||||
class="van-picker-column__wrapper"
|
||||
>
|
||||
</ul>
|
||||
@ -31,13 +35,15 @@ exports[`should render columns-top、columns-bottom slot correctly 1`] = `
|
||||
|
||||
exports[`should render title slot correctly 1`] = `
|
||||
<div class="van-picker__toolbar">
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-picker__cancel van-haptics-feedback"
|
||||
>
|
||||
Cancel
|
||||
</button>
|
||||
Custom Title
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-picker__confirm van-haptics-feedback"
|
||||
>
|
||||
Confirm
|
||||
@ -48,25 +54,30 @@ exports[`should render title slot correctly 1`] = `
|
||||
exports[`should render two columns when columns-num prop is two 1`] = `
|
||||
<div class="van-picker van-area">
|
||||
<div class="van-picker__toolbar">
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-picker__cancel van-haptics-feedback"
|
||||
>
|
||||
Cancel
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-picker__confirm van-haptics-feedback"
|
||||
>
|
||||
Confirm
|
||||
</button>
|
||||
</div>
|
||||
<div class="van-picker__columns"
|
||||
<div
|
||||
class="van-picker__columns"
|
||||
style="height: 264px;"
|
||||
>
|
||||
<div class="van-picker-column">
|
||||
<ul style="transform: translate3d(0, 110px, 0); transition-duration: 0ms; transition-property: none;"
|
||||
<ul
|
||||
style="transform: translate3d(0, 110px, 0); transition-duration: 0ms; transition-property: none;"
|
||||
class="van-picker-column__wrapper"
|
||||
>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item van-picker-column__item--selected"
|
||||
@ -75,7 +86,8 @@ exports[`should render two columns when columns-num prop is two 1`] = `
|
||||
北京市
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -87,10 +99,12 @@ exports[`should render two columns when columns-num prop is two 1`] = `
|
||||
</ul>
|
||||
</div>
|
||||
<div class="van-picker-column">
|
||||
<ul style="transform: translate3d(0, 110px, 0); transition-duration: 0ms; transition-property: none;"
|
||||
<ul
|
||||
style="transform: translate3d(0, 110px, 0); transition-duration: 0ms; transition-property: none;"
|
||||
class="van-picker-column__wrapper"
|
||||
>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item van-picker-column__item--selected"
|
||||
@ -99,7 +113,8 @@ exports[`should render two columns when columns-num prop is two 1`] = `
|
||||
北京市
|
||||
</div>
|
||||
</li>
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item"
|
||||
@ -110,11 +125,13 @@ exports[`should render two columns when columns-num prop is two 1`] = `
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="van-picker__mask"
|
||||
<div
|
||||
class="van-picker__mask"
|
||||
style="background-size: 100% 110px;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-hairline-unset--top-bottom van-picker__frame"
|
||||
<div
|
||||
class="van-hairline-unset--top-bottom van-picker__frame"
|
||||
style="height: 44px;"
|
||||
>
|
||||
</div>
|
||||
@ -123,7 +140,8 @@ exports[`should render two columns when columns-num prop is two 1`] = `
|
||||
`;
|
||||
|
||||
exports[`should watch modelValue prop and render correctly 1`] = `
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item van-picker-column__item--selected"
|
||||
@ -135,7 +153,8 @@ exports[`should watch modelValue prop and render correctly 1`] = `
|
||||
`;
|
||||
|
||||
exports[`should watch modelValue prop and render correctly 2`] = `
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item van-picker-column__item--selected"
|
||||
@ -147,7 +166,8 @@ exports[`should watch modelValue prop and render correctly 2`] = `
|
||||
`;
|
||||
|
||||
exports[`should watch modelValue prop and render correctly 3`] = `
|
||||
<li role="button"
|
||||
<li
|
||||
role="button"
|
||||
style="height: 44px;"
|
||||
tabindex="0"
|
||||
class="van-picker-column__item van-picker-column__item--selected"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @jest-environment node
|
||||
* @vitest-environment node
|
||||
*/
|
||||
import Demo from '../demo/index.vue';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
@ -1,10 +1,11 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-tabs van-tabs--line">
|
||||
<!--[-->
|
||||
<div class="van-tabs__wrap">
|
||||
<div role="tablist"
|
||||
<div
|
||||
role="tablist"
|
||||
class="van-tabs__nav van-tabs__nav--line van-tabs__nav--complete"
|
||||
style
|
||||
aria-orientation="horizontal"
|
||||
@ -15,7 +16,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-tabs__content">
|
||||
<!--[-->
|
||||
<!--[-->
|
||||
<div id="van-tab"
|
||||
<div
|
||||
id="van-tab"
|
||||
role="tabpanel"
|
||||
class="van-tab__panel"
|
||||
tabindex="-1"
|
||||
@ -23,7 +25,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
style="display:none;"
|
||||
>
|
||||
</div>
|
||||
<div id="van-tab"
|
||||
<div
|
||||
id="van-tab"
|
||||
role="tabpanel"
|
||||
class="van-tab__panel"
|
||||
tabindex="-1"
|
||||
@ -31,7 +34,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
style="display:none;"
|
||||
>
|
||||
</div>
|
||||
<div id="van-tab"
|
||||
<div
|
||||
id="van-tab"
|
||||
role="tabpanel"
|
||||
class="van-tab__panel"
|
||||
tabindex="-1"
|
||||
@ -39,7 +43,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
style="display:none;"
|
||||
>
|
||||
</div>
|
||||
<div id="van-tab"
|
||||
<div
|
||||
id="van-tab"
|
||||
role="tabpanel"
|
||||
class="van-tab__panel"
|
||||
tabindex="-1"
|
||||
@ -47,7 +52,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
style="display:none;"
|
||||
>
|
||||
</div>
|
||||
<div id="van-tab"
|
||||
<div
|
||||
id="van-tab"
|
||||
role="tabpanel"
|
||||
class="van-tab__panel"
|
||||
tabindex="-1"
|
||||
|
@ -1,13 +1,15 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-tabs van-tabs--line">
|
||||
<div class="van-tabs__wrap">
|
||||
<div role="tablist"
|
||||
<div
|
||||
role="tablist"
|
||||
class="van-tabs__nav van-tabs__nav--line van-tabs__nav--complete"
|
||||
aria-orientation="horizontal"
|
||||
>
|
||||
<div id="van-tabs-0"
|
||||
<div
|
||||
id="van-tabs-0"
|
||||
role="tab"
|
||||
class="van-tab van-tab--line van-tab--grow van-tab--active"
|
||||
tabindex="0"
|
||||
@ -18,7 +20,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Basic Usage
|
||||
</span>
|
||||
</div>
|
||||
<div id="van-tabs-1"
|
||||
<div
|
||||
id="van-tabs-1"
|
||||
role="tab"
|
||||
class="van-tab van-tab--line van-tab--grow"
|
||||
tabindex="-1"
|
||||
@ -29,7 +32,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Custom Position
|
||||
</span>
|
||||
</div>
|
||||
<div id="van-tabs-2"
|
||||
<div
|
||||
id="van-tabs-2"
|
||||
role="tab"
|
||||
class="van-tab van-tab--line van-tab--grow"
|
||||
tabindex="-1"
|
||||
@ -40,7 +44,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Custom Content
|
||||
</span>
|
||||
</div>
|
||||
<div id="van-tabs-3"
|
||||
<div
|
||||
id="van-tabs-3"
|
||||
role="tab"
|
||||
class="van-tab van-tab--line van-tab--grow"
|
||||
tabindex="-1"
|
||||
@ -51,7 +56,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Set Scroll Target
|
||||
</span>
|
||||
</div>
|
||||
<div id="van-tabs-4"
|
||||
<div
|
||||
id="van-tabs-4"
|
||||
role="tab"
|
||||
class="van-tab van-tab--line van-tab--grow"
|
||||
tabindex="-1"
|
||||
@ -62,14 +68,16 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Immediate Scroll
|
||||
</span>
|
||||
</div>
|
||||
<div class="van-tabs__line"
|
||||
<div
|
||||
class="van-tabs__line"
|
||||
style="transform: translateX(50px) translateX(-50%);"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-tabs__content">
|
||||
<div id="van-tab"
|
||||
<div
|
||||
id="van-tab"
|
||||
role="tabpanel"
|
||||
class="van-tab__panel"
|
||||
tabindex="0"
|
||||
@ -429,7 +437,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-back-top__placeholder">
|
||||
</div>
|
||||
</div>
|
||||
<div id="van-tab"
|
||||
<div
|
||||
id="van-tab"
|
||||
role="tabpanel"
|
||||
class="van-tab__panel"
|
||||
tabindex="-1"
|
||||
@ -437,7 +446,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
style="display: none;"
|
||||
>
|
||||
</div>
|
||||
<div id="van-tab"
|
||||
<div
|
||||
id="van-tab"
|
||||
role="tabpanel"
|
||||
class="van-tab__panel"
|
||||
tabindex="-1"
|
||||
@ -445,7 +455,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
style="display: none;"
|
||||
>
|
||||
</div>
|
||||
<div id="van-tab"
|
||||
<div
|
||||
id="van-tab"
|
||||
role="tabpanel"
|
||||
class="van-tab__panel"
|
||||
tabindex="-1"
|
||||
@ -453,7 +464,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
style="display: none;"
|
||||
>
|
||||
</div>
|
||||
<div id="van-tab"
|
||||
<div
|
||||
id="van-tab"
|
||||
role="tabpanel"
|
||||
class="van-tab__panel"
|
||||
tabindex="-1"
|
||||
|
@ -1,10 +1,12 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render correctly when SSR 1`] = `
|
||||
<div class="van-back-top"
|
||||
<div
|
||||
class="van-back-top"
|
||||
style
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-back-top van-back-top__icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-back-top van-back-top__icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @jest-environment node
|
||||
* @vitest-environment node
|
||||
*/
|
||||
import Demo from '../demo/index.vue';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
@ -33,7 +33,7 @@ test('should allow position prop to contain unit', async () => {
|
||||
});
|
||||
|
||||
test('should emit click event after clicked', async () => {
|
||||
const windowScroll = jest.fn();
|
||||
const windowScroll = vi.fn();
|
||||
window.scrollTo = windowScroll;
|
||||
|
||||
const root = document.createElement('div');
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @jest-environment node
|
||||
* @vitest-environment node
|
||||
*/
|
||||
import { BackTop } from '..';
|
||||
import { renderComponentToString } from '../../../test';
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
@ -8,7 +8,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div class="child">
|
||||
</div>
|
||||
<div class="van-badge van-badge--top-right van-badge--fixed"
|
||||
<div
|
||||
class="van-badge van-badge--top-right van-badge--fixed"
|
||||
style
|
||||
>
|
||||
5
|
||||
@ -18,7 +19,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div class="child">
|
||||
</div>
|
||||
<div class="van-badge van-badge--top-right van-badge--fixed"
|
||||
<div
|
||||
class="van-badge van-badge--top-right van-badge--fixed"
|
||||
style
|
||||
>
|
||||
10
|
||||
@ -28,7 +30,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div class="child">
|
||||
</div>
|
||||
<div class="van-badge van-badge--top-right van-badge--fixed"
|
||||
<div
|
||||
class="van-badge van-badge--top-right van-badge--fixed"
|
||||
style
|
||||
>
|
||||
Hot
|
||||
@ -38,7 +41,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div class="child">
|
||||
</div>
|
||||
<div class="van-badge van-badge--top-right van-badge--dot van-badge--fixed"
|
||||
<div
|
||||
class="van-badge van-badge--top-right van-badge--dot van-badge--fixed"
|
||||
style
|
||||
>
|
||||
</div>
|
||||
@ -50,7 +54,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div class="child">
|
||||
</div>
|
||||
<div class="van-badge van-badge--top-right van-badge--fixed"
|
||||
<div
|
||||
class="van-badge van-badge--top-right van-badge--fixed"
|
||||
style
|
||||
>
|
||||
9+
|
||||
@ -60,7 +65,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div class="child">
|
||||
</div>
|
||||
<div class="van-badge van-badge--top-right van-badge--fixed"
|
||||
<div
|
||||
class="van-badge van-badge--top-right van-badge--fixed"
|
||||
style
|
||||
>
|
||||
20+
|
||||
@ -70,7 +76,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div class="child">
|
||||
</div>
|
||||
<div class="van-badge van-badge--top-right van-badge--fixed"
|
||||
<div
|
||||
class="van-badge van-badge--top-right van-badge--fixed"
|
||||
style
|
||||
>
|
||||
99+
|
||||
@ -83,7 +90,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div class="child">
|
||||
</div>
|
||||
<div class="van-badge van-badge--top-right van-badge--fixed"
|
||||
<div
|
||||
class="van-badge van-badge--top-right van-badge--fixed"
|
||||
style="background:#1989fa;"
|
||||
>
|
||||
5
|
||||
@ -93,7 +101,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div class="child">
|
||||
</div>
|
||||
<div class="van-badge van-badge--top-right van-badge--fixed"
|
||||
<div
|
||||
class="van-badge van-badge--top-right van-badge--fixed"
|
||||
style="background:#1989fa;"
|
||||
>
|
||||
10
|
||||
@ -103,7 +112,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div class="child">
|
||||
</div>
|
||||
<div class="van-badge van-badge--top-right van-badge--dot van-badge--fixed"
|
||||
<div
|
||||
class="van-badge van-badge--top-right van-badge--dot van-badge--fixed"
|
||||
style="background:#1989fa;"
|
||||
>
|
||||
</div>
|
||||
@ -115,11 +125,13 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div class="child">
|
||||
</div>
|
||||
<div class="van-badge van-badge--top-right van-badge--fixed"
|
||||
<div
|
||||
class="van-badge van-badge--top-right van-badge--fixed"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
<i class="van-badge__wrapper van-icon van-icon-success badge-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-success badge-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -130,11 +142,13 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div class="child">
|
||||
</div>
|
||||
<div class="van-badge van-badge--top-right van-badge--fixed"
|
||||
<div
|
||||
class="van-badge van-badge--top-right van-badge--fixed"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
<i class="van-badge__wrapper van-icon van-icon-cross badge-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-cross badge-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -145,11 +159,13 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div class="child">
|
||||
</div>
|
||||
<div class="van-badge van-badge--top-right van-badge--fixed"
|
||||
<div
|
||||
class="van-badge van-badge--top-right van-badge--fixed"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
<i class="van-badge__wrapper van-icon van-icon-down badge-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-down badge-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -163,7 +179,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div class="child">
|
||||
</div>
|
||||
<div class="van-badge van-badge--top-left van-badge--fixed"
|
||||
<div
|
||||
class="van-badge van-badge--top-left van-badge--fixed"
|
||||
style
|
||||
>
|
||||
10
|
||||
@ -173,7 +190,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div class="child">
|
||||
</div>
|
||||
<div class="van-badge van-badge--bottom-left van-badge--fixed"
|
||||
<div
|
||||
class="van-badge van-badge--bottom-left van-badge--fixed"
|
||||
style
|
||||
>
|
||||
10
|
||||
@ -183,7 +201,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div class="child">
|
||||
</div>
|
||||
<div class="van-badge van-badge--bottom-right van-badge--fixed"
|
||||
<div
|
||||
class="van-badge van-badge--bottom-right van-badge--fixed"
|
||||
style
|
||||
>
|
||||
10
|
||||
@ -192,12 +211,14 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<div class="van-badge van-badge--top-right"
|
||||
<div
|
||||
class="van-badge van-badge--top-right"
|
||||
style="margin-left:16px;"
|
||||
>
|
||||
20
|
||||
</div>
|
||||
<div class="van-badge van-badge--top-right"
|
||||
<div
|
||||
class="van-badge van-badge--top-right"
|
||||
style="margin-left:16px;"
|
||||
>
|
||||
99+
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
@ -57,7 +57,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-badge__wrapper">
|
||||
<div class="child">
|
||||
</div>
|
||||
<div class="van-badge van-badge--top-right van-badge--fixed"
|
||||
<div
|
||||
class="van-badge van-badge--top-right van-badge--fixed"
|
||||
style="background: rgb(25, 137, 250);"
|
||||
>
|
||||
5
|
||||
@ -66,7 +67,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-badge__wrapper">
|
||||
<div class="child">
|
||||
</div>
|
||||
<div class="van-badge van-badge--top-right van-badge--fixed"
|
||||
<div
|
||||
class="van-badge van-badge--top-right van-badge--fixed"
|
||||
style="background: rgb(25, 137, 250);"
|
||||
>
|
||||
10
|
||||
@ -75,7 +77,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-badge__wrapper">
|
||||
<div class="child">
|
||||
</div>
|
||||
<div class="van-badge van-badge--top-right van-badge--dot van-badge--fixed"
|
||||
<div
|
||||
class="van-badge van-badge--top-right van-badge--dot van-badge--fixed"
|
||||
style="background: rgb(25, 137, 250);"
|
||||
>
|
||||
</div>
|
||||
@ -131,12 +134,14 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-badge van-badge--top-right"
|
||||
<div
|
||||
class="van-badge van-badge--top-right"
|
||||
style="margin-left: 16px;"
|
||||
>
|
||||
20
|
||||
</div>
|
||||
<div class="van-badge van-badge--top-right"
|
||||
<div
|
||||
class="van-badge van-badge--top-right"
|
||||
style="margin-left: 16px;"
|
||||
>
|
||||
99+
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render content slot correctly 1`] = `
|
||||
<div class="van-badge van-badge--top-right">
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @jest-environment node
|
||||
* @vitest-environment node
|
||||
*/
|
||||
import Demo from '../demo/index.vue';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
@ -1,53 +1,63 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
<div class="van-barrage"
|
||||
<div
|
||||
class="van-barrage"
|
||||
style="--move-distance: -100px;"
|
||||
>
|
||||
<div class="video">
|
||||
</div>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 0ms; animation-name: van-barrage; animation-timing-function: linear; top: 10px;"
|
||||
data-id="100"
|
||||
>
|
||||
</span>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 300ms; animation-name: van-barrage; animation-timing-function: linear; top: 110px;"
|
||||
data-id="101"
|
||||
>
|
||||
</span>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 600ms; animation-name: van-barrage; animation-timing-function: linear; top: 210px;"
|
||||
data-id="102"
|
||||
>
|
||||
</span>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 900ms; animation-name: van-barrage; animation-timing-function: linear; top: 310px;"
|
||||
data-id="103"
|
||||
>
|
||||
</span>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 1200ms; animation-name: van-barrage; animation-timing-function: linear; top: 10px;"
|
||||
data-id="104"
|
||||
>
|
||||
</span>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 1500ms; animation-name: van-barrage; animation-timing-function: linear; top: 110px;"
|
||||
data-id="105"
|
||||
>
|
||||
</span>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 1800ms; animation-name: van-barrage; animation-timing-function: linear; top: 210px;"
|
||||
data-id="106"
|
||||
>
|
||||
</span>
|
||||
</div>
|
||||
<div class="van-space van-space--horizontal van-space--align-center"
|
||||
<div
|
||||
class="van-space van-space--horizontal van-space--align-center"
|
||||
style="margin-top: 10px;"
|
||||
>
|
||||
<div class="van-space-item">
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--small"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -60,54 +70,65 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-barrage"
|
||||
<div
|
||||
class="van-barrage"
|
||||
style="--move-distance: -100px;"
|
||||
>
|
||||
<div class="video">
|
||||
</div>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 0ms; animation-name: van-barrage; animation-timing-function: linear; animation-play-state: paused; top: 10px;"
|
||||
data-id="100"
|
||||
>
|
||||
</span>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 300ms; animation-name: van-barrage; animation-timing-function: linear; animation-play-state: paused; top: 110px;"
|
||||
data-id="101"
|
||||
>
|
||||
</span>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 600ms; animation-name: van-barrage; animation-timing-function: linear; animation-play-state: paused; top: 210px;"
|
||||
data-id="102"
|
||||
>
|
||||
</span>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 900ms; animation-name: van-barrage; animation-timing-function: linear; animation-play-state: paused; top: 310px;"
|
||||
data-id="103"
|
||||
>
|
||||
</span>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 1200ms; animation-name: van-barrage; animation-timing-function: linear; animation-play-state: paused; top: 10px;"
|
||||
data-id="104"
|
||||
>
|
||||
</span>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 1500ms; animation-name: van-barrage; animation-timing-function: linear; animation-play-state: paused; top: 110px;"
|
||||
data-id="105"
|
||||
>
|
||||
</span>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 1800ms; animation-name: van-barrage; animation-timing-function: linear; animation-play-state: paused; top: 210px;"
|
||||
data-id="106"
|
||||
>
|
||||
</span>
|
||||
</div>
|
||||
<div class="van-space van-space--horizontal van-space--align-center"
|
||||
<div
|
||||
class="van-space van-space--horizontal van-space--align-center"
|
||||
style="margin-top: 10px;"
|
||||
>
|
||||
<div class="van-space-item"
|
||||
<div
|
||||
class="van-space-item"
|
||||
style="margin-right: 8px;"
|
||||
>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--small van-button--disabled"
|
||||
disabled
|
||||
>
|
||||
@ -119,7 +140,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</button>
|
||||
</div>
|
||||
<div class="van-space-item">
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--default van-button--small"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
|
@ -1,44 +1,53 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should auto play when only list props 1`] = `
|
||||
<div class="van-barrage"
|
||||
<div
|
||||
class="van-barrage"
|
||||
style="--move-distance: -100px;"
|
||||
>
|
||||
<div class="video"
|
||||
<div
|
||||
class="video"
|
||||
style="width: 100%; height: 150px;"
|
||||
>
|
||||
</div>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 0ms; animation-name: van-barrage; animation-timing-function: linear; top: 10px;"
|
||||
data-id="100"
|
||||
>
|
||||
</span>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 300ms; animation-name: van-barrage; animation-timing-function: linear; top: 110px;"
|
||||
data-id="101"
|
||||
>
|
||||
</span>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 600ms; animation-name: van-barrage; animation-timing-function: linear; top: 210px;"
|
||||
data-id="102"
|
||||
>
|
||||
</span>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 900ms; animation-name: van-barrage; animation-timing-function: linear; top: 310px;"
|
||||
data-id="103"
|
||||
>
|
||||
</span>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 1200ms; animation-name: van-barrage; animation-timing-function: linear; top: 10px;"
|
||||
data-id="104"
|
||||
>
|
||||
</span>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 1500ms; animation-name: van-barrage; animation-timing-function: linear; top: 110px;"
|
||||
data-id="105"
|
||||
>
|
||||
</span>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 1800ms; animation-name: van-barrage; animation-timing-function: linear; top: 210px;"
|
||||
data-id="106"
|
||||
>
|
||||
@ -47,44 +56,53 @@ exports[`should auto play when only list props 1`] = `
|
||||
`;
|
||||
|
||||
exports[`should emit "update:modelValue" when animationend 1`] = `
|
||||
<div class="van-barrage"
|
||||
<div
|
||||
class="van-barrage"
|
||||
style="--move-distance: -100px;"
|
||||
>
|
||||
<div class="video"
|
||||
<div
|
||||
class="video"
|
||||
style="width: 100%; height: 150px;"
|
||||
>
|
||||
</div>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 0ms; animation-name: van-barrage; animation-timing-function: linear; animation-play-state: paused; top: 10px;"
|
||||
data-id="100"
|
||||
>
|
||||
</span>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 300ms; animation-name: van-barrage; animation-timing-function: linear; animation-play-state: paused; top: 110px;"
|
||||
data-id="101"
|
||||
>
|
||||
</span>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 600ms; animation-name: van-barrage; animation-timing-function: linear; animation-play-state: paused; top: 210px;"
|
||||
data-id="102"
|
||||
>
|
||||
</span>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 900ms; animation-name: van-barrage; animation-timing-function: linear; animation-play-state: paused; top: 310px;"
|
||||
data-id="103"
|
||||
>
|
||||
</span>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 1200ms; animation-name: van-barrage; animation-timing-function: linear; animation-play-state: paused; top: 10px;"
|
||||
data-id="104"
|
||||
>
|
||||
</span>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 1500ms; animation-name: van-barrage; animation-timing-function: linear; animation-play-state: paused; top: 110px;"
|
||||
data-id="105"
|
||||
>
|
||||
</span>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 1800ms; animation-name: van-barrage; animation-timing-function: linear; animation-play-state: paused; top: 210px;"
|
||||
data-id="106"
|
||||
>
|
||||
@ -93,44 +111,53 @@ exports[`should emit "update:modelValue" when animationend 1`] = `
|
||||
`;
|
||||
|
||||
exports[`should not auto play use play function when use play function 1`] = `
|
||||
<div class="van-barrage"
|
||||
<div
|
||||
class="van-barrage"
|
||||
style="--move-distance: -100px;"
|
||||
>
|
||||
<div class="video"
|
||||
<div
|
||||
class="video"
|
||||
style="width: 100%; height: 150px;"
|
||||
>
|
||||
</div>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 0ms; animation-name: van-barrage; animation-timing-function: linear; animation-play-state: paused; top: 10px;"
|
||||
data-id="100"
|
||||
>
|
||||
</span>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 300ms; animation-name: van-barrage; animation-timing-function: linear; animation-play-state: paused; top: 110px;"
|
||||
data-id="101"
|
||||
>
|
||||
</span>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 600ms; animation-name: van-barrage; animation-timing-function: linear; animation-play-state: paused; top: 210px;"
|
||||
data-id="102"
|
||||
>
|
||||
</span>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 900ms; animation-name: van-barrage; animation-timing-function: linear; animation-play-state: paused; top: 310px;"
|
||||
data-id="103"
|
||||
>
|
||||
</span>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 1200ms; animation-name: van-barrage; animation-timing-function: linear; animation-play-state: paused; top: 10px;"
|
||||
data-id="104"
|
||||
>
|
||||
</span>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 1500ms; animation-name: van-barrage; animation-timing-function: linear; animation-play-state: paused; top: 110px;"
|
||||
data-id="105"
|
||||
>
|
||||
</span>
|
||||
<span class="van-barrage__item"
|
||||
<span
|
||||
class="van-barrage__item"
|
||||
style="animation-duration: 4000ms; animation-delay: 1800ms; animation-name: van-barrage; animation-timing-function: linear; animation-play-state: paused; top: 210px;"
|
||||
data-id="106"
|
||||
>
|
||||
|
@ -1,11 +1,12 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div>
|
||||
<!--[-->
|
||||
<div class="demo-button-row">
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal"
|
||||
style
|
||||
>
|
||||
@ -16,7 +17,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--success van-button--normal"
|
||||
style
|
||||
>
|
||||
@ -27,7 +29,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--default van-button--normal"
|
||||
style
|
||||
>
|
||||
@ -39,7 +42,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--danger van-button--normal"
|
||||
style
|
||||
>
|
||||
@ -50,7 +54,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--warning van-button--normal"
|
||||
style
|
||||
>
|
||||
@ -64,7 +69,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal van-button--plain"
|
||||
style
|
||||
>
|
||||
@ -74,7 +80,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--success van-button--normal van-button--plain"
|
||||
style
|
||||
>
|
||||
@ -87,7 +94,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal van-button--plain van-button--hairline van-hairline--surround"
|
||||
style
|
||||
>
|
||||
@ -97,7 +105,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--success van-button--normal van-button--plain van-button--hairline van-hairline--surround"
|
||||
style
|
||||
>
|
||||
@ -110,7 +119,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal van-button--disabled"
|
||||
style
|
||||
disabled
|
||||
@ -121,7 +131,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--success van-button--normal van-button--disabled"
|
||||
style
|
||||
disabled
|
||||
@ -135,22 +146,27 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal van-button--loading"
|
||||
style
|
||||
>
|
||||
<div class="van-button__content">
|
||||
<div class="van-loading van-loading--circular van-button__loading"
|
||||
<div
|
||||
class="van-loading van-loading--circular van-button__loading"
|
||||
aria-live="polite"
|
||||
aria-busy="true"
|
||||
>
|
||||
<span class="van-loading__spinner van-loading__spinner--circular"
|
||||
<span
|
||||
class="van-loading__spinner van-loading__spinner--circular"
|
||||
style
|
||||
>
|
||||
<svg class="van-loading__circular"
|
||||
<svg
|
||||
class="van-loading__circular"
|
||||
viewbox="25 25 50 50"
|
||||
>
|
||||
<circle cx="50"
|
||||
<circle
|
||||
cx="50"
|
||||
cy="50"
|
||||
r="20"
|
||||
fill="none"
|
||||
@ -161,16 +177,19 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal van-button--loading"
|
||||
style
|
||||
>
|
||||
<div class="van-button__content">
|
||||
<div class="van-loading van-loading--spinner van-button__loading"
|
||||
<div
|
||||
class="van-loading van-loading--spinner van-button__loading"
|
||||
aria-live="polite"
|
||||
aria-busy="true"
|
||||
>
|
||||
<span class="van-loading__spinner van-loading__spinner--spinner"
|
||||
<span
|
||||
class="van-loading__spinner van-loading__spinner--spinner"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -202,22 +221,27 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--success van-button--normal van-button--loading"
|
||||
style
|
||||
>
|
||||
<div class="van-button__content">
|
||||
<div class="van-loading van-loading--circular van-button__loading"
|
||||
<div
|
||||
class="van-loading van-loading--circular van-button__loading"
|
||||
aria-live="polite"
|
||||
aria-busy="true"
|
||||
>
|
||||
<span class="van-loading__spinner van-loading__spinner--circular"
|
||||
<span
|
||||
class="van-loading__spinner van-loading__spinner--circular"
|
||||
style
|
||||
>
|
||||
<svg class="van-loading__circular"
|
||||
<svg
|
||||
class="van-loading__circular"
|
||||
viewbox="25 25 50 50"
|
||||
>
|
||||
<circle cx="50"
|
||||
<circle
|
||||
cx="50"
|
||||
cy="50"
|
||||
r="20"
|
||||
fill="none"
|
||||
@ -234,7 +258,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal van-button--square"
|
||||
style
|
||||
>
|
||||
@ -244,7 +269,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--success van-button--normal van-button--round"
|
||||
style
|
||||
>
|
||||
@ -257,24 +283,28 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal"
|
||||
style
|
||||
>
|
||||
<div class="van-button__content">
|
||||
<i class="van-badge__wrapper van-icon van-icon-plus van-button__icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-plus van-button__icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</i>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal"
|
||||
style
|
||||
>
|
||||
<div class="van-button__content">
|
||||
<i class="van-badge__wrapper van-icon van-icon-plus van-button__icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-plus van-button__icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -284,16 +314,19 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal van-button--plain"
|
||||
style
|
||||
>
|
||||
<div class="van-button__content">
|
||||
<i class="van-badge__wrapper van-icon van-button__icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-button__icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
<img class="van-icon__image"
|
||||
<img
|
||||
class="van-icon__image"
|
||||
src="https://fastly.jsdelivr.net/npm/@vant/assets/user-active.png"
|
||||
>
|
||||
</i>
|
||||
@ -305,7 +338,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--large"
|
||||
style
|
||||
>
|
||||
@ -316,7 +350,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal"
|
||||
style
|
||||
>
|
||||
@ -327,7 +362,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--small"
|
||||
style
|
||||
>
|
||||
@ -338,7 +374,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--mini"
|
||||
style
|
||||
>
|
||||
@ -352,7 +389,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal van-button--block"
|
||||
style
|
||||
>
|
||||
@ -366,7 +404,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal"
|
||||
style
|
||||
>
|
||||
@ -376,7 +415,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal"
|
||||
style
|
||||
>
|
||||
@ -389,7 +429,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--default van-button--normal"
|
||||
style="color:white;background:#7232dd;border-color:#7232dd;"
|
||||
>
|
||||
@ -399,7 +440,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--default van-button--normal van-button--plain"
|
||||
style="color:#7232dd;border-color:#7232dd;"
|
||||
>
|
||||
@ -409,7 +451,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--default van-button--normal"
|
||||
style="color:white;background:linear-gradient(to right, #ff6034, #ee0a24);border:0;"
|
||||
>
|
||||
@ -422,7 +465,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--danger van-button--normal van-button--round"
|
||||
style
|
||||
>
|
||||
@ -430,17 +474,20 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<span class="van-button__text">
|
||||
<!--[-->
|
||||
<div class="van-swipe notice-swipe">
|
||||
<div style="transition-duration:500ms;transform:translateY(0px);"
|
||||
<div
|
||||
style="transition-duration:500ms;transform:translateY(0px);"
|
||||
class="van-swipe__track van-swipe__track--vertical"
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-swipe-item"
|
||||
<div
|
||||
class="van-swipe-item"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
Do Task
|
||||
</div>
|
||||
<div class="van-swipe-item"
|
||||
<div
|
||||
class="van-swipe-item"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
|
@ -1,9 +1,10 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
<div class="demo-button-row">
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -12,7 +13,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--success van-button--normal"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -21,7 +23,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--default van-button--normal"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -31,7 +34,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--danger van-button--normal"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -40,7 +44,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--warning van-button--normal"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -51,7 +56,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</button>
|
||||
</div>
|
||||
<div>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal van-button--plain"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -60,7 +66,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--success van-button--normal van-button--plain"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -71,7 +78,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</button>
|
||||
</div>
|
||||
<div>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal van-button--plain van-button--hairline van-hairline--surround"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -80,7 +88,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--success van-button--normal van-button--plain van-button--hairline van-hairline--surround"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -91,7 +100,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</button>
|
||||
</div>
|
||||
<div>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal van-button--disabled"
|
||||
disabled
|
||||
>
|
||||
@ -101,7 +111,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--success van-button--normal van-button--disabled"
|
||||
disabled
|
||||
>
|
||||
@ -113,19 +124,23 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</button>
|
||||
</div>
|
||||
<div>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal van-button--loading"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
<div class="van-loading van-loading--circular van-button__loading"
|
||||
<div
|
||||
class="van-loading van-loading--circular van-button__loading"
|
||||
aria-live="polite"
|
||||
aria-busy="true"
|
||||
>
|
||||
<span class="van-loading__spinner van-loading__spinner--circular">
|
||||
<svg class="van-loading__circular"
|
||||
<svg
|
||||
class="van-loading__circular"
|
||||
viewbox="25 25 50 50"
|
||||
>
|
||||
<circle cx="50"
|
||||
<circle
|
||||
cx="50"
|
||||
cy="50"
|
||||
r="20"
|
||||
fill="none"
|
||||
@ -136,11 +151,13 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal van-button--loading"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
<div class="van-loading van-loading--spinner van-button__loading"
|
||||
<div
|
||||
class="van-loading van-loading--spinner van-button__loading"
|
||||
aria-live="polite"
|
||||
aria-busy="true"
|
||||
>
|
||||
@ -173,19 +190,23 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--success van-button--normal van-button--loading"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
<div class="van-loading van-loading--circular van-button__loading"
|
||||
<div
|
||||
class="van-loading van-loading--circular van-button__loading"
|
||||
aria-live="polite"
|
||||
aria-busy="true"
|
||||
>
|
||||
<span class="van-loading__spinner van-loading__spinner--circular">
|
||||
<svg class="van-loading__circular"
|
||||
<svg
|
||||
class="van-loading__circular"
|
||||
viewbox="25 25 50 50"
|
||||
>
|
||||
<circle cx="50"
|
||||
<circle
|
||||
cx="50"
|
||||
cy="50"
|
||||
r="20"
|
||||
fill="none"
|
||||
@ -201,7 +222,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</button>
|
||||
</div>
|
||||
<div>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal van-button--square"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -210,7 +232,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--success van-button--normal van-button--round"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -221,7 +244,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</button>
|
||||
</div>
|
||||
<div>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -229,7 +253,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</i>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -240,12 +265,14 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal van-button--plain"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
<i class="van-badge__wrapper van-icon van-button__icon">
|
||||
<img class="van-icon__image"
|
||||
<img
|
||||
class="van-icon__image"
|
||||
src="https://fastly.jsdelivr.net/npm/@vant/assets/user-active.png"
|
||||
>
|
||||
</i>
|
||||
@ -256,7 +283,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</button>
|
||||
</div>
|
||||
<div>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--large"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -265,7 +293,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -274,7 +303,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--small"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -283,7 +313,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--mini"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -294,7 +325,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</button>
|
||||
</div>
|
||||
<div>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal van-button--block"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -305,7 +337,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</button>
|
||||
</div>
|
||||
<div>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -314,7 +347,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -325,7 +359,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</button>
|
||||
</div>
|
||||
<div>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--default van-button--normal"
|
||||
style="color: white; background: rgb(114, 50, 221); border-color: #7232dd;"
|
||||
>
|
||||
@ -335,7 +370,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--default van-button--normal van-button--plain"
|
||||
style="color: rgb(114, 50, 221); border-color: #7232dd;"
|
||||
>
|
||||
@ -345,7 +381,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--default van-button--normal"
|
||||
style="color: white; border: 0px;"
|
||||
>
|
||||
@ -357,21 +394,25 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</button>
|
||||
</div>
|
||||
<div>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--danger van-button--normal van-button--round"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
<span class="van-button__text">
|
||||
<div class="van-swipe notice-swipe">
|
||||
<div style="transition-duration: 0ms; transform: translateY(0px); height: 200px;"
|
||||
<div
|
||||
style="transition-duration: 0ms; transform: translateY(0px); height: 200px;"
|
||||
class="van-swipe__track van-swipe__track--vertical"
|
||||
>
|
||||
<div class="van-swipe-item"
|
||||
<div
|
||||
class="van-swipe-item"
|
||||
style="height: 100px;"
|
||||
>
|
||||
Do Task
|
||||
</div>
|
||||
<div class="van-swipe-item"
|
||||
<div
|
||||
class="van-swipe-item"
|
||||
style="height: 100px;"
|
||||
>
|
||||
Lottery
|
||||
|
@ -1,7 +1,8 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should change icon class prefix when using icon-prefix prop 1`] = `
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--default van-button--normal"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -12,7 +13,8 @@ exports[`should change icon class prefix when using icon-prefix prop 1`] = `
|
||||
`;
|
||||
|
||||
exports[`should render icon in the right side when setting icon-position to right 1`] = `
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--default van-button--normal"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -23,7 +25,8 @@ exports[`should render icon in the right side when setting icon-position to righ
|
||||
`;
|
||||
|
||||
exports[`should render icon slot correctly 1`] = `
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--default van-button--normal"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -38,7 +41,8 @@ exports[`should render icon slot correctly 1`] = `
|
||||
`;
|
||||
|
||||
exports[`should render loading slot correctly 1`] = `
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--default van-button--normal van-button--loading"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @jest-environment node
|
||||
* @vitest-environment node
|
||||
*/
|
||||
import Demo from '../demo/index.vue';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
@ -1,55 +1,64 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div>
|
||||
<!--[-->
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
Select Single Date
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
Select Multiple Date
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
Select Date Range
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -58,35 +67,41 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
Select Single Date
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
Select Date Range
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -95,120 +110,141 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
Custom Color
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
Custom Date Range
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
Custom Confirm Text
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
Custom Day Text
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
Custom Position
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
Max Range
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
Custom First Day Of Week
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -217,7 +253,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<div class="van-calendar"
|
||||
<div
|
||||
class="van-calendar"
|
||||
style="height:500px;"
|
||||
>
|
||||
<div class="van-calendar__header">
|
||||
@ -254,27 +291,33 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-calendar__body">
|
||||
<!--[-->
|
||||
<div class="van-calendar__month">
|
||||
<div role="grid"
|
||||
<div
|
||||
role="grid"
|
||||
class="van-calendar__days"
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-calendar__day"
|
||||
<div
|
||||
class="van-calendar__day"
|
||||
style="width:100%;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-calendar__day"
|
||||
<div
|
||||
class="van-calendar__day"
|
||||
style="width:100%;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-calendar__day"
|
||||
<div
|
||||
class="van-calendar__day"
|
||||
style="width:100%;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-calendar__day"
|
||||
<div
|
||||
class="van-calendar__day"
|
||||
style="width:100%;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-calendar__day"
|
||||
<div
|
||||
class="van-calendar__day"
|
||||
style="width:100%;"
|
||||
>
|
||||
</div>
|
||||
@ -284,27 +327,33 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-calendar__month-title">
|
||||
2012/2
|
||||
</div>
|
||||
<div role="grid"
|
||||
<div
|
||||
role="grid"
|
||||
class="van-calendar__days"
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-calendar__day"
|
||||
<div
|
||||
class="van-calendar__day"
|
||||
style="width:100%;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-calendar__day"
|
||||
<div
|
||||
class="van-calendar__day"
|
||||
style="width:100%;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-calendar__day"
|
||||
<div
|
||||
class="van-calendar__day"
|
||||
style="width:100%;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-calendar__day"
|
||||
<div
|
||||
class="van-calendar__day"
|
||||
style="width:100%;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-calendar__day"
|
||||
<div
|
||||
class="van-calendar__day"
|
||||
style="width:100%;"
|
||||
>
|
||||
</div>
|
||||
@ -314,27 +363,33 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-calendar__month-title">
|
||||
2012/3
|
||||
</div>
|
||||
<div role="grid"
|
||||
<div
|
||||
role="grid"
|
||||
class="van-calendar__days"
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-calendar__day"
|
||||
<div
|
||||
class="van-calendar__day"
|
||||
style="width:100%;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-calendar__day"
|
||||
<div
|
||||
class="van-calendar__day"
|
||||
style="width:100%;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-calendar__day"
|
||||
<div
|
||||
class="van-calendar__day"
|
||||
style="width:100%;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-calendar__day"
|
||||
<div
|
||||
class="van-calendar__day"
|
||||
style="width:100%;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-calendar__day"
|
||||
<div
|
||||
class="van-calendar__day"
|
||||
style="width:100%;"
|
||||
>
|
||||
</div>
|
||||
|
@ -1,8 +1,9 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -14,7 +15,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon">
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -26,7 +28,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon">
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -40,7 +43,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -52,7 +56,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon">
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -66,7 +71,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -78,7 +84,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon">
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -90,7 +97,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon">
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -102,7 +110,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon">
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -114,7 +123,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon">
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -126,7 +136,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon">
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -138,7 +149,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon">
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -152,7 +164,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-calendar"
|
||||
<div
|
||||
class="van-calendar"
|
||||
style="height: 500px;"
|
||||
>
|
||||
<div class="van-calendar__header">
|
||||
@ -187,26 +200,32 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div class="van-calendar__body">
|
||||
<div class="van-calendar__month">
|
||||
<div role="grid"
|
||||
<div
|
||||
role="grid"
|
||||
class="van-calendar__days"
|
||||
>
|
||||
<div class="van-calendar__day"
|
||||
<div
|
||||
class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-calendar__day"
|
||||
<div
|
||||
class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-calendar__day"
|
||||
<div
|
||||
class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-calendar__day"
|
||||
<div
|
||||
class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-calendar__day"
|
||||
<div
|
||||
class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
>
|
||||
</div>
|
||||
@ -216,26 +235,32 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-calendar__month-title">
|
||||
2012/2
|
||||
</div>
|
||||
<div role="grid"
|
||||
<div
|
||||
role="grid"
|
||||
class="van-calendar__days"
|
||||
>
|
||||
<div class="van-calendar__day"
|
||||
<div
|
||||
class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-calendar__day"
|
||||
<div
|
||||
class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-calendar__day"
|
||||
<div
|
||||
class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-calendar__day"
|
||||
<div
|
||||
class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-calendar__day"
|
||||
<div
|
||||
class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
>
|
||||
</div>
|
||||
@ -245,26 +270,32 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-calendar__month-title">
|
||||
2012/3
|
||||
</div>
|
||||
<div role="grid"
|
||||
<div
|
||||
role="grid"
|
||||
class="van-calendar__days"
|
||||
>
|
||||
<div class="van-calendar__day"
|
||||
<div
|
||||
class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-calendar__day"
|
||||
<div
|
||||
class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-calendar__day"
|
||||
<div
|
||||
class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-calendar__day"
|
||||
<div
|
||||
class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
>
|
||||
</div>
|
||||
<div class="van-calendar__day"
|
||||
<div
|
||||
class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
>
|
||||
</div>
|
||||
@ -275,7 +306,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<transition-stub name="van-fade"
|
||||
<transition-stub
|
||||
name="van-fade"
|
||||
appear="true"
|
||||
persisted="false"
|
||||
css="true"
|
||||
@ -283,7 +315,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
tabindex="0"
|
||||
>
|
||||
</transition-stub>
|
||||
<transition-stub name="van-popup-slide-bottom"
|
||||
<transition-stub
|
||||
name="van-popup-slide-bottom"
|
||||
appear="false"
|
||||
persisted="false"
|
||||
css="true"
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`lazy-render prop 1`] = `
|
||||
<div class="van-calendar">
|
||||
@ -34,119 +34,140 @@ exports[`lazy-render prop 1`] = `
|
||||
</div>
|
||||
<div class="van-calendar__body">
|
||||
<div class="van-calendar__month">
|
||||
<div role="grid"
|
||||
<div
|
||||
role="grid"
|
||||
class="van-calendar__days"
|
||||
>
|
||||
<div class="van-calendar__month-mark">
|
||||
1
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div
|
||||
role="gridcell"
|
||||
style="margin-left: 71.42857142857143%;"
|
||||
class="van-calendar__day van-calendar__day--disabled"
|
||||
>
|
||||
1
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div
|
||||
role="gridcell"
|
||||
class="van-calendar__day van-calendar__day--disabled"
|
||||
>
|
||||
2
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div
|
||||
role="gridcell"
|
||||
class="van-calendar__day van-calendar__day--disabled"
|
||||
>
|
||||
3
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div
|
||||
role="gridcell"
|
||||
class="van-calendar__day van-calendar__day--disabled"
|
||||
>
|
||||
4
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div
|
||||
role="gridcell"
|
||||
class="van-calendar__day van-calendar__day--disabled"
|
||||
>
|
||||
5
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div
|
||||
role="gridcell"
|
||||
class="van-calendar__day van-calendar__day--disabled"
|
||||
>
|
||||
6
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div
|
||||
role="gridcell"
|
||||
class="van-calendar__day van-calendar__day--disabled"
|
||||
>
|
||||
7
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div
|
||||
role="gridcell"
|
||||
class="van-calendar__day van-calendar__day--disabled"
|
||||
>
|
||||
8
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div
|
||||
role="gridcell"
|
||||
class="van-calendar__day van-calendar__day--disabled"
|
||||
>
|
||||
9
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div
|
||||
role="gridcell"
|
||||
class="van-calendar__day"
|
||||
tabindex="-1"
|
||||
>
|
||||
10
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div
|
||||
role="gridcell"
|
||||
class="van-calendar__day"
|
||||
tabindex="-1"
|
||||
>
|
||||
11
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div
|
||||
role="gridcell"
|
||||
class="van-calendar__day"
|
||||
tabindex="-1"
|
||||
>
|
||||
12
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div
|
||||
role="gridcell"
|
||||
class="van-calendar__day"
|
||||
tabindex="-1"
|
||||
>
|
||||
13
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div
|
||||
role="gridcell"
|
||||
class="van-calendar__day"
|
||||
tabindex="-1"
|
||||
>
|
||||
14
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div
|
||||
role="gridcell"
|
||||
class="van-calendar__day"
|
||||
tabindex="-1"
|
||||
>
|
||||
15
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div
|
||||
role="gridcell"
|
||||
class="van-calendar__day"
|
||||
tabindex="-1"
|
||||
>
|
||||
16
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div
|
||||
role="gridcell"
|
||||
class="van-calendar__day"
|
||||
tabindex="-1"
|
||||
>
|
||||
17
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div
|
||||
role="gridcell"
|
||||
class="van-calendar__day"
|
||||
tabindex="-1"
|
||||
>
|
||||
18
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div
|
||||
role="gridcell"
|
||||
class="van-calendar__day"
|
||||
tabindex="-1"
|
||||
>
|
||||
19
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div
|
||||
role="gridcell"
|
||||
class="van-calendar__day van-calendar__day--selected"
|
||||
tabindex="-1"
|
||||
>
|
||||
@ -154,64 +175,75 @@ exports[`lazy-render prop 1`] = `
|
||||
20
|
||||
</div>
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div
|
||||
role="gridcell"
|
||||
class="van-calendar__day van-calendar__day--disabled"
|
||||
>
|
||||
21
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div
|
||||
role="gridcell"
|
||||
class="van-calendar__day van-calendar__day--disabled"
|
||||
>
|
||||
22
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div
|
||||
role="gridcell"
|
||||
class="van-calendar__day van-calendar__day--disabled"
|
||||
>
|
||||
23
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div
|
||||
role="gridcell"
|
||||
style="margin-bottom: 0px;"
|
||||
class="van-calendar__day van-calendar__day--disabled"
|
||||
>
|
||||
24
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div
|
||||
role="gridcell"
|
||||
style="margin-bottom: 0px;"
|
||||
class="van-calendar__day van-calendar__day--disabled"
|
||||
>
|
||||
25
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div
|
||||
role="gridcell"
|
||||
style="margin-bottom: 0px;"
|
||||
class="van-calendar__day van-calendar__day--disabled"
|
||||
>
|
||||
26
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div
|
||||
role="gridcell"
|
||||
style="margin-bottom: 0px;"
|
||||
class="van-calendar__day van-calendar__day--disabled"
|
||||
>
|
||||
27
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div
|
||||
role="gridcell"
|
||||
style="margin-bottom: 0px;"
|
||||
class="van-calendar__day van-calendar__day--disabled"
|
||||
>
|
||||
28
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div
|
||||
role="gridcell"
|
||||
style="margin-bottom: 0px;"
|
||||
class="van-calendar__day van-calendar__day--disabled"
|
||||
>
|
||||
29
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div
|
||||
role="gridcell"
|
||||
style="margin-bottom: 0px;"
|
||||
class="van-calendar__day van-calendar__day--disabled"
|
||||
>
|
||||
30
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div
|
||||
role="gridcell"
|
||||
style="margin-bottom: 0px;"
|
||||
class="van-calendar__day van-calendar__day--disabled"
|
||||
>
|
||||
@ -221,7 +253,8 @@ exports[`lazy-render prop 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-calendar__footer van-safe-area-bottom">
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal van-button--block van-button--round van-calendar__confirm"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @jest-environment node
|
||||
* @vitest-environment node
|
||||
*/
|
||||
import Demo from '../demo/index.vue';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
@ -305,7 +305,7 @@ test('row-height prop', async () => {
|
||||
|
||||
await later();
|
||||
|
||||
expect(wrapper.html()).toMatchSnapshot();
|
||||
expect(wrapper.find('.van-calendar__day').style.height).toEqual('50px');
|
||||
});
|
||||
|
||||
test('formatter prop', async () => {
|
||||
@ -339,7 +339,7 @@ test('formatter prop', async () => {
|
||||
},
|
||||
});
|
||||
|
||||
await later();
|
||||
await later(50);
|
||||
|
||||
expect(wrapper.html()).toMatchSnapshot();
|
||||
});
|
||||
@ -360,7 +360,7 @@ test('should render title、footer、subtitle slot correctly', async () => {
|
||||
},
|
||||
});
|
||||
|
||||
await later();
|
||||
await later(50);
|
||||
|
||||
expect(wrapper.html()).toMatchSnapshot();
|
||||
});
|
||||
@ -379,7 +379,7 @@ test('should render subtitle slot with params', async () => {
|
||||
},
|
||||
});
|
||||
|
||||
await later();
|
||||
await later(50);
|
||||
|
||||
expect(
|
||||
wrapper.find('.van-calendar__header-subtitle').html(),
|
||||
@ -400,7 +400,7 @@ test('should render month-title slot correctly', async () => {
|
||||
},
|
||||
});
|
||||
|
||||
await later();
|
||||
await later(50);
|
||||
|
||||
expect(wrapper.find('.van-calendar__month-title').html()).toMatchSnapshot();
|
||||
});
|
||||
@ -499,11 +499,11 @@ test('popup wrapper', async () => {
|
||||
},
|
||||
});
|
||||
|
||||
await later();
|
||||
await later(50);
|
||||
expect(wrapper.html()).toMatchSnapshot();
|
||||
|
||||
await wrapper.setProps({ show: true });
|
||||
await later();
|
||||
await later(50);
|
||||
|
||||
expect(wrapper.html()).toMatchSnapshot();
|
||||
|
||||
@ -541,7 +541,9 @@ test('color prop when type is single', async () => {
|
||||
|
||||
await later();
|
||||
|
||||
expect(wrapper.html()).toMatchSnapshot();
|
||||
expect(wrapper.find('.van-calendar__selected-day').style.background).toEqual(
|
||||
'blue',
|
||||
);
|
||||
});
|
||||
|
||||
test('color prop when type is range', async () => {
|
||||
@ -556,13 +558,21 @@ test('color prop when type is range', async () => {
|
||||
},
|
||||
});
|
||||
|
||||
await later();
|
||||
await later(50);
|
||||
|
||||
expect(wrapper.html()).toMatchSnapshot();
|
||||
expect(wrapper.find('.van-calendar__day--start').style.background).toEqual(
|
||||
'blue',
|
||||
);
|
||||
expect(wrapper.find('.van-calendar__day--middle').style.color).toEqual(
|
||||
'blue',
|
||||
);
|
||||
expect(wrapper.find('.van-calendar__day--end').style.background).toEqual(
|
||||
'blue',
|
||||
);
|
||||
});
|
||||
|
||||
test('close event', async () => {
|
||||
const onClose = jest.fn();
|
||||
const onClose = vi.fn();
|
||||
const wrapper = mount(Calendar, {
|
||||
props: {
|
||||
show: true,
|
||||
@ -590,7 +600,7 @@ test('should render top-info and bottom-info slot correctly', async () => {
|
||||
},
|
||||
});
|
||||
|
||||
await later();
|
||||
await later(50);
|
||||
|
||||
expect(wrapper.find('.van-calendar__day').html()).toMatchSnapshot();
|
||||
});
|
||||
@ -621,7 +631,7 @@ test('should render confirm-text slot correctly', async () => {
|
||||
},
|
||||
});
|
||||
|
||||
await later();
|
||||
await later(50);
|
||||
|
||||
expect(wrapper.find('.van-calendar__confirm').html()).toMatchSnapshot();
|
||||
});
|
||||
|
@ -94,7 +94,7 @@ test('hide close icon when there is no title', async () => {
|
||||
});
|
||||
|
||||
test('allow-same-day prop', async () => {
|
||||
const onSelect = jest.fn();
|
||||
const onSelect = vi.fn();
|
||||
const wrapper = mount(Calendar, {
|
||||
props: {
|
||||
type: 'range',
|
||||
@ -249,7 +249,7 @@ test('should disabled prompt when using show-range-prompt prop', async () => {
|
||||
});
|
||||
|
||||
test('should emit overRange when exceeded max range', async () => {
|
||||
const onOverRange = jest.fn();
|
||||
const onOverRange = vi.fn();
|
||||
const wrapper = mount(Calendar, {
|
||||
props: {
|
||||
type: 'range',
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
@ -7,15 +7,18 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-card">
|
||||
<div class="van-card__header">
|
||||
<a class="van-card__thumb">
|
||||
<div class="van-image"
|
||||
<div
|
||||
class="van-image"
|
||||
style="width:100%;height:100%;"
|
||||
>
|
||||
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg"
|
||||
<img
|
||||
src="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg"
|
||||
class="van-image__img"
|
||||
style="object-fit:cover;"
|
||||
>
|
||||
<div class="van-image__loading">
|
||||
<i class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -60,15 +63,18 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-card">
|
||||
<div class="van-card__header">
|
||||
<a class="van-card__thumb">
|
||||
<div class="van-image"
|
||||
<div
|
||||
class="van-image"
|
||||
style="width:100%;height:100%;"
|
||||
>
|
||||
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg"
|
||||
<img
|
||||
src="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg"
|
||||
class="van-image__img"
|
||||
style="object-fit:cover;"
|
||||
>
|
||||
<div class="van-image__loading">
|
||||
<i class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -76,7 +82,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-card__tag">
|
||||
<span style
|
||||
<span
|
||||
style
|
||||
class="van-tag van-tag--mark van-tag--primary"
|
||||
>
|
||||
<!--[-->
|
||||
@ -124,15 +131,18 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-card">
|
||||
<div class="van-card__header">
|
||||
<a class="van-card__thumb">
|
||||
<div class="van-image"
|
||||
<div
|
||||
class="van-image"
|
||||
style="width:100%;height:100%;"
|
||||
>
|
||||
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg"
|
||||
<img
|
||||
src="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg"
|
||||
class="van-image__img"
|
||||
style="object-fit:cover;"
|
||||
>
|
||||
<div class="van-image__loading">
|
||||
<i class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -149,13 +159,15 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Description
|
||||
</div>
|
||||
<!--[-->
|
||||
<span style="margin-right:5px;"
|
||||
<span
|
||||
style="margin-right:5px;"
|
||||
class="van-tag van-tag--plain van-tag--primary"
|
||||
>
|
||||
<!--[-->
|
||||
Tag
|
||||
</span>
|
||||
<span style
|
||||
<span
|
||||
style
|
||||
class="van-tag van-tag--plain van-tag--primary"
|
||||
>
|
||||
<!--[-->
|
||||
@ -185,7 +197,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div class="van-card__footer">
|
||||
<!--[-->
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--default van-button--mini van-button--round"
|
||||
style
|
||||
>
|
||||
@ -196,7 +209,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--default van-button--mini van-button--round"
|
||||
style
|
||||
>
|
||||
|
@ -1,14 +1,16 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
<div class="van-card">
|
||||
<div class="van-card__header">
|
||||
<a class="van-card__thumb">
|
||||
<div class="van-image"
|
||||
<div
|
||||
class="van-image"
|
||||
style="width: 100%; height: 100%;"
|
||||
>
|
||||
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg"
|
||||
<img
|
||||
src="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg"
|
||||
class="van-image__img"
|
||||
style="object-fit: cover;"
|
||||
>
|
||||
@ -54,10 +56,12 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-card">
|
||||
<div class="van-card__header">
|
||||
<a class="van-card__thumb">
|
||||
<div class="van-image"
|
||||
<div
|
||||
class="van-image"
|
||||
style="width: 100%; height: 100%;"
|
||||
>
|
||||
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg"
|
||||
<img
|
||||
src="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg"
|
||||
class="van-image__img"
|
||||
style="object-fit: cover;"
|
||||
>
|
||||
@ -67,7 +71,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-card__tag">
|
||||
<transition-stub appear="false"
|
||||
<transition-stub
|
||||
appear="false"
|
||||
persisted="false"
|
||||
css="true"
|
||||
>
|
||||
@ -116,10 +121,12 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-card">
|
||||
<div class="van-card__header">
|
||||
<a class="van-card__thumb">
|
||||
<div class="van-image"
|
||||
<div
|
||||
class="van-image"
|
||||
style="width: 100%; height: 100%;"
|
||||
>
|
||||
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg"
|
||||
<img
|
||||
src="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg"
|
||||
class="van-image__img"
|
||||
style="object-fit: cover;"
|
||||
>
|
||||
@ -137,7 +144,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-card__desc van-ellipsis">
|
||||
Description
|
||||
</div>
|
||||
<transition-stub appear="false"
|
||||
<transition-stub
|
||||
appear="false"
|
||||
persisted="false"
|
||||
css="true"
|
||||
style="margin-right: 5px;"
|
||||
@ -146,7 +154,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Tag
|
||||
</span>
|
||||
</transition-stub>
|
||||
<transition-stub appear="false"
|
||||
<transition-stub
|
||||
appear="false"
|
||||
persisted="false"
|
||||
css="true"
|
||||
>
|
||||
@ -177,7 +186,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-card__footer">
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--default van-button--mini van-button--round"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -186,7 +196,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--default van-button--mini van-button--round"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`render thumb and tag slot correctly 1`] = `
|
||||
<div class="van-card">
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @jest-environment node
|
||||
* @vitest-environment node
|
||||
*/
|
||||
import Demo from '../demo/index.vue';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
@ -2,7 +2,7 @@ import { Card } from '..';
|
||||
import { mount } from '../../../test';
|
||||
|
||||
test('should emit click event after clicked', () => {
|
||||
const onClick = jest.fn();
|
||||
const onClick = vi.fn();
|
||||
const wrapper = mount(Card, {
|
||||
props: {
|
||||
onClick,
|
||||
|
@ -1,18 +1,21 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div>
|
||||
<!--[-->
|
||||
<div class="van-cell van-cell--clickable van-field"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-field"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title van-field__label"
|
||||
<div
|
||||
class="van-cell__title van-field__label"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
for="van-field-input"
|
||||
style
|
||||
>
|
||||
@ -22,7 +25,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-cell__value van-field__value">
|
||||
<!--[-->
|
||||
<div class="van-field__body">
|
||||
<input type="text"
|
||||
<input
|
||||
type="text"
|
||||
id="van-field-input"
|
||||
class="van-field__control"
|
||||
readonly
|
||||
@ -31,7 +35,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -40,15 +45,18 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<div class="van-cell van-cell--clickable van-field"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-field"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title van-field__label"
|
||||
<div
|
||||
class="van-cell__title van-field__label"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
for="van-field-input"
|
||||
style
|
||||
>
|
||||
@ -58,7 +66,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-cell__value van-field__value">
|
||||
<!--[-->
|
||||
<div class="van-field__body">
|
||||
<input type="text"
|
||||
<input
|
||||
type="text"
|
||||
id="van-field-input"
|
||||
class="van-field__control"
|
||||
readonly
|
||||
@ -67,7 +76,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -76,15 +86,18 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<div class="van-cell van-cell--clickable van-field"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-field"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title van-field__label"
|
||||
<div
|
||||
class="van-cell__title van-field__label"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
for="van-field-input"
|
||||
style
|
||||
>
|
||||
@ -94,7 +107,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-cell__value van-field__value">
|
||||
<!--[-->
|
||||
<div class="van-field__body">
|
||||
<input type="text"
|
||||
<input
|
||||
type="text"
|
||||
id="van-field-input"
|
||||
class="van-field__control"
|
||||
readonly
|
||||
@ -103,7 +117,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -112,15 +127,18 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<div class="van-cell van-cell--clickable van-field"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-field"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title van-field__label"
|
||||
<div
|
||||
class="van-cell__title van-field__label"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
for="van-field-input"
|
||||
style
|
||||
>
|
||||
@ -130,7 +148,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-cell__value van-field__value">
|
||||
<!--[-->
|
||||
<div class="van-field__body">
|
||||
<input type="text"
|
||||
<input
|
||||
type="text"
|
||||
id="van-field-input"
|
||||
class="van-field__control"
|
||||
readonly
|
||||
@ -139,7 +158,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -148,15 +168,18 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<div class="van-cell van-cell--clickable van-field"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-field"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title van-field__label"
|
||||
<div
|
||||
class="van-cell__title van-field__label"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
for="van-field-input"
|
||||
style
|
||||
>
|
||||
@ -166,7 +189,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-cell__value van-field__value">
|
||||
<!--[-->
|
||||
<div class="van-field__body">
|
||||
<input type="text"
|
||||
<input
|
||||
type="text"
|
||||
id="van-field-input"
|
||||
class="van-field__control"
|
||||
readonly
|
||||
@ -175,7 +199,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
|
@ -1,13 +1,15 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
<div class="van-cell van-cell--clickable van-field"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-field"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title van-field__label">
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
for="van-field-input"
|
||||
>
|
||||
Area
|
||||
@ -15,7 +17,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
<div class="van-field__body">
|
||||
<input type="text"
|
||||
<input
|
||||
type="text"
|
||||
id="van-field-input"
|
||||
class="van-field__control"
|
||||
readonly
|
||||
@ -29,12 +32,14 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-cell van-cell--clickable van-field"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-field"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title van-field__label">
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
for="van-field-input"
|
||||
>
|
||||
Area
|
||||
@ -42,7 +47,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
<div class="van-field__body">
|
||||
<input type="text"
|
||||
<input
|
||||
type="text"
|
||||
id="van-field-input"
|
||||
class="van-field__control"
|
||||
readonly
|
||||
@ -56,12 +62,14 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-cell van-cell--clickable van-field"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-field"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title van-field__label">
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
for="van-field-input"
|
||||
>
|
||||
Area
|
||||
@ -69,7 +77,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
<div class="van-field__body">
|
||||
<input type="text"
|
||||
<input
|
||||
type="text"
|
||||
id="van-field-input"
|
||||
class="van-field__control"
|
||||
readonly
|
||||
@ -83,12 +92,14 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-cell van-cell--clickable van-field"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-field"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title van-field__label">
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
for="van-field-input"
|
||||
>
|
||||
Area
|
||||
@ -96,7 +107,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
<div class="van-field__body">
|
||||
<input type="text"
|
||||
<input
|
||||
type="text"
|
||||
id="van-field-input"
|
||||
class="van-field__control"
|
||||
readonly
|
||||
@ -110,12 +122,14 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-cell van-cell--clickable van-field"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-field"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title van-field__label">
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
for="van-field-input"
|
||||
>
|
||||
Area
|
||||
@ -123,7 +137,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
<div class="van-field__body">
|
||||
<input type="text"
|
||||
<input
|
||||
type="text"
|
||||
id="van-field-input"
|
||||
class="van-field__control"
|
||||
readonly
|
||||
|
@ -1,27 +1,28 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should change close icon when using close-icon prop 1`] = `
|
||||
<i class="van-badge__wrapper van-icon van-icon-success van-cascader__close-icon van-haptics-feedback">
|
||||
</i>
|
||||
"<i class=\\"van-badge__wrapper van-icon van-icon-success van-cascader__close-icon van-haptics-feedback\\">
|
||||
<!---->
|
||||
<!---->
|
||||
<!---->
|
||||
</i>"
|
||||
`;
|
||||
|
||||
exports[`should render option slot correctly 1`] = `
|
||||
<li role="menuitemradio"
|
||||
class="van-cascader__option"
|
||||
tabindex="-1"
|
||||
aria-checked="false"
|
||||
>
|
||||
Custom Option foo
|
||||
</li>
|
||||
"<li role=\\"menuitemradio\\" class=\\"van-cascader__option\\" tabindex=\\"-1\\" aria-checked=\\"false\\">Custom Option foo
|
||||
<!---->
|
||||
</li>"
|
||||
`;
|
||||
|
||||
exports[`should render options-top、options-bottom slots correctly 1`] = `
|
||||
<div class="van-tab__panel">
|
||||
Top, tab index: 0
|
||||
<ul role="menu"
|
||||
<ul
|
||||
role="menu"
|
||||
class="van-cascader__options"
|
||||
>
|
||||
<li role="menuitemradio"
|
||||
<li
|
||||
role="menuitemradio"
|
||||
class="van-cascader__option van-cascader__option--selected"
|
||||
tabindex="0"
|
||||
aria-checked="true"
|
||||
@ -32,7 +33,8 @@ exports[`should render options-top、options-bottom slots correctly 1`] = `
|
||||
<i class="van-badge__wrapper van-icon van-icon-success van-cascader__selected-icon">
|
||||
</i>
|
||||
</li>
|
||||
<li role="menuitemradio"
|
||||
<li
|
||||
role="menuitemradio"
|
||||
class="van-cascader__option"
|
||||
tabindex="-1"
|
||||
aria-checked="false"
|
||||
@ -46,14 +48,11 @@ exports[`should render options-top、options-bottom slots correctly 1`] = `
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`should render title slot correctly 1`] = `
|
||||
<h2 class="van-cascader__title">
|
||||
Custom Title
|
||||
</h2>
|
||||
`;
|
||||
exports[`should render title slot correctly 1`] = `"<h2 class=\\"van-cascader__title\\">Custom Title</h2>"`;
|
||||
|
||||
exports[`should select correct option when value changed 1`] = `
|
||||
<li role="menuitemradio"
|
||||
<li
|
||||
role="menuitemradio"
|
||||
class="van-cascader__option van-cascader__option--selected"
|
||||
tabindex="0"
|
||||
aria-checked="true"
|
||||
@ -76,11 +75,13 @@ exports[`should update tabs when previous tab is clicked 1`] = `
|
||||
</div>
|
||||
<div class="van-tabs van-tabs--line van-cascader__tabs">
|
||||
<div class="van-tabs__wrap">
|
||||
<div role="tablist"
|
||||
<div
|
||||
role="tablist"
|
||||
class="van-tabs__nav van-tabs__nav--line van-tabs__nav--shrink van-tabs__nav--complete"
|
||||
aria-orientation="horizontal"
|
||||
>
|
||||
<div id="van-tabs-0"
|
||||
<div
|
||||
id="van-tabs-0"
|
||||
role="tab"
|
||||
class="van-tab van-tab--line van-tab--shrink van-cascader__tab"
|
||||
tabindex="-1"
|
||||
@ -91,7 +92,8 @@ exports[`should update tabs when previous tab is clicked 1`] = `
|
||||
Jiangsu
|
||||
</span>
|
||||
</div>
|
||||
<div id="van-tabs-1"
|
||||
<div
|
||||
id="van-tabs-1"
|
||||
role="tab"
|
||||
class="van-tab van-tab--line van-tab--shrink van-tab--active van-cascader__tab van-cascader__tab--unselected"
|
||||
tabindex="0"
|
||||
@ -102,7 +104,8 @@ exports[`should update tabs when previous tab is clicked 1`] = `
|
||||
Select
|
||||
</span>
|
||||
</div>
|
||||
<div class="van-tabs__line"
|
||||
<div
|
||||
class="van-tabs__line"
|
||||
style="transform: translateX(50px) translateX(-50%); transition-duration: 0.3s;"
|
||||
>
|
||||
</div>
|
||||
@ -110,10 +113,12 @@ exports[`should update tabs when previous tab is clicked 1`] = `
|
||||
</div>
|
||||
<div class="van-tabs__content van-tabs__content--animated">
|
||||
<div class="van-swipe van-tabs__track">
|
||||
<div style="transition-duration: 0ms; transform: translateX(0px); width: 200px;"
|
||||
<div
|
||||
style="transition-duration: 0ms; transform: translateX(0px); width: 200px;"
|
||||
class="van-swipe__track"
|
||||
>
|
||||
<div class="van-swipe-item van-tab__panel-wrapper"
|
||||
<div
|
||||
class="van-swipe-item van-tab__panel-wrapper"
|
||||
id="van-tab"
|
||||
role="tabpanel"
|
||||
tabindex="-1"
|
||||
@ -122,10 +127,12 @@ exports[`should update tabs when previous tab is clicked 1`] = `
|
||||
style="width: 100px;"
|
||||
>
|
||||
<div class="van-tab__panel">
|
||||
<ul role="menu"
|
||||
<ul
|
||||
role="menu"
|
||||
class="van-cascader__options"
|
||||
>
|
||||
<li role="menuitemradio"
|
||||
<li
|
||||
role="menuitemradio"
|
||||
class="van-cascader__option"
|
||||
tabindex="-1"
|
||||
aria-checked="false"
|
||||
@ -134,7 +141,8 @@ exports[`should update tabs when previous tab is clicked 1`] = `
|
||||
Zhejiang
|
||||
</span>
|
||||
</li>
|
||||
<li role="menuitemradio"
|
||||
<li
|
||||
role="menuitemradio"
|
||||
class="van-cascader__option van-cascader__option--selected"
|
||||
tabindex="0"
|
||||
aria-checked="true"
|
||||
@ -148,7 +156,8 @@ exports[`should update tabs when previous tab is clicked 1`] = `
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-swipe-item van-tab__panel-wrapper"
|
||||
<div
|
||||
class="van-swipe-item van-tab__panel-wrapper"
|
||||
id="van-tab"
|
||||
role="tabpanel"
|
||||
tabindex="0"
|
||||
@ -157,10 +166,12 @@ exports[`should update tabs when previous tab is clicked 1`] = `
|
||||
style="width: 100px;"
|
||||
>
|
||||
<div class="van-tab__panel">
|
||||
<ul role="menu"
|
||||
<ul
|
||||
role="menu"
|
||||
class="van-cascader__options"
|
||||
>
|
||||
<li role="menuitemradio"
|
||||
<li
|
||||
role="menuitemradio"
|
||||
class="van-cascader__option"
|
||||
tabindex="-1"
|
||||
aria-checked="false"
|
||||
@ -169,7 +180,8 @@ exports[`should update tabs when previous tab is clicked 1`] = `
|
||||
Nanjing
|
||||
</span>
|
||||
</li>
|
||||
<li role="menuitemradio"
|
||||
<li
|
||||
role="menuitemradio"
|
||||
class="van-cascader__option"
|
||||
tabindex="-1"
|
||||
aria-checked="false"
|
||||
@ -178,7 +190,8 @@ exports[`should update tabs when previous tab is clicked 1`] = `
|
||||
Wuxi
|
||||
</span>
|
||||
</li>
|
||||
<li role="menuitemradio"
|
||||
<li
|
||||
role="menuitemradio"
|
||||
class="van-cascader__option"
|
||||
tabindex="-1"
|
||||
aria-checked="false"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @jest-environment node
|
||||
* @vitest-environment node
|
||||
*/
|
||||
import Demo from '../demo/index.vue';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render title slot correctly 1`] = `
|
||||
<div class="van-cell-group__title">
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
@ -7,7 +7,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-cell-group van-hairline--top-bottom">
|
||||
<!--[-->
|
||||
<div class="van-cell">
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
@ -21,7 +22,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-cell">
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
@ -44,7 +46,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-cell-group van-cell-group--inset">
|
||||
<!--[-->
|
||||
<div class="van-cell">
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
@ -58,7 +61,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-cell">
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
@ -79,7 +83,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
<!--[-->
|
||||
<div class="van-cell van-cell--large">
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
@ -93,7 +98,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-cell van-cell--large">
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
@ -113,12 +119,14 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
<!--[-->
|
||||
<div class="van-cell">
|
||||
<i class="van-badge__wrapper van-icon van-icon-location-o van-cell__left-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-location-o van-cell__left-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</i>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
@ -134,28 +142,33 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
Cell title
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
@ -167,17 +180,20 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Content
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
@ -189,7 +205,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Content
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow-down van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow-down van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -198,35 +215,41 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
URL
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
Vue Router
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -242,7 +265,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-cell-group van-hairline--top-bottom">
|
||||
<!--[-->
|
||||
<div class="van-cell">
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
@ -263,7 +287,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-cell-group van-hairline--top-bottom">
|
||||
<!--[-->
|
||||
<div class="van-cell">
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
@ -280,18 +305,21 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
<span class="custom-title">
|
||||
Cell title
|
||||
</span>
|
||||
<span style
|
||||
<span
|
||||
style
|
||||
class="van-tag van-tag--primary"
|
||||
>
|
||||
<!--[-->
|
||||
@ -303,19 +331,22 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Content
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-cell">
|
||||
<i class="van-badge__wrapper van-icon van-icon-shop-o van-cell__left-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-shop-o van-cell__left-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</i>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
@ -323,7 +354,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
<!--[-->
|
||||
<i class="van-badge__wrapper van-icon van-icon-search search-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-search search-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -333,7 +365,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
<!--[-->
|
||||
<div class="van-cell van-cell--center">
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
@ -109,7 +109,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -121,7 +122,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon">
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -138,7 +140,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon">
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -157,7 +160,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -169,7 +173,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon">
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -219,7 +224,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -227,7 +233,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<span class="custom-title">
|
||||
Cell title
|
||||
</span>
|
||||
<transition-stub appear="false"
|
||||
<transition-stub
|
||||
appear="false"
|
||||
persisted="false"
|
||||
css="true"
|
||||
>
|
||||
|
@ -1,8 +1,11 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should change arrow direction when using arrow-direction prop 1`] = `
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow-down van-cell__right-icon">
|
||||
</i>
|
||||
"<i class=\\"van-badge__wrapper van-icon van-icon-arrow-down van-cell__right-icon\\">
|
||||
<!---->
|
||||
<!---->
|
||||
<!---->
|
||||
</i>"
|
||||
`;
|
||||
|
||||
exports[`should change icon class prefix when using icon-prefix prop 1`] = `
|
||||
@ -38,8 +41,13 @@ exports[`should render label slot correctly 1`] = `
|
||||
`;
|
||||
|
||||
exports[`should render tag prop correctly 1`] = `
|
||||
<a class="van-cell">
|
||||
</a>
|
||||
"<a class=\\"van-cell\\">
|
||||
<!---->
|
||||
<!---->
|
||||
<!---->
|
||||
<!---->
|
||||
<!---->
|
||||
</a>"
|
||||
`;
|
||||
|
||||
exports[`should render title slot correctly 1`] = `
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @jest-environment node
|
||||
* @vitest-environment node
|
||||
*/
|
||||
import Demo from '../demo/index.vue';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
@ -1,19 +1,22 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div>
|
||||
<!--[-->
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="true"
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--checked"
|
||||
<div
|
||||
class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--checked"
|
||||
style
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-success"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-success"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -27,15 +30,18 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox van-checkbox--disabled"
|
||||
aria-checked="false"
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--disabled"
|
||||
<div
|
||||
class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--disabled"
|
||||
style
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-success"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-success"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -46,15 +52,18 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Checkbox
|
||||
</span>
|
||||
</div>
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox van-checkbox--disabled"
|
||||
aria-checked="true"
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--disabled van-checkbox__icon--checked"
|
||||
<div
|
||||
class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--disabled van-checkbox__icon--checked"
|
||||
style
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-success"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-success"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -70,16 +79,19 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div class="van-checkbox-group">
|
||||
<!--[-->
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="true"
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-checkbox__icon van-checkbox__icon--square van-checkbox__icon--checked"
|
||||
<div
|
||||
class="van-checkbox__icon van-checkbox__icon--square van-checkbox__icon--checked"
|
||||
style
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-success"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-success"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -90,16 +102,19 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Custom Shape a
|
||||
</span>
|
||||
</div>
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="true"
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-checkbox__icon van-checkbox__icon--square van-checkbox__icon--checked"
|
||||
<div
|
||||
class="van-checkbox__icon van-checkbox__icon--square van-checkbox__icon--checked"
|
||||
style
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-success"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-success"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -114,16 +129,19 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="true"
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--checked"
|
||||
<div
|
||||
class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--checked"
|
||||
style
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-success"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-success"
|
||||
style="border-color:#ee0a24;background-color:#ee0a24;"
|
||||
>
|
||||
<!--[-->
|
||||
@ -137,16 +155,19 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="true"
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--checked"
|
||||
<div
|
||||
class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--checked"
|
||||
style="font-size:24px;"
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-success"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-success"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -160,13 +181,15 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="true"
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--checked"
|
||||
<div
|
||||
class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--checked"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -180,7 +203,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="false"
|
||||
@ -190,10 +214,12 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
Left Label
|
||||
</span>
|
||||
<div class="van-checkbox__icon van-checkbox__icon--round"
|
||||
<div
|
||||
class="van-checkbox__icon van-checkbox__icon--round"
|
||||
style
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-success"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-success"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -203,16 +229,19 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox van-checkbox--label-disabled"
|
||||
tabindex="0"
|
||||
aria-checked="true"
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--checked"
|
||||
<div
|
||||
class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--checked"
|
||||
style
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-success"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-success"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -228,16 +257,19 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div class="van-checkbox-group">
|
||||
<!--[-->
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="true"
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--checked"
|
||||
<div
|
||||
class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--checked"
|
||||
style
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-success"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-success"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -248,16 +280,19 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Checkbox a
|
||||
</span>
|
||||
</div>
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="true"
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--checked"
|
||||
<div
|
||||
class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--checked"
|
||||
style
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-success"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-success"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -274,16 +309,19 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div class="van-checkbox-group van-checkbox-group--horizontal">
|
||||
<!--[-->
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox van-checkbox--horizontal"
|
||||
tabindex="0"
|
||||
aria-checked="false"
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-checkbox__icon van-checkbox__icon--round"
|
||||
<div
|
||||
class="van-checkbox__icon van-checkbox__icon--round"
|
||||
style
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-success"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-success"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -294,16 +332,19 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Checkbox a
|
||||
</span>
|
||||
</div>
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox van-checkbox--horizontal"
|
||||
tabindex="0"
|
||||
aria-checked="false"
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-checkbox__icon van-checkbox__icon--round"
|
||||
<div
|
||||
class="van-checkbox__icon van-checkbox__icon--round"
|
||||
style
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-success"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-success"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -320,16 +361,19 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div class="van-checkbox-group">
|
||||
<!--[-->
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="false"
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-checkbox__icon van-checkbox__icon--round"
|
||||
<div
|
||||
class="van-checkbox__icon van-checkbox__icon--round"
|
||||
style
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-success"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-success"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -340,16 +384,19 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Checkbox a
|
||||
</span>
|
||||
</div>
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="false"
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-checkbox__icon van-checkbox__icon--round"
|
||||
<div
|
||||
class="van-checkbox__icon van-checkbox__icon--round"
|
||||
style
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-success"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-success"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -360,16 +407,19 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Checkbox b
|
||||
</span>
|
||||
</div>
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="false"
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-checkbox__icon van-checkbox__icon--round"
|
||||
<div
|
||||
class="van-checkbox__icon van-checkbox__icon--round"
|
||||
style
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-success"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-success"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -386,16 +436,19 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div class="van-checkbox-group">
|
||||
<!--[-->
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="false"
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-checkbox__icon van-checkbox__icon--round"
|
||||
<div
|
||||
class="van-checkbox__icon van-checkbox__icon--round"
|
||||
style
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-success"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-success"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -406,16 +459,19 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Checkbox a
|
||||
</span>
|
||||
</div>
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="false"
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-checkbox__icon van-checkbox__icon--round"
|
||||
<div
|
||||
class="van-checkbox__icon van-checkbox__icon--round"
|
||||
style
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-success"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-success"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -426,16 +482,19 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Checkbox b
|
||||
</span>
|
||||
</div>
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="false"
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-checkbox__icon van-checkbox__icon--round"
|
||||
<div
|
||||
class="van-checkbox__icon van-checkbox__icon--round"
|
||||
style
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-success"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-success"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -448,7 +507,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="demo-checkbox-buttons">
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal"
|
||||
style
|
||||
>
|
||||
@ -459,7 +519,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal"
|
||||
style
|
||||
>
|
||||
@ -479,11 +540,13 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-cell-group van-cell-group--inset">
|
||||
<!--[-->
|
||||
<!--[-->
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
@ -491,16 +554,19 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
<!--[-->
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="false"
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-checkbox__icon van-checkbox__icon--round"
|
||||
<div
|
||||
class="van-checkbox__icon van-checkbox__icon--round"
|
||||
style
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-success"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-success"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -508,11 +574,13 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
@ -520,16 +588,19 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
<!--[-->
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="false"
|
||||
>
|
||||
<!--[-->
|
||||
<div class="van-checkbox__icon van-checkbox__icon--round"
|
||||
<div
|
||||
class="van-checkbox__icon van-checkbox__icon--round"
|
||||
style
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-success"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-success"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
|
@ -1,8 +1,9 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="true"
|
||||
@ -17,7 +18,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox van-checkbox--disabled"
|
||||
aria-checked="false"
|
||||
>
|
||||
@ -29,7 +31,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Checkbox
|
||||
</span>
|
||||
</div>
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox van-checkbox--disabled"
|
||||
aria-checked="true"
|
||||
>
|
||||
@ -44,7 +47,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-checkbox-group">
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="true"
|
||||
@ -57,7 +61,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Custom Shape a
|
||||
</span>
|
||||
</div>
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="true"
|
||||
@ -73,13 +78,15 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="true"
|
||||
>
|
||||
<div class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--checked">
|
||||
<i class="van-badge__wrapper van-icon van-icon-success"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-success"
|
||||
style="border-color: #ee0a24; background-color: rgb(238, 10, 36);"
|
||||
>
|
||||
</i>
|
||||
@ -90,12 +97,14 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="true"
|
||||
>
|
||||
<div class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--checked"
|
||||
<div
|
||||
class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--checked"
|
||||
style="font-size: 24px;"
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-success">
|
||||
@ -107,7 +116,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="true"
|
||||
@ -121,7 +131,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="false"
|
||||
@ -136,7 +147,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox van-checkbox--label-disabled"
|
||||
tabindex="0"
|
||||
aria-checked="true"
|
||||
@ -152,7 +164,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-checkbox-group">
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="true"
|
||||
@ -165,7 +178,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Checkbox a
|
||||
</span>
|
||||
</div>
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="true"
|
||||
@ -182,7 +196,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-checkbox-group van-checkbox-group--horizontal">
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox van-checkbox--horizontal"
|
||||
tabindex="0"
|
||||
aria-checked="false"
|
||||
@ -195,7 +210,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Checkbox a
|
||||
</span>
|
||||
</div>
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox van-checkbox--horizontal"
|
||||
tabindex="0"
|
||||
aria-checked="false"
|
||||
@ -212,7 +228,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-checkbox-group">
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="false"
|
||||
@ -225,7 +242,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Checkbox a
|
||||
</span>
|
||||
</div>
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="false"
|
||||
@ -238,7 +256,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Checkbox b
|
||||
</span>
|
||||
</div>
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="false"
|
||||
@ -255,7 +274,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-checkbox-group">
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="false"
|
||||
@ -268,7 +288,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Checkbox a
|
||||
</span>
|
||||
</div>
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="false"
|
||||
@ -281,7 +302,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Checkbox b
|
||||
</span>
|
||||
</div>
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="false"
|
||||
@ -296,7 +318,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="demo-checkbox-buttons">
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -305,7 +328,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -319,7 +343,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
<div class="van-checkbox-group">
|
||||
<div class="van-cell-group van-cell-group--inset">
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -328,7 +353,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Checkbox a
|
||||
</span>
|
||||
</div>
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="false"
|
||||
@ -339,7 +365,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-cell van-cell--clickable"
|
||||
<div
|
||||
class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -348,7 +375,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Checkbox b
|
||||
</span>
|
||||
</div>
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="false"
|
||||
|
@ -1,7 +1,8 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should adjust label position when using label-position prop 1`] = `
|
||||
<div role="checkbox"
|
||||
<div
|
||||
role="checkbox"
|
||||
class="van-checkbox"
|
||||
tabindex="0"
|
||||
aria-checked="false"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @jest-environment node
|
||||
* @vitest-environment node
|
||||
*/
|
||||
import Demo from '../demo/index.vue';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
@ -91,7 +91,7 @@ test('should adjust label position when using label-position prop', () => {
|
||||
});
|
||||
|
||||
test('should emit click event when checkbox icon is clicked', async () => {
|
||||
const onClick = jest.fn();
|
||||
const onClick = vi.fn();
|
||||
const wrapper = mount(Checkbox, {
|
||||
props: {
|
||||
onClick,
|
||||
|
@ -1,21 +1,25 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div>
|
||||
<!--[-->
|
||||
<div class="van-circle"
|
||||
<div
|
||||
class="van-circle"
|
||||
style
|
||||
>
|
||||
<svg viewbox="0 0 1040 1040"
|
||||
<svg
|
||||
viewbox="0 0 1040 1040"
|
||||
style
|
||||
>
|
||||
<path class="van-circle__layer"
|
||||
<path
|
||||
class="van-circle__layer"
|
||||
style="fill:none;stroke-width:40px;"
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
>
|
||||
</path>
|
||||
<path d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
<path
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
style="stroke-width:41px;stroke-dasharray:2198px 3140px;"
|
||||
class="van-circle__hover"
|
||||
>
|
||||
@ -28,18 +32,22 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<div class="van-circle"
|
||||
<div
|
||||
class="van-circle"
|
||||
style
|
||||
>
|
||||
<svg viewbox="0 0 1060 1060"
|
||||
<svg
|
||||
viewbox="0 0 1060 1060"
|
||||
style
|
||||
>
|
||||
<path class="van-circle__layer"
|
||||
<path
|
||||
class="van-circle__layer"
|
||||
style="fill:none;stroke-width:60px;"
|
||||
d="M 530 530 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
>
|
||||
</path>
|
||||
<path d="M 530 530 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
<path
|
||||
d="M 530 530 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
style="stroke-width:61px;stroke-dasharray:2198px 3140px;"
|
||||
class="van-circle__hover"
|
||||
>
|
||||
@ -49,18 +57,22 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Custom Width
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-circle"
|
||||
<div
|
||||
class="van-circle"
|
||||
style
|
||||
>
|
||||
<svg viewbox="0 0 1040 1040"
|
||||
<svg
|
||||
viewbox="0 0 1040 1040"
|
||||
style
|
||||
>
|
||||
<path class="van-circle__layer"
|
||||
<path
|
||||
class="van-circle__layer"
|
||||
style="fill:none;stroke:#ebedf0;stroke-width:40px;"
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
>
|
||||
</path>
|
||||
<path d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
<path
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
style="stroke:#ee0a24;stroke-width:41px;stroke-dasharray:2198px 3140px;"
|
||||
class="van-circle__hover"
|
||||
stroke="#ee0a24"
|
||||
@ -71,36 +83,43 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Custom Color
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-circle"
|
||||
<div
|
||||
class="van-circle"
|
||||
style
|
||||
>
|
||||
<svg viewbox="0 0 1040 1040"
|
||||
<svg
|
||||
viewbox="0 0 1040 1040"
|
||||
style
|
||||
>
|
||||
<defs>
|
||||
<linearGradient id="van-circle-3"
|
||||
<linearGradient
|
||||
id="van-circle-3"
|
||||
x1="100%"
|
||||
y1="0%"
|
||||
x2="0%"
|
||||
y2="0%"
|
||||
>
|
||||
<!--[-->
|
||||
<stop offset="0%"
|
||||
<stop
|
||||
offset="0%"
|
||||
stop-color="#3fecff"
|
||||
>
|
||||
</stop>
|
||||
<stop offset="100%"
|
||||
<stop
|
||||
offset="100%"
|
||||
stop-color="#6149f6"
|
||||
>
|
||||
</stop>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path class="van-circle__layer"
|
||||
<path
|
||||
class="van-circle__layer"
|
||||
style="fill:none;stroke-width:40px;"
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
>
|
||||
</path>
|
||||
<path d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
<path
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
style="stroke:url(#van-circle-3);stroke-width:41px;stroke-dasharray:2198px 3140px;"
|
||||
class="van-circle__hover"
|
||||
stroke="url(#van-circle-3)"
|
||||
@ -111,18 +130,22 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Gradient
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-circle"
|
||||
<div
|
||||
class="van-circle"
|
||||
style="margin-top:15px;"
|
||||
>
|
||||
<svg viewbox="0 0 1040 1040"
|
||||
<svg
|
||||
viewbox="0 0 1040 1040"
|
||||
style
|
||||
>
|
||||
<path class="van-circle__layer"
|
||||
<path
|
||||
class="van-circle__layer"
|
||||
style="fill:none;stroke-width:40px;"
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 0 0, 1000 a 500, 500 0 1, 0 0, -1000"
|
||||
>
|
||||
</path>
|
||||
<path d="M 520 520 m 0, -500 a 500, 500 0 1, 0 0, 1000 a 500, 500 0 1, 0 0, -1000"
|
||||
<path
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 0 0, 1000 a 500, 500 0 1, 0 0, -1000"
|
||||
style="stroke:#07c160;stroke-width:41px;stroke-dasharray:2198px 3140px;"
|
||||
class="van-circle__hover"
|
||||
stroke="#07c160"
|
||||
@ -133,18 +156,22 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Counter Clockwise
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-circle"
|
||||
<div
|
||||
class="van-circle"
|
||||
style="width:120px;height:120px;margin-top:15px;"
|
||||
>
|
||||
<svg viewbox="0 0 1040 1040"
|
||||
<svg
|
||||
viewbox="0 0 1040 1040"
|
||||
style
|
||||
>
|
||||
<path class="van-circle__layer"
|
||||
<path
|
||||
class="van-circle__layer"
|
||||
style="fill:none;stroke-width:40px;"
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 0 0, 1000 a 500, 500 0 1, 0 0, -1000"
|
||||
>
|
||||
</path>
|
||||
<path d="M 520 520 m 0, -500 a 500, 500 0 1, 0 0, 1000 a 500, 500 0 1, 0 0, -1000"
|
||||
<path
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 0 0, 1000 a 500, 500 0 1, 0 0, -1000"
|
||||
style="stroke:#7232dd;stroke-width:41px;stroke-dasharray:2198px 3140px;"
|
||||
class="van-circle__hover"
|
||||
stroke="#7232dd"
|
||||
@ -157,7 +184,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top:15px;">
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--small"
|
||||
style
|
||||
>
|
||||
@ -167,7 +195,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--danger van-button--small"
|
||||
style
|
||||
>
|
||||
@ -180,18 +209,22 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<div class="van-circle"
|
||||
<div
|
||||
class="van-circle"
|
||||
style
|
||||
>
|
||||
<svg viewbox="0 0 1040 1040"
|
||||
<svg
|
||||
viewbox="0 0 1040 1040"
|
||||
style="transform:rotate(270deg);"
|
||||
>
|
||||
<path class="van-circle__layer"
|
||||
<path
|
||||
class="van-circle__layer"
|
||||
style="fill:none;stroke-width:40px;"
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
>
|
||||
</path>
|
||||
<path d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
<path
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
style="stroke-width:41px;stroke-dasharray:2355px 3140px;"
|
||||
class="van-circle__hover"
|
||||
>
|
||||
@ -201,18 +234,22 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Left
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-circle"
|
||||
<div
|
||||
class="van-circle"
|
||||
style
|
||||
>
|
||||
<svg viewbox="0 0 1040 1040"
|
||||
<svg
|
||||
viewbox="0 0 1040 1040"
|
||||
style="transform:rotate(90deg);"
|
||||
>
|
||||
<path class="van-circle__layer"
|
||||
<path
|
||||
class="van-circle__layer"
|
||||
style="fill:none;stroke-width:40px;"
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
>
|
||||
</path>
|
||||
<path d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
<path
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
style="stroke-width:41px;stroke-dasharray:2355px 3140px;"
|
||||
class="van-circle__hover"
|
||||
>
|
||||
@ -222,18 +259,22 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Right
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-circle"
|
||||
<div
|
||||
class="van-circle"
|
||||
style
|
||||
>
|
||||
<svg viewbox="0 0 1040 1040"
|
||||
<svg
|
||||
viewbox="0 0 1040 1040"
|
||||
style="transform:rotate(180deg);"
|
||||
>
|
||||
<path class="van-circle__layer"
|
||||
<path
|
||||
class="van-circle__layer"
|
||||
style="fill:none;stroke-width:40px;"
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
>
|
||||
</path>
|
||||
<path d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
<path
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
style="stroke-width:41px;stroke-dasharray:2355px 3140px;"
|
||||
class="van-circle__hover"
|
||||
>
|
||||
|
@ -1,15 +1,17 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
<div class="van-circle">
|
||||
<svg viewbox="0 0 1040 1040">
|
||||
<path class="van-circle__layer"
|
||||
<path
|
||||
class="van-circle__layer"
|
||||
style="fill: none; stroke-width: 40px;"
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
>
|
||||
</path>
|
||||
<path d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
<path
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
style="stroke-width: 41px; stroke-dasharray: 2198px 3140px;"
|
||||
class="van-circle__hover"
|
||||
>
|
||||
@ -23,12 +25,14 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
<div class="van-circle">
|
||||
<svg viewbox="0 0 1060 1060">
|
||||
<path class="van-circle__layer"
|
||||
<path
|
||||
class="van-circle__layer"
|
||||
style="fill: none; stroke-width: 60px;"
|
||||
d="M 530 530 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
>
|
||||
</path>
|
||||
<path d="M 530 530 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
<path
|
||||
d="M 530 530 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
style="stroke-width: 61px; stroke-dasharray: 2198px 3140px;"
|
||||
class="van-circle__hover"
|
||||
>
|
||||
@ -40,12 +44,14 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div class="van-circle">
|
||||
<svg viewbox="0 0 1040 1040">
|
||||
<path class="van-circle__layer"
|
||||
<path
|
||||
class="van-circle__layer"
|
||||
style="fill: none; stroke: #ebedf0; stroke-width: 40px;"
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
>
|
||||
</path>
|
||||
<path d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
<path
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
style="stroke: #ee0a24; stroke-width: 41px; stroke-dasharray: 2198px 3140px;"
|
||||
class="van-circle__hover"
|
||||
stroke="#ee0a24"
|
||||
@ -59,28 +65,33 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-circle">
|
||||
<svg viewbox="0 0 1040 1040">
|
||||
<defs>
|
||||
<linearGradient id="van-circle-3"
|
||||
<linearGradient
|
||||
id="van-circle-3"
|
||||
x1="100%"
|
||||
y1="0%"
|
||||
x2="0%"
|
||||
y2="0%"
|
||||
>
|
||||
<stop offset="0%"
|
||||
<stop
|
||||
offset="0%"
|
||||
stop-color="#3fecff"
|
||||
>
|
||||
</stop>
|
||||
<stop offset="100%"
|
||||
<stop
|
||||
offset="100%"
|
||||
stop-color="#6149f6"
|
||||
>
|
||||
</stop>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path class="van-circle__layer"
|
||||
<path
|
||||
class="van-circle__layer"
|
||||
style="fill: none; stroke-width: 40px;"
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
>
|
||||
</path>
|
||||
<path d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
<path
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
style="stroke: url(#van-circle-3); stroke-width: 41px; stroke-dasharray: 2198px 3140px;"
|
||||
class="van-circle__hover"
|
||||
stroke="url(#van-circle-3)"
|
||||
@ -91,16 +102,19 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Gradient
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-circle"
|
||||
<div
|
||||
class="van-circle"
|
||||
style="margin-top: 15px;"
|
||||
>
|
||||
<svg viewbox="0 0 1040 1040">
|
||||
<path class="van-circle__layer"
|
||||
<path
|
||||
class="van-circle__layer"
|
||||
style="fill: none; stroke-width: 40px;"
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 0 0, 1000 a 500, 500 0 1, 0 0, -1000"
|
||||
>
|
||||
</path>
|
||||
<path d="M 520 520 m 0, -500 a 500, 500 0 1, 0 0, 1000 a 500, 500 0 1, 0 0, -1000"
|
||||
<path
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 0 0, 1000 a 500, 500 0 1, 0 0, -1000"
|
||||
style="stroke: #07c160; stroke-width: 41px; stroke-dasharray: 2198px 3140px;"
|
||||
class="van-circle__hover"
|
||||
stroke="#07c160"
|
||||
@ -111,16 +125,19 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Counter Clockwise
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-circle"
|
||||
<div
|
||||
class="van-circle"
|
||||
style="width: 120px; height: 120px; margin-top: 15px;"
|
||||
>
|
||||
<svg viewbox="0 0 1040 1040">
|
||||
<path class="van-circle__layer"
|
||||
<path
|
||||
class="van-circle__layer"
|
||||
style="fill: none; stroke-width: 40px;"
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 0 0, 1000 a 500, 500 0 1, 0 0, -1000"
|
||||
>
|
||||
</path>
|
||||
<path d="M 520 520 m 0, -500 a 500, 500 0 1, 0 0, 1000 a 500, 500 0 1, 0 0, -1000"
|
||||
<path
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 0 0, 1000 a 500, 500 0 1, 0 0, -1000"
|
||||
style="stroke: #7232dd; stroke-width: 41px; stroke-dasharray: 2198px 3140px;"
|
||||
class="van-circle__hover"
|
||||
stroke="#7232dd"
|
||||
@ -133,7 +150,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 15px;">
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--small"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -142,7 +160,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--danger van-button--small"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -154,15 +173,18 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-circle">
|
||||
<svg viewbox="0 0 1040 1040"
|
||||
<svg
|
||||
viewbox="0 0 1040 1040"
|
||||
style="transform: rotate(270deg);"
|
||||
>
|
||||
<path class="van-circle__layer"
|
||||
<path
|
||||
class="van-circle__layer"
|
||||
style="fill: none; stroke-width: 40px;"
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
>
|
||||
</path>
|
||||
<path d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
<path
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
style="stroke-width: 41px; stroke-dasharray: 2355px 3140px;"
|
||||
class="van-circle__hover"
|
||||
>
|
||||
@ -173,15 +195,18 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-circle">
|
||||
<svg viewbox="0 0 1040 1040"
|
||||
<svg
|
||||
viewbox="0 0 1040 1040"
|
||||
style="transform: rotate(90deg);"
|
||||
>
|
||||
<path class="van-circle__layer"
|
||||
<path
|
||||
class="van-circle__layer"
|
||||
style="fill: none; stroke-width: 40px;"
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
>
|
||||
</path>
|
||||
<path d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
<path
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
style="stroke-width: 41px; stroke-dasharray: 2355px 3140px;"
|
||||
class="van-circle__hover"
|
||||
>
|
||||
@ -192,15 +217,18 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-circle">
|
||||
<svg viewbox="0 0 1040 1040"
|
||||
<svg
|
||||
viewbox="0 0 1040 1040"
|
||||
style="transform: rotate(180deg);"
|
||||
>
|
||||
<path class="van-circle__layer"
|
||||
<path
|
||||
class="van-circle__layer"
|
||||
style="fill: none; stroke-width: 40px;"
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
>
|
||||
</path>
|
||||
<path d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
<path
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
style="stroke-width: 41px; stroke-dasharray: 2355px 3140px;"
|
||||
class="van-circle__hover"
|
||||
>
|
||||
|
@ -1,14 +1,16 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should change stroke linecap when using stroke-linecap prop 1`] = `
|
||||
<div class="van-circle">
|
||||
<svg viewbox="0 0 1040 1040">
|
||||
<path class="van-circle__layer"
|
||||
<path
|
||||
class="van-circle__layer"
|
||||
style="fill: none; stroke-width: 40px;"
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
>
|
||||
</path>
|
||||
<path d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
<path
|
||||
d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
|
||||
style="stroke-width: 41px; stroke-linecap: square; stroke-dasharray: 0px 3140px;"
|
||||
class="van-circle__hover"
|
||||
>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @jest-environment node
|
||||
* @vitest-environment node
|
||||
*/
|
||||
import Demo from '../demo/index.vue';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
@ -6,19 +6,22 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div class="van-row">
|
||||
<!--[-->
|
||||
<div style
|
||||
<div
|
||||
style
|
||||
class="van-col van-col--8"
|
||||
>
|
||||
<!--[-->
|
||||
span: 8
|
||||
</div>
|
||||
<div style
|
||||
<div
|
||||
style
|
||||
class="van-col van-col--8"
|
||||
>
|
||||
<!--[-->
|
||||
span: 8
|
||||
</div>
|
||||
<div style
|
||||
<div
|
||||
style
|
||||
class="van-col van-col--8"
|
||||
>
|
||||
<!--[-->
|
||||
@ -27,13 +30,15 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div class="van-row">
|
||||
<!--[-->
|
||||
<div style
|
||||
<div
|
||||
style
|
||||
class="van-col van-col--4"
|
||||
>
|
||||
<!--[-->
|
||||
span: 4
|
||||
</div>
|
||||
<div style
|
||||
<div
|
||||
style
|
||||
class="van-col van-col--10 van-col--offset-4"
|
||||
>
|
||||
<!--[-->
|
||||
@ -42,7 +47,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div class="van-row">
|
||||
<!--[-->
|
||||
<div style
|
||||
<div
|
||||
style
|
||||
class="van-col van-col--12 van-col--offset-12"
|
||||
>
|
||||
<!--[-->
|
||||
@ -54,19 +60,22 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div class="van-row">
|
||||
<!--[-->
|
||||
<div style
|
||||
<div
|
||||
style
|
||||
class="van-col van-col--8"
|
||||
>
|
||||
<!--[-->
|
||||
span: 8
|
||||
</div>
|
||||
<div style
|
||||
<div
|
||||
style
|
||||
class="van-col van-col--8"
|
||||
>
|
||||
<!--[-->
|
||||
span: 8
|
||||
</div>
|
||||
<div style
|
||||
<div
|
||||
style
|
||||
class="van-col van-col--8"
|
||||
>
|
||||
<!--[-->
|
||||
@ -78,19 +87,22 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div class="van-row van-row--justify-center">
|
||||
<!--[-->
|
||||
<div style
|
||||
<div
|
||||
style
|
||||
class="van-col van-col--6"
|
||||
>
|
||||
<!--[-->
|
||||
span: 6
|
||||
</div>
|
||||
<div style
|
||||
<div
|
||||
style
|
||||
class="van-col van-col--6"
|
||||
>
|
||||
<!--[-->
|
||||
span: 6
|
||||
</div>
|
||||
<div style
|
||||
<div
|
||||
style
|
||||
class="van-col van-col--6"
|
||||
>
|
||||
<!--[-->
|
||||
@ -99,19 +111,22 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div class="van-row van-row--justify-end">
|
||||
<!--[-->
|
||||
<div style
|
||||
<div
|
||||
style
|
||||
class="van-col van-col--6"
|
||||
>
|
||||
<!--[-->
|
||||
span: 6
|
||||
</div>
|
||||
<div style
|
||||
<div
|
||||
style
|
||||
class="van-col van-col--6"
|
||||
>
|
||||
<!--[-->
|
||||
span: 6
|
||||
</div>
|
||||
<div style
|
||||
<div
|
||||
style
|
||||
class="van-col van-col--6"
|
||||
>
|
||||
<!--[-->
|
||||
@ -120,19 +135,22 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div class="van-row van-row--justify-space-between">
|
||||
<!--[-->
|
||||
<div style
|
||||
<div
|
||||
style
|
||||
class="van-col van-col--6"
|
||||
>
|
||||
<!--[-->
|
||||
span: 6
|
||||
</div>
|
||||
<div style
|
||||
<div
|
||||
style
|
||||
class="van-col van-col--6"
|
||||
>
|
||||
<!--[-->
|
||||
span: 6
|
||||
</div>
|
||||
<div style
|
||||
<div
|
||||
style
|
||||
class="van-col van-col--6"
|
||||
>
|
||||
<!--[-->
|
||||
@ -141,19 +159,22 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div class="van-row van-row--justify-space-around">
|
||||
<!--[-->
|
||||
<div style
|
||||
<div
|
||||
style
|
||||
class="van-col van-col--6"
|
||||
>
|
||||
<!--[-->
|
||||
span: 6
|
||||
</div>
|
||||
<div style
|
||||
<div
|
||||
style
|
||||
class="van-col van-col--6"
|
||||
>
|
||||
<!--[-->
|
||||
span: 6
|
||||
</div>
|
||||
<div style
|
||||
<div
|
||||
style
|
||||
class="van-col van-col--6"
|
||||
>
|
||||
<!--[-->
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
@ -29,17 +29,20 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-row">
|
||||
<div class="van-col van-col--8"
|
||||
<div
|
||||
class="van-col van-col--8"
|
||||
style="padding-right: 13.333333333333334px;"
|
||||
>
|
||||
span: 8
|
||||
</div>
|
||||
<div style="padding-left: 6.666666666666666px; padding-right: 6.666666666666668px;"
|
||||
<div
|
||||
style="padding-left: 6.666666666666666px; padding-right: 6.666666666666668px;"
|
||||
class="van-col van-col--8"
|
||||
>
|
||||
span: 8
|
||||
</div>
|
||||
<div style="padding-left: 13.333333333333332px;"
|
||||
<div
|
||||
style="padding-left: 13.333333333333332px;"
|
||||
class="van-col van-col--8"
|
||||
>
|
||||
span: 8
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render Col correctly 1`] = `
|
||||
<div class="van-col van-col--8">
|
||||
@ -13,7 +13,8 @@ exports[`should render gutter correctly 1`] = `
|
||||
<div class="van-col van-col--12">
|
||||
12
|
||||
</div>
|
||||
<div style="padding-left: 12px;"
|
||||
<div
|
||||
style="padding-left: 12px;"
|
||||
class="van-col van-col--12"
|
||||
>
|
||||
12
|
||||
@ -21,12 +22,14 @@ exports[`should render gutter correctly 1`] = `
|
||||
<div class="van-col van-col--8">
|
||||
8
|
||||
</div>
|
||||
<div style="padding-left: 12px;"
|
||||
<div
|
||||
style="padding-left: 12px;"
|
||||
class="van-col van-col--8"
|
||||
>
|
||||
8
|
||||
</div>
|
||||
<div style="padding-left: 16px;"
|
||||
<div
|
||||
style="padding-left: 16px;"
|
||||
class="van-col van-col--8"
|
||||
>
|
||||
8
|
||||
@ -34,17 +37,20 @@ exports[`should render gutter correctly 1`] = `
|
||||
<div class="van-col van-col--6">
|
||||
6
|
||||
</div>
|
||||
<div style="padding-left: 12px;"
|
||||
<div
|
||||
style="padding-left: 12px;"
|
||||
class="van-col van-col--6"
|
||||
>
|
||||
6
|
||||
</div>
|
||||
<div style="padding-left: 16px;"
|
||||
<div
|
||||
style="padding-left: 16px;"
|
||||
class="van-col van-col--6"
|
||||
>
|
||||
6
|
||||
</div>
|
||||
<div style="padding-left: 18px;"
|
||||
<div
|
||||
style="padding-left: 18px;"
|
||||
class="van-col van-col--6"
|
||||
>
|
||||
6
|
||||
@ -52,17 +58,20 @@ exports[`should render gutter correctly 1`] = `
|
||||
<div class="van-col van-col--7">
|
||||
7
|
||||
</div>
|
||||
<div style="padding-left: 12px;"
|
||||
<div
|
||||
style="padding-left: 12px;"
|
||||
class="van-col van-col--6"
|
||||
>
|
||||
6
|
||||
</div>
|
||||
<div style="padding-left: 16px;"
|
||||
<div
|
||||
style="padding-left: 16px;"
|
||||
class="van-col van-col--5"
|
||||
>
|
||||
5
|
||||
</div>
|
||||
<div style="padding-left: 18px;"
|
||||
<div
|
||||
style="padding-left: 18px;"
|
||||
class="van-col van-col--4"
|
||||
>
|
||||
4
|
||||
@ -70,7 +79,8 @@ exports[`should render gutter correctly 1`] = `
|
||||
<div class="van-col van-col--3">
|
||||
3
|
||||
</div>
|
||||
<div style="padding-left: 12px;"
|
||||
<div
|
||||
style="padding-left: 12px;"
|
||||
class="van-col van-col--2"
|
||||
>
|
||||
2
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @jest-environment node
|
||||
* @vitest-environment node
|
||||
*/
|
||||
import Demo from '../demo/index.vue';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
@ -7,19 +7,22 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-collapse van-hairline--top-bottom">
|
||||
<!--[-->
|
||||
<div class="van-collapse-item">
|
||||
<div class="van-cell van-cell--clickable van-collapse-item__title van-collapse-item__title--expanded"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-collapse-item__title van-collapse-item__title--expanded"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
aria-expanded="true"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
Title1
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -33,19 +36,22 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-collapse-item van-collapse-item--border">
|
||||
<div class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
Title2
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -53,19 +59,22 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-collapse-item van-collapse-item--border">
|
||||
<div class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
Title3
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -79,19 +88,22 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-collapse van-hairline--top-bottom">
|
||||
<!--[-->
|
||||
<div class="van-collapse-item">
|
||||
<div class="van-cell van-cell--clickable van-collapse-item__title van-collapse-item__title--expanded"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-collapse-item__title van-collapse-item__title--expanded"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
aria-expanded="true"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
Title1
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -105,19 +117,22 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-collapse-item van-collapse-item--border">
|
||||
<div class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
Title2
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -125,19 +140,22 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-collapse-item van-collapse-item--border">
|
||||
<div class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
Title3
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -151,19 +169,22 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-collapse van-hairline--top-bottom">
|
||||
<!--[-->
|
||||
<div class="van-collapse-item">
|
||||
<div class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
Title1
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -171,18 +192,21 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-collapse-item van-collapse-item--border">
|
||||
<div class="van-cell van-collapse-item__title van-collapse-item__title--disabled"
|
||||
<div
|
||||
class="van-cell van-collapse-item__title van-collapse-item__title--disabled"
|
||||
role="button"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
Title2
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -190,18 +214,21 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-collapse-item van-collapse-item--border">
|
||||
<div class="van-cell van-collapse-item__title van-collapse-item__title--disabled"
|
||||
<div
|
||||
class="van-cell van-collapse-item__title van-collapse-item__title--disabled"
|
||||
role="button"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
Title3
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -215,23 +242,27 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-collapse van-hairline--top-bottom">
|
||||
<!--[-->
|
||||
<div class="van-collapse-item">
|
||||
<div class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
Title1
|
||||
<i class="van-badge__wrapper van-icon van-icon-question-o"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-question-o"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</i>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -239,17 +270,20 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-collapse-item van-collapse-item--border">
|
||||
<div class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-shop-o van-cell__left-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-shop-o van-cell__left-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</i>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
@ -261,7 +295,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Content
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -275,19 +310,22 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-collapse van-hairline--top-bottom">
|
||||
<!--[-->
|
||||
<div class="van-collapse-item">
|
||||
<div class="van-cell van-cell--clickable van-collapse-item__title van-collapse-item__title--expanded"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-collapse-item__title van-collapse-item__title--expanded"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
aria-expanded="true"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
Title1
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -301,19 +339,22 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-collapse-item van-collapse-item--border">
|
||||
<div class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
Title2
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -321,19 +362,22 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-collapse-item van-collapse-item--border">
|
||||
<div class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
Title3
|
||||
</span>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -342,7 +386,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="demo-collapse-buttons">
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal"
|
||||
style
|
||||
>
|
||||
@ -353,7 +398,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal"
|
||||
style
|
||||
>
|
||||
|
@ -1,10 +1,11 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
<div class="van-collapse van-hairline--top-bottom">
|
||||
<div class="van-collapse-item">
|
||||
<div class="van-cell van-cell--clickable van-collapse-item__title van-collapse-item__title--expanded"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-collapse-item__title van-collapse-item__title--expanded"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
aria-expanded="true"
|
||||
@ -24,7 +25,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-collapse-item van-collapse-item--border">
|
||||
<div class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
aria-expanded="false"
|
||||
@ -39,7 +41,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-collapse-item van-collapse-item--border">
|
||||
<div class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
aria-expanded="false"
|
||||
@ -58,7 +61,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
<div class="van-collapse van-hairline--top-bottom">
|
||||
<div class="van-collapse-item">
|
||||
<div class="van-cell van-cell--clickable van-collapse-item__title van-collapse-item__title--expanded"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-collapse-item__title van-collapse-item__title--expanded"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
aria-expanded="true"
|
||||
@ -78,7 +82,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-collapse-item van-collapse-item--border">
|
||||
<div class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
aria-expanded="false"
|
||||
@ -93,7 +98,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-collapse-item van-collapse-item--border">
|
||||
<div class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
aria-expanded="false"
|
||||
@ -112,7 +118,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
<div class="van-collapse van-hairline--top-bottom">
|
||||
<div class="van-collapse-item">
|
||||
<div class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
aria-expanded="false"
|
||||
@ -127,7 +134,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-collapse-item van-collapse-item--border">
|
||||
<div class="van-cell van-collapse-item__title van-collapse-item__title--disabled"
|
||||
<div
|
||||
class="van-cell van-collapse-item__title van-collapse-item__title--disabled"
|
||||
role="button"
|
||||
aria-expanded="false"
|
||||
>
|
||||
@ -141,7 +149,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-collapse-item van-collapse-item--border">
|
||||
<div class="van-cell van-collapse-item__title van-collapse-item__title--disabled"
|
||||
<div
|
||||
class="van-cell van-collapse-item__title van-collapse-item__title--disabled"
|
||||
role="button"
|
||||
aria-expanded="false"
|
||||
>
|
||||
@ -159,7 +168,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
<div class="van-collapse van-hairline--top-bottom">
|
||||
<div class="van-collapse-item">
|
||||
<div class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
aria-expanded="false"
|
||||
@ -174,7 +184,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-collapse-item van-collapse-item--border">
|
||||
<div class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
aria-expanded="false"
|
||||
@ -200,7 +211,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
<div class="van-collapse van-hairline--top-bottom">
|
||||
<div class="van-collapse-item">
|
||||
<div class="van-cell van-cell--clickable van-collapse-item__title van-collapse-item__title--expanded"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-collapse-item__title van-collapse-item__title--expanded"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
aria-expanded="true"
|
||||
@ -220,7 +232,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-collapse-item van-collapse-item--border">
|
||||
<div class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
aria-expanded="false"
|
||||
@ -235,7 +248,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-collapse-item van-collapse-item--border">
|
||||
<div class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
aria-expanded="false"
|
||||
@ -251,7 +265,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="demo-collapse-buttons">
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -260,7 +275,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="van-button van-button--primary van-button--normal"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
|
@ -1,9 +1,10 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render slots of CollapseItem correctly 1`] = `
|
||||
<div class="van-collapse van-hairline--top-bottom">
|
||||
<div class="van-collapse-item">
|
||||
<div class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
<div
|
||||
class="van-cell van-cell--clickable van-collapse-item__title"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
aria-expanded="false"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @jest-environment node
|
||||
* @vitest-environment node
|
||||
*/
|
||||
import Demo from '../demo/index.vue';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
@ -6,7 +6,7 @@ export function useId() {
|
||||
const vm = getCurrentInstance();
|
||||
const { name = 'unknown' } = vm?.type || {};
|
||||
|
||||
// keep jest snapshot stable
|
||||
// keep test snapshot stable
|
||||
if (process.env.NODE_ENV === 'test') {
|
||||
return name;
|
||||
}
|
||||
|
@ -1,11 +1,12 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<div style="min-height:100vh;">
|
||||
<div>
|
||||
<!--[-->
|
||||
<div class="van-cell">
|
||||
<div class="van-cell__title"
|
||||
<div
|
||||
class="van-cell__title"
|
||||
style
|
||||
>
|
||||
<span>
|
||||
@ -19,11 +20,13 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<form class="van-form">
|
||||
<!--[-->
|
||||
<div class="van-cell van-field">
|
||||
<div class="van-cell__title van-field__label"
|
||||
<div
|
||||
class="van-cell__title van-field__label"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
style
|
||||
>
|
||||
Rate
|
||||
@ -34,14 +37,16 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-field__body">
|
||||
<div class="van-field__control van-field__control--custom">
|
||||
<!--[-->
|
||||
<div role="radiogroup"
|
||||
<div
|
||||
role="radiogroup"
|
||||
class="van-rate"
|
||||
tabindex="0"
|
||||
aria-disabled="false"
|
||||
aria-readonly="false"
|
||||
>
|
||||
<!--[-->
|
||||
<div role="radio"
|
||||
<div
|
||||
role="radio"
|
||||
style
|
||||
class="van-rate__item"
|
||||
tabindex="0"
|
||||
@ -49,13 +54,15 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
aria-posinset="1"
|
||||
aria-checked="true"
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</i>
|
||||
</div>
|
||||
<div role="radio"
|
||||
<div
|
||||
role="radio"
|
||||
style
|
||||
class="van-rate__item"
|
||||
tabindex="0"
|
||||
@ -63,13 +70,15 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
aria-posinset="2"
|
||||
aria-checked="true"
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</i>
|
||||
</div>
|
||||
<div role="radio"
|
||||
<div
|
||||
role="radio"
|
||||
style
|
||||
class="van-rate__item"
|
||||
tabindex="0"
|
||||
@ -77,13 +86,15 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
aria-posinset="3"
|
||||
aria-checked="true"
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</i>
|
||||
</div>
|
||||
<div role="radio"
|
||||
<div
|
||||
role="radio"
|
||||
style
|
||||
class="van-rate__item"
|
||||
tabindex="0"
|
||||
@ -91,13 +102,15 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
aria-posinset="4"
|
||||
aria-checked="true"
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</i>
|
||||
</div>
|
||||
<div role="radio"
|
||||
<div
|
||||
role="radio"
|
||||
style
|
||||
class="van-rate__item"
|
||||
tabindex="0"
|
||||
@ -105,7 +118,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
aria-posinset="5"
|
||||
aria-checked="false"
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-star-o van-rate__icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-star-o van-rate__icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -117,11 +131,13 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-cell van-field">
|
||||
<div class="van-cell__title van-field__label"
|
||||
<div
|
||||
class="van-cell__title van-field__label"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
style
|
||||
>
|
||||
Slider
|
||||
@ -132,13 +148,16 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-field__body">
|
||||
<div class="van-field__control van-field__control--custom">
|
||||
<!--[-->
|
||||
<div style
|
||||
<div
|
||||
style
|
||||
class="van-slider"
|
||||
>
|
||||
<div class="van-slider__bar"
|
||||
<div
|
||||
class="van-slider__bar"
|
||||
style="width:50%;left:0%;"
|
||||
>
|
||||
<div role="slider"
|
||||
<div
|
||||
role="slider"
|
||||
class="van-slider__button-wrapper van-slider__button-wrapper--right"
|
||||
tabindex="0"
|
||||
aria-valuemin="0"
|
||||
@ -146,7 +165,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
aria-valuemax="100"
|
||||
aria-orientation="horizontal"
|
||||
>
|
||||
<div class="van-slider__button"
|
||||
<div
|
||||
class="van-slider__button"
|
||||
style
|
||||
>
|
||||
</div>
|
||||
@ -158,7 +178,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin:16px;">
|
||||
<button type="submit"
|
||||
<button
|
||||
type="submit"
|
||||
class="van-button van-button--primary van-button--normal van-button--block van-button--round"
|
||||
style
|
||||
>
|
||||
@ -174,18 +195,21 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<div class="van-config-provider"
|
||||
<div
|
||||
class="van-config-provider"
|
||||
style="--van-rate-icon-full-color:#07c160;--van-slider-bar-height:4px;--van-slider-button-width:20px;--van-slider-button-height:20px;--van-slider-active-background:#07c160;--van-button-primary-background:#07c160;--van-button-primary-border-color:#07c160;"
|
||||
>
|
||||
<!--[-->
|
||||
<form class="van-form">
|
||||
<!--[-->
|
||||
<div class="van-cell van-field">
|
||||
<div class="van-cell__title van-field__label"
|
||||
<div
|
||||
class="van-cell__title van-field__label"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
style
|
||||
>
|
||||
Rate
|
||||
@ -196,14 +220,16 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-field__body">
|
||||
<div class="van-field__control van-field__control--custom">
|
||||
<!--[-->
|
||||
<div role="radiogroup"
|
||||
<div
|
||||
role="radiogroup"
|
||||
class="van-rate"
|
||||
tabindex="0"
|
||||
aria-disabled="false"
|
||||
aria-readonly="false"
|
||||
>
|
||||
<!--[-->
|
||||
<div role="radio"
|
||||
<div
|
||||
role="radio"
|
||||
style
|
||||
class="van-rate__item"
|
||||
tabindex="0"
|
||||
@ -211,13 +237,15 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
aria-posinset="1"
|
||||
aria-checked="true"
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</i>
|
||||
</div>
|
||||
<div role="radio"
|
||||
<div
|
||||
role="radio"
|
||||
style
|
||||
class="van-rate__item"
|
||||
tabindex="0"
|
||||
@ -225,13 +253,15 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
aria-posinset="2"
|
||||
aria-checked="true"
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</i>
|
||||
</div>
|
||||
<div role="radio"
|
||||
<div
|
||||
role="radio"
|
||||
style
|
||||
class="van-rate__item"
|
||||
tabindex="0"
|
||||
@ -239,13 +269,15 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
aria-posinset="3"
|
||||
aria-checked="true"
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</i>
|
||||
</div>
|
||||
<div role="radio"
|
||||
<div
|
||||
role="radio"
|
||||
style
|
||||
class="van-rate__item"
|
||||
tabindex="0"
|
||||
@ -253,13 +285,15 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
aria-posinset="4"
|
||||
aria-checked="true"
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</i>
|
||||
</div>
|
||||
<div role="radio"
|
||||
<div
|
||||
role="radio"
|
||||
style
|
||||
class="van-rate__item"
|
||||
tabindex="0"
|
||||
@ -267,7 +301,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
aria-posinset="5"
|
||||
aria-checked="false"
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-star-o van-rate__icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-star-o van-rate__icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -279,11 +314,13 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-cell van-field">
|
||||
<div class="van-cell__title van-field__label"
|
||||
<div
|
||||
class="van-cell__title van-field__label"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
<label id="van-field-label"
|
||||
<label
|
||||
id="van-field-label"
|
||||
style
|
||||
>
|
||||
Slider
|
||||
@ -294,13 +331,16 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-field__body">
|
||||
<div class="van-field__control van-field__control--custom">
|
||||
<!--[-->
|
||||
<div style
|
||||
<div
|
||||
style
|
||||
class="van-slider"
|
||||
>
|
||||
<div class="van-slider__bar"
|
||||
<div
|
||||
class="van-slider__bar"
|
||||
style="width:50%;left:0%;"
|
||||
>
|
||||
<div role="slider"
|
||||
<div
|
||||
role="slider"
|
||||
class="van-slider__button-wrapper van-slider__button-wrapper--right"
|
||||
tabindex="0"
|
||||
aria-valuemin="0"
|
||||
@ -308,7 +348,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
aria-valuemax="100"
|
||||
aria-orientation="horizontal"
|
||||
>
|
||||
<div class="van-slider__button"
|
||||
<div
|
||||
class="van-slider__button"
|
||||
style
|
||||
>
|
||||
</div>
|
||||
@ -320,7 +361,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin:16px;">
|
||||
<button type="submit"
|
||||
<button
|
||||
type="submit"
|
||||
class="van-button van-button--primary van-button--normal van-button--block van-button--round"
|
||||
style
|
||||
>
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<div style="min-height: 100vh;">
|
||||
@ -22,13 +22,15 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-cell__value van-field__value">
|
||||
<div class="van-field__body">
|
||||
<div class="van-field__control van-field__control--custom">
|
||||
<div role="radiogroup"
|
||||
<div
|
||||
role="radiogroup"
|
||||
class="van-rate"
|
||||
tabindex="0"
|
||||
aria-disabled="false"
|
||||
aria-readonly="false"
|
||||
>
|
||||
<div role="radio"
|
||||
<div
|
||||
role="radio"
|
||||
class="van-rate__item"
|
||||
tabindex="0"
|
||||
aria-setsize="5"
|
||||
@ -38,7 +40,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full">
|
||||
</i>
|
||||
</div>
|
||||
<div role="radio"
|
||||
<div
|
||||
role="radio"
|
||||
class="van-rate__item"
|
||||
tabindex="0"
|
||||
aria-setsize="5"
|
||||
@ -48,7 +51,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full">
|
||||
</i>
|
||||
</div>
|
||||
<div role="radio"
|
||||
<div
|
||||
role="radio"
|
||||
class="van-rate__item"
|
||||
tabindex="0"
|
||||
aria-setsize="5"
|
||||
@ -58,7 +62,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full">
|
||||
</i>
|
||||
</div>
|
||||
<div role="radio"
|
||||
<div
|
||||
role="radio"
|
||||
class="van-rate__item"
|
||||
tabindex="0"
|
||||
aria-setsize="5"
|
||||
@ -68,7 +73,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full">
|
||||
</i>
|
||||
</div>
|
||||
<div role="radio"
|
||||
<div
|
||||
role="radio"
|
||||
class="van-rate__item"
|
||||
tabindex="0"
|
||||
aria-setsize="5"
|
||||
@ -93,10 +99,12 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-field__body">
|
||||
<div class="van-field__control van-field__control--custom">
|
||||
<div class="van-slider">
|
||||
<div class="van-slider__bar"
|
||||
<div
|
||||
class="van-slider__bar"
|
||||
style="width: 50%; left: 0%;"
|
||||
>
|
||||
<div role="slider"
|
||||
<div
|
||||
role="slider"
|
||||
class="van-slider__button-wrapper van-slider__button-wrapper--right"
|
||||
tabindex="0"
|
||||
aria-valuemin="0"
|
||||
@ -114,7 +122,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin: 16px;">
|
||||
<button type="submit"
|
||||
<button
|
||||
type="submit"
|
||||
class="van-button van-button--primary van-button--normal van-button--block van-button--round"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
@ -127,7 +136,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</form>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-config-provider"
|
||||
<div
|
||||
class="van-config-provider"
|
||||
style="--van-rate-icon-full-color: #07c160; --van-slider-bar-height: 4px; --van-slider-button-width: 20px; --van-slider-button-height: 20px; --van-slider-active-background: #07c160; --van-button-primary-background: #07c160; --van-button-primary-border-color: #07c160;"
|
||||
>
|
||||
<form class="van-form">
|
||||
@ -140,13 +150,15 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-cell__value van-field__value">
|
||||
<div class="van-field__body">
|
||||
<div class="van-field__control van-field__control--custom">
|
||||
<div role="radiogroup"
|
||||
<div
|
||||
role="radiogroup"
|
||||
class="van-rate"
|
||||
tabindex="0"
|
||||
aria-disabled="false"
|
||||
aria-readonly="false"
|
||||
>
|
||||
<div role="radio"
|
||||
<div
|
||||
role="radio"
|
||||
class="van-rate__item"
|
||||
tabindex="0"
|
||||
aria-setsize="5"
|
||||
@ -156,7 +168,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full">
|
||||
</i>
|
||||
</div>
|
||||
<div role="radio"
|
||||
<div
|
||||
role="radio"
|
||||
class="van-rate__item"
|
||||
tabindex="0"
|
||||
aria-setsize="5"
|
||||
@ -166,7 +179,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full">
|
||||
</i>
|
||||
</div>
|
||||
<div role="radio"
|
||||
<div
|
||||
role="radio"
|
||||
class="van-rate__item"
|
||||
tabindex="0"
|
||||
aria-setsize="5"
|
||||
@ -176,7 +190,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full">
|
||||
</i>
|
||||
</div>
|
||||
<div role="radio"
|
||||
<div
|
||||
role="radio"
|
||||
class="van-rate__item"
|
||||
tabindex="0"
|
||||
aria-setsize="5"
|
||||
@ -186,7 +201,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full">
|
||||
</i>
|
||||
</div>
|
||||
<div role="radio"
|
||||
<div
|
||||
role="radio"
|
||||
class="van-rate__item"
|
||||
tabindex="0"
|
||||
aria-setsize="5"
|
||||
@ -211,10 +227,12 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-field__body">
|
||||
<div class="van-field__control van-field__control--custom">
|
||||
<div class="van-slider">
|
||||
<div class="van-slider__bar"
|
||||
<div
|
||||
class="van-slider__bar"
|
||||
style="width: 50%; left: 0%;"
|
||||
>
|
||||
<div role="slider"
|
||||
<div
|
||||
role="slider"
|
||||
class="van-slider__button-wrapper van-slider__button-wrapper--right"
|
||||
tabindex="0"
|
||||
aria-valuemin="0"
|
||||
@ -232,7 +250,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin: 16px;">
|
||||
<button type="submit"
|
||||
<button
|
||||
type="submit"
|
||||
class="van-button van-button--primary van-button--normal van-button--block van-button--round"
|
||||
>
|
||||
<div class="van-button__content">
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should change icon class-prefix when using icon-prefix prop 1`] = `
|
||||
<div class="van-config-provider">
|
||||
@ -8,6 +8,7 @@ exports[`should change icon class-prefix when using icon-prefix prop 1`] = `
|
||||
`;
|
||||
|
||||
exports[`should render tag prop correctly 1`] = `
|
||||
<section class="van-config-provider">
|
||||
</section>
|
||||
"<section class=\\"van-config-provider\\">
|
||||
<!---->
|
||||
</section>"
|
||||
`;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @jest-environment node
|
||||
* @vitest-environment node
|
||||
*/
|
||||
import Demo from '../demo/index.vue';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
@ -1,25 +1,29 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<!--[-->
|
||||
<div>
|
||||
<!--[-->
|
||||
<div class="van-cell van-cell--center van-cell--clickable van-cell--borderless van-contact-card van-contact-card--add"
|
||||
<div
|
||||
class="van-cell van-cell--center van-cell--clickable van-cell--borderless van-contact-card van-contact-card--add"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-add-square van-cell__left-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-add-square van-cell__left-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</i>
|
||||
<div class="van-cell__title van-contact-card__title"
|
||||
<div
|
||||
class="van-cell__title van-contact-card__title"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
Add contact
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -28,16 +32,19 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<!--[-->
|
||||
<div class="van-cell van-cell--center van-cell--clickable van-cell--borderless van-contact-card van-contact-card--edit"
|
||||
<div
|
||||
class="van-cell van-cell--center van-cell--clickable van-cell--borderless van-contact-card van-contact-card--edit"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<i class="van-badge__wrapper van-icon van-icon-contact van-cell__left-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-contact van-cell__left-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</i>
|
||||
<div class="van-cell__title van-contact-card__title"
|
||||
<div
|
||||
class="van-cell__title van-contact-card__title"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -48,7 +55,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Phone:13000000000
|
||||
</div>
|
||||
</div>
|
||||
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
@ -58,12 +66,14 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
<!--[-->
|
||||
<div class="van-cell van-cell--center van-cell--borderless van-contact-card van-contact-card--edit">
|
||||
<i class="van-badge__wrapper van-icon van-icon-contact van-cell__left-icon"
|
||||
<i
|
||||
class="van-badge__wrapper van-icon van-icon-contact van-cell__left-icon"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
</i>
|
||||
<div class="van-cell__title van-contact-card__title"
|
||||
<div
|
||||
class="van-cell__title van-contact-card__title"
|
||||
style
|
||||
>
|
||||
<!--[-->
|
||||
|
@ -1,8 +1,9 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
<div class="van-cell van-cell--center van-cell--clickable van-cell--borderless van-contact-card van-contact-card--add"
|
||||
<div
|
||||
class="van-cell van-cell--center van-cell--clickable van-cell--borderless van-contact-card van-contact-card--add"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
@ -16,7 +17,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-cell van-cell--center van-cell--clickable van-cell--borderless van-contact-card van-contact-card--edit"
|
||||
<div
|
||||
class="van-cell van-cell--center van-cell--clickable van-cell--borderless van-contact-card van-contact-card--edit"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user