diff --git a/.cid/tiny-opentiny-vue.yml b/.cid/tiny-opentiny-vue.yml new file mode 100644 index 000000000..dcc07d55f --- /dev/null +++ b/.cid/tiny-opentiny-vue.yml @@ -0,0 +1,23 @@ +version: 0.1.0 +name: tiny-opentiny-vue +language: nodejs + +# 构建工具 +dependencies: + base: + nodejs: best + +# 构建机器 +machine: + standard: + euler: + - default + +# 构建脚本 +scripts: + - sh build.sh + +# 构建产物 +artifacts: + npm_deploy: + - config_path: ./dist/vue/package.json diff --git a/.codecheck/check.yml b/.codecheck/check.yml new file mode 100644 index 000000000..d88ba8576 --- /dev/null +++ b/.codecheck/check.yml @@ -0,0 +1,9 @@ +version: 2.0 + +steps: + pre_codecheck: + - checkout + +tool_params: + secsolar: + source_dir: ./ \ No newline at end of file diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000..5f3b9072a --- /dev/null +++ b/.eslintignore @@ -0,0 +1,2 @@ +dist +runtime \ No newline at end of file diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 000000000..81bd121cf --- /dev/null +++ b/.eslintrc @@ -0,0 +1,94 @@ +{ + "root": true, + "env": { + "es6": true, + "browser": true, + "node": true, + "jest": true + }, + "extends": ["eslint:recommended", "plugin:vue/vue3-essential"], + "parserOptions": { + "parser": ["vue-eslint-parser", "@babel/eslint-parser"], + "requireConfigFile": false, + "sourceType": "module", + "ecmaVersion": "latest", + "ecmaFeatures": { + "jsx": true + } + }, + "rules": { + "no-debugger": "off", + "no-var": "error", + "no-tabs": "error", + "no-trailing-spaces": "error", + "no-mixed-spaces-and-tabs": "error", + "no-undef": "error", + "no-extra-semi": "error", + "no-empty": "error", + "no-console": "off", + "semi": [2, "never"], + "max-len": [ + "warn", + { + "code": 160 + } + ], + "function-paren-newline": ["off"], + "object-property-newline": [ + "warn", + { + "allowAllPropertiesOnSameLine": true + } + ], + "newline-per-chained-call": [ + "warn", + { + "ignoreChainWithDepth": 4 + } + ], + "comma-dangle": "off", + "semi-style": ["warn", "last"], + "max-lines": ["error", 2400], + "max-lines-per-function": ["error", 200], + "complexity": ["error", 26], + "max-depth": ["warn", 4], + "max-nested-callbacks": ["error", 4], + "no-multi-assign": "off", + "no-undef-init": "warn", + "no-shadow": "off", + "max-params": ["warn", 5], + "no-param-reassign": "off", + "prefer-rest-params": "off", + "prefer-arrow-callback": "error", + "arrow-body-style": ["warn", "as-needed"], + "no-this-before-super": "error", + "quotes": ["warn", "single"], + "prefer-template": "off", + "no-multi-str": "warn", + "object-shorthand": "warn", + "dot-notation": "error", + "accessor-pairs": "error", + "no-prototype-builtins": "error", + "guard-for-in": "error", + "eqeqeq": "off", + "no-fallthrough": "error", + "no-case-declarations": "error", + "no-unsafe-finally": "error", + "no-eval": "error", + "no-with": "error", + "no-implicit-coercion": [ + "error", + { + "allow": ["!!", "~"] + } + ], + "vue/multi-word-component-names": "off", + "vue/valid-v-slot": "off", + "vue/no-deprecated-v-on-native-modifier": "off", + "vue/no-reserved-component-names": "off", + "vue/no-deprecated-dollar-listeners-api": "off", + "vue/no-deprecated-slot-attribute": "off", + "vue/no-use-computed-property-like-method": "off", + "vue/no-mutating-props": "off" + } +} diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 000000000..14d5e353f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,61 @@ +name: '🐛 Bug report' +description: Create a report to help us improve Tiny Vue +title: '🐛 [Bug]: ' +labels: ['🐛 bug'] +body: + - type: markdown + attributes: + value: | + Please fill out the following carefully in order to better fix the problem. + - type: input + id: tiny-vue-version + attributes: + label: Version + description: | + ### **Check if the issue is reproducible with the latest stable version.** + You can use the command `npm ls @opentiny/vue` to view it + placeholder: latest + validations: + required: true + - type: input + id: vue-version + attributes: + label: Vue Version + placeholder: latest + validations: + required: true + - type: textarea + id: minimal-repo + attributes: + label: Link to minimal reproduction + description: | + **Provide a streamlined CodePen / CodeSandbox or GitHub repository link as much as possible. Please don't fill in a link randomly, it will only close your issue directly.** + placeholder: Please Input + validations: + required: true + - type: textarea + id: reproduce + attributes: + label: Step to reproduce + description: | + **After the replay is turned on, what actions do we need to perform to make the bug appear? Simple and clear steps can help us locate the problem more quickly. Please clearly describe the steps of reproducing the issue. Issues without clear reproducing steps will not be repaired. If the issue marked with 'need reproduction' does not provide relevant steps within 7 days, it will be closed directly.** + placeholder: Please Input + validations: + required: true + - type: textarea + id: expected + attributes: + label: What is expected + placeholder: Please Input + - type: textarea + id: actually + attributes: + label: What is actually happening + placeholder: Please Input + - type: textarea + id: additional-comments + attributes: + label: Any additional comments (optional) + description: | + **Some background / context of how you ran into this bug.** + placeholder: Please Input diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 000000000..fc5eed19c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: true +contact_links: + - name: Questions or need help + url: https://github.com/opentiny/ui-vue/discussions + about: Add this WeChat(opentiny), we will invite you to the WeChat discussion group later. diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml new file mode 100644 index 000000000..536cd0c05 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -0,0 +1,23 @@ +name: ✨ Feature Request +description: Propose new features to @opentiny/vue to improve it. +title: '✨ [Feature]: ' +labels: ['✨ feature'] +body: + - type: textarea + id: feature-solve + attributes: + label: What problem does this feature solve + description: | + Explain your use case, context, and rationale behind this feature request. More importantly, what is the end user experience you are trying to build that led to the need for this feature? + placeholder: Please Input + validations: + required: true + - type: textarea + id: feature-api + attributes: + label: What does the proposed API look like + description: | + Describe how you propose to solve the problem and provide code samples of how the API would work once implemented. Note that you can use Markdown to format your code blocks. + placeholder: Please Input + validations: + required: true diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..9901372bf --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,41 @@ +# PR + +## PR Checklist + +Please check if your PR fulfills the following requirements: + +- [ ] The commit message follows our [Commit Message Guidelines](https://github.com/opentiny/ui-vue/blob/main/CONTRIBUTING.md) +- [ ] Tests for the changes have been added (for bug fixes / features) +- [ ] Docs have been added / updated (for bug fixes / features) + +## PR Type + +What kind of change does this PR introduce? + + + +- [ ] Bugfix +- [ ] Feature +- [ ] Code style update (formatting, local variables) +- [ ] Refactoring (no functional changes, no api changes) +- [ ] Build related changes +- [ ] CI related changes +- [ ] Documentation content changes +- [ ] Other... Please describe: + +## What is the current behavior? + + + +Issue Number: N/A + +## What is the new behavior? + +## Does this PR introduce a breaking change? + +- [ ] Yes +- [ ] No + + + +## Other information diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..b3e1a5a99 --- /dev/null +++ b/.gitignore @@ -0,0 +1,41 @@ +.DS_Store +node_modules +dist/ +allDist/ +packages/**/runtime/ +coverage/ + +/packages/base.js +/packages/chart.js +/packages/core.js +/packages/index.js +/packages/pc.js +/packages/mobile.js + +# local env +.env.local +.env.*.local + +# Log files +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Editor directories and files +.idea +.history +.vscode +.cloudbuild +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? +*.log +*.stackdump + +yarn.lock +package-lock.json + +tgzs +*.tgz diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100644 index 000000000..d71a03b9f --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +yarn commitlint --edit $1 diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 000000000..36af21989 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npx lint-staged diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..68ef920d1 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +# Except myapp folder: +dist/ +public/ \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 000000000..08c3f2656 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,4 @@ +semi: false +singleQuote: true +printWidth: 160 +trailingComma: none diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..2e40d967e --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,20 @@ +# 更新日志 + +## v2.0.0/v3.0.0 + +`2022/09/15` + +### 📢破坏性变更 + +无 + +### ✨新特性 + +- Search 组件:增加 input 事件 +- Select 组件:增加 scroll 事件 + +### 🐞缺陷修复 + +- Tabs 组件:修复 tab 组件套 tab 组件,内部的 tab 项会显示在外部 tab 上的bug +- PopEditor 组件:解决弹出框里的查询条件不能输入的问题 +- Cascader 组件:解决点击已选中选项无法关闭选择器的问题 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..18daa8f34 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,81 @@ +# 贡献指南 + +很高兴你有意愿参与 TinyVue 开源项目的贡献,参与贡献的形式有很多种,你可以根据自己的特长和兴趣选择其中的一个或多个: + +- 报告[新缺陷](https://github.com/opentiny/tiny-vue/issues/new?template=bug-report.yml) +- 为[已有缺陷](https://github.com/opentiny/tiny-vue/labels/bug)提供更详细的信息,比如补充截图、提供更详细的复现步骤、提供最小可复现demo链接等 +- 提交 Pull requests 修复文档中的错别字或让文档更清晰和完善 +- 添加官方小助手微信 opentiny,加入技术交流群参与讨论 + +当你亲自使用 TinyVue 组件库,并参与多次以上形式的贡献,对 TinyVue 逐渐熟悉之后,可以尝试做一些更有挑战的事情,比如: + +- 修复缺陷,可以先从 [Good-first issue](https://github.com/opentiny/tiny-vue/labels/good%20first%20issue) 开始 +- 实现新特性 +- 完善单元测试 +- 翻译文档 +- 参与代码检视 + +## 提交 Issue + +如果你在使用 TinyVue 组件过程中遇到问题,欢迎给我们提交 Issue,提交 Issue 之前,请先仔细阅读相关的[官方文档](https://opentiny.design),确认这是一个缺陷还是尚未实现的功能。 + +如果是一个缺陷,创建新 Issue 时选择 [Bug report](https://github.com/opentiny/tiny-vue/issues/new?template=bug-report.yml) 模板,标题遵循 `[componentName]缺陷简述` 的格式,比如:`[select]选择框内容太长展示不下时,希望能支持配置tips提示`。 + +报告缺陷的 Issue 主要需要填写以下信息: +- tiny-vue 和 vue 的版本号 +- 缺陷的表现,可截图辅助说明,如果有报错可贴上报错信息 +- 缺陷的复现步骤,最好能提供一个最小可复现 demo 链接 + +如果是一个新特性,则选择 [Feature request](https://github.com/opentiny/tiny-vue/issues/new?template=feature-request.yml) 模板,标题遵循 `[componentName]新特性简述` 的格式,比如:`[select]过滤功能中,选中的选项退格删除后,无法再次选中该选项`。 + +新特性的 Issue 主要需要填写以下信息: +- 该特性主要解决用户的什么问题 +- 该特性的 api 是什么样的 + +## 提交 PR + +提交 PR 之前,请先确保你提交的内容是符合 TinyVue 整体规划的,一般已经标记为 [bug](https://github.com/opentiny/tiny-vue/labels/bug) 的 Issue 是鼓励提交 PR 的,如果你不是很确定,可以创建一个 [Discussion](https://github.com/opentiny/tiny-vue/discussions) 进行讨论。 + +本地启动步骤: + +- 点击 [TinyVue](https://github.com/opentiny/tiny-vue) 代码仓库右上角的 Fork 按钮,将上游仓库 Fork 到个人仓库 +- Clone 个人仓库到本地 +- 在 Tiny Vue 根目录下运行 npm i, 安装 node 依赖 +- 运行 npm run dev:vue3,启动组件库网站 +- 打开浏览器访问:[http://127.0.0.1:5173/](http://127.0.0.1:5173/) + +```shell +# username 为用户名,执行前请替换 +git clone git@github.com:username/tiny-vue.git +cd tiny-vue +git remote add upstream git@github.com:opentiny/tiny-vue.git +npm i + +# 启动 Vue3 项目 +npm run dev:vue3 + +# 启动 Vue2 项目 +npm run dev:vue2 +``` + +提交 PR 的步骤: + +- 请确保你已经完成本地启动中的步骤,并能正常访问:[http://127.0.0.1:5173/](http://127.0.0.1:5173/) +- 创建新分支 `git checkout -b username/feature1`,分支名字建议为 `username/feat-xxx` / `username/fix-xxx` +- 本地编码 +- 遵循 Commit Message Format 规范进行提交,不符合提交规范的 PR 将不会被合并 +- 提交到远程仓库:git push origin branchName +- (可选)同步上游仓库 dev 分支最新代码:git pull upstream dev +- 打开 TinyVue 代码仓库的 [Pull requests](https://github.com/opentiny/tiny-vue/pulls) 链接,点击 New pull request 按钮提交 PR +- 项目 Committer 进行 Code Review,并提出意见 +- PR 作者根据意见调整代码,请注意一个分支发起了 PR 后,后续的 commit 会自动同步,无需重新提交 PR +- 项目管理员合并 PR + +贡献流程结束,感谢你的贡献! + +## 加入开源社区 + +如果你对我们的开源项目感兴趣,欢迎通过以下方式加入我们的开源社区。 + +- 添加官方小助手微信:opentiny,加入我们的技术交流群 +- 加入邮件列表:opentiny@googlegroups.com diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..0c4793709 --- /dev/null +++ b/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2022 - present TinyVue Authors. +Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 68abfe4e5..4bda22bdb 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,75 @@ -# tiny-vue +

+ + TinyVue Logo + +

+

Tiny Vue 是一个基于 Vue 的 UI 组件库,可以同时支持 Vue 2.0 和 Vue 3.0。

+ +特性: + +- 包含 69 个简洁、易用、功能强大的组件 +- 同时支持 Vue2 和 Vue3 +- 支持国际化 +- 支持主题定制 +- 组件内部支持配置式开发,特别适合低代码平台可视化组件配置 +- 采用模板、样式、逻辑分离的跨端跨框架架构,保障灵活性和可移植性 + +## 如何使用 + +### 1. 安装 + +执行以下命令,安装 Vue 3.0 版本的 Tiny Vue 组件库: + +```shell +npm i @opentiny/vue +``` + +执行以下命令,安装 Vue 2.0 版本的 Tiny Vue 组件库 : + +```shell +npm i @opentiny/vue@2 +``` + +### 2. 引入和使用 + +在`App.vue`文件中使用 Tiny Vue 组件。 + +```vue + + + +``` + +## 本地开发 + +```shell +git clone git@github.com:opentiny/tiny-vue.git +cd tiny-vue +npm i + +# 启动 Vue3 项目 +npm run dev:vue3 + +# 启动 Vue2 项目 +npm run dev:vue2 +``` + +打开浏览器访问:[http://127.0.0.1:5173/](http://127.0.0.1:5173/) + +## 参与贡献 + +如果你对我们的开源项目感兴趣,欢迎加入我们! + +参与贡献之前请先阅读[贡献指南](CONTRIBUTING.md)。 + +- 添加官方小助手微信 opentiny,加入技术交流群 +- 加入邮件列表 opentiny@googlegroups.com + +## 开源协议 + +[MIT](LICENSE) diff --git a/build.sh b/build.sh new file mode 100644 index 000000000..1a9a5d599 --- /dev/null +++ b/build.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +if [ ! $version ]; +then npm version 0.1.0-`date "+%Y%m%d%H%M%S"`; +else npm version ${version}; +fi + +npm run bootstrap +npm run build:vue3 +npm run release3 + +if [ $? -ne 0 ] +then + echo "[ERROR] build falid!" + exit 1 +fi +echo '[INFO] build completed' + diff --git a/build/.eslintrc b/build/.eslintrc new file mode 100644 index 000000000..3d48e6bf7 --- /dev/null +++ b/build/.eslintrc @@ -0,0 +1,6 @@ +{ + "rules": { + "no-empty": "off", + "no-console": "off" + } +} \ No newline at end of file diff --git a/build/build-entry-app.js b/build/build-entry-app.js new file mode 100644 index 000000000..480a72e1b --- /dev/null +++ b/build/build-entry-app.js @@ -0,0 +1,55 @@ +/** + * 生成全量运行时入口文件 + */ +const fs = require('fs-extra') +const endOfLine = require('os').EOL +const utils = require('./utils') +const runtimeUtils = require('./runtime-utils') + +const version = utils.getTinyVersion() +const outputDir = 'packages' +const IMPORT_TEMPLATE = 'import {{name}} from "@opentiny/vue-{{package}}"' +const MAIN_TEMPLATE = `{{include}} + +const version = '${version}' + +export { + version, + {{components}} +} +` + +const buildFullRuntime = (buildType) => { + const outputPath = utils.pathJoin('..', outputDir, buildType + '.js') + const includeTemplate = [] + const componentsTemplate = [] + const render = utils.renderTemplate() + let coreLibs = [] + + coreLibs = runtimeUtils.getFullRuntime(buildType === 'base' ? ['base', 'business'] : buildType) + + coreLibs.forEach((name) => { + includeTemplate.push( + render(IMPORT_TEMPLATE, { + name, + package: utils.kebabCase({ str: name }) + }) + ) + componentsTemplate.push(name) + }) + + const template = render(MAIN_TEMPLATE, { + include: includeTemplate.join(endOfLine), + components: componentsTemplate.join(',' + endOfLine) + }) + + const output = utils.prettierFormat({ + str: template + }) + + fs.writeFileSync(outputPath, output) + + utils.logGreen(`npm run build:entry done. [${outputDir}/${buildType}.js]`) +} + +;['core', 'base', 'chart'].forEach(buildFullRuntime) diff --git a/build/build-entry.js b/build/build-entry.js new file mode 100644 index 000000000..43e5f5248 --- /dev/null +++ b/build/build-entry.js @@ -0,0 +1,144 @@ +/** + * 生成入口文件,包括 pc.js / mobile.js / index.js + */ +const fs = require('fs-extra') +const endOfLine = require('os').EOL +const utils = require('./utils') +const moduleUtils = require('./module-utils') + +const version = utils.getTinyVersion() +const outputDir = 'packages' + +const fileNames = { + all: 'index.js', + pc: 'pc.js', + mobile: 'mobile.js' +} + +const getMainTemplate = (mode) => { + const template = `{{include}} + import { $prefix } from '@opentiny/vue-common' + const components = [{{components}}] + + export const install = (app, opts = {}) => { + const regex = new RegExp('^' + $prefix) + ${ + mode === 'all' + ? '' + : ` + if (typeof app.unmount === 'function') { + app.config.globalProperties.tiny_mode = { value: '${mode}' } + } else { + app.prototype.tiny_mode = { value: '${mode}' } + } + ` + } + components.filter(component=> component.name !== 'TinyPicker').forEach((component) => { + let name = component.name + let alias = opts.alias || opts.prefix + if (typeof component.install !== 'function') { return } + if (name && alias) { + app.component(name.replace(regex, alias), component) + } else { + component.install(app) + } + }) + } + const version = '${version}' + export { + version, + {{components}} + } + + export default { + version, + {{components}}, + install + } + ` + return template +} + +const forEachCompoents = ({ components, componentsTemplate, render, INSTALL_COMPONENT_TEMPLATE, includeTemplate, IMPORT_TEMPLATE }) => { + components.forEach((item) => { + let exportsComponents = '' + const childrenComponents = [] + + // 增加组件内部抛出子组件,针对父子组件不能拆分的情况 + if (Array.isArray(item.exports) && item.exports.length > 0) { + item.exports.indexOf(item.name) === -1 && item.exports.push(item.name) + } else { + item.exports = [item.name] + } + + item.exports.forEach((component) => { + if (component !== item.name) { + component = utils.capitalizeKebabCase(component) + + childrenComponents.push(component) + } + + componentsTemplate.push( + render(INSTALL_COMPONENT_TEMPLATE, { + name: component + }) + ) + }) + + if (childrenComponents.length) { + exportsComponents = `,{${childrenComponents.join(',')}}` + } + + includeTemplate.push( + render(IMPORT_TEMPLATE, { + name: item.name, + exports: exportsComponents, + package: item.importName + }) + ) + }) +} + +const createEntry = (mode) => { + const OUTPUT_PATH = utils.pathJoin('..', outputDir, fileNames[mode]) + const IMPORT_TEMPLATE = 'import {{name}} {{exports}} from "{{package}}"' + const INSTALL_COMPONENT_TEMPLATE = ' {{name}}' + + const MAIN_TEMPLATE = getMainTemplate(mode) + + const includeTemplate = [] + const componentsTemplate = [] + const render = utils.renderTemplate() + let components + + if (mode === 'pc') { + components = moduleUtils.getPcComponents() + } else if (mode === 'mobile') { + components = moduleUtils.getMobileComponents() + } else { + components = moduleUtils.getComponents() + } + + forEachCompoents({ + components, + componentsTemplate, + render, + INSTALL_COMPONENT_TEMPLATE, + includeTemplate, + IMPORT_TEMPLATE + }) + + const template = render(MAIN_TEMPLATE, { + include: includeTemplate.join(endOfLine), + components: componentsTemplate.join(`,${endOfLine}`) + }) + + const output = utils.prettierFormat({ + str: template + }) + + fs.writeFileSync(OUTPUT_PATH, output) +} +;['all', 'pc', 'mobile'].forEach(createEntry) + +utils.logGreen(`npm run build:entry done. [${outputDir}/index.js,${outputDir}/pc.js,${outputDir}/mobile.js]`) diff --git a/build/build-icon.js b/build/build-icon.js new file mode 100644 index 000000000..04c9546f7 --- /dev/null +++ b/build/build-icon.js @@ -0,0 +1,92 @@ +const vue = require('rollup-plugin-vue') +const { babel } = require('@rollup/plugin-babel') +const commonjs = require('@rollup/plugin-commonjs') +const { nodeResolve } = require('@rollup/plugin-node-resolve') +const { pathJoin, logGreen, logRed } = require('./utils') +const rollup = require('rollup') +const svg = require('rollup-plugin-vue-inline-svg') +const fs = require('fs-extra') +const path = require('path') + +const inputOptions = { + plugins: [ + vue({ + css: true + }), + svg({ + svgoConfig: { + plugins: [{ removeDoctype: true }, { removeComments: true }, { removeViewBox: false }], + removeViewBox: false + } + }), + nodeResolve(), + babel({ + exclude: /node_modules/, + configFile: false, // 必须为 false 不然会取根文件的 babel.config.js 配置,产生一堆 runtime 代码 + babelrc: false, + babelHelpers: 'bundled', + plugins: ['@babel/plugin-proposal-export-default-from', '@babel/plugin-proposal-export-namespace-from'], + presets: ['@babel/preset-env'], + extensions: ['.js', '.vue'] + }), + // 如果打包文件中包含 jsx 语法, commonjs 必须放置在 babel 配置下面,否则会报错 PLUGIN_ERROR + commonjs() + ], + external: (deps) => /^@opentiny[\\/]-vue-common/.test(deps) +} + +const outputOptions = { + format: 'es', + exports: 'named' +} + +const build = (components) => { + components.forEach((component) => { + const inputs = { ...inputOptions } + + inputs.input = pathJoin('..', 'packages', 'icon', component.path) + + if (component.path === 'index.js') { + inputs.external = (deps) => !deps.includes('index.js') + } else { + inputs.external = (deps) => /^@opentiny[\\/]vue-common/.test(deps) + } + + rollup + .rollup(inputs) + .then((bundle) => { + const outs = { ...outputOptions } + outs.file = pathJoin('..', 'packages', 'icon', component.libPath) + bundle.write(outs) + logGreen(`${component.path} compile icon done`) + }) + .catch((e) => { + logRed(e) + }) + }) +} + +function createComponentMap(dir) { + const components = [] + fs.readdirSync(dir).forEach((file) => { + if (['dist', 'runtime'].includes(file)) { + return + } + + if (fs.statSync(path.join(dir, file)).isDirectory()) { + components.push({ + path: `${file}/index.js`, + libPath: `dist/lib/${file}.js` + }) + } else { + file.endsWith('.js') && + components.push({ + path: `${file}`, + libPath: `dist/lib/${file}` + }) + } + }) + return components +} + +build(createComponentMap(pathJoin('..', 'packages', 'icon'))) diff --git a/build/build-ui.js b/build/build-ui.js new file mode 100644 index 000000000..4a4f2444b --- /dev/null +++ b/build/build-ui.js @@ -0,0 +1,115 @@ +const rollup = require('rollup') +const utils = require('./utils') +const replace = require('@rollup/plugin-replace') +const moduleUtils = require('./module-utils') +const fs = require('fs-extra') +const isSingle = process.env.BUILD_TARGET === 'single' +const config = require('./config') + +const outputOptions = { + format: 'es', + globals: config.globals, + exports: 'named' +} + +const inputOptions = { + plugins: config.plugins, + external: config.external +} + +const replaceConstant = { + 'process.env.BUILD_TARGET': JSON.stringify(process.env.BUILD_TARGET), + 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV) +} + +if (process.env.tiny_mode === 'pc') { + outputOptions.format = 'umd' + replaceConstant['process.env.TINY_MODE'] = JSON.stringify(process.env.tiny_mode) +} + +/** + * 编译单个组件 + * @param {Object} component 组件 module 信息 (modules.json) + * @param {Function} 回调函数 + */ +const build = ({ component, callback }) => { + inputOptions.input = utils.pathJoin('..', component.path) + + inputOptions.plugins.push(replace(replaceConstant)) + rollup + .rollup(inputOptions) + .then((bundle) => { + outputOptions.file = utils.pathJoin('..', component.libPath) + if (outputOptions.format === 'umd') { + outputOptions.name = component.global + } + bundle.write(outputOptions).finally(() => { + const filePath = utils.pathJoin('..', component.libPath) + if (filePath.endsWith('index.js')) { + const indexStr = fs.readFileSync(filePath).toString('UTF-8') + const resStr = indexStr.replace('./src/pc', './pc').replace('./src/mobile', './mobile') + fs.writeFileSync(filePath, resStr) + } + callback() + }) + }) + .catch((e) => { + utils.logRed(e) + callback() + }) +} + +let components = [] + +/** + * 递归执行 Rollup 编译 + * @param {Number} count 起始索引 + */ +const buildAll = (count = 0) => { + let component = components[count++] + if (component) { + if (!isSingle) { + component.libPath = 'dist/' + component.libName.replace('@opentiny/vue/', '') + component.libPath += (component.type === 'component' ? '/index' : '') + '.js' + } + build({ + component, + callback() { + buildAll(count) + } + }) + } else { + utils.logGreen(`npm run build:ui${isSingle ? '-single' : ''} done.`) + } +} + +if (isSingle) { + const inputName = utils.getInputCmd() + if (inputName.length > 0) { + inputName.forEach((input) => { + const activeComponentName = utils.kebabCase({ str: input }) + + if (activeComponentName) { + components.push( + ...moduleUtils.getByName({ + name: activeComponentName, + isSort: false + }) + ) + } + }) + } else { + const activeComponentName = utils.getComponentName() + components = moduleUtils.getByName({ + name: activeComponentName, + isSort: false + }) + } +} else { + components = moduleUtils.getAllModules(false) +} +if (components.length > 0) { + buildAll() +} else { + utils.logYellow('please enter the component name after command.') +} diff --git a/build/build-version.js b/build/build-version.js new file mode 100644 index 000000000..867e89579 --- /dev/null +++ b/build/build-version.js @@ -0,0 +1,123 @@ +/** + * 批量更新组件版本号,一般用于大版本发布 + * npm run build:version ${targetVersion} ${tag} ${single-components}|null[build all pkg] + * example: + * 发布 @opentiny/vue-alert@next 和 @opentiny/vue-button@next 命令: + * npm run build:version '0.1.0' 'next' 'alert button' + * 发布全量包@next: + * npm run build:version '0.1.0' 'next' + */ +const fs = require('fs-extra') +const path = require('path') +const ROOT_PATH = path.join(__dirname, '..') +const TYPE = process.env.TYPE +const isFullVersionUpdate = true +const TAG = process.argv[3] === 'false' ? '' : process.argv[3] +const packages = path.join(ROOT_PATH, 'packages') +const pkgJsonFileName = 'package.json' +const { logGreen } = require('./utils') +const tinyVueReg = /@opentiny\// + +const targetVersion = process.argv[2] || JSON.parse(fs.readFileSync(path.join(ROOT_PATH, pkgJsonFileName)).toString()).version + +const isUpdateDependenciesVersion = true // process.argv[3] === 'true' +const single = process.argv[4] +const targetVersionArr = targetVersion.split('.') +const oldVersion = `${targetVersionArr[0]}.${targetVersionArr[1] - 1}.0` +const targetVersionDependencies = `${targetVersionArr[0]}.${targetVersionArr[1]}.0` + +const isTinyVuePkg = (str) => tinyVueReg.test(str || '') + +const replaceDependenciesForTag = (obj) => { + for (let key in obj) { + if (isTinyVuePkg(key)) { + obj[key] = TAG + } + } + + return obj +} + +const replaceDependencies = (obj) => { + for (let key in obj) { + if (isTinyVuePkg(key) && /~/.test(obj[key])) { + obj[key] = obj[key].replace(isUpdateDependenciesVersion ? /[0-9]+\.[0-9]+\.[0-9]+/ : oldVersion, targetVersionDependencies) + } + } + + return obj +} + +const buidPackages = (dirs) => { + let uiArr + + if (single) { + uiArr = single.trim().split(' ') + } + + fs.readdirSync(dirs).forEach((name) => { + if (uiArr && !uiArr.includes(name)) { + return + } + + const component = path.join(dirs, name) + + if (name === 'src' || !fs.statSync(component).isDirectory()) { + return + } + + let pkgJsonFile, pkgJson + + try { + pkgJsonFile = path.join(component, pkgJsonFileName) + pkgJson = JSON.parse(fs.readFileSync(pkgJsonFile).toString()) + } catch (error) { + return + } + + if (isTinyVuePkg(pkgJson.name)) { + const arr = ['dependencies', 'devDependencies'] + + pkgJson.version = single || isFullVersionUpdate ? targetVersion : targetVersionDependencies + + arr.forEach((key) => { + if (pkgJson[key]) { + pkgJson[key] = TAG ? replaceDependenciesForTag(pkgJson[key]) : replaceDependencies(pkgJson[key]) + } + }) + + fs.writeFileSync(pkgJsonFile, JSON.stringify(pkgJson, null, 2)) + } + + if (name === 'chart') { + buidPackages(component) + } + }) +} + +if (!targetVersion) { + throw new Error('targetVersion is null, cmd example:\n npm run build:version 3.10.0 true "alert grid"') +} + +const buildCommon = () => { + const pkgJsonFile = path.join(ROOT_PATH, pkgJsonFileName) + const pkgJson = JSON.parse(fs.readFileSync(pkgJsonFile).toString()) + + pkgJson.version = targetVersion + pkgJson.uiVersion = isFullVersionUpdate ? targetVersion : targetVersionDependencies + pkgJson.srcVersion = isFullVersionUpdate ? targetVersion : targetVersionDependencies + + fs.writeFileSync(pkgJsonFile, JSON.stringify(pkgJson, null, 2)) + logGreen('update src version done') +} + +const build = () => { + buildCommon() + + if (TYPE === 'ui') { + buidPackages(packages) + logGreen('update all component version done') + } +} + +build() diff --git a/build/config.js b/build/config.js new file mode 100644 index 000000000..f4e824c32 --- /dev/null +++ b/build/config.js @@ -0,0 +1,82 @@ +const fs = require('fs-extra') +const vue = require('rollup-plugin-vue') +const { babel } = require('@rollup/plugin-babel') +const alias = require('@rollup/plugin-alias') +const commonjs = require('@rollup/plugin-commonjs') +const postcss = require('rollup-plugin-postcss') +const { nodeResolve } = require('@rollup/plugin-node-resolve') +const { pathJoin } = require('./utils') +const { getAllModules } = require('./module-utils') + +const external = ['vue', './pc', './mobile', '@vue/composition-api', '@opentiny/vue-common', '@opentiny/vue-locale', '@opentiny/vue-renderless'] + +const globals = { + vue: 'Vue', + '@vue/composition-api': 'vueCompositionApi', + '@opentiny/vue-common': 'TinyVueCommon', + '@opentiny/vue-locale': 'TinyVueLocale', + '@opentiny/vue-renderless': 'TinyRenderLess' +} + +const aliasList = {} +const components = getAllModules(false) + +components.forEach((item) => { + aliasList[item.libName] = pathJoin('../' + item.path) + + if (item.private) { + return + } + + const isComponent = item.type === 'component' + + external.push(item.importName) // @opentiny/vue-todo + external.push(item.libName) // @opentiny/vue/todo + globals[item.libName] = item.global // TinyTodo + + if (isComponent) { + if (fs.existsSync(pathJoin('../../vue-theme3'))) { + aliasList[`@opentiny/vue-theme/${item.LowerName}/index.css`] = pathJoin(`../../vue-theme3/style/${item.LowerName}/index.css`) + aliasList[`@opentiny/vue-theme/${item.LowerName}/index.js`] = pathJoin(`../../vue-theme3/style/${item.LowerName}/index.js`) + } + external.push(item.libName + '/index.js') + } else { + external.push(item.libName + '.js') + } +}) + +exports.aliasList = aliasList + +exports.external = (deps) => external.includes(deps) || /^@opentiny[\\/](vue-renderless|vue-theme|vue-common|vue-icon)|cropperjs/.test(deps) + +exports.globals = globals + +exports.plugins = [ + alias({ + resolve: ['.js', '.vue', '.css'], + '@opentiny/vue-locale': pathJoin('../packages/locale/index'), + '@opentiny/vue-common': pathJoin('../packages/common/index'), + ...aliasList + }), + postcss({ + extract: false + }), + vue({ + css: true + }), + nodeResolve({ + extensions: ['.js', '.jsx', '.vue', '.css'] + }), + babel({ + exclude: /node_modules/, + babelrc: false, + configFile: false, // 必须为 false 不然会取根文件的 babel.config.js 配置,产生一堆 runtime 代码 + babelHelpers: 'bundled', + comments: false, + extensions: ['.js', '.vue', '.jsx'], + presets: ['@babel/preset-env', '@vue/babel-preset-jsx'], + plugins: ['@babel/plugin-syntax-dynamic-import'] + }), + // 如果打包文件中包含 jsx 语法, commonjs 必须放置在 babel 配置下面,否则会报错 PLUGIN_ERROR + commonjs() +] diff --git a/build/create-mapping.js b/build/create-mapping.js new file mode 100644 index 000000000..c5a4c9780 --- /dev/null +++ b/build/create-mapping.js @@ -0,0 +1,68 @@ +const { sep } = require('path') +const utils = require('./utils') +const { addModule, writeModuleMap, quickSort, readModuleMap } = require('./module-utils') + +const isDeepFn = (file, dirs, subPath) => + // 如果底层文件夹内没有找到 vue 文件,找到 src//index.js 文件也被认可为组件 + (file.endsWith('.vue') && (dirs.includes('index.js') || dirs.includes('index.vue'))) || ~subPath.indexOf(['src', 'index.js'].join(sep)) + +const getTemplateName = (currentPaths) => currentPaths.slice(2).map(utils.capitalize).join('/').split('.')[0].replace('/', '') + +/** + * 扫描指定目录下面的组件目录,查找非 index.vue 文件(模板)生成 modules.json 中的对象 + */ +const makeModules = () => { + const templates = {} + const oldModules = readModuleMap() + const packagesStr = 'packages' + utils.walkFileTree({ + isDeep: true, + dirPath: utils.pathJoin('..', packagesStr), + fileFilter({ file }) { + return !/node_modules|helper|common|assets/.test(file) + }, + callback({ file, subPath, dirs }) { + const isDeep = isDeepFn(file, dirs, subPath) + // NEXT: 针对 option 的模板做特殊处理 + if (isDeep && ['template.vue'].indexOf(file) === -1) { + const isEntry = file.startsWith('index') + const subPaths = subPath.split(sep) + const currentPaths = subPaths.slice(subPaths.indexOf(packagesStr) + 1) + const templateName = getTemplateName(currentPaths) + const templatePath = currentPaths[currentPaths.length - 1].split('.')[0] + const componentName = [] + currentPaths.every((dirName) => { + if (dirName === 'src') { + return false + } + componentName.push(dirName) + return true + }) + const globalName = componentName[componentName.length - 1].split('-').map(utils.capitalize).join('') + const moduleName = globalName + (isEntry ? '' : templateName) + const oldModuleItem = oldModules[moduleName] || {} + const oldKeys = Object.keys(oldModuleItem) + const newModuleItem = addModule({ + componentName: componentName.join('/'), + templateName: templatePath + }) + oldKeys.forEach((key) => { + if (typeof newModuleItem[key] === 'undefined' || key === 'onlyMode') { + newModuleItem[key] = oldModuleItem[key] + } + }) + newModuleItem.exclude = oldModuleItem.exclude || false + templates[moduleName] = newModuleItem + } + } + }) + writeModuleMap(quickSort({ sortData: templates, returnType: 'object' })) +} + +try { + makeModules() + + utils.logGreen('npm run create:mapping done.') +} catch (e) { + utils.logRed('npm run create:mapping failed.', e) +} diff --git a/build/create-ui.js b/build/create-ui.js new file mode 100644 index 000000000..770d300e3 --- /dev/null +++ b/build/create-ui.js @@ -0,0 +1,229 @@ +/** + * yarn create:ui 新建组件,支持格式如下: + * yarn create:ui img-preview + * yarn create:ui img-preview -single 输出纯净模板(没有 pc 等模板/单层组件) + * yarn create:ui img-preview -mobile 创建纯移动组件 + */ +const path = require('path') +const fs = require('fs-extra') +const semver = require('semver') +const utils = require('./utils') +const { createModuleMapping } = require('./module-utils') + +const args = utils.getInputCmd() + +const getTemplate = (upperComponentName) => ` + +` + +const getDcoTemplate = () => `
+

+ +

+ +## [[UNAME]] + + + +
+ +### [[UNAME]] + +` + +const getTemp = (componentName) => `const router = [ + { + path: '${componentName}', + meta: { + title: 'test', + lang: 'zh-CN', + sign: 'component' + }, + component: () => + import( + /* webpackChunkName: 'v3-${componentName}' */ './docs/mobile/${componentName}/base.md' + ) + },` + +const doWorkTreeFn = ({ templateDir, componentPath, componetDir, componentName, isSingle, render, version, isMobile }) => { + utils.walkFileTree({ + isDeep: true, + dirPath: templateDir, + callback({ file, subPath }) { + let fileName = file + const isSingleTemplate = file === 'single.vue' + const isSrcDir = path.basename(path.dirname(subPath)) === 'src' + + componentPath = path.join(componetDir, componentName) + + // 单层组件处理逻辑 + if (isSrcDir) { + componentPath = path.join(componentPath, 'src') + + if (isSingle) { + if (!isSingleTemplate) { + return + } + + fileName = 'index.vue' + } else { + if (isSingleTemplate) { + return + } + } + } + + if (!fs.existsSync(componentPath)) { + fs.mkdirSync(componentPath) + } + + componentPath = path.join(componentPath, fileName) + + let fileContent = fs.readFileSync(subPath, { encoding: 'utf8' }) + const upperComponentName = utils.capitalizeKebabCase(componentName) + + // 编译模板 + fileContent = render(fileContent, { + NAME: componentName, + UNAME: upperComponentName, + MINOR: semver.minor(version), + SUFFIX: isSingle ? '.vue' : '', + THEME: isMobile ? 'theme-mobile' : 'theme' + }) + + fs.writeFileSync(componentPath, fileContent) + } + }) +} + +const createRouter = (json, componentName, navPath, router) => { + const Navs = JSON.parse(json) + Navs.component.push({ + name: 'New Component', + children: [ + { + path: `/${componentName}`, + name: `${componentName}` + } + ] + }) + + fs.writeFileSync(path.join(navPath, 'nav.config.comp.mobile.json'), JSON.stringify(Navs, null, 2), { encoding: 'utf-8' }) + + fs.writeFileSync(path.join(navPath, 'route.config.comp.mobile.js'), router, { + encoding: 'utf8' + }) +} + +if (args.length > 0) { + const commands = [] + const components = [] + const render = utils.renderTemplate({ leftChar: '[[', rightChar: ']]' }) + const templateDir = utils.pathJoin('..', 'template', 'component') + const componetDir = utils.pathJoin('..', 'packages') + const demoDir = utils.pathJoin('..', 'example', 'src', 'demo', 'mobile') + const docDir = utils.pathJoin('..', 'example', 'src', 'docs', 'mobile') + const { version } = fs.readJSONSync(utils.pathJoin('..', 'package.json')) + const navPath = utils.pathJoin('..', 'example', 'src') + + args.forEach((item) => { + if (item.indexOf('-') === 0) { + commands.push(item.replace(/-/g, '').toLowerCase()) + } else { + components.push(item) + } + }) + + const isSingle = commands.includes('single') + const isMobile = commands.includes('mobile') + + const createDemo = (filePath, componentName, fileName, template) => { + if (!fs.existsSync(filePath)) { + fs.mkdirSync(filePath) + } + + const upperComponentName = utils.capitalizeKebabCase(componentName) + + // 生成测试demo + filePath = path.join(filePath, fileName) + + const outString = render(template, { + NAME: componentName, + UNAME: upperComponentName + }) + + const outputDemo = require('prettier').format(outString, { + printWidth: 160, + jsxBracketSameLine: false, + tabWidth: 2, + useTabs: false, + singleQuote: true, + semi: false, + trailingComma: 'none', + bracketSpacing: true, + parser: 'vue' + }) + + fs.writeFileSync(filePath, outputDemo) + } + + components.forEach((componentName) => { + let componentPath = path.join(componetDir, componentName) + let demoPath = path.join(demoDir, componentName) + let docPath = path.join(docDir, componentName) + const upperComponentName = utils.capitalizeKebabCase(componentName) + + if (fs.existsSync(componentPath)) { + utils.logYellow(`The component name : ${componentName} is exist , please enter other name.`) + return + } + + const json = fs.readFileSync(path.join(navPath, 'nav.config.comp.mobile.json'), { encoding: 'utf8' }) + + let router = fs.readFileSync(path.join(navPath, 'route.config.comp.mobile.js'), { encoding: 'utf8' }) + + const templ = getTemp(componentName) + router = router.replace('const router = [', templ) + + createRouter(json, componentName, navPath, router) + + doWorkTreeFn({ + templateDir, + componentPath, + componetDir, + componentName, + isSingle, + render, + version, + isMobile + }) + + // 生成测试demo + const template = getTemplate(upperComponentName) + createDemo(demoPath, componentName, 'base.vue', template) + + // 生成doc + const dcoTemplate = getDcoTemplate() + + createDemo(docPath, componentName, 'base.md', dcoTemplate) + + componentName && createModuleMapping(componentName, componentPath, isMobile) + }) + + utils.logYellow('npm run create:ui done.') +} else { + utils.logYellow('please enter the component name after command.') +} diff --git a/build/module-utils.js b/build/module-utils.js new file mode 100644 index 000000000..166ff3454 --- /dev/null +++ b/build/module-utils.js @@ -0,0 +1,403 @@ +/** + * 专门用于 modules.json 配置的通用方法 + * modules.json 作为单组件的清单列表,记录组件类型、路径、是否排除引用、仅支持某种[pc/mobile]模式等 + */ +const { writeFileSync } = require('fs') +const moduleMap = require('../modules.json') +const { kebabCase, pathJoin, capitalize, prettierFormat, logGreen, capitalizeKebabCase } = require('./utils') + +const realNameMap = { + realValue: '__real_value' +} + +/** + * 默认的组件模板 + */ +const defaultMode = ['index', 'pc'] + +/** + * 组件组包名前缀:@opentiny/vue-tag | @opentiny/vue/tag + */ +const importName = '@opentiny/vue' + +const exampleBase = 'basic-usage.vue' + +/** + * 查询没有模板的组件(单层组件) + */ +const getNoTemplateComponents = () => { + const components = [] + const templates = ['Pc', 'Mobile'] + + Object.keys(moduleMap).forEach((key) => { + if (!key.endsWith(templates[0]) && !key.endsWith(templates[1]) && !key.startsWith('Chart')) { + if (!moduleMap[key + templates[0]] && !moduleMap[key + templates[1]]) { + components.push(moduleMap[key]) + } + } + }) + + return components +} + +/** + * 判断是否为 PC 组件 + */ +const isPcComponent = (name) => { + const componentName = capitalizeKebabCase(name) + const moduleInfo = moduleMap[componentName] + + return moduleInfo && moduleInfo.onlyMode !== 'mobile' +} + +/** + * 判断是否为 Mobile 组件 + */ +const isMobileComponent = (name) => { + const componentName = capitalizeKebabCase(name) + const moduleInfo = moduleMap[componentName] + + return moduleInfo && moduleInfo.onlyMode === 'mobile' +} + +const setIndex = (obj, key, maxNumberLength, indexArr) => { + // 一个字母用3位数代替,没有达到3位用0填充到前面,为了减少差值,在前面设置1 + const priority = + '1' + + obj[key] + .split('') + .map((chart) => String(chart.charCodeAt()).padStart(3, '0')) + .join('') + .padEnd(maxNumberLength, '0') + .substr(0, maxNumberLength) + + // 分段比较 (javascript 超过15位比较失效) + obj.priority1 = Number(priority.substr(0, 15)) + obj.priority2 = Number(priority.substr(15, 30)) + obj.priority3 = Number(priority.substr(30, 45)) + obj.priority4 = Number(priority.substr(45, maxNumberLength)) + + obj.priority = priority + + indexArr.push(obj) +} + +const arrayToObject = (arr, key) => { + const sortObj = {} + + for (let i = 0, len = arr.length; i < len; i++) { + if (arr[i][realNameMap.realValue]) { + sortObj[arr[i][key]] = arr[i][realNameMap.realValue] + } else { + delete arr[i].priority + delete arr[i].priority1 + delete arr[i].priority2 + delete arr[i].priority3 + delete arr[i].priority4 + + sortObj[arr[i][key]] = arr[i] + + delete sortObj[arr[i][key]][key] + } + } + + return sortObj +} + +const sortArray = (arr) => { + if (Array.isArray(arr) && arr.length > 1) { + const middleIndex = Math.floor(arr.length / 2) + const middleValue = arr.splice(middleIndex, 1)[0] + const leftArr = [] + const rightArr = [] + + for (let i = 0, len = arr.length; i < len; i++) { + const left = arr[i].priority1 - middleValue.priority1 + const right = arr[i].priority2 - middleValue.priority2 + const right2 = arr[i].priority3 - middleValue.priority3 + const right3 = arr[i].priority4 - middleValue.priority4 + + let isLeft = false + + if (left === 0 && (right < 0 || (right === 0 && right2 < 0) || (right === 0 && right2 === 0 && right3 < 0))) { + isLeft = true + } + + if (left < 0 || isLeft) { + leftArr.push(arr[i]) + } else { + rightArr.push(arr[i]) + } + } + + return sortArray(leftArr).concat([middleValue], sortArray(rightArr)) + } else { + return arr + } +} + +/** + * 将模块数组按字母的 ASCII 值进行排序(目前只支持16位字母排序) + * @private + * @param {Array|Object} sortData 模块数组 + * @param {String} key 排序字段 + * @param {String} returnType 返回类型 Array|Object + * @returns 排序后的数组或对象 + */ +const quickSort = ({ sortData, key = 'name', returnType = 'array' }) => { + const maxNumberLength = 59 + let indexArr = [] + if (sortData instanceof Array) { + sortData.forEach((item) => { + setIndex(item, key, maxNumberLength, indexArr) + }) + } else if (typeof sortData === 'object') { + for (const sortKey in sortData) { + if (Object.prototype.hasOwnProperty.call(sortData, sortKey)) { + const dataItem = sortData[sortKey] + let sortItem = {} + + if (typeof dataItem === 'object') { + sortItem = { + ...sortData[sortKey] + } + } else { + sortItem[realNameMap.realValue] = dataItem + } + sortItem[key] = sortData[key] || sortKey + setIndex(sortItem, key, maxNumberLength, indexArr) + } + } + } else { + return sortData + } + + return returnType === 'array' ? sortArray(indexArr) : arrayToObject(sortArray(indexArr), key) +} + +/** + * 根据指定条件搜索模块列表,并排序与生成必要字段 + * @private + * @param {Function} filterIntercept 搜索条件 + * @param {Boolean} isSort 是否需要排序 + */ +const getSortModules = ({ filterIntercept, isSort = true }) => { + let modules = [] + let componentCount = 0 + if (typeof filterIntercept === 'function') { + Object.keys(moduleMap).forEach((key) => { + const component = moduleMap[key] + component.name = key + if (filterIntercept(component) === true && component.exclude !== true) { + const dirs = component.path.split('/') + const componentName = dirs.slice(1, dirs.indexOf('src')) + component.UpperName = componentName.pop().split('-').map(capitalize).join('') + component.LowerName = kebabCase({ str: component.UpperName }) + // 工程的父文件夹 + component.parentDir = componentName + // libPath: 'packages/todo/dist/pc.js' 组件输出路径 + component.libPath = component.path.replace('/index.js', '/src/index.js').replace('/src/', '/dist/lib/').replace('.vue', '.js') + // libName: '@opentiny/vue/todo/pc' + component.libName = component.libPath + .replace('packages/', '') + .replace('/index', '') + .replace('.js', '') + .replace('/dist/', '/') + .replace(/\/lib$/, '') + // 处理子目录 + if (componentName.length) { + component.libName = component.libName.replace(componentName.join('/'), '').replace(/^\//, '') + } + // importName: '@opentiny/vue-tag/pc' + component.importName = importName + '-' + component.libName + // libName: '@opentiny/vue/todo/pc' + component.libName = importName + '/' + component.libName + // tmpName: 'pc' + component.tmpName = component.libPath.replace('.js', '').split('/').slice(-1)[0] + // global: 'TinyTodoPc' + component.global = 'Tiny' + key + modules.push(component) + } + component.type === 'component' && componentCount++ + }) + logGreen(`[Contain Components]: Total(${componentCount}) `) + } else { + modules = moduleMap + } + return isSort ? quickSort({ sortData: modules }) : modules +} + +/** + * 获取所有模块,并排序、格式化 + * @param {Boolean} isSort 是否需要排序 + * @returns 模块对象 + */ +const getAllModules = (isSort) => getSortModules({ filterIntercept: () => true, isSort }) + +/** + * 获取所有组件,并排序、格式化 + * @param {Boolean} isSort 是否需要排序 + * @returns 组件对象 + */ +const getComponents = (isSort) => + getSortModules({ + filterIntercept: (item) => !['template'].includes(item.type), + isSort + }) + +/** + * @param {String} key 根据模块对象的 Key 获取对应的值 + * @returns 模块对象 + */ +const getModuleInfo = (key) => moduleMap[key] || {} + +/** + * 将输入的 Map 写入到 modules.json 文件中,并格式化 + * @param {String|Object} moduleMap 模块 Json 对象集合或 Json 字符串 + */ +const writeModuleMap = (moduleMap) => { + writeFileSync( + pathJoin('..', 'modules.json'), + prettierFormat({ + str: typeof componentMap === 'string' ? moduleMap : JSON.stringify(moduleMap), + options: { + parser: 'json', + printWidth: 10 + } + }) + ) +} + +/** + * 读取 modules.json 中的模块信息 + * @returns 模块对象 + */ +const readModuleMap = () => moduleMap || {} + +/** + * 获取模块项的模块 + * @param {String} componentName 组件名称(大写,例如:ImgPreview) + * @param {String} templateName 模板名称/路径 + * @param {Oject} newObj 新增对象 + * @returns 模块对象 + */ +const addModule = ({ componentName, templateName, newObj = {} }) => { + const isEntry = templateName.endsWith('index') + + return { + path: `packages/${componentName}/` + (isEntry ? `${templateName}.js` : `src/${templateName}.vue`), + type: isEntry ? 'component' : 'template', + exclude: false, + ...newObj + } +} + +/** + * 根据指定条件搜索原始模块列表 + * @private + * @param {Function} filterIntercept 搜索条件 + */ +const getModules = (filterIntercept) => { + let modules = {} + + if (typeof filterIntercept === 'function') { + for (const key in moduleMap) { + if (Object.prototype.hasOwnProperty.call(moduleMap, key)) { + const component = moduleMap[key] + + if (filterIntercept(component) === true && component.exclude !== true) { + modules[key] = component + } + } + } + } else { + modules = moduleMap + } + + return modules +} + +/** + * 根据组件名称查找模块列表 + * @private + * @param {String} name 组件名称 + * @param {Boolean} inversion 是否取反 + * @param {Boolean} isOriginal 是否取原始数据 + * @param {Boolean} isSort 是否需要排序 + */ +const getByName = ({ name, inversion = false, isOriginal = false, isSort = true }) => { + const callback = (item) => (inversion ? item.path.indexOf(`/${name}/`) === -1 : item.path.indexOf(`/${name}/`) > -1) + + return isOriginal ? getModules(callback) : getSortModules({ filterIntercept: callback, isSort }) +} + +const getMobileComponents = () => { + const modules = getAllModules() + const componentNames = modules.filter((item) => item.tmpName === 'mobile').map((item) => item.UpperName) + + const components = modules.filter( + (item) => item.onlyMode === 'mobile' || item.onlyMode === 'all' || (item.type === 'component' && componentNames.includes(item.UpperName)) + ) + + return components +} + +const getPcComponents = () => { + const modules = getAllModules() + + const components = modules.filter((item) => item.type === 'component' && item.onlyMode !== 'mobile') + + return components +} + +const getOnlyMobileComponents = () => getAllModules().filter((item) => item.onlyMode === 'mobile') + +/** + * 动态创建 modules.json ,适配新建组件 + * @param {String} componentName 组件名称 (驼峰大写:img-preview) + * @param {Boolean} isMobile 是否为移动组件 + */ +const createModuleMapping = (componentName, templateName, isMobile = false) => { + const upperName = capitalizeKebabCase(componentName) + + // 生成 modules.json 文件 + moduleMap[upperName] = addModule({ + isMobile, + templateName, + componentName + }) + + const moduleJson = quickSort({ sortData: moduleMap, returnType: 'object' }) + + writeFileSync( + pathJoin('..', 'modules.json'), + prettierFormat({ + str: JSON.stringify(moduleJson), + options: { + parser: 'json', + printWidth: 10 + } + }) + ) +} + +module.exports = { + quickSort, + getByName, + addModule, + importName, + exampleBase, + defaultMode, + createModuleMapping, + isPcComponent, + getAllModules, + getComponents, + getModuleInfo, + readModuleMap, + writeModuleMap, + getPcComponents, + isMobileComponent, + getMobileComponents, + getOnlyMobileComponents, + getNoTemplateComponents +} diff --git a/build/release-ui.js b/build/release-ui.js new file mode 100644 index 000000000..8c3219e4c --- /dev/null +++ b/build/release-ui.js @@ -0,0 +1,152 @@ +/** + * 用于发布单组件包 + */ +const fs = require('fs-extra') +const path = require('path') +const { execSync } = require('child_process') +const utils = require('./utils') +const { logGreen } = require('./utils') + +const sourcePkg = 'packages' +const packages = 'dist' +const tgzs = 'tgzs' +const packageName = 'package.json' +const NPM_TAG = process.env.NPM_TAG || '~0.1.0' +const VERSION_TAG = process.env.VERSION_TAG || '0.1.0' +const NPM_WAREHOUSE = process.env.NPM_WAREHOUSE +const targetVersion = utils.getTinyVersion('themeVersion') +const targetVersionArr = targetVersion.split('.') +const themeVersionDependencies = `~${targetVersionArr[0]}.${targetVersionArr[1]}.0` + +const packPackages = (p, packagePath) => { + execSync('npm pack -q', { cwd: path.join(packages, p) }) + fs.readdirSync(path.join(packages, p)).forEach((item) => { + if (item.endsWith('.tgz')) { + const tgzPath = path.join(packages, p, item) + fs.moveSync(tgzPath, path.join(tgzs, item), { overwrite: true }) + fs.unlinkSync(packagePath) + } + }) +} + +// 处理每个组件包的package.json文件 +const dealPackage = (p, packageJSON) => { + const packageDeps = packageJSON.dependencies || [] + Object.keys(packageDeps).forEach((key) => { + if (key.includes('@opentiny/vue')) { + packageDeps[key] = NPM_TAG + } + }) + let dependencies = { + '@opentiny/vue-renderless': themeVersionDependencies, + '@opentiny/vue-common': NPM_TAG, + '@opentiny/vue-icon': NPM_TAG, + '@opentiny/vue-theme': themeVersionDependencies, + '@opentiny/vue-theme-mobile': themeVersionDependencies + } + if (p === 'icon') { + packageJSON.dependencies = Object.assign(packageJSON.dependencies || {}, { + '@opentiny/vue-common': NPM_TAG, + '@opentiny/vue-theme': themeVersionDependencies + }) + } else if (p === 'locale') { + dependencies = { + '@opentiny/vue-renderless': themeVersionDependencies + } + } else if (p === 'common') { + dependencies = { + '@opentiny/vue-renderless': themeVersionDependencies, + '@opentiny/vue-theme': themeVersionDependencies + } + if (VERSION_TAG.startsWith('2')) { + dependencies['@vue/composition-api'] = '1.2.2' + } + } + packageJSON.dependencies = Object.assign(packageJSON.dependencies || {}, dependencies) + packageJSON.sideEffects = false + packageJSON.version = VERSION_TAG +} + +const release = (p) => { + const packagePath = path.join(packages, p, packageName) + const packageJSON = fs.readJSONSync(packagePath) + const componentEntry = path.join(packagePath, '../lib', 'index.js') + dealPackage(p, packageJSON) + fs.writeFileSync(packagePath, JSON.stringify(packageJSON, null, 2)) + if (fs.existsSync(componentEntry)) { + let componentEntryContent = fs.readFileSync(componentEntry).toString('UTF-8') + componentEntryContent = componentEntryContent.replace('process.env.COMPONENT_VERSION', `'${VERSION_TAG}'`) + fs.writeFileSync(componentEntry, componentEntryContent) + } + logGreen(`${p} pack done`) + + // 测试情况下可以打包成压缩包 + if (NPM_WAREHOUSE === 'test') { + packPackages(p, packagePath) + } +} + +const dealFile = (componentDir, distDir) => { + if (componentDir.includes('common')) { + // 如果是vue3.0的打包命令下 + if (VERSION_TAG.startsWith('3')) { + // 删除 vue2.0文件 + fs.removeSync(path.join(distDir, 'adapter/vue2.js')) + // 重写adapter/index.js + fs.copySync(path.join(__dirname, '../', 'template/common/vue3.js'), path.join(distDir, 'adapter/index.js')) + } else { + // 删除 vue3.0文件 + fs.removeSync(path.join(distDir, 'adapter/vue3.js')) + // 重写adapter/index.js + fs.copySync(path.join(__dirname, '../', 'template/common/vue2.js'), path.join(distDir, 'adapter/index.js')) + } + } else if (componentDir.includes('locale')) { + // 如果是vue3.0的打包命令下 + if (VERSION_TAG.startsWith('3')) { + // 删除 vue2.0文件 + fs.removeSync(path.join(distDir, 'vue2.js')) + // 重写index.js + fs.copySync(path.join(__dirname, '../', 'template/locale/vue3.js'), path.join(distDir, 'index.js')) + } else { + // 删除 vue3.0文件 + fs.removeSync(path.join(distDir, 'vue3.js')) + // 重写index.js + fs.copySync(path.join(__dirname, '../', 'template/locale/vue2.js'), path.join(distDir, 'index.js')) + } + } +} + +// 读取packages文件夹下的所有组件,并执行copy操作 +const releaseAll = () => { + fs.readdirSync(path.join(sourcePkg)).forEach((item) => { + const componentDir = path.join(sourcePkg, item) + const stat = fs.statSync(componentDir) + + if (stat.isDirectory()) { + const distPath = path.join(sourcePkg, item, packages) + const packageJson = path.join(sourcePkg, item, packageName) + + if (fs.existsSync(distPath)) { + fs.copySync(distPath, path.join(packages, item), { + overwrite: true + }) + fs.copySync(packageJson, path.join(packages, item, packageName), { + overwrite: true + }) + } else { + fs.copySync(componentDir, path.join(packages, item), { + overwrite: true + }) + + // 处理common和locale包,分别针对vue2和vue3 + dealFile(componentDir, path.join(packages, item)) + } + + release(item) + } + }) + + logGreen('-- all release done --') +} + +releaseAll() diff --git a/build/release.js b/build/release.js new file mode 100644 index 000000000..b9dbdc562 --- /dev/null +++ b/build/release.js @@ -0,0 +1,113 @@ +/** + * 用于发布 @opentiny/vue 包 + */ +const fs = require('fs-extra') +const path = require('path') +const semver = require('semver') +const { execSync } = require('child_process') +const sourcePkg = 'packages' +const source = 'dist' +const packageName = 'package.json' +const packagePath = path.join(source, packageName) +const packageJSON = fs.readJSONSync(packageName) + +const keys = ['name', 'version', 'description', 'main', 'files', 'sideEffects', 'author', 'license', 'repository', 'dependencies', 'engines', 'browserslist'] + +const allDist = 'allDist' +const toOneZip = process.env.tiny_mode === 'pc' +const NPM_TAG = process.env.NPM_TAG +// 命令行中指定的版本号 +const VERSION_TAG = process.env.VERSION_TAG +const NPM_WAREHOUSE = process.env.NPM_WAREHOUSE + +for (let key in packageJSON) { + if (Object.prototype.hasOwnProperty.call(packageJSON, key)) { + !~keys.indexOf(key) && delete packageJSON[key] + } +} + +// 配置指定的版本号 +if (VERSION_TAG) { + packageJSON.version = VERSION_TAG +} + +// 根据modules.json生成所有组件列表信息 +const genDependencies = () => { + const { getComponents } = require('./module-utils') + let dependencies = {} + + getComponents(false).forEach((component) => { + const packPath = component.path.replace(/index\.js$/, 'package.json') + + if (!fs.existsSync(packPath)) { + return + } + + if (NPM_TAG) { + dependencies[component.importName] = NPM_TAG + } else { + let { version } = fs.readJSONSync(packPath) + + if (version) { + const major = semver.major(version) + const minor = semver.minor(version) + + version = `${major}.${minor}.0` + dependencies[component.importName] = '~' + version + } + } + }) + + return dependencies +} + +// 根据组件列表信息重新package.json的dependencies信息 +packageJSON.dependencies = Object.assign(packageJSON.dependencies || {}, genDependencies()) + +fs.writeFileSync(packagePath, JSON.stringify(packageJSON, null, 2)) +fs.copySync(packagePath, path.join(source, 'vue', packageName), { + overwrite: true +}) + +if (toOneZip) { + const vuePackage = path.join(allDist, 'vue') + + if (!fs.existsSync(allDist)) { + fs.mkdirSync(allDist) + } + + if (!fs.existsSync(vuePackage)) { + fs.mkdirSync(vuePackage) + } + + fs.copyFileSync(packageName, path.join(vuePackage, packageName)) + + fs.readdirSync(source).forEach((item) => { + const stat = fs.statSync(path.join(source, item)) + + if (!stat.isDirectory()) { + fs.copyFileSync(path.join(source, item), path.join(vuePackage, item)) + } + }) +} else { + const entrys = ['pc.js', 'mobile.js', 'index.js'] + + entrys.forEach((name) => { + fs.copyFileSync(path.join(sourcePkg, name), path.join(source, name)) + fs.copySync(path.join(sourcePkg, name), path.join(source, 'vue', name), { + overwrite: true + }) + }) + // 只有在发布npm测试仓库的时候才执行以下压缩包的逻辑 + if (NPM_WAREHOUSE === 'test') { + execSync('npm pack', { cwd: source }) + + fs.readdirSync(source).forEach((item) => { + if (item.endsWith('.tgz')) { + const tgzPath = path.join(source, item) + + fs.moveSync(tgzPath, path.join('tgzs', item), { overwrite: true }) + } + }) + } +} diff --git a/build/runtime-utils.js b/build/runtime-utils.js new file mode 100644 index 000000000..9737cb9d3 --- /dev/null +++ b/build/runtime-utils.js @@ -0,0 +1,341 @@ +/** + * 打包运行时通用配置 + * + * 全量运行时(组件分组) + * 运行时版本号 + * 运行时外部依赖路径 + */ +const fs = require('fs-extra') +const { getVersion, pathJoin, logRed } = require('./utils') +const moduleUtils = require('./module-utils') + +const runtimeComponents = { + core: [ + 'Common', + 'Icon', + 'Locale', + 'Alert', + 'Col', + 'Container', + 'DialogBox', + 'Layout', + 'Loading', + 'Popover', + 'Row', + 'Tooltip', + 'Carousel', + 'CarouselItem', + 'Collapse', + 'CollapseItem', + 'Split', + 'TimeLine', + 'Milestone', + 'Floatbar', + 'Steps', + 'TabItem', + 'Tabs', + 'Breadcrumb', + 'BreadcrumbItem', + 'FallMenu', + 'NavMenu', + 'Rate', + 'Tag', + 'TopBox', + 'Notify', + 'Image', + 'ImageViewer', + 'ScrollText', + 'Scrollbar', + 'UserHead', + 'SlideBar', + 'Slider', + 'Link', + 'Progress', + 'Crop' + ], + base: [ + 'Autocomplete', + 'BulletinBoard', + 'Button', + 'ButtonGroup', + 'Calendar', + 'Cascader', + 'CascaderMenu', + 'CascaderNode', + 'CascaderPanel', + 'Checkbox', + 'CheckboxButton', + 'CheckboxGroup', + 'DatePanel', + 'DatePicker', + 'DateRange', + 'DateTable', + 'DetailPage', + 'DropTimes', + 'FileUpload', + 'Form', + 'FormItem', + 'Grid', + 'GridColumn', + 'GridManager', + 'GridToolbar', + 'Input', + 'IpAddress', + 'LinkMenu', + 'Modal', + 'MonthRange', + 'MonthTable', + 'Numeric', + 'Option', + 'OptionGroup', + 'Pager', + 'PagerItem', + 'Picker', + 'PopUpload', + 'Popeditor', + 'Radio', + 'RadioButton', + 'RadioGroup', + 'Search', + 'Select', + 'SelectDropdown', + 'Switch', + 'Table', + 'TextPopup', + 'Time', + 'TimePanel', + 'TimePicker', + 'TimeRange', + 'TimeSelect', + 'TimeSpinner', + 'ToggleMenu', + 'Transfer', + 'TransferPanel', + 'Tree', + 'TreeMenu', + 'Upload', + 'UploadDragger', + 'UploadList', + 'YearTable' + ], + business: ['UserContact', 'Wizard'], + chart: [ + 'BaiduMap', + 'ChartBar', + 'ChartCandle', + 'ChartCore', + 'ChartFunnel', + 'ChartGauge', + 'ChartWaterfall', + 'ChartGraph', + 'ChartHeatmap', + 'ChartHistogram', + 'ChartLine', + 'ChartMap', + 'ChartPie', + 'ChartRadar', + 'ChartRing', + 'ChartSankey', + 'ChartScatter', + 'ChartSunburst', + 'ChartTree', + 'Chart', + 'ChartBoxplot' + ], + external: [ + 'CardTemplate', + 'CreditCard', + 'CreditCardForm', + 'SvgIcon', + 'AutonaviMap', + 'ChartWordcloud', + 'ChartLiquidfill' + ] +} + +const echartsVersion = getVersion('echarts') +const auroraVueVersion = getVersion('@opentiny/vue') +const echartsSource = 'lib/echarts.min.js' + echartsVersion +const dependencies = { + vue: 'node_modules/vue/dist/vue.min.js', + 'vue-i18n': 'node_modules/vue-i18n/dist/vue-i18n.min.js', + axios: 'node_modules/axios/dist/axios.min.js', + 'axios-mock-adapter': + 'node_modules/axios-mock-adapter/dist/axios-mock-adapter.min.js', + '@vue/composition-api': + 'node_modules/@vue/composition-api/dist/vue-composition-api.prod.js', + '@aurora/core': 'node_modules/@aurora/core/dist/aurora.min.js', + '@aurora/service': 'node_modules/@aurora/service/dist/aurora.service.min.js', + cropperjs: 'node_modules/cropperjs/dist/cropper.min.js', + vue3: 'example/node_modules/vue/dist/vue.global.prod.js', + 'vue3-i18n': 'example/node_modules/vue-i18n/dist/vue-i18n.global.js' +} + +const runtimeDeps = { + base: { + vue: 'lib/vue.min.js' + getVersion('vue'), + axios: 'lib/axios.min.js' + getVersion('axios'), + 'vue-i18n': 'lib/vue-i18n.min.js' + getVersion('vue-i18n'), + 'axios-mock-adapter': + 'lib/axios-mock-adapter.min.js' + getVersion('axios-mock-adapter') + }, + aurora: { + '@aurora/core': 'lib/aurora.min.js' + getVersion('@aurora/core'), + '@aurora/service': + 'lib/aurora.service.min.js' + getVersion('@aurora/service') + }, + aui3Lib: { + '@vue/composition-api': + 'lib/vue-composition-api.prod.js' + getVersion('@vue/composition-api'), + echarts: echartsSource, + 'echarts/lib/echarts': echartsSource, + 'echarts/lib/chart/bar': echartsSource, + 'echarts/lib/chart/boxplot': echartsSource, + 'echarts/lib/chart/candlestick': echartsSource, + 'echarts/lib/chart/chord': echartsSource, + 'echarts/lib/chart/custom': echartsSource, + 'echarts/lib/chart/effectScatter': echartsSource, + 'echarts/lib/chart/funnel': echartsSource, + 'echarts/lib/chart/gauge': echartsSource, + 'echarts/lib/chart/graph': echartsSource, + 'echarts/lib/chart/heatmap': echartsSource, + 'echarts/lib/chart/line': echartsSource, + 'echarts/lib/chart/lines': echartsSource, + 'echarts/lib/chart/map': echartsSource, + 'echarts/lib/chart/parallel': echartsSource, + 'echarts/lib/chart/pictorialBar': echartsSource, + 'echarts/lib/chart/pie': echartsSource, + 'echarts/lib/chart/radar': echartsSource, + 'echarts/lib/chart/sankey': echartsSource, + 'echarts/lib/chart/scatter': echartsSource, + 'echarts/lib/chart/sunburst': echartsSource, + 'echarts/lib/chart/themeRiver': echartsSource, + 'echarts/lib/chart/tree': echartsSource, + 'echarts/lib/chart/treemap': echartsSource, + 'echarts/lib/component/legend': echartsSource, + 'echarts/lib/component/tooltip': echartsSource, + 'echarts/lib/component/dataZoom': echartsSource, + 'echarts/lib/component/visualMap': echartsSource, + cropperjs: 'lib/cropper.min.js' + getVersion('cropperjs'), + '@opentiny/vue-renderless-common': + 'aui/common/renderless.js' + + getVersion('@opentiny/vue-renderless') + }, + aui3Component: { + '@opentiny/vue-locale': + 'COMPONENT_DIR/locale.js' + auroraVueVersion, + '@opentiny/vue-icon': 'COMPONENT_DIR/icon.js' + auroraVueVersion, + '@opentiny/vue-common': 'COMPONENT_DIR/common.js' + auroraVueVersion + } +} + +const getPartDeps = (keys = []) => { + const tempDeps = {} + + for (let key in runtimeDeps) { + if (Object.prototype.hasOwnProperty.call(runtimeDeps, key)) { + keys.includes(key) && Object.assign(tempDeps, runtimeDeps[key]) + } + } + + return tempDeps +} + +const getAllDeps = () => { + return getPartDeps(Object.keys(runtimeDeps)) +} + +const getAllComponents = () => { + const componentMap = moduleUtils.getPcComponents(true) + const systemMap = {} + + for (let i = 0, len = componentMap.length; i < len; i++) { + const libName = componentMap[i].LowerName + const libEntry = componentMap[i].path + let version = auroraVueVersion + + try { + version = + '?v=' + + require('../' + + libEntry.replace('index.js', 'package.json')).version.replace( + /[\^|~]/g, + '' + ) + } catch (e) { + logRed(e) + } + + systemMap[componentMap[i].importName] = + 'COMPONENT_DIR/' + libName + '.js' + version + } + + return systemMap +} + +const getFullRuntimeDeps = () => { + return { ...getAllDeps(), ...getAllComponents() } +} + +const getComponentRuntimeDeps = () => { + return { + ...getPartDeps(['theme', 'aui3Lib', 'aui3Component']), + ...getAllComponents() + } +} + +const getFullRuntime = (name) => { + const arr = + typeof name === 'string' ? [name] : name || Object.keys(runtimeComponents) + + return [].concat(...arr.map((key) => runtimeComponents[key])) +} + +/** + * 提取 @opentiny/vue-renderless 中的公共代码,打成独立包(避免组件运行不正常) + */ +const getRenderlessExports = () => { + const RENDERLESS_PATH = pathJoin( + '..', + 'node_modules', + '@aurora', + 'renderless', + 'common', + 'runtime.js' + ) + + let EXTERNAL_RENDERLESS = [] + + // 获取需要排除的依赖 + if (fs.existsSync(RENDERLESS_PATH)) { + const runtimeExport = fs.readFileSync(RENDERLESS_PATH).toString('UTF-8') + + EXTERNAL_RENDERLESS = runtimeExport.match(/import(.*)from(.*)/g) || [] + + EXTERNAL_RENDERLESS = EXTERNAL_RENDERLESS.map((item) => { + let moduleLine = item.replace(/^import\s+/g, '').split(/\s+from\s+/) + + return { + libraryName: moduleLine.pop().replace(/'/g, '').replace(';', ''), + exportName: moduleLine.pop().split(/\s/).pop() + } + }) + } + + return { + EXTERNAL_RENDERLESS, + RENDERLESS_PATH + } +} + +module.exports = { + dependencies, + getAllDeps, + getPartDeps, + getFullRuntime, + getAllComponents, + getFullRuntimeDeps, + getRenderlessExports, + getComponentRuntimeDeps, + getExternalComponents: () => runtimeComponents.external +} diff --git a/build/sync-icons.js b/build/sync-icons.js new file mode 100644 index 000000000..9989a014a --- /dev/null +++ b/build/sync-icons.js @@ -0,0 +1,88 @@ +/** + * 初始化/创建 ICON 组件,从 @opentiny/vue-theme/svgs 中提取 SVG 图标创建对应的 ICON 组件 + */ +const path = require('path') +const fs = require('fs-extra') +const utils = require('./utils') +const semver = require('semver') +const { EOL } = require('os') + +const svgRE = /\.svg$/ +const svgDir = utils.pathJoin('../../', 'vue-theme', 'theme', 'svgs') +const iconDir = utils.pathJoin('..', 'packages', 'icon') +const packageJson = 'package.json' +const templatePath = utils.pathJoin('..', 'template') +const render = utils.renderTemplate({ leftChar: '[[', rightChar: ']]' }) + +// 检查是否按照依赖包 +if (!fs.existsSync(svgDir)) { + utils.logYellow('The @opentiny/vue-theme is not exist , please npm install @opentiny/vue-theme.') +} + +// 是否包含 package/icon 目录 +if (!fs.existsSync(iconDir)) { + fs.mkdirSync(iconDir) + + const version = utils.getTinyVersion() + const iconTemplate = fs.readJSONSync(path.join(templatePath, 'component', packageJson)) + + // 删除多余的依赖 + if (iconTemplate.dependencies) { + delete iconTemplate.dependencies['@opentiny/vue-renderless'] + } + + const packageContent = render(JSON.stringify(iconTemplate), { + NAME: 'icon', + MINOR: semver.minor(version) + }) + + fs.writeFileSync(path.join(iconDir, packageJson), packageContent) +} + +const exportComponents = [] +const exportIcons = [] +const componentTemplate = fs.readFileSync(path.join(templatePath, 'icon', 'index.js'), { encoding: 'utf8' }) + +// 根据 @opentiny/vue-theme/svgs 中的 svg 图片创建对应的 icon 组件 +fs.readdirSync(svgDir).forEach((fileName) => { + if (svgRE.test(fileName)) { + const svgName = fileName.replace(svgRE, '') + const iconPath = path.join(iconDir, svgName) + const iconName = utils.capitalizeKebabCase(svgName) + const fullIconName = `Icon${iconName}` + + if (!fs.existsSync(iconPath)) { + fs.mkdirSync(iconPath) + const iconEntryContent = render(componentTemplate, { + CNAME: iconName, + SNAME: fileName + }) + + fs.writeFileSync(path.join(iconPath, 'index.js'), utils.prettierFormat({ str: iconEntryContent })) + } + exportComponents.push(`import ${fullIconName} from './${svgName}'`) + exportIcons.push(fullIconName) + } +}) + +if (exportComponents.length) { + fs.writeFileSync( + path.join(iconDir, 'index.js'), + utils.prettierFormat({ + str: `${exportComponents.join(EOL)} + + export { + ${exportIcons.join(',' + EOL)} + } + + export default { + ${exportIcons.join(',' + EOL)} + } + ` + }) + ) + + utils.logGreen('npm run create:icon done.') +} else { + utils.logRed('npm run create:icon fail.') +} diff --git a/build/utils.js b/build/utils.js new file mode 100644 index 000000000..6cdbdacf0 --- /dev/null +++ b/build/utils.js @@ -0,0 +1,309 @@ +const fs = require('fs-extra') +const path = require('path') +const chalk = require('chalk') +const { execSync } = require('child_process') +const log = global.console + +const logger = log.log + +/** + * 根据运行上下文获取路径(运行时打包用) + * @returns 文件绝对路径 + */ +const resolveCwd = (...args) => path.join(process.cwd(), ...args) + +/** + * 获取模板替换路径(动态) + * @param {String} posixPath 路径 + * @returns 文件绝对路径 + */ +const assetsPath = (posixPath) => path.posix.join('static', posixPath) + +/** + * 根据运行上下文获取,当前运行组件的名称 + * @returns 当前运行组件目录名称 + */ +const getComponentName = () => process.cwd().split(path.sep).pop() + +/** + * 获取当前上下文的路径 + * @returns 文件绝对路径 + */ +const pathJoin = (...args) => path.join(__dirname, ...args) + +/** + * 获取用户输入命令参数 + * @returns 参数数组 + */ +const getInputCmd = () => { + const args = [] + const argv = process.argv || [] + + argv.forEach((item) => { + if (item.indexOf(path.sep) === -1) { + args.push(item) + } + }) + + return args +} + +/** + * 获取当前执行 cli 命令的工具:node\npm\yarn + * @returns node\npm\yarn + */ +const getCurrentCliTool = () => { + const npmExecpaths = process.env.npm_execpaths + + if (!npmExecpaths) { + return 'node' + } + + return npmExecpaths.substring(npmExecpaths.lastIndexOf(path.sep) + 1).replace(/.js|-cli/g, '') +} + +/** + * 执行 node 命令 + * @param {String} cmdStr 命令字符串 + */ +const execCmd = (cmdStr) => { + cmdStr && execSync(cmdStr, { stdio: 'inherit' }) +} + +/** + * 首字母大写 + * @param {String} str 字符串 + * @returns 字符串 + */ +const capitalize = (str) => (typeof str === 'string' ? str.slice(0, 1).toUpperCase() + str.slice(1) : str) + +/** + * 首字母大写 + * @param {String} str 字符串 + * @returns 字符串 + */ +const capitalizeKebabCase = (str, splitChar = '-') => (typeof str === 'string' ? str.split(splitChar).map(capitalize).join('') : str) + +/** + * @description 将驼峰字符串转化为以指定字符分割的小写字符串 + * @example kebabCase({ str : 'ImgPreviewItem' } ) + * @example 输出结果:img-preview-item + * + * @param str 字符串 + * @param splitChar 分隔符 + */ +const kebabCase = ({ str, splitChar = '-' }) => { + if (!str || typeof str !== 'string') { + return str + } + + return str + .split('') + .map((char, index) => { + const charCod = char.charCodeAt(0) + + if (charCod < 65 || charCod > 122) { + return char + } + + return (charCod >= 65 && charCod) <= 90 ? (index === 0 ? '' : splitChar) + char.toLowerCase() : char + }) + .join('') +} + +/** + * 采用 prettier 美化字符串 + * @param {String} str 格式字符 + * @param {Object} options 格式字符 + */ +const prettierFormat = ({ str, options = {} }) => + require('prettier').format(str, { + printWidth: 100, + jsxBracketSameLine: false, + tabWidth: 2, + useTabs: false, + singleQuote: true, + semi: false, + trailingComma: 'none', + bracketSpacing: true, + parser: 'babel', + ...options + }) + +/** + * @private + * @param {String} path dotted to indicate levels in an object. + * @param {Object} view for the data. + */ +function extractValue(path, view) { + if (view && view[path]) { + return view[path] + } + + const parts = path.split('.') + let part = '' + + while (view && (part = parts.shift())) { + view = typeof view === 'object' && part in view ? view[part] : undefined + } + + return view +} + +/** + * 渲染字符串模板 + * @param {String} leftChar 匹配左边字符 + * @param {String} rightChar 匹配右边字符 + */ +const renderTemplate = ({ leftChar = '{{', rightChar = '}}' } = {}) => { + const specialChar = ['[', ']'] + const _leftChar = leftChar.split('').map((item) => (specialChar.includes(item) ? '\\' : '') + item) + + const _rightChar = rightChar.split('').map((item) => (specialChar.includes(item) ? '\\' : '') + item) + + const REGEX = new RegExp(`${_leftChar.join('')}([a-zA-Z.-_0-9]+)${_rightChar.join('')}`, 'g') + + return (input, view) => { + if (input.indexOf(leftChar) === -1) { + return input + } + + let result + const replaced = input.replace(REGEX, (original, path) => { + const value = extractValue(path, view) + + if (undefined === value || value === null) { + return original + } + + if (typeof value === 'object') { + result = value + return + } + + return value + }) + + return undefined === result ? replaced : result + } +} + +/** + * 扫描指定目录下面的组件目录 + * @param {String} dirPath 绝对路径 + * @param {Boolean} isDeep 是否深度遍历 + * @param {Function} fileFilter 文件筛选拦截函数 + * @param {Function} callback 遍历回调 + */ +const walkFileTree = ({ dirPath, isDeep = false, fileFilter, callback }) => { + if (!dirPath || typeof callback !== 'function') { + return + } + + const dirs = fs.readdirSync(path.isAbsolute(dirPath) ? dirPath : path.join(__dirname, dirPath)) + + if (Array.isArray(dirs) && dirs.length > 0) { + dirs.forEach((file) => { + let isFind = true + const subPath = path.join(dirPath, file) + const isDirectory = fs.statSync(subPath).isDirectory() + + if (typeof fileFilter === 'function') { + isFind = fileFilter({ file, subPath, dirs, isDirectory }) === true + } + + if (isFind && isDirectory) { + if (isDeep) { + walkFileTree({ isDeep, dirPath: subPath, fileFilter, callback }) + return + } + } + + callback({ file, subPath, dirs, isDirectory }) + }) + } +} + +/** + * 获取根目录 package.json 中的 version + * @param {String} 对象的 Key + */ +const getTinyVersion = (key = 'version') => { + const packageJson = fs.readJsonSync(pathJoin('..', 'package.json')) + + return packageJson[key] || packageJson +} + +/** + * 获取指定包名的版本号 + * + * @param {String} name NPM 包名 + * @param {String} context 上下文 + * @returns + */ +const getVersion = (name, context = '..') => { + let version + const packageJSON = getTinyVersion('full') + + try { + version = fs.readJsonSync(pathJoin(context, 'node_modules', name, 'package.json')).version + } catch (e) { + version = (packageJSON.devDependencies || packageJSON.dependencies || {})[name] || packageJSON.version + } + + return '?v=' + version.replace(/[\^|~]/g, '') +} + +/** + * 在控制台显示绿色提示 + * @param {String} 提示内容 + */ +const logGreen = (str) => { + logger(chalk.green('### ' + str)) +} + +/** + * 在控制台显示黄色提示 + * @param {String} 提示内容 + */ +const logYellow = (str) => { + logger(chalk.yellow('### ' + str)) +} + +/** + * 在控制台显示青色提示 + * @param {String} 提示内容 + */ +const logCyan = (str) => { + logger(chalk.cyan('### ' + str)) +} + +/** + * 在控制台显示红色提示 + * @param {String} 提示内容 + */ +const logRed = (str) => { + logger(chalk.red('### ' + str)) +} + +module.exports = { + logRed, + execCmd, + logCyan, + pathJoin, + logGreen, + logYellow, + kebabCase, + assetsPath, + capitalize, + getVersion, + resolveCwd, + getInputCmd, + walkFileTree, + renderTemplate, + prettierFormat, + getTinyVersion, + getComponentName, + getCurrentCliTool, + capitalizeKebabCase +} diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 000000000..4fedde6da --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1 @@ +module.exports = { extends: ['@commitlint/config-conventional'] } diff --git a/deleteDist.js b/deleteDist.js new file mode 100644 index 000000000..f05f43d73 --- /dev/null +++ b/deleteDist.js @@ -0,0 +1,33 @@ +const path = require('path') +const fs = require('fs-extra') + +const ROOTPATH = path.join(__dirname, './') + +const publish = () => { + const publishDir = path.join(ROOTPATH, 'packages') + fs.readdirSync(publishDir).forEach((item) => { + const childPath = path.join(publishDir, item) + const stat = fs.statSync(childPath) + + if (stat.isDirectory()) { + const distPath = path.join(childPath, './dist') + if (fs.existsSync(distPath) && fs.statSync(distPath).isDirectory()) { + fs.removeSync(distPath) + } + if (item.startsWith('chart')) { + fs.readdirSync(childPath).forEach((value) => { + const chartChildPath = path.join(childPath, value) + const chartStat = fs.statSync(chartChildPath) + if (value.includes('-') && chartStat.isDirectory()) { + const distPath = path.join(chartChildPath, './dist') + fs.existsSync(distPath) && + fs.statSync(distPath).isDirectory() && + fs.removeSync(distPath) + } + }) + } + } + }) +} + +publish() diff --git a/example/.eslintrc b/example/.eslintrc new file mode 100644 index 000000000..21c9f0492 --- /dev/null +++ b/example/.eslintrc @@ -0,0 +1,6 @@ +{ + "rules": { + "no-console": "off", + "no-unused-vars": "off" + } +} \ No newline at end of file diff --git a/example/build/build-icon.js b/example/build/build-icon.js new file mode 100644 index 000000000..d1049ef2e --- /dev/null +++ b/example/build/build-icon.js @@ -0,0 +1,88 @@ +const commonjs = require('@rollup/plugin-commonjs') +const { nodeResolve } = require('@rollup/plugin-node-resolve') +const vue = require('rollup-plugin-vue') +const { babel } = require('@rollup/plugin-babel') +const { pathJoin, logGreen, logRed } = require('../../build/utils') +const rollup = require('rollup') +const svgVue = require('./rollup-vue3-svg') +const fs = require('fs-extra') +const path = require('path') + +const inputOptions = { + plugins: [ + vue({ + css: true + }), + svgVue({}), + nodeResolve(), + babel({ + exclude: /node_modules/, + babelrc: false, + configFile: false, // 必须为 false 不然会取根文件的 babel.config.js 配置,产生一堆 runtime 代码 + babelHelpers: 'bundled', + extensions: ['.js', '.vue'], + presets: ['@babel/preset-env'], + plugins: ['@babel/plugin-proposal-export-default-from', '@babel/plugin-proposal-export-namespace-from'] + }), + // 如果打包文件中包含 jsx 语法, commonjs 必须放置在 babel 配置下面,否则会报错 PLUGIN_ERROR + commonjs() + ] +} + +const outputOptions = { + format: 'es', + exports: 'named' +} + +const build = (icons) => { + icons.forEach((itconComponent) => { + const inputs3 = { ...inputOptions } + + inputs3.input = pathJoin('..', 'packages', 'icon', itconComponent.path) + + if (itconComponent.path === 'index.js') { + inputs3.external = (deps) => !deps.includes('index.js') + } else if (itconComponent.path === 'lowercase.js') { + inputs3.external = (deps) => !deps.includes('lowercase.js') + } else { + inputs3.external = (deps) => !/@opentiny[\\/]vue-theme/.test(deps) && !deps.includes('index.js') + } + + rollup + .rollup(inputs3) + .then((bundle) => { + const outs = { ...outputOptions } + outs.file = pathJoin('..', 'packages', 'icon', itconComponent.libPath) + bundle.write(outs) + logGreen(`${itconComponent.path} compile icon done`) + }) + .catch((e) => { + logRed(e) + }) + }) +} + +function createComponentMap(iconDir) { + const components = [] + fs.readdirSync(iconDir).forEach((iconFile) => { + if (['dist', 'runtime'].includes(iconFile)) { + return + } + + if (fs.statSync(path.join(iconDir, iconFile)).isDirectory()) { + components.push({ + path: `${iconFile}/index.js`, + libPath: `dist/lib/${iconFile}.js` + }) + } else { + iconFile.endsWith('.js') && + components.push({ + path: `${iconFile}`, + libPath: `dist/lib/${iconFile}` + }) + } + }) + return components +} + +build(createComponentMap(pathJoin('..', 'packages', 'icon'))) diff --git a/example/build/build-ui.js b/example/build/build-ui.js new file mode 100644 index 000000000..0e2e46877 --- /dev/null +++ b/example/build/build-ui.js @@ -0,0 +1,107 @@ +const rollup = require('rollup') +const replace = require('@rollup/plugin-replace') +const { readJSONSync } = require('fs-extra') +const utils = require('../../build/utils') +const config = require('./config') +const moduleUtils = require('../../build/module-utils') +const fs = require('fs-extra') +const isSingle = process.env.BUILD_TARGET === 'single' + +const inputOptions = { + plugins: config.plugins, + external: config.external +} + +const outputOptions = { + format: 'es', + globals: config.globals, + exports: 'named' +} + +const replaceConstant = { + 'process.env.BUILD_TARGET': JSON.stringify(process.env.BUILD_TARGET), + 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV) +} + +if (process.env.TINY_MODE === 'pc') { + outputOptions.format = 'umd' + replaceConstant['process.env.TINY_MODE'] = JSON.stringify(process.env.tiny_mode) +} + +const build = ({ comp, callbackFn }) => { + inputOptions.input = utils.pathJoin('..', comp.path) + + inputOptions.plugins.push(replace(replaceConstant)) + rollup + .rollup(inputOptions) + .then((bundle) => { + outputOptions.file = utils.pathJoin('..', comp.libPath) + if (outputOptions.format === 'umd') { + outputOptions.name = comp.global + } + bundle.write(outputOptions).finally(() => { + const filePath = utils.pathJoin('..', comp.libPath) + if (filePath.endsWith('index.js')) { + const indexStr = fs.readFileSync(filePath).toString('UTF-8') + const resStr = indexStr.replace('./src/pc', './pc').replace('./src/mobile', './mobile') + fs.writeFileSync(filePath, resStr) + } + callbackFn() + }) + }) + .catch((e) => { + utils.logRed(e) + callbackFn() + }) +} + +let componentsArr = [] + +const buildAll = (count = 0) => { + let comp = componentsArr[count++] + if (comp) { + if (!isSingle) { + comp.libPath = 'dist/' + comp.libName.replace('@opentiny/vue/', '') + comp.libPath += (comp.type === 'component' ? '/index' : '') + '.js' + } + build({ + comp, + callbackFn() { + buildAll(count) + } + }) + } else { + utils.logGreen(`npm run build:ui${isSingle ? '-single' : ''} done.`) + } +} + +if (isSingle) { + const inputNameArr = utils.getInputCmd() + if (inputNameArr.length > 0) { + inputNameArr.forEach((input) => { + const activeComName = utils.kebabCase({ str: input }) + + if (activeComName) { + componentsArr.push( + ...moduleUtils.getByName({ + name: activeComName, + isSort: false + }) + ) + } + }) + } else { + const activeCompName = utils.getComponentName() + componentsArr = moduleUtils.getByName({ + name: activeCompName, + isSort: false + }) + } +} else { + componentsArr = moduleUtils.getAllModules(false) +} +if (componentsArr.length > 0) { + buildAll() +} else { + utils.logYellow('please enter the component name after command.') +} diff --git a/example/build/config.js b/example/build/config.js new file mode 100644 index 000000000..cf2d0d1f2 --- /dev/null +++ b/example/build/config.js @@ -0,0 +1,88 @@ +const fs = require('fs-extra') +const { babel } = require('@rollup/plugin-babel') +const vue = require('rollup-plugin-vue') +const alias = require('@rollup/plugin-alias') +const commonjs = require('@rollup/plugin-commonjs') +const postcss = require('rollup-plugin-postcss') +const { nodeResolve } = require('@rollup/plugin-node-resolve') +const { pathJoin } = require('../../build/utils') +const { getAllModules } = require('../../build/module-utils') + +const external = ['vue', './pc', './mobile', '@opentiny/vue-common', '@opentiny/vue-locale', '@vue/composition-api', '@opentiny/vue-renderless'] + +const globals = { + vue: 'Vue', + '@vue/composition-api': 'vueCompositionApi', + '@opentiny/vue-locale': 'TinyVueLocale', + '@opentiny/vue-common': 'TinyVueCommon', + '@opentiny/vue-renderless': 'TinyRenderLess' +} + +const aliasList = {} +const components = getAllModules(false) + +components.forEach((itemComponent) => { + aliasList[itemComponent.libName] = pathJoin(`../${itemComponent.path}`) + + if (itemComponent.private) { + return + } + + const isComponent = itemComponent.type === 'component' + + external.push(itemComponent.importName) + external.push(itemComponent.libName) + globals[itemComponent.libName] = itemComponent.global // TinyTodo + + if (isComponent) { + if (fs.existsSync(pathJoin('../../tiny-vue-theme'))) { + aliasList[`@opentiny/vue-theme/${itemComponent.LowerName}/index.css`] = pathJoin(`../../tiny-vue-theme/src/${itemComponent.LowerName}/index.css`) + aliasList[`@opentiny/vue-theme/${itemComponent.LowerName}/index.js`] = pathJoin(`../../tiny-vue-theme/src/${itemComponent.LowerName}/index.js`) + } + external.push(`${itemComponent.libName}/index.js`) + } else { + external.push(`${itemComponent.libName}.js`) + } +}) + +exports.aliasList = aliasList + +exports.external = (deps) => external.includes(deps) || /^@opentiny[\\/](vue-common|vue-renderless|vue-theme|vue-icon|cropperjs)/.test(deps) + +exports.globalsMap = globals + +const op = { + resolve: ['.js', '.vue', '.css'], + extract: false, + css: true, + extensions: ['.js', '.jsx', '.vue', '.css'] +} + +exports.plugins = [ + alias({ + resolve: op.resolve, + '@opentiny/vue-locale': pathJoin('../packages/locale/index'), + '@opentiny/vue-common': pathJoin('../packages/common/index'), + ...aliasList + }), + postcss({ + extract: op.extract + }), + vue({ + css: op.css + }), + nodeResolve({ + extensions: op.extensions + }), + babel({ + configFile: false, + babelrc: false, + exclude: /node_modules/, + comments: false, + presets: ['@babel/preset-env'], + babelHelpers: 'bundled', + extensions: ['.js', '.vue', '.jsx'], + plugins: ['@babel/plugin-syntax-dynamic-import', '@vue/babel-plugin-jsx'] + }), + commonjs() +] diff --git a/example/build/rollup-vue3-svg.js b/example/build/rollup-vue3-svg.js new file mode 100644 index 000000000..9f9363765 --- /dev/null +++ b/example/build/rollup-vue3-svg.js @@ -0,0 +1,25 @@ +let compilerDom = require('@vue/compiler-dom') + +function vue3SvgInline() { + return { + name: 'vue3SvgInline', + + transform(source, id) { + if (id.indexOf('vue-theme') === -1) { + return null + } + const parsedSvg = source.match(//)[0] + const { code } = compilerDom.compile(parsedSvg, { + mode: 'module' + }) + + return ` + ${code} + export default { + render + }` + } + } +} + +module.exports = vue3SvgInline diff --git a/example/index.html b/example/index.html new file mode 100644 index 000000000..b22901e3e --- /dev/null +++ b/example/index.html @@ -0,0 +1,13 @@ + + + + + + + Tiny Vue + + +
+ + + \ No newline at end of file diff --git a/example/package.json b/example/package.json new file mode 100644 index 000000000..de7a49451 --- /dev/null +++ b/example/package.json @@ -0,0 +1,45 @@ +{ + "name": "vue-example", + "version": "0.1.0", + "scripts": { + "dev": "vite", + "test": "vitest test", + "build:icon3": "cross-env NODE_ENV=production node build/build-icon.js", + "coverage": "vitest run --coverage" + }, + "devDependencies": { + "@vue/babel-plugin-jsx": "^1.1.0", + "rollup-plugin-postcss": "^2.0.3", + "rollup-plugin-vue": "^6.0.0", + "vue": "^3.2.11", + "@vue/test-utils": "^2.0.0", + "jsdom": "16.4.0", + "vue-i18n": "^9.1.7", + "vitest": "^0.22.1", + "vue-router": "^4.0.11", + "@vitejs/plugin-vue": "^3.0.3", + "@vitejs/plugin-vue-jsx": "^2.0.0", + "vite-plugin-markdown-vue": "^0.1.2" + }, + "eslintConfig": { + "root": true, + "env": { + "node": true + }, + "extends": [ + "plugin:vue/essential", + "eslint:recommended" + ], + "parserOptions": { + "parser": "babel-eslint" + }, + "rules": { + "no-debugger": "off" + } + }, + "browserslist": [ + "> 1%", + "last 2 versions", + "not dead" + ] +} diff --git a/example/public/favicon.ico b/example/public/favicon.ico new file mode 100644 index 000000000..719c584f7 Binary files /dev/null and b/example/public/favicon.ico differ diff --git a/example/public/index.html b/example/public/index.html new file mode 100644 index 000000000..22961e2e4 --- /dev/null +++ b/example/public/index.html @@ -0,0 +1,19 @@ + + + + + + + + TinyVue + + + + +
+ + + \ No newline at end of file diff --git a/example/public/static/images/book-big.jpg b/example/public/static/images/book-big.jpg new file mode 100644 index 000000000..b86736bb1 Binary files /dev/null and b/example/public/static/images/book-big.jpg differ diff --git a/example/public/static/images/book-small.jpg b/example/public/static/images/book-small.jpg new file mode 100644 index 000000000..6e3c1f439 Binary files /dev/null and b/example/public/static/images/book-small.jpg differ diff --git a/example/public/static/images/book.jpg b/example/public/static/images/book.jpg new file mode 100644 index 000000000..6cf36a40c Binary files /dev/null and b/example/public/static/images/book.jpg differ diff --git a/example/public/static/images/bridge.jpg b/example/public/static/images/bridge.jpg new file mode 100644 index 000000000..ab545c7af Binary files /dev/null and b/example/public/static/images/bridge.jpg differ diff --git a/example/public/static/images/button-image.png b/example/public/static/images/button-image.png new file mode 100644 index 000000000..f3322e468 Binary files /dev/null and b/example/public/static/images/button-image.png differ diff --git a/example/public/static/images/floral.png b/example/public/static/images/floral.png new file mode 100644 index 000000000..80f595e26 Binary files /dev/null and b/example/public/static/images/floral.png differ diff --git a/example/public/static/images/fruit.jpg b/example/public/static/images/fruit.jpg new file mode 100644 index 000000000..b295bd78e Binary files /dev/null and b/example/public/static/images/fruit.jpg differ diff --git a/example/public/static/images/house.jpg b/example/public/static/images/house.jpg new file mode 100644 index 000000000..ab5480802 Binary files /dev/null and b/example/public/static/images/house.jpg differ diff --git a/example/public/static/images/mountain.png b/example/public/static/images/mountain.png new file mode 100644 index 000000000..e8a3e63ec Binary files /dev/null and b/example/public/static/images/mountain.png differ diff --git a/example/public/static/images/planet1.jpg b/example/public/static/images/planet1.jpg new file mode 100644 index 000000000..b5228a40e Binary files /dev/null and b/example/public/static/images/planet1.jpg differ diff --git a/example/public/static/images/planet2.jpg b/example/public/static/images/planet2.jpg new file mode 100644 index 000000000..4880a85e9 Binary files /dev/null and b/example/public/static/images/planet2.jpg differ diff --git a/example/public/static/images/planet3.jpg b/example/public/static/images/planet3.jpg new file mode 100644 index 000000000..b74628331 Binary files /dev/null and b/example/public/static/images/planet3.jpg differ diff --git a/example/public/static/images/watercolor.png b/example/public/static/images/watercolor.png new file mode 100644 index 000000000..ad31f47c2 Binary files /dev/null and b/example/public/static/images/watercolor.png differ diff --git a/example/src/App.vue b/example/src/App.vue new file mode 100644 index 000000000..98240aef8 --- /dev/null +++ b/example/src/App.vue @@ -0,0 +1,3 @@ + diff --git a/example/src/DemoView.vue b/example/src/DemoView.vue new file mode 100644 index 000000000..f06cb6d8d --- /dev/null +++ b/example/src/DemoView.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/assets/logo.png b/example/src/assets/logo.png new file mode 100644 index 000000000..f3d2503fc Binary files /dev/null and b/example/src/assets/logo.png differ diff --git a/example/src/assets/markdown.css b/example/src/assets/markdown.css new file mode 100644 index 000000000..6005bf2a1 --- /dev/null +++ b/example/src/assets/markdown.css @@ -0,0 +1,559 @@ +.hljs { + margin: 12px 0 25px 0; +} + +.highlight .hljs { + margin: 0; +} + +code { + background-color: #faffff; + border-radius: 4px; + padding: 1px 3px; + font-family: Menlo, YaHei Consolas Hybrid, Consolas, Courier New, monospace; + font-size: 13px; +} + +button, +input, +select, +textarea { + font-family: inherit; + font-size: inherit; + line-height: inherit; + color: inherit; +} +a { + display: inline-block; + white-space: nowrap; + cursor: pointer; + background-image: none; + text-decoration: none; + outline: 0; + color: var(--ti-common-color-line-active); +} + +input::-ms-clear, +input::-ms-reveal { + display: none; +} +.main-cnt { + padding: 80px 0 40px; + box-sizing: border-box; + height: 100%; +} + +.page-container { + width: 1140px; + padding: 0; + margin: 0 auto; +} + +.page-container { + padding-top: 0px; +} + +.page-container h2 { + font-size: 28px; + color: #1f2d3d; + margin: 0; + padding-bottom: 10px; + display: inline-block; +} + +.page-container h2 + p { + display: inline-block; +} + +.displaywrap .page-container h2 + p { + display: block; +} + +.page-container h3 { + font-size: 22px; +} + +.page-container h2, +.page-container h3, +.page-container h4, +.page-container h5 { + font-weight: 400; + color: #1f2f3d; +} + +.page-container h2 a, +.page-container h3 a, +.page-container h4 a, +.page-container h5 a { + float: left; + margin-left: -20px; + opacity: 0; + cursor: pointer; +} + +.page-container h2 a:hover, +.page-container h2:hover a, +.page-container h3 a:hover, +.page-container h3:hover a, +.page-container h4 a:hover, +.page-container h4:hover a, +.page-container h5 a:hover, +.page-container h5:hover a { + opacity: 0.4; +} + +.page-container p { + font-size: 16px; + color: #5e6d82; + line-height: 1.7em; +} + +.page-container .tip { + padding: 8px 16px; + background-color: #ecf8ff; + border-radius: 4px; + border-left: 5px solid #50bfff; + margin: 20px 0; + font-size: 14px; + color: #5e6d82; +} + +.page-container .tip .highlight-lines, +.page-container .tip .line-numbers-wrapper { + font-size: 12px; +} + +.page-container .tip code { + font-size: 14px; + line-height: 2em; +} + +.page-container .warn { + padding: 8px 16px; + background-color: #fffbe6; + border-radius: 4px; + border-left: 5px solid #ffd666; + margin: 20px 0; +} + +.page-container .warn code { + background-color: hsla(0, 0%, 100%, 0.7); + color: #445368; +} +.page-container .error { + padding: 8px 16px; + background-color: #fff1f0; + border-radius: 4px; + border-left: 5px solid #ff7875; + margin: 20px 0; +} + +.page-container .attach-icon .hae-icon.error, +.page-container .attach-icon .hae-icon.warn { + padding: 0; + margin: 0; + border: 0; + border-radius: 0; + background: none; +} + +.page-container .error code { + background-color: hsla(0, 0%, 100%, 0.7); + color: #445368; +} + +.page-container.academy-container { + width: 100%; + padding: 0; + margin: 0; +} + +.page-container.academy-container .main-left h2, +.page-container.academy-container .main-left h2 + p { + display: block; +} + +.page-container.academy-container .main-left h2 { + padding: 10px 0; +} + +.page-container.academy-container .main-left h3 { + margin: 40px 0 20px 0; +} + +.page-container.academy-container .main-left p > img, +.page-container.academy-container .main-left img { + max-width: 1200px; + margin: 10px 0; +} + +.page-container.academy-container .main-left code.hljs { + max-width: 720px; +} + +.page-container.academy-container .main-left hr { + max-width: 1200px; + margin-left: 0; +} + +.page-container.academy-container .main-left ul { + list-style: disc inside; + padding-left: 12px; + margin: 12px 0; +} + +.page-container.academy-container .main-left ul > li { + font-size: 14px; + line-height: 36px; +} + +.page-container.academy-container .main-left ul > li > p { + display: inline-block; +} + +.page-container.academy-container .main-left ul > li > ul { + padding-left: 24px; +} + +/* vue-press */ +.content code { + color: #476582; + padding: 0.25rem 0.5rem; + margin: 0; + font-size: 0.85em; + background-color: rgba(27, 31, 35, 0.05); + border-radius: 3px; +} + +.content code, +.content pre, +.content kbd, +.content samp { + font-family: 'source-code-pro', 'Menlo', 'Monaco', 'Consolas', 'Courier New', + 'monospace'; +} +.custom-block .custom-block-title { + font-weight: 600; + margin-bottom: -0.4rem; +} + +.page-container .content .table { + width: 100%; + text-align: left; + font-size: 14px; + margin: 10px 0; + border-collapse: collapse; +} +.page-container .content .table th, +.page-container .content .table td { + color: #333; + padding: 12px; + border: 1px solid #ddd; + vertical-align: top; +} +.page-container .content .table th { + background-color: #eee; +} +.page-container .content .table td:first-child { + width: 15%; +} +.page-container .content blockquote { + border-left: 4px solid var(--theme-color, #42b983); + color: #858585; + margin: 2em 0; + padding-left: 20px; +} + +.demo-popover-class1 { + background: #eee !important; +} +.demo-popover-class2 { + background: #999 !important; +} + +/* hightline */ +.page-main.noborder .content > h2:first-of-type { + border-bottom: 0; + margin-bottom: 0; +} + +.page-main.noborder .content > p.overviewicon { + margin-right: 20px; +} + +.page-main:not(.noborder) .content > h2 { + width: 100%; +} + +.content > h2:not(:first-of-type) { + margin-top: 36px; +} + +.content .badge.warn { + border-left: 0; + margin: 0; +} + +.content > h2 { + font-size: 1.65rem; + padding-bottom: 0.3rem; + margin-bottom: 16px; + text-indent: -1px; +} + +.content > h3 { + margin: 40px 0 20px 0; + padding-bottom: 0.3rem; + border-bottom: 1px solid #eaecef; +} + +.content > h4 { + font-size: 20px; + padding-top: 24px; +} + +.content > p > code { + font-size: 14px; +} + +.content > p > strong { + color: #2c3e50; +} + +.content pre code { + font-size: 14px; + font-family: 'source-code-pro', 'Menlo', 'Monaco', 'Consolas', 'Courier New', + 'monospace'; +} + +.content pre code.hljs { + padding: 18px; + border-radius: 6px; +} + +.content .apiBox pre.preview-code { + background-color: transparent; +} + +.content .visual-editor pre { + background-color: transparent; + padding: 0; + font-size: 14px; +} + +.content > ul > li { + color: #5e6d82; +} + +.content .apiContainer ul, +.content .visual-editor ul, +.content .attrContainer ul { + list-style: none; + margin: 0; + padding: 0; +} + +.content .float-css ul { + font-size: 14px; + margin: 0; + padding: 0; +} + +.content .box_all ul { + margin: 0; +} + +.content .logBox ul { + list-style: none; +} + +.content ul ul { + list-style-type: circle; +} + +.content .visual-editor ul { + font-size: 12px; +} + +.content .hae-carousel ul { + padding: 0 4px; + line-height: 1.42857143; + font-family: Helvetica, Arial, 'microsoft yahei'; +} + +.content a.hae-icon.outer-link:hover, +.content p a:hover { + text-decoration: underline; +} + +.content a.hae-icon.outer-link::after { + content: '\E840'; + font-size: 12px; + color: #999; + position: relative; + top: -6px; + left: 2px; +} + +.content > .custom-block > p { + margin: 16px 0; +} + +.content div[class*='language-'] { + position: relative; + background-color: #282c34; + border-radius: 6px; +} + +.custom-block.danger, +.custom-block.tip, +.custom-block.warning { + padding: 0.1rem 1.5rem; + border-left-width: 0.5rem; + border-left-style: solid; + margin: 1rem 0; +} + +.content .custom-block.tip { + background-color: #f3f5f7; + border-color: #42b983; + border-radius: 0; +} + +.content .custom-block.warning { + background-color: rgba(255, 229, 100, 0.3); + border-color: #e7c000; + color: #6b5900; +} + +.content .custom-block.warning .custom-block-title { + color: #b29400; +} + +.content .custom-block.danger { + background-color: #ffe6e6; + border-color: #c00; + color: #4d0000; +} + +.content .custom-block.danger .custom-block-title { + color: #900; +} + +div[class*='language-'] .highlight-lines { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + padding-top: 1.3rem; + position: absolute; + top: 0; + left: 0; + width: 100%; + line-height: 1.7; +} + +div[class*='language-'] .highlight-lines .highlighted { + background-color: rgba(0, 0, 0, 0.66); +} + +div[class*='language-'] pre, +div[class*='language-'] pre[class*='language-'] { + background: transparent; + position: relative; + z-index: 1; +} + +.content pre, +.content pre[class*='language-'] { + line-height: 1.4; + padding: 1.25rem 1.5rem; + margin: 0.85rem 0; + background-color: #282c34; + border-radius: 6px; + overflow: auto; +} + +.content pre[class*='language-'] code, +.content pre code { + color: #fff; + padding: 0; + background-color: transparent; + border-radius: 0; + line-height: 1.42857143; +} + +.token.atrule, +.token.builtin, +.token.important, +.token.keyword, +.token.selector { + color: #cc99cd; +} + +.token.punctuation { + color: #ccc; +} + +.token.boolean, +.token.function, +.token.number { + color: #f08d49; +} + +.token.attr-value, +.token.char, +.token.regex, +.token.string, +.token.variable { + color: #7ec699; +} + +.token.entity, +.token.operator, +.token.url { + color: #67cdcc; +} + +.token.block-comment, +.token.cdata, +.token.comment, +.token.doctype, +.token.prolog { + color: #999; +} + +.token.attr-name, +.token.deleted, +.token.namespace, +.token.tag { + color: #e2777a; +} + +.token.function-name { + color: #6196cc; +} + +.token.class-name, +.token.constant, +.token.property, +.token.symbol { + color: #f8c555; +} + +.token.bold, +.token.important { + font-weight: 700; +} + +.token.italic { + font-style: italic; +} + +.token.entity { + cursor: help; +} + +.token.inserted { + color: green; +} diff --git a/example/src/assets/tiny-mobile-demo.css b/example/src/assets/tiny-mobile-demo.css new file mode 100644 index 000000000..683382313 --- /dev/null +++ b/example/src/assets/tiny-mobile-demo.css @@ -0,0 +1,132 @@ +.content .tiny-mobile-tabbar-demo { + position: relative; + width: 100%; + height: 100%; +} +.content .tiny-mobile-tabbar-demo .tiny-mobile-tabbar--fixed { + position: absolute; +} +.content .tiny-mobile-dialog-box-demo { + position: relative; + height: 100%; + padding: 20px; +} +.content .tiny-mobile-dialog-box-demo .v-modal, +.content .tiny-mobile-dialog-box__wrapper { + position: absolute; +} +.content .tiny-mobile-dropdown-menu-demo { + height: 610px; + position: relative; +} +.content .tiny-mobile-dropdown-menu-demo.mobile-dropdown-menu-wrap { + height: auto; +} +.content .tiny-mobile-dropdown-menu-demo.mobile-dropdown-menu-direction { + height: 300px; + top: 380px; +} +.content .tiny-mobile-dropdown-menu-demo.mobile-dropdown-menu-filter { + justify-content: left; +} +.content .tiny-mobile-dropdown-menu-demo .tiny-mobile-dropdown-item { + position: absolute; + width: 351px; + left: 0; + top: 42px !important; +} +.content + .tiny-mobile-dropdown-menu-demo.mobile-dropdown-menu-direction + .tiny-mobile-dropdown-item { + position: fixed; + left: 0; + right: 648px; + bottom: 0 !important; + top: 40px !important; + overflow: inherit; +} +.content + .tiny-mobile-dropdown-menu-demo.mobile-dropdown-menu-direction + .tiny-mobile-dropdown-item__content { + position: relative; +} +.content + .tiny-mobile-dropdown-menu-demo.mobile-dropdown-menu-wrap + .tiny-mobile-dropdown-item { + overflow: visible; +} +.content .tiny-mobile-dropdown-menu-demo .tiny-popup { + width: 351px; +} +.content .tiny-mobile-dropdown-menu-demo.mobile-dropdown-menu-wrap .tiny-popup { + height: auto; + max-height: initial; +} +.content .tiny-mobile-dropdown-menu-demo .tiny-overlay { + position: absolute; +} +.content + .tiny-mobile-dropdown-menu-demo.mobile-dropdown-menu-direction + .tiny-overlay { + top: 407px !important; +} +.content .tiny-mobile-image-viewer-demo { + height: 100%; + position: relative; +} +.content .tiny-mobile-image-viewer-demo .tiny-mobile-image-viewer__wrapper { + position: absolute; +} +.content .tiny-mobile-exception-demo { + height: 610px; + background: #ccc; + position: relative; +} +.content .tiny-mobile-exception-demo .tiny-mobile-exception { + position: absolute; + z-index: 99; +} +.content .tiny-mobile-exception-demo .tiny-mobile-exception__footer { + position: absolute; +} +.tiny-mobile-action-sheet-demo { + width: 100%; + height: 100%; + position: relative; +} +.tiny-mobile-action-sheet-demo .tiny-mobile-action-sheet { + height: 100%; + position: relative; +} +.tiny-mobile-action-sheet-demo.action-sheet-wrap .tiny-mobile-action-sheet { + height: calc(100% - 180px); +} +.tiny-mobile-action-sheet-demo.action-sheet-slot .tiny-mobile-action-sheet { + height: calc(100% - 195px); +} +.tiny-mobile-action-sheet-demo .tiny-mobile-action-sheet__mask, +.tiny-mobile-action-sheet-demo .tiny-mobile-action-sheet__content { + position: absolute; + /* height: 100%; */ + bottom: 45px; +} +.tiny-mobile-mini-picker-demo { + width: 100%; + height: 100%; +} +.tiny-mobile-mini-picker-demo .tiny-mobile-mini-picker { + height: calc(100% - 48px); + position: relative; +} +.tiny-mobile-mini-picker-demo.mini-picker-wrap .tiny-mobile-mini-picker { + height: calc(100% - 200px); + position: relative; +} +.tiny-mobile-mini-picker-demo .tiny-mobile-button, +.tiny-mobile-mini-picker-demo .tiny-mobile-mini-picker__mask, +.tiny-mobile-mini-picker-demo .tiny-mobile-mini-picker__content { + position: absolute; +} +.tiny-mobile-mini-picker-demo .tiny-mobile-input-form__input { + text-align: right; +} diff --git a/example/src/components/Home.vue b/example/src/components/Home.vue new file mode 100644 index 000000000..61d18c8ca --- /dev/null +++ b/example/src/components/Home.vue @@ -0,0 +1,118 @@ + + + + + + + diff --git a/example/src/const.js b/example/src/const.js new file mode 100644 index 000000000..baa26cb76 --- /dev/null +++ b/example/src/const.js @@ -0,0 +1,16 @@ +import { tinyImpressionTheme, tinyInfinityTheme, tinyDeepTheme, tinyGalaxyTheme } from '@opentiny/vue-theme/theme' + +export const CURRENT_THEME_KEY = 'tiny-current-theme' +export const DEFAULT_THEME = 'tiny-default-theme' +export const IMPRESSION_THEME = 'tiny-impression-theme' +export const INFINITY_THEME = 'tiny-infinity-theme' +export const DEEP_THEME = 'tiny-deep-theme' +export const GALAXY_THEME = 'tiny-galaxy-theme' + +export const THEME_MAP = { + [DEFAULT_THEME]: null, + [IMPRESSION_THEME]: tinyImpressionTheme, + [INFINITY_THEME]: tinyInfinityTheme, + [DEEP_THEME]: tinyDeepTheme, + [GALAXY_THEME]: tinyGalaxyTheme +} diff --git a/example/src/demo/mobile/action-sheet/actionsheet.vue b/example/src/demo/mobile/action-sheet/actionsheet.vue new file mode 100644 index 000000000..737c4c74a --- /dev/null +++ b/example/src/demo/mobile/action-sheet/actionsheet.vue @@ -0,0 +1,76 @@ + + + + diff --git a/example/src/demo/mobile/action-sheet/clickfn.vue b/example/src/demo/mobile/action-sheet/clickfn.vue new file mode 100644 index 000000000..26b3161b5 --- /dev/null +++ b/example/src/demo/mobile/action-sheet/clickfn.vue @@ -0,0 +1,58 @@ + + + diff --git a/example/src/demo/mobile/action-sheet/ellipsis.vue b/example/src/demo/mobile/action-sheet/ellipsis.vue new file mode 100644 index 000000000..4b3c947cc --- /dev/null +++ b/example/src/demo/mobile/action-sheet/ellipsis.vue @@ -0,0 +1,55 @@ + + + diff --git a/example/src/demo/mobile/action-sheet/slot-action.vue b/example/src/demo/mobile/action-sheet/slot-action.vue new file mode 100644 index 000000000..cc1536c1e --- /dev/null +++ b/example/src/demo/mobile/action-sheet/slot-action.vue @@ -0,0 +1,83 @@ + + + + diff --git a/example/src/demo/mobile/action-sheet/slot-item.vue b/example/src/demo/mobile/action-sheet/slot-item.vue new file mode 100644 index 000000000..767cc6442 --- /dev/null +++ b/example/src/demo/mobile/action-sheet/slot-item.vue @@ -0,0 +1,79 @@ + + + + diff --git a/example/src/demo/mobile/alert/base.vue b/example/src/demo/mobile/alert/base.vue new file mode 100644 index 000000000..cf0944a01 --- /dev/null +++ b/example/src/demo/mobile/alert/base.vue @@ -0,0 +1,23 @@ + + + + diff --git a/example/src/demo/mobile/alert/custom-close.vue b/example/src/demo/mobile/alert/custom-close.vue new file mode 100644 index 000000000..6c37e31f5 --- /dev/null +++ b/example/src/demo/mobile/alert/custom-close.vue @@ -0,0 +1,28 @@ + + + + diff --git a/example/src/demo/mobile/alert/icon.vue b/example/src/demo/mobile/alert/icon.vue new file mode 100644 index 000000000..435458c02 --- /dev/null +++ b/example/src/demo/mobile/alert/icon.vue @@ -0,0 +1,26 @@ + + + + diff --git a/example/src/demo/mobile/alert/size.vue b/example/src/demo/mobile/alert/size.vue new file mode 100644 index 000000000..6cf62668b --- /dev/null +++ b/example/src/demo/mobile/alert/size.vue @@ -0,0 +1,22 @@ + + + + diff --git a/example/src/demo/mobile/alert/slot-default.vue b/example/src/demo/mobile/alert/slot-default.vue new file mode 100644 index 000000000..ac6f84c5d --- /dev/null +++ b/example/src/demo/mobile/alert/slot-default.vue @@ -0,0 +1,22 @@ + + + + diff --git a/example/src/demo/mobile/avatar/avatar-size.vue b/example/src/demo/mobile/avatar/avatar-size.vue new file mode 100644 index 000000000..b191595ba --- /dev/null +++ b/example/src/demo/mobile/avatar/avatar-size.vue @@ -0,0 +1,58 @@ + + + + diff --git a/example/src/demo/mobile/avatar/avatar-src-set.vue b/example/src/demo/mobile/avatar/avatar-src-set.vue new file mode 100644 index 000000000..16d175522 --- /dev/null +++ b/example/src/demo/mobile/avatar/avatar-src-set.vue @@ -0,0 +1,40 @@ + + + + diff --git a/example/src/demo/mobile/avatar/base.vue b/example/src/demo/mobile/avatar/base.vue new file mode 100644 index 000000000..c036406f6 --- /dev/null +++ b/example/src/demo/mobile/avatar/base.vue @@ -0,0 +1,97 @@ + + + + diff --git a/example/src/demo/mobile/badge/base.vue b/example/src/demo/mobile/badge/base.vue new file mode 100644 index 000000000..52a803cf2 --- /dev/null +++ b/example/src/demo/mobile/badge/base.vue @@ -0,0 +1,25 @@ + + + + diff --git a/example/src/demo/mobile/badge/content.vue b/example/src/demo/mobile/badge/content.vue new file mode 100644 index 000000000..3ad815a9d --- /dev/null +++ b/example/src/demo/mobile/badge/content.vue @@ -0,0 +1,28 @@ + + + + diff --git a/example/src/demo/mobile/badge/hidden.vue b/example/src/demo/mobile/badge/hidden.vue new file mode 100644 index 000000000..0175066ce --- /dev/null +++ b/example/src/demo/mobile/badge/hidden.vue @@ -0,0 +1,37 @@ + + + + diff --git a/example/src/demo/mobile/badge/href-target.vue b/example/src/demo/mobile/badge/href-target.vue new file mode 100644 index 000000000..22936f9f1 --- /dev/null +++ b/example/src/demo/mobile/badge/href-target.vue @@ -0,0 +1,31 @@ + + + + diff --git a/example/src/demo/mobile/badge/is-dot.vue b/example/src/demo/mobile/badge/is-dot.vue new file mode 100644 index 000000000..3c4fdcbf9 --- /dev/null +++ b/example/src/demo/mobile/badge/is-dot.vue @@ -0,0 +1,25 @@ + + + + diff --git a/example/src/demo/mobile/badge/is-mini.vue b/example/src/demo/mobile/badge/is-mini.vue new file mode 100644 index 000000000..5082aa863 --- /dev/null +++ b/example/src/demo/mobile/badge/is-mini.vue @@ -0,0 +1,27 @@ + + + + diff --git a/example/src/demo/mobile/badge/type.vue b/example/src/demo/mobile/badge/type.vue new file mode 100644 index 000000000..342c23786 --- /dev/null +++ b/example/src/demo/mobile/badge/type.vue @@ -0,0 +1,35 @@ + + + + diff --git a/example/src/demo/mobile/button/base.vue b/example/src/demo/mobile/button/base.vue new file mode 100644 index 000000000..f9d15d31f --- /dev/null +++ b/example/src/demo/mobile/button/base.vue @@ -0,0 +1,143 @@ + + + + + diff --git a/example/src/demo/mobile/button/event-click.vue b/example/src/demo/mobile/button/event-click.vue new file mode 100644 index 000000000..6fa2af88a --- /dev/null +++ b/example/src/demo/mobile/button/event-click.vue @@ -0,0 +1,30 @@ + + + + + diff --git a/example/src/demo/mobile/button/icon.vue b/example/src/demo/mobile/button/icon.vue new file mode 100644 index 000000000..d53e51889 --- /dev/null +++ b/example/src/demo/mobile/button/icon.vue @@ -0,0 +1,48 @@ + + + + + diff --git a/example/src/demo/mobile/button/loading.vue b/example/src/demo/mobile/button/loading.vue new file mode 100644 index 000000000..3a9fa65d4 --- /dev/null +++ b/example/src/demo/mobile/button/loading.vue @@ -0,0 +1,33 @@ + + + + + diff --git a/example/src/demo/mobile/button/native-type.vue b/example/src/demo/mobile/button/native-type.vue new file mode 100644 index 000000000..4deffd61c --- /dev/null +++ b/example/src/demo/mobile/button/native-type.vue @@ -0,0 +1,100 @@ + + + + + + + diff --git a/example/src/demo/mobile/button/plain.vue b/example/src/demo/mobile/button/plain.vue new file mode 100644 index 000000000..b4851d789 --- /dev/null +++ b/example/src/demo/mobile/button/plain.vue @@ -0,0 +1,33 @@ + + + + + diff --git a/example/src/demo/mobile/button/reset-time.vue b/example/src/demo/mobile/button/reset-time.vue new file mode 100644 index 000000000..52b92af89 --- /dev/null +++ b/example/src/demo/mobile/button/reset-time.vue @@ -0,0 +1,30 @@ + + + + + diff --git a/example/src/demo/mobile/button/round.vue b/example/src/demo/mobile/button/round.vue new file mode 100644 index 000000000..ed94623f8 --- /dev/null +++ b/example/src/demo/mobile/button/round.vue @@ -0,0 +1,33 @@ + + + + + diff --git a/example/src/demo/mobile/button/size.vue b/example/src/demo/mobile/button/size.vue new file mode 100644 index 000000000..deaffa8be --- /dev/null +++ b/example/src/demo/mobile/button/size.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/example/src/demo/mobile/button/text.vue b/example/src/demo/mobile/button/text.vue new file mode 100644 index 000000000..8b1219ecd --- /dev/null +++ b/example/src/demo/mobile/button/text.vue @@ -0,0 +1,28 @@ + + + + + diff --git a/example/src/demo/mobile/checkbox-group/base.vue b/example/src/demo/mobile/checkbox-group/base.vue new file mode 100644 index 000000000..53bf8d464 --- /dev/null +++ b/example/src/demo/mobile/checkbox-group/base.vue @@ -0,0 +1,35 @@ + + + + + diff --git a/example/src/demo/mobile/checkbox-group/disabled.vue b/example/src/demo/mobile/checkbox-group/disabled.vue new file mode 100644 index 000000000..f81bb5403 --- /dev/null +++ b/example/src/demo/mobile/checkbox-group/disabled.vue @@ -0,0 +1,36 @@ + + + + + diff --git a/example/src/demo/mobile/checkbox-group/event-change.vue b/example/src/demo/mobile/checkbox-group/event-change.vue new file mode 100644 index 000000000..5e1fcd6c5 --- /dev/null +++ b/example/src/demo/mobile/checkbox-group/event-change.vue @@ -0,0 +1,40 @@ + + + + + diff --git a/example/src/demo/mobile/checkbox-group/min-max.vue b/example/src/demo/mobile/checkbox-group/min-max.vue new file mode 100644 index 000000000..db4a471f9 --- /dev/null +++ b/example/src/demo/mobile/checkbox-group/min-max.vue @@ -0,0 +1,35 @@ + + + + + diff --git a/example/src/demo/mobile/checkbox-group/vertical.vue b/example/src/demo/mobile/checkbox-group/vertical.vue new file mode 100644 index 000000000..98726034f --- /dev/null +++ b/example/src/demo/mobile/checkbox-group/vertical.vue @@ -0,0 +1,35 @@ + + + + + diff --git a/example/src/demo/mobile/checkbox/base.vue b/example/src/demo/mobile/checkbox/base.vue new file mode 100644 index 000000000..d434b352b --- /dev/null +++ b/example/src/demo/mobile/checkbox/base.vue @@ -0,0 +1,99 @@ + + + + diff --git a/example/src/demo/mobile/checkbox/default.vue b/example/src/demo/mobile/checkbox/default.vue new file mode 100644 index 000000000..fd1c97014 --- /dev/null +++ b/example/src/demo/mobile/checkbox/default.vue @@ -0,0 +1,36 @@ + + + + + diff --git a/example/src/demo/mobile/checkbox/event-change.vue b/example/src/demo/mobile/checkbox/event-change.vue new file mode 100644 index 000000000..39f5c1395 --- /dev/null +++ b/example/src/demo/mobile/checkbox/event-change.vue @@ -0,0 +1,32 @@ + + + + diff --git a/example/src/demo/mobile/checkbox/indeterminate.vue b/example/src/demo/mobile/checkbox/indeterminate.vue new file mode 100644 index 000000000..94c229618 --- /dev/null +++ b/example/src/demo/mobile/checkbox/indeterminate.vue @@ -0,0 +1,67 @@ + + + + diff --git a/example/src/demo/mobile/checkbox/label.vue b/example/src/demo/mobile/checkbox/label.vue new file mode 100644 index 000000000..f204d1975 --- /dev/null +++ b/example/src/demo/mobile/checkbox/label.vue @@ -0,0 +1,31 @@ + + + + diff --git a/example/src/demo/mobile/checkbox/true-false-label.vue b/example/src/demo/mobile/checkbox/true-false-label.vue new file mode 100644 index 000000000..c9d28df79 --- /dev/null +++ b/example/src/demo/mobile/checkbox/true-false-label.vue @@ -0,0 +1,29 @@ + + + + diff --git a/example/src/demo/mobile/components.js b/example/src/demo/mobile/components.js new file mode 100644 index 000000000..d9cde9704 --- /dev/null +++ b/example/src/demo/mobile/components.js @@ -0,0 +1,13 @@ +export default { + alert: { + Attributes: { + type: 'base' + }, + Events: { + close: 'base' + }, + Slots: { + default: 'base' + } + } +} diff --git a/example/src/demo/mobile/dialog-box/append-to-body.vue b/example/src/demo/mobile/dialog-box/append-to-body.vue new file mode 100644 index 000000000..c5d1b5f55 --- /dev/null +++ b/example/src/demo/mobile/dialog-box/append-to-body.vue @@ -0,0 +1,31 @@ + + + diff --git a/example/src/demo/mobile/dialog-box/base.vue b/example/src/demo/mobile/dialog-box/base.vue new file mode 100644 index 000000000..f8f398adf --- /dev/null +++ b/example/src/demo/mobile/dialog-box/base.vue @@ -0,0 +1,103 @@ + + + + diff --git a/example/src/demo/mobile/dialog-box/cancel-confirm.vue b/example/src/demo/mobile/dialog-box/cancel-confirm.vue new file mode 100644 index 000000000..c850e32cb --- /dev/null +++ b/example/src/demo/mobile/dialog-box/cancel-confirm.vue @@ -0,0 +1,49 @@ + + + diff --git a/example/src/demo/mobile/dialog-box/close-on-click-modal.vue b/example/src/demo/mobile/dialog-box/close-on-click-modal.vue new file mode 100644 index 000000000..2e73c4bf6 --- /dev/null +++ b/example/src/demo/mobile/dialog-box/close-on-click-modal.vue @@ -0,0 +1,32 @@ + + + diff --git a/example/src/demo/mobile/dialog-box/events-open-close.vue b/example/src/demo/mobile/dialog-box/events-open-close.vue new file mode 100644 index 000000000..9176317b0 --- /dev/null +++ b/example/src/demo/mobile/dialog-box/events-open-close.vue @@ -0,0 +1,49 @@ + + + diff --git a/example/src/demo/mobile/dialog-box/lock-scroll.vue b/example/src/demo/mobile/dialog-box/lock-scroll.vue new file mode 100644 index 000000000..0f7a08df5 --- /dev/null +++ b/example/src/demo/mobile/dialog-box/lock-scroll.vue @@ -0,0 +1,32 @@ + + + diff --git a/example/src/demo/mobile/dialog-box/show-header.vue b/example/src/demo/mobile/dialog-box/show-header.vue new file mode 100644 index 000000000..48364596c --- /dev/null +++ b/example/src/demo/mobile/dialog-box/show-header.vue @@ -0,0 +1,32 @@ + + + diff --git a/example/src/demo/mobile/dialog-box/slot-footer.vue b/example/src/demo/mobile/dialog-box/slot-footer.vue new file mode 100644 index 000000000..ab08850d5 --- /dev/null +++ b/example/src/demo/mobile/dialog-box/slot-footer.vue @@ -0,0 +1,36 @@ + + + diff --git a/example/src/demo/mobile/dialog-box/slot-title.vue b/example/src/demo/mobile/dialog-box/slot-title.vue new file mode 100644 index 000000000..6d573bc87 --- /dev/null +++ b/example/src/demo/mobile/dialog-box/slot-title.vue @@ -0,0 +1,36 @@ + + + diff --git a/example/src/demo/mobile/dialog-box/with-input.vue b/example/src/demo/mobile/dialog-box/with-input.vue new file mode 100644 index 000000000..deb0f2b45 --- /dev/null +++ b/example/src/demo/mobile/dialog-box/with-input.vue @@ -0,0 +1,69 @@ + + + + diff --git a/example/src/demo/mobile/dropdown-menu/activeColor.vue b/example/src/demo/mobile/dropdown-menu/activeColor.vue new file mode 100644 index 000000000..237955335 --- /dev/null +++ b/example/src/demo/mobile/dropdown-menu/activeColor.vue @@ -0,0 +1,70 @@ + + + diff --git a/example/src/demo/mobile/dropdown-menu/closeOnClickOutside.vue b/example/src/demo/mobile/dropdown-menu/closeOnClickOutside.vue new file mode 100644 index 000000000..f57331b88 --- /dev/null +++ b/example/src/demo/mobile/dropdown-menu/closeOnClickOutside.vue @@ -0,0 +1,76 @@ + + + diff --git a/example/src/demo/mobile/dropdown-menu/closeOnClickOverlay.vue b/example/src/demo/mobile/dropdown-menu/closeOnClickOverlay.vue new file mode 100644 index 000000000..770b478ec --- /dev/null +++ b/example/src/demo/mobile/dropdown-menu/closeOnClickOverlay.vue @@ -0,0 +1,76 @@ + + + diff --git a/example/src/demo/mobile/dropdown-menu/direction.vue b/example/src/demo/mobile/dropdown-menu/direction.vue new file mode 100644 index 000000000..5d523b9c2 --- /dev/null +++ b/example/src/demo/mobile/dropdown-menu/direction.vue @@ -0,0 +1,76 @@ + + + diff --git a/example/src/demo/mobile/dropdown-menu/dropdown-filter.vue b/example/src/demo/mobile/dropdown-menu/dropdown-filter.vue new file mode 100644 index 000000000..3788ded6d --- /dev/null +++ b/example/src/demo/mobile/dropdown-menu/dropdown-filter.vue @@ -0,0 +1,95 @@ + + + + diff --git a/example/src/demo/mobile/dropdown-menu/duration.vue b/example/src/demo/mobile/dropdown-menu/duration.vue new file mode 100644 index 000000000..1c91395a8 --- /dev/null +++ b/example/src/demo/mobile/dropdown-menu/duration.vue @@ -0,0 +1,76 @@ + + + diff --git a/example/src/demo/mobile/dropdown-menu/event.vue b/example/src/demo/mobile/dropdown-menu/event.vue new file mode 100644 index 000000000..7fd4cabbe --- /dev/null +++ b/example/src/demo/mobile/dropdown-menu/event.vue @@ -0,0 +1,107 @@ + + + diff --git a/example/src/demo/mobile/dropdown-menu/icon.vue b/example/src/demo/mobile/dropdown-menu/icon.vue new file mode 100644 index 000000000..c6d4b31e9 --- /dev/null +++ b/example/src/demo/mobile/dropdown-menu/icon.vue @@ -0,0 +1,34 @@ + + + diff --git a/example/src/demo/mobile/dropdown-menu/item-disabled.vue b/example/src/demo/mobile/dropdown-menu/item-disabled.vue new file mode 100644 index 000000000..e01628ab7 --- /dev/null +++ b/example/src/demo/mobile/dropdown-menu/item-disabled.vue @@ -0,0 +1,77 @@ + + + diff --git a/example/src/demo/mobile/dropdown-menu/overlay.vue b/example/src/demo/mobile/dropdown-menu/overlay.vue new file mode 100644 index 000000000..829c33dbe --- /dev/null +++ b/example/src/demo/mobile/dropdown-menu/overlay.vue @@ -0,0 +1,71 @@ + + + diff --git a/example/src/demo/mobile/dropdown-menu/screen-funnel.vue b/example/src/demo/mobile/dropdown-menu/screen-funnel.vue new file mode 100644 index 000000000..0fcb2dc53 --- /dev/null +++ b/example/src/demo/mobile/dropdown-menu/screen-funnel.vue @@ -0,0 +1,104 @@ + + + + diff --git a/example/src/demo/mobile/dropdown-menu/slot.vue b/example/src/demo/mobile/dropdown-menu/slot.vue new file mode 100644 index 000000000..5358a0062 --- /dev/null +++ b/example/src/demo/mobile/dropdown-menu/slot.vue @@ -0,0 +1,92 @@ + + + + + diff --git a/example/src/demo/mobile/dropdown-menu/title-class.vue b/example/src/demo/mobile/dropdown-menu/title-class.vue new file mode 100644 index 000000000..5c10436c1 --- /dev/null +++ b/example/src/demo/mobile/dropdown-menu/title-class.vue @@ -0,0 +1,105 @@ + + + + diff --git a/example/src/demo/mobile/dropdown-menu/type.vue b/example/src/demo/mobile/dropdown-menu/type.vue new file mode 100644 index 000000000..aae06f34c --- /dev/null +++ b/example/src/demo/mobile/dropdown-menu/type.vue @@ -0,0 +1,77 @@ + + + diff --git a/example/src/demo/mobile/exception/buttonText.vue b/example/src/demo/mobile/exception/buttonText.vue new file mode 100644 index 000000000..ffd922f66 --- /dev/null +++ b/example/src/demo/mobile/exception/buttonText.vue @@ -0,0 +1,23 @@ + + + diff --git a/example/src/demo/mobile/exception/exceptionClass.vue b/example/src/demo/mobile/exception/exceptionClass.vue new file mode 100644 index 000000000..a9ca63c24 --- /dev/null +++ b/example/src/demo/mobile/exception/exceptionClass.vue @@ -0,0 +1,23 @@ + + + diff --git a/example/src/demo/mobile/exception/message.vue b/example/src/demo/mobile/exception/message.vue new file mode 100644 index 000000000..4a307f950 --- /dev/null +++ b/example/src/demo/mobile/exception/message.vue @@ -0,0 +1,27 @@ + + + diff --git a/example/src/demo/mobile/exception/mobileexception.vue b/example/src/demo/mobile/exception/mobileexception.vue new file mode 100644 index 000000000..60f434ea5 --- /dev/null +++ b/example/src/demo/mobile/exception/mobileexception.vue @@ -0,0 +1,136 @@ + + + + diff --git a/example/src/demo/mobile/exception/subMessage.vue b/example/src/demo/mobile/exception/subMessage.vue new file mode 100644 index 000000000..f5c34ae14 --- /dev/null +++ b/example/src/demo/mobile/exception/subMessage.vue @@ -0,0 +1,19 @@ + + + diff --git a/example/src/demo/mobile/exception/type.vue b/example/src/demo/mobile/exception/type.vue new file mode 100644 index 000000000..4e47a0f60 --- /dev/null +++ b/example/src/demo/mobile/exception/type.vue @@ -0,0 +1,23 @@ + + + diff --git a/example/src/demo/mobile/file-upload/abort-quest.vue b/example/src/demo/mobile/file-upload/abort-quest.vue new file mode 100644 index 000000000..6eae04c26 --- /dev/null +++ b/example/src/demo/mobile/file-upload/abort-quest.vue @@ -0,0 +1,36 @@ + + + diff --git a/example/src/demo/mobile/file-upload/accept-file-image.vue b/example/src/demo/mobile/file-upload/accept-file-image.vue new file mode 100644 index 000000000..330453b98 --- /dev/null +++ b/example/src/demo/mobile/file-upload/accept-file-image.vue @@ -0,0 +1,24 @@ + + + diff --git a/example/src/demo/mobile/file-upload/accept-file-type.vue b/example/src/demo/mobile/file-upload/accept-file-type.vue new file mode 100644 index 000000000..c15497b10 --- /dev/null +++ b/example/src/demo/mobile/file-upload/accept-file-type.vue @@ -0,0 +1,34 @@ + + + diff --git a/example/src/demo/mobile/file-upload/accept-file.vue b/example/src/demo/mobile/file-upload/accept-file.vue new file mode 100644 index 000000000..f89d7792a --- /dev/null +++ b/example/src/demo/mobile/file-upload/accept-file.vue @@ -0,0 +1,25 @@ + + + diff --git a/example/src/demo/mobile/file-upload/base.vue b/example/src/demo/mobile/file-upload/base.vue new file mode 100644 index 000000000..4e776ab3a --- /dev/null +++ b/example/src/demo/mobile/file-upload/base.vue @@ -0,0 +1,50 @@ + + + + diff --git a/example/src/demo/mobile/file-upload/basic-usage.vue b/example/src/demo/mobile/file-upload/basic-usage.vue new file mode 100644 index 000000000..2539f44f9 --- /dev/null +++ b/example/src/demo/mobile/file-upload/basic-usage.vue @@ -0,0 +1,46 @@ + + + + diff --git a/example/src/demo/mobile/file-upload/clear-files.vue b/example/src/demo/mobile/file-upload/clear-files.vue new file mode 100644 index 000000000..cf500b4d5 --- /dev/null +++ b/example/src/demo/mobile/file-upload/clear-files.vue @@ -0,0 +1,44 @@ + + + diff --git a/example/src/demo/mobile/file-upload/custom-prefix.vue b/example/src/demo/mobile/file-upload/custom-prefix.vue new file mode 100644 index 000000000..c2b62d537 --- /dev/null +++ b/example/src/demo/mobile/file-upload/custom-prefix.vue @@ -0,0 +1,46 @@ + + + diff --git a/example/src/demo/mobile/file-upload/custom-trigger.vue b/example/src/demo/mobile/file-upload/custom-trigger.vue new file mode 100644 index 000000000..3964cc0e5 --- /dev/null +++ b/example/src/demo/mobile/file-upload/custom-trigger.vue @@ -0,0 +1,23 @@ + + + diff --git a/example/src/demo/mobile/file-upload/custom-upload-request.vue b/example/src/demo/mobile/file-upload/custom-upload-request.vue new file mode 100644 index 000000000..01e4e621e --- /dev/null +++ b/example/src/demo/mobile/file-upload/custom-upload-request.vue @@ -0,0 +1,40 @@ + + + diff --git a/example/src/demo/mobile/file-upload/custom-upload-tip.vue b/example/src/demo/mobile/file-upload/custom-upload-tip.vue new file mode 100644 index 000000000..b88c24f34 --- /dev/null +++ b/example/src/demo/mobile/file-upload/custom-upload-tip.vue @@ -0,0 +1,25 @@ + + + diff --git a/example/src/demo/mobile/file-upload/data.vue b/example/src/demo/mobile/file-upload/data.vue new file mode 100644 index 000000000..9a7681095 --- /dev/null +++ b/example/src/demo/mobile/file-upload/data.vue @@ -0,0 +1,54 @@ + + + + diff --git a/example/src/demo/mobile/file-upload/drag-select-file.vue b/example/src/demo/mobile/file-upload/drag-select-file.vue new file mode 100644 index 000000000..39680b14c --- /dev/null +++ b/example/src/demo/mobile/file-upload/drag-select-file.vue @@ -0,0 +1,41 @@ + + + diff --git a/example/src/demo/mobile/file-upload/drag-upload.vue b/example/src/demo/mobile/file-upload/drag-upload.vue new file mode 100644 index 000000000..9b37786f1 --- /dev/null +++ b/example/src/demo/mobile/file-upload/drag-upload.vue @@ -0,0 +1,35 @@ + + + diff --git a/example/src/demo/mobile/file-upload/dynamic-disable.vue b/example/src/demo/mobile/file-upload/dynamic-disable.vue new file mode 100644 index 000000000..db33c07bc --- /dev/null +++ b/example/src/demo/mobile/file-upload/dynamic-disable.vue @@ -0,0 +1,29 @@ + + + diff --git a/example/src/demo/mobile/file-upload/file-icon-list.vue b/example/src/demo/mobile/file-upload/file-icon-list.vue new file mode 100644 index 000000000..be2389b0b --- /dev/null +++ b/example/src/demo/mobile/file-upload/file-icon-list.vue @@ -0,0 +1,48 @@ + + + diff --git a/example/src/demo/mobile/file-upload/file-picture-card.vue b/example/src/demo/mobile/file-upload/file-picture-card.vue new file mode 100644 index 000000000..3e4605bf8 --- /dev/null +++ b/example/src/demo/mobile/file-upload/file-picture-card.vue @@ -0,0 +1,76 @@ + + + diff --git a/example/src/demo/mobile/file-upload/file-title.vue b/example/src/demo/mobile/file-upload/file-title.vue new file mode 100644 index 000000000..72dfddb1b --- /dev/null +++ b/example/src/demo/mobile/file-upload/file-title.vue @@ -0,0 +1,30 @@ + + + diff --git a/example/src/demo/mobile/file-upload/header-show.vue b/example/src/demo/mobile/file-upload/header-show.vue new file mode 100644 index 000000000..de8ed9559 --- /dev/null +++ b/example/src/demo/mobile/file-upload/header-show.vue @@ -0,0 +1,29 @@ + + + diff --git a/example/src/demo/mobile/file-upload/image-size.vue b/example/src/demo/mobile/file-upload/image-size.vue new file mode 100644 index 000000000..897925b18 --- /dev/null +++ b/example/src/demo/mobile/file-upload/image-size.vue @@ -0,0 +1,48 @@ + + + diff --git a/example/src/demo/mobile/file-upload/jalor-request.vue b/example/src/demo/mobile/file-upload/jalor-request.vue new file mode 100644 index 000000000..43f6bc784 --- /dev/null +++ b/example/src/demo/mobile/file-upload/jalor-request.vue @@ -0,0 +1,27 @@ + + + diff --git a/example/src/demo/mobile/file-upload/manual-upload.vue b/example/src/demo/mobile/file-upload/manual-upload.vue new file mode 100644 index 000000000..e772df3a1 --- /dev/null +++ b/example/src/demo/mobile/file-upload/manual-upload.vue @@ -0,0 +1,39 @@ + + + diff --git a/example/src/demo/mobile/file-upload/max-file-count.vue b/example/src/demo/mobile/file-upload/max-file-count.vue new file mode 100644 index 000000000..3d27e8073 --- /dev/null +++ b/example/src/demo/mobile/file-upload/max-file-count.vue @@ -0,0 +1,25 @@ + + + diff --git a/example/src/demo/mobile/file-upload/mini-mode.vue b/example/src/demo/mobile/file-upload/mini-mode.vue new file mode 100644 index 000000000..31e475b50 --- /dev/null +++ b/example/src/demo/mobile/file-upload/mini-mode.vue @@ -0,0 +1,30 @@ + + + diff --git a/example/src/demo/mobile/file-upload/multiple-file.vue b/example/src/demo/mobile/file-upload/multiple-file.vue new file mode 100644 index 000000000..955c8921b --- /dev/null +++ b/example/src/demo/mobile/file-upload/multiple-file.vue @@ -0,0 +1,24 @@ + + + diff --git a/example/src/demo/mobile/file-upload/picture-card.vue b/example/src/demo/mobile/file-upload/picture-card.vue new file mode 100644 index 000000000..e2f8c03c9 --- /dev/null +++ b/example/src/demo/mobile/file-upload/picture-card.vue @@ -0,0 +1,88 @@ + + + + diff --git a/example/src/demo/mobile/file-upload/picture-list.vue b/example/src/demo/mobile/file-upload/picture-list.vue new file mode 100644 index 000000000..db71bc3b9 --- /dev/null +++ b/example/src/demo/mobile/file-upload/picture-list.vue @@ -0,0 +1,32 @@ + + + diff --git a/example/src/demo/mobile/file-upload/prevent-delete-file.vue b/example/src/demo/mobile/file-upload/prevent-delete-file.vue new file mode 100644 index 000000000..56b276bc4 --- /dev/null +++ b/example/src/demo/mobile/file-upload/prevent-delete-file.vue @@ -0,0 +1,41 @@ + + + diff --git a/example/src/demo/mobile/file-upload/prevent-upload-file.vue b/example/src/demo/mobile/file-upload/prevent-upload-file.vue new file mode 100644 index 000000000..9323a1083 --- /dev/null +++ b/example/src/demo/mobile/file-upload/prevent-upload-file.vue @@ -0,0 +1,41 @@ + + + diff --git a/example/src/demo/mobile/file-upload/size.vue b/example/src/demo/mobile/file-upload/size.vue new file mode 100644 index 000000000..12220f736 --- /dev/null +++ b/example/src/demo/mobile/file-upload/size.vue @@ -0,0 +1,28 @@ + + + diff --git a/example/src/demo/mobile/file-upload/upload-events.vue b/example/src/demo/mobile/file-upload/upload-events.vue new file mode 100644 index 000000000..978f82515 --- /dev/null +++ b/example/src/demo/mobile/file-upload/upload-events.vue @@ -0,0 +1,71 @@ + + + diff --git a/example/src/demo/mobile/file-upload/upload-file-filters.vue b/example/src/demo/mobile/file-upload/upload-file-filters.vue new file mode 100644 index 000000000..b32669407 --- /dev/null +++ b/example/src/demo/mobile/file-upload/upload-file-filters.vue @@ -0,0 +1,42 @@ + + + diff --git a/example/src/demo/mobile/file-upload/upload-file-list.vue b/example/src/demo/mobile/file-upload/upload-file-list.vue new file mode 100644 index 000000000..7d7a777f6 --- /dev/null +++ b/example/src/demo/mobile/file-upload/upload-file-list.vue @@ -0,0 +1,34 @@ + + + diff --git a/example/src/demo/mobile/file-upload/upload-http-request.vue b/example/src/demo/mobile/file-upload/upload-http-request.vue new file mode 100644 index 000000000..ee94de725 --- /dev/null +++ b/example/src/demo/mobile/file-upload/upload-http-request.vue @@ -0,0 +1,39 @@ + + + diff --git a/example/src/demo/mobile/file-upload/upload-limit.vue b/example/src/demo/mobile/file-upload/upload-limit.vue new file mode 100644 index 000000000..86996cd8c --- /dev/null +++ b/example/src/demo/mobile/file-upload/upload-limit.vue @@ -0,0 +1,38 @@ + + + diff --git a/example/src/demo/mobile/file-upload/upload-request.vue b/example/src/demo/mobile/file-upload/upload-request.vue new file mode 100644 index 000000000..9b2d53dcd --- /dev/null +++ b/example/src/demo/mobile/file-upload/upload-request.vue @@ -0,0 +1,40 @@ + + + diff --git a/example/src/demo/mobile/file-upload/upload-user-head.vue b/example/src/demo/mobile/file-upload/upload-user-head.vue new file mode 100644 index 000000000..70795ba07 --- /dev/null +++ b/example/src/demo/mobile/file-upload/upload-user-head.vue @@ -0,0 +1,48 @@ + + + + diff --git a/example/src/demo/mobile/file-upload/with-credentials.vue b/example/src/demo/mobile/file-upload/with-credentials.vue new file mode 100644 index 000000000..2e9314acf --- /dev/null +++ b/example/src/demo/mobile/file-upload/with-credentials.vue @@ -0,0 +1,29 @@ + + + diff --git a/example/src/demo/mobile/form/base.vue b/example/src/demo/mobile/form/base.vue new file mode 100644 index 000000000..e7e67fc43 --- /dev/null +++ b/example/src/demo/mobile/form/base.vue @@ -0,0 +1,136 @@ + + + + + + + diff --git a/example/src/demo/mobile/form/form-label-suffix.vue b/example/src/demo/mobile/form/form-label-suffix.vue new file mode 100644 index 000000000..7588000e7 --- /dev/null +++ b/example/src/demo/mobile/form/form-label-suffix.vue @@ -0,0 +1,126 @@ + + + + + + + diff --git a/example/src/demo/mobile/form/form-select.vue b/example/src/demo/mobile/form/form-select.vue new file mode 100644 index 000000000..88ece8348 --- /dev/null +++ b/example/src/demo/mobile/form/form-select.vue @@ -0,0 +1,228 @@ + + + + + + + diff --git a/example/src/demo/mobile/form/form-tabselect.vue b/example/src/demo/mobile/form/form-tabselect.vue new file mode 100644 index 000000000..b8266120e --- /dev/null +++ b/example/src/demo/mobile/form/form-tabselect.vue @@ -0,0 +1,199 @@ + + + + + diff --git a/example/src/demo/mobile/form/form-writeone.vue b/example/src/demo/mobile/form/form-writeone.vue new file mode 100644 index 000000000..098166a34 --- /dev/null +++ b/example/src/demo/mobile/form/form-writeone.vue @@ -0,0 +1,165 @@ + + + + + + diff --git a/example/src/demo/mobile/form/form-writetwo.vue b/example/src/demo/mobile/form/form-writetwo.vue new file mode 100644 index 000000000..9b8d9fa20 --- /dev/null +++ b/example/src/demo/mobile/form/form-writetwo.vue @@ -0,0 +1,123 @@ + + + + diff --git a/example/src/demo/mobile/form/hide-required-asterisk.vue b/example/src/demo/mobile/form/hide-required-asterisk.vue new file mode 100644 index 000000000..8a01f200b --- /dev/null +++ b/example/src/demo/mobile/form/hide-required-asterisk.vue @@ -0,0 +1,143 @@ + + + + + + + diff --git a/example/src/demo/mobile/form/label-width.vue b/example/src/demo/mobile/form/label-width.vue new file mode 100644 index 000000000..c78fc3054 --- /dev/null +++ b/example/src/demo/mobile/form/label-width.vue @@ -0,0 +1,140 @@ + + + + + + + diff --git a/example/src/demo/mobile/form/only-read.vue b/example/src/demo/mobile/form/only-read.vue new file mode 100644 index 000000000..5f7ffb3e5 --- /dev/null +++ b/example/src/demo/mobile/form/only-read.vue @@ -0,0 +1,243 @@ + + + + + + + diff --git a/example/src/demo/mobile/form/validate-position.vue b/example/src/demo/mobile/form/validate-position.vue new file mode 100644 index 000000000..6a89fceb2 --- /dev/null +++ b/example/src/demo/mobile/form/validate-position.vue @@ -0,0 +1,138 @@ + + + + + + + diff --git a/example/src/demo/mobile/form/validate.vue b/example/src/demo/mobile/form/validate.vue new file mode 100644 index 000000000..0721b79d7 --- /dev/null +++ b/example/src/demo/mobile/form/validate.vue @@ -0,0 +1,157 @@ + + + + + + + diff --git a/example/src/demo/mobile/icon/base.vue b/example/src/demo/mobile/icon/base.vue new file mode 100644 index 000000000..0d9bf7f25 --- /dev/null +++ b/example/src/demo/mobile/icon/base.vue @@ -0,0 +1,88 @@ + + + + diff --git a/example/src/demo/mobile/icon/icon-set.vue b/example/src/demo/mobile/icon/icon-set.vue new file mode 100644 index 000000000..17beccde4 --- /dev/null +++ b/example/src/demo/mobile/icon/icon-set.vue @@ -0,0 +1,169 @@ + + + + diff --git a/example/src/demo/mobile/image-viewer/base.vue b/example/src/demo/mobile/image-viewer/base.vue new file mode 100644 index 000000000..72f87fd41 --- /dev/null +++ b/example/src/demo/mobile/image-viewer/base.vue @@ -0,0 +1,36 @@ + + + diff --git a/example/src/demo/mobile/image-viewer/events-change-close.vue b/example/src/demo/mobile/image-viewer/events-change-close.vue new file mode 100644 index 000000000..7e9bd9325 --- /dev/null +++ b/example/src/demo/mobile/image-viewer/events-change-close.vue @@ -0,0 +1,43 @@ + + + diff --git a/example/src/demo/mobile/image-viewer/image-full-current.vue b/example/src/demo/mobile/image-viewer/image-full-current.vue new file mode 100644 index 000000000..46ca1f2d4 --- /dev/null +++ b/example/src/demo/mobile/image-viewer/image-full-current.vue @@ -0,0 +1,35 @@ + + + diff --git a/example/src/demo/mobile/image-viewer/slot-index.vue b/example/src/demo/mobile/image-viewer/slot-index.vue new file mode 100644 index 000000000..ffd2a1d02 --- /dev/null +++ b/example/src/demo/mobile/image-viewer/slot-index.vue @@ -0,0 +1,41 @@ + + + diff --git a/example/src/demo/mobile/image-viewer/start-position.vue b/example/src/demo/mobile/image-viewer/start-position.vue new file mode 100644 index 000000000..1b8d33c7c --- /dev/null +++ b/example/src/demo/mobile/image-viewer/start-position.vue @@ -0,0 +1,36 @@ + + + diff --git a/example/src/demo/mobile/index.js b/example/src/demo/mobile/index.js new file mode 100644 index 000000000..fdac448c9 --- /dev/null +++ b/example/src/demo/mobile/index.js @@ -0,0 +1,4 @@ +import Components from './components' + +export const getDemoCode = ({ component, type: typeStr, name }) => + `${component}/${Components[component][typeStr][name]}` diff --git a/example/src/demo/mobile/input/autofocus.vue b/example/src/demo/mobile/input/autofocus.vue new file mode 100644 index 000000000..9465c8625 --- /dev/null +++ b/example/src/demo/mobile/input/autofocus.vue @@ -0,0 +1,36 @@ + + + + + diff --git a/example/src/demo/mobile/input/autosize.vue b/example/src/demo/mobile/input/autosize.vue new file mode 100644 index 000000000..37805643a --- /dev/null +++ b/example/src/demo/mobile/input/autosize.vue @@ -0,0 +1,38 @@ + + + + diff --git a/example/src/demo/mobile/input/base.vue b/example/src/demo/mobile/input/base.vue new file mode 100644 index 000000000..d4772fae0 --- /dev/null +++ b/example/src/demo/mobile/input/base.vue @@ -0,0 +1,78 @@ + + + + diff --git a/example/src/demo/mobile/input/blur-focus.vue b/example/src/demo/mobile/input/blur-focus.vue new file mode 100644 index 000000000..f63e6688e --- /dev/null +++ b/example/src/demo/mobile/input/blur-focus.vue @@ -0,0 +1,39 @@ + + + + diff --git a/example/src/demo/mobile/input/clearable.vue b/example/src/demo/mobile/input/clearable.vue new file mode 100644 index 000000000..ed7b0c3f2 --- /dev/null +++ b/example/src/demo/mobile/input/clearable.vue @@ -0,0 +1,27 @@ + + + + diff --git a/example/src/demo/mobile/input/cols-rows.vue b/example/src/demo/mobile/input/cols-rows.vue new file mode 100644 index 000000000..2e2bdb4bb --- /dev/null +++ b/example/src/demo/mobile/input/cols-rows.vue @@ -0,0 +1,32 @@ + + + + diff --git a/example/src/demo/mobile/input/counter.vue b/example/src/demo/mobile/input/counter.vue new file mode 100644 index 000000000..4c346cb90 --- /dev/null +++ b/example/src/demo/mobile/input/counter.vue @@ -0,0 +1,33 @@ + + + + diff --git a/example/src/demo/mobile/input/events.vue b/example/src/demo/mobile/input/events.vue new file mode 100644 index 000000000..c765e022d --- /dev/null +++ b/example/src/demo/mobile/input/events.vue @@ -0,0 +1,40 @@ + + + + diff --git a/example/src/demo/mobile/input/form.vue b/example/src/demo/mobile/input/form.vue new file mode 100644 index 000000000..552e0c3d2 --- /dev/null +++ b/example/src/demo/mobile/input/form.vue @@ -0,0 +1,49 @@ + + + + diff --git a/example/src/demo/mobile/input/input-event.vue b/example/src/demo/mobile/input/input-event.vue new file mode 100644 index 000000000..4040ee09d --- /dev/null +++ b/example/src/demo/mobile/input/input-event.vue @@ -0,0 +1,44 @@ + + + + diff --git a/example/src/demo/mobile/input/max-min-length.vue b/example/src/demo/mobile/input/max-min-length.vue new file mode 100644 index 000000000..e5769c018 --- /dev/null +++ b/example/src/demo/mobile/input/max-min-length.vue @@ -0,0 +1,32 @@ + + + + diff --git a/example/src/demo/mobile/input/method-select.vue b/example/src/demo/mobile/input/method-select.vue new file mode 100644 index 000000000..875204952 --- /dev/null +++ b/example/src/demo/mobile/input/method-select.vue @@ -0,0 +1,35 @@ + + + + diff --git a/example/src/demo/mobile/input/prefix-suffix.vue b/example/src/demo/mobile/input/prefix-suffix.vue new file mode 100644 index 000000000..785018d41 --- /dev/null +++ b/example/src/demo/mobile/input/prefix-suffix.vue @@ -0,0 +1,38 @@ + + + + diff --git a/example/src/demo/mobile/input/props-step.vue b/example/src/demo/mobile/input/props-step.vue new file mode 100644 index 000000000..b83b5fb2f --- /dev/null +++ b/example/src/demo/mobile/input/props-step.vue @@ -0,0 +1,27 @@ + + + + diff --git a/example/src/demo/mobile/input/props.vue b/example/src/demo/mobile/input/props.vue new file mode 100644 index 000000000..c1b645f8c --- /dev/null +++ b/example/src/demo/mobile/input/props.vue @@ -0,0 +1,27 @@ + + + + diff --git a/example/src/demo/mobile/input/show-password.vue b/example/src/demo/mobile/input/show-password.vue new file mode 100644 index 000000000..53219a5c2 --- /dev/null +++ b/example/src/demo/mobile/input/show-password.vue @@ -0,0 +1,27 @@ + + + + diff --git a/example/src/demo/mobile/input/slot-content.vue b/example/src/demo/mobile/input/slot-content.vue new file mode 100644 index 000000000..ff81a5eaf --- /dev/null +++ b/example/src/demo/mobile/input/slot-content.vue @@ -0,0 +1,29 @@ + + + + diff --git a/example/src/demo/mobile/input/slots-append-prepend.vue b/example/src/demo/mobile/input/slots-append-prepend.vue new file mode 100644 index 000000000..07836dbd8 --- /dev/null +++ b/example/src/demo/mobile/input/slots-append-prepend.vue @@ -0,0 +1,33 @@ + + + + diff --git a/example/src/demo/mobile/input/suffix-icon.vue b/example/src/demo/mobile/input/suffix-icon.vue new file mode 100644 index 000000000..4976c6f4a --- /dev/null +++ b/example/src/demo/mobile/input/suffix-icon.vue @@ -0,0 +1,33 @@ + + + + diff --git a/example/src/demo/mobile/input/type-be-form-select.vue b/example/src/demo/mobile/input/type-be-form-select.vue new file mode 100644 index 000000000..4756ab47d --- /dev/null +++ b/example/src/demo/mobile/input/type-be-form-select.vue @@ -0,0 +1,53 @@ + + + + diff --git a/example/src/demo/mobile/input/type-be-form-tips.vue b/example/src/demo/mobile/input/type-be-form-tips.vue new file mode 100644 index 000000000..22bb721d4 --- /dev/null +++ b/example/src/demo/mobile/input/type-be-form-tips.vue @@ -0,0 +1,55 @@ + + + + diff --git a/example/src/demo/mobile/input/type-be-form.vue b/example/src/demo/mobile/input/type-be-form.vue new file mode 100644 index 000000000..d00e3bb19 --- /dev/null +++ b/example/src/demo/mobile/input/type-be-form.vue @@ -0,0 +1,51 @@ + + + + diff --git a/example/src/demo/mobile/input/validate-event.vue b/example/src/demo/mobile/input/validate-event.vue new file mode 100644 index 000000000..1f4c46267 --- /dev/null +++ b/example/src/demo/mobile/input/validate-event.vue @@ -0,0 +1,73 @@ + + + + diff --git a/example/src/demo/mobile/list/base.vue b/example/src/demo/mobile/list/base.vue new file mode 100644 index 000000000..28275b320 --- /dev/null +++ b/example/src/demo/mobile/list/base.vue @@ -0,0 +1,45 @@ + + + diff --git a/example/src/demo/mobile/list/double-line.vue b/example/src/demo/mobile/list/double-line.vue new file mode 100644 index 000000000..4fd6a6755 --- /dev/null +++ b/example/src/demo/mobile/list/double-line.vue @@ -0,0 +1,63 @@ + + + + + diff --git a/example/src/demo/mobile/list/double-list.vue b/example/src/demo/mobile/list/double-list.vue new file mode 100644 index 000000000..d273ac4a0 --- /dev/null +++ b/example/src/demo/mobile/list/double-list.vue @@ -0,0 +1,69 @@ + + + + diff --git a/example/src/demo/mobile/list/imformation-list.vue b/example/src/demo/mobile/list/imformation-list.vue new file mode 100644 index 000000000..982a5cc7c --- /dev/null +++ b/example/src/demo/mobile/list/imformation-list.vue @@ -0,0 +1,211 @@ + + + diff --git a/example/src/demo/mobile/list/single-line.vue b/example/src/demo/mobile/list/single-line.vue new file mode 100644 index 000000000..4ccf06039 --- /dev/null +++ b/example/src/demo/mobile/list/single-line.vue @@ -0,0 +1,118 @@ + + + + + diff --git a/example/src/demo/mobile/list/slots.vue b/example/src/demo/mobile/list/slots.vue new file mode 100644 index 000000000..c8e89ad3f --- /dev/null +++ b/example/src/demo/mobile/list/slots.vue @@ -0,0 +1,55 @@ + + + diff --git a/example/src/demo/mobile/mini-picker/cancel-button-text.vue b/example/src/demo/mobile/mini-picker/cancel-button-text.vue new file mode 100644 index 000000000..183f17d4a --- /dev/null +++ b/example/src/demo/mobile/mini-picker/cancel-button-text.vue @@ -0,0 +1,63 @@ + + + diff --git a/example/src/demo/mobile/mini-picker/cancel.vue b/example/src/demo/mobile/mini-picker/cancel.vue new file mode 100644 index 000000000..6a0428776 --- /dev/null +++ b/example/src/demo/mobile/mini-picker/cancel.vue @@ -0,0 +1,41 @@ + + + diff --git a/example/src/demo/mobile/mini-picker/cascad.vue b/example/src/demo/mobile/mini-picker/cascad.vue new file mode 100644 index 000000000..cf1244873 --- /dev/null +++ b/example/src/demo/mobile/mini-picker/cascad.vue @@ -0,0 +1,131 @@ + + + diff --git a/example/src/demo/mobile/mini-picker/change.vue b/example/src/demo/mobile/mini-picker/change.vue new file mode 100644 index 000000000..8c3ce3c4f --- /dev/null +++ b/example/src/demo/mobile/mini-picker/change.vue @@ -0,0 +1,37 @@ + + + diff --git a/example/src/demo/mobile/mini-picker/column.vue b/example/src/demo/mobile/mini-picker/column.vue new file mode 100644 index 000000000..131041a90 --- /dev/null +++ b/example/src/demo/mobile/mini-picker/column.vue @@ -0,0 +1,44 @@ + + + diff --git a/example/src/demo/mobile/mini-picker/defaultindex.vue b/example/src/demo/mobile/mini-picker/defaultindex.vue new file mode 100644 index 000000000..d69f6df81 --- /dev/null +++ b/example/src/demo/mobile/mini-picker/defaultindex.vue @@ -0,0 +1,34 @@ + + + diff --git a/example/src/demo/mobile/mini-picker/itemheight.vue b/example/src/demo/mobile/mini-picker/itemheight.vue new file mode 100644 index 000000000..77865c6d2 --- /dev/null +++ b/example/src/demo/mobile/mini-picker/itemheight.vue @@ -0,0 +1,34 @@ + + + diff --git a/example/src/demo/mobile/mini-picker/methods.vue b/example/src/demo/mobile/mini-picker/methods.vue new file mode 100644 index 000000000..e5ff776f0 --- /dev/null +++ b/example/src/demo/mobile/mini-picker/methods.vue @@ -0,0 +1,41 @@ + + + diff --git a/example/src/demo/mobile/mini-picker/minipicker.vue b/example/src/demo/mobile/mini-picker/minipicker.vue new file mode 100644 index 000000000..361771674 --- /dev/null +++ b/example/src/demo/mobile/mini-picker/minipicker.vue @@ -0,0 +1,71 @@ + + + + diff --git a/example/src/demo/mobile/mini-picker/multicolumn.vue b/example/src/demo/mobile/mini-picker/multicolumn.vue new file mode 100644 index 000000000..e026e331d --- /dev/null +++ b/example/src/demo/mobile/mini-picker/multicolumn.vue @@ -0,0 +1,60 @@ + + + diff --git a/example/src/demo/mobile/mini-picker/toolbar.vue b/example/src/demo/mobile/mini-picker/toolbar.vue new file mode 100644 index 000000000..fe420ba2e --- /dev/null +++ b/example/src/demo/mobile/mini-picker/toolbar.vue @@ -0,0 +1,75 @@ + + + + diff --git a/example/src/demo/mobile/mini-picker/visibleitemcount.vue b/example/src/demo/mobile/mini-picker/visibleitemcount.vue new file mode 100644 index 000000000..8891c7237 --- /dev/null +++ b/example/src/demo/mobile/mini-picker/visibleitemcount.vue @@ -0,0 +1,34 @@ + + + diff --git a/example/src/demo/mobile/nav-bar/base.vue b/example/src/demo/mobile/nav-bar/base.vue new file mode 100644 index 000000000..cff4b7bb1 --- /dev/null +++ b/example/src/demo/mobile/nav-bar/base.vue @@ -0,0 +1,17 @@ + + + diff --git a/example/src/demo/mobile/nav-bar/left-right-arrow.vue b/example/src/demo/mobile/nav-bar/left-right-arrow.vue new file mode 100644 index 000000000..6b140eda3 --- /dev/null +++ b/example/src/demo/mobile/nav-bar/left-right-arrow.vue @@ -0,0 +1,16 @@ + + + diff --git a/example/src/demo/mobile/nav-bar/left-right-text.vue b/example/src/demo/mobile/nav-bar/left-right-text.vue new file mode 100644 index 000000000..6d57e4e6f --- /dev/null +++ b/example/src/demo/mobile/nav-bar/left-right-text.vue @@ -0,0 +1,17 @@ + + + diff --git a/example/src/demo/mobile/nav-bar/slots.vue b/example/src/demo/mobile/nav-bar/slots.vue new file mode 100644 index 000000000..9816b4827 --- /dev/null +++ b/example/src/demo/mobile/nav-bar/slots.vue @@ -0,0 +1,27 @@ + + + diff --git a/example/src/demo/mobile/nav-bar/z-index.vue b/example/src/demo/mobile/nav-bar/z-index.vue new file mode 100644 index 000000000..b88cfcf4b --- /dev/null +++ b/example/src/demo/mobile/nav-bar/z-index.vue @@ -0,0 +1,23 @@ + + + diff --git a/example/src/demo/mobile/numeric/automatic-price.vue b/example/src/demo/mobile/numeric/automatic-price.vue new file mode 100644 index 000000000..16c790703 --- /dev/null +++ b/example/src/demo/mobile/numeric/automatic-price.vue @@ -0,0 +1,28 @@ + + + diff --git a/example/src/demo/mobile/numeric/circulate.vue b/example/src/demo/mobile/numeric/circulate.vue new file mode 100644 index 000000000..87268da06 --- /dev/null +++ b/example/src/demo/mobile/numeric/circulate.vue @@ -0,0 +1,31 @@ + + + diff --git a/example/src/demo/mobile/numeric/controls-position.vue b/example/src/demo/mobile/numeric/controls-position.vue new file mode 100644 index 000000000..dc99539ad --- /dev/null +++ b/example/src/demo/mobile/numeric/controls-position.vue @@ -0,0 +1,19 @@ + + + diff --git a/example/src/demo/mobile/numeric/controls.vue b/example/src/demo/mobile/numeric/controls.vue new file mode 100644 index 000000000..9c2722b15 --- /dev/null +++ b/example/src/demo/mobile/numeric/controls.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/mobile/numeric/event.vue b/example/src/demo/mobile/numeric/event.vue new file mode 100644 index 000000000..d97331703 --- /dev/null +++ b/example/src/demo/mobile/numeric/event.vue @@ -0,0 +1,34 @@ + + + diff --git a/example/src/demo/mobile/numeric/max.vue b/example/src/demo/mobile/numeric/max.vue new file mode 100644 index 000000000..c9e14022b --- /dev/null +++ b/example/src/demo/mobile/numeric/max.vue @@ -0,0 +1,24 @@ + + + diff --git a/example/src/demo/mobile/numeric/numeric.vue b/example/src/demo/mobile/numeric/numeric.vue new file mode 100644 index 000000000..89352b30b --- /dev/null +++ b/example/src/demo/mobile/numeric/numeric.vue @@ -0,0 +1,60 @@ + + + + diff --git a/example/src/demo/mobile/numeric/placeholder.vue b/example/src/demo/mobile/numeric/placeholder.vue new file mode 100644 index 000000000..dd509a4f8 --- /dev/null +++ b/example/src/demo/mobile/numeric/placeholder.vue @@ -0,0 +1,60 @@ + + + + diff --git a/example/src/demo/mobile/numeric/precision.vue b/example/src/demo/mobile/numeric/precision.vue new file mode 100644 index 000000000..dd7c660cd --- /dev/null +++ b/example/src/demo/mobile/numeric/precision.vue @@ -0,0 +1,19 @@ + + + diff --git a/example/src/demo/mobile/numeric/size.vue b/example/src/demo/mobile/numeric/size.vue new file mode 100644 index 000000000..ec5b31ae7 --- /dev/null +++ b/example/src/demo/mobile/numeric/size.vue @@ -0,0 +1,20 @@ + + + diff --git a/example/src/demo/mobile/numeric/step.vue b/example/src/demo/mobile/numeric/step.vue new file mode 100644 index 000000000..3c5169762 --- /dev/null +++ b/example/src/demo/mobile/numeric/step.vue @@ -0,0 +1,23 @@ + + + diff --git a/example/src/demo/mobile/package.json b/example/src/demo/mobile/package.json new file mode 100644 index 000000000..5814ccc5f --- /dev/null +++ b/example/src/demo/mobile/package.json @@ -0,0 +1,11 @@ +{ + "name": "@opentiny/vue-mobile-example", + "version": "0.0.3", + "description": "TINY vue mobile example", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC" +} diff --git a/example/src/demo/mobile/progress/base.vue b/example/src/demo/mobile/progress/base.vue new file mode 100644 index 000000000..3177a7e6f --- /dev/null +++ b/example/src/demo/mobile/progress/base.vue @@ -0,0 +1,74 @@ + + + + diff --git a/example/src/demo/mobile/progress/basic-usage.vue b/example/src/demo/mobile/progress/basic-usage.vue new file mode 100644 index 000000000..27440154e --- /dev/null +++ b/example/src/demo/mobile/progress/basic-usage.vue @@ -0,0 +1,58 @@ + + + + + diff --git a/example/src/demo/mobile/progress/custom-color.vue b/example/src/demo/mobile/progress/custom-color.vue new file mode 100644 index 000000000..4f5fd6927 --- /dev/null +++ b/example/src/demo/mobile/progress/custom-color.vue @@ -0,0 +1,43 @@ + + + diff --git a/example/src/demo/mobile/progress/dynamic-control-changes.vue b/example/src/demo/mobile/progress/dynamic-control-changes.vue new file mode 100644 index 000000000..c2e99b681 --- /dev/null +++ b/example/src/demo/mobile/progress/dynamic-control-changes.vue @@ -0,0 +1,52 @@ + + + diff --git a/example/src/demo/mobile/progress/dynamic-progress.vue b/example/src/demo/mobile/progress/dynamic-progress.vue new file mode 100644 index 000000000..dbeb552fc --- /dev/null +++ b/example/src/demo/mobile/progress/dynamic-progress.vue @@ -0,0 +1,73 @@ + + + + + diff --git a/example/src/demo/mobile/progress/format-text.vue b/example/src/demo/mobile/progress/format-text.vue new file mode 100644 index 000000000..656f7ff4b --- /dev/null +++ b/example/src/demo/mobile/progress/format-text.vue @@ -0,0 +1,41 @@ + + + + diff --git a/example/src/demo/mobile/progress/format.vue b/example/src/demo/mobile/progress/format.vue new file mode 100644 index 000000000..64fba0ce5 --- /dev/null +++ b/example/src/demo/mobile/progress/format.vue @@ -0,0 +1,64 @@ + + + + + diff --git a/example/src/demo/mobile/progress/progress-status.vue b/example/src/demo/mobile/progress/progress-status.vue new file mode 100644 index 000000000..55dc4fb85 --- /dev/null +++ b/example/src/demo/mobile/progress/progress-status.vue @@ -0,0 +1,41 @@ + + + diff --git a/example/src/demo/mobile/progress/progress-type-circle.vue b/example/src/demo/mobile/progress/progress-type-circle.vue new file mode 100644 index 000000000..e1ae091d6 --- /dev/null +++ b/example/src/demo/mobile/progress/progress-type-circle.vue @@ -0,0 +1,24 @@ + + + + + diff --git a/example/src/demo/mobile/progress/progress-type-dashboard.vue b/example/src/demo/mobile/progress/progress-type-dashboard.vue new file mode 100644 index 000000000..e6adfc94e --- /dev/null +++ b/example/src/demo/mobile/progress/progress-type-dashboard.vue @@ -0,0 +1,38 @@ + + + diff --git a/example/src/demo/mobile/progress/progress-type.vue b/example/src/demo/mobile/progress/progress-type.vue new file mode 100644 index 000000000..4cf8366ec --- /dev/null +++ b/example/src/demo/mobile/progress/progress-type.vue @@ -0,0 +1,19 @@ + + + + + diff --git a/example/src/demo/mobile/progress/progress-width.vue b/example/src/demo/mobile/progress/progress-width.vue new file mode 100644 index 000000000..aaaa1980c --- /dev/null +++ b/example/src/demo/mobile/progress/progress-width.vue @@ -0,0 +1,42 @@ + + + diff --git a/example/src/demo/mobile/progress/text-inside-or-no-text.vue b/example/src/demo/mobile/progress/text-inside-or-no-text.vue new file mode 100644 index 000000000..f734350d5 --- /dev/null +++ b/example/src/demo/mobile/progress/text-inside-or-no-text.vue @@ -0,0 +1,32 @@ + + + diff --git a/example/src/demo/mobile/progress/width.vue b/example/src/demo/mobile/progress/width.vue new file mode 100644 index 000000000..18c9863c7 --- /dev/null +++ b/example/src/demo/mobile/progress/width.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/example/src/demo/mobile/pull-refresh/animation-duration.vue b/example/src/demo/mobile/pull-refresh/animation-duration.vue new file mode 100644 index 000000000..b34e9971d --- /dev/null +++ b/example/src/demo/mobile/pull-refresh/animation-duration.vue @@ -0,0 +1,31 @@ + + + diff --git a/example/src/demo/mobile/pull-refresh/base.vue b/example/src/demo/mobile/pull-refresh/base.vue new file mode 100644 index 000000000..a75ca2d09 --- /dev/null +++ b/example/src/demo/mobile/pull-refresh/base.vue @@ -0,0 +1,20 @@ + + + diff --git a/example/src/demo/mobile/pull-refresh/base1.vue b/example/src/demo/mobile/pull-refresh/base1.vue new file mode 100644 index 000000000..b26cf2c7e --- /dev/null +++ b/example/src/demo/mobile/pull-refresh/base1.vue @@ -0,0 +1,56 @@ + + + + diff --git a/example/src/demo/mobile/pull-refresh/disabled.vue b/example/src/demo/mobile/pull-refresh/disabled.vue new file mode 100644 index 000000000..7b69a8f9e --- /dev/null +++ b/example/src/demo/mobile/pull-refresh/disabled.vue @@ -0,0 +1,27 @@ + + + diff --git a/example/src/demo/mobile/pull-refresh/head-height.vue b/example/src/demo/mobile/pull-refresh/head-height.vue new file mode 100644 index 000000000..3e15bc796 --- /dev/null +++ b/example/src/demo/mobile/pull-refresh/head-height.vue @@ -0,0 +1,27 @@ + + + diff --git a/example/src/demo/mobile/pull-refresh/loosing-text.vue b/example/src/demo/mobile/pull-refresh/loosing-text.vue new file mode 100644 index 000000000..447b6b13d --- /dev/null +++ b/example/src/demo/mobile/pull-refresh/loosing-text.vue @@ -0,0 +1,31 @@ + + + diff --git a/example/src/demo/mobile/pull-refresh/pull-refresh-slot.vue b/example/src/demo/mobile/pull-refresh/pull-refresh-slot.vue new file mode 100644 index 000000000..fb2f6ae1c --- /dev/null +++ b/example/src/demo/mobile/pull-refresh/pull-refresh-slot.vue @@ -0,0 +1,30 @@ + + + diff --git a/example/src/demo/mobile/pull-refresh/pulling-text.vue b/example/src/demo/mobile/pull-refresh/pulling-text.vue new file mode 100644 index 000000000..3b6580a26 --- /dev/null +++ b/example/src/demo/mobile/pull-refresh/pulling-text.vue @@ -0,0 +1,31 @@ + + + diff --git a/example/src/demo/mobile/pull-refresh/success-duration.vue b/example/src/demo/mobile/pull-refresh/success-duration.vue new file mode 100644 index 000000000..e70061ef0 --- /dev/null +++ b/example/src/demo/mobile/pull-refresh/success-duration.vue @@ -0,0 +1,33 @@ + + + diff --git a/example/src/demo/mobile/pull-refresh/success-text.vue b/example/src/demo/mobile/pull-refresh/success-text.vue new file mode 100644 index 000000000..7dd03fdaa --- /dev/null +++ b/example/src/demo/mobile/pull-refresh/success-text.vue @@ -0,0 +1,31 @@ + + + diff --git a/example/src/demo/mobile/radio/base.vue b/example/src/demo/mobile/radio/base.vue new file mode 100644 index 000000000..bdf585f18 --- /dev/null +++ b/example/src/demo/mobile/radio/base.vue @@ -0,0 +1,126 @@ + + + + diff --git a/example/src/demo/mobile/radio/border.vue b/example/src/demo/mobile/radio/border.vue new file mode 100644 index 000000000..6e353c7ac --- /dev/null +++ b/example/src/demo/mobile/radio/border.vue @@ -0,0 +1,27 @@ + + + + + diff --git a/example/src/demo/mobile/radio/disabled.vue b/example/src/demo/mobile/radio/disabled.vue new file mode 100644 index 000000000..f0e144742 --- /dev/null +++ b/example/src/demo/mobile/radio/disabled.vue @@ -0,0 +1,35 @@ + + + + + diff --git a/example/src/demo/mobile/radio/event-change.vue b/example/src/demo/mobile/radio/event-change.vue new file mode 100644 index 000000000..fa39e866d --- /dev/null +++ b/example/src/demo/mobile/radio/event-change.vue @@ -0,0 +1,36 @@ + + + + + diff --git a/example/src/demo/mobile/search/base.vue b/example/src/demo/mobile/search/base.vue new file mode 100644 index 000000000..d9659da7c --- /dev/null +++ b/example/src/demo/mobile/search/base.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/example/src/demo/mobile/search/button-text.vue b/example/src/demo/mobile/search/button-text.vue new file mode 100644 index 000000000..ccb8ebf05 --- /dev/null +++ b/example/src/demo/mobile/search/button-text.vue @@ -0,0 +1,13 @@ + + + diff --git a/example/src/demo/mobile/search/clear.vue b/example/src/demo/mobile/search/clear.vue new file mode 100644 index 000000000..568af604a --- /dev/null +++ b/example/src/demo/mobile/search/clear.vue @@ -0,0 +1,79 @@ + + + + + diff --git a/example/src/demo/mobile/search/default-value.vue b/example/src/demo/mobile/search/default-value.vue new file mode 100644 index 000000000..bb31c19c9 --- /dev/null +++ b/example/src/demo/mobile/search/default-value.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/mobile/search/events.vue b/example/src/demo/mobile/search/events.vue new file mode 100644 index 000000000..a2bd151b1 --- /dev/null +++ b/example/src/demo/mobile/search/events.vue @@ -0,0 +1,41 @@ + + + + diff --git a/example/src/demo/mobile/slider/about-step.vue b/example/src/demo/mobile/slider/about-step.vue new file mode 100644 index 000000000..c3b4c5c31 --- /dev/null +++ b/example/src/demo/mobile/slider/about-step.vue @@ -0,0 +1,46 @@ + + + + + diff --git a/example/src/demo/mobile/slider/base.vue b/example/src/demo/mobile/slider/base.vue new file mode 100644 index 000000000..877284284 --- /dev/null +++ b/example/src/demo/mobile/slider/base.vue @@ -0,0 +1,52 @@ + + + + + diff --git a/example/src/demo/mobile/slider/basic-usage.vue b/example/src/demo/mobile/slider/basic-usage.vue new file mode 100644 index 000000000..9614ab6b0 --- /dev/null +++ b/example/src/demo/mobile/slider/basic-usage.vue @@ -0,0 +1,53 @@ + + + + + diff --git a/example/src/demo/mobile/slider/dynamic-disable.vue b/example/src/demo/mobile/slider/dynamic-disable.vue new file mode 100644 index 000000000..40864576e --- /dev/null +++ b/example/src/demo/mobile/slider/dynamic-disable.vue @@ -0,0 +1,46 @@ + + + + + diff --git a/example/src/demo/mobile/slider/format-tooltip.vue b/example/src/demo/mobile/slider/format-tooltip.vue new file mode 100644 index 000000000..1bb7968a6 --- /dev/null +++ b/example/src/demo/mobile/slider/format-tooltip.vue @@ -0,0 +1,55 @@ + + + + + diff --git a/example/src/demo/mobile/slider/max-min.vue b/example/src/demo/mobile/slider/max-min.vue new file mode 100644 index 000000000..5ef2e734d --- /dev/null +++ b/example/src/demo/mobile/slider/max-min.vue @@ -0,0 +1,46 @@ + + + + + diff --git a/example/src/demo/mobile/slider/range-select.vue b/example/src/demo/mobile/slider/range-select.vue new file mode 100644 index 000000000..51493fe75 --- /dev/null +++ b/example/src/demo/mobile/slider/range-select.vue @@ -0,0 +1,46 @@ + + + + + diff --git a/example/src/demo/mobile/slider/shortcut-operation.vue b/example/src/demo/mobile/slider/shortcut-operation.vue new file mode 100644 index 000000000..ed13a7a24 --- /dev/null +++ b/example/src/demo/mobile/slider/shortcut-operation.vue @@ -0,0 +1,46 @@ + + + + + diff --git a/example/src/demo/mobile/slider/show-iput.vue b/example/src/demo/mobile/slider/show-iput.vue new file mode 100644 index 000000000..d46990073 --- /dev/null +++ b/example/src/demo/mobile/slider/show-iput.vue @@ -0,0 +1,46 @@ + + + + + diff --git a/example/src/demo/mobile/slider/show-tip.vue b/example/src/demo/mobile/slider/show-tip.vue new file mode 100644 index 000000000..5e3b46750 --- /dev/null +++ b/example/src/demo/mobile/slider/show-tip.vue @@ -0,0 +1,46 @@ + + + + + diff --git a/example/src/demo/mobile/slider/slider-event-change.vue b/example/src/demo/mobile/slider/slider-event-change.vue new file mode 100644 index 000000000..2c9801fe0 --- /dev/null +++ b/example/src/demo/mobile/slider/slider-event-change.vue @@ -0,0 +1,51 @@ + + + + + diff --git a/example/src/demo/mobile/slider/slider-event-start.vue b/example/src/demo/mobile/slider/slider-event-start.vue new file mode 100644 index 000000000..81ec2c6a6 --- /dev/null +++ b/example/src/demo/mobile/slider/slider-event-start.vue @@ -0,0 +1,51 @@ + + + + + diff --git a/example/src/demo/mobile/slider/slider-event-stop.vue b/example/src/demo/mobile/slider/slider-event-stop.vue new file mode 100644 index 000000000..afa020a02 --- /dev/null +++ b/example/src/demo/mobile/slider/slider-event-stop.vue @@ -0,0 +1,51 @@ + + + + + diff --git a/example/src/demo/mobile/slider/slider-slot.vue b/example/src/demo/mobile/slider/slider-slot.vue new file mode 100644 index 000000000..b56a85cda --- /dev/null +++ b/example/src/demo/mobile/slider/slider-slot.vue @@ -0,0 +1,50 @@ + + + + + diff --git a/example/src/demo/mobile/slider/vertical-mode.vue b/example/src/demo/mobile/slider/vertical-mode.vue new file mode 100644 index 000000000..4be8f9506 --- /dev/null +++ b/example/src/demo/mobile/slider/vertical-mode.vue @@ -0,0 +1,46 @@ + + + + + diff --git a/example/src/demo/mobile/switch/base.vue b/example/src/demo/mobile/switch/base.vue new file mode 100644 index 000000000..be5871d4e --- /dev/null +++ b/example/src/demo/mobile/switch/base.vue @@ -0,0 +1,78 @@ + + + + + diff --git a/example/src/demo/mobile/switch/disabled.vue b/example/src/demo/mobile/switch/disabled.vue new file mode 100644 index 000000000..1906f2a06 --- /dev/null +++ b/example/src/demo/mobile/switch/disabled.vue @@ -0,0 +1,67 @@ + + + + + diff --git a/example/src/demo/mobile/switch/event-change.vue b/example/src/demo/mobile/switch/event-change.vue new file mode 100644 index 000000000..fd660f5c3 --- /dev/null +++ b/example/src/demo/mobile/switch/event-change.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/example/src/demo/mobile/switch/scenario.vue b/example/src/demo/mobile/switch/scenario.vue new file mode 100644 index 000000000..9e1ef97e4 --- /dev/null +++ b/example/src/demo/mobile/switch/scenario.vue @@ -0,0 +1,42 @@ + + + diff --git a/example/src/demo/mobile/switch/true-false-value.vue b/example/src/demo/mobile/switch/true-false-value.vue new file mode 100644 index 000000000..6d78801dc --- /dev/null +++ b/example/src/demo/mobile/switch/true-false-value.vue @@ -0,0 +1,31 @@ + + + + + diff --git a/example/src/demo/mobile/tabbar/active-inactive-color.vue b/example/src/demo/mobile/tabbar/active-inactive-color.vue new file mode 100644 index 000000000..e8d129fdf --- /dev/null +++ b/example/src/demo/mobile/tabbar/active-inactive-color.vue @@ -0,0 +1,41 @@ + + + diff --git a/example/src/demo/mobile/tabbar/badge.vue b/example/src/demo/mobile/tabbar/badge.vue new file mode 100644 index 000000000..cea999f0a --- /dev/null +++ b/example/src/demo/mobile/tabbar/badge.vue @@ -0,0 +1,36 @@ + + + diff --git a/example/src/demo/mobile/tabbar/base.vue b/example/src/demo/mobile/tabbar/base.vue new file mode 100644 index 000000000..5fd04edfd --- /dev/null +++ b/example/src/demo/mobile/tabbar/base.vue @@ -0,0 +1,92 @@ + + + + + diff --git a/example/src/demo/mobile/tabbar/border.vue b/example/src/demo/mobile/tabbar/border.vue new file mode 100644 index 000000000..0fd4f4189 --- /dev/null +++ b/example/src/demo/mobile/tabbar/border.vue @@ -0,0 +1,34 @@ + + + diff --git a/example/src/demo/mobile/tabbar/event-change.vue b/example/src/demo/mobile/tabbar/event-change.vue new file mode 100644 index 000000000..e847752d3 --- /dev/null +++ b/example/src/demo/mobile/tabbar/event-change.vue @@ -0,0 +1,39 @@ + + + diff --git a/example/src/demo/mobile/tabbar/onlytext.vue b/example/src/demo/mobile/tabbar/onlytext.vue new file mode 100644 index 000000000..88bfe3b89 --- /dev/null +++ b/example/src/demo/mobile/tabbar/onlytext.vue @@ -0,0 +1,79 @@ + + + + + diff --git a/example/src/demo/mobile/tabbar/route.vue b/example/src/demo/mobile/tabbar/route.vue new file mode 100644 index 000000000..05a28a081 --- /dev/null +++ b/example/src/demo/mobile/tabbar/route.vue @@ -0,0 +1,45 @@ + + + diff --git a/example/src/demo/mobile/tabbar/slot-icon.vue b/example/src/demo/mobile/tabbar/slot-icon.vue new file mode 100644 index 000000000..569b51945 --- /dev/null +++ b/example/src/demo/mobile/tabbar/slot-icon.vue @@ -0,0 +1,38 @@ + + + diff --git a/example/src/demo/mobile/tabs/active-color.vue b/example/src/demo/mobile/tabs/active-color.vue new file mode 100644 index 000000000..075f8eef7 --- /dev/null +++ b/example/src/demo/mobile/tabs/active-color.vue @@ -0,0 +1,27 @@ + + + diff --git a/example/src/demo/mobile/tabs/base.vue b/example/src/demo/mobile/tabs/base.vue new file mode 100644 index 000000000..1384f4b43 --- /dev/null +++ b/example/src/demo/mobile/tabs/base.vue @@ -0,0 +1,48 @@ + + + + + diff --git a/example/src/demo/mobile/tabs/before-leave.vue b/example/src/demo/mobile/tabs/before-leave.vue new file mode 100644 index 000000000..cce2e0b68 --- /dev/null +++ b/example/src/demo/mobile/tabs/before-leave.vue @@ -0,0 +1,37 @@ + + + diff --git a/example/src/demo/mobile/tabs/swipe.vue b/example/src/demo/mobile/tabs/swipe.vue new file mode 100644 index 000000000..746fc33ab --- /dev/null +++ b/example/src/demo/mobile/tabs/swipe.vue @@ -0,0 +1,27 @@ + + + diff --git a/example/src/demo/mobile/tabs/tabs-events.vue b/example/src/demo/mobile/tabs/tabs-events.vue new file mode 100644 index 000000000..3f3f4a919 --- /dev/null +++ b/example/src/demo/mobile/tabs/tabs-events.vue @@ -0,0 +1,102 @@ + + + diff --git a/example/src/demo/mobile/tabs/three-level.vue b/example/src/demo/mobile/tabs/three-level.vue new file mode 100644 index 000000000..80b39477b --- /dev/null +++ b/example/src/demo/mobile/tabs/three-level.vue @@ -0,0 +1,98 @@ + + + + + diff --git a/example/src/demo/mobile/tabs/with-add.vue b/example/src/demo/mobile/tabs/with-add.vue new file mode 100644 index 000000000..08c23135b --- /dev/null +++ b/example/src/demo/mobile/tabs/with-add.vue @@ -0,0 +1,39 @@ + + + diff --git a/example/src/demo/mobile/time-line/different-data.vue b/example/src/demo/mobile/time-line/different-data.vue new file mode 100644 index 000000000..92f7a1221 --- /dev/null +++ b/example/src/demo/mobile/time-line/different-data.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/example/src/demo/mobile/time-line/mobileTimeLine.vue b/example/src/demo/mobile/time-line/mobileTimeLine.vue new file mode 100644 index 000000000..fb285c868 --- /dev/null +++ b/example/src/demo/mobile/time-line/mobileTimeLine.vue @@ -0,0 +1,102 @@ + + + + + diff --git a/example/src/demo/mobile/time-line/slot.vue b/example/src/demo/mobile/time-line/slot.vue new file mode 100644 index 000000000..ada8dc31c --- /dev/null +++ b/example/src/demo/mobile/time-line/slot.vue @@ -0,0 +1,93 @@ + + + + + diff --git a/example/src/demo/mobile/time-line/space.vue b/example/src/demo/mobile/time-line/space.vue new file mode 100644 index 000000000..4ec90dbce --- /dev/null +++ b/example/src/demo/mobile/time-line/space.vue @@ -0,0 +1,82 @@ + + + + + diff --git a/example/src/demo/pc/alert/base.vue b/example/src/demo/pc/alert/base.vue new file mode 100644 index 000000000..7d7b123b4 --- /dev/null +++ b/example/src/demo/pc/alert/base.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/alert/center.vue b/example/src/demo/pc/alert/center.vue new file mode 100644 index 000000000..2feb5dc64 --- /dev/null +++ b/example/src/demo/pc/alert/center.vue @@ -0,0 +1,13 @@ + + + diff --git a/example/src/demo/pc/alert/closable.vue b/example/src/demo/pc/alert/closable.vue new file mode 100644 index 000000000..fd8796c9e --- /dev/null +++ b/example/src/demo/pc/alert/closable.vue @@ -0,0 +1,19 @@ + + + diff --git a/example/src/demo/pc/alert/close-text.vue b/example/src/demo/pc/alert/close-text.vue new file mode 100644 index 000000000..5a4b32be8 --- /dev/null +++ b/example/src/demo/pc/alert/close-text.vue @@ -0,0 +1,26 @@ + + + diff --git a/example/src/demo/pc/alert/close.vue b/example/src/demo/pc/alert/close.vue new file mode 100644 index 000000000..daf24f75d --- /dev/null +++ b/example/src/demo/pc/alert/close.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/alert/custom-description.vue b/example/src/demo/pc/alert/custom-description.vue new file mode 100644 index 000000000..6a2b6a025 --- /dev/null +++ b/example/src/demo/pc/alert/custom-description.vue @@ -0,0 +1,24 @@ + + + diff --git a/example/src/demo/pc/alert/feedback-of-result.vue b/example/src/demo/pc/alert/feedback-of-result.vue new file mode 100644 index 000000000..0948fc530 --- /dev/null +++ b/example/src/demo/pc/alert/feedback-of-result.vue @@ -0,0 +1,37 @@ + + + diff --git a/example/src/demo/pc/alert/icon.vue b/example/src/demo/pc/alert/icon.vue new file mode 100644 index 000000000..ddacdef2b --- /dev/null +++ b/example/src/demo/pc/alert/icon.vue @@ -0,0 +1,34 @@ + + + diff --git a/example/src/demo/pc/alert/show-icon.vue b/example/src/demo/pc/alert/show-icon.vue new file mode 100644 index 000000000..32718675c --- /dev/null +++ b/example/src/demo/pc/alert/show-icon.vue @@ -0,0 +1,19 @@ + + + diff --git a/example/src/demo/pc/alert/size.vue b/example/src/demo/pc/alert/size.vue new file mode 100644 index 000000000..b36b27aa7 --- /dev/null +++ b/example/src/demo/pc/alert/size.vue @@ -0,0 +1,16 @@ + + + diff --git a/example/src/demo/pc/alert/slot-default.vue b/example/src/demo/pc/alert/slot-default.vue new file mode 100644 index 000000000..239c9e4de --- /dev/null +++ b/example/src/demo/pc/alert/slot-default.vue @@ -0,0 +1,52 @@ + + + + + diff --git a/example/src/demo/pc/alert/title.vue b/example/src/demo/pc/alert/title.vue new file mode 100644 index 000000000..80689d0ef --- /dev/null +++ b/example/src/demo/pc/alert/title.vue @@ -0,0 +1,19 @@ + + + diff --git a/example/src/demo/pc/alert/type.vue b/example/src/demo/pc/alert/type.vue new file mode 100644 index 000000000..5acf6f988 --- /dev/null +++ b/example/src/demo/pc/alert/type.vue @@ -0,0 +1,19 @@ + + + diff --git a/example/src/demo/pc/autocomplete/append-prepend.vue b/example/src/demo/pc/autocomplete/append-prepend.vue new file mode 100644 index 000000000..c0fe667fe --- /dev/null +++ b/example/src/demo/pc/autocomplete/append-prepend.vue @@ -0,0 +1,73 @@ + + + + + diff --git a/example/src/demo/pc/autocomplete/basic-usage.vue b/example/src/demo/pc/autocomplete/basic-usage.vue new file mode 100644 index 000000000..76d64ea24 --- /dev/null +++ b/example/src/demo/pc/autocomplete/basic-usage.vue @@ -0,0 +1,69 @@ + + + + + diff --git a/example/src/demo/pc/autocomplete/clearable.vue b/example/src/demo/pc/autocomplete/clearable.vue new file mode 100644 index 000000000..94ee29961 --- /dev/null +++ b/example/src/demo/pc/autocomplete/clearable.vue @@ -0,0 +1,70 @@ + + + + + diff --git a/example/src/demo/pc/autocomplete/cust-template.vue b/example/src/demo/pc/autocomplete/cust-template.vue new file mode 100644 index 000000000..6dae543c3 --- /dev/null +++ b/example/src/demo/pc/autocomplete/cust-template.vue @@ -0,0 +1,76 @@ + + + + + diff --git a/example/src/demo/pc/autocomplete/custom-icon.vue b/example/src/demo/pc/autocomplete/custom-icon.vue new file mode 100644 index 000000000..d7fddf8cd --- /dev/null +++ b/example/src/demo/pc/autocomplete/custom-icon.vue @@ -0,0 +1,79 @@ + + + + + diff --git a/example/src/demo/pc/autocomplete/debounce.vue b/example/src/demo/pc/autocomplete/debounce.vue new file mode 100644 index 000000000..5db09e3bf --- /dev/null +++ b/example/src/demo/pc/autocomplete/debounce.vue @@ -0,0 +1,70 @@ + + + + + diff --git a/example/src/demo/pc/autocomplete/disabled.vue b/example/src/demo/pc/autocomplete/disabled.vue new file mode 100644 index 000000000..3809ff012 --- /dev/null +++ b/example/src/demo/pc/autocomplete/disabled.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/example/src/demo/pc/autocomplete/hide-loading.vue b/example/src/demo/pc/autocomplete/hide-loading.vue new file mode 100644 index 000000000..a960dd139 --- /dev/null +++ b/example/src/demo/pc/autocomplete/hide-loading.vue @@ -0,0 +1,76 @@ + + + + + diff --git a/example/src/demo/pc/autocomplete/highlight-first-item.vue b/example/src/demo/pc/autocomplete/highlight-first-item.vue new file mode 100644 index 000000000..88052bbad --- /dev/null +++ b/example/src/demo/pc/autocomplete/highlight-first-item.vue @@ -0,0 +1,74 @@ + + + + + diff --git a/example/src/demo/pc/autocomplete/no-trigger-on-focus.vue b/example/src/demo/pc/autocomplete/no-trigger-on-focus.vue new file mode 100644 index 000000000..36ed69fc2 --- /dev/null +++ b/example/src/demo/pc/autocomplete/no-trigger-on-focus.vue @@ -0,0 +1,70 @@ + + + + + diff --git a/example/src/demo/pc/autocomplete/placement.vue b/example/src/demo/pc/autocomplete/placement.vue new file mode 100644 index 000000000..35a160372 --- /dev/null +++ b/example/src/demo/pc/autocomplete/placement.vue @@ -0,0 +1,70 @@ + + + + + diff --git a/example/src/demo/pc/autocomplete/popper-class.vue b/example/src/demo/pc/autocomplete/popper-class.vue new file mode 100644 index 000000000..ff18230a4 --- /dev/null +++ b/example/src/demo/pc/autocomplete/popper-class.vue @@ -0,0 +1,98 @@ + + + + + diff --git a/example/src/demo/pc/autocomplete/prefix-suffix-slot.vue b/example/src/demo/pc/autocomplete/prefix-suffix-slot.vue new file mode 100644 index 000000000..261051a97 --- /dev/null +++ b/example/src/demo/pc/autocomplete/prefix-suffix-slot.vue @@ -0,0 +1,80 @@ + + + + + diff --git a/example/src/demo/pc/autocomplete/remote-search.vue b/example/src/demo/pc/autocomplete/remote-search.vue new file mode 100644 index 000000000..634cee398 --- /dev/null +++ b/example/src/demo/pc/autocomplete/remote-search.vue @@ -0,0 +1,79 @@ + + + + + diff --git a/example/src/demo/pc/autocomplete/select-event.vue b/example/src/demo/pc/autocomplete/select-event.vue new file mode 100644 index 000000000..dd1250353 --- /dev/null +++ b/example/src/demo/pc/autocomplete/select-event.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/example/src/demo/pc/autocomplete/size.vue b/example/src/demo/pc/autocomplete/size.vue new file mode 100644 index 000000000..a1b2f53c2 --- /dev/null +++ b/example/src/demo/pc/autocomplete/size.vue @@ -0,0 +1,70 @@ + + + + + diff --git a/example/src/demo/pc/autocomplete/value-key.vue b/example/src/demo/pc/autocomplete/value-key.vue new file mode 100644 index 000000000..c23249f14 --- /dev/null +++ b/example/src/demo/pc/autocomplete/value-key.vue @@ -0,0 +1,70 @@ + + + + + diff --git a/example/src/demo/pc/badge/base.vue b/example/src/demo/pc/badge/base.vue new file mode 100644 index 000000000..71e89d794 --- /dev/null +++ b/example/src/demo/pc/badge/base.vue @@ -0,0 +1,13 @@ + + + diff --git a/example/src/demo/pc/badge/dynamic-hidden.vue b/example/src/demo/pc/badge/dynamic-hidden.vue new file mode 100644 index 000000000..e57d9c948 --- /dev/null +++ b/example/src/demo/pc/badge/dynamic-hidden.vue @@ -0,0 +1,32 @@ + + + diff --git a/example/src/demo/pc/badge/is-dot.vue b/example/src/demo/pc/badge/is-dot.vue new file mode 100644 index 000000000..658d00730 --- /dev/null +++ b/example/src/demo/pc/badge/is-dot.vue @@ -0,0 +1,13 @@ + + + diff --git a/example/src/demo/pc/badge/max.vue b/example/src/demo/pc/badge/max.vue new file mode 100644 index 000000000..d64c543d7 --- /dev/null +++ b/example/src/demo/pc/badge/max.vue @@ -0,0 +1,13 @@ + + + diff --git a/example/src/demo/pc/badge/slot-content.vue b/example/src/demo/pc/badge/slot-content.vue new file mode 100644 index 000000000..825e5b351 --- /dev/null +++ b/example/src/demo/pc/badge/slot-content.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/example/src/demo/pc/badge/slot-default.vue b/example/src/demo/pc/badge/slot-default.vue new file mode 100644 index 000000000..1c1273716 --- /dev/null +++ b/example/src/demo/pc/badge/slot-default.vue @@ -0,0 +1,17 @@ + + + diff --git a/example/src/demo/pc/badge/target.vue b/example/src/demo/pc/badge/target.vue new file mode 100644 index 000000000..ea17d9045 --- /dev/null +++ b/example/src/demo/pc/badge/target.vue @@ -0,0 +1,17 @@ + + + diff --git a/example/src/demo/pc/badge/type.vue b/example/src/demo/pc/badge/type.vue new file mode 100644 index 000000000..d1e008fae --- /dev/null +++ b/example/src/demo/pc/badge/type.vue @@ -0,0 +1,25 @@ + + + diff --git a/example/src/demo/pc/breadcrumb/base-on-route.vue b/example/src/demo/pc/breadcrumb/base-on-route.vue new file mode 100644 index 000000000..431ba601e --- /dev/null +++ b/example/src/demo/pc/breadcrumb/base-on-route.vue @@ -0,0 +1,26 @@ + + + diff --git a/example/src/demo/pc/breadcrumb/base.vue b/example/src/demo/pc/breadcrumb/base.vue new file mode 100644 index 000000000..ae0056445 --- /dev/null +++ b/example/src/demo/pc/breadcrumb/base.vue @@ -0,0 +1,20 @@ + + + diff --git a/example/src/demo/pc/breadcrumb/separator.vue b/example/src/demo/pc/breadcrumb/separator.vue new file mode 100644 index 000000000..94ce878bb --- /dev/null +++ b/example/src/demo/pc/breadcrumb/separator.vue @@ -0,0 +1,40 @@ + + + diff --git a/example/src/demo/pc/breadcrumb/slot-default.vue b/example/src/demo/pc/breadcrumb/slot-default.vue new file mode 100644 index 000000000..fd55fa074 --- /dev/null +++ b/example/src/demo/pc/breadcrumb/slot-default.vue @@ -0,0 +1,26 @@ + + + diff --git a/example/src/demo/pc/bulletin-board/active-name.vue b/example/src/demo/pc/bulletin-board/active-name.vue new file mode 100644 index 000000000..a5c0f7117 --- /dev/null +++ b/example/src/demo/pc/bulletin-board/active-name.vue @@ -0,0 +1,100 @@ + + + diff --git a/example/src/demo/pc/bulletin-board/base.vue b/example/src/demo/pc/bulletin-board/base.vue new file mode 100644 index 000000000..fbb6063cb --- /dev/null +++ b/example/src/demo/pc/bulletin-board/base.vue @@ -0,0 +1,99 @@ + + + diff --git a/example/src/demo/pc/bulletin-board/icon.vue b/example/src/demo/pc/bulletin-board/icon.vue new file mode 100644 index 000000000..7129b2ccc --- /dev/null +++ b/example/src/demo/pc/bulletin-board/icon.vue @@ -0,0 +1,101 @@ + + + diff --git a/example/src/demo/pc/bulletin-board/more-link.vue b/example/src/demo/pc/bulletin-board/more-link.vue new file mode 100644 index 000000000..cbb63d1b8 --- /dev/null +++ b/example/src/demo/pc/bulletin-board/more-link.vue @@ -0,0 +1,100 @@ + + + diff --git a/example/src/demo/pc/bulletin-board/route.vue b/example/src/demo/pc/bulletin-board/route.vue new file mode 100644 index 000000000..058fd4e36 --- /dev/null +++ b/example/src/demo/pc/bulletin-board/route.vue @@ -0,0 +1,27 @@ + + + diff --git a/example/src/demo/pc/bulletin-board/tab-title.vue b/example/src/demo/pc/bulletin-board/tab-title.vue new file mode 100644 index 000000000..fbb6063cb --- /dev/null +++ b/example/src/demo/pc/bulletin-board/tab-title.vue @@ -0,0 +1,99 @@ + + + diff --git a/example/src/demo/pc/bulletin-board/title.vue b/example/src/demo/pc/bulletin-board/title.vue new file mode 100644 index 000000000..ccaef893e --- /dev/null +++ b/example/src/demo/pc/bulletin-board/title.vue @@ -0,0 +1,99 @@ + + + diff --git a/example/src/demo/pc/bulletin-board/url.vue b/example/src/demo/pc/bulletin-board/url.vue new file mode 100644 index 000000000..7ed39d565 --- /dev/null +++ b/example/src/demo/pc/bulletin-board/url.vue @@ -0,0 +1,28 @@ + + + diff --git a/example/src/demo/pc/button-group/base.vue b/example/src/demo/pc/button-group/base.vue new file mode 100644 index 000000000..fb9e73abb --- /dev/null +++ b/example/src/demo/pc/button-group/base.vue @@ -0,0 +1,29 @@ + + + diff --git a/example/src/demo/pc/button-group/data.vue b/example/src/demo/pc/button-group/data.vue new file mode 100644 index 000000000..01a935e1b --- /dev/null +++ b/example/src/demo/pc/button-group/data.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/button-group/disabled.vue b/example/src/demo/pc/button-group/disabled.vue new file mode 100644 index 000000000..020780b09 --- /dev/null +++ b/example/src/demo/pc/button-group/disabled.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/button-group/plain.vue b/example/src/demo/pc/button-group/plain.vue new file mode 100644 index 000000000..5f75a3570 --- /dev/null +++ b/example/src/demo/pc/button-group/plain.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/button-group/size.vue b/example/src/demo/pc/button-group/size.vue new file mode 100644 index 000000000..b282955b1 --- /dev/null +++ b/example/src/demo/pc/button-group/size.vue @@ -0,0 +1,30 @@ + + + diff --git a/example/src/demo/pc/button-group/slot-default.vue b/example/src/demo/pc/button-group/slot-default.vue new file mode 100644 index 000000000..1b2708fa5 --- /dev/null +++ b/example/src/demo/pc/button-group/slot-default.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/button-group/text-value-field.vue b/example/src/demo/pc/button-group/text-value-field.vue new file mode 100644 index 000000000..1f90658f7 --- /dev/null +++ b/example/src/demo/pc/button-group/text-value-field.vue @@ -0,0 +1,28 @@ + + + diff --git a/example/src/demo/pc/button/autofocus.vue b/example/src/demo/pc/button/autofocus.vue new file mode 100644 index 000000000..ac2e364bd --- /dev/null +++ b/example/src/demo/pc/button/autofocus.vue @@ -0,0 +1,16 @@ + + + diff --git a/example/src/demo/pc/button/base.vue b/example/src/demo/pc/button/base.vue new file mode 100644 index 000000000..108de2ba6 --- /dev/null +++ b/example/src/demo/pc/button/base.vue @@ -0,0 +1,64 @@ + + + + + diff --git a/example/src/demo/pc/button/circle.vue b/example/src/demo/pc/button/circle.vue new file mode 100644 index 000000000..32ce2d796 --- /dev/null +++ b/example/src/demo/pc/button/circle.vue @@ -0,0 +1,56 @@ + + + + + diff --git a/example/src/demo/pc/button/click.vue b/example/src/demo/pc/button/click.vue new file mode 100644 index 000000000..c4d6d6704 --- /dev/null +++ b/example/src/demo/pc/button/click.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/button/dynamic-disabled.vue b/example/src/demo/pc/button/dynamic-disabled.vue new file mode 100644 index 000000000..6f72b7d17 --- /dev/null +++ b/example/src/demo/pc/button/dynamic-disabled.vue @@ -0,0 +1,40 @@ + + + + + diff --git a/example/src/demo/pc/button/icon.vue b/example/src/demo/pc/button/icon.vue new file mode 100644 index 000000000..b1675b844 --- /dev/null +++ b/example/src/demo/pc/button/icon.vue @@ -0,0 +1,42 @@ + + + diff --git a/example/src/demo/pc/button/image.vue b/example/src/demo/pc/button/image.vue new file mode 100644 index 000000000..8ff5cff12 --- /dev/null +++ b/example/src/demo/pc/button/image.vue @@ -0,0 +1,21 @@ + + + diff --git a/example/src/demo/pc/button/loading.vue b/example/src/demo/pc/button/loading.vue new file mode 100644 index 000000000..f92c74a87 --- /dev/null +++ b/example/src/demo/pc/button/loading.vue @@ -0,0 +1,20 @@ + + + diff --git a/example/src/demo/pc/button/plain.vue b/example/src/demo/pc/button/plain.vue new file mode 100644 index 000000000..389b177fb --- /dev/null +++ b/example/src/demo/pc/button/plain.vue @@ -0,0 +1,20 @@ + + + diff --git a/example/src/demo/pc/button/reset-time.vue b/example/src/demo/pc/button/reset-time.vue new file mode 100644 index 000000000..d6369b7d6 --- /dev/null +++ b/example/src/demo/pc/button/reset-time.vue @@ -0,0 +1,17 @@ + + + diff --git a/example/src/demo/pc/button/round.vue b/example/src/demo/pc/button/round.vue new file mode 100644 index 000000000..d29c7f278 --- /dev/null +++ b/example/src/demo/pc/button/round.vue @@ -0,0 +1,20 @@ + + + diff --git a/example/src/demo/pc/button/size.vue b/example/src/demo/pc/button/size.vue new file mode 100644 index 000000000..b892ae58f --- /dev/null +++ b/example/src/demo/pc/button/size.vue @@ -0,0 +1,19 @@ + + + diff --git a/example/src/demo/pc/button/slot-default.vue b/example/src/demo/pc/button/slot-default.vue new file mode 100644 index 000000000..e036a1aa8 --- /dev/null +++ b/example/src/demo/pc/button/slot-default.vue @@ -0,0 +1,30 @@ + + + diff --git a/example/src/demo/pc/button/text.vue b/example/src/demo/pc/button/text.vue new file mode 100644 index 000000000..ee3d47dd4 --- /dev/null +++ b/example/src/demo/pc/button/text.vue @@ -0,0 +1,16 @@ + + + diff --git a/example/src/demo/pc/button/type.vue b/example/src/demo/pc/button/type.vue new file mode 100644 index 000000000..69cc3a3cd --- /dev/null +++ b/example/src/demo/pc/button/type.vue @@ -0,0 +1,21 @@ + + + diff --git a/example/src/demo/pc/calendar/basic-usage.vue b/example/src/demo/pc/calendar/basic-usage.vue new file mode 100644 index 000000000..e0946e2b8 --- /dev/null +++ b/example/src/demo/pc/calendar/basic-usage.vue @@ -0,0 +1,13 @@ + + + diff --git a/example/src/demo/pc/calendar/calendar-mode.vue b/example/src/demo/pc/calendar/calendar-mode.vue new file mode 100644 index 000000000..d9c697553 --- /dev/null +++ b/example/src/demo/pc/calendar/calendar-mode.vue @@ -0,0 +1,13 @@ + + + diff --git a/example/src/demo/pc/calendar/custom-calendar-toolbar.vue b/example/src/demo/pc/calendar/custom-calendar-toolbar.vue new file mode 100644 index 000000000..4ad25bb6d --- /dev/null +++ b/example/src/demo/pc/calendar/custom-calendar-toolbar.vue @@ -0,0 +1,26 @@ + + + diff --git a/example/src/demo/pc/calendar/custom-day-cell.vue b/example/src/demo/pc/calendar/custom-day-cell.vue new file mode 100644 index 000000000..343d05280 --- /dev/null +++ b/example/src/demo/pc/calendar/custom-day-cell.vue @@ -0,0 +1,59 @@ + + + diff --git a/example/src/demo/pc/calendar/dynamic-add-schedule.vue b/example/src/demo/pc/calendar/dynamic-add-schedule.vue new file mode 100644 index 000000000..24fd359d4 --- /dev/null +++ b/example/src/demo/pc/calendar/dynamic-add-schedule.vue @@ -0,0 +1,55 @@ + + + diff --git a/example/src/demo/pc/calendar/show-selected-date.vue b/example/src/demo/pc/calendar/show-selected-date.vue new file mode 100644 index 000000000..eff34192c --- /dev/null +++ b/example/src/demo/pc/calendar/show-selected-date.vue @@ -0,0 +1,13 @@ + + + diff --git a/example/src/demo/pc/carousel/autoplay.vue b/example/src/demo/pc/carousel/autoplay.vue new file mode 100644 index 000000000..41e73d0b3 --- /dev/null +++ b/example/src/demo/pc/carousel/autoplay.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/example/src/demo/pc/carousel/basic-usage.vue b/example/src/demo/pc/carousel/basic-usage.vue new file mode 100644 index 000000000..d1ac3b3d7 --- /dev/null +++ b/example/src/demo/pc/carousel/basic-usage.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/example/src/demo/pc/carousel/card-mode.vue b/example/src/demo/pc/carousel/card-mode.vue new file mode 100644 index 000000000..b15bd0075 --- /dev/null +++ b/example/src/demo/pc/carousel/card-mode.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/example/src/demo/pc/carousel/carousel-arrow-always.vue b/example/src/demo/pc/carousel/carousel-arrow-always.vue new file mode 100644 index 000000000..a4af82d40 --- /dev/null +++ b/example/src/demo/pc/carousel/carousel-arrow-always.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/example/src/demo/pc/carousel/carousel-arrow-hover.vue b/example/src/demo/pc/carousel/carousel-arrow-hover.vue new file mode 100644 index 000000000..a3cd89e76 --- /dev/null +++ b/example/src/demo/pc/carousel/carousel-arrow-hover.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/example/src/demo/pc/carousel/carousel-arrow-never.vue b/example/src/demo/pc/carousel/carousel-arrow-never.vue new file mode 100644 index 000000000..15fa3a4f2 --- /dev/null +++ b/example/src/demo/pc/carousel/carousel-arrow-never.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/example/src/demo/pc/carousel/close-loop.vue b/example/src/demo/pc/carousel/close-loop.vue new file mode 100644 index 000000000..37161275d --- /dev/null +++ b/example/src/demo/pc/carousel/close-loop.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/example/src/demo/pc/carousel/custom-height.vue b/example/src/demo/pc/carousel/custom-height.vue new file mode 100644 index 000000000..a09601f28 --- /dev/null +++ b/example/src/demo/pc/carousel/custom-height.vue @@ -0,0 +1,48 @@ + + + + + diff --git a/example/src/demo/pc/carousel/indicator-trigger.vue b/example/src/demo/pc/carousel/indicator-trigger.vue new file mode 100644 index 000000000..fd22cdf45 --- /dev/null +++ b/example/src/demo/pc/carousel/indicator-trigger.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/example/src/demo/pc/carousel/initial-index.vue b/example/src/demo/pc/carousel/initial-index.vue new file mode 100644 index 000000000..7443f5484 --- /dev/null +++ b/example/src/demo/pc/carousel/initial-index.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/example/src/demo/pc/carousel/manual-play.vue b/example/src/demo/pc/carousel/manual-play.vue new file mode 100644 index 000000000..141b5d203 --- /dev/null +++ b/example/src/demo/pc/carousel/manual-play.vue @@ -0,0 +1,76 @@ + + + + + diff --git a/example/src/demo/pc/carousel/play-interval.vue b/example/src/demo/pc/carousel/play-interval.vue new file mode 100644 index 000000000..16afc568d --- /dev/null +++ b/example/src/demo/pc/carousel/play-interval.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/example/src/demo/pc/carousel/show-title.vue b/example/src/demo/pc/carousel/show-title.vue new file mode 100644 index 000000000..2bfa338aa --- /dev/null +++ b/example/src/demo/pc/carousel/show-title.vue @@ -0,0 +1,33 @@ + + + + + diff --git a/example/src/demo/pc/carousel/up-down-carousel.vue b/example/src/demo/pc/carousel/up-down-carousel.vue new file mode 100644 index 000000000..9c6045993 --- /dev/null +++ b/example/src/demo/pc/carousel/up-down-carousel.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/example/src/demo/pc/cascader-panel/basic-usage.vue b/example/src/demo/pc/cascader-panel/basic-usage.vue new file mode 100644 index 000000000..d1f561de5 --- /dev/null +++ b/example/src/demo/pc/cascader-panel/basic-usage.vue @@ -0,0 +1,220 @@ + + + + + diff --git a/example/src/demo/pc/cascader-panel/cascader-panel-props.vue b/example/src/demo/pc/cascader-panel/cascader-panel-props.vue new file mode 100644 index 000000000..23b8d3bb4 --- /dev/null +++ b/example/src/demo/pc/cascader-panel/cascader-panel-props.vue @@ -0,0 +1,230 @@ + + + + + diff --git a/example/src/demo/pc/cascader-panel/change.vue b/example/src/demo/pc/cascader-panel/change.vue new file mode 100644 index 000000000..2539a22ac --- /dev/null +++ b/example/src/demo/pc/cascader-panel/change.vue @@ -0,0 +1,250 @@ + + + + + diff --git a/example/src/demo/pc/cascader-panel/custom-option-content.vue b/example/src/demo/pc/cascader-panel/custom-option-content.vue new file mode 100644 index 000000000..7c3b12395 --- /dev/null +++ b/example/src/demo/pc/cascader-panel/custom-option-content.vue @@ -0,0 +1,224 @@ + + + + + diff --git a/example/src/demo/pc/cascader-panel/expand-change.vue b/example/src/demo/pc/cascader-panel/expand-change.vue new file mode 100644 index 000000000..90924f4d7 --- /dev/null +++ b/example/src/demo/pc/cascader-panel/expand-change.vue @@ -0,0 +1,226 @@ + + + + + diff --git a/example/src/demo/pc/cascader/auto-load-checkStrictly.vue b/example/src/demo/pc/cascader/auto-load-checkStrictly.vue new file mode 100644 index 000000000..39a621bf2 --- /dev/null +++ b/example/src/demo/pc/cascader/auto-load-checkStrictly.vue @@ -0,0 +1,36 @@ + + + diff --git a/example/src/demo/pc/cascader/auto-load.vue b/example/src/demo/pc/cascader/auto-load.vue new file mode 100644 index 000000000..25d2a70a3 --- /dev/null +++ b/example/src/demo/pc/cascader/auto-load.vue @@ -0,0 +1,34 @@ + + + diff --git a/example/src/demo/pc/cascader/basic-usage.vue b/example/src/demo/pc/cascader/basic-usage.vue new file mode 100644 index 000000000..c0e3e9a72 --- /dev/null +++ b/example/src/demo/pc/cascader/basic-usage.vue @@ -0,0 +1,216 @@ + + + diff --git a/example/src/demo/pc/cascader/check-strictly-multiple.vue b/example/src/demo/pc/cascader/check-strictly-multiple.vue new file mode 100644 index 000000000..d66ac9afe --- /dev/null +++ b/example/src/demo/pc/cascader/check-strictly-multiple.vue @@ -0,0 +1,207 @@ + + + diff --git a/example/src/demo/pc/cascader/check-strictly.vue b/example/src/demo/pc/cascader/check-strictly.vue new file mode 100644 index 000000000..27d6dc656 --- /dev/null +++ b/example/src/demo/pc/cascader/check-strictly.vue @@ -0,0 +1,219 @@ + + + diff --git a/example/src/demo/pc/cascader/clearable.vue b/example/src/demo/pc/cascader/clearable.vue new file mode 100644 index 000000000..c026c5bbd --- /dev/null +++ b/example/src/demo/pc/cascader/clearable.vue @@ -0,0 +1,220 @@ + + + diff --git a/example/src/demo/pc/cascader/collapse-tags.vue b/example/src/demo/pc/cascader/collapse-tags.vue new file mode 100644 index 000000000..84e427ca3 --- /dev/null +++ b/example/src/demo/pc/cascader/collapse-tags.vue @@ -0,0 +1,223 @@ + + + diff --git a/example/src/demo/pc/cascader/default-multiple.vue b/example/src/demo/pc/cascader/default-multiple.vue new file mode 100644 index 000000000..ab1a60c11 --- /dev/null +++ b/example/src/demo/pc/cascader/default-multiple.vue @@ -0,0 +1,216 @@ + + + diff --git a/example/src/demo/pc/cascader/disabled-items.vue b/example/src/demo/pc/cascader/disabled-items.vue new file mode 100644 index 000000000..3322dda44 --- /dev/null +++ b/example/src/demo/pc/cascader/disabled-items.vue @@ -0,0 +1,215 @@ + + + diff --git a/example/src/demo/pc/cascader/events.vue b/example/src/demo/pc/cascader/events.vue new file mode 100644 index 000000000..fa38f6223 --- /dev/null +++ b/example/src/demo/pc/cascader/events.vue @@ -0,0 +1,257 @@ + + + diff --git a/example/src/demo/pc/cascader/expand-trigger.vue b/example/src/demo/pc/cascader/expand-trigger.vue new file mode 100644 index 000000000..428f4711e --- /dev/null +++ b/example/src/demo/pc/cascader/expand-trigger.vue @@ -0,0 +1,214 @@ + + + diff --git a/example/src/demo/pc/cascader/filter-method.vue b/example/src/demo/pc/cascader/filter-method.vue new file mode 100644 index 000000000..df027e64d --- /dev/null +++ b/example/src/demo/pc/cascader/filter-method.vue @@ -0,0 +1,229 @@ + + + diff --git a/example/src/demo/pc/cascader/filterable-multiple.vue b/example/src/demo/pc/cascader/filterable-multiple.vue new file mode 100644 index 000000000..dea226ac6 --- /dev/null +++ b/example/src/demo/pc/cascader/filterable-multiple.vue @@ -0,0 +1,216 @@ + + + diff --git a/example/src/demo/pc/cascader/filterable.vue b/example/src/demo/pc/cascader/filterable.vue new file mode 100644 index 000000000..fca0dc70f --- /dev/null +++ b/example/src/demo/pc/cascader/filterable.vue @@ -0,0 +1,220 @@ + + + diff --git a/example/src/demo/pc/cascader/props-children.vue b/example/src/demo/pc/cascader/props-children.vue new file mode 100644 index 000000000..0475f08c3 --- /dev/null +++ b/example/src/demo/pc/cascader/props-children.vue @@ -0,0 +1,221 @@ + + + diff --git a/example/src/demo/pc/cascader/show-all-levels.vue b/example/src/demo/pc/cascader/show-all-levels.vue new file mode 100644 index 000000000..6b732f84d --- /dev/null +++ b/example/src/demo/pc/cascader/show-all-levels.vue @@ -0,0 +1,216 @@ + + + diff --git a/example/src/demo/pc/checkbox/basic-usage.vue b/example/src/demo/pc/checkbox/basic-usage.vue new file mode 100644 index 000000000..06d4c426e --- /dev/null +++ b/example/src/demo/pc/checkbox/basic-usage.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/checkbox/button-chek-box.vue b/example/src/demo/pc/checkbox/button-chek-box.vue new file mode 100644 index 000000000..7a3dcbab7 --- /dev/null +++ b/example/src/demo/pc/checkbox/button-chek-box.vue @@ -0,0 +1,34 @@ + + + diff --git a/example/src/demo/pc/checkbox/checkbox-button.vue b/example/src/demo/pc/checkbox/checkbox-button.vue new file mode 100644 index 000000000..204a4a074 --- /dev/null +++ b/example/src/demo/pc/checkbox/checkbox-button.vue @@ -0,0 +1,43 @@ + + + diff --git a/example/src/demo/pc/checkbox/checkbox-events.vue b/example/src/demo/pc/checkbox/checkbox-events.vue new file mode 100644 index 000000000..9de996c39 --- /dev/null +++ b/example/src/demo/pc/checkbox/checkbox-events.vue @@ -0,0 +1,31 @@ + + + diff --git a/example/src/demo/pc/checkbox/checkbox-group.vue b/example/src/demo/pc/checkbox/checkbox-group.vue new file mode 100644 index 000000000..eb6b6344b --- /dev/null +++ b/example/src/demo/pc/checkbox/checkbox-group.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/checkbox/checkbox-slot.vue b/example/src/demo/pc/checkbox/checkbox-slot.vue new file mode 100644 index 000000000..0d6f3c167 --- /dev/null +++ b/example/src/demo/pc/checkbox/checkbox-slot.vue @@ -0,0 +1,30 @@ + + + diff --git a/example/src/demo/pc/checkbox/checked.vue b/example/src/demo/pc/checkbox/checked.vue new file mode 100644 index 000000000..5bb87e2be --- /dev/null +++ b/example/src/demo/pc/checkbox/checked.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/checkbox/content-overflow.vue b/example/src/demo/pc/checkbox/content-overflow.vue new file mode 100644 index 000000000..89579ac08 --- /dev/null +++ b/example/src/demo/pc/checkbox/content-overflow.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/example/src/demo/pc/checkbox/dynamic-create-checkbox.vue b/example/src/demo/pc/checkbox/dynamic-create-checkbox.vue new file mode 100644 index 000000000..5ce92c6bb --- /dev/null +++ b/example/src/demo/pc/checkbox/dynamic-create-checkbox.vue @@ -0,0 +1,73 @@ + + + diff --git a/example/src/demo/pc/checkbox/group-options.vue b/example/src/demo/pc/checkbox/group-options.vue new file mode 100644 index 000000000..13a8f6be2 --- /dev/null +++ b/example/src/demo/pc/checkbox/group-options.vue @@ -0,0 +1,31 @@ + + + diff --git a/example/src/demo/pc/checkbox/indeterminate.vue b/example/src/demo/pc/checkbox/indeterminate.vue new file mode 100644 index 000000000..4c3779ef5 --- /dev/null +++ b/example/src/demo/pc/checkbox/indeterminate.vue @@ -0,0 +1,64 @@ + + + diff --git a/example/src/demo/pc/checkbox/min-max.vue b/example/src/demo/pc/checkbox/min-max.vue new file mode 100644 index 000000000..c6dab83ce --- /dev/null +++ b/example/src/demo/pc/checkbox/min-max.vue @@ -0,0 +1,24 @@ + + + diff --git a/example/src/demo/pc/checkbox/text.vue b/example/src/demo/pc/checkbox/text.vue new file mode 100644 index 000000000..d4742845a --- /dev/null +++ b/example/src/demo/pc/checkbox/text.vue @@ -0,0 +1,35 @@ + + + diff --git a/example/src/demo/pc/checkbox/vertical-checkbox.vue b/example/src/demo/pc/checkbox/vertical-checkbox.vue new file mode 100644 index 000000000..e419f7a98 --- /dev/null +++ b/example/src/demo/pc/checkbox/vertical-checkbox.vue @@ -0,0 +1,24 @@ + + + diff --git a/example/src/demo/pc/checkbox/with-border.vue b/example/src/demo/pc/checkbox/with-border.vue new file mode 100644 index 000000000..2e5aa176c --- /dev/null +++ b/example/src/demo/pc/checkbox/with-border.vue @@ -0,0 +1,65 @@ + + + diff --git a/example/src/demo/pc/col/base.vue b/example/src/demo/pc/col/base.vue new file mode 100644 index 000000000..6fe18e559 --- /dev/null +++ b/example/src/demo/pc/col/base.vue @@ -0,0 +1,65 @@ + + + + + diff --git a/example/src/demo/pc/col/col-move.vue b/example/src/demo/pc/col/col-move.vue new file mode 100644 index 000000000..09ada525d --- /dev/null +++ b/example/src/demo/pc/col/col-move.vue @@ -0,0 +1,39 @@ + + + + + diff --git a/example/src/demo/pc/col/order.vue b/example/src/demo/pc/col/order.vue new file mode 100644 index 000000000..858aae011 --- /dev/null +++ b/example/src/demo/pc/col/order.vue @@ -0,0 +1,71 @@ + + + + + diff --git a/example/src/demo/pc/col/tag.vue b/example/src/demo/pc/col/tag.vue new file mode 100644 index 000000000..adeb83bd6 --- /dev/null +++ b/example/src/demo/pc/col/tag.vue @@ -0,0 +1,41 @@ + + + + + diff --git a/example/src/demo/pc/collapse/accordion.vue b/example/src/demo/pc/collapse/accordion.vue new file mode 100644 index 000000000..2aff5dd33 --- /dev/null +++ b/example/src/demo/pc/collapse/accordion.vue @@ -0,0 +1,57 @@ + + + diff --git a/example/src/demo/pc/collapse/basic-usage.vue b/example/src/demo/pc/collapse/basic-usage.vue new file mode 100644 index 000000000..23d3fb26c --- /dev/null +++ b/example/src/demo/pc/collapse/basic-usage.vue @@ -0,0 +1,49 @@ + + + diff --git a/example/src/demo/pc/collapse/block-close.vue b/example/src/demo/pc/collapse/block-close.vue new file mode 100644 index 000000000..91997ece9 --- /dev/null +++ b/example/src/demo/pc/collapse/block-close.vue @@ -0,0 +1,55 @@ + + + diff --git a/example/src/demo/pc/collapse/collapse-events.vue b/example/src/demo/pc/collapse/collapse-events.vue new file mode 100644 index 000000000..c40af745c --- /dev/null +++ b/example/src/demo/pc/collapse/collapse-events.vue @@ -0,0 +1,57 @@ + + + diff --git a/example/src/demo/pc/collapse/custom-collapse-title.vue b/example/src/demo/pc/collapse/custom-collapse-title.vue new file mode 100644 index 000000000..df12a514c --- /dev/null +++ b/example/src/demo/pc/collapse/custom-collapse-title.vue @@ -0,0 +1,64 @@ + + + + + diff --git a/example/src/demo/pc/collapse/dynamic-disable.vue b/example/src/demo/pc/collapse/dynamic-disable.vue new file mode 100644 index 000000000..5dc1407e2 --- /dev/null +++ b/example/src/demo/pc/collapse/dynamic-disable.vue @@ -0,0 +1,49 @@ + + + diff --git a/example/src/demo/pc/collapse/nested-form.vue b/example/src/demo/pc/collapse/nested-form.vue new file mode 100644 index 000000000..1977c1d6c --- /dev/null +++ b/example/src/demo/pc/collapse/nested-form.vue @@ -0,0 +1,115 @@ + + + diff --git a/example/src/demo/pc/collapse/nested-grid.vue b/example/src/demo/pc/collapse/nested-grid.vue new file mode 100644 index 000000000..58db5c7d8 --- /dev/null +++ b/example/src/demo/pc/collapse/nested-grid.vue @@ -0,0 +1,87 @@ + + + diff --git a/example/src/demo/pc/color/auxiliary-color.vue b/example/src/demo/pc/color/auxiliary-color.vue new file mode 100644 index 000000000..d4b41345e --- /dev/null +++ b/example/src/demo/pc/color/auxiliary-color.vue @@ -0,0 +1,53 @@ + + + + + diff --git a/example/src/demo/pc/color/main-color.vue b/example/src/demo/pc/color/main-color.vue new file mode 100644 index 000000000..51b987e70 --- /dev/null +++ b/example/src/demo/pc/color/main-color.vue @@ -0,0 +1,61 @@ + + + + + diff --git a/example/src/demo/pc/color/neutral-color.vue b/example/src/demo/pc/color/neutral-color.vue new file mode 100644 index 000000000..5ed16ae10 --- /dev/null +++ b/example/src/demo/pc/color/neutral-color.vue @@ -0,0 +1,96 @@ + + + + + diff --git a/example/src/demo/pc/components.js b/example/src/demo/pc/components.js new file mode 100644 index 000000000..4649b7b1d --- /dev/null +++ b/example/src/demo/pc/components.js @@ -0,0 +1,954 @@ +export default { + alert: { + Attributes: { + closable: 'closable', + description: 'description', + type: 'type', + icon: 'icon', + size: 'size', + title: 'title', + center: 'center', + 'show-icon': 'show-icon', + 'close-text': 'close-text' + }, + Events: { + close: 'close' + }, + Slots: { + default: 'slot-default', + title: 'slot-title' + } + }, + + badge: { + Attributes: { + value: 'value', + max: 'max', + 'is-dot': 'is-dot', + hidden: 'hidden', + href: 'href', + target: 'target', + type: 'type' + }, + Slots: { + default: 'slot-default', + content: 'slot-content' + } + }, + + breadcrumb: { + Attributes: { + separator: 'separator', + 'separator-class': 'separator', + replace: 'replace', + to: 'to' + }, + Slots: { + default: 'slot-default' + } + }, + + 'bulletin-board': { + Attributes: { + data: 'data', + 'more-link': 'more-link', + 'active-name': 'active-name', + icon: 'icon', + 'show-more': 'show-more', + 'tab-title': 'tab-title', + title: 'title' + } + }, + + button: { + Attributes: { + 'native-type': 'native-type', + type: 'type', + size: 'size', + autofocus: 'autofocus', + circle: 'circle', + disabled: 'disabled', + icon: 'icon', + loading: 'loading', + plain: 'plain', + 'reset-time': 'reset-time', + round: 'round' + }, + Events: { + click: 'click' + }, + Slots: { + default: 'slot-default' + } + }, + + 'button-group': { + Attributes: { + data: 'data', + disabled: 'disabled', + plain: 'plain', + 'text-field': 'text-field', + value: 'value', + 'value-field': 'value-field' + }, + Slots: { + default: 'slot-default' + } + }, + + input: { + Attributes: { + 'suffix-icon': 'suffix-icon', + maxlength: 'maxlength', + 'prefix-icon': 'prefix-icon', + readonly: 'readonly', + clearable: 'clearable', + type: 'type', + 'value / v-model': 'value', + autocomplete: 'autocomplete', + counter: 'counter', + autofocus: 'autofocus', + autosize: 'autosize', + disabled: 'disabled', + form: 'form', + label: 'label', + max: 'max', + min: 'min', + minlength: 'minlength', + name: 'name', + placeholder: 'placeholder', + resize: 'resize', + rows: 'rows', + 'show-password': 'show-password', + 'show-word-limit': 'show-word-limit', + size: 'size', + step: 'step', + tabindex: 'tabindex', + 'validate-event': 'validate-event' + }, + Events: { + blur: 'event-blur', + change: 'event-change', + clear: 'event-clear', + focus: 'event-focus', + input: 'event-input' + }, + Methods: { + addMemory: 'method-addMemory', + blur: 'method-blur', + focus: 'method-focus', + select: 'method-select' + }, + Slots: { + append: 'slot-append', + prefix: 'slot-prefix', + prepend: 'slot-prepend', + suffix: 'slot-suffix' + } + }, + + select: { + Attributes: { + multiple: 'multiple', + clearable: 'clearable', + 'value / v-model': 'value', + autocomplete: 'autocomplete', + 'allow-create': 'allow-create', + 'automatic-dropdown': 'automatic-dropdown', + 'collapse-tags': 'collapse-tags', + 'default-first-option': 'default-first-option', + disabled: 'disabled', + 'filter-method': 'filter-method', + filterable: 'filterable', + loading: 'loading', + 'loading-text': 'loading-text', + 'multiple-limit': 'multiple-limit', + name: 'name', + 'no-data-text': 'no-data-text', + 'no-match-text': 'no-match-text', + placeholder: 'placeholder', + 'popper-append-to-body': 'popper-append-to-body', + 'popper-class': 'popper-class', + remote: 'remote', + 'remote-method': 'remote-method', + 'reserve-keyword': 'reserve-keyword', + size: 'size', + 'value-key': 'value-key' + }, + Methods: { + blur: 'method-blur', + focus: 'method-focus' + }, + Events: { + change: 'event-change', + clear: 'event-clear', + blur: 'event-blur', + focus: 'event-focus', + 'remove-tag': 'event-remove-tag', + 'visible-change': 'event-visible-change' + }, + Slots: { + default: 'slot-default', + empty: 'slot-empty', + prefix: 'slot-prefix' + } + }, + + option: { + Attributes: { + disabled: 'disabled', + label: 'label', + value: 'value' + } + }, + + 'option-group': { + Attributes: { + disabled: 'disabled', + label: 'label' + } + }, + + 'scroll-text': { + Attributes: { + direction: 'direction', + 'hover-stop': 'text', + text: 'text', + time: 'text' + }, + Events: {}, + Methods: {}, + Slots: { + default: 'slots' + } + }, + container: { + Attributes: { + 'aside-width': 'base', + 'footer-height': 'base', + 'header-height': 'base', + pattern: 'pattern' + }, + Events: {}, + Methods: {}, + Slots: {} + }, + switch: { + Attributes: { + disabled: 'disabled', + mini: 'disabled', + 'value / v-model': 'truevlue', + trueValue: 'truevlue', + falseValue: 'truevlue' + }, + Events: {}, + Methods: {}, + Slots: {} + }, + tag: { + Attributes: { + border: 'hit', + hit: 'hit', + color: 'color3', + type: 'type', + closeable: 'closeable', + createable: 'closeable', + effect: 'effect', + disabled: 'disabled', + mode: 'border', + readonly: 'disabled', + selectable: 'border', + size: 'tag-size', + value: 'base' + }, + Events: { + click: 'tag-event-click', + close: 'tag-event-close' + }, + Methods: {}, + Slots: { + new: 'slotNew', + text: 'slotText' + } + }, + tabs: { + Attributes: { + activeName: 'basic-usage', + tabStyle: 'tab-style-card', + withAdd: 'with-add', + withClose: 'with-close', + position: 'position-bottom', + 'before-leave': 'before-leave', + stretch: 'stretch-wh', + size: 'tabs-size', + value: 'basic-value' + }, + Events: { + add: 'tabs-events-add', + click: 'tabs-events-click', + close: 'tabs-events-close', + edit: 'tabs-events-edit' + }, + Methods: {}, + Slots: { + title: 'custom-tab-title' + } + }, + 'text-popup': { + Attributes: { + label: 'label', + placeholder: 'placeholder', + readonly: 'readonly', + value: 'value', + width: 'width', + separtor: 'separtor' + }, + Events: {}, + Methods: {}, + Slots: {} + }, + search: { + Attributes: { + 'default-value': 'default-value', + mini: 'mini-mode', + placeholder: 'basic-usage', + 'search-types': 'search-types', + transparent: 'transparent-mode' + }, + Events: { + change: 'search-events', + search: 'search-events' + }, + Methods: {}, + Slots: { + poplist: 'custom-search-types', + text: 'show-selected-types' + } + }, + slider: { + Attributes: { + value: 'basic-usage', + mini: 'disabled', + 'value / v-model': 'truevlue', + trueValue: 'truevlue', + falseValue: 'truevlue' + }, + Events: {}, + Methods: {}, + Slots: {} + }, + split: { + Attributes: { + 'left-top-min': 'base', + mode: 'base', + 'right-bottom-min': 'base', + value: 'base', + transparent: 'base' + }, + Events: { + moveend: 'events', + movestart: 'events', + moving: 'events' + }, + Methods: {}, + Slots: { + bottom: 'slots', + left: 'slots', + right: 'slots', + top: 'slots', + trigger: 'slots' + } + }, + 'card-template': { + Attributes: { + 'body-style': 'base', + 'header-line': 'base' + }, + Events: {}, + Methods: {}, + Slots: { + default: 'slots', + footer: 'slots', + header: 'slots' + } + }, + col: { + Attributes: { + span: 'base', + move: 'move', + offset: 'move', + xs: 'responsive', + sm: 'responsive', + xl: 'responsive', + md: 'responsive', + lg: 'responsive', + no: 'move', + tag: 'tag' + }, + Events: {}, + Methods: {}, + Slots: {} + }, + loading: { + Attributes: { + text: 'base', + background: 'background', + body: 'body', + customClass: 'custom-class', + lock: 'lock', + spinner: 'spinner', + transparent: 'opacity', + fullscreen: 'fullscreen', + target: 'target' + }, + Events: {}, + Methods: {}, + Slots: {} + }, + progress: { + Attributes: { + color: 'custom-color', + percentage: 'basic-usage', + 'show-text': 'format-text', + status: 'progress-status', + 'stroke-width': 'progress-width', + 'text-inside': 'text-inside-or-no-text', + type: 'progress-type' + } + }, + numeric: { + Attributes: { + controls: 'controls', + disabled: 'dynamic-disabled', + max: 'max-min', + min: 'max-min', + mouseWheel: 'mouse-wheel', + precision: 'precision', + step: 'about-step' + } + }, + milestone: { + Attributes: { + data: 'data-source', + 'completed-field': 'completed-field', + 'flag-before': 'flag-before', + 'flag-content-field': 'flag-content-field', + 'flag-field': 'flag-field', + 'flag-name-field': 'flag-name-field', + 'flag-status-field': 'flag-status-field', + 'line-style': 'line-style', + 'milestones-status': 'base', + 'show-number': 'show-number', + solid: 'solid', + space: 'space', + start: 'space', + 'status-field': 'status-field', + 'time-field': 'time-field' + }, + Events: { + click: 'click', + flagclick: 'click' + }, + Methods: {}, + Slots: { + bottom: 'bottom', + flag: 'flag', + top: 'top' + } + }, + modal: { + Attributes: { + 'value,v-model': 'value', + type: 'type', + id: 'id', + duration: 'duration', + fullscreen: 'fullscreen', + width: 'width', + height: 'height', + mask: 'lock-view', + message: 'message', + resize: 'resize', + showFooter: 'showFooter', + showHeader: 'showHeader', + status: 'status', + title: 'title', + top: 'top', + zIndex: 'zIndex', + 'min-width': 'min-width', + 'min-height': 'min-height', + 'esc-closable': 'esc-closable', + 'lock-view': 'lock-view', + 'lock-scroll': 'lock-scroll', + 'mask-closable': 'mask-closable' + }, + Events: { + confirm: 'confirm-event', + cancel: 'cancel-event', + close: 'close-event', + show: 'show-event', + hide: 'hide-event', + zoom: 'zoom-event' + }, + Methods: {}, + Slots: { + default: 'value', + footer: 'footer-slot' + } + }, + steps: { + Attributes: { + data: 'data-resource', + active: 'order-progress', + 'count-field': 'custom-field', + 'name-field': 'custom-field', + space: 'space', + 'status-field': 'custom-field' + }, + Events: { + click: 'click' + }, + Methods: {}, + Slots: { + item: 'slot' + } + }, + 'user-head': { + Attributes: { + 'background-color': 'color', + color: 'color', + 'message-total': 'message-total', + 'message-type': 'message-type', + 'message-upper-limit': 'message-upper-limit', + min: 'shape', + round: 'shape', + type: 'type', + value: 'type' + }, + Events: {}, + Methods: {}, + Slots: { + default: 'slot' + } + }, + 'fall-menu': { + Attributes: { + data: 'a' + }, + Events: {}, + Methods: {}, + Slots: { + left: 'level', + level1: 'level', + level2: 'level', + level3: 'level', + right: 'level' + } + }, + rate: { + Attributes: { + colors: 'score', + 'disabled-void-color': 'disabledcolor', + 'disabled-void-icon-class': 'disabledcolor', + 'show-text': 'readiconclass', + 'icon-classes': 'colors', + disabled: 'disabledcolor', + 'text-color': 'readiconclass', + texts: 'readiconclass', + 'void-icon-class': 'colors', + 'allow-half': 'half', + 'score-template': 'textconfig', + 'show-score': 'textconfig', + 'void-color': 'colors', + 'text-on-bottom': 'half', + 'value / v-model': 'half', + size: 'spacesize', + space: 'spacesize', + 'high-threshold': 'score', + 'low-threshold': 'score', + max: 'score', + radio: 'radio' + }, + Events: { + change: 'events' + }, + Methods: {}, + Slots: {} + }, + 'ip-address': { + Attributes: { + delimiter: 'delimiter', + disabled: 'disabled', + readonly: 'readonly', + type: 'type', + value: 'type' + }, + Events: { + select: 'select', + input: 'input', + change: 'change', + focus: 'focus', + blur: 'blur' + }, + Methods: {}, + Slots: { + 默认插槽: 'slots' + } + }, + row: { + Attributes: { + align: 'align', + gutter: 'gutter', + justify: 'justify', + order: 'order', + tag: 'tag1' + }, + Events: {}, + Methods: {}, + Slots: {} + }, + 'user-contact': { + Attributes: { + data: 'basic-usage', + 'show-img': 'support-open-espace', + 'show-name': 'support-open-espace', + 'show-description': 'support-open-espace' + }, + Events: {}, + Methods: {}, + Slots: {} + }, + 'user-link': { + Attributes: { + value: 'basic-usage', + 'value-split': 'value-split', + 'text-split': 'text-split', + 'value-field': 'value-field', + 'text-field': 'text-field', + service: 'custom-service' + }, + Events: {}, + Slots: {}, + Methods: {} + }, + tree: { + Attributes: { + accordion: 'accordion-mode', + 'allow-drag': 'allow-drag', + data: 'data-source', + 'allow-drop': 'allow-drop', + 'auto-expand-parent': 'auto-expand-parent', + 'basic-usage': 'basic-usage', + 'check-descendants': 'check-descendants', + 'check-on-click-node': 'check-on-click-node', + 'check-strictly': 'check-strictly', + 'current-node-key': 'current-node-key', + 'custom-empty-text': 'custom-empty-text', + 'custom-node-icon': 'custom-node-icon', + 'default-checked-keys': 'default-checked-keys', + 'default-expand-all': 'default-expand-all', + 'default-expanded-keys': 'default-expanded-keys', + 'disable-node': 'disable-node', + 'expand-on-click-node': 'expand-on-click-node', + 'filter-node-method': 'filter-node', + 'highlight-current': 'highlight-current', + indent: 'indent', + 'icon-class': 'icon-class', + 'node-draggable': 'node-draggable', + 'node-key': 'node-key', + props: 'node-props-config', + 'render-after-expand': 'render-after-expand', + 'render-content': 'render-content', + 'show-checkbox': 'show-checkbox', + 'lazy-load': 'lazy-load-node' + }, + Events: {}, + Methods: {}, + Slots: {} + }, + + 'time-select': { + Attributes: { + 'arrow-control': 'arrow-control', + 'clear-icon': 'clear-icon', + clearable: 'clearable', + 'default-time': 'default-time', + 'default-value': 'default-value', + disabled: 'disabled', + editable: 'editable', + 'start-placeholder': 'range-placeholder', + 'end-placeholder': 'range-placeholder', + placeholder: 'basic-usage', + name: '', + value: 'basic-usage', + 'v-model': 'basic-usage', + 'picker-options': 'picker-options', + 'popper-class': '', + 'prefix-icon': 'prefix-icon', + 'range-separator': '', + size: 'size-mini' + }, + Events: { + add: 'picker-events-add', + click: 'picker-events-click', + close: 'picker-events-close', + edit: 'picker-events-edit' + }, + Methods: {}, + Slots: { + title: 'custom-tab-title' + } + }, + transfer: { + Attributes: { + 'button-texts': 'custom-button-texts', + columns: '', + data: '', + 'drop-config': 'drop-config', + 'filter-method': 'custom-filter-method', + 'filter-placeholder': 'filter-placeholder', + filterable: 'filterable', + format: 'checked-format-text', + 'left-default-checked': 'default-checked', + 'page-vo': '', + props: 'props-of-data-source', + 'render-content': 'custom-render-content', + 'render-type': '', + 'right-default-checked': 'default-checked', + 'show-all-btn': '', + sortable: '', + 'target-order': 'custom-data-items', + titles: 'custom-transfer-titles', + 'to-left-disable': '', + 'to-right-disable': '', + 'value/v-model': 'basic-usage' + }, + Events: { + change: 'transfer-events', + 'left-check-change': 'transfer-events', + 'right-check-change': 'transfer-events' + }, + Slots: { + default: 'custom-data-items', + 'left-footer': 'custom-footer', + 'right-footer': 'custom-footer' + }, + Methods: { + clearQuery: 'manual-clear-query' + } + }, + + logout: { + Attributes: { + guestRole: 'basic-usage', + service: 'custom-service' + } + }, + + user: { + Attributes: { + value: 'basic-usage', + multiple: 'multiple-users', + disabled: 'dynamic-disable', + 'value-split': 'value-split', + 'value-field': 'value-field', + 'text-field': 'text-field', + cache: 'cache-users', + 'cache-key': 'cache-users', + delay: 'delay-load', + 'suggest-length': 'load-after-input-the-length', + 'cache-fields': 'cache-users', + service: 'custom-service', + 'collapse-tags': '', + placeholder: 'custom-placeholder', + 'expand-tags': '', + sortable: 'custom-sort', + size: 'user-select-size' + }, + Events: {}, + Slots: {}, + Methods: {} + }, + carousel: { + Attributes: {}, + Events: {}, + Methods: {}, + Slots: {} + }, + checkbox: { + Attributes: {}, + Events: {}, + Methods: {}, + Slots: {} + }, + 'dialog-box': { + Attributes: {}, + Events: {}, + Methods: {}, + Slots: {} + }, + radio: { + Attributes: { + disabled: 'dynamic-disable', + border: 'with-border', + label: 'basic-usage', + name: '', + size: 'radio-size' + }, + Events: { + change: 'radio-events' + }, + Slots: { + default: 'basic-usage' + }, + Methods: {} + }, + pager: { + Attributes: { + 'pager-count': 'pager-count', + mode: 'pager-mode', + 'value / v-model': 'basic-usage', + 'page-sizes': 'page-size', + layout: 'custom-layout', + 'current-page': 'current-page', + 'hide-on-single-page': 'hide-on-single-page', + 'next-text': 'custom-next-prev-text', + 'page-count': 'page-count', + 'page-size': 'page-size', + 'prev-text': 'custom-next-prev-text', + total: 'pager-in-grid' + }, + Events: { + 'size-change': 'pager-events', + 'current-change': 'pager-events', + 'next-click': 'pager-events', + 'prev-click': 'pager-events' + }, + Methods: {}, + Slots: { + default: '' + } + }, + collapse: { + Attributes: { + 'value / v-model': 'basic-usage', + accordion: 'accordion' + }, + Events: { + change: 'collapse-events' + }, + Methods: {}, + Slots: {} + }, + 'slide-bar': { + Attributes: { + value: 'basic-usage', + 'init-blocks': 'basic-usage', + 'wheel-blocks': 'wheel-blocks', + tag: 'custom-tag', + 'sub-tag': 'custom-tag' + }, + Events: { + click: 'slide-bar-events', + 'before-click': 'slide-bar-events' + }, + Methods: {}, + Slots: { + default: 'custom-content' + } + }, + 'credit-card-form': { + Attributes: { + 'form-data': 'basic-usage' + }, + Events: { + 'input-card-cvv': 'basic-usage', + 'input-card-month': 'basic-usage', + 'input-card-name': 'basic-usage', + 'input-card-number': 'basic-usage', + 'input-card-year': 'basic-usage', + submit: 'basic-usage' + }, + Methods: {}, + Slots: {} + }, + 'time-line': { + Attributes: { + vertical: 'vertical-step', + 'show-number': 'show-number', + 'name-field': 'different-data', + 'time-field': 'different-data', + start: 'set-start-value', + data: 'basic-usage', + space: 'set-step-width', + active: 'basic-usage', + reverse: 'vertical-step' + }, + Events: { + click: 'basic-usage' + }, + Methods: {}, + Slots: { + top: 'custom-normal-step', + bottom: 'custom-normal-step', + left: 'custom-vertical-step', + right: 'custom-vertical-step' + } + }, + 'date-picker': { + Attributes: { + 'value/v-model': 'basic-usage', + align: 'align', + 'clear-icon': 'about-clear', + clearable: 'about-clear', + type: 'date-range', + 'picker-options': 'date-range-shortcuts', + 'start-placeholder': 'custom-range', + 'end-placeholder': 'custom-range', + 'range-separator': 'custom-range', + 'default-time': 'default-time-of-range', + disabled: 'disabled', + 'default-value': 'default-value', + editable: 'editable', + format: 'about-format', + 'prefix-icon': 'custom-prefix-icon', + size: 'set-size', + placeholder: 'custom-placeholder', + 'unlink-panels': 'unlink-panels' + }, + Events: { + blur: 'date-picker-events', + change: 'date-picker-events', + focus: 'date-picker-events' + }, + Methods: {}, + Slots: {} + }, + locales: { + Attributes: { + local: '', + 'change-lang': '', + service: 'custom-service' + }, + Events: {}, + Methods: {}, + Slots: {} + }, + 'logon-user': { + Attributes: { + service: 'custom-service' + }, + Events: {}, + Methods: {}, + Slots: {} + }, + 'user-account': { + Attributes: { + service: 'custom-service' + }, + Events: {}, + Methods: {}, + Slots: { + default: 'custom-operation' + } + } +} diff --git a/example/src/demo/pc/container/basic-usage.vue b/example/src/demo/pc/container/basic-usage.vue new file mode 100644 index 000000000..cb69e7325 --- /dev/null +++ b/example/src/demo/pc/container/basic-usage.vue @@ -0,0 +1,58 @@ + + + + + diff --git a/example/src/demo/pc/container/classic.vue b/example/src/demo/pc/container/classic.vue new file mode 100644 index 000000000..71a4ba45e --- /dev/null +++ b/example/src/demo/pc/container/classic.vue @@ -0,0 +1,72 @@ + + + + + diff --git a/example/src/demo/pc/container/custom-container.vue b/example/src/demo/pc/container/custom-container.vue new file mode 100644 index 000000000..a54579c0f --- /dev/null +++ b/example/src/demo/pc/container/custom-container.vue @@ -0,0 +1,108 @@ + + + + + diff --git a/example/src/demo/pc/container/custom-with-height.vue b/example/src/demo/pc/container/custom-with-height.vue new file mode 100644 index 000000000..525c4f199 --- /dev/null +++ b/example/src/demo/pc/container/custom-with-height.vue @@ -0,0 +1,80 @@ + + + + + diff --git a/example/src/demo/pc/container/fashion.vue b/example/src/demo/pc/container/fashion.vue new file mode 100644 index 000000000..42f8bc407 --- /dev/null +++ b/example/src/demo/pc/container/fashion.vue @@ -0,0 +1,58 @@ + + + + + diff --git a/example/src/demo/pc/container/legend.vue b/example/src/demo/pc/container/legend.vue new file mode 100644 index 000000000..0f7c755a1 --- /dev/null +++ b/example/src/demo/pc/container/legend.vue @@ -0,0 +1,61 @@ + + + + + diff --git a/example/src/demo/pc/container/simple.vue b/example/src/demo/pc/container/simple.vue new file mode 100644 index 000000000..e9ba0cfaf --- /dev/null +++ b/example/src/demo/pc/container/simple.vue @@ -0,0 +1,55 @@ + + + + + diff --git a/example/src/demo/pc/credit-card-form/background-image.vue b/example/src/demo/pc/credit-card-form/background-image.vue new file mode 100644 index 000000000..4a98ad52f --- /dev/null +++ b/example/src/demo/pc/credit-card-form/background-image.vue @@ -0,0 +1,25 @@ + + + diff --git a/example/src/demo/pc/credit-card-form/basic-usage.vue b/example/src/demo/pc/credit-card-form/basic-usage.vue new file mode 100644 index 000000000..15359ab0d --- /dev/null +++ b/example/src/demo/pc/credit-card-form/basic-usage.vue @@ -0,0 +1,24 @@ + + + diff --git a/example/src/demo/pc/credit-card-form/credit-card-form-events.vue b/example/src/demo/pc/credit-card-form/credit-card-form-events.vue new file mode 100644 index 000000000..bb93a7c41 --- /dev/null +++ b/example/src/demo/pc/credit-card-form/credit-card-form-events.vue @@ -0,0 +1,55 @@ + + + diff --git a/example/src/demo/pc/crop/aspect-ratio.vue b/example/src/demo/pc/crop/aspect-ratio.vue new file mode 100644 index 000000000..d195d8afa --- /dev/null +++ b/example/src/demo/pc/crop/aspect-ratio.vue @@ -0,0 +1,31 @@ + + + diff --git a/example/src/demo/pc/crop/auto-crop-area.vue b/example/src/demo/pc/crop/auto-crop-area.vue new file mode 100644 index 000000000..a4a9b7cde --- /dev/null +++ b/example/src/demo/pc/crop/auto-crop-area.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/crop/basic-usage.vue b/example/src/demo/pc/crop/basic-usage.vue new file mode 100644 index 000000000..d55544ec6 --- /dev/null +++ b/example/src/demo/pc/crop/basic-usage.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/crop/crop-meth.vue b/example/src/demo/pc/crop/crop-meth.vue new file mode 100644 index 000000000..f2d8f4412 --- /dev/null +++ b/example/src/demo/pc/crop/crop-meth.vue @@ -0,0 +1,32 @@ + + + diff --git a/example/src/demo/pc/crop/drag-mode.vue b/example/src/demo/pc/crop/drag-mode.vue new file mode 100644 index 000000000..1bbaf3c96 --- /dev/null +++ b/example/src/demo/pc/crop/drag-mode.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/crop/event-about-crop.vue b/example/src/demo/pc/crop/event-about-crop.vue new file mode 100644 index 000000000..f7f0c483f --- /dev/null +++ b/example/src/demo/pc/crop/event-about-crop.vue @@ -0,0 +1,58 @@ + + + diff --git a/example/src/demo/pc/crop/event-ready.vue b/example/src/demo/pc/crop/event-ready.vue new file mode 100644 index 000000000..8b40e4189 --- /dev/null +++ b/example/src/demo/pc/crop/event-ready.vue @@ -0,0 +1,31 @@ + + + diff --git a/example/src/demo/pc/crop/get-container-data.vue b/example/src/demo/pc/crop/get-container-data.vue new file mode 100644 index 000000000..606aceaec --- /dev/null +++ b/example/src/demo/pc/crop/get-container-data.vue @@ -0,0 +1,31 @@ + + + diff --git a/example/src/demo/pc/crop/get-crop-box-data.vue b/example/src/demo/pc/crop/get-crop-box-data.vue new file mode 100644 index 000000000..ea99ed204 --- /dev/null +++ b/example/src/demo/pc/crop/get-crop-box-data.vue @@ -0,0 +1,31 @@ + + + diff --git a/example/src/demo/pc/crop/get-cropped-canvas.vue b/example/src/demo/pc/crop/get-cropped-canvas.vue new file mode 100644 index 000000000..553d3becb --- /dev/null +++ b/example/src/demo/pc/crop/get-cropped-canvas.vue @@ -0,0 +1,42 @@ + + + diff --git a/example/src/demo/pc/crop/get-data.vue b/example/src/demo/pc/crop/get-data.vue new file mode 100644 index 000000000..5f768e7ca --- /dev/null +++ b/example/src/demo/pc/crop/get-data.vue @@ -0,0 +1,35 @@ + + + diff --git a/example/src/demo/pc/crop/get-image-data.vue b/example/src/demo/pc/crop/get-image-data.vue new file mode 100644 index 000000000..f7329eeb7 --- /dev/null +++ b/example/src/demo/pc/crop/get-image-data.vue @@ -0,0 +1,31 @@ + + + diff --git a/example/src/demo/pc/crop/min-crop-box-width-height.vue b/example/src/demo/pc/crop/min-crop-box-width-height.vue new file mode 100644 index 000000000..e45a85cda --- /dev/null +++ b/example/src/demo/pc/crop/min-crop-box-width-height.vue @@ -0,0 +1,30 @@ + + + diff --git a/example/src/demo/pc/crop/no-background.vue b/example/src/demo/pc/crop/no-background.vue new file mode 100644 index 000000000..5349f5635 --- /dev/null +++ b/example/src/demo/pc/crop/no-background.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/crop/no-guides.vue b/example/src/demo/pc/crop/no-guides.vue new file mode 100644 index 000000000..0e9346141 --- /dev/null +++ b/example/src/demo/pc/crop/no-guides.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/crop/no-modal.vue b/example/src/demo/pc/crop/no-modal.vue new file mode 100644 index 000000000..76f732053 --- /dev/null +++ b/example/src/demo/pc/crop/no-modal.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/crop/replace-image.vue b/example/src/demo/pc/crop/replace-image.vue new file mode 100644 index 000000000..be9bf2bda --- /dev/null +++ b/example/src/demo/pc/crop/replace-image.vue @@ -0,0 +1,35 @@ + + + diff --git a/example/src/demo/pc/crop/view-mode.vue b/example/src/demo/pc/crop/view-mode.vue new file mode 100644 index 000000000..bc28bdce5 --- /dev/null +++ b/example/src/demo/pc/crop/view-mode.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/crop/wheel-zoom-ratio.vue b/example/src/demo/pc/crop/wheel-zoom-ratio.vue new file mode 100644 index 000000000..160c9240b --- /dev/null +++ b/example/src/demo/pc/crop/wheel-zoom-ratio.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/crop/zoom-on-wheel.vue b/example/src/demo/pc/crop/zoom-on-wheel.vue new file mode 100644 index 000000000..f9c02036c --- /dev/null +++ b/example/src/demo/pc/crop/zoom-on-wheel.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/date-picker/about-clear.vue b/example/src/demo/pc/date-picker/about-clear.vue new file mode 100644 index 000000000..147d24c6e --- /dev/null +++ b/example/src/demo/pc/date-picker/about-clear.vue @@ -0,0 +1,41 @@ + + + diff --git a/example/src/demo/pc/date-picker/about-format.vue b/example/src/demo/pc/date-picker/about-format.vue new file mode 100644 index 000000000..74ee49fdc --- /dev/null +++ b/example/src/demo/pc/date-picker/about-format.vue @@ -0,0 +1,52 @@ + + + diff --git a/example/src/demo/pc/date-picker/align.vue b/example/src/demo/pc/date-picker/align.vue new file mode 100644 index 000000000..4e12c3931 --- /dev/null +++ b/example/src/demo/pc/date-picker/align.vue @@ -0,0 +1,36 @@ + + + diff --git a/example/src/demo/pc/date-picker/basic-usage.vue b/example/src/demo/pc/date-picker/basic-usage.vue new file mode 100644 index 000000000..d13123ca5 --- /dev/null +++ b/example/src/demo/pc/date-picker/basic-usage.vue @@ -0,0 +1,20 @@ + + + diff --git a/example/src/demo/pc/date-picker/clearable.vue b/example/src/demo/pc/date-picker/clearable.vue new file mode 100644 index 000000000..d5afd760a --- /dev/null +++ b/example/src/demo/pc/date-picker/clearable.vue @@ -0,0 +1,26 @@ + + + diff --git a/example/src/demo/pc/date-picker/custom-range.vue b/example/src/demo/pc/date-picker/custom-range.vue new file mode 100644 index 000000000..babdc3681 --- /dev/null +++ b/example/src/demo/pc/date-picker/custom-range.vue @@ -0,0 +1,24 @@ + + + diff --git a/example/src/demo/pc/date-picker/custom-suffix-icon.vue b/example/src/demo/pc/date-picker/custom-suffix-icon.vue new file mode 100644 index 000000000..4c12d3ae1 --- /dev/null +++ b/example/src/demo/pc/date-picker/custom-suffix-icon.vue @@ -0,0 +1,24 @@ + + + diff --git a/example/src/demo/pc/date-picker/date-picker-disabled.vue b/example/src/demo/pc/date-picker/date-picker-disabled.vue new file mode 100644 index 000000000..2120e1f3a --- /dev/null +++ b/example/src/demo/pc/date-picker/date-picker-disabled.vue @@ -0,0 +1,30 @@ + + + diff --git a/example/src/demo/pc/date-picker/date-picker-events.vue b/example/src/demo/pc/date-picker/date-picker-events.vue new file mode 100644 index 000000000..1e84b797d --- /dev/null +++ b/example/src/demo/pc/date-picker/date-picker-events.vue @@ -0,0 +1,53 @@ + + + diff --git a/example/src/demo/pc/date-picker/date-picker-options-disabledDate.vue b/example/src/demo/pc/date-picker/date-picker-options-disabledDate.vue new file mode 100644 index 000000000..968e64418 --- /dev/null +++ b/example/src/demo/pc/date-picker/date-picker-options-disabledDate.vue @@ -0,0 +1,45 @@ + + + diff --git a/example/src/demo/pc/date-picker/date-range-shortcuts.vue b/example/src/demo/pc/date-picker/date-range-shortcuts.vue new file mode 100644 index 000000000..d9a6e73ba --- /dev/null +++ b/example/src/demo/pc/date-picker/date-range-shortcuts.vue @@ -0,0 +1,54 @@ + + + diff --git a/example/src/demo/pc/date-picker/date-range.vue b/example/src/demo/pc/date-picker/date-range.vue new file mode 100644 index 000000000..83bfba8f0 --- /dev/null +++ b/example/src/demo/pc/date-picker/date-range.vue @@ -0,0 +1,39 @@ + + + diff --git a/example/src/demo/pc/date-picker/date-shortcuts.vue b/example/src/demo/pc/date-picker/date-shortcuts.vue new file mode 100644 index 000000000..9ce93717c --- /dev/null +++ b/example/src/demo/pc/date-picker/date-shortcuts.vue @@ -0,0 +1,53 @@ + + + diff --git a/example/src/demo/pc/date-picker/default-time-of-range.vue b/example/src/demo/pc/date-picker/default-time-of-range.vue new file mode 100644 index 000000000..10a6db3d2 --- /dev/null +++ b/example/src/demo/pc/date-picker/default-time-of-range.vue @@ -0,0 +1,25 @@ + + + diff --git a/example/src/demo/pc/date-picker/default-value.vue b/example/src/demo/pc/date-picker/default-value.vue new file mode 100644 index 000000000..5ff1481c0 --- /dev/null +++ b/example/src/demo/pc/date-picker/default-value.vue @@ -0,0 +1,26 @@ + + + diff --git a/example/src/demo/pc/date-picker/disabled.vue b/example/src/demo/pc/date-picker/disabled.vue new file mode 100644 index 000000000..18c8c14fd --- /dev/null +++ b/example/src/demo/pc/date-picker/disabled.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/date-picker/editable.vue b/example/src/demo/pc/date-picker/editable.vue new file mode 100644 index 000000000..bf82589f9 --- /dev/null +++ b/example/src/demo/pc/date-picker/editable.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/date-picker/focus.vue b/example/src/demo/pc/date-picker/focus.vue new file mode 100644 index 000000000..f3f276822 --- /dev/null +++ b/example/src/demo/pc/date-picker/focus.vue @@ -0,0 +1,32 @@ + + + diff --git a/example/src/demo/pc/date-picker/max-min.vue b/example/src/demo/pc/date-picker/max-min.vue new file mode 100644 index 000000000..755a7ee8f --- /dev/null +++ b/example/src/demo/pc/date-picker/max-min.vue @@ -0,0 +1,44 @@ + + + diff --git a/example/src/demo/pc/date-picker/month-range-shortcuts.vue b/example/src/demo/pc/date-picker/month-range-shortcuts.vue new file mode 100644 index 000000000..d46610db4 --- /dev/null +++ b/example/src/demo/pc/date-picker/month-range-shortcuts.vue @@ -0,0 +1,68 @@ + + + diff --git a/example/src/demo/pc/date-picker/month-range.vue b/example/src/demo/pc/date-picker/month-range.vue new file mode 100644 index 000000000..f2a0e06b5 --- /dev/null +++ b/example/src/demo/pc/date-picker/month-range.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/date-picker/other-picker-type.vue b/example/src/demo/pc/date-picker/other-picker-type.vue new file mode 100644 index 000000000..ce2fed492 --- /dev/null +++ b/example/src/demo/pc/date-picker/other-picker-type.vue @@ -0,0 +1,62 @@ + + + diff --git a/example/src/demo/pc/date-picker/readonly.vue b/example/src/demo/pc/date-picker/readonly.vue new file mode 100644 index 000000000..d27549c0a --- /dev/null +++ b/example/src/demo/pc/date-picker/readonly.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/date-picker/set-size.vue b/example/src/demo/pc/date-picker/set-size.vue new file mode 100644 index 000000000..898ee28ff --- /dev/null +++ b/example/src/demo/pc/date-picker/set-size.vue @@ -0,0 +1,36 @@ + + + diff --git a/example/src/demo/pc/date-picker/time-arrow-control.vue b/example/src/demo/pc/date-picker/time-arrow-control.vue new file mode 100644 index 000000000..20455e907 --- /dev/null +++ b/example/src/demo/pc/date-picker/time-arrow-control.vue @@ -0,0 +1,24 @@ + + + diff --git a/example/src/demo/pc/date-picker/time-format.vue b/example/src/demo/pc/date-picker/time-format.vue new file mode 100644 index 000000000..619a9cbe9 --- /dev/null +++ b/example/src/demo/pc/date-picker/time-format.vue @@ -0,0 +1,30 @@ + + + diff --git a/example/src/demo/pc/date-picker/timezone.vue b/example/src/demo/pc/date-picker/timezone.vue new file mode 100644 index 000000000..cbcd1dbd8 --- /dev/null +++ b/example/src/demo/pc/date-picker/timezone.vue @@ -0,0 +1,35 @@ + + + diff --git a/example/src/demo/pc/date-picker/unlink-panels.vue b/example/src/demo/pc/date-picker/unlink-panels.vue new file mode 100644 index 000000000..039237689 --- /dev/null +++ b/example/src/demo/pc/date-picker/unlink-panels.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/date-picker/utc8.vue b/example/src/demo/pc/date-picker/utc8.vue new file mode 100644 index 000000000..cfcb22eb1 --- /dev/null +++ b/example/src/demo/pc/date-picker/utc8.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/date-picker/validate-event.vue b/example/src/demo/pc/date-picker/validate-event.vue new file mode 100644 index 000000000..d20bc3c20 --- /dev/null +++ b/example/src/demo/pc/date-picker/validate-event.vue @@ -0,0 +1,112 @@ + + + diff --git a/example/src/demo/pc/detail-page/basic-usage.vue b/example/src/demo/pc/detail-page/basic-usage.vue new file mode 100644 index 000000000..b6b6d3f3f --- /dev/null +++ b/example/src/demo/pc/detail-page/basic-usage.vue @@ -0,0 +1,40 @@ + + + diff --git a/example/src/demo/pc/detail-page/custom-show-text.vue b/example/src/demo/pc/detail-page/custom-show-text.vue new file mode 100644 index 000000000..5689c17a5 --- /dev/null +++ b/example/src/demo/pc/detail-page/custom-show-text.vue @@ -0,0 +1,50 @@ + + + diff --git a/example/src/demo/pc/dialog-box/basic-usage.vue b/example/src/demo/pc/dialog-box/basic-usage.vue new file mode 100644 index 000000000..c84304400 --- /dev/null +++ b/example/src/demo/pc/dialog-box/basic-usage.vue @@ -0,0 +1,37 @@ + + + diff --git a/example/src/demo/pc/dialog-box/center.vue b/example/src/demo/pc/dialog-box/center.vue new file mode 100644 index 000000000..643c5c7f8 --- /dev/null +++ b/example/src/demo/pc/dialog-box/center.vue @@ -0,0 +1,37 @@ + + + diff --git a/example/src/demo/pc/dialog-box/close-on-click-modal.vue b/example/src/demo/pc/dialog-box/close-on-click-modal.vue new file mode 100644 index 000000000..d44af7c8a --- /dev/null +++ b/example/src/demo/pc/dialog-box/close-on-click-modal.vue @@ -0,0 +1,37 @@ + + + diff --git a/example/src/demo/pc/dialog-box/close-on-press-escape.vue b/example/src/demo/pc/dialog-box/close-on-press-escape.vue new file mode 100644 index 000000000..87e0a59fb --- /dev/null +++ b/example/src/demo/pc/dialog-box/close-on-press-escape.vue @@ -0,0 +1,42 @@ + + + diff --git a/example/src/demo/pc/dialog-box/custom-dialog-content.vue b/example/src/demo/pc/dialog-box/custom-dialog-content.vue new file mode 100644 index 000000000..b02917bdf --- /dev/null +++ b/example/src/demo/pc/dialog-box/custom-dialog-content.vue @@ -0,0 +1,37 @@ + + + diff --git a/example/src/demo/pc/dialog-box/custom-dialog-footer.vue b/example/src/demo/pc/dialog-box/custom-dialog-footer.vue new file mode 100644 index 000000000..baa28b05f --- /dev/null +++ b/example/src/demo/pc/dialog-box/custom-dialog-footer.vue @@ -0,0 +1,36 @@ + + + diff --git a/example/src/demo/pc/dialog-box/custom-dialog-title.vue b/example/src/demo/pc/dialog-box/custom-dialog-title.vue new file mode 100644 index 000000000..4df1fd954 --- /dev/null +++ b/example/src/demo/pc/dialog-box/custom-dialog-title.vue @@ -0,0 +1,40 @@ + + + diff --git a/example/src/demo/pc/dialog-box/dialog-top-height.vue b/example/src/demo/pc/dialog-box/dialog-top-height.vue new file mode 100644 index 000000000..d464c4c52 --- /dev/null +++ b/example/src/demo/pc/dialog-box/dialog-top-height.vue @@ -0,0 +1,51 @@ + + + diff --git a/example/src/demo/pc/dialog-box/dialog-width.vue b/example/src/demo/pc/dialog-box/dialog-width.vue new file mode 100644 index 000000000..c8c1c3f8c --- /dev/null +++ b/example/src/demo/pc/dialog-box/dialog-width.vue @@ -0,0 +1,56 @@ + + + + + diff --git a/example/src/demo/pc/dialog-box/draggable.vue b/example/src/demo/pc/dialog-box/draggable.vue new file mode 100644 index 000000000..5e3a6e363 --- /dev/null +++ b/example/src/demo/pc/dialog-box/draggable.vue @@ -0,0 +1,49 @@ + + + diff --git a/example/src/demo/pc/dialog-box/form-in-dialog.vue b/example/src/demo/pc/dialog-box/form-in-dialog.vue new file mode 100644 index 000000000..c6c1bc0bc --- /dev/null +++ b/example/src/demo/pc/dialog-box/form-in-dialog.vue @@ -0,0 +1,114 @@ + + + diff --git a/example/src/demo/pc/dialog-box/fullscreen.vue b/example/src/demo/pc/dialog-box/fullscreen.vue new file mode 100644 index 000000000..ba1851682 --- /dev/null +++ b/example/src/demo/pc/dialog-box/fullscreen.vue @@ -0,0 +1,34 @@ + + + diff --git a/example/src/demo/pc/dialog-box/hidden-close-buttons.vue b/example/src/demo/pc/dialog-box/hidden-close-buttons.vue new file mode 100644 index 000000000..ebc4a8cf4 --- /dev/null +++ b/example/src/demo/pc/dialog-box/hidden-close-buttons.vue @@ -0,0 +1,35 @@ + + + diff --git a/example/src/demo/pc/dialog-box/hidden-header.vue b/example/src/demo/pc/dialog-box/hidden-header.vue new file mode 100644 index 000000000..5c7742c5d --- /dev/null +++ b/example/src/demo/pc/dialog-box/hidden-header.vue @@ -0,0 +1,35 @@ + + + diff --git a/example/src/demo/pc/dialog-box/lock-scroll.vue b/example/src/demo/pc/dialog-box/lock-scroll.vue new file mode 100644 index 000000000..461d3aeb7 --- /dev/null +++ b/example/src/demo/pc/dialog-box/lock-scroll.vue @@ -0,0 +1,35 @@ + + + diff --git a/example/src/demo/pc/dialog-box/no-modal.vue b/example/src/demo/pc/dialog-box/no-modal.vue new file mode 100644 index 000000000..92a99e6ae --- /dev/null +++ b/example/src/demo/pc/dialog-box/no-modal.vue @@ -0,0 +1,35 @@ + + + diff --git a/example/src/demo/pc/dialog-box/open-close-events.vue b/example/src/demo/pc/dialog-box/open-close-events.vue new file mode 100644 index 000000000..858070409 --- /dev/null +++ b/example/src/demo/pc/dialog-box/open-close-events.vue @@ -0,0 +1,77 @@ + + + diff --git a/example/src/demo/pc/dialog-box/right-dialog.vue b/example/src/demo/pc/dialog-box/right-dialog.vue new file mode 100644 index 000000000..048a72cc4 --- /dev/null +++ b/example/src/demo/pc/dialog-box/right-dialog.vue @@ -0,0 +1,36 @@ + + + diff --git a/example/src/demo/pc/dialog-box/secondary-dialog.vue b/example/src/demo/pc/dialog-box/secondary-dialog.vue new file mode 100644 index 000000000..df70bd828 --- /dev/null +++ b/example/src/demo/pc/dialog-box/secondary-dialog.vue @@ -0,0 +1,50 @@ + + + diff --git a/example/src/demo/pc/drop-times/basic-usage.vue b/example/src/demo/pc/drop-times/basic-usage.vue new file mode 100644 index 000000000..b96c59c6c --- /dev/null +++ b/example/src/demo/pc/drop-times/basic-usage.vue @@ -0,0 +1,30 @@ + + + diff --git a/example/src/demo/pc/drop-times/size.vue b/example/src/demo/pc/drop-times/size.vue new file mode 100644 index 000000000..c9fd03ccd --- /dev/null +++ b/example/src/demo/pc/drop-times/size.vue @@ -0,0 +1,25 @@ + + + diff --git a/example/src/demo/pc/drop-times/start-end-step.vue b/example/src/demo/pc/drop-times/start-end-step.vue new file mode 100644 index 000000000..181147d3a --- /dev/null +++ b/example/src/demo/pc/drop-times/start-end-step.vue @@ -0,0 +1,32 @@ + + + diff --git a/example/src/demo/pc/dropdown/basic-usage.vue b/example/src/demo/pc/dropdown/basic-usage.vue new file mode 100644 index 000000000..73fd0c5e5 --- /dev/null +++ b/example/src/demo/pc/dropdown/basic-usage.vue @@ -0,0 +1,28 @@ + + + diff --git a/example/src/demo/pc/dropdown/disabled.vue b/example/src/demo/pc/dropdown/disabled.vue new file mode 100644 index 000000000..ec4c4e476 --- /dev/null +++ b/example/src/demo/pc/dropdown/disabled.vue @@ -0,0 +1,47 @@ + + + diff --git a/example/src/demo/pc/dropdown/events.vue b/example/src/demo/pc/dropdown/events.vue new file mode 100644 index 000000000..fcfbbc407 --- /dev/null +++ b/example/src/demo/pc/dropdown/events.vue @@ -0,0 +1,40 @@ + + + diff --git a/example/src/demo/pc/dropdown/hide-on-click.vue b/example/src/demo/pc/dropdown/hide-on-click.vue new file mode 100644 index 000000000..2dc23c993 --- /dev/null +++ b/example/src/demo/pc/dropdown/hide-on-click.vue @@ -0,0 +1,28 @@ + + + diff --git a/example/src/demo/pc/dropdown/size.vue b/example/src/demo/pc/dropdown/size.vue new file mode 100644 index 000000000..dd106d77c --- /dev/null +++ b/example/src/demo/pc/dropdown/size.vue @@ -0,0 +1,65 @@ + + + diff --git a/example/src/demo/pc/dropdown/split-button.vue b/example/src/demo/pc/dropdown/split-button.vue new file mode 100644 index 000000000..f139a999e --- /dev/null +++ b/example/src/demo/pc/dropdown/split-button.vue @@ -0,0 +1,26 @@ + + + diff --git a/example/src/demo/pc/dropdown/trigger.vue b/example/src/demo/pc/dropdown/trigger.vue new file mode 100644 index 000000000..87ad8b769 --- /dev/null +++ b/example/src/demo/pc/dropdown/trigger.vue @@ -0,0 +1,67 @@ + + + diff --git a/example/src/demo/pc/fall-menu/custom-menuitem.vue b/example/src/demo/pc/fall-menu/custom-menuitem.vue new file mode 100644 index 000000000..4404bfc94 --- /dev/null +++ b/example/src/demo/pc/fall-menu/custom-menuitem.vue @@ -0,0 +1,184 @@ + + + + + diff --git a/example/src/demo/pc/fall-menu/custom-slider-icon.vue b/example/src/demo/pc/fall-menu/custom-slider-icon.vue new file mode 100644 index 000000000..834bf64b4 --- /dev/null +++ b/example/src/demo/pc/fall-menu/custom-slider-icon.vue @@ -0,0 +1,191 @@ + + + + + diff --git a/example/src/demo/pc/fall-menu/data-resource.vue b/example/src/demo/pc/fall-menu/data-resource.vue new file mode 100644 index 000000000..b87901022 --- /dev/null +++ b/example/src/demo/pc/fall-menu/data-resource.vue @@ -0,0 +1,169 @@ + + + + + diff --git a/example/src/demo/pc/file-upload/abort-quest.vue b/example/src/demo/pc/file-upload/abort-quest.vue new file mode 100644 index 000000000..a8801be97 --- /dev/null +++ b/example/src/demo/pc/file-upload/abort-quest.vue @@ -0,0 +1,30 @@ + + + diff --git a/example/src/demo/pc/file-upload/accept-file-image.vue b/example/src/demo/pc/file-upload/accept-file-image.vue new file mode 100644 index 000000000..64c6c7e01 --- /dev/null +++ b/example/src/demo/pc/file-upload/accept-file-image.vue @@ -0,0 +1,27 @@ + + + diff --git a/example/src/demo/pc/file-upload/accept-file.vue b/example/src/demo/pc/file-upload/accept-file.vue new file mode 100644 index 000000000..7095fe199 --- /dev/null +++ b/example/src/demo/pc/file-upload/accept-file.vue @@ -0,0 +1,28 @@ + + + diff --git a/example/src/demo/pc/file-upload/basic-usage.vue b/example/src/demo/pc/file-upload/basic-usage.vue new file mode 100644 index 000000000..f059312d9 --- /dev/null +++ b/example/src/demo/pc/file-upload/basic-usage.vue @@ -0,0 +1,23 @@ + + + diff --git a/example/src/demo/pc/file-upload/clear-files.vue b/example/src/demo/pc/file-upload/clear-files.vue new file mode 100644 index 000000000..50ea5adcb --- /dev/null +++ b/example/src/demo/pc/file-upload/clear-files.vue @@ -0,0 +1,40 @@ + + + diff --git a/example/src/demo/pc/file-upload/custom-prefix.vue b/example/src/demo/pc/file-upload/custom-prefix.vue new file mode 100644 index 000000000..bd8016fe8 --- /dev/null +++ b/example/src/demo/pc/file-upload/custom-prefix.vue @@ -0,0 +1,44 @@ + + + diff --git a/example/src/demo/pc/file-upload/custom-trigger.vue b/example/src/demo/pc/file-upload/custom-trigger.vue new file mode 100644 index 000000000..012917e05 --- /dev/null +++ b/example/src/demo/pc/file-upload/custom-trigger.vue @@ -0,0 +1,23 @@ + + + diff --git a/example/src/demo/pc/file-upload/custom-upload-request.vue b/example/src/demo/pc/file-upload/custom-upload-request.vue new file mode 100644 index 000000000..5fecea913 --- /dev/null +++ b/example/src/demo/pc/file-upload/custom-upload-request.vue @@ -0,0 +1,40 @@ + + + diff --git a/example/src/demo/pc/file-upload/custom-upload-tip.vue b/example/src/demo/pc/file-upload/custom-upload-tip.vue new file mode 100644 index 000000000..42da7615c --- /dev/null +++ b/example/src/demo/pc/file-upload/custom-upload-tip.vue @@ -0,0 +1,26 @@ + + + diff --git a/example/src/demo/pc/file-upload/drag-select-file.vue b/example/src/demo/pc/file-upload/drag-select-file.vue new file mode 100644 index 000000000..39680b14c --- /dev/null +++ b/example/src/demo/pc/file-upload/drag-select-file.vue @@ -0,0 +1,41 @@ + + + diff --git a/example/src/demo/pc/file-upload/drag-upload.vue b/example/src/demo/pc/file-upload/drag-upload.vue new file mode 100644 index 000000000..c4e80ff2b --- /dev/null +++ b/example/src/demo/pc/file-upload/drag-upload.vue @@ -0,0 +1,35 @@ + + + diff --git a/example/src/demo/pc/file-upload/dynamic-disable.vue b/example/src/demo/pc/file-upload/dynamic-disable.vue new file mode 100644 index 000000000..3906f1eab --- /dev/null +++ b/example/src/demo/pc/file-upload/dynamic-disable.vue @@ -0,0 +1,29 @@ + + + diff --git a/example/src/demo/pc/file-upload/file-picture-card.vue b/example/src/demo/pc/file-upload/file-picture-card.vue new file mode 100644 index 000000000..741d0606c --- /dev/null +++ b/example/src/demo/pc/file-upload/file-picture-card.vue @@ -0,0 +1,65 @@ + + + diff --git a/example/src/demo/pc/file-upload/http-request.vue b/example/src/demo/pc/file-upload/http-request.vue new file mode 100644 index 000000000..97a25a9b7 --- /dev/null +++ b/example/src/demo/pc/file-upload/http-request.vue @@ -0,0 +1,26 @@ + + + diff --git a/example/src/demo/pc/file-upload/image-size.vue b/example/src/demo/pc/file-upload/image-size.vue new file mode 100644 index 000000000..5c735149d --- /dev/null +++ b/example/src/demo/pc/file-upload/image-size.vue @@ -0,0 +1,52 @@ + + + diff --git a/example/src/demo/pc/file-upload/jalor-request.vue b/example/src/demo/pc/file-upload/jalor-request.vue new file mode 100644 index 000000000..1e9ae9be3 --- /dev/null +++ b/example/src/demo/pc/file-upload/jalor-request.vue @@ -0,0 +1,36 @@ + + + diff --git a/example/src/demo/pc/file-upload/manual-upload.vue b/example/src/demo/pc/file-upload/manual-upload.vue new file mode 100644 index 000000000..6fa0bb350 --- /dev/null +++ b/example/src/demo/pc/file-upload/manual-upload.vue @@ -0,0 +1,37 @@ + + + diff --git a/example/src/demo/pc/file-upload/max-file-count.vue b/example/src/demo/pc/file-upload/max-file-count.vue new file mode 100644 index 000000000..0bc67a93d --- /dev/null +++ b/example/src/demo/pc/file-upload/max-file-count.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/file-upload/mini-mode.vue b/example/src/demo/pc/file-upload/mini-mode.vue new file mode 100644 index 000000000..b75591a7d --- /dev/null +++ b/example/src/demo/pc/file-upload/mini-mode.vue @@ -0,0 +1,29 @@ + + + diff --git a/example/src/demo/pc/file-upload/multiple-file.vue b/example/src/demo/pc/file-upload/multiple-file.vue new file mode 100644 index 000000000..e106d3dc5 --- /dev/null +++ b/example/src/demo/pc/file-upload/multiple-file.vue @@ -0,0 +1,23 @@ + + + diff --git a/example/src/demo/pc/file-upload/picture-card.vue b/example/src/demo/pc/file-upload/picture-card.vue new file mode 100644 index 000000000..3445c130e --- /dev/null +++ b/example/src/demo/pc/file-upload/picture-card.vue @@ -0,0 +1,34 @@ + + + diff --git a/example/src/demo/pc/file-upload/picture-list.vue b/example/src/demo/pc/file-upload/picture-list.vue new file mode 100644 index 000000000..db71bc3b9 --- /dev/null +++ b/example/src/demo/pc/file-upload/picture-list.vue @@ -0,0 +1,32 @@ + + + diff --git a/example/src/demo/pc/file-upload/prevent-delete-file.vue b/example/src/demo/pc/file-upload/prevent-delete-file.vue new file mode 100644 index 000000000..8f0fcfe25 --- /dev/null +++ b/example/src/demo/pc/file-upload/prevent-delete-file.vue @@ -0,0 +1,39 @@ + + + diff --git a/example/src/demo/pc/file-upload/prevent-upload-file.vue b/example/src/demo/pc/file-upload/prevent-upload-file.vue new file mode 100644 index 000000000..9e663c2d9 --- /dev/null +++ b/example/src/demo/pc/file-upload/prevent-upload-file.vue @@ -0,0 +1,39 @@ + + + diff --git a/example/src/demo/pc/file-upload/size.vue b/example/src/demo/pc/file-upload/size.vue new file mode 100644 index 000000000..bffc331f1 --- /dev/null +++ b/example/src/demo/pc/file-upload/size.vue @@ -0,0 +1,23 @@ + + + diff --git a/example/src/demo/pc/file-upload/upload-events.vue b/example/src/demo/pc/file-upload/upload-events.vue new file mode 100644 index 000000000..7c3815174 --- /dev/null +++ b/example/src/demo/pc/file-upload/upload-events.vue @@ -0,0 +1,69 @@ + + + diff --git a/example/src/demo/pc/file-upload/upload-file-filters.vue b/example/src/demo/pc/file-upload/upload-file-filters.vue new file mode 100644 index 000000000..fee0a198b --- /dev/null +++ b/example/src/demo/pc/file-upload/upload-file-filters.vue @@ -0,0 +1,43 @@ + + + diff --git a/example/src/demo/pc/file-upload/upload-file-list-thumb.vue b/example/src/demo/pc/file-upload/upload-file-list-thumb.vue new file mode 100644 index 000000000..ccdf1a2f1 --- /dev/null +++ b/example/src/demo/pc/file-upload/upload-file-list-thumb.vue @@ -0,0 +1,36 @@ + + + diff --git a/example/src/demo/pc/file-upload/upload-file-list.vue b/example/src/demo/pc/file-upload/upload-file-list.vue new file mode 100644 index 000000000..478311dfe --- /dev/null +++ b/example/src/demo/pc/file-upload/upload-file-list.vue @@ -0,0 +1,31 @@ + + + diff --git a/example/src/demo/pc/file-upload/upload-limit.vue b/example/src/demo/pc/file-upload/upload-limit.vue new file mode 100644 index 000000000..dbb896923 --- /dev/null +++ b/example/src/demo/pc/file-upload/upload-limit.vue @@ -0,0 +1,37 @@ + + + diff --git a/example/src/demo/pc/file-upload/upload-request.vue b/example/src/demo/pc/file-upload/upload-request.vue new file mode 100644 index 000000000..8f093f614 --- /dev/null +++ b/example/src/demo/pc/file-upload/upload-request.vue @@ -0,0 +1,41 @@ + + + diff --git a/example/src/demo/pc/file-upload/upload-user-head.vue b/example/src/demo/pc/file-upload/upload-user-head.vue new file mode 100644 index 000000000..bec0bc743 --- /dev/null +++ b/example/src/demo/pc/file-upload/upload-user-head.vue @@ -0,0 +1,53 @@ + + + + + diff --git a/example/src/demo/pc/floatbar/base.vue b/example/src/demo/pc/floatbar/base.vue new file mode 100644 index 000000000..fdd0dd72d --- /dev/null +++ b/example/src/demo/pc/floatbar/base.vue @@ -0,0 +1,23 @@ + + + diff --git a/example/src/demo/pc/floatbar/custom-floatbar-item.vue b/example/src/demo/pc/floatbar/custom-floatbar-item.vue new file mode 100644 index 000000000..1156efe47 --- /dev/null +++ b/example/src/demo/pc/floatbar/custom-floatbar-item.vue @@ -0,0 +1,23 @@ + + + diff --git a/example/src/demo/pc/floatbar/custom-style.vue b/example/src/demo/pc/floatbar/custom-style.vue new file mode 100644 index 000000000..21e949ac2 --- /dev/null +++ b/example/src/demo/pc/floatbar/custom-style.vue @@ -0,0 +1,28 @@ + + + + + diff --git a/example/src/demo/pc/floatbar/operation-floatbar-item.vue b/example/src/demo/pc/floatbar/operation-floatbar-item.vue new file mode 100644 index 000000000..fc41d8e29 --- /dev/null +++ b/example/src/demo/pc/floatbar/operation-floatbar-item.vue @@ -0,0 +1,50 @@ + + + + + diff --git a/example/src/demo/pc/font/Font-usage-specifications.vue b/example/src/demo/pc/font/Font-usage-specifications.vue new file mode 100644 index 000000000..3687611e9 --- /dev/null +++ b/example/src/demo/pc/font/Font-usage-specifications.vue @@ -0,0 +1,79 @@ + + + + + diff --git a/example/src/demo/pc/font/chinese-font-set.vue b/example/src/demo/pc/font/chinese-font-set.vue new file mode 100644 index 000000000..b3ab84c02 --- /dev/null +++ b/example/src/demo/pc/font/chinese-font-set.vue @@ -0,0 +1,16 @@ + + + diff --git a/example/src/demo/pc/font/english-fonts.vue b/example/src/demo/pc/font/english-fonts.vue new file mode 100644 index 000000000..979bb7621 --- /dev/null +++ b/example/src/demo/pc/font/english-fonts.vue @@ -0,0 +1,16 @@ + + + diff --git a/example/src/demo/pc/form/custom-validation-rule.vue b/example/src/demo/pc/form/custom-validation-rule.vue new file mode 100644 index 000000000..3bbe06848 --- /dev/null +++ b/example/src/demo/pc/form/custom-validation-rule.vue @@ -0,0 +1,101 @@ + + + + + diff --git a/example/src/demo/pc/form/form-clear-validate.vue b/example/src/demo/pc/form/form-clear-validate.vue new file mode 100644 index 000000000..79d953224 --- /dev/null +++ b/example/src/demo/pc/form/form-clear-validate.vue @@ -0,0 +1,138 @@ + + + + + diff --git a/example/src/demo/pc/form/form-disabled.vue b/example/src/demo/pc/form/form-disabled.vue new file mode 100644 index 000000000..fdbf4f282 --- /dev/null +++ b/example/src/demo/pc/form/form-disabled.vue @@ -0,0 +1,288 @@ + + + diff --git a/example/src/demo/pc/form/form-in-row.vue b/example/src/demo/pc/form/form-in-row.vue new file mode 100644 index 000000000..4201d8cf8 --- /dev/null +++ b/example/src/demo/pc/form/form-in-row.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/example/src/demo/pc/form/form-validation.vue b/example/src/demo/pc/form/form-validation.vue new file mode 100644 index 000000000..19c61f6b7 --- /dev/null +++ b/example/src/demo/pc/form/form-validation.vue @@ -0,0 +1,134 @@ + + + + + diff --git a/example/src/demo/pc/form/frequently-used-form.vue b/example/src/demo/pc/form/frequently-used-form.vue new file mode 100644 index 000000000..8aa10189b --- /dev/null +++ b/example/src/demo/pc/form/frequently-used-form.vue @@ -0,0 +1,95 @@ + + + + + diff --git a/example/src/demo/pc/form/no-validate-to-add.vue b/example/src/demo/pc/form/no-validate-to-add.vue new file mode 100644 index 000000000..128c1f606 --- /dev/null +++ b/example/src/demo/pc/form/no-validate-to-add.vue @@ -0,0 +1,160 @@ + + + + + diff --git a/example/src/demo/pc/form/novalid-tip.vue b/example/src/demo/pc/form/novalid-tip.vue new file mode 100644 index 000000000..b8c2825da --- /dev/null +++ b/example/src/demo/pc/form/novalid-tip.vue @@ -0,0 +1,64 @@ + + + + + diff --git a/example/src/demo/pc/form/size.vue b/example/src/demo/pc/form/size.vue new file mode 100644 index 000000000..cc2a5e8b0 --- /dev/null +++ b/example/src/demo/pc/form/size.vue @@ -0,0 +1,96 @@ + + + + + diff --git a/example/src/demo/pc/form/slot-label.vue b/example/src/demo/pc/form/slot-label.vue new file mode 100644 index 000000000..b32ea4d22 --- /dev/null +++ b/example/src/demo/pc/form/slot-label.vue @@ -0,0 +1,118 @@ + + + + + diff --git a/example/src/demo/pc/form/validate-type.vue b/example/src/demo/pc/form/validate-type.vue new file mode 100644 index 000000000..d90f4d9b0 --- /dev/null +++ b/example/src/demo/pc/form/validate-type.vue @@ -0,0 +1,98 @@ + + + + + diff --git a/example/src/demo/pc/form/validation-position.vue b/example/src/demo/pc/form/validation-position.vue new file mode 100644 index 000000000..e0f95f95a --- /dev/null +++ b/example/src/demo/pc/form/validation-position.vue @@ -0,0 +1,107 @@ + + + + + diff --git a/example/src/demo/pc/fullscreen/example-api.vue b/example/src/demo/pc/fullscreen/example-api.vue new file mode 100644 index 000000000..c69add323 --- /dev/null +++ b/example/src/demo/pc/fullscreen/example-api.vue @@ -0,0 +1,50 @@ + + + + + diff --git a/example/src/demo/pc/fullscreen/example-component.vue b/example/src/demo/pc/fullscreen/example-component.vue new file mode 100644 index 000000000..9c3a1c0ff --- /dev/null +++ b/example/src/demo/pc/fullscreen/example-component.vue @@ -0,0 +1,53 @@ + + + + + diff --git a/example/src/demo/pc/grid/align/column-align.vue b/example/src/demo/pc/grid/align/column-align.vue new file mode 100644 index 000000000..b393005aa --- /dev/null +++ b/example/src/demo/pc/grid/align/column-align.vue @@ -0,0 +1,83 @@ + + + diff --git a/example/src/demo/pc/grid/align/footer-align/center-footer-align.vue b/example/src/demo/pc/grid/align/footer-align/center-footer-align.vue new file mode 100644 index 000000000..aa98f21dd --- /dev/null +++ b/example/src/demo/pc/grid/align/footer-align/center-footer-align.vue @@ -0,0 +1,111 @@ + + + diff --git a/example/src/demo/pc/grid/align/footer-align/left-footer-align.vue b/example/src/demo/pc/grid/align/footer-align/left-footer-align.vue new file mode 100644 index 000000000..2d364de40 --- /dev/null +++ b/example/src/demo/pc/grid/align/footer-align/left-footer-align.vue @@ -0,0 +1,111 @@ + + + diff --git a/example/src/demo/pc/grid/align/footer-align/right-footer-align.vue b/example/src/demo/pc/grid/align/footer-align/right-footer-align.vue new file mode 100644 index 000000000..76d0d0e3d --- /dev/null +++ b/example/src/demo/pc/grid/align/footer-align/right-footer-align.vue @@ -0,0 +1,111 @@ + + + diff --git a/example/src/demo/pc/grid/align/grid-align/center-grid-align.vue b/example/src/demo/pc/grid/align/grid-align/center-grid-align.vue new file mode 100644 index 000000000..0752d1934 --- /dev/null +++ b/example/src/demo/pc/grid/align/grid-align/center-grid-align.vue @@ -0,0 +1,83 @@ + + + diff --git a/example/src/demo/pc/grid/align/grid-align/left-grid-align.vue b/example/src/demo/pc/grid/align/grid-align/left-grid-align.vue new file mode 100644 index 000000000..acb5441b3 --- /dev/null +++ b/example/src/demo/pc/grid/align/grid-align/left-grid-align.vue @@ -0,0 +1,83 @@ + + + diff --git a/example/src/demo/pc/grid/align/grid-align/right-grid-align.vue b/example/src/demo/pc/grid/align/grid-align/right-grid-align.vue new file mode 100644 index 000000000..f204d717d --- /dev/null +++ b/example/src/demo/pc/grid/align/grid-align/right-grid-align.vue @@ -0,0 +1,83 @@ + + + diff --git a/example/src/demo/pc/grid/align/header-align/center-header-align.vue b/example/src/demo/pc/grid/align/header-align/center-header-align.vue new file mode 100644 index 000000000..da39c2491 --- /dev/null +++ b/example/src/demo/pc/grid/align/header-align/center-header-align.vue @@ -0,0 +1,82 @@ + + + diff --git a/example/src/demo/pc/grid/align/header-align/left-header-align.vue b/example/src/demo/pc/grid/align/header-align/left-header-align.vue new file mode 100644 index 000000000..026cbe82b --- /dev/null +++ b/example/src/demo/pc/grid/align/header-align/left-header-align.vue @@ -0,0 +1,82 @@ + + + diff --git a/example/src/demo/pc/grid/align/header-align/right-header-align.vue b/example/src/demo/pc/grid/align/header-align/right-header-align.vue new file mode 100644 index 000000000..6039deda8 --- /dev/null +++ b/example/src/demo/pc/grid/align/header-align/right-header-align.vue @@ -0,0 +1,82 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/adaptive-column-width.vue b/example/src/demo/pc/grid/aui3-first-menu/adaptive-column-width.vue new file mode 100644 index 000000000..727e6e541 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/adaptive-column-width.vue @@ -0,0 +1,67 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/adaptive-grid-off-width-height.vue b/example/src/demo/pc/grid/aui3-first-menu/adaptive-grid-off-width-height.vue new file mode 100644 index 000000000..8ab64b2f9 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/adaptive-grid-off-width-height.vue @@ -0,0 +1,114 @@ + + + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/adaptive-grid-width-height.vue b/example/src/demo/pc/grid/aui3-first-menu/adaptive-grid-width-height.vue new file mode 100644 index 000000000..093b3d096 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/adaptive-grid-width-height.vue @@ -0,0 +1,114 @@ + + + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/adaptive-un-column-width.vue b/example/src/demo/pc/grid/aui3-first-menu/adaptive-un-column-width.vue new file mode 100644 index 000000000..a5be460c3 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/adaptive-un-column-width.vue @@ -0,0 +1,67 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/auto-load.vue b/example/src/demo/pc/grid/aui3-first-menu/auto-load.vue new file mode 100644 index 000000000..320201d3d --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/auto-load.vue @@ -0,0 +1,97 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/cell-editing.vue b/example/src/demo/pc/grid/aui3-first-menu/cell-editing.vue new file mode 100644 index 000000000..4d8124625 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/cell-editing.vue @@ -0,0 +1,73 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/clearData.vue b/example/src/demo/pc/grid/aui3-first-menu/clearData.vue new file mode 100644 index 000000000..939bd67d5 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/clearData.vue @@ -0,0 +1,123 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/clearRadioRow.vue b/example/src/demo/pc/grid/aui3-first-menu/clearRadioRow.vue new file mode 100644 index 000000000..1e1a51ab4 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/clearRadioRow.vue @@ -0,0 +1,89 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/clearSelection.vue b/example/src/demo/pc/grid/aui3-first-menu/clearSelection.vue new file mode 100644 index 000000000..7975c7457 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/clearSelection.vue @@ -0,0 +1,89 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/column-asyn-rendering.vue b/example/src/demo/pc/grid/aui3-first-menu/column-asyn-rendering.vue new file mode 100644 index 000000000..60bce7ba2 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/column-asyn-rendering.vue @@ -0,0 +1,162 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/column-key.vue b/example/src/demo/pc/grid/aui3-first-menu/column-key.vue new file mode 100644 index 000000000..64a3a4a26 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/column-key.vue @@ -0,0 +1,68 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/column-min-width.vue b/example/src/demo/pc/grid/aui3-first-menu/column-min-width.vue new file mode 100644 index 000000000..f0a0a3097 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/column-min-width.vue @@ -0,0 +1,80 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/column-width.vue b/example/src/demo/pc/grid/aui3-first-menu/column-width.vue new file mode 100644 index 000000000..4bb4d8d0c --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/column-width.vue @@ -0,0 +1,68 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/columns.vue b/example/src/demo/pc/grid/aui3-first-menu/columns.vue new file mode 100644 index 000000000..9146e34d8 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/columns.vue @@ -0,0 +1,91 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/copy-row-data.vue b/example/src/demo/pc/grid/aui3-first-menu/copy-row-data.vue new file mode 100644 index 000000000..78968ab66 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/copy-row-data.vue @@ -0,0 +1,107 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/custom-editing.vue b/example/src/demo/pc/grid/aui3-first-menu/custom-editing.vue new file mode 100644 index 000000000..49bbd311a --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/custom-editing.vue @@ -0,0 +1,117 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/custom-operation-column.vue b/example/src/demo/pc/grid/aui3-first-menu/custom-operation-column.vue new file mode 100644 index 000000000..cd829ec88 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/custom-operation-column.vue @@ -0,0 +1,102 @@ + + + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/custom-serial-column.vue b/example/src/demo/pc/grid/aui3-first-menu/custom-serial-column.vue new file mode 100644 index 000000000..dce127a28 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/custom-serial-column.vue @@ -0,0 +1,74 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/custom-toolbar.vue b/example/src/demo/pc/grid/aui3-first-menu/custom-toolbar.vue new file mode 100644 index 000000000..6ec14a678 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/custom-toolbar.vue @@ -0,0 +1,148 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/default-serial-column.vue b/example/src/demo/pc/grid/aui3-first-menu/default-serial-column.vue new file mode 100644 index 000000000..0937a671a --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/default-serial-column.vue @@ -0,0 +1,69 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/editor-is-salid-always.vue b/example/src/demo/pc/grid/aui3-first-menu/editor-is-salid-always.vue new file mode 100644 index 000000000..aab1cc028 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/editor-is-salid-always.vue @@ -0,0 +1,144 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/empty-data-default-tip.vue b/example/src/demo/pc/grid/aui3-first-menu/empty-data-default-tip.vue new file mode 100644 index 000000000..f3b85fbdd --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/empty-data-default-tip.vue @@ -0,0 +1,29 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/empty-data-iscenter.vue b/example/src/demo/pc/grid/aui3-first-menu/empty-data-iscenter.vue new file mode 100644 index 000000000..edc6a8924 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/empty-data-iscenter.vue @@ -0,0 +1,29 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/empty-data-tip.vue b/example/src/demo/pc/grid/aui3-first-menu/empty-data-tip.vue new file mode 100644 index 000000000..27a58f333 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/empty-data-tip.vue @@ -0,0 +1,52 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/export-excel.vue b/example/src/demo/pc/grid/aui3-first-menu/export-excel.vue new file mode 100644 index 000000000..f283c881e --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/export-excel.vue @@ -0,0 +1,94 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/fixed-column-width.vue b/example/src/demo/pc/grid/aui3-first-menu/fixed-column-width.vue new file mode 100644 index 000000000..b805f51a1 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/fixed-column-width.vue @@ -0,0 +1,67 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/fixed-grid-height.vue b/example/src/demo/pc/grid/aui3-first-menu/fixed-grid-height.vue new file mode 100644 index 000000000..9a3bf469e --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/fixed-grid-height.vue @@ -0,0 +1,67 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/format-value.vue b/example/src/demo/pc/grid/aui3-first-menu/format-value.vue new file mode 100644 index 000000000..c30f311a0 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/format-value.vue @@ -0,0 +1,79 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/full-data-loading.vue b/example/src/demo/pc/grid/aui3-first-menu/full-data-loading.vue new file mode 100644 index 000000000..60fdaa54e --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/full-data-loading.vue @@ -0,0 +1,46 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/get-row-method.vue b/example/src/demo/pc/grid/aui3-first-menu/get-row-method.vue new file mode 100644 index 000000000..82c6b1f77 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/get-row-method.vue @@ -0,0 +1,111 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/grid-border.vue b/example/src/demo/pc/grid/aui3-first-menu/grid-border.vue new file mode 100644 index 000000000..f77cfc8bd --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/grid-border.vue @@ -0,0 +1,68 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/grid-customs.vue b/example/src/demo/pc/grid/aui3-first-menu/grid-customs.vue new file mode 100644 index 000000000..6ba69a0aa --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/grid-customs.vue @@ -0,0 +1,69 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/grid-full-screen-height.vue b/example/src/demo/pc/grid/aui3-first-menu/grid-full-screen-height.vue new file mode 100644 index 000000000..92212109d --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/grid-full-screen-height.vue @@ -0,0 +1,72 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/grid-full-screen.vue b/example/src/demo/pc/grid/aui3-first-menu/grid-full-screen.vue new file mode 100644 index 000000000..df547289f --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/grid-full-screen.vue @@ -0,0 +1,99 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/grid-large-tree-data.vue b/example/src/demo/pc/grid/aui3-first-menu/grid-large-tree-data.vue new file mode 100644 index 000000000..9dec6c02f --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/grid-large-tree-data.vue @@ -0,0 +1,249 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/grid-loading-off-tip.vue b/example/src/demo/pc/grid/aui3-first-menu/grid-loading-off-tip.vue new file mode 100644 index 000000000..83d75635c --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/grid-loading-off-tip.vue @@ -0,0 +1,68 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/grid-loading-tip.vue b/example/src/demo/pc/grid/aui3-first-menu/grid-loading-tip.vue new file mode 100644 index 000000000..fc4a15d51 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/grid-loading-tip.vue @@ -0,0 +1,68 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/grid-optimization.vue b/example/src/demo/pc/grid/aui3-first-menu/grid-optimization.vue new file mode 100644 index 000000000..1d22f0767 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/grid-optimization.vue @@ -0,0 +1,89 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/grid-size-mini.vue b/example/src/demo/pc/grid/aui3-first-menu/grid-size-mini.vue new file mode 100644 index 000000000..97b6971f9 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/grid-size-mini.vue @@ -0,0 +1,91 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/grid-size-small.vue b/example/src/demo/pc/grid/aui3-first-menu/grid-size-small.vue new file mode 100644 index 000000000..0473d597c --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/grid-size-small.vue @@ -0,0 +1,91 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/grid-size.vue b/example/src/demo/pc/grid/aui3-first-menu/grid-size.vue new file mode 100644 index 000000000..0c1d84de3 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/grid-size.vue @@ -0,0 +1,91 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/inner-pager.vue b/example/src/demo/pc/grid/aui3-first-menu/inner-pager.vue new file mode 100644 index 000000000..c3c061cb5 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/inner-pager.vue @@ -0,0 +1,125 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/insert-delete-update.vue b/example/src/demo/pc/grid/aui3-first-menu/insert-delete-update.vue new file mode 100644 index 000000000..d9e6149df --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/insert-delete-update.vue @@ -0,0 +1,157 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/max-min-grid-height.vue b/example/src/demo/pc/grid/aui3-first-menu/max-min-grid-height.vue new file mode 100644 index 000000000..04b641495 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/max-min-grid-height.vue @@ -0,0 +1,87 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/min-grid-height.vue b/example/src/demo/pc/grid/aui3-first-menu/min-grid-height.vue new file mode 100644 index 000000000..6e01fe5ad --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/min-grid-height.vue @@ -0,0 +1,67 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/min-width.vue b/example/src/demo/pc/grid/aui3-first-menu/min-width.vue new file mode 100644 index 000000000..a0a934724 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/min-width.vue @@ -0,0 +1,75 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/proxy-config.vue b/example/src/demo/pc/grid/aui3-first-menu/proxy-config.vue new file mode 100644 index 000000000..da1da212b --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/proxy-config.vue @@ -0,0 +1,110 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/radio-config.vue b/example/src/demo/pc/grid/aui3-first-menu/radio-config.vue new file mode 100644 index 000000000..fc8a625f4 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/radio-config.vue @@ -0,0 +1,85 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/refresh-grid.vue b/example/src/demo/pc/grid/aui3-first-menu/refresh-grid.vue new file mode 100644 index 000000000..032157a80 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/refresh-grid.vue @@ -0,0 +1,107 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/request-service.vue b/example/src/demo/pc/grid/aui3-first-menu/request-service.vue new file mode 100644 index 000000000..a4b4f7177 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/request-service.vue @@ -0,0 +1,113 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/resize-column-width.vue b/example/src/demo/pc/grid/aui3-first-menu/resize-column-width.vue new file mode 100644 index 000000000..98a586a55 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/resize-column-width.vue @@ -0,0 +1,69 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/row-editing.vue b/example/src/demo/pc/grid/aui3-first-menu/row-editing.vue new file mode 100644 index 000000000..7882711cd --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/row-editing.vue @@ -0,0 +1,76 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/row-id.vue b/example/src/demo/pc/grid/aui3-first-menu/row-id.vue new file mode 100644 index 000000000..ff6274df7 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/row-id.vue @@ -0,0 +1,69 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/save-data.vue b/example/src/demo/pc/grid/aui3-first-menu/save-data.vue new file mode 100644 index 000000000..ee96dadab --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/save-data.vue @@ -0,0 +1,138 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/scroll-paging.vue b/example/src/demo/pc/grid/aui3-first-menu/scroll-paging.vue new file mode 100644 index 000000000..747f1fc75 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/scroll-paging.vue @@ -0,0 +1,163 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/start-index.vue b/example/src/demo/pc/grid/aui3-first-menu/start-index.vue new file mode 100644 index 000000000..3b75ed715 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/start-index.vue @@ -0,0 +1,129 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/static-data.vue b/example/src/demo/pc/grid/aui3-first-menu/static-data.vue new file mode 100644 index 000000000..dcf5e0876 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/static-data.vue @@ -0,0 +1,68 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/status-of-editing.vue b/example/src/demo/pc/grid/aui3-first-menu/status-of-editing.vue new file mode 100644 index 000000000..e2a44221e --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/status-of-editing.vue @@ -0,0 +1,73 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/status-of-noediting.vue b/example/src/demo/pc/grid/aui3-first-menu/status-of-noediting.vue new file mode 100644 index 000000000..1fdfb1db9 --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/status-of-noediting.vue @@ -0,0 +1,73 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/trigger-mode-db-editing.vue b/example/src/demo/pc/grid/aui3-first-menu/trigger-mode-db-editing.vue new file mode 100644 index 000000000..2f0808e5a --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/trigger-mode-db-editing.vue @@ -0,0 +1,73 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/trigger-mode-for-editing.vue b/example/src/demo/pc/grid/aui3-first-menu/trigger-mode-for-editing.vue new file mode 100644 index 000000000..9c2c168fb --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/trigger-mode-for-editing.vue @@ -0,0 +1,73 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/trigger-mode-hm-editing.vue b/example/src/demo/pc/grid/aui3-first-menu/trigger-mode-hm-editing.vue new file mode 100644 index 000000000..bb70e568d --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/trigger-mode-hm-editing.vue @@ -0,0 +1,111 @@ + + + diff --git a/example/src/demo/pc/grid/aui3-first-menu/virtual-rolling.vue b/example/src/demo/pc/grid/aui3-first-menu/virtual-rolling.vue new file mode 100644 index 000000000..99c4b373a --- /dev/null +++ b/example/src/demo/pc/grid/aui3-first-menu/virtual-rolling.vue @@ -0,0 +1,55 @@ + + + diff --git a/example/src/demo/pc/grid/basicUsage-conf.vue b/example/src/demo/pc/grid/basicUsage-conf.vue new file mode 100644 index 000000000..1a15b3ce7 --- /dev/null +++ b/example/src/demo/pc/grid/basicUsage-conf.vue @@ -0,0 +1,134 @@ + + + diff --git a/example/src/demo/pc/grid/basicUsage.vue b/example/src/demo/pc/grid/basicUsage.vue new file mode 100644 index 000000000..664c58497 --- /dev/null +++ b/example/src/demo/pc/grid/basicUsage.vue @@ -0,0 +1,142 @@ + + + diff --git a/example/src/demo/pc/grid/column/class-name.vue b/example/src/demo/pc/grid/column/class-name.vue new file mode 100644 index 000000000..9a18de5df --- /dev/null +++ b/example/src/demo/pc/grid/column/class-name.vue @@ -0,0 +1,89 @@ + + + + + diff --git a/example/src/demo/pc/grid/column/column-params.vue b/example/src/demo/pc/grid/column/column-params.vue new file mode 100644 index 000000000..a5994724a --- /dev/null +++ b/example/src/demo/pc/grid/column/column-params.vue @@ -0,0 +1,68 @@ + + + diff --git a/example/src/demo/pc/grid/custom-style/cell-style.vue b/example/src/demo/pc/grid/custom-style/cell-style.vue new file mode 100644 index 000000000..f7118bf24 --- /dev/null +++ b/example/src/demo/pc/grid/custom-style/cell-style.vue @@ -0,0 +1,99 @@ + + + + + diff --git a/example/src/demo/pc/grid/custom-style/footer-style/footer-cell-style.vue b/example/src/demo/pc/grid/custom-style/footer-style/footer-cell-style.vue new file mode 100644 index 000000000..0be1fe890 --- /dev/null +++ b/example/src/demo/pc/grid/custom-style/footer-style/footer-cell-style.vue @@ -0,0 +1,123 @@ + + + + + diff --git a/example/src/demo/pc/grid/custom-style/footer-style/footer-row-style.vue b/example/src/demo/pc/grid/custom-style/footer-style/footer-row-style.vue new file mode 100644 index 000000000..12311dd03 --- /dev/null +++ b/example/src/demo/pc/grid/custom-style/footer-style/footer-row-style.vue @@ -0,0 +1,131 @@ + + + + + diff --git a/example/src/demo/pc/grid/custom-style/header-style/header-cell-style.vue b/example/src/demo/pc/grid/custom-style/header-style/header-cell-style.vue new file mode 100644 index 000000000..11758501f --- /dev/null +++ b/example/src/demo/pc/grid/custom-style/header-style/header-cell-style.vue @@ -0,0 +1,97 @@ + + + + + diff --git a/example/src/demo/pc/grid/custom-style/header-style/header-row-style.vue b/example/src/demo/pc/grid/custom-style/header-style/header-row-style.vue new file mode 100644 index 000000000..573a0925f --- /dev/null +++ b/example/src/demo/pc/grid/custom-style/header-style/header-row-style.vue @@ -0,0 +1,97 @@ + + + + + diff --git a/example/src/demo/pc/grid/custom-style/row-style.vue b/example/src/demo/pc/grid/custom-style/row-style.vue new file mode 100644 index 000000000..5fb7c6dc6 --- /dev/null +++ b/example/src/demo/pc/grid/custom-style/row-style.vue @@ -0,0 +1,96 @@ + + + + + diff --git a/example/src/demo/pc/grid/custom/column-fixed.vue b/example/src/demo/pc/grid/custom/column-fixed.vue new file mode 100644 index 000000000..ac142a783 --- /dev/null +++ b/example/src/demo/pc/grid/custom/column-fixed.vue @@ -0,0 +1,74 @@ + + + diff --git a/example/src/demo/pc/grid/custom/column-sort.vue b/example/src/demo/pc/grid/custom/column-sort.vue new file mode 100644 index 000000000..3f891d72b --- /dev/null +++ b/example/src/demo/pc/grid/custom/column-sort.vue @@ -0,0 +1,74 @@ + + + diff --git a/example/src/demo/pc/grid/custom/column-visible-hidden.vue b/example/src/demo/pc/grid/custom/column-visible-hidden.vue new file mode 100644 index 000000000..85d40a0b7 --- /dev/null +++ b/example/src/demo/pc/grid/custom/column-visible-hidden.vue @@ -0,0 +1,74 @@ + + + diff --git a/example/src/demo/pc/grid/custom/column-width.vue b/example/src/demo/pc/grid/custom/column-width.vue new file mode 100644 index 000000000..45e145bb4 --- /dev/null +++ b/example/src/demo/pc/grid/custom/column-width.vue @@ -0,0 +1,72 @@ + + + diff --git a/example/src/demo/pc/grid/custom/local-storage.vue b/example/src/demo/pc/grid/custom/local-storage.vue new file mode 100644 index 000000000..3b4ce3641 --- /dev/null +++ b/example/src/demo/pc/grid/custom/local-storage.vue @@ -0,0 +1,129 @@ + + + diff --git a/example/src/demo/pc/grid/custom/ordercolumn-local.vue b/example/src/demo/pc/grid/custom/ordercolumn-local.vue new file mode 100644 index 000000000..7fee51ba8 --- /dev/null +++ b/example/src/demo/pc/grid/custom/ordercolumn-local.vue @@ -0,0 +1,76 @@ + + + diff --git a/example/src/demo/pc/grid/custom/ordercolumn-remote.vue b/example/src/demo/pc/grid/custom/ordercolumn-remote.vue new file mode 100644 index 000000000..136d732e4 --- /dev/null +++ b/example/src/demo/pc/grid/custom/ordercolumn-remote.vue @@ -0,0 +1,176 @@ + + + diff --git a/example/src/demo/pc/grid/custom/page-size.vue b/example/src/demo/pc/grid/custom/page-size.vue new file mode 100644 index 000000000..071c5cc83 --- /dev/null +++ b/example/src/demo/pc/grid/custom/page-size.vue @@ -0,0 +1,129 @@ + + + diff --git a/example/src/demo/pc/grid/custom/prsonalized-drag.vue b/example/src/demo/pc/grid/custom/prsonalized-drag.vue new file mode 100644 index 000000000..e5d983842 --- /dev/null +++ b/example/src/demo/pc/grid/custom/prsonalized-drag.vue @@ -0,0 +1,93 @@ + + + + + diff --git a/example/src/demo/pc/grid/custom/resetResizable.vue b/example/src/demo/pc/grid/custom/resetResizable.vue new file mode 100644 index 000000000..0e826ce96 --- /dev/null +++ b/example/src/demo/pc/grid/custom/resetResizable.vue @@ -0,0 +1,88 @@ + + + diff --git a/example/src/demo/pc/grid/custom/server-storage.vue b/example/src/demo/pc/grid/custom/server-storage.vue new file mode 100644 index 000000000..8da705e7c --- /dev/null +++ b/example/src/demo/pc/grid/custom/server-storage.vue @@ -0,0 +1,175 @@ + + + diff --git a/example/src/demo/pc/grid/custom/sort-type.vue b/example/src/demo/pc/grid/custom/sort-type.vue new file mode 100644 index 000000000..31c0e31d1 --- /dev/null +++ b/example/src/demo/pc/grid/custom/sort-type.vue @@ -0,0 +1,129 @@ + + + diff --git a/example/src/demo/pc/grid/disable-radio.vue b/example/src/demo/pc/grid/disable-radio.vue new file mode 100644 index 000000000..da6e6e48a --- /dev/null +++ b/example/src/demo/pc/grid/disable-radio.vue @@ -0,0 +1,74 @@ + + + diff --git a/example/src/demo/pc/grid/disable-selection.vue b/example/src/demo/pc/grid/disable-selection.vue new file mode 100644 index 000000000..44ad378cd --- /dev/null +++ b/example/src/demo/pc/grid/disable-selection.vue @@ -0,0 +1,74 @@ + + + diff --git a/example/src/demo/pc/grid/drag/column-drag.vue b/example/src/demo/pc/grid/drag/column-drag.vue new file mode 100644 index 000000000..d753f5a85 --- /dev/null +++ b/example/src/demo/pc/grid/drag/column-drag.vue @@ -0,0 +1,106 @@ + + + diff --git a/example/src/demo/pc/grid/drag/row-drag-ctrl.vue b/example/src/demo/pc/grid/drag/row-drag-ctrl.vue new file mode 100644 index 000000000..1b92fd614 --- /dev/null +++ b/example/src/demo/pc/grid/drag/row-drag-ctrl.vue @@ -0,0 +1,113 @@ + + + + + diff --git a/example/src/demo/pc/grid/drag/row-drag.vue b/example/src/demo/pc/grid/drag/row-drag.vue new file mode 100644 index 000000000..068bf610a --- /dev/null +++ b/example/src/demo/pc/grid/drag/row-drag.vue @@ -0,0 +1,99 @@ + + + diff --git a/example/src/demo/pc/grid/edit/hasRowChange.vue b/example/src/demo/pc/grid/edit/hasRowChange.vue new file mode 100644 index 000000000..c76a37aee --- /dev/null +++ b/example/src/demo/pc/grid/edit/hasRowChange.vue @@ -0,0 +1,90 @@ + + + diff --git a/example/src/demo/pc/grid/edit/mutil-render.vue b/example/src/demo/pc/grid/edit/mutil-render.vue new file mode 100644 index 000000000..ea9c484ba --- /dev/null +++ b/example/src/demo/pc/grid/edit/mutil-render.vue @@ -0,0 +1,151 @@ + + + diff --git a/example/src/demo/pc/grid/edit/revertData.vue b/example/src/demo/pc/grid/edit/revertData.vue new file mode 100644 index 000000000..b0a7e4332 --- /dev/null +++ b/example/src/demo/pc/grid/edit/revertData.vue @@ -0,0 +1,82 @@ + + + diff --git a/example/src/demo/pc/grid/event/cell-click-event.vue b/example/src/demo/pc/grid/event/cell-click-event.vue new file mode 100644 index 000000000..be07d388c --- /dev/null +++ b/example/src/demo/pc/grid/event/cell-click-event.vue @@ -0,0 +1,84 @@ + + + + + diff --git a/example/src/demo/pc/grid/event/cell-dblclick-event.vue b/example/src/demo/pc/grid/event/cell-dblclick-event.vue new file mode 100644 index 000000000..1118f7ac3 --- /dev/null +++ b/example/src/demo/pc/grid/event/cell-dblclick-event.vue @@ -0,0 +1,84 @@ + + + + + diff --git a/example/src/demo/pc/grid/event/cell-mouseenter-event.vue b/example/src/demo/pc/grid/event/cell-mouseenter-event.vue new file mode 100644 index 000000000..84002890a --- /dev/null +++ b/example/src/demo/pc/grid/event/cell-mouseenter-event.vue @@ -0,0 +1,87 @@ + + + + + diff --git a/example/src/demo/pc/grid/event/cell-mouseleave-event.vue b/example/src/demo/pc/grid/event/cell-mouseleave-event.vue new file mode 100644 index 000000000..ca3bbb7d0 --- /dev/null +++ b/example/src/demo/pc/grid/event/cell-mouseleave-event.vue @@ -0,0 +1,87 @@ + + + + + diff --git a/example/src/demo/pc/grid/event/current-change-event.vue b/example/src/demo/pc/grid/event/current-change-event.vue new file mode 100644 index 000000000..15f766c2a --- /dev/null +++ b/example/src/demo/pc/grid/event/current-change-event.vue @@ -0,0 +1,75 @@ + + + diff --git a/example/src/demo/pc/grid/event/edit-actived-event.vue b/example/src/demo/pc/grid/event/edit-actived-event.vue new file mode 100644 index 000000000..dc7f899a3 --- /dev/null +++ b/example/src/demo/pc/grid/event/edit-actived-event.vue @@ -0,0 +1,78 @@ + + + diff --git a/example/src/demo/pc/grid/event/edit-closed-event.vue b/example/src/demo/pc/grid/event/edit-closed-event.vue new file mode 100644 index 000000000..12c97d871 --- /dev/null +++ b/example/src/demo/pc/grid/event/edit-closed-event.vue @@ -0,0 +1,78 @@ + + + diff --git a/example/src/demo/pc/grid/event/edit-disabled-event.vue b/example/src/demo/pc/grid/event/edit-disabled-event.vue new file mode 100644 index 000000000..c0579969d --- /dev/null +++ b/example/src/demo/pc/grid/event/edit-disabled-event.vue @@ -0,0 +1,133 @@ + + + diff --git a/example/src/demo/pc/grid/event/footer-cell-click-event.vue b/example/src/demo/pc/grid/event/footer-cell-click-event.vue new file mode 100644 index 000000000..ec65dd30e --- /dev/null +++ b/example/src/demo/pc/grid/event/footer-cell-click-event.vue @@ -0,0 +1,219 @@ + + + diff --git a/example/src/demo/pc/grid/event/footer-cell-context-menu-event.vue b/example/src/demo/pc/grid/event/footer-cell-context-menu-event.vue new file mode 100644 index 000000000..d56a0e913 --- /dev/null +++ b/example/src/demo/pc/grid/event/footer-cell-context-menu-event.vue @@ -0,0 +1,223 @@ + + + diff --git a/example/src/demo/pc/grid/event/footer-cell-dblclick-event.vue b/example/src/demo/pc/grid/event/footer-cell-dblclick-event.vue new file mode 100644 index 000000000..f8b0a3879 --- /dev/null +++ b/example/src/demo/pc/grid/event/footer-cell-dblclick-event.vue @@ -0,0 +1,220 @@ + + + diff --git a/example/src/demo/pc/grid/event/grid-events.vue b/example/src/demo/pc/grid/event/grid-events.vue new file mode 100644 index 000000000..6b0d9a15f --- /dev/null +++ b/example/src/demo/pc/grid/event/grid-events.vue @@ -0,0 +1,87 @@ + + + + + diff --git a/example/src/demo/pc/grid/event/grid-scroll-event.vue b/example/src/demo/pc/grid/event/grid-scroll-event.vue new file mode 100644 index 000000000..03731fec2 --- /dev/null +++ b/example/src/demo/pc/grid/event/grid-scroll-event.vue @@ -0,0 +1,148 @@ + + + + + diff --git a/example/src/demo/pc/grid/event/header-cell-context-menu-event.vue b/example/src/demo/pc/grid/event/header-cell-context-menu-event.vue new file mode 100644 index 000000000..3006dd175 --- /dev/null +++ b/example/src/demo/pc/grid/event/header-cell-context-menu-event.vue @@ -0,0 +1,175 @@ + + + diff --git a/example/src/demo/pc/grid/event/header-click-event.vue b/example/src/demo/pc/grid/event/header-click-event.vue new file mode 100644 index 000000000..421d26158 --- /dev/null +++ b/example/src/demo/pc/grid/event/header-click-event.vue @@ -0,0 +1,87 @@ + + + + + diff --git a/example/src/demo/pc/grid/event/header-dblclick-event.vue b/example/src/demo/pc/grid/event/header-dblclick-event.vue new file mode 100644 index 000000000..4c2ee7235 --- /dev/null +++ b/example/src/demo/pc/grid/event/header-dblclick-event.vue @@ -0,0 +1,87 @@ + + + + + diff --git a/example/src/demo/pc/grid/event/page-before-change-event.vue b/example/src/demo/pc/grid/event/page-before-change-event.vue new file mode 100644 index 000000000..14c8c8084 --- /dev/null +++ b/example/src/demo/pc/grid/event/page-before-change-event.vue @@ -0,0 +1,135 @@ + + + diff --git a/example/src/demo/pc/grid/event/page-change-event.vue b/example/src/demo/pc/grid/event/page-change-event.vue new file mode 100644 index 000000000..85bcc0620 --- /dev/null +++ b/example/src/demo/pc/grid/event/page-change-event.vue @@ -0,0 +1,128 @@ + + + diff --git a/example/src/demo/pc/grid/event/radio-change-event.vue b/example/src/demo/pc/grid/event/radio-change-event.vue new file mode 100644 index 000000000..d2bb2530f --- /dev/null +++ b/example/src/demo/pc/grid/event/radio-change-event.vue @@ -0,0 +1,74 @@ + + + diff --git a/example/src/demo/pc/grid/event/resizable-change-event.vue b/example/src/demo/pc/grid/event/resizable-change-event.vue new file mode 100644 index 000000000..5d74d368e --- /dev/null +++ b/example/src/demo/pc/grid/event/resizable-change-event.vue @@ -0,0 +1,74 @@ + + + diff --git a/example/src/demo/pc/grid/event/select-all-event.vue b/example/src/demo/pc/grid/event/select-all-event.vue new file mode 100644 index 000000000..6ab995016 --- /dev/null +++ b/example/src/demo/pc/grid/event/select-all-event.vue @@ -0,0 +1,75 @@ + + + diff --git a/example/src/demo/pc/grid/event/select-change-event.vue b/example/src/demo/pc/grid/event/select-change-event.vue new file mode 100644 index 000000000..518c6dbd9 --- /dev/null +++ b/example/src/demo/pc/grid/event/select-change-event.vue @@ -0,0 +1,75 @@ + + + diff --git a/example/src/demo/pc/grid/event/table-data-association.vue b/example/src/demo/pc/grid/event/table-data-association.vue new file mode 100644 index 000000000..71cf786a3 --- /dev/null +++ b/example/src/demo/pc/grid/event/table-data-association.vue @@ -0,0 +1,146 @@ + + + diff --git a/example/src/demo/pc/grid/event/toggle-expand-change-event.vue b/example/src/demo/pc/grid/event/toggle-expand-change-event.vue new file mode 100644 index 000000000..f6937e9b0 --- /dev/null +++ b/example/src/demo/pc/grid/event/toggle-expand-change-event.vue @@ -0,0 +1,170 @@ + + + diff --git a/example/src/demo/pc/grid/event/toggle-tree-change-event.vue b/example/src/demo/pc/grid/event/toggle-tree-change-event.vue new file mode 100644 index 000000000..3d30f0b63 --- /dev/null +++ b/example/src/demo/pc/grid/event/toggle-tree-change-event.vue @@ -0,0 +1,170 @@ + + + diff --git a/example/src/demo/pc/grid/event/toolbar-button-click-event.vue b/example/src/demo/pc/grid/event/toolbar-button-click-event.vue new file mode 100644 index 000000000..42394fd48 --- /dev/null +++ b/example/src/demo/pc/grid/event/toolbar-button-click-event.vue @@ -0,0 +1,103 @@ + + + diff --git a/example/src/demo/pc/grid/event/valid-error-event.vue b/example/src/demo/pc/grid/event/valid-error-event.vue new file mode 100644 index 000000000..07d95f346 --- /dev/null +++ b/example/src/demo/pc/grid/event/valid-error-event.vue @@ -0,0 +1,149 @@ + + + diff --git a/example/src/demo/pc/grid/expand/hasRowExpand.vue b/example/src/demo/pc/grid/expand/hasRowExpand.vue new file mode 100644 index 000000000..9e09a8812 --- /dev/null +++ b/example/src/demo/pc/grid/expand/hasRowExpand.vue @@ -0,0 +1,91 @@ + + + diff --git a/example/src/demo/pc/grid/faq/unbalanced.vue b/example/src/demo/pc/grid/faq/unbalanced.vue new file mode 100644 index 000000000..e6266632d --- /dev/null +++ b/example/src/demo/pc/grid/faq/unbalanced.vue @@ -0,0 +1,109 @@ + + + diff --git a/example/src/demo/pc/grid/filter/advanced-filter.vue b/example/src/demo/pc/grid/filter/advanced-filter.vue new file mode 100644 index 000000000..fcc99306f --- /dev/null +++ b/example/src/demo/pc/grid/filter/advanced-filter.vue @@ -0,0 +1,181 @@ + + + diff --git a/example/src/demo/pc/grid/filter/custom-filter.vue b/example/src/demo/pc/grid/filter/custom-filter.vue new file mode 100644 index 000000000..69a072d0a --- /dev/null +++ b/example/src/demo/pc/grid/filter/custom-filter.vue @@ -0,0 +1,102 @@ + + + diff --git a/example/src/demo/pc/grid/filter/default-filter.vue b/example/src/demo/pc/grid/filter/default-filter.vue new file mode 100644 index 000000000..bb7eb40e2 --- /dev/null +++ b/example/src/demo/pc/grid/filter/default-filter.vue @@ -0,0 +1,140 @@ + + + diff --git a/example/src/demo/pc/grid/filter/default-relation.vue b/example/src/demo/pc/grid/filter/default-relation.vue new file mode 100644 index 000000000..2d66a3476 --- /dev/null +++ b/example/src/demo/pc/grid/filter/default-relation.vue @@ -0,0 +1,120 @@ + + + diff --git a/example/src/demo/pc/grid/filter/server-filter.vue b/example/src/demo/pc/grid/filter/server-filter.vue new file mode 100644 index 000000000..329a9c4e6 --- /dev/null +++ b/example/src/demo/pc/grid/filter/server-filter.vue @@ -0,0 +1,125 @@ + + + diff --git a/example/src/demo/pc/grid/fixed/left-fixed.vue b/example/src/demo/pc/grid/fixed/left-fixed.vue new file mode 100644 index 000000000..9ef440370 --- /dev/null +++ b/example/src/demo/pc/grid/fixed/left-fixed.vue @@ -0,0 +1,83 @@ + + + diff --git a/example/src/demo/pc/grid/fixed/multi-column-fixed.vue b/example/src/demo/pc/grid/fixed/multi-column-fixed.vue new file mode 100644 index 000000000..e67151f88 --- /dev/null +++ b/example/src/demo/pc/grid/fixed/multi-column-fixed.vue @@ -0,0 +1,83 @@ + + + diff --git a/example/src/demo/pc/grid/fixed/right-fixed.vue b/example/src/demo/pc/grid/fixed/right-fixed.vue new file mode 100644 index 000000000..cc1c8407c --- /dev/null +++ b/example/src/demo/pc/grid/fixed/right-fixed.vue @@ -0,0 +1,83 @@ + + + diff --git a/example/src/demo/pc/grid/footer/custom-footer.vue b/example/src/demo/pc/grid/footer/custom-footer.vue new file mode 100644 index 000000000..e69de29bb diff --git a/example/src/demo/pc/grid/footer/footer-class-name.vue b/example/src/demo/pc/grid/footer/footer-class-name.vue new file mode 100644 index 000000000..2feeebba4 --- /dev/null +++ b/example/src/demo/pc/grid/footer/footer-class-name.vue @@ -0,0 +1,117 @@ + + + + + diff --git a/example/src/demo/pc/grid/footer/footer-row-or-column-span.vue b/example/src/demo/pc/grid/footer/footer-row-or-column-span.vue new file mode 100644 index 000000000..41edb89d5 --- /dev/null +++ b/example/src/demo/pc/grid/footer/footer-row-or-column-span.vue @@ -0,0 +1,138 @@ + + + diff --git a/example/src/demo/pc/grid/footer/footer-summation-empty.vue b/example/src/demo/pc/grid/footer/footer-summation-empty.vue new file mode 100644 index 000000000..9e30e92a6 --- /dev/null +++ b/example/src/demo/pc/grid/footer/footer-summation-empty.vue @@ -0,0 +1,125 @@ + + + diff --git a/example/src/demo/pc/grid/footer/footer-summation.vue b/example/src/demo/pc/grid/footer/footer-summation.vue new file mode 100644 index 000000000..4a464887b --- /dev/null +++ b/example/src/demo/pc/grid/footer/footer-summation.vue @@ -0,0 +1,114 @@ + + + diff --git a/example/src/demo/pc/grid/grid-params.vue b/example/src/demo/pc/grid/grid-params.vue new file mode 100644 index 000000000..374f82523 --- /dev/null +++ b/example/src/demo/pc/grid/grid-params.vue @@ -0,0 +1,68 @@ + + + diff --git a/example/src/demo/pc/grid/grid_Example/dataCascading/arbitraryCascade.vue b/example/src/demo/pc/grid/grid_Example/dataCascading/arbitraryCascade.vue new file mode 100644 index 000000000..089972548 --- /dev/null +++ b/example/src/demo/pc/grid/grid_Example/dataCascading/arbitraryCascade.vue @@ -0,0 +1,231 @@ + + + diff --git a/example/src/demo/pc/grid/grid_Example/dataCascading/cascade.vue b/example/src/demo/pc/grid/grid_Example/dataCascading/cascade.vue new file mode 100644 index 000000000..e4a3dfb61 --- /dev/null +++ b/example/src/demo/pc/grid/grid_Example/dataCascading/cascade.vue @@ -0,0 +1,280 @@ + + + diff --git a/example/src/demo/pc/grid/grid_Example/dynamicallyColumns.vue b/example/src/demo/pc/grid/grid_Example/dynamicallyColumns.vue new file mode 100644 index 000000000..d4c10a8fa --- /dev/null +++ b/example/src/demo/pc/grid/grid_Example/dynamicallyColumns.vue @@ -0,0 +1,210 @@ + + + diff --git a/example/src/demo/pc/grid/grid_Example/gridEdit/custom-editor-select.vue b/example/src/demo/pc/grid/grid_Example/gridEdit/custom-editor-select.vue new file mode 100644 index 000000000..04e5a8858 --- /dev/null +++ b/example/src/demo/pc/grid/grid_Example/gridEdit/custom-editor-select.vue @@ -0,0 +1,140 @@ + + + diff --git a/example/src/demo/pc/grid/grid_Example/gridEdit/custom-editor.vue b/example/src/demo/pc/grid/grid_Example/gridEdit/custom-editor.vue new file mode 100644 index 000000000..034b66ecb --- /dev/null +++ b/example/src/demo/pc/grid/grid_Example/gridEdit/custom-editor.vue @@ -0,0 +1,155 @@ + + + + + diff --git a/example/src/demo/pc/grid/grid_Example/gridEdit/custom-editor2.vue b/example/src/demo/pc/grid/grid_Example/gridEdit/custom-editor2.vue new file mode 100644 index 000000000..73e2d39fa --- /dev/null +++ b/example/src/demo/pc/grid/grid_Example/gridEdit/custom-editor2.vue @@ -0,0 +1,162 @@ + + + diff --git a/example/src/demo/pc/grid/grid_Example/gridEdit/custom-editor3.vue b/example/src/demo/pc/grid/grid_Example/gridEdit/custom-editor3.vue new file mode 100644 index 000000000..d8123f050 --- /dev/null +++ b/example/src/demo/pc/grid/grid_Example/gridEdit/custom-editor3.vue @@ -0,0 +1,159 @@ + + + diff --git a/example/src/demo/pc/grid/grid_Example/gridEdit/inner-editor.vue b/example/src/demo/pc/grid/grid_Example/gridEdit/inner-editor.vue new file mode 100644 index 000000000..d179db16b --- /dev/null +++ b/example/src/demo/pc/grid/grid_Example/gridEdit/inner-editor.vue @@ -0,0 +1,141 @@ + + + diff --git a/example/src/demo/pc/grid/grid_Example/gridEdit/popeditor-in-grid-remote-search.vue b/example/src/demo/pc/grid/grid_Example/gridEdit/popeditor-in-grid-remote-search.vue new file mode 100644 index 000000000..134cce833 --- /dev/null +++ b/example/src/demo/pc/grid/grid_Example/gridEdit/popeditor-in-grid-remote-search.vue @@ -0,0 +1,171 @@ + + + diff --git a/example/src/demo/pc/grid/grid_Example/gridEdit/popeditor-in-grid.vue b/example/src/demo/pc/grid/grid_Example/gridEdit/popeditor-in-grid.vue new file mode 100644 index 000000000..982a60310 --- /dev/null +++ b/example/src/demo/pc/grid/grid_Example/gridEdit/popeditor-in-grid.vue @@ -0,0 +1,149 @@ + + + diff --git a/example/src/demo/pc/grid/grid_Example/gridRenderer/custom-renderer.vue b/example/src/demo/pc/grid/grid_Example/gridRenderer/custom-renderer.vue new file mode 100644 index 000000000..1471da228 --- /dev/null +++ b/example/src/demo/pc/grid/grid_Example/gridRenderer/custom-renderer.vue @@ -0,0 +1,126 @@ + + + diff --git a/example/src/demo/pc/grid/grid_Example/gridRenderer/inner-renderer.vue b/example/src/demo/pc/grid/grid_Example/gridRenderer/inner-renderer.vue new file mode 100644 index 000000000..8cf57df1c --- /dev/null +++ b/example/src/demo/pc/grid/grid_Example/gridRenderer/inner-renderer.vue @@ -0,0 +1,119 @@ + + + diff --git a/example/src/demo/pc/grid/grid_Example/gridValid/before-submit-validation.vue b/example/src/demo/pc/grid/grid_Example/gridValid/before-submit-validation.vue new file mode 100644 index 000000000..4f5f43288 --- /dev/null +++ b/example/src/demo/pc/grid/grid_Example/gridValid/before-submit-validation.vue @@ -0,0 +1,171 @@ + + + diff --git a/example/src/demo/pc/grid/grid_Example/gridValid/custcomp.vue b/example/src/demo/pc/grid/grid_Example/gridValid/custcomp.vue new file mode 100644 index 000000000..0030d3856 --- /dev/null +++ b/example/src/demo/pc/grid/grid_Example/gridValid/custcomp.vue @@ -0,0 +1,179 @@ + + + diff --git a/example/src/demo/pc/grid/grid_Example/gridValid/editing-isvalidalways-validation.vue b/example/src/demo/pc/grid/grid_Example/gridValid/editing-isvalidalways-validation.vue new file mode 100644 index 000000000..4d01d192e --- /dev/null +++ b/example/src/demo/pc/grid/grid_Example/gridValid/editing-isvalidalways-validation.vue @@ -0,0 +1,145 @@ + + + diff --git a/example/src/demo/pc/grid/grid_Example/gridValid/editing-validation.vue b/example/src/demo/pc/grid/grid_Example/gridValid/editing-validation.vue new file mode 100644 index 000000000..76d3105a0 --- /dev/null +++ b/example/src/demo/pc/grid/grid_Example/gridValid/editing-validation.vue @@ -0,0 +1,145 @@ + + + diff --git a/example/src/demo/pc/grid/grid_Example/gridValid/row-data-valid.vue b/example/src/demo/pc/grid/grid_Example/gridValid/row-data-valid.vue new file mode 100644 index 000000000..e345748a4 --- /dev/null +++ b/example/src/demo/pc/grid/grid_Example/gridValid/row-data-valid.vue @@ -0,0 +1,90 @@ + + + diff --git a/example/src/demo/pc/grid/grid_Example/gridValid/select-validation.vue b/example/src/demo/pc/grid/grid_Example/gridValid/select-validation.vue new file mode 100644 index 000000000..56b51db50 --- /dev/null +++ b/example/src/demo/pc/grid/grid_Example/gridValid/select-validation.vue @@ -0,0 +1,178 @@ + + + diff --git a/example/src/demo/pc/grid/grid_Example/gridValid/tipconfig.vue b/example/src/demo/pc/grid/grid_Example/gridValid/tipconfig.vue new file mode 100644 index 000000000..098519b27 --- /dev/null +++ b/example/src/demo/pc/grid/grid_Example/gridValid/tipconfig.vue @@ -0,0 +1,149 @@ + + + diff --git a/example/src/demo/pc/grid/grid_Example/gridValid/valid-config.vue b/example/src/demo/pc/grid/grid_Example/gridValid/valid-config.vue new file mode 100644 index 000000000..eff30ff5b --- /dev/null +++ b/example/src/demo/pc/grid/grid_Example/gridValid/valid-config.vue @@ -0,0 +1,149 @@ + + + diff --git a/example/src/demo/pc/grid/grid_Example/gridValid/validation-scroll-to-col.vue b/example/src/demo/pc/grid/grid_Example/gridValid/validation-scroll-to-col.vue new file mode 100644 index 000000000..358b18e20 --- /dev/null +++ b/example/src/demo/pc/grid/grid_Example/gridValid/validation-scroll-to-col.vue @@ -0,0 +1,172 @@ + + + diff --git a/example/src/demo/pc/grid/grid_Example/nestedGrid.vue b/example/src/demo/pc/grid/grid_Example/nestedGrid.vue new file mode 100644 index 000000000..6311241fd --- /dev/null +++ b/example/src/demo/pc/grid/grid_Example/nestedGrid.vue @@ -0,0 +1,172 @@ + + + diff --git a/example/src/demo/pc/grid/grid_Example/reverseRow.vue b/example/src/demo/pc/grid/grid_Example/reverseRow.vue new file mode 100644 index 000000000..9a7a2b8f9 --- /dev/null +++ b/example/src/demo/pc/grid/grid_Example/reverseRow.vue @@ -0,0 +1,164 @@ + + + diff --git a/example/src/demo/pc/grid/grid_Example/shortcutMenu/cell-menu.vue b/example/src/demo/pc/grid/grid_Example/shortcutMenu/cell-menu.vue new file mode 100644 index 000000000..799f37e90 --- /dev/null +++ b/example/src/demo/pc/grid/grid_Example/shortcutMenu/cell-menu.vue @@ -0,0 +1,182 @@ + + + diff --git a/example/src/demo/pc/grid/grid_Example/shortcutMenu/footer-menu.vue b/example/src/demo/pc/grid/grid_Example/shortcutMenu/footer-menu.vue new file mode 100644 index 000000000..a9be29e21 --- /dev/null +++ b/example/src/demo/pc/grid/grid_Example/shortcutMenu/footer-menu.vue @@ -0,0 +1,211 @@ + + + diff --git a/example/src/demo/pc/grid/grid_Example/shortcutMenu/header-menu.vue b/example/src/demo/pc/grid/grid_Example/shortcutMenu/header-menu.vue new file mode 100644 index 000000000..2fb483ee2 --- /dev/null +++ b/example/src/demo/pc/grid/grid_Example/shortcutMenu/header-menu.vue @@ -0,0 +1,170 @@ + + + diff --git a/example/src/demo/pc/grid/grid_Example/shortcutMenu/menu-permissions.vue b/example/src/demo/pc/grid/grid_Example/shortcutMenu/menu-permissions.vue new file mode 100644 index 000000000..2ff053d79 --- /dev/null +++ b/example/src/demo/pc/grid/grid_Example/shortcutMenu/menu-permissions.vue @@ -0,0 +1,264 @@ + + + diff --git a/example/src/demo/pc/grid/header/custom-grid-header.vue b/example/src/demo/pc/grid/header/custom-grid-header.vue new file mode 100644 index 000000000..2931ee4b1 --- /dev/null +++ b/example/src/demo/pc/grid/header/custom-grid-header.vue @@ -0,0 +1,148 @@ + + + diff --git a/example/src/demo/pc/grid/header/header-class-name.vue b/example/src/demo/pc/grid/header/header-class-name.vue new file mode 100644 index 000000000..2de9811cd --- /dev/null +++ b/example/src/demo/pc/grid/header/header-class-name.vue @@ -0,0 +1,79 @@ + + + + + diff --git a/example/src/demo/pc/grid/header/hide-grid-header.vue b/example/src/demo/pc/grid/header/hide-grid-header.vue new file mode 100644 index 000000000..ee906048d --- /dev/null +++ b/example/src/demo/pc/grid/header/hide-grid-header.vue @@ -0,0 +1,83 @@ + + + diff --git a/example/src/demo/pc/grid/header/slot-header.vue b/example/src/demo/pc/grid/header/slot-header.vue new file mode 100644 index 000000000..ed76d2cb7 --- /dev/null +++ b/example/src/demo/pc/grid/header/slot-header.vue @@ -0,0 +1,107 @@ + + + diff --git a/example/src/demo/pc/grid/hide/hideColumn.vue b/example/src/demo/pc/grid/hide/hideColumn.vue new file mode 100644 index 000000000..c8e9be3c8 --- /dev/null +++ b/example/src/demo/pc/grid/hide/hideColumn.vue @@ -0,0 +1,122 @@ + + + diff --git a/example/src/demo/pc/grid/highlight/highlight-cell.vue b/example/src/demo/pc/grid/highlight/highlight-cell.vue new file mode 100644 index 000000000..a845fb7d1 --- /dev/null +++ b/example/src/demo/pc/grid/highlight/highlight-cell.vue @@ -0,0 +1,114 @@ + + + diff --git a/example/src/demo/pc/grid/highlight/highlight-current-column.vue b/example/src/demo/pc/grid/highlight/highlight-current-column.vue new file mode 100644 index 000000000..186ffe726 --- /dev/null +++ b/example/src/demo/pc/grid/highlight/highlight-current-column.vue @@ -0,0 +1,97 @@ + + + diff --git a/example/src/demo/pc/grid/highlight/highlight-current-row.vue b/example/src/demo/pc/grid/highlight/highlight-current-row.vue new file mode 100644 index 000000000..032f301ff --- /dev/null +++ b/example/src/demo/pc/grid/highlight/highlight-current-row.vue @@ -0,0 +1,97 @@ + + + diff --git a/example/src/demo/pc/grid/highlight/highlight-hover-column.vue b/example/src/demo/pc/grid/highlight/highlight-hover-column.vue new file mode 100644 index 000000000..8608b68c4 --- /dev/null +++ b/example/src/demo/pc/grid/highlight/highlight-hover-column.vue @@ -0,0 +1,83 @@ + + + diff --git a/example/src/demo/pc/grid/highlight/highlight-hover-row.vue b/example/src/demo/pc/grid/highlight/highlight-hover-row.vue new file mode 100644 index 000000000..fda38a80c --- /dev/null +++ b/example/src/demo/pc/grid/highlight/highlight-hover-row.vue @@ -0,0 +1,83 @@ + + + diff --git a/example/src/demo/pc/grid/keyboard-config.vue b/example/src/demo/pc/grid/keyboard-config.vue new file mode 100644 index 000000000..9eb694bd7 --- /dev/null +++ b/example/src/demo/pc/grid/keyboard-config.vue @@ -0,0 +1,117 @@ + + + diff --git a/example/src/demo/pc/grid/keyboard-navigation.vue b/example/src/demo/pc/grid/keyboard-navigation.vue new file mode 100644 index 000000000..e3a72f385 --- /dev/null +++ b/example/src/demo/pc/grid/keyboard-navigation.vue @@ -0,0 +1,108 @@ + + + diff --git a/example/src/demo/pc/grid/large-data/load-column.vue b/example/src/demo/pc/grid/large-data/load-column.vue new file mode 100644 index 000000000..c93f80daf --- /dev/null +++ b/example/src/demo/pc/grid/large-data/load-column.vue @@ -0,0 +1,39 @@ + + + diff --git a/example/src/demo/pc/grid/large-data/scroll-to.vue b/example/src/demo/pc/grid/large-data/scroll-to.vue new file mode 100644 index 000000000..ab03c7976 --- /dev/null +++ b/example/src/demo/pc/grid/large-data/scroll-to.vue @@ -0,0 +1,64 @@ + + + diff --git a/example/src/demo/pc/grid/methods/set-active-cell.vue b/example/src/demo/pc/grid/methods/set-active-cell.vue new file mode 100644 index 000000000..fc5f6e3d5 --- /dev/null +++ b/example/src/demo/pc/grid/methods/set-active-cell.vue @@ -0,0 +1,116 @@ + + + diff --git a/example/src/demo/pc/grid/methods/set-all-row-expansion.vue b/example/src/demo/pc/grid/methods/set-all-row-expansion.vue new file mode 100644 index 000000000..9e3cd7e99 --- /dev/null +++ b/example/src/demo/pc/grid/methods/set-all-row-expansion.vue @@ -0,0 +1,97 @@ + + + diff --git a/example/src/demo/pc/grid/methods/set-all-selection.vue b/example/src/demo/pc/grid/methods/set-all-selection.vue new file mode 100644 index 000000000..42ff6a70c --- /dev/null +++ b/example/src/demo/pc/grid/methods/set-all-selection.vue @@ -0,0 +1,112 @@ + + + diff --git a/example/src/demo/pc/grid/methods/set-all-tree-expansion.vue b/example/src/demo/pc/grid/methods/set-all-tree-expansion.vue new file mode 100644 index 000000000..e86182897 --- /dev/null +++ b/example/src/demo/pc/grid/methods/set-all-tree-expansion.vue @@ -0,0 +1,138 @@ + + + diff --git a/example/src/demo/pc/grid/methods/set-current-row.vue b/example/src/demo/pc/grid/methods/set-current-row.vue new file mode 100644 index 000000000..be9c42219 --- /dev/null +++ b/example/src/demo/pc/grid/methods/set-current-row.vue @@ -0,0 +1,112 @@ + + + diff --git a/example/src/demo/pc/grid/methods/set-radio-row.vue b/example/src/demo/pc/grid/methods/set-radio-row.vue new file mode 100644 index 000000000..58c896ccd --- /dev/null +++ b/example/src/demo/pc/grid/methods/set-radio-row.vue @@ -0,0 +1,112 @@ + + + diff --git a/example/src/demo/pc/grid/methods/set-row-expansion.vue b/example/src/demo/pc/grid/methods/set-row-expansion.vue new file mode 100644 index 000000000..cb67141b6 --- /dev/null +++ b/example/src/demo/pc/grid/methods/set-row-expansion.vue @@ -0,0 +1,98 @@ + + + diff --git a/example/src/demo/pc/grid/methods/set-selection.vue b/example/src/demo/pc/grid/methods/set-selection.vue new file mode 100644 index 000000000..56d02ef39 --- /dev/null +++ b/example/src/demo/pc/grid/methods/set-selection.vue @@ -0,0 +1,112 @@ + + + diff --git a/example/src/demo/pc/grid/methods/set-tree-expansion.vue b/example/src/demo/pc/grid/methods/set-tree-expansion.vue new file mode 100644 index 000000000..e38983273 --- /dev/null +++ b/example/src/demo/pc/grid/methods/set-tree-expansion.vue @@ -0,0 +1,138 @@ + + + diff --git a/example/src/demo/pc/grid/methods/sort.vue b/example/src/demo/pc/grid/methods/sort.vue new file mode 100644 index 000000000..e0e02de7e --- /dev/null +++ b/example/src/demo/pc/grid/methods/sort.vue @@ -0,0 +1,112 @@ + + + diff --git a/example/src/demo/pc/grid/methods/toggle-all-selection.vue b/example/src/demo/pc/grid/methods/toggle-all-selection.vue new file mode 100644 index 000000000..cbaeff626 --- /dev/null +++ b/example/src/demo/pc/grid/methods/toggle-all-selection.vue @@ -0,0 +1,112 @@ + + + diff --git a/example/src/demo/pc/grid/methods/toggle-row-expansion.vue b/example/src/demo/pc/grid/methods/toggle-row-expansion.vue new file mode 100644 index 000000000..b4c1ce0d5 --- /dev/null +++ b/example/src/demo/pc/grid/methods/toggle-row-expansion.vue @@ -0,0 +1,97 @@ + + + diff --git a/example/src/demo/pc/grid/methods/toggle-row-selection.vue b/example/src/demo/pc/grid/methods/toggle-row-selection.vue new file mode 100644 index 000000000..f2e230695 --- /dev/null +++ b/example/src/demo/pc/grid/methods/toggle-row-selection.vue @@ -0,0 +1,112 @@ + + + diff --git a/example/src/demo/pc/grid/methods/toggle-tree-expansion.vue b/example/src/demo/pc/grid/methods/toggle-tree-expansion.vue new file mode 100644 index 000000000..dbe5e6e7d --- /dev/null +++ b/example/src/demo/pc/grid/methods/toggle-tree-expansion.vue @@ -0,0 +1,138 @@ + + + diff --git a/example/src/demo/pc/grid/mouse-config.vue b/example/src/demo/pc/grid/mouse-config.vue new file mode 100644 index 000000000..c8ac5fbda --- /dev/null +++ b/example/src/demo/pc/grid/mouse-config.vue @@ -0,0 +1,72 @@ + + + diff --git a/example/src/demo/pc/grid/news/async-colunm-render.vue b/example/src/demo/pc/grid/news/async-colunm-render.vue new file mode 100644 index 000000000..f6ac3ac26 --- /dev/null +++ b/example/src/demo/pc/grid/news/async-colunm-render.vue @@ -0,0 +1,182 @@ + + + diff --git a/example/src/demo/pc/grid/news/auto-height.vue b/example/src/demo/pc/grid/news/auto-height.vue new file mode 100644 index 000000000..6de082baf --- /dev/null +++ b/example/src/demo/pc/grid/news/auto-height.vue @@ -0,0 +1,138 @@ + + + diff --git a/example/src/demo/pc/grid/news/editor-events.vue b/example/src/demo/pc/grid/news/editor-events.vue new file mode 100644 index 000000000..efcecacef --- /dev/null +++ b/example/src/demo/pc/grid/news/editor-events.vue @@ -0,0 +1,168 @@ + + + diff --git a/example/src/demo/pc/grid/pager/inner-pager.vue b/example/src/demo/pc/grid/pager/inner-pager.vue new file mode 100644 index 000000000..7176e0a7c --- /dev/null +++ b/example/src/demo/pc/grid/pager/inner-pager.vue @@ -0,0 +1,125 @@ + + + diff --git a/example/src/demo/pc/grid/pager/showSaveMsg.vue b/example/src/demo/pc/grid/pager/showSaveMsg.vue new file mode 100644 index 000000000..d1e21a189 --- /dev/null +++ b/example/src/demo/pc/grid/pager/showSaveMsg.vue @@ -0,0 +1,128 @@ + + + diff --git a/example/src/demo/pc/grid/recalculate.vue b/example/src/demo/pc/grid/recalculate.vue new file mode 100644 index 000000000..48100820c --- /dev/null +++ b/example/src/demo/pc/grid/recalculate.vue @@ -0,0 +1,119 @@ + + + diff --git a/example/src/demo/pc/grid/row-grouping.vue b/example/src/demo/pc/grid/row-grouping.vue new file mode 100644 index 000000000..bce68212c --- /dev/null +++ b/example/src/demo/pc/grid/row-grouping.vue @@ -0,0 +1,148 @@ + + + + + diff --git a/example/src/demo/pc/grid/rowGroupRender.vue b/example/src/demo/pc/grid/rowGroupRender.vue new file mode 100644 index 000000000..e69b12046 --- /dev/null +++ b/example/src/demo/pc/grid/rowGroupRender.vue @@ -0,0 +1,146 @@ + + + + + diff --git a/example/src/demo/pc/grid/slot/buttons-slot.vue b/example/src/demo/pc/grid/slot/buttons-slot.vue new file mode 100644 index 000000000..094561560 --- /dev/null +++ b/example/src/demo/pc/grid/slot/buttons-slot.vue @@ -0,0 +1,97 @@ + + + diff --git a/example/src/demo/pc/grid/slot/default-slot.vue b/example/src/demo/pc/grid/slot/default-slot.vue new file mode 100644 index 000000000..9fc15bd92 --- /dev/null +++ b/example/src/demo/pc/grid/slot/default-slot.vue @@ -0,0 +1,81 @@ + + + + + diff --git a/example/src/demo/pc/grid/slot/empty-slot.vue b/example/src/demo/pc/grid/slot/empty-slot.vue new file mode 100644 index 000000000..cac922a4d --- /dev/null +++ b/example/src/demo/pc/grid/slot/empty-slot.vue @@ -0,0 +1,32 @@ + + + diff --git a/example/src/demo/pc/grid/sort/combinations-sort.vue b/example/src/demo/pc/grid/sort/combinations-sort.vue new file mode 100644 index 000000000..cf1c23c9b --- /dev/null +++ b/example/src/demo/pc/grid/sort/combinations-sort.vue @@ -0,0 +1,83 @@ + + + diff --git a/example/src/demo/pc/grid/sort/custom-sort.vue b/example/src/demo/pc/grid/sort/custom-sort.vue new file mode 100644 index 000000000..5d5dfc1ae --- /dev/null +++ b/example/src/demo/pc/grid/sort/custom-sort.vue @@ -0,0 +1,91 @@ + + + diff --git a/example/src/demo/pc/grid/sort/default-sort.vue b/example/src/demo/pc/grid/sort/default-sort.vue new file mode 100644 index 000000000..4e25d49d4 --- /dev/null +++ b/example/src/demo/pc/grid/sort/default-sort.vue @@ -0,0 +1,103 @@ + + + diff --git a/example/src/demo/pc/grid/sort/server-sort.vue b/example/src/demo/pc/grid/sort/server-sort.vue new file mode 100644 index 000000000..dc80a7772 --- /dev/null +++ b/example/src/demo/pc/grid/sort/server-sort.vue @@ -0,0 +1,116 @@ + + + diff --git a/example/src/demo/pc/grid/span/column-span.vue b/example/src/demo/pc/grid/span/column-span.vue new file mode 100644 index 000000000..f6f4d0f68 --- /dev/null +++ b/example/src/demo/pc/grid/span/column-span.vue @@ -0,0 +1,141 @@ + + + diff --git a/example/src/demo/pc/grid/span/column-span2.vue b/example/src/demo/pc/grid/span/column-span2.vue new file mode 100644 index 000000000..ab4d6c99e --- /dev/null +++ b/example/src/demo/pc/grid/span/column-span2.vue @@ -0,0 +1,141 @@ + + + diff --git a/example/src/demo/pc/grid/span/custom-span.vue b/example/src/demo/pc/grid/span/custom-span.vue new file mode 100644 index 000000000..e69de29bb diff --git a/example/src/demo/pc/grid/span/row-span/row-span-easy.vue b/example/src/demo/pc/grid/span/row-span/row-span-easy.vue new file mode 100644 index 000000000..7d5b11efe --- /dev/null +++ b/example/src/demo/pc/grid/span/row-span/row-span-easy.vue @@ -0,0 +1,131 @@ + + + diff --git a/example/src/demo/pc/grid/span/row-span/row-span.vue b/example/src/demo/pc/grid/span/row-span/row-span.vue new file mode 100644 index 000000000..4d25924ca --- /dev/null +++ b/example/src/demo/pc/grid/span/row-span/row-span.vue @@ -0,0 +1,151 @@ + + + diff --git a/example/src/demo/pc/grid/stripe/no-stripe.vue b/example/src/demo/pc/grid/stripe/no-stripe.vue new file mode 100644 index 000000000..98fac4bfd --- /dev/null +++ b/example/src/demo/pc/grid/stripe/no-stripe.vue @@ -0,0 +1,89 @@ + + + diff --git a/example/src/demo/pc/grid/stripe/stripe.vue b/example/src/demo/pc/grid/stripe/stripe.vue new file mode 100644 index 000000000..34287db2b --- /dev/null +++ b/example/src/demo/pc/grid/stripe/stripe.vue @@ -0,0 +1,83 @@ + + + diff --git a/example/src/demo/pc/grid/summary/configuration-summary.vue b/example/src/demo/pc/grid/summary/configuration-summary.vue new file mode 100644 index 000000000..ba1fd35d8 --- /dev/null +++ b/example/src/demo/pc/grid/summary/configuration-summary.vue @@ -0,0 +1,88 @@ + + + diff --git a/example/src/demo/pc/grid/summary/custom-summary.vue b/example/src/demo/pc/grid/summary/custom-summary.vue new file mode 100644 index 000000000..87f781b65 --- /dev/null +++ b/example/src/demo/pc/grid/summary/custom-summary.vue @@ -0,0 +1,95 @@ + + + diff --git a/example/src/demo/pc/grid/tip/cell-tip.vue b/example/src/demo/pc/grid/tip/cell-tip.vue new file mode 100644 index 000000000..d234da1f4 --- /dev/null +++ b/example/src/demo/pc/grid/tip/cell-tip.vue @@ -0,0 +1,91 @@ + + + diff --git a/example/src/demo/pc/grid/tip/column-header-tip.vue b/example/src/demo/pc/grid/tip/column-header-tip.vue new file mode 100644 index 000000000..3f240d822 --- /dev/null +++ b/example/src/demo/pc/grid/tip/column-header-tip.vue @@ -0,0 +1,87 @@ + + + diff --git a/example/src/demo/pc/grid/tip/overflow-tip.vue b/example/src/demo/pc/grid/tip/overflow-tip.vue new file mode 100644 index 000000000..aec1d0baf --- /dev/null +++ b/example/src/demo/pc/grid/tip/overflow-tip.vue @@ -0,0 +1,88 @@ + + + diff --git a/example/src/demo/pc/grid/toolbar/cancel-delete.vue b/example/src/demo/pc/grid/toolbar/cancel-delete.vue new file mode 100644 index 000000000..1ed6d98e8 --- /dev/null +++ b/example/src/demo/pc/grid/toolbar/cancel-delete.vue @@ -0,0 +1,134 @@ + + + diff --git a/example/src/demo/pc/grid/toolbar/insert-remove-rows.vue b/example/src/demo/pc/grid/toolbar/insert-remove-rows.vue new file mode 100644 index 000000000..dca106ae9 --- /dev/null +++ b/example/src/demo/pc/grid/toolbar/insert-remove-rows.vue @@ -0,0 +1,83 @@ + + + diff --git a/example/src/demo/pc/grid/toolbar/toolbar-op-config.vue b/example/src/demo/pc/grid/toolbar/toolbar-op-config.vue new file mode 100644 index 000000000..b5f586334 --- /dev/null +++ b/example/src/demo/pc/grid/toolbar/toolbar-op-config.vue @@ -0,0 +1,219 @@ + + + diff --git a/example/src/demo/pc/grid/tree-table/hasTreeExpand.vue b/example/src/demo/pc/grid/tree-table/hasTreeExpand.vue new file mode 100644 index 000000000..ef8ee0fbe --- /dev/null +++ b/example/src/demo/pc/grid/tree-table/hasTreeExpand.vue @@ -0,0 +1,153 @@ + + + diff --git a/example/src/demo/pc/grid/tree-table/tree-grid-base.vue b/example/src/demo/pc/grid/tree-table/tree-grid-base.vue new file mode 100644 index 000000000..169deb310 --- /dev/null +++ b/example/src/demo/pc/grid/tree-table/tree-grid-base.vue @@ -0,0 +1,130 @@ + + + diff --git a/example/src/demo/pc/grid/tree-table/tree-grid-data.vue b/example/src/demo/pc/grid/tree-table/tree-grid-data.vue new file mode 100644 index 000000000..a9b305dcc --- /dev/null +++ b/example/src/demo/pc/grid/tree-table/tree-grid-data.vue @@ -0,0 +1,141 @@ + + + diff --git a/example/src/demo/pc/grid/tree-table/tree-grid-expand-config.vue b/example/src/demo/pc/grid/tree-table/tree-grid-expand-config.vue new file mode 100644 index 000000000..41bb1e312 --- /dev/null +++ b/example/src/demo/pc/grid/tree-table/tree-grid-expand-config.vue @@ -0,0 +1,180 @@ + + + diff --git a/example/src/demo/pc/grid/tree-table/tree-grid-expand.vue b/example/src/demo/pc/grid/tree-table/tree-grid-expand.vue new file mode 100644 index 000000000..9e4045625 --- /dev/null +++ b/example/src/demo/pc/grid/tree-table/tree-grid-expand.vue @@ -0,0 +1,165 @@ + + + diff --git a/example/src/demo/pc/grid/tree-table/tree-grid-fixed-column.vue b/example/src/demo/pc/grid/tree-table/tree-grid-fixed-column.vue new file mode 100644 index 000000000..70f945f06 --- /dev/null +++ b/example/src/demo/pc/grid/tree-table/tree-grid-fixed-column.vue @@ -0,0 +1,133 @@ + + + diff --git a/example/src/demo/pc/grid/tree-table/tree-grid-index.vue b/example/src/demo/pc/grid/tree-table/tree-grid-index.vue new file mode 100644 index 000000000..1ff245a0e --- /dev/null +++ b/example/src/demo/pc/grid/tree-table/tree-grid-index.vue @@ -0,0 +1,137 @@ + + + diff --git a/example/src/demo/pc/grid/tree-table/tree-grid-insert-delete-update.vue b/example/src/demo/pc/grid/tree-table/tree-grid-insert-delete-update.vue new file mode 100644 index 000000000..15243c009 --- /dev/null +++ b/example/src/demo/pc/grid/tree-table/tree-grid-insert-delete-update.vue @@ -0,0 +1,257 @@ + + + diff --git a/example/src/demo/pc/grid/tree-table/tree-grid-keyboard-operation.vue b/example/src/demo/pc/grid/tree-table/tree-grid-keyboard-operation.vue new file mode 100644 index 000000000..0d89de367 --- /dev/null +++ b/example/src/demo/pc/grid/tree-table/tree-grid-keyboard-operation.vue @@ -0,0 +1,137 @@ + + + diff --git a/example/src/demo/pc/grid/tree-table/tree-grid-operation-column.vue b/example/src/demo/pc/grid/tree-table/tree-grid-operation-column.vue new file mode 100644 index 000000000..729d025c6 --- /dev/null +++ b/example/src/demo/pc/grid/tree-table/tree-grid-operation-column.vue @@ -0,0 +1,131 @@ + + + diff --git a/example/src/demo/pc/icon/basic-usage.vue b/example/src/demo/pc/icon/basic-usage.vue new file mode 100644 index 000000000..2d4d2e153 --- /dev/null +++ b/example/src/demo/pc/icon/basic-usage.vue @@ -0,0 +1,53 @@ + + + + + diff --git a/example/src/demo/pc/icon/list.vue b/example/src/demo/pc/icon/list.vue new file mode 100644 index 000000000..526533862 --- /dev/null +++ b/example/src/demo/pc/icon/list.vue @@ -0,0 +1,79 @@ + + + + diff --git a/example/src/demo/pc/icon/show-title.vue b/example/src/demo/pc/icon/show-title.vue new file mode 100644 index 000000000..fa88e1573 --- /dev/null +++ b/example/src/demo/pc/icon/show-title.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/example/src/demo/pc/image/auto-fit-container-size.vue b/example/src/demo/pc/image/auto-fit-container-size.vue new file mode 100644 index 000000000..4a3017c82 --- /dev/null +++ b/example/src/demo/pc/image/auto-fit-container-size.vue @@ -0,0 +1,24 @@ + + + diff --git a/example/src/demo/pc/image/basic-usage.vue b/example/src/demo/pc/image/basic-usage.vue new file mode 100644 index 000000000..7717b6908 --- /dev/null +++ b/example/src/demo/pc/image/basic-usage.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/image/custom-load-failed-text.vue b/example/src/demo/pc/image/custom-load-failed-text.vue new file mode 100644 index 000000000..e4400c75a --- /dev/null +++ b/example/src/demo/pc/image/custom-load-failed-text.vue @@ -0,0 +1,58 @@ + + + + + diff --git a/example/src/demo/pc/image/custom-placeholder.vue b/example/src/demo/pc/image/custom-placeholder.vue new file mode 100644 index 000000000..7aacab548 --- /dev/null +++ b/example/src/demo/pc/image/custom-placeholder.vue @@ -0,0 +1,31 @@ + + + diff --git a/example/src/demo/pc/image/lazy-load.vue b/example/src/demo/pc/image/lazy-load.vue new file mode 100644 index 000000000..3129566d5 --- /dev/null +++ b/example/src/demo/pc/image/lazy-load.vue @@ -0,0 +1,27 @@ + + + + + diff --git a/example/src/demo/pc/image/load-error.vue b/example/src/demo/pc/image/load-error.vue new file mode 100644 index 000000000..5b9d9119d --- /dev/null +++ b/example/src/demo/pc/image/load-error.vue @@ -0,0 +1,23 @@ + + + diff --git a/example/src/demo/pc/image/load-event.vue b/example/src/demo/pc/image/load-event.vue new file mode 100644 index 000000000..c129be4fc --- /dev/null +++ b/example/src/demo/pc/image/load-event.vue @@ -0,0 +1,23 @@ + + + diff --git a/example/src/demo/pc/image/preview-in-dialog.vue b/example/src/demo/pc/image/preview-in-dialog.vue new file mode 100644 index 000000000..cea6a757a --- /dev/null +++ b/example/src/demo/pc/image/preview-in-dialog.vue @@ -0,0 +1,32 @@ + + + diff --git a/example/src/demo/pc/image/preview-src-list.vue b/example/src/demo/pc/image/preview-src-list.vue new file mode 100644 index 000000000..adb5c31b6 --- /dev/null +++ b/example/src/demo/pc/image/preview-src-list.vue @@ -0,0 +1,19 @@ + + + diff --git a/example/src/demo/pc/image/preview-z-index.vue b/example/src/demo/pc/image/preview-z-index.vue new file mode 100644 index 000000000..ba65d8d19 --- /dev/null +++ b/example/src/demo/pc/image/preview-z-index.vue @@ -0,0 +1,19 @@ + + + diff --git a/example/src/demo/pc/index.js b/example/src/demo/pc/index.js new file mode 100644 index 000000000..405d14673 --- /dev/null +++ b/example/src/demo/pc/index.js @@ -0,0 +1,4 @@ +import Components from './components' + +export const getDemoCode = ({ component, type, name }) => + `${component}/${Components[component][type][name]}` diff --git a/example/src/demo/pc/input/autocomplete.vue b/example/src/demo/pc/input/autocomplete.vue new file mode 100644 index 000000000..903027123 --- /dev/null +++ b/example/src/demo/pc/input/autocomplete.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/example/src/demo/pc/input/autofocus.vue b/example/src/demo/pc/input/autofocus.vue new file mode 100644 index 000000000..e2d8b51c0 --- /dev/null +++ b/example/src/demo/pc/input/autofocus.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/example/src/demo/pc/input/autosize.vue b/example/src/demo/pc/input/autosize.vue new file mode 100644 index 000000000..ca6b68fec --- /dev/null +++ b/example/src/demo/pc/input/autosize.vue @@ -0,0 +1,31 @@ + + + + + diff --git a/example/src/demo/pc/input/basic-usage.vue b/example/src/demo/pc/input/basic-usage.vue new file mode 100644 index 000000000..ae4767dd6 --- /dev/null +++ b/example/src/demo/pc/input/basic-usage.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/example/src/demo/pc/input/clearable.vue b/example/src/demo/pc/input/clearable.vue new file mode 100644 index 000000000..974d706f6 --- /dev/null +++ b/example/src/demo/pc/input/clearable.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/example/src/demo/pc/input/cols.vue b/example/src/demo/pc/input/cols.vue new file mode 100644 index 000000000..e6b2a3cd0 --- /dev/null +++ b/example/src/demo/pc/input/cols.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/example/src/demo/pc/input/counter.vue b/example/src/demo/pc/input/counter.vue new file mode 100644 index 000000000..b19b35bea --- /dev/null +++ b/example/src/demo/pc/input/counter.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/example/src/demo/pc/input/disabled.vue b/example/src/demo/pc/input/disabled.vue new file mode 100644 index 000000000..85105edae --- /dev/null +++ b/example/src/demo/pc/input/disabled.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/example/src/demo/pc/input/event-blur.vue b/example/src/demo/pc/input/event-blur.vue new file mode 100644 index 000000000..73ee3e749 --- /dev/null +++ b/example/src/demo/pc/input/event-blur.vue @@ -0,0 +1,35 @@ + + + + + diff --git a/example/src/demo/pc/input/event-change.vue b/example/src/demo/pc/input/event-change.vue new file mode 100644 index 000000000..d512bed5f --- /dev/null +++ b/example/src/demo/pc/input/event-change.vue @@ -0,0 +1,35 @@ + + + + + diff --git a/example/src/demo/pc/input/event-clear.vue b/example/src/demo/pc/input/event-clear.vue new file mode 100644 index 000000000..ab9fff961 --- /dev/null +++ b/example/src/demo/pc/input/event-clear.vue @@ -0,0 +1,36 @@ + + + + + diff --git a/example/src/demo/pc/input/event-focus.vue b/example/src/demo/pc/input/event-focus.vue new file mode 100644 index 000000000..b5381bc7b --- /dev/null +++ b/example/src/demo/pc/input/event-focus.vue @@ -0,0 +1,36 @@ + + + + + diff --git a/example/src/demo/pc/input/event-input.vue b/example/src/demo/pc/input/event-input.vue new file mode 100644 index 000000000..04e838e2a --- /dev/null +++ b/example/src/demo/pc/input/event-input.vue @@ -0,0 +1,35 @@ + + + + + diff --git a/example/src/demo/pc/input/form.vue b/example/src/demo/pc/input/form.vue new file mode 100644 index 000000000..e264a03c7 --- /dev/null +++ b/example/src/demo/pc/input/form.vue @@ -0,0 +1,28 @@ + + + + + diff --git a/example/src/demo/pc/input/label.vue b/example/src/demo/pc/input/label.vue new file mode 100644 index 000000000..105107e21 --- /dev/null +++ b/example/src/demo/pc/input/label.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/example/src/demo/pc/input/max.vue b/example/src/demo/pc/input/max.vue new file mode 100644 index 000000000..6ce5bdd7b --- /dev/null +++ b/example/src/demo/pc/input/max.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/example/src/demo/pc/input/maxlength.vue b/example/src/demo/pc/input/maxlength.vue new file mode 100644 index 000000000..0b81d899c --- /dev/null +++ b/example/src/demo/pc/input/maxlength.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/example/src/demo/pc/input/method-addMemory.vue b/example/src/demo/pc/input/method-addMemory.vue new file mode 100644 index 000000000..5136fba32 --- /dev/null +++ b/example/src/demo/pc/input/method-addMemory.vue @@ -0,0 +1,42 @@ + + + + + diff --git a/example/src/demo/pc/input/method-blur.vue b/example/src/demo/pc/input/method-blur.vue new file mode 100644 index 000000000..275b1152a --- /dev/null +++ b/example/src/demo/pc/input/method-blur.vue @@ -0,0 +1,36 @@ + + + + + diff --git a/example/src/demo/pc/input/method-focus.vue b/example/src/demo/pc/input/method-focus.vue new file mode 100644 index 000000000..dc3402e5c --- /dev/null +++ b/example/src/demo/pc/input/method-focus.vue @@ -0,0 +1,39 @@ + + + + + diff --git a/example/src/demo/pc/input/method-select.vue b/example/src/demo/pc/input/method-select.vue new file mode 100644 index 000000000..4a70aad39 --- /dev/null +++ b/example/src/demo/pc/input/method-select.vue @@ -0,0 +1,39 @@ + + + + + diff --git a/example/src/demo/pc/input/min.vue b/example/src/demo/pc/input/min.vue new file mode 100644 index 000000000..72719776f --- /dev/null +++ b/example/src/demo/pc/input/min.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/example/src/demo/pc/input/name.vue b/example/src/demo/pc/input/name.vue new file mode 100644 index 000000000..00311d597 --- /dev/null +++ b/example/src/demo/pc/input/name.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/example/src/demo/pc/input/placeholder.vue b/example/src/demo/pc/input/placeholder.vue new file mode 100644 index 000000000..dad7eb89b --- /dev/null +++ b/example/src/demo/pc/input/placeholder.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/example/src/demo/pc/input/prefix-icon.vue b/example/src/demo/pc/input/prefix-icon.vue new file mode 100644 index 000000000..400c03d1a --- /dev/null +++ b/example/src/demo/pc/input/prefix-icon.vue @@ -0,0 +1,28 @@ + + + + + diff --git a/example/src/demo/pc/input/readonly.vue b/example/src/demo/pc/input/readonly.vue new file mode 100644 index 000000000..19fb5fe57 --- /dev/null +++ b/example/src/demo/pc/input/readonly.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/example/src/demo/pc/input/resize.vue b/example/src/demo/pc/input/resize.vue new file mode 100644 index 000000000..1f1ae3553 --- /dev/null +++ b/example/src/demo/pc/input/resize.vue @@ -0,0 +1,62 @@ + + + + + diff --git a/example/src/demo/pc/input/rows.vue b/example/src/demo/pc/input/rows.vue new file mode 100644 index 000000000..40777df34 --- /dev/null +++ b/example/src/demo/pc/input/rows.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/example/src/demo/pc/input/show-password.vue b/example/src/demo/pc/input/show-password.vue new file mode 100644 index 000000000..93f871916 --- /dev/null +++ b/example/src/demo/pc/input/show-password.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/example/src/demo/pc/input/show-word-limit.vue b/example/src/demo/pc/input/show-word-limit.vue new file mode 100644 index 000000000..fdbde457d --- /dev/null +++ b/example/src/demo/pc/input/show-word-limit.vue @@ -0,0 +1,39 @@ + + + + + diff --git a/example/src/demo/pc/input/size.vue b/example/src/demo/pc/input/size.vue new file mode 100644 index 000000000..91f7bbba4 --- /dev/null +++ b/example/src/demo/pc/input/size.vue @@ -0,0 +1,44 @@ + + + + + diff --git a/example/src/demo/pc/input/slot-append.vue b/example/src/demo/pc/input/slot-append.vue new file mode 100644 index 000000000..31c213043 --- /dev/null +++ b/example/src/demo/pc/input/slot-append.vue @@ -0,0 +1,28 @@ + + + + + diff --git a/example/src/demo/pc/input/slot-prefix.vue b/example/src/demo/pc/input/slot-prefix.vue new file mode 100644 index 000000000..48498c08e --- /dev/null +++ b/example/src/demo/pc/input/slot-prefix.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/example/src/demo/pc/input/slot-prepend.vue b/example/src/demo/pc/input/slot-prepend.vue new file mode 100644 index 000000000..1e8a5088c --- /dev/null +++ b/example/src/demo/pc/input/slot-prepend.vue @@ -0,0 +1,28 @@ + + + + + diff --git a/example/src/demo/pc/input/slot-suffix.vue b/example/src/demo/pc/input/slot-suffix.vue new file mode 100644 index 000000000..9d9f89603 --- /dev/null +++ b/example/src/demo/pc/input/slot-suffix.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/example/src/demo/pc/input/step.vue b/example/src/demo/pc/input/step.vue new file mode 100644 index 000000000..f4c24e938 --- /dev/null +++ b/example/src/demo/pc/input/step.vue @@ -0,0 +1,31 @@ + + + + + diff --git a/example/src/demo/pc/input/suffix-icon.vue b/example/src/demo/pc/input/suffix-icon.vue new file mode 100644 index 000000000..57a0e45c8 --- /dev/null +++ b/example/src/demo/pc/input/suffix-icon.vue @@ -0,0 +1,28 @@ + + + + + diff --git a/example/src/demo/pc/input/tabindex.vue b/example/src/demo/pc/input/tabindex.vue new file mode 100644 index 000000000..108364a25 --- /dev/null +++ b/example/src/demo/pc/input/tabindex.vue @@ -0,0 +1,27 @@ + + + + + diff --git a/example/src/demo/pc/input/type.vue b/example/src/demo/pc/input/type.vue new file mode 100644 index 000000000..e50f80acc --- /dev/null +++ b/example/src/demo/pc/input/type.vue @@ -0,0 +1,89 @@ + + + + + diff --git a/example/src/demo/pc/input/validate-event.vue b/example/src/demo/pc/input/validate-event.vue new file mode 100644 index 000000000..019c68488 --- /dev/null +++ b/example/src/demo/pc/input/validate-event.vue @@ -0,0 +1,44 @@ + + + + + diff --git a/example/src/demo/pc/ip-address/blur.vue b/example/src/demo/pc/ip-address/blur.vue new file mode 100644 index 000000000..6f88ef11d --- /dev/null +++ b/example/src/demo/pc/ip-address/blur.vue @@ -0,0 +1,23 @@ + + + diff --git a/example/src/demo/pc/ip-address/change.vue b/example/src/demo/pc/ip-address/change.vue new file mode 100644 index 000000000..2d6f66a22 --- /dev/null +++ b/example/src/demo/pc/ip-address/change.vue @@ -0,0 +1,26 @@ + + + diff --git a/example/src/demo/pc/ip-address/delimiter.vue b/example/src/demo/pc/ip-address/delimiter.vue new file mode 100644 index 000000000..10e08792e --- /dev/null +++ b/example/src/demo/pc/ip-address/delimiter.vue @@ -0,0 +1,20 @@ + + + diff --git a/example/src/demo/pc/ip-address/disabled.vue b/example/src/demo/pc/ip-address/disabled.vue new file mode 100644 index 000000000..9d870b28b --- /dev/null +++ b/example/src/demo/pc/ip-address/disabled.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/ip-address/focus.vue b/example/src/demo/pc/ip-address/focus.vue new file mode 100644 index 000000000..b4a1f2404 --- /dev/null +++ b/example/src/demo/pc/ip-address/focus.vue @@ -0,0 +1,26 @@ + + + diff --git a/example/src/demo/pc/ip-address/input.vue b/example/src/demo/pc/ip-address/input.vue new file mode 100644 index 000000000..6e30e7b8b --- /dev/null +++ b/example/src/demo/pc/ip-address/input.vue @@ -0,0 +1,26 @@ + + + diff --git a/example/src/demo/pc/ip-address/ipv4-type.vue b/example/src/demo/pc/ip-address/ipv4-type.vue new file mode 100644 index 000000000..f52f0bd91 --- /dev/null +++ b/example/src/demo/pc/ip-address/ipv4-type.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/ip-address/ipv6-type.vue b/example/src/demo/pc/ip-address/ipv6-type.vue new file mode 100644 index 000000000..d571bb1cf --- /dev/null +++ b/example/src/demo/pc/ip-address/ipv6-type.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/ip-address/readonly.vue b/example/src/demo/pc/ip-address/readonly.vue new file mode 100644 index 000000000..ea87baf17 --- /dev/null +++ b/example/src/demo/pc/ip-address/readonly.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/ip-address/select.vue b/example/src/demo/pc/ip-address/select.vue new file mode 100644 index 000000000..9a96f41db --- /dev/null +++ b/example/src/demo/pc/ip-address/select.vue @@ -0,0 +1,26 @@ + + + diff --git a/example/src/demo/pc/ip-address/size.vue b/example/src/demo/pc/ip-address/size.vue new file mode 100644 index 000000000..eb0019f8a --- /dev/null +++ b/example/src/demo/pc/ip-address/size.vue @@ -0,0 +1,20 @@ + + + diff --git a/example/src/demo/pc/ip-address/slots.vue b/example/src/demo/pc/ip-address/slots.vue new file mode 100644 index 000000000..1743d94b2 --- /dev/null +++ b/example/src/demo/pc/ip-address/slots.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/layout/alignment.vue b/example/src/demo/pc/layout/alignment.vue new file mode 100644 index 000000000..4f979aacd --- /dev/null +++ b/example/src/demo/pc/layout/alignment.vue @@ -0,0 +1,159 @@ + + + + + diff --git a/example/src/demo/pc/layout/base.vue b/example/src/demo/pc/layout/base.vue new file mode 100644 index 000000000..ad3960bb5 --- /dev/null +++ b/example/src/demo/pc/layout/base.vue @@ -0,0 +1,73 @@ + + + + + diff --git a/example/src/demo/pc/layout/gutter.vue b/example/src/demo/pc/layout/gutter.vue new file mode 100644 index 000000000..17e0f0d34 --- /dev/null +++ b/example/src/demo/pc/layout/gutter.vue @@ -0,0 +1,52 @@ + + + + + diff --git a/example/src/demo/pc/layout/offset.vue b/example/src/demo/pc/layout/offset.vue new file mode 100644 index 000000000..2c7ce7051 --- /dev/null +++ b/example/src/demo/pc/layout/offset.vue @@ -0,0 +1,96 @@ + + + + + diff --git a/example/src/demo/pc/layout/order.vue b/example/src/demo/pc/layout/order.vue new file mode 100644 index 000000000..2e125a17b --- /dev/null +++ b/example/src/demo/pc/layout/order.vue @@ -0,0 +1,77 @@ + + + + + diff --git a/example/src/demo/pc/layout/responsive-layout.vue b/example/src/demo/pc/layout/responsive-layout.vue new file mode 100644 index 000000000..5c140cb08 --- /dev/null +++ b/example/src/demo/pc/layout/responsive-layout.vue @@ -0,0 +1,66 @@ + + + + + diff --git a/example/src/demo/pc/link-menu/basic-usage.vue b/example/src/demo/pc/link-menu/basic-usage.vue new file mode 100644 index 000000000..7d1a0048e --- /dev/null +++ b/example/src/demo/pc/link-menu/basic-usage.vue @@ -0,0 +1,92 @@ + + + diff --git a/example/src/demo/pc/link-menu/custom-foot.vue b/example/src/demo/pc/link-menu/custom-foot.vue new file mode 100644 index 000000000..fc557421e --- /dev/null +++ b/example/src/demo/pc/link-menu/custom-foot.vue @@ -0,0 +1,108 @@ + + + diff --git a/example/src/demo/pc/link-menu/custom-icon.vue b/example/src/demo/pc/link-menu/custom-icon.vue new file mode 100644 index 000000000..90318d726 --- /dev/null +++ b/example/src/demo/pc/link-menu/custom-icon.vue @@ -0,0 +1,101 @@ + + + diff --git a/example/src/demo/pc/link-menu/data-resource.vue b/example/src/demo/pc/link-menu/data-resource.vue new file mode 100644 index 000000000..406e7c34e --- /dev/null +++ b/example/src/demo/pc/link-menu/data-resource.vue @@ -0,0 +1,93 @@ + + + diff --git a/example/src/demo/pc/link-menu/get-menu-data-sync.vue b/example/src/demo/pc/link-menu/get-menu-data-sync.vue new file mode 100644 index 000000000..4d988a10a --- /dev/null +++ b/example/src/demo/pc/link-menu/get-menu-data-sync.vue @@ -0,0 +1,97 @@ + + + diff --git a/example/src/demo/pc/link-menu/menu-items.vue b/example/src/demo/pc/link-menu/menu-items.vue new file mode 100644 index 000000000..ba47347c7 --- /dev/null +++ b/example/src/demo/pc/link-menu/menu-items.vue @@ -0,0 +1,96 @@ + + + diff --git a/example/src/demo/pc/link/basic-usage.vue b/example/src/demo/pc/link/basic-usage.vue new file mode 100644 index 000000000..f25e1e7a2 --- /dev/null +++ b/example/src/demo/pc/link/basic-usage.vue @@ -0,0 +1,13 @@ + + + diff --git a/example/src/demo/pc/link/config-href.vue b/example/src/demo/pc/link/config-href.vue new file mode 100644 index 000000000..ecf2b1e04 --- /dev/null +++ b/example/src/demo/pc/link/config-href.vue @@ -0,0 +1,13 @@ + + + diff --git a/example/src/demo/pc/link/custom-icon.vue b/example/src/demo/pc/link/custom-icon.vue new file mode 100644 index 000000000..3b584c40e --- /dev/null +++ b/example/src/demo/pc/link/custom-icon.vue @@ -0,0 +1,32 @@ + + + diff --git a/example/src/demo/pc/link/dynamic-disable.vue b/example/src/demo/pc/link/dynamic-disable.vue new file mode 100644 index 000000000..4539dc6d0 --- /dev/null +++ b/example/src/demo/pc/link/dynamic-disable.vue @@ -0,0 +1,20 @@ + + + diff --git a/example/src/demo/pc/link/focus-no-underline.vue b/example/src/demo/pc/link/focus-no-underline.vue new file mode 100644 index 000000000..70855d5e4 --- /dev/null +++ b/example/src/demo/pc/link/focus-no-underline.vue @@ -0,0 +1,16 @@ + + + diff --git a/example/src/demo/pc/link/link-style.vue b/example/src/demo/pc/link/link-style.vue new file mode 100644 index 000000000..fa8443903 --- /dev/null +++ b/example/src/demo/pc/link/link-style.vue @@ -0,0 +1,20 @@ + + + diff --git a/example/src/demo/pc/loading/background.vue b/example/src/demo/pc/loading/background.vue new file mode 100644 index 000000000..d39253309 --- /dev/null +++ b/example/src/demo/pc/loading/background.vue @@ -0,0 +1,23 @@ + + + + + diff --git a/example/src/demo/pc/loading/basic-usage.vue b/example/src/demo/pc/loading/basic-usage.vue new file mode 100644 index 000000000..773438152 --- /dev/null +++ b/example/src/demo/pc/loading/basic-usage.vue @@ -0,0 +1,28 @@ + + + diff --git a/example/src/demo/pc/loading/body.vue b/example/src/demo/pc/loading/body.vue new file mode 100644 index 000000000..e985b36fb --- /dev/null +++ b/example/src/demo/pc/loading/body.vue @@ -0,0 +1,48 @@ + + + + + diff --git a/example/src/demo/pc/loading/custom-class.vue b/example/src/demo/pc/loading/custom-class.vue new file mode 100644 index 000000000..f86a34777 --- /dev/null +++ b/example/src/demo/pc/loading/custom-class.vue @@ -0,0 +1,24 @@ + + + + + diff --git a/example/src/demo/pc/loading/fullscreen.vue b/example/src/demo/pc/loading/fullscreen.vue new file mode 100644 index 000000000..d5684ae6e --- /dev/null +++ b/example/src/demo/pc/loading/fullscreen.vue @@ -0,0 +1,46 @@ + + + diff --git a/example/src/demo/pc/loading/loading-tip-text.vue b/example/src/demo/pc/loading/loading-tip-text.vue new file mode 100644 index 000000000..60a7b45d5 --- /dev/null +++ b/example/src/demo/pc/loading/loading-tip-text.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/example/src/demo/pc/loading/spinner.vue b/example/src/demo/pc/loading/spinner.vue new file mode 100644 index 000000000..d49f4fc48 --- /dev/null +++ b/example/src/demo/pc/loading/spinner.vue @@ -0,0 +1,25 @@ + + + + + diff --git a/example/src/demo/pc/loading/target.vue b/example/src/demo/pc/loading/target.vue new file mode 100644 index 000000000..84ad671ce --- /dev/null +++ b/example/src/demo/pc/loading/target.vue @@ -0,0 +1,27 @@ + + + + + diff --git a/example/src/demo/pc/milestone/basic-usage.vue b/example/src/demo/pc/milestone/basic-usage.vue new file mode 100644 index 000000000..b1b48b4e5 --- /dev/null +++ b/example/src/demo/pc/milestone/basic-usage.vue @@ -0,0 +1,83 @@ + + + diff --git a/example/src/demo/pc/milestone/custom-bottom.vue b/example/src/demo/pc/milestone/custom-bottom.vue new file mode 100644 index 000000000..4616c0b72 --- /dev/null +++ b/example/src/demo/pc/milestone/custom-bottom.vue @@ -0,0 +1,87 @@ + + + diff --git a/example/src/demo/pc/milestone/custom-flag.vue b/example/src/demo/pc/milestone/custom-flag.vue new file mode 100644 index 000000000..8a9f18729 --- /dev/null +++ b/example/src/demo/pc/milestone/custom-flag.vue @@ -0,0 +1,85 @@ + + + diff --git a/example/src/demo/pc/milestone/custom-icon-slot.vue b/example/src/demo/pc/milestone/custom-icon-slot.vue new file mode 100644 index 000000000..a4896d5a1 --- /dev/null +++ b/example/src/demo/pc/milestone/custom-icon-slot.vue @@ -0,0 +1,99 @@ + + + + + diff --git a/example/src/demo/pc/milestone/custom-top.vue b/example/src/demo/pc/milestone/custom-top.vue new file mode 100644 index 000000000..e7e02d5cb --- /dev/null +++ b/example/src/demo/pc/milestone/custom-top.vue @@ -0,0 +1,55 @@ + + + diff --git a/example/src/demo/pc/milestone/data-field-mapping.vue b/example/src/demo/pc/milestone/data-field-mapping.vue new file mode 100644 index 000000000..15e952720 --- /dev/null +++ b/example/src/demo/pc/milestone/data-field-mapping.vue @@ -0,0 +1,96 @@ + + + diff --git a/example/src/demo/pc/milestone/data-source.vue b/example/src/demo/pc/milestone/data-source.vue new file mode 100644 index 000000000..ad503776a --- /dev/null +++ b/example/src/demo/pc/milestone/data-source.vue @@ -0,0 +1,62 @@ + + + diff --git a/example/src/demo/pc/milestone/flag-before.vue b/example/src/demo/pc/milestone/flag-before.vue new file mode 100644 index 000000000..a3dae5c92 --- /dev/null +++ b/example/src/demo/pc/milestone/flag-before.vue @@ -0,0 +1,94 @@ + + + diff --git a/example/src/demo/pc/milestone/line-style.vue b/example/src/demo/pc/milestone/line-style.vue new file mode 100644 index 000000000..81a079d9f --- /dev/null +++ b/example/src/demo/pc/milestone/line-style.vue @@ -0,0 +1,60 @@ + + + diff --git a/example/src/demo/pc/milestone/milestone-events.vue b/example/src/demo/pc/milestone/milestone-events.vue new file mode 100644 index 000000000..219c6ec17 --- /dev/null +++ b/example/src/demo/pc/milestone/milestone-events.vue @@ -0,0 +1,103 @@ + + + diff --git a/example/src/demo/pc/milestone/milestone-space.vue b/example/src/demo/pc/milestone/milestone-space.vue new file mode 100644 index 000000000..ff9176755 --- /dev/null +++ b/example/src/demo/pc/milestone/milestone-space.vue @@ -0,0 +1,82 @@ + + + diff --git a/example/src/demo/pc/milestone/milestones-status.vue b/example/src/demo/pc/milestone/milestones-status.vue new file mode 100644 index 000000000..c79f0caa6 --- /dev/null +++ b/example/src/demo/pc/milestone/milestones-status.vue @@ -0,0 +1,64 @@ + + + diff --git a/example/src/demo/pc/milestone/show-number.vue b/example/src/demo/pc/milestone/show-number.vue new file mode 100644 index 000000000..1cd4f893d --- /dev/null +++ b/example/src/demo/pc/milestone/show-number.vue @@ -0,0 +1,72 @@ + + + diff --git a/example/src/demo/pc/milestone/solid-style.vue b/example/src/demo/pc/milestone/solid-style.vue new file mode 100644 index 000000000..54be5978c --- /dev/null +++ b/example/src/demo/pc/milestone/solid-style.vue @@ -0,0 +1,72 @@ + + + diff --git a/example/src/demo/pc/milestone/start-index.vue b/example/src/demo/pc/milestone/start-index.vue new file mode 100644 index 000000000..8fbe13590 --- /dev/null +++ b/example/src/demo/pc/milestone/start-index.vue @@ -0,0 +1,52 @@ + + + diff --git a/example/src/demo/pc/modal/base.vue b/example/src/demo/pc/modal/base.vue new file mode 100644 index 000000000..ee4686320 --- /dev/null +++ b/example/src/demo/pc/modal/base.vue @@ -0,0 +1,32 @@ + + + diff --git a/example/src/demo/pc/modal/cancel-event.vue b/example/src/demo/pc/modal/cancel-event.vue new file mode 100644 index 000000000..80e30eae2 --- /dev/null +++ b/example/src/demo/pc/modal/cancel-event.vue @@ -0,0 +1,38 @@ + + + diff --git a/example/src/demo/pc/modal/close-event.vue b/example/src/demo/pc/modal/close-event.vue new file mode 100644 index 000000000..624804409 --- /dev/null +++ b/example/src/demo/pc/modal/close-event.vue @@ -0,0 +1,33 @@ + + + diff --git a/example/src/demo/pc/modal/confirm-event.vue b/example/src/demo/pc/modal/confirm-event.vue new file mode 100644 index 000000000..2c32f31ac --- /dev/null +++ b/example/src/demo/pc/modal/confirm-event.vue @@ -0,0 +1,38 @@ + + + diff --git a/example/src/demo/pc/modal/duration.vue b/example/src/demo/pc/modal/duration.vue new file mode 100644 index 000000000..cc9ebe5ab --- /dev/null +++ b/example/src/demo/pc/modal/duration.vue @@ -0,0 +1,42 @@ + + + diff --git a/example/src/demo/pc/modal/esc-closable.vue b/example/src/demo/pc/modal/esc-closable.vue new file mode 100644 index 000000000..e67f5a858 --- /dev/null +++ b/example/src/demo/pc/modal/esc-closable.vue @@ -0,0 +1,20 @@ + + + diff --git a/example/src/demo/pc/modal/footer-slot.vue b/example/src/demo/pc/modal/footer-slot.vue new file mode 100644 index 000000000..b72ccb53f --- /dev/null +++ b/example/src/demo/pc/modal/footer-slot.vue @@ -0,0 +1,28 @@ + + + diff --git a/example/src/demo/pc/modal/fullscreen.vue b/example/src/demo/pc/modal/fullscreen.vue new file mode 100644 index 000000000..6a505d879 --- /dev/null +++ b/example/src/demo/pc/modal/fullscreen.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/modal/grid.vue b/example/src/demo/pc/modal/grid.vue new file mode 100644 index 000000000..3bd74c1c1 --- /dev/null +++ b/example/src/demo/pc/modal/grid.vue @@ -0,0 +1,59 @@ + + + diff --git a/example/src/demo/pc/modal/hide-event.vue b/example/src/demo/pc/modal/hide-event.vue new file mode 100644 index 000000000..e0d1bd657 --- /dev/null +++ b/example/src/demo/pc/modal/hide-event.vue @@ -0,0 +1,33 @@ + + + diff --git a/example/src/demo/pc/modal/id.vue b/example/src/demo/pc/modal/id.vue new file mode 100644 index 000000000..7c1cff617 --- /dev/null +++ b/example/src/demo/pc/modal/id.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/modal/is-form-reset.vue b/example/src/demo/pc/modal/is-form-reset.vue new file mode 100644 index 000000000..4397a3d49 --- /dev/null +++ b/example/src/demo/pc/modal/is-form-reset.vue @@ -0,0 +1,46 @@ + + + diff --git a/example/src/demo/pc/modal/lock-scroll.vue b/example/src/demo/pc/modal/lock-scroll.vue new file mode 100644 index 000000000..127e9d9d7 --- /dev/null +++ b/example/src/demo/pc/modal/lock-scroll.vue @@ -0,0 +1,24 @@ + + + diff --git a/example/src/demo/pc/modal/lock-view.vue b/example/src/demo/pc/modal/lock-view.vue new file mode 100644 index 000000000..de59f5c0b --- /dev/null +++ b/example/src/demo/pc/modal/lock-view.vue @@ -0,0 +1,24 @@ + + + diff --git a/example/src/demo/pc/modal/mask-closable.vue b/example/src/demo/pc/modal/mask-closable.vue new file mode 100644 index 000000000..485dd4610 --- /dev/null +++ b/example/src/demo/pc/modal/mask-closable.vue @@ -0,0 +1,20 @@ + + + diff --git a/example/src/demo/pc/modal/message.vue b/example/src/demo/pc/modal/message.vue new file mode 100644 index 000000000..56d1409d8 --- /dev/null +++ b/example/src/demo/pc/modal/message.vue @@ -0,0 +1,20 @@ + + + diff --git a/example/src/demo/pc/modal/min-height.vue b/example/src/demo/pc/modal/min-height.vue new file mode 100644 index 000000000..40b595f8b --- /dev/null +++ b/example/src/demo/pc/modal/min-height.vue @@ -0,0 +1,24 @@ + + + diff --git a/example/src/demo/pc/modal/min-width.vue b/example/src/demo/pc/modal/min-width.vue new file mode 100644 index 000000000..8f192a5e2 --- /dev/null +++ b/example/src/demo/pc/modal/min-width.vue @@ -0,0 +1,24 @@ + + + diff --git a/example/src/demo/pc/modal/resize.vue b/example/src/demo/pc/modal/resize.vue new file mode 100644 index 000000000..bc7cb3cb3 --- /dev/null +++ b/example/src/demo/pc/modal/resize.vue @@ -0,0 +1,25 @@ + + + diff --git a/example/src/demo/pc/modal/show-event.vue b/example/src/demo/pc/modal/show-event.vue new file mode 100644 index 000000000..6ad383839 --- /dev/null +++ b/example/src/demo/pc/modal/show-event.vue @@ -0,0 +1,33 @@ + + + diff --git a/example/src/demo/pc/modal/showFooter.vue b/example/src/demo/pc/modal/showFooter.vue new file mode 100644 index 000000000..594e8da09 --- /dev/null +++ b/example/src/demo/pc/modal/showFooter.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/modal/showHeader.vue b/example/src/demo/pc/modal/showHeader.vue new file mode 100644 index 000000000..c420ceabf --- /dev/null +++ b/example/src/demo/pc/modal/showHeader.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/modal/status.vue b/example/src/demo/pc/modal/status.vue new file mode 100644 index 000000000..a04170698 --- /dev/null +++ b/example/src/demo/pc/modal/status.vue @@ -0,0 +1,42 @@ + + + diff --git a/example/src/demo/pc/modal/title.vue b/example/src/demo/pc/modal/title.vue new file mode 100644 index 000000000..a97f4aa3b --- /dev/null +++ b/example/src/demo/pc/modal/title.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/modal/top.vue b/example/src/demo/pc/modal/top.vue new file mode 100644 index 000000000..fb1ea4d94 --- /dev/null +++ b/example/src/demo/pc/modal/top.vue @@ -0,0 +1,20 @@ + + + diff --git a/example/src/demo/pc/modal/type.vue b/example/src/demo/pc/modal/type.vue new file mode 100644 index 000000000..19a99eeaa --- /dev/null +++ b/example/src/demo/pc/modal/type.vue @@ -0,0 +1,32 @@ + + + diff --git a/example/src/demo/pc/modal/value.vue b/example/src/demo/pc/modal/value.vue new file mode 100644 index 000000000..33fc5d32e --- /dev/null +++ b/example/src/demo/pc/modal/value.vue @@ -0,0 +1,28 @@ + + + diff --git a/example/src/demo/pc/modal/zIndex.vue b/example/src/demo/pc/modal/zIndex.vue new file mode 100644 index 000000000..f03864359 --- /dev/null +++ b/example/src/demo/pc/modal/zIndex.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/modal/zoom-event.vue b/example/src/demo/pc/modal/zoom-event.vue new file mode 100644 index 000000000..ed2bef986 --- /dev/null +++ b/example/src/demo/pc/modal/zoom-event.vue @@ -0,0 +1,39 @@ + + + diff --git a/example/src/demo/pc/nav-menu/basic-usage.vue b/example/src/demo/pc/nav-menu/basic-usage.vue new file mode 100644 index 000000000..6842e2a7d --- /dev/null +++ b/example/src/demo/pc/nav-menu/basic-usage.vue @@ -0,0 +1,313 @@ + + + + + diff --git a/example/src/demo/pc/nav-menu/before-skip-prevent.vue b/example/src/demo/pc/nav-menu/before-skip-prevent.vue new file mode 100644 index 000000000..cd4410509 --- /dev/null +++ b/example/src/demo/pc/nav-menu/before-skip-prevent.vue @@ -0,0 +1,36 @@ + + + + + diff --git a/example/src/demo/pc/nav-menu/before-skip.vue b/example/src/demo/pc/nav-menu/before-skip.vue new file mode 100644 index 000000000..20b43d446 --- /dev/null +++ b/example/src/demo/pc/nav-menu/before-skip.vue @@ -0,0 +1,319 @@ + + + + + diff --git a/example/src/demo/pc/nav-menu/custom-service.vue b/example/src/demo/pc/nav-menu/custom-service.vue new file mode 100644 index 000000000..84532087a --- /dev/null +++ b/example/src/demo/pc/nav-menu/custom-service.vue @@ -0,0 +1,314 @@ + + + + + diff --git a/example/src/demo/pc/nav-menu/data-resource.vue b/example/src/demo/pc/nav-menu/data-resource.vue new file mode 100644 index 000000000..6842e2a7d --- /dev/null +++ b/example/src/demo/pc/nav-menu/data-resource.vue @@ -0,0 +1,313 @@ + + + + + diff --git a/example/src/demo/pc/nav-menu/overflow.vue b/example/src/demo/pc/nav-menu/overflow.vue new file mode 100644 index 000000000..ad2718f61 --- /dev/null +++ b/example/src/demo/pc/nav-menu/overflow.vue @@ -0,0 +1,287 @@ + + + + + diff --git a/example/src/demo/pc/nav-menu/slot-logo.vue b/example/src/demo/pc/nav-menu/slot-logo.vue new file mode 100644 index 000000000..32d17efa1 --- /dev/null +++ b/example/src/demo/pc/nav-menu/slot-logo.vue @@ -0,0 +1,320 @@ + + + + + diff --git a/example/src/demo/pc/nav-menu/slot-toolbar.vue b/example/src/demo/pc/nav-menu/slot-toolbar.vue new file mode 100644 index 000000000..dc7222961 --- /dev/null +++ b/example/src/demo/pc/nav-menu/slot-toolbar.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/example/src/demo/pc/notify/basic-usage.vue b/example/src/demo/pc/notify/basic-usage.vue new file mode 100644 index 000000000..72e2b9eba --- /dev/null +++ b/example/src/demo/pc/notify/basic-usage.vue @@ -0,0 +1,27 @@ + + + diff --git a/example/src/demo/pc/numeric/about-step.vue b/example/src/demo/pc/numeric/about-step.vue new file mode 100644 index 000000000..47115e578 --- /dev/null +++ b/example/src/demo/pc/numeric/about-step.vue @@ -0,0 +1,19 @@ + + + diff --git a/example/src/demo/pc/numeric/allow-empty.vue b/example/src/demo/pc/numeric/allow-empty.vue new file mode 100644 index 000000000..fd904c046 --- /dev/null +++ b/example/src/demo/pc/numeric/allow-empty.vue @@ -0,0 +1,32 @@ + + + diff --git a/example/src/demo/pc/numeric/basic-usage.vue b/example/src/demo/pc/numeric/basic-usage.vue new file mode 100644 index 000000000..be45bcd33 --- /dev/null +++ b/example/src/demo/pc/numeric/basic-usage.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/numeric/blur-event.vue b/example/src/demo/pc/numeric/blur-event.vue new file mode 100644 index 000000000..01338666f --- /dev/null +++ b/example/src/demo/pc/numeric/blur-event.vue @@ -0,0 +1,23 @@ + + + diff --git a/example/src/demo/pc/numeric/calculate-according-to-num-of-goods.vue b/example/src/demo/pc/numeric/calculate-according-to-num-of-goods.vue new file mode 100644 index 000000000..8a9299c72 --- /dev/null +++ b/example/src/demo/pc/numeric/calculate-according-to-num-of-goods.vue @@ -0,0 +1,29 @@ + + + diff --git a/example/src/demo/pc/numeric/change-event.vue b/example/src/demo/pc/numeric/change-event.vue new file mode 100644 index 000000000..c87e8a816 --- /dev/null +++ b/example/src/demo/pc/numeric/change-event.vue @@ -0,0 +1,26 @@ + + + diff --git a/example/src/demo/pc/numeric/controls-position.vue b/example/src/demo/pc/numeric/controls-position.vue new file mode 100644 index 000000000..dc99539ad --- /dev/null +++ b/example/src/demo/pc/numeric/controls-position.vue @@ -0,0 +1,19 @@ + + + diff --git a/example/src/demo/pc/numeric/controls.vue b/example/src/demo/pc/numeric/controls.vue new file mode 100644 index 000000000..d8d123a9a --- /dev/null +++ b/example/src/demo/pc/numeric/controls.vue @@ -0,0 +1,25 @@ + + + diff --git a/example/src/demo/pc/numeric/dynamic-disabled.vue b/example/src/demo/pc/numeric/dynamic-disabled.vue new file mode 100644 index 000000000..f8b97e39a --- /dev/null +++ b/example/src/demo/pc/numeric/dynamic-disabled.vue @@ -0,0 +1,24 @@ + + + diff --git a/example/src/demo/pc/numeric/focus-event.vue b/example/src/demo/pc/numeric/focus-event.vue new file mode 100644 index 000000000..78548e458 --- /dev/null +++ b/example/src/demo/pc/numeric/focus-event.vue @@ -0,0 +1,23 @@ + + + diff --git a/example/src/demo/pc/numeric/max-min.vue b/example/src/demo/pc/numeric/max-min.vue new file mode 100644 index 000000000..dbb366279 --- /dev/null +++ b/example/src/demo/pc/numeric/max-min.vue @@ -0,0 +1,25 @@ + + + diff --git a/example/src/demo/pc/numeric/mouse-wheel.vue b/example/src/demo/pc/numeric/mouse-wheel.vue new file mode 100644 index 000000000..64a556609 --- /dev/null +++ b/example/src/demo/pc/numeric/mouse-wheel.vue @@ -0,0 +1,19 @@ + + + diff --git a/example/src/demo/pc/numeric/numeric-size.vue b/example/src/demo/pc/numeric/numeric-size.vue new file mode 100644 index 000000000..1d40f4738 --- /dev/null +++ b/example/src/demo/pc/numeric/numeric-size.vue @@ -0,0 +1,24 @@ + + + diff --git a/example/src/demo/pc/numeric/precision.vue b/example/src/demo/pc/numeric/precision.vue new file mode 100644 index 000000000..dd7c660cd --- /dev/null +++ b/example/src/demo/pc/numeric/precision.vue @@ -0,0 +1,19 @@ + + + diff --git a/example/src/demo/pc/package.json b/example/src/demo/pc/package.json new file mode 100644 index 000000000..5ab837039 --- /dev/null +++ b/example/src/demo/pc/package.json @@ -0,0 +1,11 @@ +{ + "name": "@opentiny/vue-example", + "version": "1.0.0", + "description": "TINY vue example", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC" +} diff --git a/example/src/demo/pc/pager/basic-usage.vue b/example/src/demo/pc/pager/basic-usage.vue new file mode 100644 index 000000000..95ef3891f --- /dev/null +++ b/example/src/demo/pc/pager/basic-usage.vue @@ -0,0 +1,17 @@ + + + diff --git a/example/src/demo/pc/pager/before-page-change.vue b/example/src/demo/pc/pager/before-page-change.vue new file mode 100644 index 000000000..a8217e43c --- /dev/null +++ b/example/src/demo/pc/pager/before-page-change.vue @@ -0,0 +1,39 @@ + + + diff --git a/example/src/demo/pc/pager/current-page.vue b/example/src/demo/pc/pager/current-page.vue new file mode 100644 index 000000000..e41ca13d0 --- /dev/null +++ b/example/src/demo/pc/pager/current-page.vue @@ -0,0 +1,17 @@ + + + diff --git a/example/src/demo/pc/pager/custom-layout.vue b/example/src/demo/pc/pager/custom-layout.vue new file mode 100644 index 000000000..b8c90caa5 --- /dev/null +++ b/example/src/demo/pc/pager/custom-layout.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/example/src/demo/pc/pager/custom-next-prev-text.vue b/example/src/demo/pc/pager/custom-next-prev-text.vue new file mode 100644 index 000000000..7e46dd3b2 --- /dev/null +++ b/example/src/demo/pc/pager/custom-next-prev-text.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/pager/hide-on-single-page.vue b/example/src/demo/pc/pager/hide-on-single-page.vue new file mode 100644 index 000000000..1074dca46 --- /dev/null +++ b/example/src/demo/pc/pager/hide-on-single-page.vue @@ -0,0 +1,20 @@ + + + diff --git a/example/src/demo/pc/pager/page-append-to-body.vue b/example/src/demo/pc/pager/page-append-to-body.vue new file mode 100644 index 000000000..c7cb1a3d2 --- /dev/null +++ b/example/src/demo/pc/pager/page-append-to-body.vue @@ -0,0 +1,19 @@ + + + diff --git a/example/src/demo/pc/pager/page-count.vue b/example/src/demo/pc/pager/page-count.vue new file mode 100644 index 000000000..2def35b89 --- /dev/null +++ b/example/src/demo/pc/pager/page-count.vue @@ -0,0 +1,13 @@ + + + diff --git a/example/src/demo/pc/pager/page-size.vue b/example/src/demo/pc/pager/page-size.vue new file mode 100644 index 000000000..9478aebb1 --- /dev/null +++ b/example/src/demo/pc/pager/page-size.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/pager/pager-count.vue b/example/src/demo/pc/pager/pager-count.vue new file mode 100644 index 000000000..041a87ab8 --- /dev/null +++ b/example/src/demo/pc/pager/pager-count.vue @@ -0,0 +1,17 @@ + + + diff --git a/example/src/demo/pc/pager/pager-events-current-change.vue b/example/src/demo/pc/pager/pager-events-current-change.vue new file mode 100644 index 000000000..94d74e9ab --- /dev/null +++ b/example/src/demo/pc/pager/pager-events-current-change.vue @@ -0,0 +1,34 @@ + + + diff --git a/example/src/demo/pc/pager/pager-events-nextclick.vue b/example/src/demo/pc/pager/pager-events-nextclick.vue new file mode 100644 index 000000000..b7318cd13 --- /dev/null +++ b/example/src/demo/pc/pager/pager-events-nextclick.vue @@ -0,0 +1,34 @@ + + + diff --git a/example/src/demo/pc/pager/pager-events-prev-click.vue b/example/src/demo/pc/pager/pager-events-prev-click.vue new file mode 100644 index 000000000..3ac6717ce --- /dev/null +++ b/example/src/demo/pc/pager/pager-events-prev-click.vue @@ -0,0 +1,34 @@ + + + diff --git a/example/src/demo/pc/pager/pager-events.vue b/example/src/demo/pc/pager/pager-events.vue new file mode 100644 index 000000000..cbcc3888b --- /dev/null +++ b/example/src/demo/pc/pager/pager-events.vue @@ -0,0 +1,34 @@ + + + diff --git a/example/src/demo/pc/pager/pager-in-grid.vue b/example/src/demo/pc/pager/pager-in-grid.vue new file mode 100644 index 000000000..8739bdb90 --- /dev/null +++ b/example/src/demo/pc/pager/pager-in-grid.vue @@ -0,0 +1,419 @@ + + + diff --git a/example/src/demo/pc/pager/pager-mode-fixed.vue b/example/src/demo/pc/pager/pager-mode-fixed.vue new file mode 100644 index 000000000..6a6e23c79 --- /dev/null +++ b/example/src/demo/pc/pager/pager-mode-fixed.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/example/src/demo/pc/pager/pager-mode-number.vue b/example/src/demo/pc/pager/pager-mode-number.vue new file mode 100644 index 000000000..a5478bf4d --- /dev/null +++ b/example/src/demo/pc/pager/pager-mode-number.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/example/src/demo/pc/pager/pager-mode-simple.vue b/example/src/demo/pc/pager/pager-mode-simple.vue new file mode 100644 index 000000000..cde1da631 --- /dev/null +++ b/example/src/demo/pc/pager/pager-mode-simple.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/example/src/demo/pc/pager/pager-mode.vue b/example/src/demo/pc/pager/pager-mode.vue new file mode 100644 index 000000000..d31abb37b --- /dev/null +++ b/example/src/demo/pc/pager/pager-mode.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/example/src/demo/pc/pager/popper-class.vue b/example/src/demo/pc/pager/popper-class.vue new file mode 100644 index 000000000..4485ff1b6 --- /dev/null +++ b/example/src/demo/pc/pager/popper-class.vue @@ -0,0 +1,13 @@ + + + diff --git a/example/src/demo/pc/pop-upload/basic-usage.vue b/example/src/demo/pc/pop-upload/basic-usage.vue new file mode 100644 index 000000000..872834a38 --- /dev/null +++ b/example/src/demo/pc/pop-upload/basic-usage.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/pop-upload/before-upload.vue b/example/src/demo/pc/pop-upload/before-upload.vue new file mode 100644 index 000000000..29b84f7ea --- /dev/null +++ b/example/src/demo/pc/pop-upload/before-upload.vue @@ -0,0 +1,31 @@ + + + diff --git a/example/src/demo/pc/pop-upload/custom-request-headers.vue b/example/src/demo/pc/pop-upload/custom-request-headers.vue new file mode 100644 index 000000000..0b3b14b01 --- /dev/null +++ b/example/src/demo/pc/pop-upload/custom-request-headers.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/pop-upload/data.vue b/example/src/demo/pc/pop-upload/data.vue new file mode 100644 index 000000000..27afe745b --- /dev/null +++ b/example/src/demo/pc/pop-upload/data.vue @@ -0,0 +1,21 @@ + + + diff --git a/example/src/demo/pc/pop-upload/file-limit.vue b/example/src/demo/pc/pop-upload/file-limit.vue new file mode 100644 index 000000000..3ba906d67 --- /dev/null +++ b/example/src/demo/pc/pop-upload/file-limit.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/pop-upload/file-type.vue b/example/src/demo/pc/pop-upload/file-type.vue new file mode 100644 index 000000000..eb56bfe64 --- /dev/null +++ b/example/src/demo/pc/pop-upload/file-type.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/pop-upload/fill-button-text.vue b/example/src/demo/pc/pop-upload/fill-button-text.vue new file mode 100644 index 000000000..a7481ca9f --- /dev/null +++ b/example/src/demo/pc/pop-upload/fill-button-text.vue @@ -0,0 +1,21 @@ + + + diff --git a/example/src/demo/pc/pop-upload/http-request.vue b/example/src/demo/pc/pop-upload/http-request.vue new file mode 100644 index 000000000..dd316e74b --- /dev/null +++ b/example/src/demo/pc/pop-upload/http-request.vue @@ -0,0 +1,20 @@ + + + diff --git a/example/src/demo/pc/pop-upload/max-upload-file-size.vue b/example/src/demo/pc/pop-upload/max-upload-file-size.vue new file mode 100644 index 000000000..d1fefef32 --- /dev/null +++ b/example/src/demo/pc/pop-upload/max-upload-file-size.vue @@ -0,0 +1,21 @@ + + + diff --git a/example/src/demo/pc/pop-upload/prevent-delete-file.vue b/example/src/demo/pc/pop-upload/prevent-delete-file.vue new file mode 100644 index 000000000..ea3cc448f --- /dev/null +++ b/example/src/demo/pc/pop-upload/prevent-delete-file.vue @@ -0,0 +1,31 @@ + + + diff --git a/example/src/demo/pc/pop-upload/size.vue b/example/src/demo/pc/pop-upload/size.vue new file mode 100644 index 000000000..7d3e679e3 --- /dev/null +++ b/example/src/demo/pc/pop-upload/size.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/pop-upload/upload-name.vue b/example/src/demo/pc/pop-upload/upload-name.vue new file mode 100644 index 000000000..25dc25cd0 --- /dev/null +++ b/example/src/demo/pc/pop-upload/upload-name.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/popeditor/base.vue b/example/src/demo/pc/popeditor/base.vue new file mode 100644 index 000000000..821309e0b --- /dev/null +++ b/example/src/demo/pc/popeditor/base.vue @@ -0,0 +1,105 @@ + + + diff --git a/example/src/demo/pc/popeditor/before-reset.vue b/example/src/demo/pc/popeditor/before-reset.vue new file mode 100644 index 000000000..e16fe2e44 --- /dev/null +++ b/example/src/demo/pc/popeditor/before-reset.vue @@ -0,0 +1,114 @@ + + + diff --git a/example/src/demo/pc/popeditor/clearable.vue b/example/src/demo/pc/popeditor/clearable.vue new file mode 100644 index 000000000..2f19d2932 --- /dev/null +++ b/example/src/demo/pc/popeditor/clearable.vue @@ -0,0 +1,109 @@ + + + diff --git a/example/src/demo/pc/popeditor/close-event.vue b/example/src/demo/pc/popeditor/close-event.vue new file mode 100644 index 000000000..065603eb0 --- /dev/null +++ b/example/src/demo/pc/popeditor/close-event.vue @@ -0,0 +1,129 @@ + + + diff --git a/example/src/demo/pc/popeditor/condition-form.vue b/example/src/demo/pc/popeditor/condition-form.vue new file mode 100644 index 000000000..b0291dc4b --- /dev/null +++ b/example/src/demo/pc/popeditor/condition-form.vue @@ -0,0 +1,187 @@ + + + + + diff --git a/example/src/demo/pc/popeditor/condition-layout.vue b/example/src/demo/pc/popeditor/condition-layout.vue new file mode 100644 index 000000000..165c23765 --- /dev/null +++ b/example/src/demo/pc/popeditor/condition-layout.vue @@ -0,0 +1,86 @@ + + + diff --git a/example/src/demo/pc/popeditor/conditions.vue b/example/src/demo/pc/popeditor/conditions.vue new file mode 100644 index 000000000..6f90db5a1 --- /dev/null +++ b/example/src/demo/pc/popeditor/conditions.vue @@ -0,0 +1,109 @@ + + + diff --git a/example/src/demo/pc/popeditor/disabled.vue b/example/src/demo/pc/popeditor/disabled.vue new file mode 100644 index 000000000..0714a6ab0 --- /dev/null +++ b/example/src/demo/pc/popeditor/disabled.vue @@ -0,0 +1,105 @@ + + + diff --git a/example/src/demo/pc/popeditor/draggable.vue b/example/src/demo/pc/popeditor/draggable.vue new file mode 100644 index 000000000..72098b9ca --- /dev/null +++ b/example/src/demo/pc/popeditor/draggable.vue @@ -0,0 +1,110 @@ + + + diff --git a/example/src/demo/pc/popeditor/events.vue b/example/src/demo/pc/popeditor/events.vue new file mode 100644 index 000000000..f73fa4b28 --- /dev/null +++ b/example/src/demo/pc/popeditor/events.vue @@ -0,0 +1,132 @@ + + + diff --git a/example/src/demo/pc/popeditor/grid.vue b/example/src/demo/pc/popeditor/grid.vue new file mode 100644 index 000000000..f8bef5ef5 --- /dev/null +++ b/example/src/demo/pc/popeditor/grid.vue @@ -0,0 +1,105 @@ + + + diff --git a/example/src/demo/pc/popeditor/icon.vue b/example/src/demo/pc/popeditor/icon.vue new file mode 100644 index 000000000..3177c5033 --- /dev/null +++ b/example/src/demo/pc/popeditor/icon.vue @@ -0,0 +1,105 @@ + + + diff --git a/example/src/demo/pc/popeditor/multi-value-array.vue b/example/src/demo/pc/popeditor/multi-value-array.vue new file mode 100644 index 000000000..7bdcad06b --- /dev/null +++ b/example/src/demo/pc/popeditor/multi-value-array.vue @@ -0,0 +1,117 @@ + + + diff --git a/example/src/demo/pc/popeditor/multi.vue b/example/src/demo/pc/popeditor/multi.vue new file mode 100644 index 000000000..f6e0678ea --- /dev/null +++ b/example/src/demo/pc/popeditor/multi.vue @@ -0,0 +1,117 @@ + + + diff --git a/example/src/demo/pc/popeditor/pager.vue b/example/src/demo/pc/popeditor/pager.vue new file mode 100644 index 000000000..615e21ac8 --- /dev/null +++ b/example/src/demo/pc/popeditor/pager.vue @@ -0,0 +1,126 @@ + + + diff --git a/example/src/demo/pc/popeditor/readonly.vue b/example/src/demo/pc/popeditor/readonly.vue new file mode 100644 index 000000000..cb7ae03ce --- /dev/null +++ b/example/src/demo/pc/popeditor/readonly.vue @@ -0,0 +1,105 @@ + + + diff --git a/example/src/demo/pc/popeditor/remote-search.vue b/example/src/demo/pc/popeditor/remote-search.vue new file mode 100644 index 000000000..aad388961 --- /dev/null +++ b/example/src/demo/pc/popeditor/remote-search.vue @@ -0,0 +1,78 @@ + + + diff --git a/example/src/demo/pc/popeditor/render-text.vue b/example/src/demo/pc/popeditor/render-text.vue new file mode 100644 index 000000000..bbe74cd56 --- /dev/null +++ b/example/src/demo/pc/popeditor/render-text.vue @@ -0,0 +1,86 @@ + + + diff --git a/example/src/demo/pc/popeditor/resize.vue b/example/src/demo/pc/popeditor/resize.vue new file mode 100644 index 000000000..e65bb89d9 --- /dev/null +++ b/example/src/demo/pc/popeditor/resize.vue @@ -0,0 +1,105 @@ + + + diff --git a/example/src/demo/pc/popeditor/show-history.vue b/example/src/demo/pc/popeditor/show-history.vue new file mode 100644 index 000000000..c29c7666a --- /dev/null +++ b/example/src/demo/pc/popeditor/show-history.vue @@ -0,0 +1,105 @@ + + + diff --git a/example/src/demo/pc/popeditor/showClearBtn.vue b/example/src/demo/pc/popeditor/showClearBtn.vue new file mode 100644 index 000000000..2cb5e822d --- /dev/null +++ b/example/src/demo/pc/popeditor/showClearBtn.vue @@ -0,0 +1,105 @@ + + + diff --git a/example/src/demo/pc/popeditor/showOverflow.vue b/example/src/demo/pc/popeditor/showOverflow.vue new file mode 100644 index 000000000..d5cf09dee --- /dev/null +++ b/example/src/demo/pc/popeditor/showOverflow.vue @@ -0,0 +1,109 @@ + + + diff --git a/example/src/demo/pc/popeditor/single-select-radio.vue b/example/src/demo/pc/popeditor/single-select-radio.vue new file mode 100644 index 000000000..0ec8f9eb4 --- /dev/null +++ b/example/src/demo/pc/popeditor/single-select-radio.vue @@ -0,0 +1,83 @@ + + + diff --git a/example/src/demo/pc/popeditor/size.vue b/example/src/demo/pc/popeditor/size.vue new file mode 100644 index 000000000..8badbf2bb --- /dev/null +++ b/example/src/demo/pc/popeditor/size.vue @@ -0,0 +1,108 @@ + + + diff --git a/example/src/demo/pc/popeditor/slot.vue b/example/src/demo/pc/popeditor/slot.vue new file mode 100644 index 000000000..a63deb7bf --- /dev/null +++ b/example/src/demo/pc/popeditor/slot.vue @@ -0,0 +1,130 @@ + + + diff --git a/example/src/demo/pc/popeditor/tabindex.vue b/example/src/demo/pc/popeditor/tabindex.vue new file mode 100644 index 000000000..2e8b70218 --- /dev/null +++ b/example/src/demo/pc/popeditor/tabindex.vue @@ -0,0 +1,116 @@ + + + + + diff --git a/example/src/demo/pc/popeditor/textField.vue b/example/src/demo/pc/popeditor/textField.vue new file mode 100644 index 000000000..48877fd72 --- /dev/null +++ b/example/src/demo/pc/popeditor/textField.vue @@ -0,0 +1,105 @@ + + + diff --git a/example/src/demo/pc/popeditor/title.vue b/example/src/demo/pc/popeditor/title.vue new file mode 100644 index 000000000..6696dac7d --- /dev/null +++ b/example/src/demo/pc/popeditor/title.vue @@ -0,0 +1,106 @@ + + + diff --git a/example/src/demo/pc/popeditor/tree.vue b/example/src/demo/pc/popeditor/tree.vue new file mode 100644 index 000000000..feb764bf6 --- /dev/null +++ b/example/src/demo/pc/popeditor/tree.vue @@ -0,0 +1,68 @@ + + + diff --git a/example/src/demo/pc/popeditor/trigger.vue b/example/src/demo/pc/popeditor/trigger.vue new file mode 100644 index 000000000..aa86ed078 --- /dev/null +++ b/example/src/demo/pc/popeditor/trigger.vue @@ -0,0 +1,108 @@ + + + diff --git a/example/src/demo/pc/popeditor/width.vue b/example/src/demo/pc/popeditor/width.vue new file mode 100644 index 000000000..90cdaeb94 --- /dev/null +++ b/example/src/demo/pc/popeditor/width.vue @@ -0,0 +1,106 @@ + + + diff --git a/example/src/demo/pc/popover/arrow-offset.vue b/example/src/demo/pc/popover/arrow-offset.vue new file mode 100644 index 000000000..8e899e642 --- /dev/null +++ b/example/src/demo/pc/popover/arrow-offset.vue @@ -0,0 +1,41 @@ + + + diff --git a/example/src/demo/pc/popover/basic-usage.vue b/example/src/demo/pc/popover/basic-usage.vue new file mode 100644 index 000000000..d2992da05 --- /dev/null +++ b/example/src/demo/pc/popover/basic-usage.vue @@ -0,0 +1,24 @@ + + + diff --git a/example/src/demo/pc/popover/close-delay.vue b/example/src/demo/pc/popover/close-delay.vue new file mode 100644 index 000000000..912a1ef49 --- /dev/null +++ b/example/src/demo/pc/popover/close-delay.vue @@ -0,0 +1,29 @@ + + + diff --git a/example/src/demo/pc/popover/custom-tip-text.vue b/example/src/demo/pc/popover/custom-tip-text.vue new file mode 100644 index 000000000..2bab5a73e --- /dev/null +++ b/example/src/demo/pc/popover/custom-tip-text.vue @@ -0,0 +1,55 @@ + + + + + diff --git a/example/src/demo/pc/popover/custom-transition.vue b/example/src/demo/pc/popover/custom-transition.vue new file mode 100644 index 000000000..3f8cddc79 --- /dev/null +++ b/example/src/demo/pc/popover/custom-transition.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/example/src/demo/pc/popover/dynamic-disable.vue b/example/src/demo/pc/popover/dynamic-disable.vue new file mode 100644 index 000000000..1eee6389f --- /dev/null +++ b/example/src/demo/pc/popover/dynamic-disable.vue @@ -0,0 +1,46 @@ + + + + + diff --git a/example/src/demo/pc/popover/frame-offset.vue b/example/src/demo/pc/popover/frame-offset.vue new file mode 100644 index 000000000..d49f8796a --- /dev/null +++ b/example/src/demo/pc/popover/frame-offset.vue @@ -0,0 +1,41 @@ + + + diff --git a/example/src/demo/pc/popover/hidden-arrow.vue b/example/src/demo/pc/popover/hidden-arrow.vue new file mode 100644 index 000000000..10937ba2d --- /dev/null +++ b/example/src/demo/pc/popover/hidden-arrow.vue @@ -0,0 +1,38 @@ + + + diff --git a/example/src/demo/pc/popover/open-delay.vue b/example/src/demo/pc/popover/open-delay.vue new file mode 100644 index 000000000..897bc0b40 --- /dev/null +++ b/example/src/demo/pc/popover/open-delay.vue @@ -0,0 +1,29 @@ + + + diff --git a/example/src/demo/pc/popover/popover-content.vue b/example/src/demo/pc/popover/popover-content.vue new file mode 100644 index 000000000..2e23d6936 --- /dev/null +++ b/example/src/demo/pc/popover/popover-content.vue @@ -0,0 +1,17 @@ + + + diff --git a/example/src/demo/pc/popover/popover-events.vue b/example/src/demo/pc/popover/popover-events.vue new file mode 100644 index 000000000..8bdf612fd --- /dev/null +++ b/example/src/demo/pc/popover/popover-events.vue @@ -0,0 +1,62 @@ + + + diff --git a/example/src/demo/pc/popover/popover-placement.vue b/example/src/demo/pc/popover/popover-placement.vue new file mode 100644 index 000000000..c5918466a --- /dev/null +++ b/example/src/demo/pc/popover/popover-placement.vue @@ -0,0 +1,77 @@ + + + + + diff --git a/example/src/demo/pc/popover/popover-width.vue b/example/src/demo/pc/popover/popover-width.vue new file mode 100644 index 000000000..4a60bb284 --- /dev/null +++ b/example/src/demo/pc/popover/popover-width.vue @@ -0,0 +1,28 @@ + + + diff --git a/example/src/demo/pc/popover/popper-class.vue b/example/src/demo/pc/popover/popper-class.vue new file mode 100644 index 000000000..0897d9ac0 --- /dev/null +++ b/example/src/demo/pc/popover/popper-class.vue @@ -0,0 +1,53 @@ + + + + + diff --git a/example/src/demo/pc/popover/popper-options.vue b/example/src/demo/pc/popover/popper-options.vue new file mode 100644 index 000000000..64ac1e0a1 --- /dev/null +++ b/example/src/demo/pc/popover/popper-options.vue @@ -0,0 +1,30 @@ + + + diff --git a/example/src/demo/pc/popover/trigger-mode.vue b/example/src/demo/pc/popover/trigger-mode.vue new file mode 100644 index 000000000..bc11f74b8 --- /dev/null +++ b/example/src/demo/pc/popover/trigger-mode.vue @@ -0,0 +1,71 @@ + + + + + diff --git a/example/src/demo/pc/popover/trigger-reference.vue b/example/src/demo/pc/popover/trigger-reference.vue new file mode 100644 index 000000000..5cfa7ddfd --- /dev/null +++ b/example/src/demo/pc/popover/trigger-reference.vue @@ -0,0 +1,23 @@ + + + diff --git a/example/src/demo/pc/progress/basic-usage.vue b/example/src/demo/pc/progress/basic-usage.vue new file mode 100644 index 000000000..864bbc691 --- /dev/null +++ b/example/src/demo/pc/progress/basic-usage.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/example/src/demo/pc/progress/custom-color.vue b/example/src/demo/pc/progress/custom-color.vue new file mode 100644 index 000000000..584cd3de4 --- /dev/null +++ b/example/src/demo/pc/progress/custom-color.vue @@ -0,0 +1,42 @@ + + + diff --git a/example/src/demo/pc/progress/dynamic-control-changes.vue b/example/src/demo/pc/progress/dynamic-control-changes.vue new file mode 100644 index 000000000..6164aeab5 --- /dev/null +++ b/example/src/demo/pc/progress/dynamic-control-changes.vue @@ -0,0 +1,57 @@ + + + diff --git a/example/src/demo/pc/progress/format-text.vue b/example/src/demo/pc/progress/format-text.vue new file mode 100644 index 000000000..a67bad89a --- /dev/null +++ b/example/src/demo/pc/progress/format-text.vue @@ -0,0 +1,48 @@ + + + + + diff --git a/example/src/demo/pc/progress/progress-status.vue b/example/src/demo/pc/progress/progress-status.vue new file mode 100644 index 000000000..b17c50386 --- /dev/null +++ b/example/src/demo/pc/progress/progress-status.vue @@ -0,0 +1,37 @@ + + + diff --git a/example/src/demo/pc/progress/progress-type-circle.vue b/example/src/demo/pc/progress/progress-type-circle.vue new file mode 100644 index 000000000..2da2d8314 --- /dev/null +++ b/example/src/demo/pc/progress/progress-type-circle.vue @@ -0,0 +1,25 @@ + + + + + diff --git a/example/src/demo/pc/progress/progress-type-dashboard.vue b/example/src/demo/pc/progress/progress-type-dashboard.vue new file mode 100644 index 000000000..267afa022 --- /dev/null +++ b/example/src/demo/pc/progress/progress-type-dashboard.vue @@ -0,0 +1,32 @@ + + + diff --git a/example/src/demo/pc/progress/progress-type.vue b/example/src/demo/pc/progress/progress-type.vue new file mode 100644 index 000000000..4cf8366ec --- /dev/null +++ b/example/src/demo/pc/progress/progress-type.vue @@ -0,0 +1,19 @@ + + + + + diff --git a/example/src/demo/pc/progress/progress-width.vue b/example/src/demo/pc/progress/progress-width.vue new file mode 100644 index 000000000..41f10ea82 --- /dev/null +++ b/example/src/demo/pc/progress/progress-width.vue @@ -0,0 +1,25 @@ + + + diff --git a/example/src/demo/pc/progress/text-inside-or-no-text.vue b/example/src/demo/pc/progress/text-inside-or-no-text.vue new file mode 100644 index 000000000..3a0fdf911 --- /dev/null +++ b/example/src/demo/pc/progress/text-inside-or-no-text.vue @@ -0,0 +1,31 @@ + + + diff --git a/example/src/demo/pc/radio/active-color.vue b/example/src/demo/pc/radio/active-color.vue new file mode 100644 index 000000000..d86b2083f --- /dev/null +++ b/example/src/demo/pc/radio/active-color.vue @@ -0,0 +1,23 @@ + + + diff --git a/example/src/demo/pc/radio/basic-usage.vue b/example/src/demo/pc/radio/basic-usage.vue new file mode 100644 index 000000000..3b8185073 --- /dev/null +++ b/example/src/demo/pc/radio/basic-usage.vue @@ -0,0 +1,21 @@ + + + diff --git a/example/src/demo/pc/radio/dynamic-disable.vue b/example/src/demo/pc/radio/dynamic-disable.vue new file mode 100644 index 000000000..32850a8b2 --- /dev/null +++ b/example/src/demo/pc/radio/dynamic-disable.vue @@ -0,0 +1,42 @@ + + + diff --git a/example/src/demo/pc/radio/group-options.vue b/example/src/demo/pc/radio/group-options.vue new file mode 100644 index 000000000..40e30b1de --- /dev/null +++ b/example/src/demo/pc/radio/group-options.vue @@ -0,0 +1,27 @@ + + + diff --git a/example/src/demo/pc/radio/radio-button.vue b/example/src/demo/pc/radio/radio-button.vue new file mode 100644 index 000000000..f8b90472f --- /dev/null +++ b/example/src/demo/pc/radio/radio-button.vue @@ -0,0 +1,23 @@ + + + diff --git a/example/src/demo/pc/radio/radio-default.vue b/example/src/demo/pc/radio/radio-default.vue new file mode 100644 index 000000000..882170e73 --- /dev/null +++ b/example/src/demo/pc/radio/radio-default.vue @@ -0,0 +1,27 @@ + + + diff --git a/example/src/demo/pc/radio/radio-events.vue b/example/src/demo/pc/radio/radio-events.vue new file mode 100644 index 000000000..de098bd4e --- /dev/null +++ b/example/src/demo/pc/radio/radio-events.vue @@ -0,0 +1,39 @@ + + + diff --git a/example/src/demo/pc/radio/radio-size.vue b/example/src/demo/pc/radio/radio-size.vue new file mode 100644 index 000000000..25bcc41c7 --- /dev/null +++ b/example/src/demo/pc/radio/radio-size.vue @@ -0,0 +1,49 @@ + + + diff --git a/example/src/demo/pc/radio/radio-text.vue b/example/src/demo/pc/radio/radio-text.vue new file mode 100644 index 000000000..4f554f1cd --- /dev/null +++ b/example/src/demo/pc/radio/radio-text.vue @@ -0,0 +1,21 @@ + + + diff --git a/example/src/demo/pc/radio/radio-value.vue b/example/src/demo/pc/radio/radio-value.vue new file mode 100644 index 000000000..5d2ed2398 --- /dev/null +++ b/example/src/demo/pc/radio/radio-value.vue @@ -0,0 +1,23 @@ + + + diff --git a/example/src/demo/pc/radio/vertical.vue b/example/src/demo/pc/radio/vertical.vue new file mode 100644 index 000000000..32c0dc34b --- /dev/null +++ b/example/src/demo/pc/radio/vertical.vue @@ -0,0 +1,28 @@ + + + diff --git a/example/src/demo/pc/radio/with-border.vue b/example/src/demo/pc/radio/with-border.vue new file mode 100644 index 000000000..9b1a22bf9 --- /dev/null +++ b/example/src/demo/pc/radio/with-border.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/rate/allow-half.vue b/example/src/demo/pc/rate/allow-half.vue new file mode 100644 index 000000000..87cc5bad6 --- /dev/null +++ b/example/src/demo/pc/rate/allow-half.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/rate/basic-usage.vue b/example/src/demo/pc/rate/basic-usage.vue new file mode 100644 index 000000000..15da32337 --- /dev/null +++ b/example/src/demo/pc/rate/basic-usage.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/rate/custom-3-threshold-colors.vue b/example/src/demo/pc/rate/custom-3-threshold-colors.vue new file mode 100644 index 000000000..8eb2df3b1 --- /dev/null +++ b/example/src/demo/pc/rate/custom-3-threshold-colors.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/rate/custom-3-threshold-icon.vue b/example/src/demo/pc/rate/custom-3-threshold-icon.vue new file mode 100644 index 000000000..c654054c0 --- /dev/null +++ b/example/src/demo/pc/rate/custom-3-threshold-icon.vue @@ -0,0 +1,19 @@ + + + diff --git a/example/src/demo/pc/rate/disabled-not-selected-class.vue b/example/src/demo/pc/rate/disabled-not-selected-class.vue new file mode 100644 index 000000000..54f76882d --- /dev/null +++ b/example/src/demo/pc/rate/disabled-not-selected-class.vue @@ -0,0 +1,23 @@ + + + diff --git a/example/src/demo/pc/rate/disabled-not-selected-color.vue b/example/src/demo/pc/rate/disabled-not-selected-color.vue new file mode 100644 index 000000000..f74d68c04 --- /dev/null +++ b/example/src/demo/pc/rate/disabled-not-selected-color.vue @@ -0,0 +1,23 @@ + + + diff --git a/example/src/demo/pc/rate/dynamic-disable.vue b/example/src/demo/pc/rate/dynamic-disable.vue new file mode 100644 index 000000000..8af22c842 --- /dev/null +++ b/example/src/demo/pc/rate/dynamic-disable.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/rate/max-score.vue b/example/src/demo/pc/rate/max-score.vue new file mode 100644 index 000000000..495432505 --- /dev/null +++ b/example/src/demo/pc/rate/max-score.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/rate/not-selected-class.vue b/example/src/demo/pc/rate/not-selected-class.vue new file mode 100644 index 000000000..90e6e3ad9 --- /dev/null +++ b/example/src/demo/pc/rate/not-selected-class.vue @@ -0,0 +1,19 @@ + + + diff --git a/example/src/demo/pc/rate/not-selected-color.vue b/example/src/demo/pc/rate/not-selected-color.vue new file mode 100644 index 000000000..454cea8bb --- /dev/null +++ b/example/src/demo/pc/rate/not-selected-color.vue @@ -0,0 +1,19 @@ + + + diff --git a/example/src/demo/pc/rate/radio-rate.vue b/example/src/demo/pc/rate/radio-rate.vue new file mode 100644 index 000000000..0d4f1252b --- /dev/null +++ b/example/src/demo/pc/rate/radio-rate.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/rate/rate-events.vue b/example/src/demo/pc/rate/rate-events.vue new file mode 100644 index 000000000..0ca1a362d --- /dev/null +++ b/example/src/demo/pc/rate/rate-events.vue @@ -0,0 +1,23 @@ + + + diff --git a/example/src/demo/pc/rate/show-score.vue b/example/src/demo/pc/rate/show-score.vue new file mode 100644 index 000000000..a73f65230 --- /dev/null +++ b/example/src/demo/pc/rate/show-score.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/rate/size-and-space.vue b/example/src/demo/pc/rate/size-and-space.vue new file mode 100644 index 000000000..4b22c0574 --- /dev/null +++ b/example/src/demo/pc/rate/size-and-space.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/rate/text-on-bottom.vue b/example/src/demo/pc/rate/text-on-bottom.vue new file mode 100644 index 000000000..a7fd3bd6f --- /dev/null +++ b/example/src/demo/pc/rate/text-on-bottom.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/rate/texts-and-text-color.vue b/example/src/demo/pc/rate/texts-and-text-color.vue new file mode 100644 index 000000000..5017aea3a --- /dev/null +++ b/example/src/demo/pc/rate/texts-and-text-color.vue @@ -0,0 +1,23 @@ + + + diff --git a/example/src/demo/pc/rate/threshold-value.vue b/example/src/demo/pc/rate/threshold-value.vue new file mode 100644 index 000000000..ca0ae81dd --- /dev/null +++ b/example/src/demo/pc/rate/threshold-value.vue @@ -0,0 +1,24 @@ + + + diff --git a/example/src/demo/pc/row/align.vue b/example/src/demo/pc/row/align.vue new file mode 100644 index 000000000..5d1e87541 --- /dev/null +++ b/example/src/demo/pc/row/align.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/example/src/demo/pc/row/gutter-nospace.vue b/example/src/demo/pc/row/gutter-nospace.vue new file mode 100644 index 000000000..4e3b9442a --- /dev/null +++ b/example/src/demo/pc/row/gutter-nospace.vue @@ -0,0 +1,76 @@ + + + + + diff --git a/example/src/demo/pc/row/gutter.vue b/example/src/demo/pc/row/gutter.vue new file mode 100644 index 000000000..f97f9d26a --- /dev/null +++ b/example/src/demo/pc/row/gutter.vue @@ -0,0 +1,63 @@ + + + + + diff --git a/example/src/demo/pc/row/justify.vue b/example/src/demo/pc/row/justify.vue new file mode 100644 index 000000000..1bd02996d --- /dev/null +++ b/example/src/demo/pc/row/justify.vue @@ -0,0 +1,85 @@ + + + + + diff --git a/example/src/demo/pc/row/order.vue b/example/src/demo/pc/row/order.vue new file mode 100644 index 000000000..329182356 --- /dev/null +++ b/example/src/demo/pc/row/order.vue @@ -0,0 +1,58 @@ + + + + + diff --git a/example/src/demo/pc/row/tag1.vue b/example/src/demo/pc/row/tag1.vue new file mode 100644 index 000000000..e2c452e42 --- /dev/null +++ b/example/src/demo/pc/row/tag1.vue @@ -0,0 +1,37 @@ + + + + + diff --git a/example/src/demo/pc/scroll-text/basic-usage.vue b/example/src/demo/pc/scroll-text/basic-usage.vue new file mode 100644 index 000000000..0bda558b1 --- /dev/null +++ b/example/src/demo/pc/scroll-text/basic-usage.vue @@ -0,0 +1,13 @@ + + + diff --git a/example/src/demo/pc/scroll-text/custom-scroll-text.vue b/example/src/demo/pc/scroll-text/custom-scroll-text.vue new file mode 100644 index 000000000..91a7cffa0 --- /dev/null +++ b/example/src/demo/pc/scroll-text/custom-scroll-text.vue @@ -0,0 +1,13 @@ + + + diff --git a/example/src/demo/pc/scroll-text/custom-text-style.vue b/example/src/demo/pc/scroll-text/custom-text-style.vue new file mode 100644 index 000000000..fe1c88cf1 --- /dev/null +++ b/example/src/demo/pc/scroll-text/custom-text-style.vue @@ -0,0 +1,19 @@ + + + + + diff --git a/example/src/demo/pc/scroll-text/hover-stop.vue b/example/src/demo/pc/scroll-text/hover-stop.vue new file mode 100644 index 000000000..05b5ed2ef --- /dev/null +++ b/example/src/demo/pc/scroll-text/hover-stop.vue @@ -0,0 +1,15 @@ + + + diff --git a/example/src/demo/pc/scroll-text/scroll-direction.vue b/example/src/demo/pc/scroll-text/scroll-direction.vue new file mode 100644 index 000000000..dc7f5b4b5 --- /dev/null +++ b/example/src/demo/pc/scroll-text/scroll-direction.vue @@ -0,0 +1,21 @@ + + + diff --git a/example/src/demo/pc/scroll-text/scroll-time.vue b/example/src/demo/pc/scroll-text/scroll-time.vue new file mode 100644 index 000000000..2feff7bc3 --- /dev/null +++ b/example/src/demo/pc/scroll-text/scroll-time.vue @@ -0,0 +1,15 @@ + + + diff --git a/example/src/demo/pc/scroll-text/slots.vue b/example/src/demo/pc/scroll-text/slots.vue new file mode 100644 index 000000000..08fcfe4e4 --- /dev/null +++ b/example/src/demo/pc/scroll-text/slots.vue @@ -0,0 +1,17 @@ + + + diff --git a/example/src/demo/pc/search/basic-usage.vue b/example/src/demo/pc/search/basic-usage.vue new file mode 100644 index 000000000..013f04d09 --- /dev/null +++ b/example/src/demo/pc/search/basic-usage.vue @@ -0,0 +1,21 @@ + + + diff --git a/example/src/demo/pc/search/change-events.vue b/example/src/demo/pc/search/change-events.vue new file mode 100644 index 000000000..de5a08e20 --- /dev/null +++ b/example/src/demo/pc/search/change-events.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/search/clearable.vue b/example/src/demo/pc/search/clearable.vue new file mode 100644 index 000000000..f64342bb6 --- /dev/null +++ b/example/src/demo/pc/search/clearable.vue @@ -0,0 +1,24 @@ + + + diff --git a/example/src/demo/pc/search/custom-search-types.vue b/example/src/demo/pc/search/custom-search-types.vue new file mode 100644 index 000000000..8b0bdbd6d --- /dev/null +++ b/example/src/demo/pc/search/custom-search-types.vue @@ -0,0 +1,37 @@ + + + diff --git a/example/src/demo/pc/search/default-value.vue b/example/src/demo/pc/search/default-value.vue new file mode 100644 index 000000000..de056226c --- /dev/null +++ b/example/src/demo/pc/search/default-value.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/search/mini-mode.vue b/example/src/demo/pc/search/mini-mode.vue new file mode 100644 index 000000000..6b42852f0 --- /dev/null +++ b/example/src/demo/pc/search/mini-mode.vue @@ -0,0 +1,13 @@ + + + diff --git a/example/src/demo/pc/search/search-events.vue b/example/src/demo/pc/search/search-events.vue new file mode 100644 index 000000000..d7802be4f --- /dev/null +++ b/example/src/demo/pc/search/search-events.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/search/search-types.vue b/example/src/demo/pc/search/search-types.vue new file mode 100644 index 000000000..ec7fca7db --- /dev/null +++ b/example/src/demo/pc/search/search-types.vue @@ -0,0 +1,31 @@ + + + diff --git a/example/src/demo/pc/search/select-events.vue b/example/src/demo/pc/search/select-events.vue new file mode 100644 index 000000000..29502f6b4 --- /dev/null +++ b/example/src/demo/pc/search/select-events.vue @@ -0,0 +1,36 @@ + + + diff --git a/example/src/demo/pc/search/show-selected-types.vue b/example/src/demo/pc/search/show-selected-types.vue new file mode 100644 index 000000000..1dce17016 --- /dev/null +++ b/example/src/demo/pc/search/show-selected-types.vue @@ -0,0 +1,37 @@ + + + diff --git a/example/src/demo/pc/search/transparent-mode.vue b/example/src/demo/pc/search/transparent-mode.vue new file mode 100644 index 000000000..f2529d24f --- /dev/null +++ b/example/src/demo/pc/search/transparent-mode.vue @@ -0,0 +1,41 @@ + + + + + diff --git a/example/src/demo/pc/select/allow-create.vue b/example/src/demo/pc/select/allow-create.vue new file mode 100644 index 000000000..b4c3521f0 --- /dev/null +++ b/example/src/demo/pc/select/allow-create.vue @@ -0,0 +1,55 @@ + + + diff --git a/example/src/demo/pc/select/automatic-dropdown.vue b/example/src/demo/pc/select/automatic-dropdown.vue new file mode 100644 index 000000000..de5a02190 --- /dev/null +++ b/example/src/demo/pc/select/automatic-dropdown.vue @@ -0,0 +1,65 @@ + + + diff --git a/example/src/demo/pc/select/basic-usage.vue b/example/src/demo/pc/select/basic-usage.vue new file mode 100644 index 000000000..86c67c24a --- /dev/null +++ b/example/src/demo/pc/select/basic-usage.vue @@ -0,0 +1,51 @@ + + + diff --git a/example/src/demo/pc/select/binding-obj.vue b/example/src/demo/pc/select/binding-obj.vue new file mode 100644 index 000000000..43db911e1 --- /dev/null +++ b/example/src/demo/pc/select/binding-obj.vue @@ -0,0 +1,52 @@ + + + diff --git a/example/src/demo/pc/select/cache-usage.vue b/example/src/demo/pc/select/cache-usage.vue new file mode 100644 index 000000000..822136ee2 --- /dev/null +++ b/example/src/demo/pc/select/cache-usage.vue @@ -0,0 +1,43 @@ + + + diff --git a/example/src/demo/pc/select/clearable.vue b/example/src/demo/pc/select/clearable.vue new file mode 100644 index 000000000..1f0081cb1 --- /dev/null +++ b/example/src/demo/pc/select/clearable.vue @@ -0,0 +1,49 @@ + + + diff --git a/example/src/demo/pc/select/collapse-tags.vue b/example/src/demo/pc/select/collapse-tags.vue new file mode 100644 index 000000000..dc3235d11 --- /dev/null +++ b/example/src/demo/pc/select/collapse-tags.vue @@ -0,0 +1,49 @@ + + + diff --git a/example/src/demo/pc/select/custom-options.vue b/example/src/demo/pc/select/custom-options.vue new file mode 100644 index 000000000..4c51a5562 --- /dev/null +++ b/example/src/demo/pc/select/custom-options.vue @@ -0,0 +1,53 @@ + + + diff --git a/example/src/demo/pc/select/custom-prefix.vue b/example/src/demo/pc/select/custom-prefix.vue new file mode 100644 index 000000000..4a4298a0b --- /dev/null +++ b/example/src/demo/pc/select/custom-prefix.vue @@ -0,0 +1,54 @@ + + + diff --git a/example/src/demo/pc/select/disable-grid-select-radio.vue b/example/src/demo/pc/select/disable-grid-select-radio.vue new file mode 100644 index 000000000..c85802744 --- /dev/null +++ b/example/src/demo/pc/select/disable-grid-select-radio.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/example/src/demo/pc/select/disabled-options.vue b/example/src/demo/pc/select/disabled-options.vue new file mode 100644 index 000000000..82cdc399e --- /dev/null +++ b/example/src/demo/pc/select/disabled-options.vue @@ -0,0 +1,52 @@ + + + diff --git a/example/src/demo/pc/select/disabled.vue b/example/src/demo/pc/select/disabled.vue new file mode 100644 index 000000000..1a1406434 --- /dev/null +++ b/example/src/demo/pc/select/disabled.vue @@ -0,0 +1,43 @@ + + + diff --git a/example/src/demo/pc/select/envts-change.vue b/example/src/demo/pc/select/envts-change.vue new file mode 100644 index 000000000..b015039c9 --- /dev/null +++ b/example/src/demo/pc/select/envts-change.vue @@ -0,0 +1,91 @@ + + + diff --git a/example/src/demo/pc/select/envts-remove.vue b/example/src/demo/pc/select/envts-remove.vue new file mode 100644 index 000000000..ac7deb783 --- /dev/null +++ b/example/src/demo/pc/select/envts-remove.vue @@ -0,0 +1,68 @@ + + + diff --git a/example/src/demo/pc/select/filter-method.vue b/example/src/demo/pc/select/filter-method.vue new file mode 100644 index 000000000..3fb6b256a --- /dev/null +++ b/example/src/demo/pc/select/filter-method.vue @@ -0,0 +1,72 @@ + + + diff --git a/example/src/demo/pc/select/focus-remote-method.vue b/example/src/demo/pc/select/focus-remote-method.vue new file mode 100644 index 000000000..ee730943c --- /dev/null +++ b/example/src/demo/pc/select/focus-remote-method.vue @@ -0,0 +1,115 @@ + + + diff --git a/example/src/demo/pc/select/hide-select-input-border.vue b/example/src/demo/pc/select/hide-select-input-border.vue new file mode 100644 index 000000000..e9dbf52b2 --- /dev/null +++ b/example/src/demo/pc/select/hide-select-input-border.vue @@ -0,0 +1,49 @@ + + + diff --git a/example/src/demo/pc/select/is-drop-inherit-width.vue b/example/src/demo/pc/select/is-drop-inherit-width.vue new file mode 100644 index 000000000..50d3ae1a4 --- /dev/null +++ b/example/src/demo/pc/select/is-drop-inherit-width.vue @@ -0,0 +1,63 @@ + + + diff --git a/example/src/demo/pc/select/manual-focus-blur.vue b/example/src/demo/pc/select/manual-focus-blur.vue new file mode 100644 index 000000000..06efb0b49 --- /dev/null +++ b/example/src/demo/pc/select/manual-focus-blur.vue @@ -0,0 +1,56 @@ + + + diff --git a/example/src/demo/pc/select/memoize-usage.vue b/example/src/demo/pc/select/memoize-usage.vue new file mode 100644 index 000000000..ba2d5ed92 --- /dev/null +++ b/example/src/demo/pc/select/memoize-usage.vue @@ -0,0 +1,62 @@ + + + diff --git a/example/src/demo/pc/select/multiple-limit.vue b/example/src/demo/pc/select/multiple-limit.vue new file mode 100644 index 000000000..077425b85 --- /dev/null +++ b/example/src/demo/pc/select/multiple-limit.vue @@ -0,0 +1,54 @@ + + + diff --git a/example/src/demo/pc/select/multiple.vue b/example/src/demo/pc/select/multiple.vue new file mode 100644 index 000000000..6d78c1bfa --- /dev/null +++ b/example/src/demo/pc/select/multiple.vue @@ -0,0 +1,49 @@ + + + diff --git a/example/src/demo/pc/select/name.vue b/example/src/demo/pc/select/name.vue new file mode 100644 index 000000000..fcec7b5e3 --- /dev/null +++ b/example/src/demo/pc/select/name.vue @@ -0,0 +1,49 @@ + + + diff --git a/example/src/demo/pc/select/nest-checkbox-grid-clearable.vue b/example/src/demo/pc/select/nest-checkbox-grid-clearable.vue new file mode 100644 index 000000000..8453feaf9 --- /dev/null +++ b/example/src/demo/pc/select/nest-checkbox-grid-clearable.vue @@ -0,0 +1,62 @@ + + + + + diff --git a/example/src/demo/pc/select/nest-checkbox-grid.vue b/example/src/demo/pc/select/nest-checkbox-grid.vue new file mode 100644 index 000000000..261bd7654 --- /dev/null +++ b/example/src/demo/pc/select/nest-checkbox-grid.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/example/src/demo/pc/select/nest-checkbox-tree.vue b/example/src/demo/pc/select/nest-checkbox-tree.vue new file mode 100644 index 000000000..3f55d9a41 --- /dev/null +++ b/example/src/demo/pc/select/nest-checkbox-tree.vue @@ -0,0 +1,72 @@ + + + + + diff --git a/example/src/demo/pc/select/nest-filterable-tree.vue b/example/src/demo/pc/select/nest-filterable-tree.vue new file mode 100644 index 000000000..b28077b8e --- /dev/null +++ b/example/src/demo/pc/select/nest-filterable-tree.vue @@ -0,0 +1,81 @@ + + + + + diff --git a/example/src/demo/pc/select/nest-grid-remote-filter.vue b/example/src/demo/pc/select/nest-grid-remote-filter.vue new file mode 100644 index 000000000..f6a2bc9dc --- /dev/null +++ b/example/src/demo/pc/select/nest-grid-remote-filter.vue @@ -0,0 +1,94 @@ + + + + + diff --git a/example/src/demo/pc/select/nest-radio-grid-much-data.vue b/example/src/demo/pc/select/nest-radio-grid-much-data.vue new file mode 100644 index 000000000..6a1a61d98 --- /dev/null +++ b/example/src/demo/pc/select/nest-radio-grid-much-data.vue @@ -0,0 +1,60 @@ + + + + + diff --git a/example/src/demo/pc/select/nest-radio-grid.vue b/example/src/demo/pc/select/nest-radio-grid.vue new file mode 100644 index 000000000..f97269d37 --- /dev/null +++ b/example/src/demo/pc/select/nest-radio-grid.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/example/src/demo/pc/select/nest-radio-tree.vue b/example/src/demo/pc/select/nest-radio-tree.vue new file mode 100644 index 000000000..ccb9ef113 --- /dev/null +++ b/example/src/demo/pc/select/nest-radio-tree.vue @@ -0,0 +1,71 @@ + + + + + diff --git a/example/src/demo/pc/select/nest-remote-grid.vue b/example/src/demo/pc/select/nest-remote-grid.vue new file mode 100644 index 000000000..73cc2effd --- /dev/null +++ b/example/src/demo/pc/select/nest-remote-grid.vue @@ -0,0 +1,220 @@ + + + + + diff --git a/example/src/demo/pc/select/no-data-text.vue b/example/src/demo/pc/select/no-data-text.vue new file mode 100644 index 000000000..38a7f75d5 --- /dev/null +++ b/example/src/demo/pc/select/no-data-text.vue @@ -0,0 +1,28 @@ + + + diff --git a/example/src/demo/pc/select/no-match-text.vue b/example/src/demo/pc/select/no-match-text.vue new file mode 100644 index 000000000..2dd5e68f3 --- /dev/null +++ b/example/src/demo/pc/select/no-match-text.vue @@ -0,0 +1,54 @@ + + + diff --git a/example/src/demo/pc/select/optimization.vue b/example/src/demo/pc/select/optimization.vue new file mode 100644 index 000000000..e99406f4d --- /dev/null +++ b/example/src/demo/pc/select/optimization.vue @@ -0,0 +1,36 @@ + + + diff --git a/example/src/demo/pc/select/option-group-disable.vue b/example/src/demo/pc/select/option-group-disable.vue new file mode 100644 index 000000000..c34b0fa9a --- /dev/null +++ b/example/src/demo/pc/select/option-group-disable.vue @@ -0,0 +1,71 @@ + + + diff --git a/example/src/demo/pc/select/option-group.vue b/example/src/demo/pc/select/option-group.vue new file mode 100644 index 000000000..111ff9537 --- /dev/null +++ b/example/src/demo/pc/select/option-group.vue @@ -0,0 +1,71 @@ + + + diff --git a/example/src/demo/pc/select/popup-style-position.vue b/example/src/demo/pc/select/popup-style-position.vue new file mode 100644 index 000000000..1794dfbce --- /dev/null +++ b/example/src/demo/pc/select/popup-style-position.vue @@ -0,0 +1,68 @@ + + + + + diff --git a/example/src/demo/pc/select/remote-method.vue b/example/src/demo/pc/select/remote-method.vue new file mode 100644 index 000000000..21d6644a7 --- /dev/null +++ b/example/src/demo/pc/select/remote-method.vue @@ -0,0 +1,111 @@ + + + diff --git a/example/src/demo/pc/select/remote-search-allow-copy.vue b/example/src/demo/pc/select/remote-search-allow-copy.vue new file mode 100644 index 000000000..0886f5229 --- /dev/null +++ b/example/src/demo/pc/select/remote-search-allow-copy.vue @@ -0,0 +1,112 @@ + + + diff --git a/example/src/demo/pc/select/search-allow-copy.vue b/example/src/demo/pc/select/search-allow-copy.vue new file mode 100644 index 000000000..93351692e --- /dev/null +++ b/example/src/demo/pc/select/search-allow-copy.vue @@ -0,0 +1,73 @@ + + + diff --git a/example/src/demo/pc/select/set-input-value.vue b/example/src/demo/pc/select/set-input-value.vue new file mode 100644 index 000000000..4ca386bf5 --- /dev/null +++ b/example/src/demo/pc/select/set-input-value.vue @@ -0,0 +1,60 @@ + + + diff --git a/example/src/demo/pc/select/show-alloption.vue b/example/src/demo/pc/select/show-alloption.vue new file mode 100644 index 000000000..9eacb3229 --- /dev/null +++ b/example/src/demo/pc/select/show-alloption.vue @@ -0,0 +1,54 @@ + + + diff --git a/example/src/demo/pc/select/show-tip.vue b/example/src/demo/pc/select/show-tip.vue new file mode 100644 index 000000000..0785db96c --- /dev/null +++ b/example/src/demo/pc/select/show-tip.vue @@ -0,0 +1,55 @@ + + + diff --git a/example/src/demo/pc/select/size-medium.vue b/example/src/demo/pc/select/size-medium.vue new file mode 100644 index 000000000..4b6a14277 --- /dev/null +++ b/example/src/demo/pc/select/size-medium.vue @@ -0,0 +1,45 @@ + + + diff --git a/example/src/demo/pc/select/size-mini.vue b/example/src/demo/pc/select/size-mini.vue new file mode 100644 index 000000000..802c52fde --- /dev/null +++ b/example/src/demo/pc/select/size-mini.vue @@ -0,0 +1,49 @@ + + + diff --git a/example/src/demo/pc/select/size-small.vue b/example/src/demo/pc/select/size-small.vue new file mode 100644 index 000000000..c7e0a250f --- /dev/null +++ b/example/src/demo/pc/select/size-small.vue @@ -0,0 +1,49 @@ + + + diff --git a/example/src/demo/pc/select/slot-default.vue b/example/src/demo/pc/select/slot-default.vue new file mode 100644 index 000000000..6cfa198db --- /dev/null +++ b/example/src/demo/pc/select/slot-default.vue @@ -0,0 +1,53 @@ + + + diff --git a/example/src/demo/pc/select/slot-empty.vue b/example/src/demo/pc/select/slot-empty.vue new file mode 100644 index 000000000..510fb1fb9 --- /dev/null +++ b/example/src/demo/pc/select/slot-empty.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/select/tag-copy-all.vue b/example/src/demo/pc/select/tag-copy-all.vue new file mode 100644 index 000000000..1c55c1e37 --- /dev/null +++ b/example/src/demo/pc/select/tag-copy-all.vue @@ -0,0 +1,71 @@ + + + diff --git a/example/src/demo/pc/select/tag-select.vue b/example/src/demo/pc/select/tag-select.vue new file mode 100644 index 000000000..99b4f08a3 --- /dev/null +++ b/example/src/demo/pc/select/tag-select.vue @@ -0,0 +1,71 @@ + + + diff --git a/example/src/demo/pc/slide-bar/basic-usage.vue b/example/src/demo/pc/slide-bar/basic-usage.vue new file mode 100644 index 000000000..c834bc036 --- /dev/null +++ b/example/src/demo/pc/slide-bar/basic-usage.vue @@ -0,0 +1,29 @@ + + + diff --git a/example/src/demo/pc/slide-bar/custom-content.vue b/example/src/demo/pc/slide-bar/custom-content.vue new file mode 100644 index 000000000..a2c9d4d6d --- /dev/null +++ b/example/src/demo/pc/slide-bar/custom-content.vue @@ -0,0 +1,34 @@ + + + diff --git a/example/src/demo/pc/slide-bar/custom-tag.vue b/example/src/demo/pc/slide-bar/custom-tag.vue new file mode 100644 index 000000000..c8f506453 --- /dev/null +++ b/example/src/demo/pc/slide-bar/custom-tag.vue @@ -0,0 +1,131 @@ + + + + + diff --git a/example/src/demo/pc/slide-bar/slide-bar-events.vue b/example/src/demo/pc/slide-bar/slide-bar-events.vue new file mode 100644 index 000000000..ed90d0517 --- /dev/null +++ b/example/src/demo/pc/slide-bar/slide-bar-events.vue @@ -0,0 +1,45 @@ + + + diff --git a/example/src/demo/pc/slide-bar/wheel-blocks.vue b/example/src/demo/pc/slide-bar/wheel-blocks.vue new file mode 100644 index 000000000..9690503b6 --- /dev/null +++ b/example/src/demo/pc/slide-bar/wheel-blocks.vue @@ -0,0 +1,33 @@ + + + diff --git a/example/src/demo/pc/slider/about-step.vue b/example/src/demo/pc/slider/about-step.vue new file mode 100644 index 000000000..752af2a1f --- /dev/null +++ b/example/src/demo/pc/slider/about-step.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/slider/basic-usage.vue b/example/src/demo/pc/slider/basic-usage.vue new file mode 100644 index 000000000..e908ac837 --- /dev/null +++ b/example/src/demo/pc/slider/basic-usage.vue @@ -0,0 +1,27 @@ + + + diff --git a/example/src/demo/pc/slider/dynamic-disable.vue b/example/src/demo/pc/slider/dynamic-disable.vue new file mode 100644 index 000000000..556a31b9a --- /dev/null +++ b/example/src/demo/pc/slider/dynamic-disable.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/slider/format-tooltip.vue b/example/src/demo/pc/slider/format-tooltip.vue new file mode 100644 index 000000000..a8e63b723 --- /dev/null +++ b/example/src/demo/pc/slider/format-tooltip.vue @@ -0,0 +1,27 @@ + + + diff --git a/example/src/demo/pc/slider/max-min.vue b/example/src/demo/pc/slider/max-min.vue new file mode 100644 index 000000000..7a8794640 --- /dev/null +++ b/example/src/demo/pc/slider/max-min.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/slider/range-select.vue b/example/src/demo/pc/slider/range-select.vue new file mode 100644 index 000000000..ee3e535aa --- /dev/null +++ b/example/src/demo/pc/slider/range-select.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/slider/shortcut-operation.vue b/example/src/demo/pc/slider/shortcut-operation.vue new file mode 100644 index 000000000..f8e13d025 --- /dev/null +++ b/example/src/demo/pc/slider/shortcut-operation.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/slider/show-iput.vue b/example/src/demo/pc/slider/show-iput.vue new file mode 100644 index 000000000..e78bba376 --- /dev/null +++ b/example/src/demo/pc/slider/show-iput.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/slider/show-tip.vue b/example/src/demo/pc/slider/show-tip.vue new file mode 100644 index 000000000..5feefd85f --- /dev/null +++ b/example/src/demo/pc/slider/show-tip.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/slider/slider-event-change.vue b/example/src/demo/pc/slider/slider-event-change.vue new file mode 100644 index 000000000..7710df06d --- /dev/null +++ b/example/src/demo/pc/slider/slider-event-change.vue @@ -0,0 +1,27 @@ + + + diff --git a/example/src/demo/pc/slider/slider-event-start.vue b/example/src/demo/pc/slider/slider-event-start.vue new file mode 100644 index 000000000..193c9ab32 --- /dev/null +++ b/example/src/demo/pc/slider/slider-event-start.vue @@ -0,0 +1,27 @@ + + + diff --git a/example/src/demo/pc/slider/slider-event-stop.vue b/example/src/demo/pc/slider/slider-event-stop.vue new file mode 100644 index 000000000..c3fab48d8 --- /dev/null +++ b/example/src/demo/pc/slider/slider-event-stop.vue @@ -0,0 +1,27 @@ + + + diff --git a/example/src/demo/pc/slider/slider-slot.vue b/example/src/demo/pc/slider/slider-slot.vue new file mode 100644 index 000000000..9cf5e6b11 --- /dev/null +++ b/example/src/demo/pc/slider/slider-slot.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/slider/vertical-mode.vue b/example/src/demo/pc/slider/vertical-mode.vue new file mode 100644 index 000000000..06219b040 --- /dev/null +++ b/example/src/demo/pc/slider/vertical-mode.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/split/basic-usage.vue b/example/src/demo/pc/split/basic-usage.vue new file mode 100644 index 000000000..763a3c70c --- /dev/null +++ b/example/src/demo/pc/split/basic-usage.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/example/src/demo/pc/split/basic-usage1.vue b/example/src/demo/pc/split/basic-usage1.vue new file mode 100644 index 000000000..13ed9b3db --- /dev/null +++ b/example/src/demo/pc/split/basic-usage1.vue @@ -0,0 +1,33 @@ + + + + + diff --git a/example/src/demo/pc/split/left-right-slot.vue b/example/src/demo/pc/split/left-right-slot.vue new file mode 100644 index 000000000..fe5388b70 --- /dev/null +++ b/example/src/demo/pc/split/left-right-slot.vue @@ -0,0 +1,39 @@ + + + + + diff --git a/example/src/demo/pc/split/moveend-event.vue b/example/src/demo/pc/split/moveend-event.vue new file mode 100644 index 000000000..85302c104 --- /dev/null +++ b/example/src/demo/pc/split/moveend-event.vue @@ -0,0 +1,44 @@ + + + + + diff --git a/example/src/demo/pc/split/movestart-event.vue b/example/src/demo/pc/split/movestart-event.vue new file mode 100644 index 000000000..0d93dc9aa --- /dev/null +++ b/example/src/demo/pc/split/movestart-event.vue @@ -0,0 +1,44 @@ + + + + + diff --git a/example/src/demo/pc/split/moving-event.vue b/example/src/demo/pc/split/moving-event.vue new file mode 100644 index 000000000..ba86538ea --- /dev/null +++ b/example/src/demo/pc/split/moving-event.vue @@ -0,0 +1,44 @@ + + + + + diff --git a/example/src/demo/pc/split/nested-use.vue b/example/src/demo/pc/split/nested-use.vue new file mode 100644 index 000000000..ac26c1a34 --- /dev/null +++ b/example/src/demo/pc/split/nested-use.vue @@ -0,0 +1,53 @@ + + + + + diff --git a/example/src/demo/pc/split/split-mode.vue b/example/src/demo/pc/split/split-mode.vue new file mode 100644 index 000000000..b4bf5a60a --- /dev/null +++ b/example/src/demo/pc/split/split-mode.vue @@ -0,0 +1,57 @@ + + + + + diff --git a/example/src/demo/pc/split/split-threshold.vue b/example/src/demo/pc/split/split-threshold.vue new file mode 100644 index 000000000..9be2b6f09 --- /dev/null +++ b/example/src/demo/pc/split/split-threshold.vue @@ -0,0 +1,48 @@ + + + + + diff --git a/example/src/demo/pc/split/top-bottom-slot.vue b/example/src/demo/pc/split/top-bottom-slot.vue new file mode 100644 index 000000000..3d289c369 --- /dev/null +++ b/example/src/demo/pc/split/top-bottom-slot.vue @@ -0,0 +1,39 @@ + + + + + diff --git a/example/src/demo/pc/split/trigger-slot.vue b/example/src/demo/pc/split/trigger-slot.vue new file mode 100644 index 000000000..40bb6046b --- /dev/null +++ b/example/src/demo/pc/split/trigger-slot.vue @@ -0,0 +1,48 @@ + + + + + diff --git a/example/src/demo/pc/steps/advanced-steps.vue b/example/src/demo/pc/steps/advanced-steps.vue new file mode 100644 index 000000000..5f6b8865b --- /dev/null +++ b/example/src/demo/pc/steps/advanced-steps.vue @@ -0,0 +1,36 @@ + + + diff --git a/example/src/demo/pc/steps/click.vue b/example/src/demo/pc/steps/click.vue new file mode 100644 index 000000000..7dc301867 --- /dev/null +++ b/example/src/demo/pc/steps/click.vue @@ -0,0 +1,74 @@ + + + + + diff --git a/example/src/demo/pc/steps/custom-steps-item.vue b/example/src/demo/pc/steps/custom-steps-item.vue new file mode 100644 index 000000000..dac59e075 --- /dev/null +++ b/example/src/demo/pc/steps/custom-steps-item.vue @@ -0,0 +1,54 @@ + + + + + diff --git a/example/src/demo/pc/steps/data-resource.vue b/example/src/demo/pc/steps/data-resource.vue new file mode 100644 index 000000000..b8bd7725f --- /dev/null +++ b/example/src/demo/pc/steps/data-resource.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/example/src/demo/pc/steps/normal-steps.vue b/example/src/demo/pc/steps/normal-steps.vue new file mode 100644 index 000000000..d7d210a0d --- /dev/null +++ b/example/src/demo/pc/steps/normal-steps.vue @@ -0,0 +1,36 @@ + + + diff --git a/example/src/demo/pc/steps/order-progress.vue b/example/src/demo/pc/steps/order-progress.vue new file mode 100644 index 000000000..50b04ad9e --- /dev/null +++ b/example/src/demo/pc/steps/order-progress.vue @@ -0,0 +1,60 @@ + + + + + diff --git a/example/src/demo/pc/steps/slot.vue b/example/src/demo/pc/steps/slot.vue new file mode 100644 index 000000000..5d6a97415 --- /dev/null +++ b/example/src/demo/pc/steps/slot.vue @@ -0,0 +1,67 @@ + + + + + diff --git a/example/src/demo/pc/steps/timeline-steps.vue b/example/src/demo/pc/steps/timeline-steps.vue new file mode 100644 index 000000000..d39c7c42c --- /dev/null +++ b/example/src/demo/pc/steps/timeline-steps.vue @@ -0,0 +1,82 @@ + + + + + diff --git a/example/src/demo/pc/switch/basic-usage.vue b/example/src/demo/pc/switch/basic-usage.vue new file mode 100644 index 000000000..c02dbe084 --- /dev/null +++ b/example/src/demo/pc/switch/basic-usage.vue @@ -0,0 +1,13 @@ + + + diff --git a/example/src/demo/pc/switch/custom-open-close.vue b/example/src/demo/pc/switch/custom-open-close.vue new file mode 100644 index 000000000..fc87f21ca --- /dev/null +++ b/example/src/demo/pc/switch/custom-open-close.vue @@ -0,0 +1,25 @@ + + + diff --git a/example/src/demo/pc/switch/custom-true-false-value.vue b/example/src/demo/pc/switch/custom-true-false-value.vue new file mode 100644 index 000000000..8bd8d8933 --- /dev/null +++ b/example/src/demo/pc/switch/custom-true-false-value.vue @@ -0,0 +1,28 @@ + + + diff --git a/example/src/demo/pc/switch/dynamic-disable.vue b/example/src/demo/pc/switch/dynamic-disable.vue new file mode 100644 index 000000000..cd2b613a4 --- /dev/null +++ b/example/src/demo/pc/switch/dynamic-disable.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/switch/enent.vue b/example/src/demo/pc/switch/enent.vue new file mode 100644 index 000000000..68c8f76a7 --- /dev/null +++ b/example/src/demo/pc/switch/enent.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/switch/mini-mode.vue b/example/src/demo/pc/switch/mini-mode.vue new file mode 100644 index 000000000..9374b9dd6 --- /dev/null +++ b/example/src/demo/pc/switch/mini-mode.vue @@ -0,0 +1,13 @@ + + + diff --git a/example/src/demo/pc/tabs/basic-usage.vue b/example/src/demo/pc/tabs/basic-usage.vue new file mode 100644 index 000000000..4a614cb19 --- /dev/null +++ b/example/src/demo/pc/tabs/basic-usage.vue @@ -0,0 +1,32 @@ + + + diff --git a/example/src/demo/pc/tabs/before-leave.vue b/example/src/demo/pc/tabs/before-leave.vue new file mode 100644 index 000000000..a0ae91ee7 --- /dev/null +++ b/example/src/demo/pc/tabs/before-leave.vue @@ -0,0 +1,37 @@ + + + diff --git a/example/src/demo/pc/tabs/custom-tab-content.vue b/example/src/demo/pc/tabs/custom-tab-content.vue new file mode 100644 index 000000000..0101f1d63 --- /dev/null +++ b/example/src/demo/pc/tabs/custom-tab-content.vue @@ -0,0 +1,32 @@ + + + diff --git a/example/src/demo/pc/tabs/custom-tab-title.vue b/example/src/demo/pc/tabs/custom-tab-title.vue new file mode 100644 index 000000000..de6a80e73 --- /dev/null +++ b/example/src/demo/pc/tabs/custom-tab-title.vue @@ -0,0 +1,43 @@ + + + diff --git a/example/src/demo/pc/tabs/position-bottom.vue b/example/src/demo/pc/tabs/position-bottom.vue new file mode 100644 index 000000000..7df5a0f13 --- /dev/null +++ b/example/src/demo/pc/tabs/position-bottom.vue @@ -0,0 +1,55 @@ + + + diff --git a/example/src/demo/pc/tabs/position-left.vue b/example/src/demo/pc/tabs/position-left.vue new file mode 100644 index 000000000..6758c1fa4 --- /dev/null +++ b/example/src/demo/pc/tabs/position-left.vue @@ -0,0 +1,55 @@ + + + diff --git a/example/src/demo/pc/tabs/position-right.vue b/example/src/demo/pc/tabs/position-right.vue new file mode 100644 index 000000000..ab7904494 --- /dev/null +++ b/example/src/demo/pc/tabs/position-right.vue @@ -0,0 +1,55 @@ + + + diff --git a/example/src/demo/pc/tabs/position.vue b/example/src/demo/pc/tabs/position.vue new file mode 100644 index 000000000..ef2319c67 --- /dev/null +++ b/example/src/demo/pc/tabs/position.vue @@ -0,0 +1,55 @@ + + + diff --git a/example/src/demo/pc/tabs/prevent-tab-switching.vue b/example/src/demo/pc/tabs/prevent-tab-switching.vue new file mode 100644 index 000000000..efaba278d --- /dev/null +++ b/example/src/demo/pc/tabs/prevent-tab-switching.vue @@ -0,0 +1,43 @@ + + + diff --git a/example/src/demo/pc/tabs/show-different-grid-data.vue b/example/src/demo/pc/tabs/show-different-grid-data.vue new file mode 100644 index 000000000..0087c903a --- /dev/null +++ b/example/src/demo/pc/tabs/show-different-grid-data.vue @@ -0,0 +1,100 @@ + + + diff --git a/example/src/demo/pc/tabs/stretch-wh.vue b/example/src/demo/pc/tabs/stretch-wh.vue new file mode 100644 index 000000000..4244b7942 --- /dev/null +++ b/example/src/demo/pc/tabs/stretch-wh.vue @@ -0,0 +1,35 @@ + + + diff --git a/example/src/demo/pc/tabs/tab-style-bordercard.vue b/example/src/demo/pc/tabs/tab-style-bordercard.vue new file mode 100644 index 000000000..b6aa48b30 --- /dev/null +++ b/example/src/demo/pc/tabs/tab-style-bordercard.vue @@ -0,0 +1,55 @@ + + + diff --git a/example/src/demo/pc/tabs/tab-style-card.vue b/example/src/demo/pc/tabs/tab-style-card.vue new file mode 100644 index 000000000..fd31ad4dd --- /dev/null +++ b/example/src/demo/pc/tabs/tab-style-card.vue @@ -0,0 +1,55 @@ + + + diff --git a/example/src/demo/pc/tabs/tabdata-title.vue b/example/src/demo/pc/tabs/tabdata-title.vue new file mode 100644 index 000000000..a03095326 --- /dev/null +++ b/example/src/demo/pc/tabs/tabdata-title.vue @@ -0,0 +1,78 @@ + + + diff --git a/example/src/demo/pc/tabs/tabs-events-add.vue b/example/src/demo/pc/tabs/tabs-events-add.vue new file mode 100644 index 000000000..79d3f5383 --- /dev/null +++ b/example/src/demo/pc/tabs/tabs-events-add.vue @@ -0,0 +1,66 @@ + + + diff --git a/example/src/demo/pc/tabs/tabs-events-click.vue b/example/src/demo/pc/tabs/tabs-events-click.vue new file mode 100644 index 000000000..ddf5c6b2c --- /dev/null +++ b/example/src/demo/pc/tabs/tabs-events-click.vue @@ -0,0 +1,40 @@ + + + diff --git a/example/src/demo/pc/tabs/tabs-events-close.vue b/example/src/demo/pc/tabs/tabs-events-close.vue new file mode 100644 index 000000000..be35b8178 --- /dev/null +++ b/example/src/demo/pc/tabs/tabs-events-close.vue @@ -0,0 +1,73 @@ + + + diff --git a/example/src/demo/pc/tabs/tabs-events-edit.vue b/example/src/demo/pc/tabs/tabs-events-edit.vue new file mode 100644 index 000000000..9bed4056c --- /dev/null +++ b/example/src/demo/pc/tabs/tabs-events-edit.vue @@ -0,0 +1,63 @@ + + + diff --git a/example/src/demo/pc/tabs/tabs-size.vue b/example/src/demo/pc/tabs/tabs-size.vue new file mode 100644 index 000000000..885a2a7ba --- /dev/null +++ b/example/src/demo/pc/tabs/tabs-size.vue @@ -0,0 +1,38 @@ + + + diff --git a/example/src/demo/pc/tabs/with-add.vue b/example/src/demo/pc/tabs/with-add.vue new file mode 100644 index 000000000..c65aae5c6 --- /dev/null +++ b/example/src/demo/pc/tabs/with-add.vue @@ -0,0 +1,44 @@ + + + diff --git a/example/src/demo/pc/tag/basic-usage.vue b/example/src/demo/pc/tag/basic-usage.vue new file mode 100644 index 000000000..0c58659f4 --- /dev/null +++ b/example/src/demo/pc/tag/basic-usage.vue @@ -0,0 +1,13 @@ + + + diff --git a/example/src/demo/pc/tag/closeable.vue b/example/src/demo/pc/tag/closeable.vue new file mode 100644 index 000000000..c6c20a09d --- /dev/null +++ b/example/src/demo/pc/tag/closeable.vue @@ -0,0 +1,44 @@ + + + + + diff --git a/example/src/demo/pc/tag/color3.vue b/example/src/demo/pc/tag/color3.vue new file mode 100644 index 000000000..1fb0986af --- /dev/null +++ b/example/src/demo/pc/tag/color3.vue @@ -0,0 +1,13 @@ + + + diff --git a/example/src/demo/pc/tag/create.vue b/example/src/demo/pc/tag/create.vue new file mode 100644 index 000000000..b2dca3c0c --- /dev/null +++ b/example/src/demo/pc/tag/create.vue @@ -0,0 +1,95 @@ + + + + + diff --git a/example/src/demo/pc/tag/effect.vue b/example/src/demo/pc/tag/effect.vue new file mode 100644 index 000000000..97f6d31d1 --- /dev/null +++ b/example/src/demo/pc/tag/effect.vue @@ -0,0 +1,54 @@ + + + diff --git a/example/src/demo/pc/tag/hit.vue b/example/src/demo/pc/tag/hit.vue new file mode 100644 index 000000000..34b54b238 --- /dev/null +++ b/example/src/demo/pc/tag/hit.vue @@ -0,0 +1,19 @@ + + + diff --git a/example/src/demo/pc/tag/tag-event-click.vue b/example/src/demo/pc/tag/tag-event-click.vue new file mode 100644 index 000000000..cf54992a1 --- /dev/null +++ b/example/src/demo/pc/tag/tag-event-click.vue @@ -0,0 +1,39 @@ + + + diff --git a/example/src/demo/pc/tag/tag-event-close.vue b/example/src/demo/pc/tag/tag-event-close.vue new file mode 100644 index 000000000..4403f7cdd --- /dev/null +++ b/example/src/demo/pc/tag/tag-event-close.vue @@ -0,0 +1,40 @@ + + + diff --git a/example/src/demo/pc/tag/tag-size.vue b/example/src/demo/pc/tag/tag-size.vue new file mode 100644 index 000000000..cdb27d128 --- /dev/null +++ b/example/src/demo/pc/tag/tag-size.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/text-popup/basic-usage.vue b/example/src/demo/pc/text-popup/basic-usage.vue new file mode 100644 index 000000000..a3184c863 --- /dev/null +++ b/example/src/demo/pc/text-popup/basic-usage.vue @@ -0,0 +1,13 @@ + + + diff --git a/example/src/demo/pc/text-popup/clear-value.vue b/example/src/demo/pc/text-popup/clear-value.vue new file mode 100644 index 000000000..790282899 --- /dev/null +++ b/example/src/demo/pc/text-popup/clear-value.vue @@ -0,0 +1,29 @@ + + + diff --git a/example/src/demo/pc/text-popup/label.vue b/example/src/demo/pc/text-popup/label.vue new file mode 100644 index 000000000..8dc252d9e --- /dev/null +++ b/example/src/demo/pc/text-popup/label.vue @@ -0,0 +1,13 @@ + + + diff --git a/example/src/demo/pc/text-popup/placeholder.vue b/example/src/demo/pc/text-popup/placeholder.vue new file mode 100644 index 000000000..445b1c698 --- /dev/null +++ b/example/src/demo/pc/text-popup/placeholder.vue @@ -0,0 +1,13 @@ + + + diff --git a/example/src/demo/pc/text-popup/readonly.vue b/example/src/demo/pc/text-popup/readonly.vue new file mode 100644 index 000000000..c37e7dd19 --- /dev/null +++ b/example/src/demo/pc/text-popup/readonly.vue @@ -0,0 +1,13 @@ + + + diff --git a/example/src/demo/pc/text-popup/separtor.vue b/example/src/demo/pc/text-popup/separtor.vue new file mode 100644 index 000000000..b2124db06 --- /dev/null +++ b/example/src/demo/pc/text-popup/separtor.vue @@ -0,0 +1,13 @@ + + + diff --git a/example/src/demo/pc/text-popup/value.vue b/example/src/demo/pc/text-popup/value.vue new file mode 100644 index 000000000..86b9af7fb --- /dev/null +++ b/example/src/demo/pc/text-popup/value.vue @@ -0,0 +1,21 @@ + + + diff --git a/example/src/demo/pc/text-popup/width.vue b/example/src/demo/pc/text-popup/width.vue new file mode 100644 index 000000000..a5fc0f6e0 --- /dev/null +++ b/example/src/demo/pc/text-popup/width.vue @@ -0,0 +1,13 @@ + + + diff --git a/example/src/demo/pc/time-line/basic-usage.vue b/example/src/demo/pc/time-line/basic-usage.vue new file mode 100644 index 000000000..f6f31c635 --- /dev/null +++ b/example/src/demo/pc/time-line/basic-usage.vue @@ -0,0 +1,38 @@ + + + diff --git a/example/src/demo/pc/time-line/custom-normal-step.vue b/example/src/demo/pc/time-line/custom-normal-step.vue new file mode 100644 index 000000000..aa4131db9 --- /dev/null +++ b/example/src/demo/pc/time-line/custom-normal-step.vue @@ -0,0 +1,45 @@ + + + diff --git a/example/src/demo/pc/time-line/custom-vertical-step.vue b/example/src/demo/pc/time-line/custom-vertical-step.vue new file mode 100644 index 000000000..0a15a7186 --- /dev/null +++ b/example/src/demo/pc/time-line/custom-vertical-step.vue @@ -0,0 +1,39 @@ + + + diff --git a/example/src/demo/pc/time-line/different-data.vue b/example/src/demo/pc/time-line/different-data.vue new file mode 100644 index 000000000..02021ca4c --- /dev/null +++ b/example/src/demo/pc/time-line/different-data.vue @@ -0,0 +1,44 @@ + + + diff --git a/example/src/demo/pc/time-line/set-start-value.vue b/example/src/demo/pc/time-line/set-start-value.vue new file mode 100644 index 000000000..4ff1112f8 --- /dev/null +++ b/example/src/demo/pc/time-line/set-start-value.vue @@ -0,0 +1,43 @@ + + + diff --git a/example/src/demo/pc/time-line/set-step-width.vue b/example/src/demo/pc/time-line/set-step-width.vue new file mode 100644 index 000000000..4daf0d748 --- /dev/null +++ b/example/src/demo/pc/time-line/set-step-width.vue @@ -0,0 +1,33 @@ + + + diff --git a/example/src/demo/pc/time-line/show-number.vue b/example/src/demo/pc/time-line/show-number.vue new file mode 100644 index 000000000..dafe20f7a --- /dev/null +++ b/example/src/demo/pc/time-line/show-number.vue @@ -0,0 +1,33 @@ + + + diff --git a/example/src/demo/pc/time-line/show-status.vue b/example/src/demo/pc/time-line/show-status.vue new file mode 100644 index 000000000..fca8294d5 --- /dev/null +++ b/example/src/demo/pc/time-line/show-status.vue @@ -0,0 +1,43 @@ + + + diff --git a/example/src/demo/pc/time-line/vertical-step-reverse.vue b/example/src/demo/pc/time-line/vertical-step-reverse.vue new file mode 100644 index 000000000..86a9a3aa9 --- /dev/null +++ b/example/src/demo/pc/time-line/vertical-step-reverse.vue @@ -0,0 +1,35 @@ + + + diff --git a/example/src/demo/pc/time-line/vertical-step.vue b/example/src/demo/pc/time-line/vertical-step.vue new file mode 100644 index 000000000..b2c950253 --- /dev/null +++ b/example/src/demo/pc/time-line/vertical-step.vue @@ -0,0 +1,33 @@ + + + diff --git a/example/src/demo/pc/time-picker/basic-usage.vue b/example/src/demo/pc/time-picker/basic-usage.vue new file mode 100644 index 000000000..9256f1848 --- /dev/null +++ b/example/src/demo/pc/time-picker/basic-usage.vue @@ -0,0 +1,24 @@ + + + diff --git a/example/src/demo/pc/time-picker/clear-icon.vue b/example/src/demo/pc/time-picker/clear-icon.vue new file mode 100644 index 000000000..4bb5f90a9 --- /dev/null +++ b/example/src/demo/pc/time-picker/clear-icon.vue @@ -0,0 +1,27 @@ + + + diff --git a/example/src/demo/pc/time-picker/clearable.vue b/example/src/demo/pc/time-picker/clearable.vue new file mode 100644 index 000000000..d5afd760a --- /dev/null +++ b/example/src/demo/pc/time-picker/clearable.vue @@ -0,0 +1,26 @@ + + + diff --git a/example/src/demo/pc/time-picker/date.vue b/example/src/demo/pc/time-picker/date.vue new file mode 100644 index 000000000..15b67cdbb --- /dev/null +++ b/example/src/demo/pc/time-picker/date.vue @@ -0,0 +1,65 @@ + + + diff --git a/example/src/demo/pc/time-picker/default-value.vue b/example/src/demo/pc/time-picker/default-value.vue new file mode 100644 index 000000000..4332344b5 --- /dev/null +++ b/example/src/demo/pc/time-picker/default-value.vue @@ -0,0 +1,27 @@ + + + diff --git a/example/src/demo/pc/time-picker/disabled.vue b/example/src/demo/pc/time-picker/disabled.vue new file mode 100644 index 000000000..be307cc6c --- /dev/null +++ b/example/src/demo/pc/time-picker/disabled.vue @@ -0,0 +1,25 @@ + + + diff --git a/example/src/demo/pc/time-picker/editable.vue b/example/src/demo/pc/time-picker/editable.vue new file mode 100644 index 000000000..a2ce0ccaf --- /dev/null +++ b/example/src/demo/pc/time-picker/editable.vue @@ -0,0 +1,25 @@ + + + diff --git a/example/src/demo/pc/time-picker/event-blur.vue b/example/src/demo/pc/time-picker/event-blur.vue new file mode 100644 index 000000000..496c20501 --- /dev/null +++ b/example/src/demo/pc/time-picker/event-blur.vue @@ -0,0 +1,43 @@ + + + diff --git a/example/src/demo/pc/time-picker/format.vue b/example/src/demo/pc/time-picker/format.vue new file mode 100644 index 000000000..85617ae0b --- /dev/null +++ b/example/src/demo/pc/time-picker/format.vue @@ -0,0 +1,28 @@ + + + diff --git a/example/src/demo/pc/time-picker/is-range.vue b/example/src/demo/pc/time-picker/is-range.vue new file mode 100644 index 000000000..5e41326cb --- /dev/null +++ b/example/src/demo/pc/time-picker/is-range.vue @@ -0,0 +1,30 @@ + + + diff --git a/example/src/demo/pc/time-picker/name.vue b/example/src/demo/pc/time-picker/name.vue new file mode 100644 index 000000000..266cb4b15 --- /dev/null +++ b/example/src/demo/pc/time-picker/name.vue @@ -0,0 +1,24 @@ + + + diff --git a/example/src/demo/pc/time-picker/picker-options.vue b/example/src/demo/pc/time-picker/picker-options.vue new file mode 100644 index 000000000..9256f1848 --- /dev/null +++ b/example/src/demo/pc/time-picker/picker-options.vue @@ -0,0 +1,24 @@ + + + diff --git a/example/src/demo/pc/time-picker/popper-class.vue b/example/src/demo/pc/time-picker/popper-class.vue new file mode 100644 index 000000000..9aac7756c --- /dev/null +++ b/example/src/demo/pc/time-picker/popper-class.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/example/src/demo/pc/time-picker/size-medium.vue b/example/src/demo/pc/time-picker/size-medium.vue new file mode 100644 index 000000000..30b037009 --- /dev/null +++ b/example/src/demo/pc/time-picker/size-medium.vue @@ -0,0 +1,28 @@ + + + diff --git a/example/src/demo/pc/time-picker/size-mini.vue b/example/src/demo/pc/time-picker/size-mini.vue new file mode 100644 index 000000000..552090d16 --- /dev/null +++ b/example/src/demo/pc/time-picker/size-mini.vue @@ -0,0 +1,28 @@ + + + diff --git a/example/src/demo/pc/time-picker/size-small.vue b/example/src/demo/pc/time-picker/size-small.vue new file mode 100644 index 000000000..8ac6e6096 --- /dev/null +++ b/example/src/demo/pc/time-picker/size-small.vue @@ -0,0 +1,28 @@ + + + diff --git a/example/src/demo/pc/time-picker/suffix-icon.vue b/example/src/demo/pc/time-picker/suffix-icon.vue new file mode 100644 index 000000000..210f90cbc --- /dev/null +++ b/example/src/demo/pc/time-picker/suffix-icon.vue @@ -0,0 +1,26 @@ + + + diff --git a/example/src/demo/pc/time-picker/time-low.vue b/example/src/demo/pc/time-picker/time-low.vue new file mode 100644 index 000000000..d365b9066 --- /dev/null +++ b/example/src/demo/pc/time-picker/time-low.vue @@ -0,0 +1,29 @@ + + + diff --git a/example/src/demo/pc/time-picker/time-upp.vue b/example/src/demo/pc/time-picker/time-upp.vue new file mode 100644 index 000000000..49475b823 --- /dev/null +++ b/example/src/demo/pc/time-picker/time-upp.vue @@ -0,0 +1,29 @@ + + + diff --git a/example/src/demo/pc/time-select/basic-usage.vue b/example/src/demo/pc/time-select/basic-usage.vue new file mode 100644 index 000000000..ed586f927 --- /dev/null +++ b/example/src/demo/pc/time-select/basic-usage.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/time-select/clear-icon.vue b/example/src/demo/pc/time-select/clear-icon.vue new file mode 100644 index 000000000..1f0592951 --- /dev/null +++ b/example/src/demo/pc/time-select/clear-icon.vue @@ -0,0 +1,27 @@ + + + diff --git a/example/src/demo/pc/time-select/default-time.vue b/example/src/demo/pc/time-select/default-time.vue new file mode 100644 index 000000000..bff626c30 --- /dev/null +++ b/example/src/demo/pc/time-select/default-time.vue @@ -0,0 +1,23 @@ + + + diff --git a/example/src/demo/pc/time-select/default-value.vue b/example/src/demo/pc/time-select/default-value.vue new file mode 100644 index 000000000..858d980da --- /dev/null +++ b/example/src/demo/pc/time-select/default-value.vue @@ -0,0 +1,23 @@ + + + diff --git a/example/src/demo/pc/time-select/disabled.vue b/example/src/demo/pc/time-select/disabled.vue new file mode 100644 index 000000000..5c0911b61 --- /dev/null +++ b/example/src/demo/pc/time-select/disabled.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/time-select/editable.vue b/example/src/demo/pc/time-select/editable.vue new file mode 100644 index 000000000..e31d0d0dd --- /dev/null +++ b/example/src/demo/pc/time-select/editable.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/time-select/event-blur.vue b/example/src/demo/pc/time-select/event-blur.vue new file mode 100644 index 000000000..ba539c5c0 --- /dev/null +++ b/example/src/demo/pc/time-select/event-blur.vue @@ -0,0 +1,37 @@ + + + diff --git a/example/src/demo/pc/time-select/event-change.vue b/example/src/demo/pc/time-select/event-change.vue new file mode 100644 index 000000000..f058f16cd --- /dev/null +++ b/example/src/demo/pc/time-select/event-change.vue @@ -0,0 +1,29 @@ + + + diff --git a/example/src/demo/pc/time-select/focus.vue b/example/src/demo/pc/time-select/focus.vue new file mode 100644 index 000000000..d6537c96c --- /dev/null +++ b/example/src/demo/pc/time-select/focus.vue @@ -0,0 +1,31 @@ + + + diff --git a/example/src/demo/pc/time-select/picker-options.vue b/example/src/demo/pc/time-select/picker-options.vue new file mode 100644 index 000000000..6766fb661 --- /dev/null +++ b/example/src/demo/pc/time-select/picker-options.vue @@ -0,0 +1,28 @@ + + + diff --git a/example/src/demo/pc/time-select/popper-class.vue b/example/src/demo/pc/time-select/popper-class.vue new file mode 100644 index 000000000..549072e38 --- /dev/null +++ b/example/src/demo/pc/time-select/popper-class.vue @@ -0,0 +1,30 @@ + + + + + diff --git a/example/src/demo/pc/time-select/range-placeholder.vue b/example/src/demo/pc/time-select/range-placeholder.vue new file mode 100644 index 000000000..4908fc3d3 --- /dev/null +++ b/example/src/demo/pc/time-select/range-placeholder.vue @@ -0,0 +1,35 @@ + + + diff --git a/example/src/demo/pc/time-select/size-medium.vue b/example/src/demo/pc/time-select/size-medium.vue new file mode 100644 index 000000000..023bac123 --- /dev/null +++ b/example/src/demo/pc/time-select/size-medium.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/time-select/size-mini.vue b/example/src/demo/pc/time-select/size-mini.vue new file mode 100644 index 000000000..feefd822b --- /dev/null +++ b/example/src/demo/pc/time-select/size-mini.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/time-select/size-small.vue b/example/src/demo/pc/time-select/size-small.vue new file mode 100644 index 000000000..c953e77b0 --- /dev/null +++ b/example/src/demo/pc/time-select/size-small.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/time-select/suffix-icon.vue b/example/src/demo/pc/time-select/suffix-icon.vue new file mode 100644 index 000000000..cd69b7240 --- /dev/null +++ b/example/src/demo/pc/time-select/suffix-icon.vue @@ -0,0 +1,26 @@ + + + diff --git a/example/src/demo/pc/toggle-menu/automatic-filtering.vue b/example/src/demo/pc/toggle-menu/automatic-filtering.vue new file mode 100644 index 000000000..b402ad9ad --- /dev/null +++ b/example/src/demo/pc/toggle-menu/automatic-filtering.vue @@ -0,0 +1,96 @@ + + + diff --git a/example/src/demo/pc/toggle-menu/basic-usage.vue b/example/src/demo/pc/toggle-menu/basic-usage.vue new file mode 100644 index 000000000..4ec041ed9 --- /dev/null +++ b/example/src/demo/pc/toggle-menu/basic-usage.vue @@ -0,0 +1,92 @@ + + + diff --git a/example/src/demo/pc/toggle-menu/custom-icon.vue b/example/src/demo/pc/toggle-menu/custom-icon.vue new file mode 100644 index 000000000..02d82d470 --- /dev/null +++ b/example/src/demo/pc/toggle-menu/custom-icon.vue @@ -0,0 +1,94 @@ + + + diff --git a/example/src/demo/pc/toggle-menu/custom-searchicon.vue b/example/src/demo/pc/toggle-menu/custom-searchicon.vue new file mode 100644 index 000000000..da897ed7c --- /dev/null +++ b/example/src/demo/pc/toggle-menu/custom-searchicon.vue @@ -0,0 +1,97 @@ + + + diff --git a/example/src/demo/pc/toggle-menu/default-expand-all.vue b/example/src/demo/pc/toggle-menu/default-expand-all.vue new file mode 100644 index 000000000..d3b195ad0 --- /dev/null +++ b/example/src/demo/pc/toggle-menu/default-expand-all.vue @@ -0,0 +1,96 @@ + + + diff --git a/example/src/demo/pc/toggle-menu/drag-events.vue b/example/src/demo/pc/toggle-menu/drag-events.vue new file mode 100644 index 000000000..67e8abca5 --- /dev/null +++ b/example/src/demo/pc/toggle-menu/drag-events.vue @@ -0,0 +1,117 @@ + + + diff --git a/example/src/demo/pc/toggle-menu/dragable.vue b/example/src/demo/pc/toggle-menu/dragable.vue new file mode 100644 index 000000000..c6f96e22f --- /dev/null +++ b/example/src/demo/pc/toggle-menu/dragable.vue @@ -0,0 +1,92 @@ + + + diff --git a/example/src/demo/pc/toggle-menu/get-menu-data-sync.vue b/example/src/demo/pc/toggle-menu/get-menu-data-sync.vue new file mode 100644 index 000000000..bb64aa7b4 --- /dev/null +++ b/example/src/demo/pc/toggle-menu/get-menu-data-sync.vue @@ -0,0 +1,97 @@ + + + diff --git a/example/src/demo/pc/toggle-menu/node-click.vue b/example/src/demo/pc/toggle-menu/node-click.vue new file mode 100644 index 000000000..58db2f290 --- /dev/null +++ b/example/src/demo/pc/toggle-menu/node-click.vue @@ -0,0 +1,97 @@ + + + diff --git a/example/src/demo/pc/toggle-menu/node-collapse.vue b/example/src/demo/pc/toggle-menu/node-collapse.vue new file mode 100644 index 000000000..a6c2711d4 --- /dev/null +++ b/example/src/demo/pc/toggle-menu/node-collapse.vue @@ -0,0 +1,100 @@ + + + diff --git a/example/src/demo/pc/toggle-menu/node-drop.vue b/example/src/demo/pc/toggle-menu/node-drop.vue new file mode 100644 index 000000000..1122c5ece --- /dev/null +++ b/example/src/demo/pc/toggle-menu/node-drop.vue @@ -0,0 +1,101 @@ + + + diff --git a/example/src/demo/pc/toggle-menu/node-expand.vue b/example/src/demo/pc/toggle-menu/node-expand.vue new file mode 100644 index 000000000..959b0f792 --- /dev/null +++ b/example/src/demo/pc/toggle-menu/node-expand.vue @@ -0,0 +1,97 @@ + + + diff --git a/example/src/demo/pc/toggle-menu/show-filter.vue b/example/src/demo/pc/toggle-menu/show-filter.vue new file mode 100644 index 000000000..aa4fa77f4 --- /dev/null +++ b/example/src/demo/pc/toggle-menu/show-filter.vue @@ -0,0 +1,97 @@ + + + diff --git a/example/src/demo/pc/toggle-menu/slot-node.vue b/example/src/demo/pc/toggle-menu/slot-node.vue new file mode 100644 index 000000000..4f96eaa80 --- /dev/null +++ b/example/src/demo/pc/toggle-menu/slot-node.vue @@ -0,0 +1,101 @@ + + + diff --git a/example/src/demo/pc/toggle-menu/toggle-props.vue b/example/src/demo/pc/toggle-menu/toggle-props.vue new file mode 100644 index 000000000..9276b93e9 --- /dev/null +++ b/example/src/demo/pc/toggle-menu/toggle-props.vue @@ -0,0 +1,93 @@ + + + diff --git a/example/src/demo/pc/tooltip/basic-usage.vue b/example/src/demo/pc/tooltip/basic-usage.vue new file mode 100644 index 000000000..9f362d281 --- /dev/null +++ b/example/src/demo/pc/tooltip/basic-usage.vue @@ -0,0 +1,155 @@ + + + + + diff --git a/example/src/demo/pc/tooltip/custom-transition.vue b/example/src/demo/pc/tooltip/custom-transition.vue new file mode 100644 index 000000000..115c166c5 --- /dev/null +++ b/example/src/demo/pc/tooltip/custom-transition.vue @@ -0,0 +1,40 @@ + + + + + diff --git a/example/src/demo/pc/tooltip/dynamic-disable.vue b/example/src/demo/pc/tooltip/dynamic-disable.vue new file mode 100644 index 000000000..fe0738a79 --- /dev/null +++ b/example/src/demo/pc/tooltip/dynamic-disable.vue @@ -0,0 +1,30 @@ + + + diff --git a/example/src/demo/pc/tooltip/enterable.vue b/example/src/demo/pc/tooltip/enterable.vue new file mode 100644 index 000000000..b3a0ac7e6 --- /dev/null +++ b/example/src/demo/pc/tooltip/enterable.vue @@ -0,0 +1,26 @@ + + + diff --git a/example/src/demo/pc/tooltip/manual-control-tip.vue b/example/src/demo/pc/tooltip/manual-control-tip.vue new file mode 100644 index 000000000..770c27dc0 --- /dev/null +++ b/example/src/demo/pc/tooltip/manual-control-tip.vue @@ -0,0 +1,30 @@ + + + diff --git a/example/src/demo/pc/tooltip/open-delay.vue b/example/src/demo/pc/tooltip/open-delay.vue new file mode 100644 index 000000000..f72d56c6b --- /dev/null +++ b/example/src/demo/pc/tooltip/open-delay.vue @@ -0,0 +1,23 @@ + + + diff --git a/example/src/demo/pc/tooltip/popper-class.vue b/example/src/demo/pc/tooltip/popper-class.vue new file mode 100644 index 000000000..59237bf7b --- /dev/null +++ b/example/src/demo/pc/tooltip/popper-class.vue @@ -0,0 +1,27 @@ + + + diff --git a/example/src/demo/pc/tooltip/popper-options.vue b/example/src/demo/pc/tooltip/popper-options.vue new file mode 100644 index 000000000..942bbe924 --- /dev/null +++ b/example/src/demo/pc/tooltip/popper-options.vue @@ -0,0 +1,23 @@ + + + diff --git a/example/src/demo/pc/tooltip/tabindex.vue b/example/src/demo/pc/tooltip/tabindex.vue new file mode 100644 index 000000000..ca72cbbd4 --- /dev/null +++ b/example/src/demo/pc/tooltip/tabindex.vue @@ -0,0 +1,15 @@ + + + diff --git a/example/src/demo/pc/tooltip/tooltip-content.vue b/example/src/demo/pc/tooltip/tooltip-content.vue new file mode 100644 index 000000000..3cf69c94a --- /dev/null +++ b/example/src/demo/pc/tooltip/tooltip-content.vue @@ -0,0 +1,23 @@ + + + diff --git a/example/src/demo/pc/tooltip/tooltip-offset.vue b/example/src/demo/pc/tooltip/tooltip-offset.vue new file mode 100644 index 000000000..32e69eca2 --- /dev/null +++ b/example/src/demo/pc/tooltip/tooltip-offset.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/tooltip/tooltip-theme.vue b/example/src/demo/pc/tooltip/tooltip-theme.vue new file mode 100644 index 000000000..b7201448f --- /dev/null +++ b/example/src/demo/pc/tooltip/tooltip-theme.vue @@ -0,0 +1,24 @@ + + + diff --git a/example/src/demo/pc/tooltip/visible-arrow.vue b/example/src/demo/pc/tooltip/visible-arrow.vue new file mode 100644 index 000000000..d94f927bb --- /dev/null +++ b/example/src/demo/pc/tooltip/visible-arrow.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/transfer/basic-usage.vue b/example/src/demo/pc/transfer/basic-usage.vue new file mode 100644 index 000000000..bbe122e8b --- /dev/null +++ b/example/src/demo/pc/transfer/basic-usage.vue @@ -0,0 +1,33 @@ + + + diff --git a/example/src/demo/pc/transfer/checked-format-text.vue b/example/src/demo/pc/transfer/checked-format-text.vue new file mode 100644 index 000000000..990c6702a --- /dev/null +++ b/example/src/demo/pc/transfer/checked-format-text.vue @@ -0,0 +1,40 @@ + + + diff --git a/example/src/demo/pc/transfer/custom-button-texts.vue b/example/src/demo/pc/transfer/custom-button-texts.vue new file mode 100644 index 000000000..0e1ac5d1b --- /dev/null +++ b/example/src/demo/pc/transfer/custom-button-texts.vue @@ -0,0 +1,37 @@ + + + diff --git a/example/src/demo/pc/transfer/custom-data-items.vue b/example/src/demo/pc/transfer/custom-data-items.vue new file mode 100644 index 000000000..0be8bd163 --- /dev/null +++ b/example/src/demo/pc/transfer/custom-data-items.vue @@ -0,0 +1,42 @@ + + + diff --git a/example/src/demo/pc/transfer/custom-filter-method.vue b/example/src/demo/pc/transfer/custom-filter-method.vue new file mode 100644 index 000000000..0a8ff5e14 --- /dev/null +++ b/example/src/demo/pc/transfer/custom-filter-method.vue @@ -0,0 +1,52 @@ + + + diff --git a/example/src/demo/pc/transfer/custom-footer.vue b/example/src/demo/pc/transfer/custom-footer.vue new file mode 100644 index 000000000..c6df7091c --- /dev/null +++ b/example/src/demo/pc/transfer/custom-footer.vue @@ -0,0 +1,47 @@ + + + + + diff --git a/example/src/demo/pc/transfer/custom-render-content.vue b/example/src/demo/pc/transfer/custom-render-content.vue new file mode 100644 index 000000000..e5b24d8d7 --- /dev/null +++ b/example/src/demo/pc/transfer/custom-render-content.vue @@ -0,0 +1,40 @@ + + + diff --git a/example/src/demo/pc/transfer/custom-transfer-titles.vue b/example/src/demo/pc/transfer/custom-transfer-titles.vue new file mode 100644 index 000000000..573b56f69 --- /dev/null +++ b/example/src/demo/pc/transfer/custom-transfer-titles.vue @@ -0,0 +1,37 @@ + + + diff --git a/example/src/demo/pc/transfer/data-source.vue b/example/src/demo/pc/transfer/data-source.vue new file mode 100644 index 000000000..2bdfd323a --- /dev/null +++ b/example/src/demo/pc/transfer/data-source.vue @@ -0,0 +1,38 @@ + + + diff --git a/example/src/demo/pc/transfer/default-checked.vue b/example/src/demo/pc/transfer/default-checked.vue new file mode 100644 index 000000000..f1fa58ce4 --- /dev/null +++ b/example/src/demo/pc/transfer/default-checked.vue @@ -0,0 +1,38 @@ + + + diff --git a/example/src/demo/pc/transfer/drop-config.vue b/example/src/demo/pc/transfer/drop-config.vue new file mode 100644 index 000000000..3cd65317b --- /dev/null +++ b/example/src/demo/pc/transfer/drop-config.vue @@ -0,0 +1,41 @@ + + + diff --git a/example/src/demo/pc/transfer/filter-placeholder.vue b/example/src/demo/pc/transfer/filter-placeholder.vue new file mode 100644 index 000000000..64f4678f5 --- /dev/null +++ b/example/src/demo/pc/transfer/filter-placeholder.vue @@ -0,0 +1,38 @@ + + + diff --git a/example/src/demo/pc/transfer/filterable.vue b/example/src/demo/pc/transfer/filterable.vue new file mode 100644 index 000000000..be86c38f9 --- /dev/null +++ b/example/src/demo/pc/transfer/filterable.vue @@ -0,0 +1,33 @@ + + + diff --git a/example/src/demo/pc/transfer/manual-clear-query.vue b/example/src/demo/pc/transfer/manual-clear-query.vue new file mode 100644 index 000000000..8f5888f31 --- /dev/null +++ b/example/src/demo/pc/transfer/manual-clear-query.vue @@ -0,0 +1,50 @@ + + + diff --git a/example/src/demo/pc/transfer/nested-table.vue b/example/src/demo/pc/transfer/nested-table.vue new file mode 100644 index 000000000..8a4f19955 --- /dev/null +++ b/example/src/demo/pc/transfer/nested-table.vue @@ -0,0 +1,104 @@ + + + diff --git a/example/src/demo/pc/transfer/nested-tree.vue b/example/src/demo/pc/transfer/nested-tree.vue new file mode 100644 index 000000000..4a8b9f0b0 --- /dev/null +++ b/example/src/demo/pc/transfer/nested-tree.vue @@ -0,0 +1,93 @@ + + + diff --git a/example/src/demo/pc/transfer/panel-slot.vue b/example/src/demo/pc/transfer/panel-slot.vue new file mode 100644 index 000000000..66ff074e6 --- /dev/null +++ b/example/src/demo/pc/transfer/panel-slot.vue @@ -0,0 +1,109 @@ + + + + + diff --git a/example/src/demo/pc/transfer/props-of-data-source.vue b/example/src/demo/pc/transfer/props-of-data-source.vue new file mode 100644 index 000000000..edbcaf737 --- /dev/null +++ b/example/src/demo/pc/transfer/props-of-data-source.vue @@ -0,0 +1,37 @@ + + + diff --git a/example/src/demo/pc/transfer/show-all-btn.vue b/example/src/demo/pc/transfer/show-all-btn.vue new file mode 100644 index 000000000..ae33f7922 --- /dev/null +++ b/example/src/demo/pc/transfer/show-all-btn.vue @@ -0,0 +1,33 @@ + + + diff --git a/example/src/demo/pc/transfer/target-order.vue b/example/src/demo/pc/transfer/target-order.vue new file mode 100644 index 000000000..05adf59c2 --- /dev/null +++ b/example/src/demo/pc/transfer/target-order.vue @@ -0,0 +1,37 @@ + + + diff --git a/example/src/demo/pc/transfer/transfer-events.vue b/example/src/demo/pc/transfer/transfer-events.vue new file mode 100644 index 000000000..af6f42275 --- /dev/null +++ b/example/src/demo/pc/transfer/transfer-events.vue @@ -0,0 +1,73 @@ + + + diff --git a/example/src/demo/pc/tree-menu/accordion.vue b/example/src/demo/pc/tree-menu/accordion.vue new file mode 100644 index 000000000..7a4efb654 --- /dev/null +++ b/example/src/demo/pc/tree-menu/accordion.vue @@ -0,0 +1,175 @@ + + + diff --git a/example/src/demo/pc/tree-menu/basic-usage.vue b/example/src/demo/pc/tree-menu/basic-usage.vue new file mode 100644 index 000000000..e246dcbf4 --- /dev/null +++ b/example/src/demo/pc/tree-menu/basic-usage.vue @@ -0,0 +1,16 @@ + + + diff --git a/example/src/demo/pc/tree-menu/can-draggable.vue b/example/src/demo/pc/tree-menu/can-draggable.vue new file mode 100644 index 000000000..e9db9f488 --- /dev/null +++ b/example/src/demo/pc/tree-menu/can-draggable.vue @@ -0,0 +1,175 @@ + + + diff --git a/example/src/demo/pc/tree-menu/check-strictly.vue b/example/src/demo/pc/tree-menu/check-strictly.vue new file mode 100644 index 000000000..f2a0896ca --- /dev/null +++ b/example/src/demo/pc/tree-menu/check-strictly.vue @@ -0,0 +1,123 @@ + + + diff --git a/example/src/demo/pc/tree-menu/data-resource.vue b/example/src/demo/pc/tree-menu/data-resource.vue new file mode 100644 index 000000000..d140f3b86 --- /dev/null +++ b/example/src/demo/pc/tree-menu/data-resource.vue @@ -0,0 +1,123 @@ + + + diff --git a/example/src/demo/pc/tree-menu/default-expand-all.vue b/example/src/demo/pc/tree-menu/default-expand-all.vue new file mode 100644 index 000000000..30162166d --- /dev/null +++ b/example/src/demo/pc/tree-menu/default-expand-all.vue @@ -0,0 +1,176 @@ + + + diff --git a/example/src/demo/pc/tree-menu/default-expanded-keys.vue b/example/src/demo/pc/tree-menu/default-expanded-keys.vue new file mode 100644 index 000000000..135c8a19e --- /dev/null +++ b/example/src/demo/pc/tree-menu/default-expanded-keys.vue @@ -0,0 +1,124 @@ + + + diff --git a/example/src/demo/pc/tree-menu/empty-text.vue b/example/src/demo/pc/tree-menu/empty-text.vue new file mode 100644 index 000000000..03d588035 --- /dev/null +++ b/example/src/demo/pc/tree-menu/empty-text.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/tree-menu/event-allow-draggable.vue b/example/src/demo/pc/tree-menu/event-allow-draggable.vue new file mode 100644 index 000000000..c5630f95e --- /dev/null +++ b/example/src/demo/pc/tree-menu/event-allow-draggable.vue @@ -0,0 +1,183 @@ + + + diff --git a/example/src/demo/pc/tree-menu/event-check-change.vue b/example/src/demo/pc/tree-menu/event-check-change.vue new file mode 100644 index 000000000..6ed425446 --- /dev/null +++ b/example/src/demo/pc/tree-menu/event-check-change.vue @@ -0,0 +1,185 @@ + + + diff --git a/example/src/demo/pc/tree-menu/event-current-change.vue b/example/src/demo/pc/tree-menu/event-current-change.vue new file mode 100644 index 000000000..d58667b79 --- /dev/null +++ b/example/src/demo/pc/tree-menu/event-current-change.vue @@ -0,0 +1,180 @@ + + + diff --git a/example/src/demo/pc/tree-menu/event-node-click.vue b/example/src/demo/pc/tree-menu/event-node-click.vue new file mode 100644 index 000000000..86d64b68a --- /dev/null +++ b/example/src/demo/pc/tree-menu/event-node-click.vue @@ -0,0 +1,180 @@ + + + diff --git a/example/src/demo/pc/tree-menu/event-node-collapse.vue b/example/src/demo/pc/tree-menu/event-node-collapse.vue new file mode 100644 index 000000000..2df03cd51 --- /dev/null +++ b/example/src/demo/pc/tree-menu/event-node-collapse.vue @@ -0,0 +1,180 @@ + + + diff --git a/example/src/demo/pc/tree-menu/event-node-expand.vue b/example/src/demo/pc/tree-menu/event-node-expand.vue new file mode 100644 index 000000000..f2f2e3347 --- /dev/null +++ b/example/src/demo/pc/tree-menu/event-node-expand.vue @@ -0,0 +1,180 @@ + + + diff --git a/example/src/demo/pc/tree-menu/expand-on-click-node.vue b/example/src/demo/pc/tree-menu/expand-on-click-node.vue new file mode 100644 index 000000000..999891977 --- /dev/null +++ b/example/src/demo/pc/tree-menu/expand-on-click-node.vue @@ -0,0 +1,175 @@ + + + diff --git a/example/src/demo/pc/tree-menu/filter-node-method.vue b/example/src/demo/pc/tree-menu/filter-node-method.vue new file mode 100644 index 000000000..1bd7f5300 --- /dev/null +++ b/example/src/demo/pc/tree-menu/filter-node-method.vue @@ -0,0 +1,183 @@ + + + diff --git a/example/src/demo/pc/tree-menu/get-menu-data-sync.vue b/example/src/demo/pc/tree-menu/get-menu-data-sync.vue new file mode 100644 index 000000000..95c048106 --- /dev/null +++ b/example/src/demo/pc/tree-menu/get-menu-data-sync.vue @@ -0,0 +1,128 @@ + + + diff --git a/example/src/demo/pc/tree-menu/lazy-load.vue b/example/src/demo/pc/tree-menu/lazy-load.vue new file mode 100644 index 000000000..04917f795 --- /dev/null +++ b/example/src/demo/pc/tree-menu/lazy-load.vue @@ -0,0 +1,60 @@ + + + diff --git a/example/src/demo/pc/tree-menu/search-icon.vue b/example/src/demo/pc/tree-menu/search-icon.vue new file mode 100644 index 000000000..c6e459f1a --- /dev/null +++ b/example/src/demo/pc/tree-menu/search-icon.vue @@ -0,0 +1,19 @@ + + + diff --git a/example/src/demo/pc/tree-menu/show-checkbox.vue b/example/src/demo/pc/tree-menu/show-checkbox.vue new file mode 100644 index 000000000..156b71b27 --- /dev/null +++ b/example/src/demo/pc/tree-menu/show-checkbox.vue @@ -0,0 +1,176 @@ + + + diff --git a/example/src/demo/pc/tree-menu/text-ellipsis.vue b/example/src/demo/pc/tree-menu/text-ellipsis.vue new file mode 100644 index 000000000..b3919fe35 --- /dev/null +++ b/example/src/demo/pc/tree-menu/text-ellipsis.vue @@ -0,0 +1,177 @@ + + + diff --git a/example/src/demo/pc/tree-menu/text-wrap.vue b/example/src/demo/pc/tree-menu/text-wrap.vue new file mode 100644 index 000000000..098cd4a73 --- /dev/null +++ b/example/src/demo/pc/tree-menu/text-wrap.vue @@ -0,0 +1,175 @@ + + + diff --git a/example/src/demo/pc/tree-menu/tree-menu-indent.vue b/example/src/demo/pc/tree-menu/tree-menu-indent.vue new file mode 100644 index 000000000..ddf905441 --- /dev/null +++ b/example/src/demo/pc/tree-menu/tree-menu-indent.vue @@ -0,0 +1,123 @@ + + + diff --git a/example/src/demo/pc/tree-menu/tree-menu-slot.vue b/example/src/demo/pc/tree-menu/tree-menu-slot.vue new file mode 100644 index 000000000..266110854 --- /dev/null +++ b/example/src/demo/pc/tree-menu/tree-menu-slot.vue @@ -0,0 +1,142 @@ + + + + + diff --git a/example/src/demo/pc/tree/accordion-mode.vue b/example/src/demo/pc/tree/accordion-mode.vue new file mode 100644 index 000000000..3a9a6f847 --- /dev/null +++ b/example/src/demo/pc/tree/accordion-mode.vue @@ -0,0 +1,89 @@ + + + + + diff --git a/example/src/demo/pc/tree/allow-drag.vue b/example/src/demo/pc/tree/allow-drag.vue new file mode 100644 index 000000000..be03c12cc --- /dev/null +++ b/example/src/demo/pc/tree/allow-drag.vue @@ -0,0 +1,78 @@ + + + diff --git a/example/src/demo/pc/tree/allow-drop.vue b/example/src/demo/pc/tree/allow-drop.vue new file mode 100644 index 000000000..5c0f93b34 --- /dev/null +++ b/example/src/demo/pc/tree/allow-drop.vue @@ -0,0 +1,81 @@ + + + diff --git a/example/src/demo/pc/tree/auto-expand-parent.vue b/example/src/demo/pc/tree/auto-expand-parent.vue new file mode 100644 index 000000000..a8307cf05 --- /dev/null +++ b/example/src/demo/pc/tree/auto-expand-parent.vue @@ -0,0 +1,93 @@ + + + diff --git a/example/src/demo/pc/tree/basic-usage.vue b/example/src/demo/pc/tree/basic-usage.vue new file mode 100644 index 000000000..a3cc8cb13 --- /dev/null +++ b/example/src/demo/pc/tree/basic-usage.vue @@ -0,0 +1,87 @@ + + + diff --git a/example/src/demo/pc/tree/check-on-click-node.vue b/example/src/demo/pc/tree/check-on-click-node.vue new file mode 100644 index 000000000..f6c66a207 --- /dev/null +++ b/example/src/demo/pc/tree/check-on-click-node.vue @@ -0,0 +1,118 @@ + + + diff --git a/example/src/demo/pc/tree/check-strictly.vue b/example/src/demo/pc/tree/check-strictly.vue new file mode 100644 index 000000000..0779d87ec --- /dev/null +++ b/example/src/demo/pc/tree/check-strictly.vue @@ -0,0 +1,72 @@ + + + diff --git a/example/src/demo/pc/tree/contextmenu.vue b/example/src/demo/pc/tree/contextmenu.vue new file mode 100644 index 000000000..09091bb7e --- /dev/null +++ b/example/src/demo/pc/tree/contextmenu.vue @@ -0,0 +1,102 @@ + + + diff --git a/example/src/demo/pc/tree/current-node-key.vue b/example/src/demo/pc/tree/current-node-key.vue new file mode 100644 index 000000000..5eb255a46 --- /dev/null +++ b/example/src/demo/pc/tree/current-node-key.vue @@ -0,0 +1,72 @@ + + + diff --git a/example/src/demo/pc/tree/custom-empty-text.vue b/example/src/demo/pc/tree/custom-empty-text.vue new file mode 100644 index 000000000..590cb252c --- /dev/null +++ b/example/src/demo/pc/tree/custom-empty-text.vue @@ -0,0 +1,22 @@ + + + diff --git a/example/src/demo/pc/tree/custom-node-icon.vue b/example/src/demo/pc/tree/custom-node-icon.vue new file mode 100644 index 000000000..9f77bc575 --- /dev/null +++ b/example/src/demo/pc/tree/custom-node-icon.vue @@ -0,0 +1,74 @@ + + + diff --git a/example/src/demo/pc/tree/data-source.vue b/example/src/demo/pc/tree/data-source.vue new file mode 100644 index 000000000..6b351acd4 --- /dev/null +++ b/example/src/demo/pc/tree/data-source.vue @@ -0,0 +1,67 @@ + + + diff --git a/example/src/demo/pc/tree/default-checked-keys.vue b/example/src/demo/pc/tree/default-checked-keys.vue new file mode 100644 index 000000000..56a2eb440 --- /dev/null +++ b/example/src/demo/pc/tree/default-checked-keys.vue @@ -0,0 +1,74 @@ + + + diff --git a/example/src/demo/pc/tree/default-expand-all.vue b/example/src/demo/pc/tree/default-expand-all.vue new file mode 100644 index 000000000..151936a13 --- /dev/null +++ b/example/src/demo/pc/tree/default-expand-all.vue @@ -0,0 +1,67 @@ + + + diff --git a/example/src/demo/pc/tree/default-expanded-keys.vue b/example/src/demo/pc/tree/default-expanded-keys.vue new file mode 100644 index 000000000..f69a98bb0 --- /dev/null +++ b/example/src/demo/pc/tree/default-expanded-keys.vue @@ -0,0 +1,82 @@ + + + diff --git a/example/src/demo/pc/tree/disable-node.vue b/example/src/demo/pc/tree/disable-node.vue new file mode 100644 index 000000000..8709c5b5e --- /dev/null +++ b/example/src/demo/pc/tree/disable-node.vue @@ -0,0 +1,75 @@ + + + diff --git a/example/src/demo/pc/tree/drag-events.vue b/example/src/demo/pc/tree/drag-events.vue new file mode 100644 index 000000000..f4710142e --- /dev/null +++ b/example/src/demo/pc/tree/drag-events.vue @@ -0,0 +1,93 @@ + + + diff --git a/example/src/demo/pc/tree/expand-on-click-node.vue b/example/src/demo/pc/tree/expand-on-click-node.vue new file mode 100644 index 000000000..26c4d7b66 --- /dev/null +++ b/example/src/demo/pc/tree/expand-on-click-node.vue @@ -0,0 +1,67 @@ + + + diff --git a/example/src/demo/pc/tree/filter-node.vue b/example/src/demo/pc/tree/filter-node.vue new file mode 100644 index 000000000..698c7063b --- /dev/null +++ b/example/src/demo/pc/tree/filter-node.vue @@ -0,0 +1,92 @@ + + + diff --git a/example/src/demo/pc/tree/highlight-current.vue b/example/src/demo/pc/tree/highlight-current.vue new file mode 100644 index 000000000..68e04afe1 --- /dev/null +++ b/example/src/demo/pc/tree/highlight-current.vue @@ -0,0 +1,72 @@ + + + diff --git a/example/src/demo/pc/tree/indent.vue b/example/src/demo/pc/tree/indent.vue new file mode 100644 index 000000000..d0a5f13bd --- /dev/null +++ b/example/src/demo/pc/tree/indent.vue @@ -0,0 +1,72 @@ + + + diff --git a/example/src/demo/pc/tree/lazy-load-node.vue b/example/src/demo/pc/tree/lazy-load-node.vue new file mode 100644 index 000000000..764ff7357 --- /dev/null +++ b/example/src/demo/pc/tree/lazy-load-node.vue @@ -0,0 +1,77 @@ + + + diff --git a/example/src/demo/pc/tree/node-contextmenu.vue b/example/src/demo/pc/tree/node-contextmenu.vue new file mode 100644 index 000000000..a9d3a49ee --- /dev/null +++ b/example/src/demo/pc/tree/node-contextmenu.vue @@ -0,0 +1,81 @@ + + + diff --git a/example/src/demo/pc/tree/node-draggable.vue b/example/src/demo/pc/tree/node-draggable.vue new file mode 100644 index 000000000..394e59a75 --- /dev/null +++ b/example/src/demo/pc/tree/node-draggable.vue @@ -0,0 +1,77 @@ + + + diff --git a/example/src/demo/pc/tree/node-events.vue b/example/src/demo/pc/tree/node-events.vue new file mode 100644 index 000000000..a59c28bdf --- /dev/null +++ b/example/src/demo/pc/tree/node-events.vue @@ -0,0 +1,81 @@ + + + diff --git a/example/src/demo/pc/tree/node-key.vue b/example/src/demo/pc/tree/node-key.vue new file mode 100644 index 000000000..5bde601ef --- /dev/null +++ b/example/src/demo/pc/tree/node-key.vue @@ -0,0 +1,146 @@ + + + + + diff --git a/example/src/demo/pc/tree/node-props-config.vue b/example/src/demo/pc/tree/node-props-config.vue new file mode 100644 index 000000000..63bd6ddca --- /dev/null +++ b/example/src/demo/pc/tree/node-props-config.vue @@ -0,0 +1,76 @@ + + + diff --git a/example/src/demo/pc/tree/render-after-expand.vue b/example/src/demo/pc/tree/render-after-expand.vue new file mode 100644 index 000000000..d8fbcd48d --- /dev/null +++ b/example/src/demo/pc/tree/render-after-expand.vue @@ -0,0 +1,88 @@ + + + diff --git a/example/src/demo/pc/tree/render-content.vue b/example/src/demo/pc/tree/render-content.vue new file mode 100644 index 000000000..6a719debc --- /dev/null +++ b/example/src/demo/pc/tree/render-content.vue @@ -0,0 +1,101 @@ + + + diff --git a/example/src/demo/pc/tree/set-tree-icon.vue b/example/src/demo/pc/tree/set-tree-icon.vue new file mode 100644 index 000000000..5933a63cc --- /dev/null +++ b/example/src/demo/pc/tree/set-tree-icon.vue @@ -0,0 +1,86 @@ + + + diff --git a/example/src/demo/pc/tree/show-checkbox.vue b/example/src/demo/pc/tree/show-checkbox.vue new file mode 100644 index 000000000..fe28bf8ae --- /dev/null +++ b/example/src/demo/pc/tree/show-checkbox.vue @@ -0,0 +1,113 @@ + + + diff --git a/example/src/demo/pc/tree/single-select-radio.vue b/example/src/demo/pc/tree/single-select-radio.vue new file mode 100644 index 000000000..4f11ccbad --- /dev/null +++ b/example/src/demo/pc/tree/single-select-radio.vue @@ -0,0 +1,84 @@ + + + diff --git a/example/src/demo/pc/tree/slot-deffault.vue b/example/src/demo/pc/tree/slot-deffault.vue new file mode 100644 index 000000000..feaff5072 --- /dev/null +++ b/example/src/demo/pc/tree/slot-deffault.vue @@ -0,0 +1,82 @@ + + + diff --git a/example/src/demo/pc/user-contact/basic-usage.vue b/example/src/demo/pc/user-contact/basic-usage.vue new file mode 100644 index 000000000..af3f5cb57 --- /dev/null +++ b/example/src/demo/pc/user-contact/basic-usage.vue @@ -0,0 +1,27 @@ + + + diff --git a/example/src/demo/pc/user-contact/data-source.vue b/example/src/demo/pc/user-contact/data-source.vue new file mode 100644 index 000000000..af3f5cb57 --- /dev/null +++ b/example/src/demo/pc/user-contact/data-source.vue @@ -0,0 +1,27 @@ + + + diff --git a/example/src/demo/pc/user-contact/not-displayed-content.vue b/example/src/demo/pc/user-contact/not-displayed-content.vue new file mode 100644 index 000000000..1f9158fc2 --- /dev/null +++ b/example/src/demo/pc/user-contact/not-displayed-content.vue @@ -0,0 +1,27 @@ + + + diff --git a/example/src/demo/pc/user-contact/slots-usercontact.vue b/example/src/demo/pc/user-contact/slots-usercontact.vue new file mode 100644 index 000000000..f99043058 --- /dev/null +++ b/example/src/demo/pc/user-contact/slots-usercontact.vue @@ -0,0 +1,29 @@ + + + diff --git a/example/src/demo/pc/user-head/basic-usage.vue b/example/src/demo/pc/user-head/basic-usage.vue new file mode 100644 index 000000000..95fdff6ae --- /dev/null +++ b/example/src/demo/pc/user-head/basic-usage.vue @@ -0,0 +1,13 @@ + + + diff --git a/example/src/demo/pc/user-head/color.vue b/example/src/demo/pc/user-head/color.vue new file mode 100644 index 000000000..40009ca66 --- /dev/null +++ b/example/src/demo/pc/user-head/color.vue @@ -0,0 +1,27 @@ + + + diff --git a/example/src/demo/pc/user-head/custom-background-color.vue b/example/src/demo/pc/user-head/custom-background-color.vue new file mode 100644 index 000000000..b0597d4cd --- /dev/null +++ b/example/src/demo/pc/user-head/custom-background-color.vue @@ -0,0 +1,16 @@ + + + diff --git a/example/src/demo/pc/user-head/custom-user-head-content.vue b/example/src/demo/pc/user-head/custom-user-head-content.vue new file mode 100644 index 000000000..663219565 --- /dev/null +++ b/example/src/demo/pc/user-head/custom-user-head-content.vue @@ -0,0 +1,39 @@ + + + + + diff --git a/example/src/demo/pc/user-head/icon-user-head.vue b/example/src/demo/pc/user-head/icon-user-head.vue new file mode 100644 index 000000000..0e4342c1e --- /dev/null +++ b/example/src/demo/pc/user-head/icon-user-head.vue @@ -0,0 +1,19 @@ + + + diff --git a/example/src/demo/pc/user-head/image-user-head.vue b/example/src/demo/pc/user-head/image-user-head.vue new file mode 100644 index 000000000..813ee677d --- /dev/null +++ b/example/src/demo/pc/user-head/image-user-head.vue @@ -0,0 +1,18 @@ + + + diff --git a/example/src/demo/pc/user-head/label-user-head.vue b/example/src/demo/pc/user-head/label-user-head.vue new file mode 100644 index 000000000..080047ec8 --- /dev/null +++ b/example/src/demo/pc/user-head/label-user-head.vue @@ -0,0 +1,23 @@ + + + diff --git a/example/src/demo/pc/user-head/message-count-limit.vue b/example/src/demo/pc/user-head/message-count-limit.vue new file mode 100644 index 000000000..7f44f4bd3 --- /dev/null +++ b/example/src/demo/pc/user-head/message-count-limit.vue @@ -0,0 +1,17 @@ + + + diff --git a/example/src/demo/pc/user-head/message-count-total.vue b/example/src/demo/pc/user-head/message-count-total.vue new file mode 100644 index 000000000..f149bff40 --- /dev/null +++ b/example/src/demo/pc/user-head/message-count-total.vue @@ -0,0 +1,13 @@ + + + diff --git a/example/src/demo/pc/user-head/message-count-type.vue b/example/src/demo/pc/user-head/message-count-type.vue new file mode 100644 index 000000000..b8a84e16e --- /dev/null +++ b/example/src/demo/pc/user-head/message-count-type.vue @@ -0,0 +1,17 @@ + + + diff --git a/example/src/demo/pc/user-head/min-user-head.vue b/example/src/demo/pc/user-head/min-user-head.vue new file mode 100644 index 000000000..4c71bf4e3 --- /dev/null +++ b/example/src/demo/pc/user-head/min-user-head.vue @@ -0,0 +1,13 @@ + + + diff --git a/example/src/demo/pc/user-head/render-user-head-in-grid.vue b/example/src/demo/pc/user-head/render-user-head-in-grid.vue new file mode 100644 index 000000000..08a7916a7 --- /dev/null +++ b/example/src/demo/pc/user-head/render-user-head-in-grid.vue @@ -0,0 +1,130 @@ + + + + + diff --git a/example/src/demo/pc/user-head/round-user-head.vue b/example/src/demo/pc/user-head/round-user-head.vue new file mode 100644 index 000000000..44bb06c03 --- /dev/null +++ b/example/src/demo/pc/user-head/round-user-head.vue @@ -0,0 +1,13 @@ + + + diff --git a/example/src/demo/pc/wizard/base-flow.vue b/example/src/demo/pc/wizard/base-flow.vue new file mode 100644 index 000000000..0b8551b9e --- /dev/null +++ b/example/src/demo/pc/wizard/base-flow.vue @@ -0,0 +1,39 @@ + + + diff --git a/example/src/demo/pc/wizard/basic-usage.vue b/example/src/demo/pc/wizard/basic-usage.vue new file mode 100644 index 000000000..0b8551b9e --- /dev/null +++ b/example/src/demo/pc/wizard/basic-usage.vue @@ -0,0 +1,39 @@ + + + diff --git a/example/src/demo/pc/wizard/page-guide.vue b/example/src/demo/pc/wizard/page-guide.vue new file mode 100644 index 000000000..5ba788c02 --- /dev/null +++ b/example/src/demo/pc/wizard/page-guide.vue @@ -0,0 +1,39 @@ + + + diff --git a/example/src/demo/pc/wizard/slot-base.vue b/example/src/demo/pc/wizard/slot-base.vue new file mode 100644 index 000000000..b430d9db6 --- /dev/null +++ b/example/src/demo/pc/wizard/slot-base.vue @@ -0,0 +1,48 @@ + + + diff --git a/example/src/demo/pc/wizard/slot-step-button.vue b/example/src/demo/pc/wizard/slot-step-button.vue new file mode 100644 index 000000000..1fe5aba4f --- /dev/null +++ b/example/src/demo/pc/wizard/slot-step-button.vue @@ -0,0 +1,51 @@ + + + diff --git a/example/src/demo/pc/wizard/status-icon.vue b/example/src/demo/pc/wizard/status-icon.vue new file mode 100644 index 000000000..5fb8a043f --- /dev/null +++ b/example/src/demo/pc/wizard/status-icon.vue @@ -0,0 +1,41 @@ + + + diff --git a/example/src/demo/pc/wizard/time-line-flow.vue b/example/src/demo/pc/wizard/time-line-flow.vue new file mode 100644 index 000000000..f55b6f9aa --- /dev/null +++ b/example/src/demo/pc/wizard/time-line-flow.vue @@ -0,0 +1,61 @@ + + + diff --git a/example/src/demo/pc/wizard/vertical.vue b/example/src/demo/pc/wizard/vertical.vue new file mode 100644 index 000000000..6297bb00a --- /dev/null +++ b/example/src/demo/pc/wizard/vertical.vue @@ -0,0 +1,49 @@ + + + diff --git a/example/src/docs/LICENSE b/example/src/docs/LICENSE new file mode 100644 index 000000000..0a8f88408 --- /dev/null +++ b/example/src/docs/LICENSE @@ -0,0 +1,103 @@ +Creative Commons Attribution 4.0 International Public License + +By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. + +Section 1 – Definitions. + +a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. + +b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. + +c. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. + +d. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. + +e. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. + +f. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. + +g. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. + +h. Licensor means the individual(s) or entity(ies) granting rights under this Public License. + +i. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. + +j. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. + +k. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. + +Section 2 – Scope. + +a. License grant. +1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: + A. reproduce and Share the Licensed Material, in whole or in part; and + B. produce, reproduce, and Share Adapted Material. +2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. +3. Term. The term of this Public License is specified in Section 6(a). +4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. +5. Downstream recipients. +A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. +B. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. +6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). + +b. Other rights. +1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. +2. Patent and trademark rights are not licensed under this Public License. +3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties. + +Section 3 – License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the following conditions. + +a. Attribution. +1. If You Share the Licensed Material (including in modified form), You must: +A. retain the following if it is supplied by the Licensor with the Licensed Material: + i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); + ii. a copyright notice; + iii. a notice that refers to this Public License; + iv. a notice that refers to the disclaimer of warranties; + v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; +B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and +C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. +2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. +3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. +4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License. + +Section 4 – Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: + +a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database; + +b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and +c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. +For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. + +Section 5 – Disclaimer of Warranties and Limitation of Liability. + +a. Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You. +b. To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You. +c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. + +Section 6 – Term and Termination. + +a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. +b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: +1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or +2. upon express reinstatement by the Licensor. +For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. + +c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. +d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. + +Section 7 – Other Terms and Conditions. + +a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. +b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. + +Section 8 – Interpretation. + +a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. +b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. +c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. +d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. diff --git a/example/src/docs/mobile/action-sheet/actionsheet.md b/example/src/docs/mobile/action-sheet/actionsheet.md new file mode 100644 index 000000000..4d3756bf2 --- /dev/null +++ b/example/src/docs/mobile/action-sheet/actionsheet.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## ActionSheet 上滑列表组件 + + +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/mobile/action-sheet/clickitem.md b/example/src/docs/mobile/action-sheet/clickitem.md new file mode 100644 index 000000000..34c2faa75 --- /dev/null +++ b/example/src/docs/mobile/action-sheet/clickitem.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## ActionSheet 上滑列表组件 + + +
+ +### 点击列表事件 + + + +
diff --git a/example/src/docs/mobile/action-sheet/ellipsis.md b/example/src/docs/mobile/action-sheet/ellipsis.md new file mode 100644 index 000000000..2335e5d9d --- /dev/null +++ b/example/src/docs/mobile/action-sheet/ellipsis.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## ActionSheet 上滑列表组件 + + +
+ +### 内容超出显示省略号 + + + +
diff --git a/example/src/docs/mobile/action-sheet/slot.md b/example/src/docs/mobile/action-sheet/slot.md new file mode 100644 index 000000000..0404c5abc --- /dev/null +++ b/example/src/docs/mobile/action-sheet/slot.md @@ -0,0 +1,23 @@ +
+

+ +

+ +## ActionSheet 上滑列表组件 + + +
+ +### 自定义列表项内容 + +通过 `item` 插槽自定义下拉列表内容 + + + +
+ +### 自定义操作项 + +通过 `action` 插槽自定义操作项内容 + + diff --git a/example/src/docs/mobile/alert/custom-close.md b/example/src/docs/mobile/alert/custom-close.md new file mode 100644 index 000000000..1f3536a9e --- /dev/null +++ b/example/src/docs/mobile/alert/custom-close.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Alert 提示 + + +
+ +### 自定义关闭 + + + +
diff --git a/example/src/docs/mobile/alert/icon.md b/example/src/docs/mobile/alert/icon.md new file mode 100644 index 000000000..8f7cb067e --- /dev/null +++ b/example/src/docs/mobile/alert/icon.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Alert 提示 + + +
+ +### 自定义提示图标 + + + +
diff --git a/example/src/docs/mobile/alert/mobilealert.md b/example/src/docs/mobile/alert/mobilealert.md new file mode 100644 index 000000000..c9219395b --- /dev/null +++ b/example/src/docs/mobile/alert/mobilealert.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Alert 提示 + + +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/mobile/alert/size.md b/example/src/docs/mobile/alert/size.md new file mode 100644 index 000000000..83aba6eb5 --- /dev/null +++ b/example/src/docs/mobile/alert/size.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Alert 提示 + + +
+ +### 不同尺寸 + + + +
diff --git a/example/src/docs/mobile/alert/slot-default.md b/example/src/docs/mobile/alert/slot-default.md new file mode 100644 index 000000000..28977a2f4 --- /dev/null +++ b/example/src/docs/mobile/alert/slot-default.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Alert 提示 + + +
+ +### 自定义提示内容 + + + +
diff --git a/example/src/docs/mobile/avatar/avatar-size.md b/example/src/docs/mobile/avatar/avatar-size.md new file mode 100644 index 000000000..36345c3c9 --- /dev/null +++ b/example/src/docs/mobile/avatar/avatar-size.md @@ -0,0 +1,16 @@ +
+

+ +

+ +## Avatar 头像 + + +
+ +### 基本用法 + +`size`可设置为`large,medium,small`,如果不能满足需要,可以设置`size`为`number`类型自定义大小 + + +
diff --git a/example/src/docs/mobile/avatar/avatar-src-set.md b/example/src/docs/mobile/avatar/avatar-src-set.md new file mode 100644 index 000000000..e7534b58e --- /dev/null +++ b/example/src/docs/mobile/avatar/avatar-src-set.md @@ -0,0 +1,22 @@ +
+

+ +

+ +## Avatar 头像 + + +
+ +### 基本用法 + +`src`设置``的展示源,``原生属性 +`srcSet`设置``在不同情况下的图片源的集合,``原生属性 +`icon`设置图标头像 +`fit`设置填充样式,默认为`cover`可选`fill,contain,cover,none,scale-down` +`error`设置`img`标签的`onerror`函数 +`shape`设置形状,默认为`circle`可选`circle,square` + + + +
diff --git a/example/src/docs/mobile/badge/content.md b/example/src/docs/mobile/badge/content.md new file mode 100644 index 000000000..3e31bdfd3 --- /dev/null +++ b/example/src/docs/mobile/badge/content.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Badge 徽章 + + +
+ +### 自定义提示内容 + + + +
diff --git a/example/src/docs/mobile/badge/hidden.md b/example/src/docs/mobile/badge/hidden.md new file mode 100644 index 000000000..e81d189cc --- /dev/null +++ b/example/src/docs/mobile/badge/hidden.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Badge 徽章 + + +
+ +### 隐藏徽标 + + + +
diff --git a/example/src/docs/mobile/badge/href-target.md b/example/src/docs/mobile/badge/href-target.md new file mode 100644 index 000000000..0301e785b --- /dev/null +++ b/example/src/docs/mobile/badge/href-target.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Badge 徽章 + + +
+ +### 跳转链接 + + + +
diff --git a/example/src/docs/mobile/badge/is-dot.md b/example/src/docs/mobile/badge/is-dot.md new file mode 100644 index 000000000..6b81464a4 --- /dev/null +++ b/example/src/docs/mobile/badge/is-dot.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Badge 徽章 + + +
+ +### 小圆点标记 + + + +
diff --git a/example/src/docs/mobile/badge/is-mini.md b/example/src/docs/mobile/badge/is-mini.md new file mode 100644 index 000000000..94ba19d7b --- /dev/null +++ b/example/src/docs/mobile/badge/is-mini.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Badge 徽章 + + +
+ +### 小尺寸 + + + +
diff --git a/example/src/docs/mobile/badge/mobilebadge.md b/example/src/docs/mobile/badge/mobilebadge.md new file mode 100644 index 000000000..fcb09d6a5 --- /dev/null +++ b/example/src/docs/mobile/badge/mobilebadge.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Badge 徽章 + + +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/mobile/badge/type.md b/example/src/docs/mobile/badge/type.md new file mode 100644 index 000000000..9cdcb7b3e --- /dev/null +++ b/example/src/docs/mobile/badge/type.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Badge 徽章 + + +
+ +### 不同主题 + + + +
diff --git a/example/src/docs/mobile/button/event-click.md b/example/src/docs/mobile/button/event-click.md new file mode 100644 index 000000000..7800309c8 --- /dev/null +++ b/example/src/docs/mobile/button/event-click.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Button 按钮 + + +
+ +### 单击事件 + + + +
diff --git a/example/src/docs/mobile/button/icon.md b/example/src/docs/mobile/button/icon.md new file mode 100644 index 000000000..029e3e3d9 --- /dev/null +++ b/example/src/docs/mobile/button/icon.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Button 按钮 + + +
+ +### 图标按钮 + + + +
diff --git a/example/src/docs/mobile/button/loading.md b/example/src/docs/mobile/button/loading.md new file mode 100644 index 000000000..21326b3ff --- /dev/null +++ b/example/src/docs/mobile/button/loading.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Button 按钮 + + +
+ +### 加载中 + + + +
diff --git a/example/src/docs/mobile/button/mobilebutton.md b/example/src/docs/mobile/button/mobilebutton.md new file mode 100644 index 000000000..f9cf590ee --- /dev/null +++ b/example/src/docs/mobile/button/mobilebutton.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Button 按钮 + + +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/mobile/button/native-type.md b/example/src/docs/mobile/button/native-type.md new file mode 100644 index 000000000..74dd8cd69 --- /dev/null +++ b/example/src/docs/mobile/button/native-type.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## Button 按钮 + + + +
+ +### 按钮属性 + +通过 `native-type` 属性可以设置原生 type 属性,该属性的可选值为 button / submit / reset + + + +
diff --git a/example/src/docs/mobile/button/plain.md b/example/src/docs/mobile/button/plain.md new file mode 100644 index 000000000..2949744fc --- /dev/null +++ b/example/src/docs/mobile/button/plain.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Button 按钮 + + +
+ +### 朴素按钮 + + + +
diff --git a/example/src/docs/mobile/button/reset-time.md b/example/src/docs/mobile/button/reset-time.md new file mode 100644 index 000000000..8321f1cfb --- /dev/null +++ b/example/src/docs/mobile/button/reset-time.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## Button 按钮 + + + +
+ +### 按钮禁用时间 + +通过 `reset-time` 属性可以设置按钮禁用时间,防止重复提交,单位毫秒,该属性默认为 1000 + + + +
diff --git a/example/src/docs/mobile/button/round.md b/example/src/docs/mobile/button/round.md new file mode 100644 index 000000000..557a6a19c --- /dev/null +++ b/example/src/docs/mobile/button/round.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Button 按钮 + + +
+ +### 圆角按钮 + + + +
diff --git a/example/src/docs/mobile/button/size.md b/example/src/docs/mobile/button/size.md new file mode 100644 index 000000000..5dddf9f15 --- /dev/null +++ b/example/src/docs/mobile/button/size.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Button 按钮 + + +
+ +### 不同尺寸 + + + +
diff --git a/example/src/docs/mobile/button/text.md b/example/src/docs/mobile/button/text.md new file mode 100644 index 000000000..60d01525a --- /dev/null +++ b/example/src/docs/mobile/button/text.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Button 按钮 + + +
+ +### 文字按钮 + + + +
diff --git a/example/src/docs/mobile/checkbox-group/disabled.md b/example/src/docs/mobile/checkbox-group/disabled.md new file mode 100644 index 000000000..744aba00b --- /dev/null +++ b/example/src/docs/mobile/checkbox-group/disabled.md @@ -0,0 +1,16 @@ +
+

+ +

+ +## CheckboxGroup 复选框组 + + + +
+ +### 是否禁用 + + + +
diff --git a/example/src/docs/mobile/checkbox-group/event-change.md b/example/src/docs/mobile/checkbox-group/event-change.md new file mode 100644 index 000000000..e5ed56193 --- /dev/null +++ b/example/src/docs/mobile/checkbox-group/event-change.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## CheckboxGroup 复选框组 + + +
+ +### 事件 + + + +
diff --git a/example/src/docs/mobile/checkbox-group/min-max.md b/example/src/docs/mobile/checkbox-group/min-max.md new file mode 100644 index 000000000..b7602011d --- /dev/null +++ b/example/src/docs/mobile/checkbox-group/min-max.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## CheckboxGroup 复选框组 + + +
+ +### 可选数量 + + + +
diff --git a/example/src/docs/mobile/checkbox-group/monilecheckboxgroup.md b/example/src/docs/mobile/checkbox-group/monilecheckboxgroup.md new file mode 100644 index 000000000..1bd2fdd5e --- /dev/null +++ b/example/src/docs/mobile/checkbox-group/monilecheckboxgroup.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## CheckboxGroup 复选框组 + + +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/mobile/checkbox-group/vertical.md b/example/src/docs/mobile/checkbox-group/vertical.md new file mode 100644 index 000000000..125ec1fe0 --- /dev/null +++ b/example/src/docs/mobile/checkbox-group/vertical.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## CheckboxGroup 复选框组 + + +
+ +### 垂直排列 + + + +
diff --git a/example/src/docs/mobile/checkbox/default.md b/example/src/docs/mobile/checkbox/default.md new file mode 100644 index 000000000..bc58e8dac --- /dev/null +++ b/example/src/docs/mobile/checkbox/default.md @@ -0,0 +1,16 @@ +
+

+ +

+ +## Checkbox 复选框 + + + +
+ +### 默认插槽 + + + +
diff --git a/example/src/docs/mobile/checkbox/event-change.md b/example/src/docs/mobile/checkbox/event-change.md new file mode 100644 index 000000000..109c5f578 --- /dev/null +++ b/example/src/docs/mobile/checkbox/event-change.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Checkbox 复选框 + + +
+ +### 事件 + + + +
diff --git a/example/src/docs/mobile/checkbox/indeterminate.md b/example/src/docs/mobile/checkbox/indeterminate.md new file mode 100644 index 000000000..d4bc0db18 --- /dev/null +++ b/example/src/docs/mobile/checkbox/indeterminate.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Checkbox 复选框 + + +
+ +### 全选与半选 + + + +
diff --git a/example/src/docs/mobile/checkbox/label.md b/example/src/docs/mobile/checkbox/label.md new file mode 100644 index 000000000..db419e3ad --- /dev/null +++ b/example/src/docs/mobile/checkbox/label.md @@ -0,0 +1,34 @@ +
+

+ +

+ +## Checkbox 复选框 + + + +
+ +### 复选框组选中的值设置 + + + +
+ +### 选中与未选中的值设置 + + + +
+ +### 是否禁用 + + + +
+ +### name 属性 + + + +
diff --git a/example/src/docs/mobile/checkbox/mobilecheckbox.md b/example/src/docs/mobile/checkbox/mobilecheckbox.md new file mode 100644 index 000000000..ee328a7d5 --- /dev/null +++ b/example/src/docs/mobile/checkbox/mobilecheckbox.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Checkbox 复选框 + + +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/mobile/dialog-box/cancel-confirm.md b/example/src/docs/mobile/dialog-box/cancel-confirm.md new file mode 100644 index 000000000..7bf5aa6c0 --- /dev/null +++ b/example/src/docs/mobile/dialog-box/cancel-confirm.md @@ -0,0 +1,16 @@ +
+

+ +

+ +## Dialogbox 对话框 + + + +
+ +### 取消与确认事件的回调 + + + +
diff --git a/example/src/docs/mobile/dialog-box/close-on-click-modal.md b/example/src/docs/mobile/dialog-box/close-on-click-modal.md new file mode 100644 index 000000000..08419370a --- /dev/null +++ b/example/src/docs/mobile/dialog-box/close-on-click-modal.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Dialogbox 对话框 + + +
+ +### 单击遮罩层不关闭 + + + +
diff --git a/example/src/docs/mobile/dialog-box/events-open-close.md b/example/src/docs/mobile/dialog-box/events-open-close.md new file mode 100644 index 000000000..957de446e --- /dev/null +++ b/example/src/docs/mobile/dialog-box/events-open-close.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Dialogbox 对话框 + + +
+ +### 打开与关闭事件 + + + +
diff --git a/example/src/docs/mobile/dialog-box/lock-scroll.md b/example/src/docs/mobile/dialog-box/lock-scroll.md new file mode 100644 index 000000000..8c9a7d242 --- /dev/null +++ b/example/src/docs/mobile/dialog-box/lock-scroll.md @@ -0,0 +1,16 @@ +
+

+ +

+ +## Dialogbox 对话框 + + + +
+ +### 弹出时禁用滚动 + + + +
diff --git a/example/src/docs/mobile/dialog-box/mobiledialogbox.md b/example/src/docs/mobile/dialog-box/mobiledialogbox.md new file mode 100644 index 000000000..e33546eea --- /dev/null +++ b/example/src/docs/mobile/dialog-box/mobiledialogbox.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Dialogbox 对话框 + + +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/mobile/dialog-box/show-header.md b/example/src/docs/mobile/dialog-box/show-header.md new file mode 100644 index 000000000..f2a8d9ca7 --- /dev/null +++ b/example/src/docs/mobile/dialog-box/show-header.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Dialogbox 对话框 + + +
+ +### 不显示标题 + + + +
diff --git a/example/src/docs/mobile/dialog-box/slot-footer.md b/example/src/docs/mobile/dialog-box/slot-footer.md new file mode 100644 index 000000000..a8905aadd --- /dev/null +++ b/example/src/docs/mobile/dialog-box/slot-footer.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Dialogbox 对话框 + + +
+ +### 自定义底部 + + + +
diff --git a/example/src/docs/mobile/dialog-box/slot-title.md b/example/src/docs/mobile/dialog-box/slot-title.md new file mode 100644 index 000000000..1ee42b81a --- /dev/null +++ b/example/src/docs/mobile/dialog-box/slot-title.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Dialogbox 对话框 + + +
+ +### 自定义标题 + + + +
diff --git a/example/src/docs/mobile/dialog-box/with-input.md b/example/src/docs/mobile/dialog-box/with-input.md new file mode 100644 index 000000000..269edc405 --- /dev/null +++ b/example/src/docs/mobile/dialog-box/with-input.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Dialogbox 对话框 + + +
+ +### 输入类提示框 + + + +
diff --git a/example/src/docs/mobile/dropdown-menu/activeColor.md b/example/src/docs/mobile/dropdown-menu/activeColor.md new file mode 100644 index 000000000..c09e9180f --- /dev/null +++ b/example/src/docs/mobile/dropdown-menu/activeColor.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## DropdownMenu 下拉筛选排序 + + +
+ +### 设置选中项颜色 + +`示例样式与组件无关,拷贝 Demo 时无需拷贝样式` + + + +
diff --git a/example/src/docs/mobile/dropdown-menu/closeOnClickOutside.md b/example/src/docs/mobile/dropdown-menu/closeOnClickOutside.md new file mode 100644 index 000000000..07f06d715 --- /dev/null +++ b/example/src/docs/mobile/dropdown-menu/closeOnClickOutside.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## DropdownMenu 下拉筛选排序 + + +
+ +### 点击外部元素关闭弹出菜单 + +`示例样式与组件无关,拷贝 Demo 时无需拷贝样式` + + + +
diff --git a/example/src/docs/mobile/dropdown-menu/closeOnClickOverlay.md b/example/src/docs/mobile/dropdown-menu/closeOnClickOverlay.md new file mode 100644 index 000000000..a4413a27d --- /dev/null +++ b/example/src/docs/mobile/dropdown-menu/closeOnClickOverlay.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## DropdownMenu 下拉筛选排序 + + +
+ +### 点击遮罩层关闭弹出菜单 + +`示例样式与组件无关,拷贝 Demo 时无需拷贝样式` + + + +
diff --git a/example/src/docs/mobile/dropdown-menu/direction.md b/example/src/docs/mobile/dropdown-menu/direction.md new file mode 100644 index 000000000..295f0e9b9 --- /dev/null +++ b/example/src/docs/mobile/dropdown-menu/direction.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## DropdownMenu 下拉筛选排序 + + +
+ +### 弹出菜单位置 + +`示例样式与组件无关,拷贝 Demo 时无需拷贝样式` + + + +
diff --git a/example/src/docs/mobile/dropdown-menu/dropdown-filter.md b/example/src/docs/mobile/dropdown-menu/dropdown-filter.md new file mode 100644 index 000000000..d094125ed --- /dev/null +++ b/example/src/docs/mobile/dropdown-menu/dropdown-filter.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## DropdownMenu 下拉筛选排序 + + +
+ +### 下拉筛选 + +`示例样式与组件无关,拷贝 Demo 时无需拷贝样式` + + + +
diff --git a/example/src/docs/mobile/dropdown-menu/duration.md b/example/src/docs/mobile/dropdown-menu/duration.md new file mode 100644 index 000000000..6bd4e3261 --- /dev/null +++ b/example/src/docs/mobile/dropdown-menu/duration.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## DropdownMenu 下拉筛选排序 + + +
+ +### 弹出菜单动画时长 + +`示例样式与组件无关,拷贝 Demo 时无需拷贝样式` + + + +
diff --git a/example/src/docs/mobile/dropdown-menu/event.md b/example/src/docs/mobile/dropdown-menu/event.md new file mode 100644 index 000000000..1a016fa81 --- /dev/null +++ b/example/src/docs/mobile/dropdown-menu/event.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## DropdownMenu 下拉筛选排序 + + +
+ +### 事件 + +`示例样式与组件无关,拷贝 Demo 时无需拷贝样式` + + + +
diff --git a/example/src/docs/mobile/dropdown-menu/icon.md b/example/src/docs/mobile/dropdown-menu/icon.md new file mode 100644 index 000000000..1ade89f04 --- /dev/null +++ b/example/src/docs/mobile/dropdown-menu/icon.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## DropdownMenu 下拉筛选排序 + + +
+ +### 自定义 icon + +`示例样式与组件无关,拷贝 Demo 时无需拷贝样式` + + + +
diff --git a/example/src/docs/mobile/dropdown-menu/item-disabled.md b/example/src/docs/mobile/dropdown-menu/item-disabled.md new file mode 100644 index 000000000..d96c27d6d --- /dev/null +++ b/example/src/docs/mobile/dropdown-menu/item-disabled.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## DropdownMenu 下拉筛选排序 + + + +
+ +### 是否禁用 + +通过 `disabled` 属性设置是否禁用,默认为 false 。 + + + +
diff --git a/example/src/docs/mobile/dropdown-menu/overlay.md b/example/src/docs/mobile/dropdown-menu/overlay.md new file mode 100644 index 000000000..49859262a --- /dev/null +++ b/example/src/docs/mobile/dropdown-menu/overlay.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## DropdownMenu 下拉筛选排序 + + +
+ +### 遮罩层 + +`示例样式与组件无关,拷贝 Demo 时无需拷贝样式` + + + +
diff --git a/example/src/docs/mobile/dropdown-menu/screen-funnel.md b/example/src/docs/mobile/dropdown-menu/screen-funnel.md new file mode 100644 index 000000000..3e77412b4 --- /dev/null +++ b/example/src/docs/mobile/dropdown-menu/screen-funnel.md @@ -0,0 +1,26 @@ +
+

+ +

+ +## DropdownMenu 下拉筛选排序 + + + +
+ +### 筛选漏斗 + +`示例样式与组件无关,拷贝 Demo 时无需拷贝样式` + + + +
+ +### 标题类名 + +通过 `title-class` 属性设置标题类名 + + + +
diff --git a/example/src/docs/mobile/dropdown-menu/slot.md b/example/src/docs/mobile/dropdown-menu/slot.md new file mode 100644 index 000000000..bc16cca1c --- /dev/null +++ b/example/src/docs/mobile/dropdown-menu/slot.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## DropdownMenu 下拉筛选排序 + + +
+ +### 插槽 + +`示例样式与组件无关,拷贝 Demo 时无需拷贝样式` + + + +
diff --git a/example/src/docs/mobile/dropdown-menu/type.md b/example/src/docs/mobile/dropdown-menu/type.md new file mode 100644 index 000000000..b6617ea0d --- /dev/null +++ b/example/src/docs/mobile/dropdown-menu/type.md @@ -0,0 +1,26 @@ +
+

+ +

+ +## DropdownMenu 下拉筛选排序 + + + +
+ +### 筛选类型 + +`示例样式与组件无关,拷贝 Demo 时无需拷贝样式` + + + +
+ +### 弹出框层级 + +通过 `z-index` 属性设置设置弹出框的在 Index。 + + + +
diff --git a/example/src/docs/mobile/exception/buttonText.md b/example/src/docs/mobile/exception/buttonText.md new file mode 100644 index 000000000..a2f57e748 --- /dev/null +++ b/example/src/docs/mobile/exception/buttonText.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Exception 缺省页 + + +
+ +### 自定义按钮文本 + +`示例样式与组件无关,拷贝 Demo 时无需拷贝样式` + + + +
diff --git a/example/src/docs/mobile/exception/exceptionClass.md b/example/src/docs/mobile/exception/exceptionClass.md new file mode 100644 index 000000000..9e2be8896 --- /dev/null +++ b/example/src/docs/mobile/exception/exceptionClass.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Exception 缺省页 + + +
+ +### 自定义类名 + +`示例样式与组件无关,拷贝 Demo 时无需拷贝样式` + + + +
diff --git a/example/src/docs/mobile/exception/message.md b/example/src/docs/mobile/exception/message.md new file mode 100644 index 000000000..2443be465 --- /dev/null +++ b/example/src/docs/mobile/exception/message.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Exception 缺省页 + + +
+ +### 设置文本内容 + +`示例样式与组件无关,拷贝 Demo 时无需拷贝样式` + + + +
diff --git a/example/src/docs/mobile/exception/subMessage.md b/example/src/docs/mobile/exception/subMessage.md new file mode 100644 index 000000000..f4c365c07 --- /dev/null +++ b/example/src/docs/mobile/exception/subMessage.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Exception 缺省页 + + +
+ +### 设置副文本内容 + +`示例样式与组件无关,拷贝 Demo 时无需拷贝样式` + + + +
diff --git a/example/src/docs/mobile/exception/type.md b/example/src/docs/mobile/exception/type.md new file mode 100644 index 000000000..59cec74cc --- /dev/null +++ b/example/src/docs/mobile/exception/type.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Exception 缺省页 + + +
+ +### 缺省页类型 + +`示例样式与组件无关,拷贝 Demo 时无需拷贝样式` + + + +
diff --git a/example/src/docs/mobile/file-upload/abort-quest.md b/example/src/docs/mobile/file-upload/abort-quest.md new file mode 100644 index 000000000..42c3b6d3d --- /dev/null +++ b/example/src/docs/mobile/file-upload/abort-quest.md @@ -0,0 +1,16 @@ +
+

+ +

+ +## FileUpload 文件上传 + + +
+ +可以设定文件的类型与上传的个数等。可自定义上传服务。 + +### 手动取消上传请求 + +调用组件abort方法,取消上传请求 + diff --git a/example/src/docs/mobile/file-upload/accept-file-type.md b/example/src/docs/mobile/file-upload/accept-file-type.md new file mode 100644 index 000000000..ab6677da7 --- /dev/null +++ b/example/src/docs/mobile/file-upload/accept-file-type.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 可上传的文件类型 + +通过配置 accept(image) 来限制上传文件的格式为 image + + + +通过配置 accept(.doc,.docx) 来限制上传文件的格式为 .doc .docx + +
diff --git a/example/src/docs/mobile/file-upload/basic-usage.md b/example/src/docs/mobile/file-upload/basic-usage.md new file mode 100644 index 000000000..66079870d --- /dev/null +++ b/example/src/docs/mobile/file-upload/basic-usage.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 基本用法 + +属性 action(type:String) 上传服务器地址。 + + +
+ + diff --git a/example/src/docs/mobile/file-upload/clear-files.md b/example/src/docs/mobile/file-upload/clear-files.md new file mode 100644 index 000000000..02ef85517 --- /dev/null +++ b/example/src/docs/mobile/file-upload/clear-files.md @@ -0,0 +1,16 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 手动清空已上传文件列表 + +调用组件clearFiles方法,清空已上传的文件列表(该方法不支持在 before-upload 中调用) + diff --git a/example/src/docs/mobile/file-upload/custom-prefix.md b/example/src/docs/mobile/file-upload/custom-prefix.md new file mode 100644 index 000000000..7230acd0a --- /dev/null +++ b/example/src/docs/mobile/file-upload/custom-prefix.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 钩子函数 + +`before-remove` 删除文件之前的钩子,参数为上传的文件和文件列表,若返回 false 或者返回 Promise 且被 reject,则停止删除。`before-upload` 上传文件之前的钩子,参数为上传的文件,若返回 false 或者返回 Promise 且被 reject,则停止上传。 + + + +
diff --git a/example/src/docs/mobile/file-upload/custom-trigger.md b/example/src/docs/mobile/file-upload/custom-trigger.md new file mode 100644 index 000000000..0f72ead36 --- /dev/null +++ b/example/src/docs/mobile/file-upload/custom-trigger.md @@ -0,0 +1,16 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 自定义触发文件选项框 + +可在组件中写一个名为trigger的插槽,来触发弹出文件选项框 + diff --git a/example/src/docs/mobile/file-upload/custom-upload-request.md b/example/src/docs/mobile/file-upload/custom-upload-request.md new file mode 100644 index 000000000..ac9399ffd --- /dev/null +++ b/example/src/docs/mobile/file-upload/custom-upload-request.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 自定义上传请求 + +通过配置 headers ,设置自定义上传请求头信息 + + + +
diff --git a/example/src/docs/mobile/file-upload/custom-upload-tip.md b/example/src/docs/mobile/file-upload/custom-upload-tip.md new file mode 100644 index 000000000..a435990d6 --- /dev/null +++ b/example/src/docs/mobile/file-upload/custom-upload-tip.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 自定义上传提示 + +可通过 tip 插槽来自定义上传提示 + + diff --git a/example/src/docs/mobile/file-upload/data.md b/example/src/docs/mobile/file-upload/data.md new file mode 100644 index 000000000..b5b20586f --- /dev/null +++ b/example/src/docs/mobile/file-upload/data.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 + +
+ +### 额外参数 + +通过 `data` 属性可以上传时附带的额外参数。 + +通过 `file-title` 属性可以设置头部标题,该属性默认为‘附件’。 + + diff --git a/example/src/docs/mobile/file-upload/drag-select-file.md b/example/src/docs/mobile/file-upload/drag-select-file.md new file mode 100644 index 000000000..29fc566de --- /dev/null +++ b/example/src/docs/mobile/file-upload/drag-select-file.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 拖拽上传 + +可配置drag(type:boolean),来控制组件是否可以拖拽文件 + + +
diff --git a/example/src/docs/mobile/file-upload/drag-upload.md b/example/src/docs/mobile/file-upload/drag-upload.md new file mode 100644 index 000000000..50497deef --- /dev/null +++ b/example/src/docs/mobile/file-upload/drag-upload.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 拖拽上传 + +可配置 `drag(type:boolean)`,来控制组件是否可以拖拽文件上传,如果配置了 `accept` 属性,可通过 `@drop-error` 事件获取不合规的拖拽文件。 + + +
diff --git a/example/src/docs/mobile/file-upload/dynamic-disable.md b/example/src/docs/mobile/file-upload/dynamic-disable.md new file mode 100644 index 000000000..950b96999 --- /dev/null +++ b/example/src/docs/mobile/file-upload/dynamic-disable.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 禁用 + +可配置disabled(type:boolean),来控制组件是否禁用 + + +
diff --git a/example/src/docs/mobile/file-upload/file-picture-card.md b/example/src/docs/mobile/file-upload/file-picture-card.md new file mode 100644 index 000000000..4c323ebfb --- /dev/null +++ b/example/src/docs/mobile/file-upload/file-picture-card.md @@ -0,0 +1,18 @@ + +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 文件缩略图 + + + +
diff --git a/example/src/docs/mobile/file-upload/fileupload.md b/example/src/docs/mobile/file-upload/fileupload.md new file mode 100644 index 000000000..314b09c8e --- /dev/null +++ b/example/src/docs/mobile/file-upload/fileupload.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## FileUpload 提示 + + +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/mobile/file-upload/image-size.md b/example/src/docs/mobile/file-upload/image-size.md new file mode 100644 index 000000000..53309a566 --- /dev/null +++ b/example/src/docs/mobile/file-upload/image-size.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### mini 模式 + +
+ +获取上传的片的原始尺寸 + + + +
diff --git a/example/src/docs/mobile/file-upload/manual-upload.md b/example/src/docs/mobile/file-upload/manual-upload.md new file mode 100644 index 000000000..300091b58 --- /dev/null +++ b/example/src/docs/mobile/file-upload/manual-upload.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 手动上传 + +通过 action 配置上传地址,通过 submit 设置手动上传 + + + +
diff --git a/example/src/docs/mobile/file-upload/max-file-count.md b/example/src/docs/mobile/file-upload/max-file-count.md new file mode 100644 index 000000000..f387c9c3a --- /dev/null +++ b/example/src/docs/mobile/file-upload/max-file-count.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 最大上传文件数 + +
+ +可通过配置limit(type:Number,大于0的整数)来限制上传文件的个数 + + +
diff --git a/example/src/docs/mobile/file-upload/mini-mode.md b/example/src/docs/mobile/file-upload/mini-mode.md new file mode 100644 index 000000000..9405b25c1 --- /dev/null +++ b/example/src/docs/mobile/file-upload/mini-mode.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### mini 模式 + +
+ +可通过配置 mini-mode,设置显示 mini 模式 + + + +
diff --git a/example/src/docs/mobile/file-upload/multiple-file.md b/example/src/docs/mobile/file-upload/multiple-file.md new file mode 100644 index 000000000..99bd0f4fe --- /dev/null +++ b/example/src/docs/mobile/file-upload/multiple-file.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 文件多选 + +文件选择默认单选 +可配置multiple = 'true' 实现文件多选 + + +
diff --git a/example/src/docs/mobile/file-upload/only-exist-mobile.md b/example/src/docs/mobile/file-upload/only-exist-mobile.md new file mode 100644 index 000000000..01d043221 --- /dev/null +++ b/example/src/docs/mobile/file-upload/only-exist-mobile.md @@ -0,0 +1,29 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 配置文件上传显示的图标路径 + + + +
+ +### 设置头部标题 + + + +
+ +### 是否显示头部 + + + +
diff --git a/example/src/docs/mobile/file-upload/picture-card.md b/example/src/docs/mobile/file-upload/picture-card.md new file mode 100644 index 000000000..1f12b69ad --- /dev/null +++ b/example/src/docs/mobile/file-upload/picture-card.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 照片墙 + +可配置list-type = 'picture-card'开启照片墙模式 + + +
diff --git a/example/src/docs/mobile/file-upload/picture-list.md b/example/src/docs/mobile/file-upload/picture-list.md new file mode 100644 index 000000000..8d037c9ca --- /dev/null +++ b/example/src/docs/mobile/file-upload/picture-list.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 图片列表缩略图 + +
+ +可通过配置list-type="picture",来实现图片列表缩略图显示 + + +
diff --git a/example/src/docs/mobile/file-upload/prevent-delete-file.md b/example/src/docs/mobile/file-upload/prevent-delete-file.md new file mode 100644 index 000000000..55a8bbbd6 --- /dev/null +++ b/example/src/docs/mobile/file-upload/prevent-delete-file.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 阻止删除文件 + +:before-remove(移除文件前回调事件),方法里面return true/false,表示是否可以删除 + + +
diff --git a/example/src/docs/mobile/file-upload/prevent-upload-file.md b/example/src/docs/mobile/file-upload/prevent-upload-file.md new file mode 100644 index 000000000..cbd12dc6b --- /dev/null +++ b/example/src/docs/mobile/file-upload/prevent-upload-file.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 阻止上传文件 + +before-upload(上传前回调事件),方法里面 return true/false,表示是否可以进行上传文件 + + + +
diff --git a/example/src/docs/mobile/file-upload/size.md b/example/src/docs/mobile/file-upload/size.md new file mode 100644 index 000000000..43195f4c7 --- /dev/null +++ b/example/src/docs/mobile/file-upload/size.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 设置组件大小 + +可选值为`medium`,`small`,`mini` + + + +
diff --git a/example/src/docs/mobile/file-upload/upload-events.md b/example/src/docs/mobile/file-upload/upload-events.md new file mode 100644 index 000000000..2d480b5b6 --- /dev/null +++ b/example/src/docs/mobile/file-upload/upload-events.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 事件 + +`preview` 点击文件列表中已上传的文件时触发的事件。 +`remove` 文件列表移除文件时触发的事件。 +`error` 文件上传失败时触发的事件。 +`exceed` 文件超出个数限制时触发的事件。 +`progress` 文件上传时触发的事件。 +`change` 文件状态改变时触发的事件,添加文件、上传成功和上传失败时都会被触发。 +`success` 文件上传成功时触发的事件。 + + + +
diff --git a/example/src/docs/mobile/file-upload/upload-file-filters.md b/example/src/docs/mobile/file-upload/upload-file-filters.md new file mode 100644 index 000000000..f3eff37ef --- /dev/null +++ b/example/src/docs/mobile/file-upload/upload-file-filters.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 基本用法 + + + +
diff --git a/example/src/docs/mobile/file-upload/upload-file-list.md b/example/src/docs/mobile/file-upload/upload-file-list.md new file mode 100644 index 000000000..c20f4ebfb --- /dev/null +++ b/example/src/docs/mobile/file-upload/upload-file-list.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 上传的文件列表 + +可配置:file-list(type:Object)来显示已上传的文件名和地址 + + + +
diff --git a/example/src/docs/mobile/file-upload/upload-limit.md b/example/src/docs/mobile/file-upload/upload-limit.md new file mode 100644 index 000000000..919559654 --- /dev/null +++ b/example/src/docs/mobile/file-upload/upload-limit.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 最大上传限制 + +可配置:before-upload(上传前事件回调),对文件类型和大小做限制 + + +
diff --git a/example/src/docs/mobile/file-upload/upload-request.md b/example/src/docs/mobile/file-upload/upload-request.md new file mode 100644 index 000000000..52bc95d17 --- /dev/null +++ b/example/src/docs/mobile/file-upload/upload-request.md @@ -0,0 +1,27 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 上传请求 + +可通过配置 action 为上传地址,可通过配置 headers 为头部请求信息 + + + +
+ +### 覆盖默认请求 + +通过配置 http-request ,覆盖默认的上传行为,可以自定义上传的实现 + + + +
diff --git a/example/src/docs/mobile/file-upload/upload-user-head.md b/example/src/docs/mobile/file-upload/upload-user-head.md new file mode 100644 index 000000000..8463eac21 --- /dev/null +++ b/example/src/docs/mobile/file-upload/upload-user-head.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 用户头像上传 + + diff --git a/example/src/docs/mobile/file-upload/with-credentials.md b/example/src/docs/mobile/file-upload/with-credentials.md new file mode 100644 index 000000000..2afc3ce2e --- /dev/null +++ b/example/src/docs/mobile/file-upload/with-credentials.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 支持发送 cookie 凭证信息 + +可通过配置:with-credentials = 'true' 开启访问服务器携带 cookie,默认为 false 。 + + + +
diff --git a/example/src/docs/mobile/form/base.md b/example/src/docs/mobile/form/base.md new file mode 100644 index 000000000..99e808262 --- /dev/null +++ b/example/src/docs/mobile/form/base.md @@ -0,0 +1,16 @@ +
+

+ +

+ +## Form 表单 + + +
+ +### 基本功能 + + + +
+ diff --git a/example/src/docs/mobile/form/form-select.md b/example/src/docs/mobile/form/form-select.md new file mode 100644 index 000000000..58b9253bd --- /dev/null +++ b/example/src/docs/mobile/form/form-select.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Form 表单 + + +
+ +### 表单(纯展示) + + + +
diff --git a/example/src/docs/mobile/form/form-tabselect.md b/example/src/docs/mobile/form/form-tabselect.md new file mode 100644 index 000000000..513237163 --- /dev/null +++ b/example/src/docs/mobile/form/form-tabselect.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Form 表单 + + +
+ +### 表单(纯展示) + + + +
diff --git a/example/src/docs/mobile/form/form-writeone.md b/example/src/docs/mobile/form/form-writeone.md new file mode 100644 index 000000000..0bf7ae874 --- /dev/null +++ b/example/src/docs/mobile/form/form-writeone.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Form 表单 + + +
+ +### 表单(纯展示) + + + +
diff --git a/example/src/docs/mobile/form/form-writetwo.md b/example/src/docs/mobile/form/form-writetwo.md new file mode 100644 index 000000000..c7cdce870 --- /dev/null +++ b/example/src/docs/mobile/form/form-writetwo.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Form 表单 + + +
+ +### 表单(纯展示) + + + +
diff --git a/example/src/docs/mobile/form/hide-required-asterisk.md b/example/src/docs/mobile/form/hide-required-asterisk.md new file mode 100644 index 000000000..6b6f13757 --- /dev/null +++ b/example/src/docs/mobile/form/hide-required-asterisk.md @@ -0,0 +1,16 @@ +
+

+ +

+ +## Form 表单 + + + +
+ +### 是否显示红色星号 + + + +
diff --git a/example/src/docs/mobile/form/label-width.md b/example/src/docs/mobile/form/label-width.md new file mode 100644 index 000000000..7e1ed565f --- /dev/null +++ b/example/src/docs/mobile/form/label-width.md @@ -0,0 +1,22 @@ +
+

+ +

+ +## Form 表单 + + +
+ +### 自定义标签的宽度 + + + +
+ +### 自定义标签后缀 + +通过 `label-suffix` 自定义标签后缀 + + +
diff --git a/example/src/docs/mobile/form/only-read.md b/example/src/docs/mobile/form/only-read.md new file mode 100644 index 000000000..d9f274cdd --- /dev/null +++ b/example/src/docs/mobile/form/only-read.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Form 表单 + + +
+ +### 表单(纯展示) + + + +
diff --git a/example/src/docs/mobile/form/validate-position.md b/example/src/docs/mobile/form/validate-position.md new file mode 100644 index 000000000..8a579083f --- /dev/null +++ b/example/src/docs/mobile/form/validate-position.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Form 表单 + + +
+ +### 校验提示信息的位置 + +`validate-position`默认值为`right` + + + +
diff --git a/example/src/docs/mobile/form/validate.md b/example/src/docs/mobile/form/validate.md new file mode 100644 index 000000000..7c50a3b8b --- /dev/null +++ b/example/src/docs/mobile/form/validate.md @@ -0,0 +1,14 @@ +
+

+ +

+ +## Form 表单 + + +
+ +### 表单校验 + + + diff --git a/example/src/docs/mobile/icon/icon-set.md b/example/src/docs/mobile/icon/icon-set.md new file mode 100644 index 000000000..0d366d98c --- /dev/null +++ b/example/src/docs/mobile/icon/icon-set.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Icon 图标 + + +
+ +### 基本用法 + + + +
diff --git a/example/src/docs/mobile/image-viewer/events-change-close.md b/example/src/docs/mobile/image-viewer/events-change-close.md new file mode 100644 index 000000000..05ececcc3 --- /dev/null +++ b/example/src/docs/mobile/image-viewer/events-change-close.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## ImageViewer 图片预览 + + +
+ +### 切换与关闭事件 + + + +
diff --git a/example/src/docs/mobile/image-viewer/image-full-current.md b/example/src/docs/mobile/image-viewer/image-full-current.md new file mode 100644 index 000000000..59fb6a442 --- /dev/null +++ b/example/src/docs/mobile/image-viewer/image-full-current.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## ImageViewer 图片预览 + + +
+ +### 全屏显示 + + + +
diff --git a/example/src/docs/mobile/image-viewer/mobileimageviewer.md b/example/src/docs/mobile/image-viewer/mobileimageviewer.md new file mode 100644 index 000000000..2834c1fa6 --- /dev/null +++ b/example/src/docs/mobile/image-viewer/mobileimageviewer.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## ImageViewer 图片预览 + + +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/mobile/image-viewer/slot-index.md b/example/src/docs/mobile/image-viewer/slot-index.md new file mode 100644 index 000000000..f41669945 --- /dev/null +++ b/example/src/docs/mobile/image-viewer/slot-index.md @@ -0,0 +1,22 @@ +
+

+ +

+ +## ImageViewer 图片预览 + + + +
+ +### 自定义下标 + + + +
+ +### 自定义 z-index + + + +
diff --git a/example/src/docs/mobile/image-viewer/start-position.md b/example/src/docs/mobile/image-viewer/start-position.md new file mode 100644 index 000000000..961dc5e27 --- /dev/null +++ b/example/src/docs/mobile/image-viewer/start-position.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## ImageViewer 图片预览 + + +
+ +### 初始起始位置 + + + +
diff --git a/example/src/docs/mobile/input/autofocus.md b/example/src/docs/mobile/input/autofocus.md new file mode 100644 index 000000000..23bb9148d --- /dev/null +++ b/example/src/docs/mobile/input/autofocus.md @@ -0,0 +1,16 @@ +
+

+ +

+ +## Input 输入框 + + + +
+ +### 自动获取焦点 + + + +
diff --git a/example/src/docs/mobile/input/autosize.md b/example/src/docs/mobile/input/autosize.md new file mode 100644 index 000000000..537a3c77a --- /dev/null +++ b/example/src/docs/mobile/input/autosize.md @@ -0,0 +1,24 @@ +
+

+ +

+ +## Input 输入框 + + + +
+ +### 自适应内容高度 + + + +
+ +### 自定义标题 + +通过 `textarea-title` 属性设置 textarea 类型自定义标题,该属性默认为‘标题’。 + + + +
diff --git a/example/src/docs/mobile/input/blur-focus.md b/example/src/docs/mobile/input/blur-focus.md new file mode 100644 index 000000000..001ffc6b9 --- /dev/null +++ b/example/src/docs/mobile/input/blur-focus.md @@ -0,0 +1,16 @@ +
+

+ +

+ +## Input 输入框 + + + +
+ +### 获取/失去焦点 + + + +
diff --git a/example/src/docs/mobile/input/clearable.md b/example/src/docs/mobile/input/clearable.md new file mode 100644 index 000000000..44fddaa6b --- /dev/null +++ b/example/src/docs/mobile/input/clearable.md @@ -0,0 +1,38 @@ +
+

+ +

+ +## Input 输入框 + + + +
+ +### 可清空 + + + +
+ +### form + + + +
+ +### 输入框可下拉选择 + +通过 `is-select` 属性可以设置输入框可下拉选择,type 为 form 时。 + + + +
+ +### 输入框下拉选择项 + +通过 `select-menu` 属性可以设置输入框可下拉选择,设置选择项,type 为 form 时。 + + + +
diff --git a/example/src/docs/mobile/input/counter.md b/example/src/docs/mobile/input/counter.md new file mode 100644 index 000000000..9fb004314 --- /dev/null +++ b/example/src/docs/mobile/input/counter.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Input 输入框 + + +
+ +### 计数与输入统计 + + + +
diff --git a/example/src/docs/mobile/input/events.md b/example/src/docs/mobile/input/events.md new file mode 100644 index 000000000..ac4cc722c --- /dev/null +++ b/example/src/docs/mobile/input/events.md @@ -0,0 +1,22 @@ +
+

+ +

+ +## Input 输入框 + + + +
+ +### 事件 + + + +
+ +### blur / focus / input 事件 + + + +
diff --git a/example/src/docs/mobile/input/max-min-length.md b/example/src/docs/mobile/input/max-min-length.md new file mode 100644 index 000000000..71b60c560 --- /dev/null +++ b/example/src/docs/mobile/input/max-min-length.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Input 输入框 + + +
+ +### 输入长度限制 + + + +
diff --git a/example/src/docs/mobile/input/method-select.md b/example/src/docs/mobile/input/method-select.md new file mode 100644 index 000000000..9b9e2eb15 --- /dev/null +++ b/example/src/docs/mobile/input/method-select.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Input 输入框 + + +
+ +### 选中输入框文本 + + + +
diff --git a/example/src/docs/mobile/input/mobileinput.md b/example/src/docs/mobile/input/mobileinput.md new file mode 100644 index 000000000..ff5d3410c --- /dev/null +++ b/example/src/docs/mobile/input/mobileinput.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Input 输入框 + + +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/mobile/input/props.md b/example/src/docs/mobile/input/props.md new file mode 100644 index 000000000..deac3d36a --- /dev/null +++ b/example/src/docs/mobile/input/props.md @@ -0,0 +1,36 @@ +
+

+ +

+ +## Input 输入框 + + + +
+ +### 原生属性 + + + +
+ +### 步长 + +通过 `step` 设置步长,需要结合 type="number" 一起使用 + + + +
+ +### 是否只读 + + + +
+ +### 宽度和高度 + + + +
diff --git a/example/src/docs/mobile/input/show-password.md b/example/src/docs/mobile/input/show-password.md new file mode 100644 index 000000000..6871d6380 --- /dev/null +++ b/example/src/docs/mobile/input/show-password.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Input 输入框 + + +
+ +### 密码框 + + + +
diff --git a/example/src/docs/mobile/input/slot-content.md b/example/src/docs/mobile/input/slot-content.md new file mode 100644 index 000000000..3f990ce45 --- /dev/null +++ b/example/src/docs/mobile/input/slot-content.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Input 输入框 + + +
+ +### 插槽 + +通过 `content` 自定义头部内容,只对 type=‘textarea‘有效 + + + +
diff --git a/example/src/docs/mobile/input/slots-append-prepend.md b/example/src/docs/mobile/input/slots-append-prepend.md new file mode 100644 index 000000000..017d1ff0f --- /dev/null +++ b/example/src/docs/mobile/input/slots-append-prepend.md @@ -0,0 +1,22 @@ +
+

+ +

+ +## Input 输入框 + + + +
+ +### 复合型输入框 + + + +
+ +### 复合型输入框 + + + +
diff --git a/example/src/docs/mobile/input/suffix-icon.md b/example/src/docs/mobile/input/suffix-icon.md new file mode 100644 index 000000000..2233e559a --- /dev/null +++ b/example/src/docs/mobile/input/suffix-icon.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Input 输入框 + + +
+ +### 自定义后置图标 + + + +
diff --git a/example/src/docs/mobile/input/type-be-form-tips.md b/example/src/docs/mobile/input/type-be-form-tips.md new file mode 100644 index 000000000..8ad8e55a2 --- /dev/null +++ b/example/src/docs/mobile/input/type-be-form-tips.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Input 输入框 + + +
+ +### 类型type为form时的输入框下的提示 + + + +
diff --git a/example/src/docs/mobile/input/type-be-form.md b/example/src/docs/mobile/input/type-be-form.md new file mode 100644 index 000000000..64e346f9d --- /dev/null +++ b/example/src/docs/mobile/input/type-be-form.md @@ -0,0 +1,22 @@ +
+

+ +

+ +## Input 输入框 + + +
+ +### 类型 type 为 form 时的基本用法 + + + +
+ +### 类型 type 为 form 时的下拉用法 + +`is-select`与`select-menu`搭配让 `type`为`form`的输入框变为下拉 + + +
diff --git a/example/src/docs/mobile/input/validate-event.md b/example/src/docs/mobile/input/validate-event.md new file mode 100644 index 000000000..8ddad3f9c --- /dev/null +++ b/example/src/docs/mobile/input/validate-event.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## Input 输入框 + + + +
+ +### 表单校正 + +通过 `validate-event` 属性设置输入时是否触发表单的校验,该属性默认为 true。 + + + +
diff --git a/example/src/docs/mobile/list/doublelist.md b/example/src/docs/mobile/list/doublelist.md new file mode 100644 index 000000000..58a2a6b01 --- /dev/null +++ b/example/src/docs/mobile/list/doublelist.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## List 列表 + + +
+ +### 双行列表 + + + +
diff --git a/example/src/docs/mobile/list/imformationlist.md b/example/src/docs/mobile/list/imformationlist.md new file mode 100644 index 000000000..dae2c181b --- /dev/null +++ b/example/src/docs/mobile/list/imformationlist.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## List 列表 + + +
+ +### 资讯类列表 + + + +
diff --git a/example/src/docs/mobile/list/mobilelist.md b/example/src/docs/mobile/list/mobilelist.md new file mode 100644 index 000000000..73d82e7d9 --- /dev/null +++ b/example/src/docs/mobile/list/mobilelist.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## List 列表 + + +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/mobile/list/single-line.md b/example/src/docs/mobile/list/single-line.md new file mode 100644 index 000000000..643a7ad60 --- /dev/null +++ b/example/src/docs/mobile/list/single-line.md @@ -0,0 +1,16 @@ + +
+

+ +

+ +## List 列表 + + +
+ +### 单行 + + + +
diff --git a/example/src/docs/mobile/list/slots.md b/example/src/docs/mobile/list/slots.md new file mode 100644 index 000000000..e94e73ce8 --- /dev/null +++ b/example/src/docs/mobile/list/slots.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## List 列表 + + +
+ +### 自定义列表内容 + + + +
diff --git a/example/src/docs/mobile/mini-picker/cancel-button-text.md b/example/src/docs/mobile/mini-picker/cancel-button-text.md new file mode 100644 index 000000000..32372ec61 --- /dev/null +++ b/example/src/docs/mobile/mini-picker/cancel-button-text.md @@ -0,0 +1,16 @@ +
+

+ +

+ +## MiniPicker 选择器组件 + + + +
+ +### 取消按钮内容 + + + +
diff --git a/example/src/docs/mobile/mini-picker/cancel.md b/example/src/docs/mobile/mini-picker/cancel.md new file mode 100644 index 000000000..597ae736e --- /dev/null +++ b/example/src/docs/mobile/mini-picker/cancel.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## MiniPicker 选择器组件 + + + +
+ +### 事件 + +`MiniPicker` 选择器的事件 `cancel` 。 + + + +
diff --git a/example/src/docs/mobile/mini-picker/cascad.md b/example/src/docs/mobile/mini-picker/cascad.md new file mode 100644 index 000000000..e3ab1c12c --- /dev/null +++ b/example/src/docs/mobile/mini-picker/cascad.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## MiniPicker 选择器组件 + + +
+ +### 级联选择 + + + +
diff --git a/example/src/docs/mobile/mini-picker/change.md b/example/src/docs/mobile/mini-picker/change.md new file mode 100644 index 000000000..e1f2e54d8 --- /dev/null +++ b/example/src/docs/mobile/mini-picker/change.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## MiniPicker 选择器组件示 + + +
+ +### change 事件 + + + +
diff --git a/example/src/docs/mobile/mini-picker/defaultindex.md b/example/src/docs/mobile/mini-picker/defaultindex.md new file mode 100644 index 000000000..4f5b4844b --- /dev/null +++ b/example/src/docs/mobile/mini-picker/defaultindex.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## MiniPicker 选择器组件 + + +
+ +### 初始值索引 + + + +
diff --git a/example/src/docs/mobile/mini-picker/itemheight.md b/example/src/docs/mobile/mini-picker/itemheight.md new file mode 100644 index 000000000..c1265dc92 --- /dev/null +++ b/example/src/docs/mobile/mini-picker/itemheight.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## MiniPicker 选择器组件 + + +
+ +### 选项高度 + + + +
diff --git a/example/src/docs/mobile/mini-picker/methods.md b/example/src/docs/mobile/mini-picker/methods.md new file mode 100644 index 000000000..f1e9718a8 --- /dev/null +++ b/example/src/docs/mobile/mini-picker/methods.md @@ -0,0 +1,28 @@ +
+

+ +

+ +## MiniPicker 选择器组件 + + + +
+ +### 获取所有选中列的值与对应索引 + + + +
+ +### 方法 + +`MiniPicker` 的 `getColumnIndex` 获取对应列选中项的索引。 + +`getColumnValue` 获取对应列选中的值。 + +`getColumnValues` 获取对应列中所有选项 + + + +
diff --git a/example/src/docs/mobile/mini-picker/minipicker.md b/example/src/docs/mobile/mini-picker/minipicker.md new file mode 100644 index 000000000..8136611d7 --- /dev/null +++ b/example/src/docs/mobile/mini-picker/minipicker.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## MiniPicker 选择器组件 + + +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/mobile/mini-picker/multicolumn.md b/example/src/docs/mobile/mini-picker/multicolumn.md new file mode 100644 index 000000000..36fefd0d6 --- /dev/null +++ b/example/src/docs/mobile/mini-picker/multicolumn.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## MiniPicker 选择器组件 + + +
+ +### 多列选择 + + + +
diff --git a/example/src/docs/mobile/mini-picker/toolbar.md b/example/src/docs/mobile/mini-picker/toolbar.md new file mode 100644 index 000000000..b55d4712b --- /dev/null +++ b/example/src/docs/mobile/mini-picker/toolbar.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## MiniPicker 选择器组件 + + +
+ +### toolbar 插槽 + + + +
diff --git a/example/src/docs/mobile/mini-picker/visibleitemcount.md b/example/src/docs/mobile/mini-picker/visibleitemcount.md new file mode 100644 index 000000000..14bfb042e --- /dev/null +++ b/example/src/docs/mobile/mini-picker/visibleitemcount.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## MiniPicker 选择器组件 + + +
+ +### 可见选项个数 + + + +
diff --git a/example/src/docs/mobile/mobileavatar.md b/example/src/docs/mobile/mobileavatar.md new file mode 100644 index 000000000..af0d93f7e --- /dev/null +++ b/example/src/docs/mobile/mobileavatar.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Avatar 头像 + + +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/mobile/mobiledropdownmenu.md b/example/src/docs/mobile/mobiledropdownmenu.md new file mode 100644 index 000000000..74badeeb7 --- /dev/null +++ b/example/src/docs/mobile/mobiledropdownmenu.md @@ -0,0 +1,22 @@ +
+

+ +

+ +## DropdownMenu 下拉筛选排序 + + + +
+ +### 基本用法 + + + +
+ + + +### DropdownItem Props + + diff --git a/example/src/docs/mobile/mobileexception.md b/example/src/docs/mobile/mobileexception.md new file mode 100644 index 000000000..6f7d77ea9 --- /dev/null +++ b/example/src/docs/mobile/mobileexception.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Exception 缺省页 + + +
+ +### 基本用法 + +`示例样式与组件无关,拷贝 Demo 时无需拷贝样式` + + + +
+ + diff --git a/example/src/docs/mobile/mobileicon.md b/example/src/docs/mobile/mobileicon.md new file mode 100644 index 000000000..0b55f512e --- /dev/null +++ b/example/src/docs/mobile/mobileicon.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Icon 图标 + + +
+ +### 基本用法 + +`点击图标复制图标文本` + +### 图标合集 + + + +
+ + diff --git a/example/src/docs/mobile/mobiletabs.md b/example/src/docs/mobile/mobiletabs.md new file mode 100644 index 000000000..128fbd82c --- /dev/null +++ b/example/src/docs/mobile/mobiletabs.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Tabs 选项卡 + + +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/mobile/mobiletimeline.md b/example/src/docs/mobile/mobiletimeline.md new file mode 100644 index 000000000..58d8ca89e --- /dev/null +++ b/example/src/docs/mobile/mobiletimeline.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## TimeLine 时间轴 + + +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/mobile/nav-bar/left-right-arrow.md b/example/src/docs/mobile/nav-bar/left-right-arrow.md new file mode 100644 index 000000000..e9b66c4d1 --- /dev/null +++ b/example/src/docs/mobile/nav-bar/left-right-arrow.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## NavBar 导航栏 + + +
+ +### 显示左右箭头 + + + +
diff --git a/example/src/docs/mobile/nav-bar/left-right-text.md b/example/src/docs/mobile/nav-bar/left-right-text.md new file mode 100644 index 000000000..edf1ac62c --- /dev/null +++ b/example/src/docs/mobile/nav-bar/left-right-text.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## NavBar 导航栏 + + +
+ +### 指定左右文本 + + + +
diff --git a/example/src/docs/mobile/nav-bar/mobilenavbar.md b/example/src/docs/mobile/nav-bar/mobilenavbar.md new file mode 100644 index 000000000..ec0f9d883 --- /dev/null +++ b/example/src/docs/mobile/nav-bar/mobilenavbar.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## NavBar 导航栏 + + +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/mobile/nav-bar/slots.md b/example/src/docs/mobile/nav-bar/slots.md new file mode 100644 index 000000000..ae5ff9b0e --- /dev/null +++ b/example/src/docs/mobile/nav-bar/slots.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## NavBar 导航栏 + + +
+ +### 自定义左右侧内容 + + + +
diff --git a/example/src/docs/mobile/nav-bar/z-index.md b/example/src/docs/mobile/nav-bar/z-index.md new file mode 100644 index 000000000..44a81277d --- /dev/null +++ b/example/src/docs/mobile/nav-bar/z-index.md @@ -0,0 +1,16 @@ +
+

+ +

+ +## NavBar 导航栏 + + + +
+ +### 设置层级 + + + +
diff --git a/example/src/docs/mobile/numeric/automaticprice.md b/example/src/docs/mobile/numeric/automaticprice.md new file mode 100644 index 000000000..4ea606a97 --- /dev/null +++ b/example/src/docs/mobile/numeric/automaticprice.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Numeric 计数器 + + +
+ +### 根据商品数量自动计算价格 + + + +
diff --git a/example/src/docs/mobile/numeric/circulate.md b/example/src/docs/mobile/numeric/circulate.md new file mode 100644 index 000000000..2ad397c82 --- /dev/null +++ b/example/src/docs/mobile/numeric/circulate.md @@ -0,0 +1,22 @@ +
+

+ +

+ +## Numeric 计数器 + + + +
+ +### 是否循环 + + + +
+ +### 是否禁用 + + + +
diff --git a/example/src/docs/mobile/numeric/controls.md b/example/src/docs/mobile/numeric/controls.md new file mode 100644 index 000000000..306c13938 --- /dev/null +++ b/example/src/docs/mobile/numeric/controls.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Numeric 计数器 + + +
+ +### 控制按钮 + + + +
diff --git a/example/src/docs/mobile/numeric/controlsposition.md b/example/src/docs/mobile/numeric/controlsposition.md new file mode 100644 index 000000000..3d5ce0a94 --- /dev/null +++ b/example/src/docs/mobile/numeric/controlsposition.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Numeric 计数器 + + +
+ +### 控制按钮显示位置 + + + +
diff --git a/example/src/docs/mobile/numeric/event.md b/example/src/docs/mobile/numeric/event.md new file mode 100644 index 000000000..94417b0b9 --- /dev/null +++ b/example/src/docs/mobile/numeric/event.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Numeric 计数器 + + +
+ +### 事件 + + + +
diff --git a/example/src/docs/mobile/numeric/max.md b/example/src/docs/mobile/numeric/max.md new file mode 100644 index 000000000..62b80b3c8 --- /dev/null +++ b/example/src/docs/mobile/numeric/max.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Numeric 计数器 + + +
+ +### 最大值最小值 + + + +
diff --git a/example/src/docs/mobile/numeric/numeric.md b/example/src/docs/mobile/numeric/numeric.md new file mode 100644 index 000000000..737977c88 --- /dev/null +++ b/example/src/docs/mobile/numeric/numeric.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Numeric 计数器 + + +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/mobile/numeric/precision.md b/example/src/docs/mobile/numeric/precision.md new file mode 100644 index 000000000..238311aec --- /dev/null +++ b/example/src/docs/mobile/numeric/precision.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Numeric 计数器 + + +
+ +### 数值精度 + + + +
diff --git a/example/src/docs/mobile/numeric/size.md b/example/src/docs/mobile/numeric/size.md new file mode 100644 index 000000000..4258fcd36 --- /dev/null +++ b/example/src/docs/mobile/numeric/size.md @@ -0,0 +1,24 @@ +
+

+ +

+ +## Numeric 计数器 + + + +
+ +### 尺寸 + + + +
+ +### 占位文本 + +通过 `placeholder` 属性设置输入框占位文本。 + + + +
diff --git a/example/src/docs/mobile/numeric/step.md b/example/src/docs/mobile/numeric/step.md new file mode 100644 index 000000000..ee985c886 --- /dev/null +++ b/example/src/docs/mobile/numeric/step.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Numeric 计数器 + + +
+ +### 步长 + + + +
diff --git a/example/src/docs/mobile/progress/basic-usage.md b/example/src/docs/mobile/progress/basic-usage.md new file mode 100644 index 000000000..5092361c7 --- /dev/null +++ b/example/src/docs/mobile/progress/basic-usage.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Progress + + + +用于展示操作进度,告知用户当前状态和预期。 +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/mobile/progress/custom-color.md b/example/src/docs/mobile/progress/custom-color.md new file mode 100644 index 000000000..7685456de --- /dev/null +++ b/example/src/docs/mobile/progress/custom-color.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Progress + + + +用于展示操作进度,告知用户当前状态和预期。 +
+ +### 自定义颜色 + +通过 `color` 设置进度条颜色。color 进度条背景色(会覆盖 status 状态颜色) + + + +
diff --git a/example/src/docs/mobile/progress/dynamic-control-changes.md b/example/src/docs/mobile/progress/dynamic-control-changes.md new file mode 100644 index 000000000..25c8fba06 --- /dev/null +++ b/example/src/docs/mobile/progress/dynamic-control-changes.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Progress + + + +用于展示操作进度,告知用户当前状态和预期。 +
+ +### 动态控制进度条变化 + +通过设置 `percentage` 动态控制进度条变化 + + + +
diff --git a/example/src/docs/mobile/progress/dynamic-progress.md b/example/src/docs/mobile/progress/dynamic-progress.md new file mode 100644 index 000000000..cdd913711 --- /dev/null +++ b/example/src/docs/mobile/progress/dynamic-progress.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Progress + + + +用于展示操作进度,告知用户当前状态和预期。 +
+ +### 动态进度条 + +通过动态改变`percentage`的值,使进度条动态变化 + + diff --git a/example/src/docs/mobile/progress/format-text.md b/example/src/docs/mobile/progress/format-text.md new file mode 100644 index 000000000..687fe9035 --- /dev/null +++ b/example/src/docs/mobile/progress/format-text.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Progress + + + +用于展示操作进度,告知用户当前状态和预期。 +
+ +### 自定义显示文字 + +`text-inside` 进度条显示文字内置在进度条内(只在 type=line 时可用) + + + +
diff --git a/example/src/docs/mobile/progress/format.md b/example/src/docs/mobile/progress/format.md new file mode 100644 index 000000000..e4e60c105 --- /dev/null +++ b/example/src/docs/mobile/progress/format.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Progress + + + +用于展示操作进度,告知用户当前状态和预期。 + +
+ +### 自定义显示内容 + +通过 `format` 属性设置显示文字内置在进度条内时,用于自定义显示内容。 + + + +
diff --git a/example/src/docs/mobile/progress/progress-status.md b/example/src/docs/mobile/progress/progress-status.md new file mode 100644 index 000000000..9e49470d1 --- /dev/null +++ b/example/src/docs/mobile/progress/progress-status.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Progress + + + +用于展示操作进度,告知用户当前状态和预期。 +
+ +### 状态 + +`status` 进度条当前状态(success/exception/warning) + + diff --git a/example/src/docs/mobile/progress/progress-type.md b/example/src/docs/mobile/progress/progress-type.md new file mode 100644 index 000000000..0ae6ee261 --- /dev/null +++ b/example/src/docs/mobile/progress/progress-type.md @@ -0,0 +1,35 @@ +
+

+ +

+ +## Progress + + + +用于展示操作进度,告知用户当前状态和预期。 + +
+ +取值 line:线性进度条。取值 circle:环形进度条,取值 dashboard:仪表盘形进度条 +
+ +### line 类型 + +`type="line"` 显示为 line 类型 + + + +### circle 类型 + +`type="circle"` 显示为 circle 类型 + + + +### dashboard 类型 + +`type="dashboard"` 显示为 dashboard 类型 + + + +
diff --git a/example/src/docs/mobile/progress/progress-width.md b/example/src/docs/mobile/progress/progress-width.md new file mode 100644 index 000000000..d7c735c6e --- /dev/null +++ b/example/src/docs/mobile/progress/progress-width.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Progress + + + +用于展示操作进度,告知用户当前状态和预期。 +
+ +### 宽度 + +`stroke-width`进度条的宽度,单位 px + + + +
diff --git a/example/src/docs/mobile/progress/text-inside-or-no-text.md b/example/src/docs/mobile/progress/text-inside-or-no-text.md new file mode 100644 index 000000000..4c0748ca5 --- /dev/null +++ b/example/src/docs/mobile/progress/text-inside-or-no-text.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Progress + + + +用于展示操作进度,告知用户当前状态和预期。 +
+ +### 文字内显或不显 + +`show-text` 是否显示进度条文字内容 + + + +
diff --git a/example/src/docs/mobile/progress/width.md b/example/src/docs/mobile/progress/width.md new file mode 100644 index 000000000..65ebfa610 --- /dev/null +++ b/example/src/docs/mobile/progress/width.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Progress + + + +用于展示操作进度,告知用户当前状态和预期。 + +
+ +### 环形进度条画布宽度 + +通过设置 `width` 属性设置环形进度条画布宽度(只在 type 为 circle 或 dashboard 时可用)。 + + + +
diff --git a/example/src/docs/mobile/pull-refresh/animation-duration.md b/example/src/docs/mobile/pull-refresh/animation-duration.md new file mode 100644 index 000000000..6ebc4fe5f --- /dev/null +++ b/example/src/docs/mobile/pull-refresh/animation-duration.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## pull-refresh 下拉刷新 + + +
+ +### 下拉可刷新的弹回动画时间 + + + +
diff --git a/example/src/docs/mobile/pull-refresh/base.md b/example/src/docs/mobile/pull-refresh/base.md new file mode 100644 index 000000000..4a691ab38 --- /dev/null +++ b/example/src/docs/mobile/pull-refresh/base.md @@ -0,0 +1,16 @@ +
+

+ +

+ +## pull-refresh 下拉刷新 + + +
+ +### 基本展示 + + + +
+ diff --git a/example/src/docs/mobile/pull-refresh/disabled.md b/example/src/docs/mobile/pull-refresh/disabled.md new file mode 100644 index 000000000..d51a27522 --- /dev/null +++ b/example/src/docs/mobile/pull-refresh/disabled.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## pull-refresh 下拉刷新 + + +
+ +### 禁用下拉刷新 + + + +
diff --git a/example/src/docs/mobile/pull-refresh/head-height.md b/example/src/docs/mobile/pull-refresh/head-height.md new file mode 100644 index 000000000..3d54cb6d1 --- /dev/null +++ b/example/src/docs/mobile/pull-refresh/head-height.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## pull-refresh 下拉刷新 + + +
+ +### 下拉后,提示信息的高度 + + + +
diff --git a/example/src/docs/mobile/pull-refresh/loosing-text.md b/example/src/docs/mobile/pull-refresh/loosing-text.md new file mode 100644 index 000000000..dd016de51 --- /dev/null +++ b/example/src/docs/mobile/pull-refresh/loosing-text.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## pull-refresh 下拉刷新 + + +
+ +### 下拉超过 head 的高度后的提示 + + + +
diff --git a/example/src/docs/mobile/pull-refresh/pull-refresh-slot.md b/example/src/docs/mobile/pull-refresh/pull-refresh-slot.md new file mode 100644 index 000000000..94bd28e33 --- /dev/null +++ b/example/src/docs/mobile/pull-refresh/pull-refresh-slot.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## pull-refresh 下拉刷新 + + +
+ +### 下拉刷新 loading 的插槽 + + + +
diff --git a/example/src/docs/mobile/pull-refresh/pulling-text.md b/example/src/docs/mobile/pull-refresh/pulling-text.md new file mode 100644 index 000000000..f2864ae14 --- /dev/null +++ b/example/src/docs/mobile/pull-refresh/pulling-text.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## pull-refresh 下拉刷新 + + +
+ +### 开始下拉并还没到 head 的高度时的提示文字 + + + +
diff --git a/example/src/docs/mobile/pull-refresh/success-duration.md b/example/src/docs/mobile/pull-refresh/success-duration.md new file mode 100644 index 000000000..ed2173535 --- /dev/null +++ b/example/src/docs/mobile/pull-refresh/success-duration.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## pull-refresh 下拉刷新 + + +
+ +### 刷新完成时,提示的显示时长 + + + +
diff --git a/example/src/docs/mobile/pull-refresh/success-text.md b/example/src/docs/mobile/pull-refresh/success-text.md new file mode 100644 index 000000000..5b778fc2a --- /dev/null +++ b/example/src/docs/mobile/pull-refresh/success-text.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## pull-refresh 下拉刷新 + + +
+ +### 刷新完成时的提示文字 + + + +
diff --git a/example/src/docs/mobile/radio/border.md b/example/src/docs/mobile/radio/border.md new file mode 100644 index 000000000..be22de817 --- /dev/null +++ b/example/src/docs/mobile/radio/border.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Radio 单选 + + +
+ +### 显示边框 + + + +
diff --git a/example/src/docs/mobile/radio/disabled.md b/example/src/docs/mobile/radio/disabled.md new file mode 100644 index 000000000..538636098 --- /dev/null +++ b/example/src/docs/mobile/radio/disabled.md @@ -0,0 +1,16 @@ +
+

+ +

+ +## Radio 单选 + + + +
+ +### 是否禁用 + + + +
diff --git a/example/src/docs/mobile/radio/event-change.md b/example/src/docs/mobile/radio/event-change.md new file mode 100644 index 000000000..bff15c2b2 --- /dev/null +++ b/example/src/docs/mobile/radio/event-change.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Radio 单选 + + +
+ +### 值改变事件 + + + +
diff --git a/example/src/docs/mobile/radio/mobileradio.md b/example/src/docs/mobile/radio/mobileradio.md new file mode 100644 index 000000000..ff65535ce --- /dev/null +++ b/example/src/docs/mobile/radio/mobileradio.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Radio 单选 + + +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/mobile/search/button-text.md b/example/src/docs/mobile/search/button-text.md new file mode 100644 index 000000000..9a747f15c --- /dev/null +++ b/example/src/docs/mobile/search/button-text.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Search 搜索框 + + +
+ +### 自定义搜索按钮文本 + + + +
diff --git a/example/src/docs/mobile/search/default-value.md b/example/src/docs/mobile/search/default-value.md new file mode 100644 index 000000000..5eb77bcdb --- /dev/null +++ b/example/src/docs/mobile/search/default-value.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Search 搜索框 + + +
+ +### 默认搜索 + + + +
diff --git a/example/src/docs/mobile/search/events.md b/example/src/docs/mobile/search/events.md new file mode 100644 index 000000000..a8d3acfc4 --- /dev/null +++ b/example/src/docs/mobile/search/events.md @@ -0,0 +1,22 @@ +
+

+ +

+ +## Search 搜索框 + + + +
+ +### 事件 + + + +
+ +### clear 事件 + + + +
diff --git a/example/src/docs/mobile/search/mobilesearch.md b/example/src/docs/mobile/search/mobilesearch.md new file mode 100644 index 000000000..6f0d5c4b9 --- /dev/null +++ b/example/src/docs/mobile/search/mobilesearch.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Search 搜索框 + + +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/mobile/slider/about-step.md b/example/src/docs/mobile/slider/about-step.md new file mode 100644 index 000000000..f6b8fc5e5 --- /dev/null +++ b/example/src/docs/mobile/slider/about-step.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Slider 滑块 + + + +通过鼠标滑动滑块来确定位置和大小。多种形式,横向、纵向和范围滑块。 +
+ +### 步长 + +通过设置`step`来配置滑块滑动的步长 + + + +
diff --git a/example/src/docs/mobile/slider/basic-usage.md b/example/src/docs/mobile/slider/basic-usage.md new file mode 100644 index 000000000..b36884853 --- /dev/null +++ b/example/src/docs/mobile/slider/basic-usage.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Slider 滑块 + + + +通过鼠标滑动滑块来确定位置和大小。多种形式,横向、纵向和范围滑块。 +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/mobile/slider/dynamic-disable.md b/example/src/docs/mobile/slider/dynamic-disable.md new file mode 100644 index 000000000..870f4b694 --- /dev/null +++ b/example/src/docs/mobile/slider/dynamic-disable.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Slider 滑块 + + + +通过鼠标滑动滑块来确定位置和大小。多种形式,横向、纵向和范围滑块。 +
+ +### 禁用 + +通过设置属性`disabled` ,设置滑动滑块禁止滑动 + + + +
diff --git a/example/src/docs/mobile/slider/format-tooltip.md b/example/src/docs/mobile/slider/format-tooltip.md new file mode 100644 index 000000000..4682b3d30 --- /dev/null +++ b/example/src/docs/mobile/slider/format-tooltip.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Slider 滑块 + + + +通过鼠标滑动滑块来确定位置和大小。多种形式,横向、纵向和范围滑块。 + +
+ +### 总步数 + +通过`format-tooltip` 属性设置 value。 + + + +
diff --git a/example/src/docs/mobile/slider/max-min.md b/example/src/docs/mobile/slider/max-min.md new file mode 100644 index 000000000..14c0f5cc3 --- /dev/null +++ b/example/src/docs/mobile/slider/max-min.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Slider 滑块 + + + +通过鼠标滑动滑块来确定位置和大小。多种形式,横向、纵向和范围滑块。 +
+ +### 最大最小值 + +通过设置`min` `max` 来设置滑块取值范围 + + + +
diff --git a/example/src/docs/mobile/slider/range-select.md b/example/src/docs/mobile/slider/range-select.md new file mode 100644 index 000000000..56396642e --- /dev/null +++ b/example/src/docs/mobile/slider/range-select.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Slider 滑块 + + + +通过鼠标滑动滑块来确定位置和大小。多种形式,横向、纵向和范围滑块。 +
+ +### 范围选择 + +通过`v-model` 为数组 设定初始范围选择 + + + +
diff --git a/example/src/docs/mobile/slider/shortcut-operation.md b/example/src/docs/mobile/slider/shortcut-operation.md new file mode 100644 index 000000000..cbea345c4 --- /dev/null +++ b/example/src/docs/mobile/slider/shortcut-operation.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Slider 滑块 + + + +通过鼠标滑动滑块来确定位置和大小。多种形式,横向、纵向和范围滑块。 + +
+ +### 总步数 + +通过`num-pages` 属性设置总步数,即按快捷键 PageDown/PageUp 时,每次移动的距离是(最大值-最小值)/分页数。 + + + +
diff --git a/example/src/docs/mobile/slider/show-input.md b/example/src/docs/mobile/slider/show-input.md new file mode 100644 index 000000000..e6e9362a4 --- /dev/null +++ b/example/src/docs/mobile/slider/show-input.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Slider 滑块 + + + +通过鼠标滑动滑块来确定位置和大小。多种形式,横向、纵向和范围滑块。 +
+ +### 输入框模式 + +通过配置`show-input`,开启滑块输入框模式 + + + +
diff --git a/example/src/docs/mobile/slider/show-tip.md b/example/src/docs/mobile/slider/show-tip.md new file mode 100644 index 000000000..515b19dff --- /dev/null +++ b/example/src/docs/mobile/slider/show-tip.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Slider 滑块 + + + +通过鼠标滑动滑块来确定位置和大小。多种形式,横向、纵向和范围滑块。 +
+ +### 提示 + +通过设定`:show-tip="false"`,关闭滑块提示。(默认开启) + + + +
diff --git a/example/src/docs/mobile/slider/slider-events.md b/example/src/docs/mobile/slider/slider-events.md new file mode 100644 index 000000000..83c45affe --- /dev/null +++ b/example/src/docs/mobile/slider/slider-events.md @@ -0,0 +1,31 @@ +
+

+ +

+ +## Slider 滑块 + + + +通过鼠标滑动滑块来确定位置和大小。多种形式,横向、纵向和范围滑块。 +
+ +### 事件 + +

change 事件

+ + + +
+ +

start 滑块开始滑动事件

+ + + +
+ +

stop 滑块停止滑动事件

+ + + +
diff --git a/example/src/docs/mobile/slider/slider-slot.md b/example/src/docs/mobile/slider/slider-slot.md new file mode 100644 index 000000000..0bfb624ce --- /dev/null +++ b/example/src/docs/mobile/slider/slider-slot.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## Slider 滑块 + + + +通过鼠标滑动滑块来确定位置和大小。多种形式,横向、纵向和范围滑块。 +
+ +### 自定义插槽 + + + +
+ diff --git a/example/src/docs/mobile/slider/vertical-mode.md b/example/src/docs/mobile/slider/vertical-mode.md new file mode 100644 index 000000000..4b7b88c33 --- /dev/null +++ b/example/src/docs/mobile/slider/vertical-mode.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Slider 滑块 + + + +通过鼠标滑动滑块来确定位置和大小。多种形式,横向、纵向和范围滑块。 +
+ +### 竖向模式 + +通过设置`vertical` 属性来展示滑块竖向模式(不设置,默认为横向模式) +竖向模式可以通过 `height` 设置组件高度 + + + +
diff --git a/example/src/docs/mobile/switch/disabled.md b/example/src/docs/mobile/switch/disabled.md new file mode 100644 index 000000000..132272445 --- /dev/null +++ b/example/src/docs/mobile/switch/disabled.md @@ -0,0 +1,16 @@ +
+

+ +

+ +## Switch 开关 + + + +
+ +### 是否禁用 + + + +
diff --git a/example/src/docs/mobile/switch/event-change.md b/example/src/docs/mobile/switch/event-change.md new file mode 100644 index 000000000..b7d230342 --- /dev/null +++ b/example/src/docs/mobile/switch/event-change.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Switch 开关 + + +
+ +### 值改变事件 + + + +
diff --git a/example/src/docs/mobile/switch/mobileswitch.md b/example/src/docs/mobile/switch/mobileswitch.md new file mode 100644 index 000000000..afa1d5fc8 --- /dev/null +++ b/example/src/docs/mobile/switch/mobileswitch.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Switch 开关 + + +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/mobile/switch/scenario.md b/example/src/docs/mobile/switch/scenario.md new file mode 100644 index 000000000..c9649d780 --- /dev/null +++ b/example/src/docs/mobile/switch/scenario.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Switch 开关 + + +
+ +### 应用场景 + + + +
diff --git a/example/src/docs/mobile/switch/true-false-value.md b/example/src/docs/mobile/switch/true-false-value.md new file mode 100644 index 000000000..9ff63ef0e --- /dev/null +++ b/example/src/docs/mobile/switch/true-false-value.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Switch 开关 + + +
+ +### 自定义打开关闭的值 + + + +
diff --git a/example/src/docs/mobile/tabbar/active-inactive-color.md b/example/src/docs/mobile/tabbar/active-inactive-color.md new file mode 100644 index 000000000..2a91f6cb4 --- /dev/null +++ b/example/src/docs/mobile/tabbar/active-inactive-color.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Tabbar 标签栏 + + +
+ +### 自定义颜色 + + + +
diff --git a/example/src/docs/mobile/tabbar/badge.md b/example/src/docs/mobile/tabbar/badge.md new file mode 100644 index 000000000..1039d9b4c --- /dev/null +++ b/example/src/docs/mobile/tabbar/badge.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Tabbar 标签栏 + + +
+ +### 徽标提示 + + + +
diff --git a/example/src/docs/mobile/tabbar/border.md b/example/src/docs/mobile/tabbar/border.md new file mode 100644 index 000000000..00ac8846a --- /dev/null +++ b/example/src/docs/mobile/tabbar/border.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Tabbar 标签栏 + + +
+ +### 无边框 + + + +
diff --git a/example/src/docs/mobile/tabbar/event-change.md b/example/src/docs/mobile/tabbar/event-change.md new file mode 100644 index 000000000..112e094a2 --- /dev/null +++ b/example/src/docs/mobile/tabbar/event-change.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Tabbar 标签栏 + + +
+ +### 切换事件 + + + +
diff --git a/example/src/docs/mobile/tabbar/mobiletabbar.md b/example/src/docs/mobile/tabbar/mobiletabbar.md new file mode 100644 index 000000000..2e683091f --- /dev/null +++ b/example/src/docs/mobile/tabbar/mobiletabbar.md @@ -0,0 +1,23 @@ +
+

+ +

+ +## Tabbar 标签栏 + + +
+ +### 基本用法 + + + +
+ + + +
+ +### TabbarItem Props + + diff --git a/example/src/docs/mobile/tabbar/onlytext.md b/example/src/docs/mobile/tabbar/onlytext.md new file mode 100644 index 000000000..2cc2a76a0 --- /dev/null +++ b/example/src/docs/mobile/tabbar/onlytext.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Tabbar 标签栏 + + +
+ +### 纯文本 + + + +
diff --git a/example/src/docs/mobile/tabbar/route.md b/example/src/docs/mobile/tabbar/route.md new file mode 100644 index 000000000..c22999c32 --- /dev/null +++ b/example/src/docs/mobile/tabbar/route.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Tabbar 标签栏 + + +
+ +### 路由跳转 + + + +
diff --git a/example/src/docs/mobile/tabbar/slot-icon.md b/example/src/docs/mobile/tabbar/slot-icon.md new file mode 100644 index 000000000..111da51a2 --- /dev/null +++ b/example/src/docs/mobile/tabbar/slot-icon.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Tabbar 标签栏 + + +
+ +### 自定义图标 + + + +
diff --git a/example/src/docs/mobile/tabs/active-color.md b/example/src/docs/mobile/tabs/active-color.md new file mode 100644 index 000000000..c740f21cf --- /dev/null +++ b/example/src/docs/mobile/tabs/active-color.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Tabs 标签页 + + +
+ +### 自定义当前标签页颜色 + + + +
diff --git a/example/src/docs/mobile/tabs/before-leave.md b/example/src/docs/mobile/tabs/before-leave.md new file mode 100644 index 000000000..f13d7e79e --- /dev/null +++ b/example/src/docs/mobile/tabs/before-leave.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Tabs 标签页 + + +
+ +### 离开前事件 + +`before-leave`切换标签之前的钩子函数,若返回 `false` 或者返回 `Promise` 且被`reject`,则阻止切换,返回 `true` 则可以切换。 + + + +
diff --git a/example/src/docs/mobile/tabs/swipe.md b/example/src/docs/mobile/tabs/swipe.md new file mode 100644 index 000000000..e4d54f3f6 --- /dev/null +++ b/example/src/docs/mobile/tabs/swipe.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Tabs 标签页 + + +
+ +### 滑动内容切换标签页 + + + +
diff --git a/example/src/docs/mobile/tabs/tabs-event.md b/example/src/docs/mobile/tabs/tabs-event.md new file mode 100644 index 000000000..ebb6374f8 --- /dev/null +++ b/example/src/docs/mobile/tabs/tabs-event.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tabs 标签页 + + +
+ +### 事件 + +单击标签页时触发 `click` 事件 +点击新增按钮增加标签页时触发 `add` 事件 +关闭标签页时触发 `close` 事件 + + + +
diff --git a/example/src/docs/mobile/tabs/three-level.md b/example/src/docs/mobile/tabs/three-level.md new file mode 100644 index 000000000..bc233de1c --- /dev/null +++ b/example/src/docs/mobile/tabs/three-level.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Tabs 标签页 + + +
+ +### 新增标签页 + + + +
diff --git a/example/src/docs/mobile/tabs/with-add.md b/example/src/docs/mobile/tabs/with-add.md new file mode 100644 index 000000000..03ae965d0 --- /dev/null +++ b/example/src/docs/mobile/tabs/with-add.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Tabs 标签页 + + +
+ +### 新增标签页 + + + +
diff --git a/example/src/docs/mobile/time-line/different-data.md b/example/src/docs/mobile/time-line/different-data.md new file mode 100644 index 000000000..dce08a3da --- /dev/null +++ b/example/src/docs/mobile/time-line/different-data.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## TimeLine 时间轴 + + +
+ +### 数据映射 + + + +
+ + diff --git a/example/src/docs/mobile/time-line/slot.md b/example/src/docs/mobile/time-line/slot.md new file mode 100644 index 000000000..9cb694c06 --- /dev/null +++ b/example/src/docs/mobile/time-line/slot.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## TimeLine 时间轴 + + +
+ +### 插槽 + + + +
+ + diff --git a/example/src/docs/mobile/time-line/space.md b/example/src/docs/mobile/time-line/space.md new file mode 100644 index 000000000..4092fdc3b --- /dev/null +++ b/example/src/docs/mobile/time-line/space.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## TimeLine 时间轴 + + +
+ +### 时间轴项高度 + + + +
+ + diff --git a/example/src/docs/zh-CN/alert/alert-close-event.md b/example/src/docs/zh-CN/alert/alert-close-event.md new file mode 100644 index 000000000..792046a49 --- /dev/null +++ b/example/src/docs/zh-CN/alert/alert-close-event.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Alert 警告 + + +
+ +### 关闭事件 + +`close` 事件,关闭警告框时触发。 + + + +
diff --git a/example/src/docs/zh-CN/alert/alert-type.md b/example/src/docs/zh-CN/alert/alert-type.md new file mode 100644 index 000000000..d4cd9878c --- /dev/null +++ b/example/src/docs/zh-CN/alert/alert-type.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Alert 警告 + + +
+ +### 类型 + +通过 `type` 设置不同的类型。可选值:success、warning、info、error,默认值:info 。 + + + +
diff --git a/example/src/docs/zh-CN/alert/align-center.md b/example/src/docs/zh-CN/alert/align-center.md new file mode 100644 index 000000000..484275cf5 --- /dev/null +++ b/example/src/docs/zh-CN/alert/align-center.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Alert 警告 + + +
+ +### 文字居中 + +通过 `center` 属性可使文字显示居中。 + + + +
diff --git a/example/src/docs/zh-CN/alert/basic-usage.md b/example/src/docs/zh-CN/alert/basic-usage.md new file mode 100644 index 000000000..082b2ac98 --- /dev/null +++ b/example/src/docs/zh-CN/alert/basic-usage.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Alert 警告 + + +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/zh-CN/alert/custom-alert-icon.md b/example/src/docs/zh-CN/alert/custom-alert-icon.md new file mode 100644 index 000000000..02b029fcd --- /dev/null +++ b/example/src/docs/zh-CN/alert/custom-alert-icon.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Alert 警告 + + +
+ +### 自定义警告图标 + +通过 `icon` 属性自定义图标。 + + + +
diff --git a/example/src/docs/zh-CN/alert/custom-close-text.md b/example/src/docs/zh-CN/alert/custom-close-text.md new file mode 100644 index 000000000..ea8e6b3e1 --- /dev/null +++ b/example/src/docs/zh-CN/alert/custom-close-text.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Alert 警告 + + +
+ +### 自定义关闭按钮文本 + +通过属性 `close-text` 自定义关闭按钮文本。 + + + +
diff --git a/example/src/docs/zh-CN/alert/custom-description.md b/example/src/docs/zh-CN/alert/custom-description.md new file mode 100644 index 000000000..48632414d --- /dev/null +++ b/example/src/docs/zh-CN/alert/custom-description.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Alert 警告 + + +
+ +### 自定义提示内容 + +当 `size` 为 large时,可通过 `description` 属性或插槽设置自定义提示内容。 + + + +
diff --git a/example/src/docs/zh-CN/alert/custom-title.md b/example/src/docs/zh-CN/alert/custom-title.md new file mode 100644 index 000000000..55b43c02c --- /dev/null +++ b/example/src/docs/zh-CN/alert/custom-title.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Alert 警告 + + +
+ +### 自定义标题 + +当 `size` 为 large 时显示标题,可设置 `title` 或 `slot` 自定义标题。默认标题根据设置的 `type` 显示。 + + + +
diff --git a/example/src/docs/zh-CN/alert/feedback-of-result.md b/example/src/docs/zh-CN/alert/feedback-of-result.md new file mode 100644 index 000000000..2e9e251d5 --- /dev/null +++ b/example/src/docs/zh-CN/alert/feedback-of-result.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Alert 警告 + + +
+ +### 表单提交结果反馈 + +当 `size` 为 large时,属性 `description` 和默认插槽结合使用,可渲染提交反馈界面。 + + + +
diff --git a/example/src/docs/zh-CN/alert/interactive-operation.md b/example/src/docs/zh-CN/alert/interactive-operation.md new file mode 100644 index 000000000..bdf417405 --- /dev/null +++ b/example/src/docs/zh-CN/alert/interactive-operation.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Alert 警告 + + +
+ +### 自定义交互操作 + +当 `size` 为 large 时,设置默认插槽自定义交互操作。 + + + +
diff --git a/example/src/docs/zh-CN/alert/large-size.md b/example/src/docs/zh-CN/alert/large-size.md new file mode 100644 index 000000000..f0ac6633b --- /dev/null +++ b/example/src/docs/zh-CN/alert/large-size.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Alert 警告 + + +
+ +### 大尺寸 + +通过 `size` 属性设置不同的尺寸,可选值:nomal、large,默认值:nomal 。 + + + +
diff --git a/example/src/docs/zh-CN/alert/not-closable.md b/example/src/docs/zh-CN/alert/not-closable.md new file mode 100644 index 000000000..bb5be4b05 --- /dev/null +++ b/example/src/docs/zh-CN/alert/not-closable.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Alert 警告 + + +
+ +### 不可关闭 + +通过 `closable` 属性可设置是否显示关闭按钮,没有关闭按钮,警告框将不可关闭。 + + + +
diff --git a/example/src/docs/zh-CN/alert/show-icon.md b/example/src/docs/zh-CN/alert/show-icon.md new file mode 100644 index 000000000..a9179f0e2 --- /dev/null +++ b/example/src/docs/zh-CN/alert/show-icon.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## Alert 警告 + + + +
+ +### 是否显示图标 + +通过配置 `show-icon` 属性,控制图标是否显示。 + + + +
diff --git a/example/src/docs/zh-CN/autocomplete/append-prepend.md b/example/src/docs/zh-CN/autocomplete/append-prepend.md new file mode 100644 index 000000000..0df3be04b --- /dev/null +++ b/example/src/docs/zh-CN/autocomplete/append-prepend.md @@ -0,0 +1,28 @@ +
+

+ +

+ +## Autocomplete 自动完成 + + + +根据输入内容提供对应的输入建议。 + +
+ +### 输入框前置内容 + +配置 `prepend` 属性设置输入框前置内容。 + + + +
+ +### 输入框后置内容 + +配置 `append` 属性设置输入框后置内容。 + + + +
diff --git a/example/src/docs/zh-CN/autocomplete/basic-usage.md b/example/src/docs/zh-CN/autocomplete/basic-usage.md new file mode 100644 index 000000000..6f30ed73f --- /dev/null +++ b/example/src/docs/zh-CN/autocomplete/basic-usage.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Autocomplete 自动完成 + + + +根据输入内容提供对应的输入建议。 +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/zh-CN/autocomplete/clearable.md b/example/src/docs/zh-CN/autocomplete/clearable.md new file mode 100644 index 000000000..5e416407b --- /dev/null +++ b/example/src/docs/zh-CN/autocomplete/clearable.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Autocomplete 自动完成 + + + +根据输入内容提供对应的输入建议。 +
+ +### 可清除 + +配置 `clearable` 属性后,输入内容后会显示清除图标,单击可以清除输入框内容。 + + + +
diff --git a/example/src/docs/zh-CN/autocomplete/cust-template.md b/example/src/docs/zh-CN/autocomplete/cust-template.md new file mode 100644 index 000000000..9b996fb01 --- /dev/null +++ b/example/src/docs/zh-CN/autocomplete/cust-template.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Autocomplete 自动完成 + + + +根据输入内容提供对应的输入建议。 +
+ +### 自定义模板 + +通过作用域插槽可以自定义输入建议模板。 + + + +
diff --git a/example/src/docs/zh-CN/autocomplete/custom-icon.md b/example/src/docs/zh-CN/autocomplete/custom-icon.md new file mode 100644 index 000000000..212965214 --- /dev/null +++ b/example/src/docs/zh-CN/autocomplete/custom-icon.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## Autocomplete 自动完成 + + + +根据输入内容提供对应的输入建议。 +
+ +### 自定义图标 + +配置 `prefix-icon` 和 `suffix-icon` 属性可分别自定义输入框前后置图标。 + + + +### 通过插槽自定义图标 + +通过 `prefix` 和 `suffix` 插槽也可以分别自定义输入框前后置图标。 + + + +
diff --git a/example/src/docs/zh-CN/autocomplete/debounce.md b/example/src/docs/zh-CN/autocomplete/debounce.md new file mode 100644 index 000000000..42a96b178 --- /dev/null +++ b/example/src/docs/zh-CN/autocomplete/debounce.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Autocomplete 自动完成 + + + +根据输入内容提供对应的输入建议。 +
+ +### 去抖延时 + +通过 `debounce` 属性可以设置获取输入建议的去抖延时,默认值为 300 毫秒。 + + + +
diff --git a/example/src/docs/zh-CN/autocomplete/disabled.md b/example/src/docs/zh-CN/autocomplete/disabled.md new file mode 100644 index 000000000..a47797c57 --- /dev/null +++ b/example/src/docs/zh-CN/autocomplete/disabled.md @@ -0,0 +1,28 @@ +
+

+ +

+ +## Autocomplete 自动完成 + + + +根据输入内容提供对应的输入建议。 + +
+ +### 禁用 + +通过 `disabled` 属性可以设置为禁用状态。 + + + +
+ +### 原生属性 + +通过 `name` 属性可以设置原生属性。 + + + +
diff --git a/example/src/docs/zh-CN/autocomplete/hide-loading.md b/example/src/docs/zh-CN/autocomplete/hide-loading.md new file mode 100644 index 000000000..62a49fbdb --- /dev/null +++ b/example/src/docs/zh-CN/autocomplete/hide-loading.md @@ -0,0 +1,28 @@ +
+

+ +

+ +## Autocomplete 自动完成 + + + +根据输入内容提供对应的输入建议。 + +
+ +### 隐藏加载图标 + +设置 `hide-loading` 属性为 true ,可以隐藏加载图标。 + + + +
+ +### 输入框占位文本 + +设置 `placeholder` 属性可设置自定义输入框占位文本内容。 + + + +
diff --git a/example/src/docs/zh-CN/autocomplete/highlight-first-item.md b/example/src/docs/zh-CN/autocomplete/highlight-first-item.md new file mode 100644 index 000000000..c5fccdd15 --- /dev/null +++ b/example/src/docs/zh-CN/autocomplete/highlight-first-item.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Autocomplete 自动完成 + + + +根据输入内容提供对应的输入建议。 +
+ +### 高亮显示第一项 + +设置 `highlight-first-item` 属性为 true ,可以突出显示远程搜索建议中的第一项。 + + + +
diff --git a/example/src/docs/zh-CN/autocomplete/no-trigger-on-focus.md b/example/src/docs/zh-CN/autocomplete/no-trigger-on-focus.md new file mode 100644 index 000000000..440020cef --- /dev/null +++ b/example/src/docs/zh-CN/autocomplete/no-trigger-on-focus.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Autocomplete 自动完成 + + + +根据输入内容提供对应的输入建议。 +
+ +### 聚焦不显示建议列表 + +默认输入框聚焦就会显示全部的建议列表,但设置 `trigger-on-focus` 属性为 false 后只有在匹配到输入建议后才会显示匹配到的建议列表。 + + + +
diff --git a/example/src/docs/zh-CN/autocomplete/placement.md b/example/src/docs/zh-CN/autocomplete/placement.md new file mode 100644 index 000000000..49a852572 --- /dev/null +++ b/example/src/docs/zh-CN/autocomplete/placement.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Autocomplete 自动完成 + + + +根据输入内容提供对应的输入建议。 +
+ +### 设置菜单弹出位置 + +`placement` 属性可以设置菜单弹出位置,默认为 `bottom-start`。可选值有 top、top-start、top-end、bottom、bottom-start、bottom-end 。 + + + +
diff --git a/example/src/docs/zh-CN/autocomplete/popper-class.md b/example/src/docs/zh-CN/autocomplete/popper-class.md new file mode 100644 index 000000000..122ef3003 --- /dev/null +++ b/example/src/docs/zh-CN/autocomplete/popper-class.md @@ -0,0 +1,39 @@ + + +
+

+ +

+ +## Autocomplete 自动完成 + + + +根据输入内容提供对应的输入建议。 +
+ +### 自定义列表样式 + +`popper-class` 属性可指定一个样式类名,可自定义建议列表的样式。 + +`popper-append-to-body` 属性可设置是否将下拉列表插入至 body 元素。在下拉列表的定位出现问题时,可将该属性设置为 false。 + + + +
diff --git a/example/src/docs/zh-CN/autocomplete/remote-search.md b/example/src/docs/zh-CN/autocomplete/remote-search.md new file mode 100644 index 000000000..bc92e5162 --- /dev/null +++ b/example/src/docs/zh-CN/autocomplete/remote-search.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Autocomplete 自动完成 + + + +根据输入内容提供对应的输入建议。 +
+ +### 远程搜索 + + + +
diff --git a/example/src/docs/zh-CN/autocomplete/select-event.md b/example/src/docs/zh-CN/autocomplete/select-event.md new file mode 100644 index 000000000..582a8b531 --- /dev/null +++ b/example/src/docs/zh-CN/autocomplete/select-event.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Autocomplete 自动完成 + + + +根据输入内容提供对应的输入建议。 +
+ +### 事件 + +Autocomplete 组件提供 `select` 事件,点击选中建议项时触发,回调参数为选中建议项。 +通过 `select-when-unmatched` 设置在输入联想没有匹配值时,按 Enter 键时是否触发 select 事件,默认值为 false。 + + + +
diff --git a/example/src/docs/zh-CN/autocomplete/size.md b/example/src/docs/zh-CN/autocomplete/size.md new file mode 100644 index 000000000..843c4d9d6 --- /dev/null +++ b/example/src/docs/zh-CN/autocomplete/size.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Autocomplete 自动完成 + + + +根据输入内容提供对应的输入建议。 +
+ +### 输入框大小 + +可选择值为medium,small,mini + + + +
diff --git a/example/src/docs/zh-CN/autocomplete/value-key.md b/example/src/docs/zh-CN/autocomplete/value-key.md new file mode 100644 index 000000000..3a5c2dfad --- /dev/null +++ b/example/src/docs/zh-CN/autocomplete/value-key.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Autocomplete 自动完成 + + + +根据输入内容提供对应的输入建议。 +
+ +### 指定显示的键名 + +输入内容后,建议列表中默认显示输入建议对象中 value 键名对应的值,若对象中没有 value 键名,就可以通过 `value-key` 属性指定显示的键名。 + + + +
diff --git a/example/src/docs/zh-CN/badge/badge-style.md b/example/src/docs/zh-CN/badge/badge-style.md new file mode 100644 index 000000000..7d2578e52 --- /dev/null +++ b/example/src/docs/zh-CN/badge/badge-style.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Badge 标记 + + + +Badge 展示指定数据信息,如:我的待办数、新任务数等。 +
+ +### 主題样式 + +`type` 设置显示主题,可选值:primary、success、warning、danger、info,默认值:danger + + + +
diff --git a/example/src/docs/zh-CN/badge/basic-usage.md b/example/src/docs/zh-CN/badge/basic-usage.md new file mode 100644 index 000000000..e48511d3b --- /dev/null +++ b/example/src/docs/zh-CN/badge/basic-usage.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Badge 标记 + + + +Badge 展示指定数据信息,如:我的待办数、新任务数等。 +
+ +### 基本用法 + +

Badge 展示指定数据信息,如:我的待办数、新任务数等。

+ + +
+ + diff --git a/example/src/docs/zh-CN/badge/custom-badge-target.md b/example/src/docs/zh-CN/badge/custom-badge-target.md new file mode 100644 index 000000000..925a69541 --- /dev/null +++ b/example/src/docs/zh-CN/badge/custom-badge-target.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Badge 标记 + + + +Badge 展示指定数据信息,如:我的待办数、新任务数等。 +
+ +### 自定义标记目标 + +`default slot` 标记内容自定义 + + + +
diff --git a/example/src/docs/zh-CN/badge/custom-tip-text.md b/example/src/docs/zh-CN/badge/custom-tip-text.md new file mode 100644 index 000000000..9bc8cf652 --- /dev/null +++ b/example/src/docs/zh-CN/badge/custom-tip-text.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Badge 标记 + + + +Badge 展示指定数据信息,如:我的待办数、新任务数等。 +
+ +### 自定义提示内容 + +`content slot` 自定义提示内容 + + + +
diff --git a/example/src/docs/zh-CN/badge/hidden-badge-while-read-message.md b/example/src/docs/zh-CN/badge/hidden-badge-while-read-message.md new file mode 100644 index 000000000..904b8e602 --- /dev/null +++ b/example/src/docs/zh-CN/badge/hidden-badge-while-read-message.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Badge 标记 + + + +Badge 展示指定数据信息,如:我的待办数、新任务数等。 +
+ +### 消息已读动态隐藏标记 + +`hidden` 隐藏标记 + + + +
diff --git a/example/src/docs/zh-CN/badge/href-target.md b/example/src/docs/zh-CN/badge/href-target.md new file mode 100644 index 000000000..51a380c69 --- /dev/null +++ b/example/src/docs/zh-CN/badge/href-target.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Badge 标记 + + + +Badge 展示指定数据信息,如:我的待办数、新任务数等。 +
+ +### 跳转链接 + +`href`定义跳转链接 + + + +
diff --git a/example/src/docs/zh-CN/badge/is-dot.md b/example/src/docs/zh-CN/badge/is-dot.md new file mode 100644 index 000000000..48a1abe9b --- /dev/null +++ b/example/src/docs/zh-CN/badge/is-dot.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Badge 标记 + + + +Badge 展示指定数据信息,如:我的待办数、新任务数等。 +
+ +### 小圆点标记 + +`is-dot` 显示小圆点标记 + + + +
diff --git a/example/src/docs/zh-CN/badge/max-num.md b/example/src/docs/zh-CN/badge/max-num.md new file mode 100644 index 000000000..6f2929a35 --- /dev/null +++ b/example/src/docs/zh-CN/badge/max-num.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Badge 标记 + + + +Badge 展示指定数据信息,如:我的待办数、新任务数等。 +
+ +### 计数最大值 + +`max` 超过最大值会显示 '{max}+' + + + +
diff --git a/example/src/docs/zh-CN/breadcrumb/based-on-routing.md b/example/src/docs/zh-CN/breadcrumb/based-on-routing.md new file mode 100644 index 000000000..7b2a7601c --- /dev/null +++ b/example/src/docs/zh-CN/breadcrumb/based-on-routing.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Breadcrumb 面包屑 + + + +Breadcrumb 面包屑导航,作用是告诉访问者他们目前在网站中的位置以及如何返回。 +
+ +### 基于路由动态生成 + + + +
diff --git a/example/src/docs/zh-CN/breadcrumb/custom-item.md b/example/src/docs/zh-CN/breadcrumb/custom-item.md new file mode 100644 index 000000000..0609a2a0f --- /dev/null +++ b/example/src/docs/zh-CN/breadcrumb/custom-item.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Breadcrumb 面包屑 + + + +Breadcrumb 面包屑导航,作用是告诉访问者他们目前在网站中的位置以及如何返回。 +
+ +### 自定义节点 + +设置子组件 BreadcrumbItem 的 默认插槽,自定义节点内容。`to` 设置路由跳转的对象,同时设置 `replace` 后将不会向 history 添加新记录。 + + + +
diff --git a/example/src/docs/zh-CN/breadcrumb/custom-separator.md b/example/src/docs/zh-CN/breadcrumb/custom-separator.md new file mode 100644 index 000000000..87abd38d1 --- /dev/null +++ b/example/src/docs/zh-CN/breadcrumb/custom-separator.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Breadcrumb 面包屑 + + + +Breadcrumb 面包屑导航,作用是告诉访问者他们目前在网站中的位置以及如何返回。 +
+ +### 自定义分隔符 + +设置 `separator` 或 `separator-icon` 属性,自定义分隔符。 + + + +
diff --git a/example/src/docs/zh-CN/breadcrumb/normal-item.md b/example/src/docs/zh-CN/breadcrumb/normal-item.md new file mode 100644 index 000000000..74a7691ef --- /dev/null +++ b/example/src/docs/zh-CN/breadcrumb/normal-item.md @@ -0,0 +1,29 @@ +
+

+ +

+ +## Breadcrumb 面包屑 + + + +Breadcrumb 面包屑导航,作用是告诉访问者他们目前在网站中的位置以及如何返回。 +
+ +### 基本用法 + + + +
+ +### Breadcrumb 属性 + + + +
+ +### Breadcrumb-Item 属性 + + + +
diff --git a/example/src/docs/zh-CN/bulletin-board/base-on-route.md b/example/src/docs/zh-CN/bulletin-board/base-on-route.md new file mode 100644 index 000000000..891c5b7e5 --- /dev/null +++ b/example/src/docs/zh-CN/bulletin-board/base-on-route.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## BulletinBoard 公告牌 + + + +BulletinBoard 公告牌组件,展现需要重点关注的信息。 +
+ +### 基于Route的跳转 + +基于 Route 的跳转是根据数据中的 `route` 字段进行跳转的。 + + + +
diff --git a/example/src/docs/zh-CN/bulletin-board/base-on-url.md b/example/src/docs/zh-CN/bulletin-board/base-on-url.md new file mode 100644 index 000000000..03e419470 --- /dev/null +++ b/example/src/docs/zh-CN/bulletin-board/base-on-url.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## BulletinBoard 公告牌 + + + +BulletinBoard 公告牌组件,展现需要重点关注的信息。 +
+ +### 基于Url的跳转 + +基于 Url 的跳转是根据数据中的 `url` 和 `target` 字段进行跳转的。 + + + +
diff --git a/example/src/docs/zh-CN/bulletin-board/basic-usage.md b/example/src/docs/zh-CN/bulletin-board/basic-usage.md new file mode 100644 index 000000000..133ebdfe3 --- /dev/null +++ b/example/src/docs/zh-CN/bulletin-board/basic-usage.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## BulletinBoard 公告牌 + + + +BulletinBoard 公告牌组件,展现需要重点关注的信息。 +
+ +### 基本用法 + +必须设置 `data` 属性设置公告牌公告信息数据,以及 `tab-title` 属性设置每个公告牌标题。 + + + +
+ + diff --git a/example/src/docs/zh-CN/bulletin-board/bulletin-board-title.md b/example/src/docs/zh-CN/bulletin-board/bulletin-board-title.md new file mode 100644 index 000000000..a67d49b2f --- /dev/null +++ b/example/src/docs/zh-CN/bulletin-board/bulletin-board-title.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## BulletinBoard 公告牌 + + + +BulletinBoard 公告牌组件,展现需要重点关注的信息。 +
+ +### 公告牌标题 + +可通过 `title` 设置公告牌标题。 + + + +
diff --git a/example/src/docs/zh-CN/bulletin-board/custom-new-bulletin-icon.md b/example/src/docs/zh-CN/bulletin-board/custom-new-bulletin-icon.md new file mode 100644 index 000000000..9969302fe --- /dev/null +++ b/example/src/docs/zh-CN/bulletin-board/custom-new-bulletin-icon.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## BulletinBoard 公告牌 + + + +BulletinBoard 公告牌组件,展现需要重点关注的信息。 +
+ +### 自定义新公告前缀 + +可通过 `icon` 自定义新公告前缀图标。 + + + +
diff --git a/example/src/docs/zh-CN/bulletin-board/custom-tab-title.md b/example/src/docs/zh-CN/bulletin-board/custom-tab-title.md new file mode 100644 index 000000000..24b073fba --- /dev/null +++ b/example/src/docs/zh-CN/bulletin-board/custom-tab-title.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## BulletinBoard 公告牌 + + + +BulletinBoard 公告牌组件,展现需要重点关注的信息。 +
+ +### 选项卡标题 + +可通过 `tab-title` 属性自定义选项卡标题。 + + + +
diff --git a/example/src/docs/zh-CN/bulletin-board/default-active-tab.md b/example/src/docs/zh-CN/bulletin-board/default-active-tab.md new file mode 100644 index 000000000..0323ab4fb --- /dev/null +++ b/example/src/docs/zh-CN/bulletin-board/default-active-tab.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## BulletinBoard 公告牌 + + + +BulletinBoard 公告牌组件,展现需要重点关注的信息。 +
+ +### 默认激活的选项卡 + +可通过 `active-name` 设置默认激活的选项卡,从 `1` 开始计算。 + + + +
diff --git a/example/src/docs/zh-CN/bulletin-board/show-more-link.md b/example/src/docs/zh-CN/bulletin-board/show-more-link.md new file mode 100644 index 000000000..01ef5e9e0 --- /dev/null +++ b/example/src/docs/zh-CN/bulletin-board/show-more-link.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## BulletinBoard 公告牌 + + + +BulletinBoard 公告牌组件,展现需要重点关注的信息。 +
+ +### 显示 “更多” 链接 + +可通过 `more-link` 显示并设置更多链接。 `show-more` 设置是否显示更多按钮,默认为 true。 + + + +
diff --git a/example/src/docs/zh-CN/button-group/basic-usage.md b/example/src/docs/zh-CN/button-group/basic-usage.md new file mode 100644 index 000000000..498f0fde9 --- /dev/null +++ b/example/src/docs/zh-CN/button-group/basic-usage.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## ButtonGroup 按钮组 + + + +以按钮组的方式出现,常用于多项类似操作。 +
+ +### 基本用法 + +通过 `v-model` 设置默认选中的按钮,并实现双向绑定。通过 `value` 也可设置默认选中按钮,但不能进行双向绑定。 + + + +
+ + diff --git a/example/src/docs/zh-CN/button-group/button-group-data.md b/example/src/docs/zh-CN/button-group/button-group-data.md new file mode 100644 index 000000000..90759a75e --- /dev/null +++ b/example/src/docs/zh-CN/button-group/button-group-data.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Buttongroup 按钮组 + + + +以按钮组的方式出现,常用于多项类似操作。 +
+ +### 按钮组数据 + +通过 `data` 属性设置按钮组数据,对象中的 text 为按钮显示文本,value 用于双向绑定时指定的值。 + + + +
diff --git a/example/src/docs/zh-CN/button-group/default-slot-usage.md b/example/src/docs/zh-CN/button-group/default-slot-usage.md new file mode 100644 index 000000000..b19683fc8 --- /dev/null +++ b/example/src/docs/zh-CN/button-group/default-slot-usage.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Buttongroup 按钮组 + + + +以按钮组的方式出现,常用于多项类似操作。 +
+ +### 默认插槽 + +使用默认插槽的方式时,ButtonGroup 的 `data、text-field、value-field、value / v-model、size` 属性对插槽中的按钮将不再生效。 + +但可根据使用场景在 Button 组件标签上对不同按钮设置不同的属性,具体参考 Button 组件属性。 + + + +
diff --git a/example/src/docs/zh-CN/button-group/dynamic-disable.md b/example/src/docs/zh-CN/button-group/dynamic-disable.md new file mode 100644 index 000000000..896c3ea33 --- /dev/null +++ b/example/src/docs/zh-CN/button-group/dynamic-disable.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Buttongroup 按钮组 + + + +以按钮组的方式出现,常用于多项类似操作。 +
+ +### 禁用状态 + +设置 `disabled` 属性为 true 可禁用整个按钮组。 + + + +
diff --git a/example/src/docs/zh-CN/button-group/plain-button-group.md b/example/src/docs/zh-CN/button-group/plain-button-group.md new file mode 100644 index 000000000..1bec414ec --- /dev/null +++ b/example/src/docs/zh-CN/button-group/plain-button-group.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Buttongroup 按钮组 + + + +以按钮组的方式出现,常用于多项类似操作。 +
+ +### 朴素按钮 + +设置 `plain` 属性为 true 可显示为朴素按钮样式。 + + + +
diff --git a/example/src/docs/zh-CN/button-group/size.md b/example/src/docs/zh-CN/button-group/size.md new file mode 100644 index 000000000..439bc91d7 --- /dev/null +++ b/example/src/docs/zh-CN/button-group/size.md @@ -0,0 +1,16 @@ +
+

+ +

+ +## ButtonGroup 按钮组 + + + +以按钮组的方式出现,常用于多项类似操作。 +
+ +### 设置组件大小 + +可以设置为:`medium`,`small`,`mini` + diff --git a/example/src/docs/zh-CN/button-group/text-value-field.md b/example/src/docs/zh-CN/button-group/text-value-field.md new file mode 100644 index 000000000..0a3d87ef6 --- /dev/null +++ b/example/src/docs/zh-CN/button-group/text-value-field.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Buttongroup 按钮组 + + + +以按钮组的方式出现,常用于多项类似操作。 +
+ +### 数据字段映射 + +若按钮组数据对象中的字段不是默认的 text 和 value ,则可通过 `text-field`、`value-field` 属性进行映射。 + + + +
diff --git a/example/src/docs/zh-CN/button/autofocus.md b/example/src/docs/zh-CN/button/autofocus.md new file mode 100644 index 000000000..ca3aa3a99 --- /dev/null +++ b/example/src/docs/zh-CN/button/autofocus.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Button 按钮 + + + +常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮、下拉按钮等类型。 + +
+ +### 聚焦 + +通过 `autofocus` 属性设置是否默认聚焦。 + + + +
diff --git a/example/src/docs/zh-CN/button/basic-usage.md b/example/src/docs/zh-CN/button/basic-usage.md new file mode 100644 index 000000000..f5133640a --- /dev/null +++ b/example/src/docs/zh-CN/button/basic-usage.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Button 按钮 + + + +常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮、下拉按钮等类型。 +
+ +### 基本用法 + + + +
+ + + +
diff --git a/example/src/docs/zh-CN/button/button-events.md b/example/src/docs/zh-CN/button/button-events.md new file mode 100644 index 000000000..f4a518e41 --- /dev/null +++ b/example/src/docs/zh-CN/button/button-events.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Button 按钮 + + + +常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮、下拉按钮等类型。 +
+ +### 事件 + +按钮的单击事件,该示例中单击按钮将会出现提示信息。 + + + +
diff --git a/example/src/docs/zh-CN/button/button-group.md b/example/src/docs/zh-CN/button/button-group.md new file mode 100644 index 000000000..a8f84f733 --- /dev/null +++ b/example/src/docs/zh-CN/button/button-group.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Button 按钮 + + + +常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮、下拉按钮等类型。 +
+ +### 按钮组 + + + +
diff --git a/example/src/docs/zh-CN/button/button-size.md b/example/src/docs/zh-CN/button/button-size.md new file mode 100644 index 000000000..743f0a334 --- /dev/null +++ b/example/src/docs/zh-CN/button/button-size.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Button 按钮 + + + +常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮、下拉按钮等类型。 +
+ +### 尺寸 + +通过 `size` 属性设置按钮不同的大小尺寸,包括 large、medium、small、mini 四种不同大小。不设置时为默认尺寸。 + + + +
diff --git a/example/src/docs/zh-CN/button/button-style.md b/example/src/docs/zh-CN/button/button-style.md new file mode 100644 index 000000000..6ffc93a1c --- /dev/null +++ b/example/src/docs/zh-CN/button/button-style.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Button 按钮 + + + +常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮、下拉按钮等类型。 +
+ +### 主题样式 + +通过 `type` 属性可以设置不同的主题样式,主要包括 primary、success、info、warning、danger、text。 + + + +
diff --git a/example/src/docs/zh-CN/button/circle-button.md b/example/src/docs/zh-CN/button/circle-button.md new file mode 100644 index 000000000..7f7ef6fb2 --- /dev/null +++ b/example/src/docs/zh-CN/button/circle-button.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Button 按钮 + + + +常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮、下拉按钮等类型。 +
+ +### 圆形按钮 + +直接配置 `circle` 属性为 true,即可展示为圆形按钮的形式。 + + + +
diff --git a/example/src/docs/zh-CN/button/default-focus.md b/example/src/docs/zh-CN/button/default-focus.md new file mode 100644 index 000000000..e5735a2c9 --- /dev/null +++ b/example/src/docs/zh-CN/button/default-focus.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Button 按钮 + + + +常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮、下拉按钮等类型。 +
+ +### 默认聚焦 + +配置 `autofocus` 属性的按钮,将默认展示为聚焦状态。 + + + +
diff --git a/example/src/docs/zh-CN/button/dynamic-disable-button.md b/example/src/docs/zh-CN/button/dynamic-disable-button.md new file mode 100644 index 000000000..9703d1060 --- /dev/null +++ b/example/src/docs/zh-CN/button/dynamic-disable-button.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Button 按钮 + + + +常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮、下拉按钮等类型。 +
+ +### 动态禁用按钮 + +设置 `disabled` 属性为 true 后,可以禁用按钮。 + + + +
diff --git a/example/src/docs/zh-CN/button/icon-button.md b/example/src/docs/zh-CN/button/icon-button.md new file mode 100644 index 000000000..a73d5a8be --- /dev/null +++ b/example/src/docs/zh-CN/button/icon-button.md @@ -0,0 +1,24 @@ +
+

+ +

+ +## Button 按钮 + + + +常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮、下拉按钮等类型。 +
+ +### 图标按钮 + +指定 `icon` 属性值为需要的 Icon 图标即可展示为图标按钮。 + +:::tip Icon 图标用法 +先从 `@opentiny/vue-icon` 中导入需要的 Icon,再在 data 函数中初始化 Icon 组件并赋值给一个属性。最后在模板中通过 `icon` 属性进行引用。 +通过 `native-type` 设置 button、image 两种按钮的表单类型。该属性仅当属性 type 为 button 或 image 时使用。该属性的可选值为 button / submit / reset。 +::: + + + +
diff --git a/example/src/docs/zh-CN/button/img-button.md b/example/src/docs/zh-CN/button/img-button.md new file mode 100644 index 000000000..cb959ba38 --- /dev/null +++ b/example/src/docs/zh-CN/button/img-button.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Button 按钮 + + + +常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮、下拉按钮等类型。 +
+ +### 图片按钮 + +以默认插槽的用法嵌入 img 标签,并引入图片。 + + + +
diff --git a/example/src/docs/zh-CN/button/plain-button.md b/example/src/docs/zh-CN/button/plain-button.md new file mode 100644 index 000000000..8c7825c99 --- /dev/null +++ b/example/src/docs/zh-CN/button/plain-button.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Button 按钮 + + + +常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮、下拉按钮等类型。 +
+ +### 朴素按钮 + +配置 `plain` 属性为 true,即可展示为朴素按钮的形式。 + + + +
diff --git a/example/src/docs/zh-CN/button/reset-time.md b/example/src/docs/zh-CN/button/reset-time.md new file mode 100644 index 000000000..c8b005b5c --- /dev/null +++ b/example/src/docs/zh-CN/button/reset-time.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Button 按钮 + + + +常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮、下拉按钮等类型。 +
+ +### 防止表单重复提交 + +通过 `reset-time` 属性可设置单击后按钮禁用的时长,默认的禁用时长为 1000 毫秒。 + +可用于防止按钮连续点击出现表单重复提交的问题。 + + + +
diff --git a/example/src/docs/zh-CN/button/round.md b/example/src/docs/zh-CN/button/round.md new file mode 100644 index 000000000..4026d6f21 --- /dev/null +++ b/example/src/docs/zh-CN/button/round.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Button 按钮 + + + +常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮、下拉按钮等类型。 + +
+ +### 防止表单重复提交 + +通过 `round` 属性设置是否圆角按钮。 + + + +
diff --git a/example/src/docs/zh-CN/button/show-loading.md b/example/src/docs/zh-CN/button/show-loading.md new file mode 100644 index 000000000..921c23871 --- /dev/null +++ b/example/src/docs/zh-CN/button/show-loading.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Button 按钮 + + + +常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮、下拉按钮等类型。 +
+ +### 显示加载中 + +直接配置 `loading` 属性为 true,即可展示为加载中的样式。 + + + +
diff --git a/example/src/docs/zh-CN/button/text-button.md b/example/src/docs/zh-CN/button/text-button.md new file mode 100644 index 000000000..ee13ed83f --- /dev/null +++ b/example/src/docs/zh-CN/button/text-button.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Button 按钮 + + + +常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮、下拉按钮等类型。 +
+ +### 文字按钮 + +设置 `type` 属性为 `text` 即为文字按钮,可在标签子级或者通过 `text` 属性设置显示内容。 + + + +
diff --git a/example/src/docs/zh-CN/calendar/basic-usage.md b/example/src/docs/zh-CN/calendar/basic-usage.md new file mode 100644 index 000000000..61306605b --- /dev/null +++ b/example/src/docs/zh-CN/calendar/basic-usage.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Calendar 日历 + + + +按照日历形式展示数据的容器。 +
+ +### 基本用法 + +默认以月的形式展示当月的每一天。 + + + +
+ + diff --git a/example/src/docs/zh-CN/calendar/calendar-mode.md b/example/src/docs/zh-CN/calendar/calendar-mode.md new file mode 100644 index 000000000..9cae0b952 --- /dev/null +++ b/example/src/docs/zh-CN/calendar/calendar-mode.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Calendar 日历 + + + +按照日历形式展示数据的容器。 +
+ +### 显示模式 + +通过 `mode` 属性指定以年的形式显示,将展示当年的每个月份。可选值有 year、month。 + + + +
diff --git a/example/src/docs/zh-CN/calendar/custom-calendar-toolbar.md b/example/src/docs/zh-CN/calendar/custom-calendar-toolbar.md new file mode 100644 index 000000000..2259b180d --- /dev/null +++ b/example/src/docs/zh-CN/calendar/custom-calendar-toolbar.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Calendar 日历 + + + +按照日历形式展示数据的容器。 +
+ +### 自定义工具栏 + +通过作用域插槽 tool 自定义需要的工具栏。 + + + +
diff --git a/example/src/docs/zh-CN/calendar/custom-day-cell.md b/example/src/docs/zh-CN/calendar/custom-day-cell.md new file mode 100644 index 000000000..a7588d51c --- /dev/null +++ b/example/src/docs/zh-CN/calendar/custom-day-cell.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Calendar 日历 + + + +按照日历形式展示数据的容器。 +
+ +### 自定义日期单元格 + +通过作用域插槽 day 自定义日期单元格。 + + + +
diff --git a/example/src/docs/zh-CN/calendar/dynamic-add-schedule.md b/example/src/docs/zh-CN/calendar/dynamic-add-schedule.md new file mode 100644 index 000000000..45bf81630 --- /dev/null +++ b/example/src/docs/zh-CN/calendar/dynamic-add-schedule.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## Calendar 日历 + + + +按照日历形式展示数据的容器。 +
+ +### 添加日程事件 + +通过 events 属性可以指定事件列表,它是一个对象数组,对象中包含如下字段: + +:::tip events 说明 +time:指定需要展示事件的日期 +title:指定事件标题 +content:指定事件的具体内容 type:指定当鼠标悬停在事件标题上时,弹出的展示事件具体内容的提示框的主题,包括 warning、error、info、success +::: + + + +
diff --git a/example/src/docs/zh-CN/calendar/show-selected-date.md b/example/src/docs/zh-CN/calendar/show-selected-date.md new file mode 100644 index 000000000..0aaf9f0be --- /dev/null +++ b/example/src/docs/zh-CN/calendar/show-selected-date.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Calendar 日历 + + + +按照日历形式展示数据的容器。 +
+ +### 显示选中日期 + +以月的形式展示时,指定 show-selected 属性后,单击日期单元格,将会在日历框上方展示当前选中的日期。 + + + +
diff --git a/example/src/docs/zh-CN/carousel/autoplay.md b/example/src/docs/zh-CN/carousel/autoplay.md new file mode 100644 index 000000000..74414f58a --- /dev/null +++ b/example/src/docs/zh-CN/carousel/autoplay.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Carousel 走马灯 + + + +常用于一组图片或卡片轮播,当内容空间不足时,可以用走马灯的形式进行收纳,进行轮播展现。 +
+ +### 自动切换 + +配置 `autoplay` 属性为 true 后,走马灯的幻灯片内容将自动轮播切换。 + + + +
diff --git a/example/src/docs/zh-CN/carousel/basic-usage.md b/example/src/docs/zh-CN/carousel/basic-usage.md new file mode 100644 index 000000000..6eb8342ac --- /dev/null +++ b/example/src/docs/zh-CN/carousel/basic-usage.md @@ -0,0 +1,29 @@ +
+

+ +

+ +## Carousel 走马灯 + + + +常用于一组图片或卡片轮播,当内容空间不足时,可以用走马灯的形式进行收纳,进行轮播展现。 +
+ +### 基本用法 + + + +
+ +### Carousel 属性 + + + +
+ +### Carousel-Item 属性 + + + +
diff --git a/example/src/docs/zh-CN/carousel/card-mode.md b/example/src/docs/zh-CN/carousel/card-mode.md new file mode 100644 index 000000000..7defc0497 --- /dev/null +++ b/example/src/docs/zh-CN/carousel/card-mode.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Carousel 走马灯 + + + +常用于一组图片或卡片轮播,当内容空间不足时,可以用走马灯的形式进行收纳,进行轮播展现。 +
+ +### 基本用法 + +配置 `type` 属性为 card 后,走马灯将以卡片形式进行展示。 + + + +
diff --git a/example/src/docs/zh-CN/carousel/carousel-arrow.md b/example/src/docs/zh-CN/carousel/carousel-arrow.md new file mode 100644 index 000000000..753e1e184 --- /dev/null +++ b/example/src/docs/zh-CN/carousel/carousel-arrow.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## Carousel 走马灯 + + + +常用于一组图片或卡片轮播,当内容空间不足时,可以用走马灯的形式进行收纳,进行轮播展现。 +
+ +### 总是显示切换箭头 + + + +### hover 时显示切换箭头 + + + +### 隐藏切换箭头 + + + +
diff --git a/example/src/docs/zh-CN/carousel/close-loop.md b/example/src/docs/zh-CN/carousel/close-loop.md new file mode 100644 index 000000000..06837daad --- /dev/null +++ b/example/src/docs/zh-CN/carousel/close-loop.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Carousel 走马灯 + + + +常用于一组图片或卡片轮播,当内容空间不足时,可以用走马灯的形式进行收纳,进行轮播展现。 +
+ +### 关闭循环轮播 + +配置 `loop` 属性为 false 后,若走马灯幻灯片已切换到最后一项,则将不能再从第一项开始循环切换。即切换到最后一项时,右侧切换箭头不再显示,切换到第一项时,左侧切换箭头不再显示。 + + + +
diff --git a/example/src/docs/zh-CN/carousel/custom-height.md b/example/src/docs/zh-CN/carousel/custom-height.md new file mode 100644 index 000000000..df64e208a --- /dev/null +++ b/example/src/docs/zh-CN/carousel/custom-height.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Carousel 走马灯 + + + +常用于一组图片或卡片轮播,当内容空间不足时,可以用走马灯的形式进行收纳,进行轮播展现。 +
+ +### 关闭循环轮播 + + + +
diff --git a/example/src/docs/zh-CN/carousel/indicator-trigger.md b/example/src/docs/zh-CN/carousel/indicator-trigger.md new file mode 100644 index 000000000..d151842da --- /dev/null +++ b/example/src/docs/zh-CN/carousel/indicator-trigger.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Carousel 走马灯 + + + +常用于一组图片或卡片轮播,当内容空间不足时,可以用走马灯的形式进行收纳,进行轮播展现。 +
+ +### 指示器和触发方式 + +走马灯指示器默认显示在幻灯片内容上,配置 `indicator-position` 为 outside 后,将显示在外部。
+ +配置 `trigger` 为 click ,可以修改指示器触发方式为单击,默认鼠标悬停到指示器时,走马灯幻灯片就会对应切换。 + + + +
diff --git a/example/src/docs/zh-CN/carousel/initial-index.md b/example/src/docs/zh-CN/carousel/initial-index.md new file mode 100644 index 000000000..c95906fc8 --- /dev/null +++ b/example/src/docs/zh-CN/carousel/initial-index.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Carousel 走马灯 + + + +常用于一组图片或卡片轮播,当内容空间不足时,可以用走马灯的形式进行收纳,进行轮播展现。 +
+ +### 播放开始位置 + + + +
diff --git a/example/src/docs/zh-CN/carousel/manual-play.md b/example/src/docs/zh-CN/carousel/manual-play.md new file mode 100644 index 000000000..e29f7c2a2 --- /dev/null +++ b/example/src/docs/zh-CN/carousel/manual-play.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Carousel 走马灯 + + + +常用于一组图片或卡片轮播,当内容空间不足时,可以用走马灯的形式进行收纳,进行轮播展现。 +
+ +### 手动轮播 + +调用 `setActiveItem()`、`next()`、`prev()` 方法可根据需要进行轮播。`initial-index` 属性可以指定初始激活的幻灯片索引。 + + + +
diff --git a/example/src/docs/zh-CN/carousel/play-interval.md b/example/src/docs/zh-CN/carousel/play-interval.md new file mode 100644 index 000000000..e24ba2f2d --- /dev/null +++ b/example/src/docs/zh-CN/carousel/play-interval.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Carousel 走马灯 + + + +常用于一组图片或卡片轮播,当内容空间不足时,可以用走马灯的形式进行收纳,进行轮播展现。 +
+ +### 轮播间隔时间 + +走马灯幻灯片轮播间隔时间默认为 3000 毫秒,通过 `interval` 属性可以自定义。 + + + +
diff --git a/example/src/docs/zh-CN/carousel/show-title.md b/example/src/docs/zh-CN/carousel/show-title.md new file mode 100644 index 000000000..130f19a23 --- /dev/null +++ b/example/src/docs/zh-CN/carousel/show-title.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Carousel 走马灯 + + + +常用于一组图片或卡片轮播,当内容空间不足时,可以用走马灯的形式进行收纳,进行轮播展现。 +
+ +### 显示标题 +通过 `title` 配置显示标题,需要与 `show-title` 结合使用。 + + +
diff --git a/example/src/docs/zh-CN/carousel/up-down-carousel.md b/example/src/docs/zh-CN/carousel/up-down-carousel.md new file mode 100644 index 000000000..73041c6e0 --- /dev/null +++ b/example/src/docs/zh-CN/carousel/up-down-carousel.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Carousel 走马灯 + + + +常用于一组图片或卡片轮播,当内容空间不足时,可以用走马灯的形式进行收纳,进行轮播展现。 +
+ +### 纵向轮播 + +配置 `type` 属性为 vertical 即可实现纵向轮播。 + + + +
diff --git a/example/src/docs/zh-CN/cascader-panel/basic-usage.md b/example/src/docs/zh-CN/cascader-panel/basic-usage.md new file mode 100644 index 000000000..83f78b233 --- /dev/null +++ b/example/src/docs/zh-CN/cascader-panel/basic-usage.md @@ -0,0 +1,31 @@ +
+

+ +

+ +## CascaderPanel 级联面板 + + + +级联面板与级联选择器一样,有单选、多选、动态加载等多种功能。 +
+ +### 基本用法 + +通过 `options` 来指定选项,也可通过 `props` 来设置多选、动态加载等功能,具体详情见下方 API 表格。 + + + +
+ +### CascaderPanel 属性 + + + +
+ +### CascaderPanel Props + + + +
diff --git a/example/src/docs/zh-CN/cascader-panel/cascader-panel-props.md b/example/src/docs/zh-CN/cascader-panel/cascader-panel-props.md new file mode 100644 index 000000000..b37f06e85 --- /dev/null +++ b/example/src/docs/zh-CN/cascader-panel/cascader-panel-props.md @@ -0,0 +1,27 @@ +
+

+ +

+ +## CascaderPanel 级联面板 + + + +级联面板与级联选择器一样,有单选、多选、动态加载等多种功能。 + +
+ +### Props 选项 + +:::tip Props + +通过 `children` 指定子级选项,默认值为 children。 +通过 `emitPath` 是否返回由该节点所在的各级菜单的值所组成的数组。 +通过 `label` 指定显示选项 label 值,默认为 label。 +通过 `value` 指定值选项 value 值,默认为 value + +::: + + + + diff --git a/example/src/docs/zh-CN/cascader-panel/change.md b/example/src/docs/zh-CN/cascader-panel/change.md new file mode 100644 index 000000000..4a305e672 --- /dev/null +++ b/example/src/docs/zh-CN/cascader-panel/change.md @@ -0,0 +1,31 @@ +
+

+ +

+ +## CascaderPanel 级联面板 + + + +级联面板与级联选择器一样,有单选、多选、动态加载等多种功能。 + +
+ +### 选中节点变化 + +通过 `change` 点击节点后触发的事件,回调参数为 选中节点的值 +通过 `clearCheckedNodes` 清除选中的节点。 +通过 `getCheckedNodes` 获取选中的节点。 + + + + +
+ +### 展开节点发生变化 + +通过 `expand-change` 点击展开节点发生变化时触发,回调参数为 各父级选项值组成的数组 + + + +
diff --git a/example/src/docs/zh-CN/cascader-panel/custom-option-content.md b/example/src/docs/zh-CN/cascader-panel/custom-option-content.md new file mode 100644 index 000000000..5452915ec --- /dev/null +++ b/example/src/docs/zh-CN/cascader-panel/custom-option-content.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## CascaderPanel 级联面板 + + + +级联面板与级联选择器一样,有单选、多选、动态加载等多种功能。 +
+ +### 自定义节点内容 + +可以通过 `scoped slot` 对级联面板的备选项的节点内容进行自定义,`scoped slot` 会传入两个字段 `node` 和 `data`,分别表示当前节点的 Node 对象和数据。 + + + +
diff --git a/example/src/docs/zh-CN/cascader/auto-load.md b/example/src/docs/zh-CN/cascader/auto-load.md new file mode 100644 index 000000000..eda902ff3 --- /dev/null +++ b/example/src/docs/zh-CN/cascader/auto-load.md @@ -0,0 +1,27 @@ +
+

+ +

+ +## Cascader 级联选择器 + + + +当一个数据集合有清晰的层级结构时,可通过级联选择器逐级查看并选择。 +
+ +### 动态加载 + +当选中某一级时,动态加载该级下的选项。通过 `props` 属性中的 `lazy` 开启动态加载,并通过 `lazyload` 来设置加载数据源的方法。`lazyload` 方法有两个参数,第一个参数 node 为当前点击的节点,第二个 resolve 为数据加载完成的回调(必须调用)。为了更准确的显示节点的状态,还可以对节点数据添加是否为叶子节点的标志位 (默认字段为 leaf,可通过 props.leaf 修改),否则会简单的以有无子节点来判断是否为叶子节点。 + + + +
+ +### 动态加载且父子级不相关联 + +当选中某一级时,动态加载该级下的选项。通过 `props` 属性中的 `lazy` 开启动态加载,并通过 `lazyload` 来设置加载数据源的方法。通过 `props` 属性中的 `checkStrictly` 开启父子级不相关联。 + + + +
diff --git a/example/src/docs/zh-CN/cascader/basic-usage.md b/example/src/docs/zh-CN/cascader/basic-usage.md new file mode 100644 index 000000000..5634bb279 --- /dev/null +++ b/example/src/docs/zh-CN/cascader/basic-usage.md @@ -0,0 +1,39 @@ +
+

+ +

+ +## Cascader 级联选择器 + + + +当一个数据集合有清晰的层级结构时,可通过级联选择器逐级查看并选择。 +
+ +### 基本用法 + +通过 `options` 属性指定选项数组即可渲染出一个级联选择器。 + + + +
+ +### hover 触发子菜单 + +通过 `props.expandTrigger` 可以指定展开子级菜单的触发方式为 `hover`,默认为 `click` 。 + + + +
+ +### Cascader 属性 + + + +
+ +### Cascader Props + + + +
diff --git a/example/src/docs/zh-CN/cascader/check-strictly.md b/example/src/docs/zh-CN/cascader/check-strictly.md new file mode 100644 index 000000000..260227c72 --- /dev/null +++ b/example/src/docs/zh-CN/cascader/check-strictly.md @@ -0,0 +1,27 @@ +
+

+ +

+ +## Cascader 级联选择器 + + + +当一个数据集合有清晰的层级结构时,可通过级联选择器逐级查看并选择。 +
+ +### 父子级不相关联 + +通过 `props.checkStrictly = true` 来设置父子节点取消选中关联,从而达到选择任意一级选项的目的。默认单选模式下,只能选择叶子节点。 + + + +
+ +### 多选选择任意一级选项 + +在多选模式下同时取消父子节点关联,选择任意一级选项。 + + + +
diff --git a/example/src/docs/zh-CN/cascader/clearable.md b/example/src/docs/zh-CN/cascader/clearable.md new file mode 100644 index 000000000..e8ad015a3 --- /dev/null +++ b/example/src/docs/zh-CN/cascader/clearable.md @@ -0,0 +1,36 @@ +
+

+ +

+ +## Cascader 级联选择器 + + + +当一个数据集合有清晰的层级结构时,可通过级联选择器逐级查看并选择。 + +
+ +### 可清空 + +通过 `clearable` 属性设置输入框可清空。 + + + +
+ +### 分隔符 + +通过 `separator` 属性设置选项的分隔符。 + + + +
+ +### 尺寸 + +通过 `size` 属性设置尺寸的大小,可选值为 medium / small / mini。 + + + +
diff --git a/example/src/docs/zh-CN/cascader/default-multiple.md b/example/src/docs/zh-CN/cascader/default-multiple.md new file mode 100644 index 000000000..443c20161 --- /dev/null +++ b/example/src/docs/zh-CN/cascader/default-multiple.md @@ -0,0 +1,27 @@ +
+

+ +

+ +## Cascader 级联选择器 + + + +当一个数据集合有清晰的层级结构时,可通过级联选择器逐级查看并选择。 +
+ +### 多选 + +通过 `props.multiple = true` 来开启多选模式。 + + + +
+ +### 折叠展示 Tag + +在开启多选模式后,默认情况下会展示所有已选中的选项的 Tag,可以使用 `collapse-tags` 来折叠 Tag 。 +通过 `disabled` 设置组件是否禁用,默认值为 false 。 + + +
diff --git a/example/src/docs/zh-CN/cascader/disabled-items.md b/example/src/docs/zh-CN/cascader/disabled-items.md new file mode 100644 index 000000000..b7264d8dc --- /dev/null +++ b/example/src/docs/zh-CN/cascader/disabled-items.md @@ -0,0 +1,28 @@ +
+

+ +

+ +## Cascader 级联选择器 + + + +当一个数据集合有清晰的层级结构时,可通过级联选择器逐级查看并选择。 + +
+ +### 禁用选项 + +通过在数据源中设置 `disabled` 字段来声明该选项是禁用的,本例中,`options` 指定的数组中的第一个元素含有 `disabled: true` 键值对,因此是禁用的。在默认情况下,Cascader 会检查数据中每一项的 `disabled` 字段是否为 `true`,如果你的数据中表示禁用含义的字段名不为 `disabled`,可以通过 `props.disabled` 属性来指定(详见 Cascader Props 的 API 表格)。当然,`value`、`label` 和 `children` 这三个字段名也可以通过同样的方式指定。 + + + +
+ +### 指定属性值 + +通过 `label` 属性设置指定选项标签为选项对象的某个属性值,默认值为 label。 + + + +
diff --git a/example/src/docs/zh-CN/cascader/events.md b/example/src/docs/zh-CN/cascader/events.md new file mode 100644 index 000000000..d120496d2 --- /dev/null +++ b/example/src/docs/zh-CN/cascader/events.md @@ -0,0 +1,28 @@ +
+

+ +

+ +## Cascader 级联选择器 + + + +当一个数据集合有清晰的层级结构时,可通过级联选择器逐级查看并选择。 + +
+ +### 事件 + +Cascader 级联选择器的事件有:`change`、`expand-change`、`blur`、`focus`、`visible-change`。 + + + +
+ +### 节点返回的数据类型 + +`emitPath` 在选中节点改变时,是否返回由该节点所在的各级菜单的值所组成的数组,若设置 false,则只返回该节点的值 + + + +
diff --git a/example/src/docs/zh-CN/cascader/filterable.md b/example/src/docs/zh-CN/cascader/filterable.md new file mode 100644 index 000000000..134a800b2 --- /dev/null +++ b/example/src/docs/zh-CN/cascader/filterable.md @@ -0,0 +1,52 @@ +
+

+ +

+ +## Cascader 级联选择器 + + + +当一个数据集合有清晰的层级结构时,可通过级联选择器逐级查看并选择。 + +
+ +### 可搜索 + +将 `filterable` 赋值为 `true` 即可打开搜索功能,默认会匹配节点的 `label` 或所有父节点的 `label` (由 `show-all-levels` 决定)中包含输入值的选项。 `empty` 无匹配选项时显示的内容 + + + +
+ +### 搜索延时 + +通过 `debounce` 属性可以设置搜索关键词输入的去抖延迟,默认值为 300 毫秒。 + + + +
+ +### 多选可搜索 + +多选模式下开启搜索功能。 + + + +
+ +### 自定义搜索逻辑 + +` filter-method` 自定义搜索逻辑,第一个参数是节点 node,第二个参数是搜索关键词 keyword,通过返回布尔值表示是否命中,如果需要选择父级,通过 props.checkStrictly = true 来设置父子节点取消选中关联,从而达到选择任意一级选项的目的。默认单选模式下,只能选择叶子节点。 + + + +
+ +### 占位文本 + +输入框占位文本。 + + + +
diff --git a/example/src/docs/zh-CN/cascader/props-children.md b/example/src/docs/zh-CN/cascader/props-children.md new file mode 100644 index 000000000..917bcc922 --- /dev/null +++ b/example/src/docs/zh-CN/cascader/props-children.md @@ -0,0 +1,26 @@ +
+

+ +

+ +## Cascader 级联选择器 + + + +当一个数据集合有清晰的层级结构时,可通过级联选择器逐级查看并选择。 + +
+ +### 指定选项 + +:::tip Props + +通过 `children ` 指定选项的子选项,默认为 children 。 +通过 `value` 指定指定选项的 value 值,默认为 value 。 +通过 `label` 指定选项标签,默认为 label 。 + +::: + + + +
diff --git a/example/src/docs/zh-CN/cascader/show-all-levels.md b/example/src/docs/zh-CN/cascader/show-all-levels.md new file mode 100644 index 000000000..43b110221 --- /dev/null +++ b/example/src/docs/zh-CN/cascader/show-all-levels.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Cascader 级联选择器 + + + +当一个数据集合有清晰的层级结构时,可通过级联选择器逐级查看并选择。 +
+ +### 仅显示最后一级 + +属性 `show-all-levels` 定义了是否显示完整的路径,将其赋值为 `false` 则仅显示最后一级,默认为 `true` ,显示选中项所在的完整路径。 + + + +
diff --git a/example/src/docs/zh-CN/checkbox/basic-usage.md b/example/src/docs/zh-CN/checkbox/basic-usage.md new file mode 100644 index 000000000..04f1d3c3f --- /dev/null +++ b/example/src/docs/zh-CN/checkbox/basic-usage.md @@ -0,0 +1,33 @@ +
+

+ +

+ +## Checkbox 复选框 + + + +用于配置不同场景的选项,提供用户可在一组选项中进行多选。 +
+ +### 基本用法 + + + +
+ +### Checkbox 属性 + + + +
+ +### Checkbox-Button 属性 + + + +
+ +### Checkbox-Group 属性 + + diff --git a/example/src/docs/zh-CN/checkbox/checkbox-button.md b/example/src/docs/zh-CN/checkbox/checkbox-button.md new file mode 100644 index 000000000..bce150d32 --- /dev/null +++ b/example/src/docs/zh-CN/checkbox/checkbox-button.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Checkbox 复选框 + + + +用于配置不同场景的选项,提供用户可在一组选项中进行多选。 +
+ +### 按钮形式复选框 + +在 `checkbox-group` 元素中嵌入 `checkbox-button` 即可实现按钮形式的复选框组。 +通过 `fill` 按钮形式的 Checkbox 激活时的填充色和边框色,默认值为:#409EFF。 + + + +
diff --git a/example/src/docs/zh-CN/checkbox/checkbox-events.md b/example/src/docs/zh-CN/checkbox/checkbox-events.md new file mode 100644 index 000000000..072e3c8cc --- /dev/null +++ b/example/src/docs/zh-CN/checkbox/checkbox-events.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Checkbox 复选框 + + + +用于配置不同场景的选项,提供用户可在一组选项中进行多选。 + +
+ +### 事件 + +勾选值改变后将触发 `change` 事件。 + + + +
diff --git a/example/src/docs/zh-CN/checkbox/checkbox-group.md b/example/src/docs/zh-CN/checkbox/checkbox-group.md new file mode 100644 index 000000000..c001f0ba8 --- /dev/null +++ b/example/src/docs/zh-CN/checkbox/checkbox-group.md @@ -0,0 +1,33 @@ +
+

+ +

+ +## Checkbox 复选框 + + + +用于配置不同场景的选项,提供用户可在一组选项中进行多选。 +
+ +### 复选框组 + +通过 `checkbox-group` 元素把多个 `checkbox` 元素管理为一组,在 `checkbox-group` 中使用 `v-model` 绑定 Array 类型的变量即可实现双向绑定。 `checkbox` 的 `label` 属性是其对应的值,若该标签中无内容,则该属性也充当 checkbox 后的介绍。`label` 与数组中的元素值相对应,如果存在指定的值则为选中状态,否则为不选中。 + + + +### 配置式复选框组 + +提供 `options` 属性,支持通过配置对象数组数据的形式来渲染多选框组。使用该属性后,可以不用再在标签中以插槽的形式插入 `checkbox` 或 `checkbox-button` 元素。 + +
+ +`options` 对象数组中包括三个字段:`label`、`text`、`events`。 + +
+ +另外还提供 `type` 属性,配合 `options` 属性一起使用,默认值为 `checkbox`。还可以配置为 `button`,配置后复选框组将以按钮的形式展示。 + + + +
diff --git a/example/src/docs/zh-CN/checkbox/checkbox-slot.md b/example/src/docs/zh-CN/checkbox/checkbox-slot.md new file mode 100644 index 000000000..9d46bb945 --- /dev/null +++ b/example/src/docs/zh-CN/checkbox/checkbox-slot.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Checkbox 复选框 + + + +用于配置不同场景的选项,提供用户可在一组选项中进行多选。 + +
+ +### 插槽 + +Checkbox 的内容 + + + +
diff --git a/example/src/docs/zh-CN/checkbox/content-overflow.md b/example/src/docs/zh-CN/checkbox/content-overflow.md new file mode 100644 index 000000000..5de916459 --- /dev/null +++ b/example/src/docs/zh-CN/checkbox/content-overflow.md @@ -0,0 +1,23 @@ +
+

+ +

+ +## Checkbox 复选框 + + + +用于配置不同场景的选项,提供用户可在一组选项中进行多选。 +
+ +### 内容超出时的提示信息 + +若复选框后的介绍文字超出时,可以通过 Tooltip 组件增加提示信息,鼠标悬停时可提示所有内容。 + +
+ +在 `checkbox` 元素上配置 `border` 属性为 true,可显示边框。 + + + +
diff --git a/example/src/docs/zh-CN/checkbox/dynamic-create-checkbox.md b/example/src/docs/zh-CN/checkbox/dynamic-create-checkbox.md new file mode 100644 index 000000000..0ea588379 --- /dev/null +++ b/example/src/docs/zh-CN/checkbox/dynamic-create-checkbox.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Checkbox 复选框 + + + +用于配置不同场景的选项,提供用户可在一组选项中进行多选。 +
+ +### 动态生成复选框组 + +复选框组所需数据可通过请求服务从后台取得,然后动态生成。 + + + +
diff --git a/example/src/docs/zh-CN/checkbox/indeterminate.md b/example/src/docs/zh-CN/checkbox/indeterminate.md new file mode 100644 index 000000000..7d5f66e3f --- /dev/null +++ b/example/src/docs/zh-CN/checkbox/indeterminate.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Checkbox 复选框 + + + +用于配置不同场景的选项,提供用户可在一组选项中进行多选。 +
+ +### 全选与半选 + +在 `checkbox` 元素中配置 `indeterminate` 属性为 true 后,勾选框将展示为半选的样式。 + + + +
diff --git a/example/src/docs/zh-CN/checkbox/min-max.md b/example/src/docs/zh-CN/checkbox/min-max.md new file mode 100644 index 000000000..c50982e63 --- /dev/null +++ b/example/src/docs/zh-CN/checkbox/min-max.md @@ -0,0 +1,28 @@ +
+

+ +

+ +## Checkbox 复选框 + + + +用于配置不同场景的选项,提供用户可在一组选项中进行多选。 + +
+ +### 可选数量限制 + +在 `checkbox-group` 上可通过 `min`、`max` 属性指定可勾选项目的最小、最大值。 + + + +
+ +### 当前是否勾选 + +在 `checked` 当前是否勾选,通过 `disabled` 设置组件是否禁用。 + + + +
diff --git a/example/src/docs/zh-CN/checkbox/text.md b/example/src/docs/zh-CN/checkbox/text.md new file mode 100644 index 000000000..bcf41c08a --- /dev/null +++ b/example/src/docs/zh-CN/checkbox/text.md @@ -0,0 +1,28 @@ +
+

+ +

+ +## Checkbox 复选框 + + + +用于配置不同场景的选项,提供用户可在一组选项中进行多选。 + +
+ +### 文本 + +在 `text` 属性设置文本内容 +通过 `true-label` 设置选中的值, `false-label` 设置未选中的值。 + + + +
+ +### 文本选择 + +通过 `true-label` 设置选中的值, `false-label` 设置未选中的值。 + + + diff --git a/example/src/docs/zh-CN/checkbox/vertical-checkbox.md b/example/src/docs/zh-CN/checkbox/vertical-checkbox.md new file mode 100644 index 000000000..764b1cd21 --- /dev/null +++ b/example/src/docs/zh-CN/checkbox/vertical-checkbox.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Checkbox 复选框 + + + +用于配置不同场景的选项,提供用户可在一组选项中进行多选。 +
+ +### 垂直布局 + +在 `checkbox-group` 元素上设置 `vertical` 为 true,则其管理的 `checkbox-button` 或 `checkbox` 将展示为垂直布局。 + + + +
diff --git a/example/src/docs/zh-CN/checkbox/with-border.md b/example/src/docs/zh-CN/checkbox/with-border.md new file mode 100644 index 000000000..8b726d2f3 --- /dev/null +++ b/example/src/docs/zh-CN/checkbox/with-border.md @@ -0,0 +1,23 @@ +
+

+ +

+ +## Checkbox 复选框 + + + +用于配置不同场景的选项,提供用户可在一组选项中进行多选。 +
+ +### 尺寸 + +当复选框为按钮形式时,通过 `size` 属性可以设置按钮复选框的尺寸,可选项有 medium、small、mini。 + +
+ +在 `checkbox-button` 上设置 `disabled` 属性,将禁用某一个复选按钮,若在 `checkbox-group` 标签上配置 `disabled` 属性,则禁用所有复选按钮。 + + + +
diff --git a/example/src/docs/zh-CN/collapse/accordion.md b/example/src/docs/zh-CN/collapse/accordion.md new file mode 100644 index 000000000..8015192c5 --- /dev/null +++ b/example/src/docs/zh-CN/collapse/accordion.md @@ -0,0 +1,23 @@ +
+

+ +

+ +## Collapse 折叠面板 + + + +内容区可指定动态页面或自定义 html 等,支持展开收起操作。 + +
+ +### 手风琴效果 + +配置 `accordion` 属性为 true 后,折叠面板将展示手风琴效果。 +配置 `v-model` 设置当前激活的面板(如果是手风琴模式,绑定值类型需要为 string ,否则为 array ) +`change` 事件,在当前激活面板改变时触发,参数为当前的 value 值 +配置 `name` 属性作为每个 collapse-item 的唯一标志符 + + + +
diff --git a/example/src/docs/zh-CN/collapse/basic-usage.md b/example/src/docs/zh-CN/collapse/basic-usage.md new file mode 100644 index 000000000..5678e039b --- /dev/null +++ b/example/src/docs/zh-CN/collapse/basic-usage.md @@ -0,0 +1,28 @@ +
+

+ +

+ +## Collapse 折叠面板 + + + +内容区可指定动态页面或自定义 html 等,支持展开收起操作。 +
+ +### 基本用法 + + + +
+ +### Collapse 属性 + + + +
+ +### Collapse-Item 属性 + + + diff --git a/example/src/docs/zh-CN/collapse/block-close.md b/example/src/docs/zh-CN/collapse/block-close.md new file mode 100644 index 000000000..21ecb8eae --- /dev/null +++ b/example/src/docs/zh-CN/collapse/block-close.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Collapse 折叠面板 + + + +内容区可指定动态页面或自定义 html 等,支持展开收起操作。 +
+ +### 阻止折叠面板关闭事件 + +:before-close 折叠面板关闭前事件,方法里面return true/false,表示是否可以关闭 + + + +
+ diff --git a/example/src/docs/zh-CN/collapse/collapse-events.md b/example/src/docs/zh-CN/collapse/collapse-events.md new file mode 100644 index 000000000..dc1069bcd --- /dev/null +++ b/example/src/docs/zh-CN/collapse/collapse-events.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Collapse 折叠面板 + + + +内容区可指定动态页面或自定义 html 等,支持展开收起操作。 +
+ +### 折叠面板事件 + +激活面板的值改变时将触发 `change` 事件。 + + + +
+ diff --git a/example/src/docs/zh-CN/collapse/custom-collapse-title.md b/example/src/docs/zh-CN/collapse/custom-collapse-title.md new file mode 100644 index 000000000..71beaf7ad --- /dev/null +++ b/example/src/docs/zh-CN/collapse/custom-collapse-title.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Collapse 折叠面板 + + + +内容区可指定动态页面或自定义 html 等,支持展开收起操作。 +
+ +### 自定义面板标题 + +在 `collapse-item` 元素上配置 `title` 属性可以指定每个折叠面板项的标题。但同时也可以通过 `title` 插槽的方式自定义面板标题,比如在标题前增加图标。 + + + +
+ diff --git a/example/src/docs/zh-CN/collapse/dynamic-disable.md b/example/src/docs/zh-CN/collapse/dynamic-disable.md new file mode 100644 index 000000000..515882fb7 --- /dev/null +++ b/example/src/docs/zh-CN/collapse/dynamic-disable.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Collapse 折叠面板 + + + +内容区可指定动态页面或自定义 html 等,支持展开收起操作。 +
+ +### 禁用状态 + +在 `collapse-item` 元素上配置 `disabled` 属性为 true 后,将禁用指定的折叠面板项。 + + + +
+ diff --git a/example/src/docs/zh-CN/collapse/nested-form.md b/example/src/docs/zh-CN/collapse/nested-form.md new file mode 100644 index 000000000..710337aae --- /dev/null +++ b/example/src/docs/zh-CN/collapse/nested-form.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Collapse 折叠面板 + + + +内容区可指定动态页面或自定义 html 等,支持展开收起操作。 +
+ +### 嵌套表单 + +通过 `collapse-item` 元素的默认插槽嵌入表单。 + + + +
+ diff --git a/example/src/docs/zh-CN/collapse/nested-grid.md b/example/src/docs/zh-CN/collapse/nested-grid.md new file mode 100644 index 000000000..fc6b154cf --- /dev/null +++ b/example/src/docs/zh-CN/collapse/nested-grid.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Collapse 折叠面板 + + + +内容区可指定动态页面或自定义 html 等,支持展开收起操作。 +
+ +### 嵌套表格 + +通过 `collapse-item` 元素的默认插槽嵌入表格。 + + + +
+ diff --git a/example/src/docs/zh-CN/color.md b/example/src/docs/zh-CN/color.md new file mode 100644 index 000000000..9333ed09f --- /dev/null +++ b/example/src/docs/zh-CN/color.md @@ -0,0 +1,23 @@ +
+

+ +

+ +## Color 色彩 + + +
+ +### 主色彩 + + + +### 辅助色 + + + +### 中性色 + + + + diff --git a/example/src/docs/zh-CN/container.md b/example/src/docs/zh-CN/container.md new file mode 100644 index 000000000..31455be07 --- /dev/null +++ b/example/src/docs/zh-CN/container.md @@ -0,0 +1,50 @@ +
+

+ +

+ +## Container 版型 + + + +用于布局的容器组件,方便快速搭建页面的版型。 + +
+ +提示布局容器内置 `default(默认)`、`simple(简约)`、`classic(经典)`、`fashion(时尚)`、`legend(传奇)` 五种布局类型,用户可通过 `pattern` 属性选择合适的布局类型,可选值有 `default | simple | classic | fashion | legend` +
+ +### 默认布局 + + + +### 简约布局 + + + +### 经典布局 + + + +### 时尚布局 + + + +### 传奇布局 + + + +### 自定义宽度和高度 + +Container 布局容器支持用户通过设置 `headerHeight`、`footerHeight`、`asideWidth` 等属性来控制 `header(头部区域)`、`footer(底部区域)` 的高度和 `aside(左侧区域)` 的宽度。`main(主体区域)` 的宽度和高度是自适应的。 + + + +### 版型切换 + +Container 布局容器支持用户通过切换 `pattern` 版型属性的值实现版型切换。 + +
+ + + diff --git a/example/src/docs/zh-CN/credit-card-form/background-image.md b/example/src/docs/zh-CN/credit-card-form/background-image.md new file mode 100644 index 000000000..8adda6dce --- /dev/null +++ b/example/src/docs/zh-CN/credit-card-form/background-image.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## CreditCardForm 信用卡表单 + + + +通过表单输入实时改变信用卡卡片的相关信息。 +
+ +### 背景图片 + +通过 `background-image` 设置信用卡背景图片。 + + + + + diff --git a/example/src/docs/zh-CN/credit-card-form/basic-usage.md b/example/src/docs/zh-CN/credit-card-form/basic-usage.md new file mode 100644 index 000000000..c6f4b0101 --- /dev/null +++ b/example/src/docs/zh-CN/credit-card-form/basic-usage.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## CreditCardForm 信用卡表单 + + + +通过表单输入实时改变信用卡卡片的相关信息。 +
+ +### 基本用法 + + + +
+ + + diff --git a/example/src/docs/zh-CN/credit-card-form/credit-card-form-events.md b/example/src/docs/zh-CN/credit-card-form/credit-card-form-events.md new file mode 100644 index 000000000..2d1681765 --- /dev/null +++ b/example/src/docs/zh-CN/credit-card-form/credit-card-form-events.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## CreditCardForm 信用卡表单 + + + +通过表单输入实时改变信用卡卡片的相关信息。 +
+ +### 基本用法 + + + + diff --git a/example/src/docs/zh-CN/crop/aspect-ratio.md b/example/src/docs/zh-CN/crop/aspect-ratio.md new file mode 100644 index 000000000..08ab5a64a --- /dev/null +++ b/example/src/docs/zh-CN/crop/aspect-ratio.md @@ -0,0 +1,22 @@ +
+

+ +

+ +## Crop 图片裁剪 + + + +Crop 图像裁切,可预览,支持 JPG 和 PNG 格式,浏览图像可以手动调整选择头像区域。 + +
+ +### 裁剪框宽高比 + +通过 `aspect-ratio` 属性可以设置裁剪框的宽高比例,默认为 `16 / 9` 。还可以通过调用 `setAspectRatio` 方法来设置裁切框的宽高比。 + +通过 `center` 属性可以设置裁剪框是否在图片正中心。 + + + +
diff --git a/example/src/docs/zh-CN/crop/auto-crop-area.md b/example/src/docs/zh-CN/crop/auto-crop-area.md new file mode 100644 index 000000000..fb2f719a7 --- /dev/null +++ b/example/src/docs/zh-CN/crop/auto-crop-area.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Crop 图片裁剪 + + + +Crop 图像裁切,可预览,支持 JPG 和 PNG 格式,浏览图像可以手动调整选择头像区域。 +
+ +### 自动裁剪面积 + +初始化时,通过属性 `auto-crop-area` 可以设置裁剪框自动裁剪的面积,默认为 `0.8`,在 `auto-crop` 属性为 `true` 时生效。 + + + +
diff --git a/example/src/docs/zh-CN/crop/basic-usage.md b/example/src/docs/zh-CN/crop/basic-usage.md new file mode 100644 index 000000000..5c2953044 --- /dev/null +++ b/example/src/docs/zh-CN/crop/basic-usage.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Crop 图片裁剪 + + + +Crop 图像裁切,可预览,支持 JPG 和 PNG 格式,浏览图像可以手动调整选择头像区域。 +
+ +### 基本用法 + +通过 `src` 属性设置默认裁剪的图片源路径,并通过 `cropvisible` 属性来控制裁剪弹框是否可见。 + + + +
+ + diff --git a/example/src/docs/zh-CN/crop/crop-events.md b/example/src/docs/zh-CN/crop/crop-events.md new file mode 100644 index 000000000..9c93190da --- /dev/null +++ b/example/src/docs/zh-CN/crop/crop-events.md @@ -0,0 +1,48 @@ +
+

+ +

+ +## Crop 图片裁剪 + + + +Crop 图像裁切,可预览,支持 JPG 和 PNG 格式,浏览图像可以手动调整选择头像区域。 + +
+ +### ready 事件 + +当一个 cropper 实例完全构建时触发 `ready` 事件。 + + + +
+ +### 裁剪框方法 事件 + +当一个 cropper 实例完全构建时触发 ` disable` 方法禁用裁剪框,当触发 `enable` 启用裁剪框 + + + +
+ +### 裁剪相关事件 + +:::tip + +说明当画布或剪切框开始发生变化时触发 `cropstart` 事件 + +当画布或剪切框正在发生变化时触发 `cropmove` 事件 + +当画布或剪切框发生变化结束时触发 `cropend` 事件 + +当画布或裁剪框发生改变时触发 `crop` 事件 + +通过触发 `getCanvasData` 获取画布 Canvas(图像包装器)位置和大小数据 + +::: + + + +
diff --git a/example/src/docs/zh-CN/crop/drag-mode.md b/example/src/docs/zh-CN/crop/drag-mode.md new file mode 100644 index 000000000..68774cd97 --- /dev/null +++ b/example/src/docs/zh-CN/crop/drag-mode.md @@ -0,0 +1,26 @@ +
+

+ +

+ +## Crop 图片裁剪 + + + +Crop 图像裁切,可预览,支持 JPG 和 PNG 格式,浏览图像可以手动调整选择头像区域。 +
+ +### 拖拽模式 + +通过 `drag-mode` 属性可以设置裁剪框的拖拽模式,有 `crop`、`move`、`none` 三种选项,默认为 `crop` 。 + +:::tip drag-mode 选项说明 +`crop`:当裁剪框取消后,按住鼠标左键在图片区域拖拽,将产生一个新的裁剪框。 +`move`:当裁剪框取消后,按住鼠标左键将移动图片。 +`none`:当裁剪框取消后,不能裁剪、也不能移动图片。 +`movable` 控制图片是否可以移动,默认为 true。 +::: + + + +
diff --git a/example/src/docs/zh-CN/crop/get-container-data.md b/example/src/docs/zh-CN/crop/get-container-data.md new file mode 100644 index 000000000..c7ae21019 --- /dev/null +++ b/example/src/docs/zh-CN/crop/get-container-data.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Crop 图片裁剪 + + + +Crop 图像裁切,可预览,支持 JPG 和 PNG 格式,浏览图像可以手动调整选择头像区域。 +
+ +### 获取容器数据 + +调用 `getContainerData` 方法可以获取容器的大小数据。 + + + +
diff --git a/example/src/docs/zh-CN/crop/get-crop-box-data.md b/example/src/docs/zh-CN/crop/get-crop-box-data.md new file mode 100644 index 000000000..cb7143558 --- /dev/null +++ b/example/src/docs/zh-CN/crop/get-crop-box-data.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Crop 图片裁剪 + + + +Crop 图像裁切,可预览,支持 JPG 和 PNG 格式,浏览图像可以手动调整选择头像区域。 +
+ +### 获取剪切框数据 + +调用 `getCropBoxData` 方法可以获取剪切框的位置和大小数据。 + + + +
diff --git a/example/src/docs/zh-CN/crop/get-cropped-canvas.md b/example/src/docs/zh-CN/crop/get-cropped-canvas.md new file mode 100644 index 000000000..1b9a15889 --- /dev/null +++ b/example/src/docs/zh-CN/crop/get-cropped-canvas.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Crop 图片裁剪 + + + +Crop 图像裁切,可预览,支持 JPG 和 PNG 格式,浏览图像可以手动调整选择头像区域。 +
+ +### 获取裁剪后的图片数据 + +调用 `getCroppedCanvas` 方法可以获取裁剪后的图片数据,搭配 `toDataURL` 方法将转成 base64 图片数据,搭配 `toBlob` 方法将生成 Blob 图片数据。 + + + +
diff --git a/example/src/docs/zh-CN/crop/get-data.md b/example/src/docs/zh-CN/crop/get-data.md new file mode 100644 index 000000000..65dcdc4e6 --- /dev/null +++ b/example/src/docs/zh-CN/crop/get-data.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Crop 图片裁剪 + + + +Crop 图像裁切,可预览,支持 JPG 和 PNG 格式,浏览图像可以手动调整选择头像区域。 +
+ +### 获取裁剪区域数据 + +调用 `getData` 方法可以获取裁剪区域的位置以及大小。 + + + +
diff --git a/example/src/docs/zh-CN/crop/get-image-data.md b/example/src/docs/zh-CN/crop/get-image-data.md new file mode 100644 index 000000000..5c95a5f6e --- /dev/null +++ b/example/src/docs/zh-CN/crop/get-image-data.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Crop 图片裁剪 + + + +Crop 图像裁切,可预览,支持 JPG 和 PNG 格式,浏览图像可以手动调整选择头像区域。 +
+ +### 获取图像数据 + +调用 `getImageData` 方法可以获取图像位置、大小和其他相关数据,若想获取画布位置和大小数据可以调用 `getCanvasData` 方法。 + + + +
diff --git a/example/src/docs/zh-CN/crop/min-crop-box-width-height.md b/example/src/docs/zh-CN/crop/min-crop-box-width-height.md new file mode 100644 index 000000000..f5633a846 --- /dev/null +++ b/example/src/docs/zh-CN/crop/min-crop-box-width-height.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Crop 图片裁剪 + + + +Crop 图像裁切,可预览,支持 JPG 和 PNG 格式,浏览图像可以手动调整选择头像区域。 +
+ +### 裁剪框最小宽高 + +通过属性 `min-crop-box-width` 、`min-crop-box-height` 设置裁剪框最小宽高。设置后,调整裁剪框宽高时,调整到最小值后将不能再调整。 +通过属性 `mmin-container-width` 、`min-container-height` 设置容器的最小宽度,最小高度。 + + + +
diff --git a/example/src/docs/zh-CN/crop/no-background.md b/example/src/docs/zh-CN/crop/no-background.md new file mode 100644 index 000000000..c7e16a46f --- /dev/null +++ b/example/src/docs/zh-CN/crop/no-background.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Crop 图片裁剪 + + + +Crop 图像裁切,可预览,支持 JPG 和 PNG 格式,浏览图像可以手动调整选择头像区域。 +
+ +### 不显示网格背景 + +设置 `background` 属性为 `false` 后,将不显示容器的网格背景。 + + + +
diff --git a/example/src/docs/zh-CN/crop/no-guides.md b/example/src/docs/zh-CN/crop/no-guides.md new file mode 100644 index 000000000..c8fe0bf03 --- /dev/null +++ b/example/src/docs/zh-CN/crop/no-guides.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Crop 图片裁剪 + + + +Crop 图像裁切,可预览,支持 JPG 和 PNG 格式,浏览图像可以手动调整选择头像区域。 +
+ +### 不显示虚线 + +设置 `guides` 属性为 `false` 将取消裁剪框上方的虚线显示。 + + + +
diff --git a/example/src/docs/zh-CN/crop/no-modal.md b/example/src/docs/zh-CN/crop/no-modal.md new file mode 100644 index 000000000..7134ad172 --- /dev/null +++ b/example/src/docs/zh-CN/crop/no-modal.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Crop 图片裁剪 + + + +Crop 图像裁切,可预览,支持 JPG 和 PNG 格式,浏览图像可以手动调整选择头像区域。 +
+ +### 不显示模态 + +设置 `modal` 属性为 `false` 将取消裁剪框下方图片上方的模态层显示。 + + + +
diff --git a/example/src/docs/zh-CN/crop/replace-image.md b/example/src/docs/zh-CN/crop/replace-image.md new file mode 100644 index 000000000..02676290b --- /dev/null +++ b/example/src/docs/zh-CN/crop/replace-image.md @@ -0,0 +1,28 @@ +
+

+ +

+ +## Crop 图片裁剪 + + + +Crop 图像裁切,可预览,支持 JPG 和 PNG 格式,浏览图像可以手动调整选择头像区域。 + +
+ +### 替换图片 + +调用 `replace` 方法可以替换图像的 src 并重新构建 cropper 。 通过 `rotatable` 属性控制图片旋转,默认为 true 。 + + + +
+ +### 放大图片 + +调用 `zoomable` 属性可以设置是否允许放大图像,默认值为 true。 + + + +
diff --git a/example/src/docs/zh-CN/crop/view-mode.md b/example/src/docs/zh-CN/crop/view-mode.md new file mode 100644 index 000000000..6a7a1b966 --- /dev/null +++ b/example/src/docs/zh-CN/crop/view-mode.md @@ -0,0 +1,26 @@ +
+

+ +

+ +## Crop 图片裁剪 + + + +Crop 图像裁切,可预览,支持 JPG 和 PNG 格式,浏览图像可以手动调整选择头像区域。 +
+ +### 视图模式 + +通过 `view-mode` 属性可以设置裁剪框的视图模式,有 `0`、`1`、`2`、`3` 四种选项,默认为 `0` 。 + +:::tip view-mode 选项说明 +`0`:裁剪框可以移动到图片外面。 +`1`:裁剪框只能在图片内移动。 +`2`:图片不全部铺满容器,缩小时可以有一边出现空隙。 +`3`:图片填充整个容器。 +::: + + + +
diff --git a/example/src/docs/zh-CN/crop/wheel-zoom-ratio.md b/example/src/docs/zh-CN/crop/wheel-zoom-ratio.md new file mode 100644 index 000000000..5e8a6b6bd --- /dev/null +++ b/example/src/docs/zh-CN/crop/wheel-zoom-ratio.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Crop 图片裁剪 + + + +Crop 图像裁切,可预览,支持 JPG 和 PNG 格式,浏览图像可以手动调整选择头像区域。 +
+ +### 鼠标滚轮缩放图像时比例 + +`zoom-on-wheel` 属性为 `true` 情况下,通过 `wheel-zoom-ratio` 属性可以设置缩放比例,默认为 `0.1` 。 + + + +
diff --git a/example/src/docs/zh-CN/crop/zoom-on-wheel.md b/example/src/docs/zh-CN/crop/zoom-on-wheel.md new file mode 100644 index 000000000..a0ea0ac54 --- /dev/null +++ b/example/src/docs/zh-CN/crop/zoom-on-wheel.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Crop 图片裁剪 + + + +Crop 图像裁切,可预览,支持 JPG 和 PNG 格式,浏览图像可以手动调整选择头像区域。 +
+ +### 禁用鼠标滚轮缩放图像 + +设置 `zoom-on-wheel` 属性为 `false` 后,将不允许通过滚动鼠标滚轮来缩放图像。 + + + +
diff --git a/example/src/docs/zh-CN/date-picker/about-clear.md b/example/src/docs/zh-CN/date-picker/about-clear.md new file mode 100644 index 000000000..4613b5713 --- /dev/null +++ b/example/src/docs/zh-CN/date-picker/about-clear.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## DatePicker 日期选择器 + + + +用于设置/选择日期,包括年月/年月日/年月日时分/年月日时分秒日期格式。 +
+ +### 清除输入 + +选择日期后,鼠标悬停在输入框时,默认会显示清除图标,单击图标可以清除输入框内容。设置 `clearable` 属性为 false 后,则不显示清除图标,不可清除。通过 `clear-icon` 属性可以自定义清除图标。 + + + +
+ diff --git a/example/src/docs/zh-CN/date-picker/about-format.md b/example/src/docs/zh-CN/date-picker/about-format.md new file mode 100644 index 000000000..7fac523c8 --- /dev/null +++ b/example/src/docs/zh-CN/date-picker/about-format.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## DatePicker 日期选择器 + + + +用于设置/选择日期,包括年月/年月日/年月日时分/年月日时分秒日期格式。 +
+ +### 格式化相关 + +通过 `format` 属性设置输入框的格式,`value-format` 属性设置绑定值的格式。更多日期格式需查看 Date Format 属性列表。 + + + +
+ diff --git a/example/src/docs/zh-CN/date-picker/align.md b/example/src/docs/zh-CN/date-picker/align.md new file mode 100644 index 000000000..56d898f61 --- /dev/null +++ b/example/src/docs/zh-CN/date-picker/align.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## DatePicker 日期选择器 + + + +用于设置/选择日期,包括年月/年月日/年月日时分/年月日时分秒日期格式。 +
+ +### 对齐方式 + +通过 `align` 属性可以设置日期选择面板与输入框之间的对齐方式,可选值有 left、right、center,默认为 left 左对齐。 + + + +
+ diff --git a/example/src/docs/zh-CN/date-picker/basic-usage.md b/example/src/docs/zh-CN/date-picker/basic-usage.md new file mode 100644 index 000000000..782076a1d --- /dev/null +++ b/example/src/docs/zh-CN/date-picker/basic-usage.md @@ -0,0 +1,37 @@ +
+

+ +

+ +## DatePicker 日期选择器 + + + +用于设置/选择日期,包括年月/年月日/年月日时分/年月日时分秒日期格式。 +
+ +### 基本用法 + + + +
+ + + +
+ +### Date Picker Options + + + +
+ +### Shortcuts + + + +
+ +### Date Format + + diff --git a/example/src/docs/zh-CN/date-picker/custom-range.md b/example/src/docs/zh-CN/date-picker/custom-range.md new file mode 100644 index 000000000..89dbf62c4 --- /dev/null +++ b/example/src/docs/zh-CN/date-picker/custom-range.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## DatePicker 日期选择器 + + + +用于设置/选择日期,包括年月/年月日/年月日时分/年月日时分秒日期格式。 +
+ +### 范围选择自定义相关 + +范围选择时,`start-placeholder` 和 `end-placeholder` 属性可分别指定开始日期和结束日期输入框的占位符。`range-separator` 属性指定开始日期和结束日期输入框之间的分隔符。 + + + +
+ diff --git a/example/src/docs/zh-CN/date-picker/custom-suffix-icon.md b/example/src/docs/zh-CN/date-picker/custom-suffix-icon.md new file mode 100644 index 000000000..07660f8b2 --- /dev/null +++ b/example/src/docs/zh-CN/date-picker/custom-suffix-icon.md @@ -0,0 +1,28 @@ +
+

+ +

+ +## DatePicker 日期选择器 + + + +用于设置/选择日期,包括年月/年月日/年月日时分/年月日时分秒日期格式。 + +
+ +### 自定义后置图标 + +通过 `suffix-icon` 属性设置日期输入框前置图标,从 `@opentiny/vue-icon` 中导入一个图标并进行初始化后传给 `suffix-icon`。 + + + +
+ +### 自定义下拉框的类名 + +通过 `popper-class` 属性设置下拉框的类名。 + + + +
diff --git a/example/src/docs/zh-CN/date-picker/date-picker-disabled.md b/example/src/docs/zh-CN/date-picker/date-picker-disabled.md new file mode 100644 index 000000000..0ec74650d --- /dev/null +++ b/example/src/docs/zh-CN/date-picker/date-picker-disabled.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## DatePicker 日期选择器 + + + +用于设置/选择日期,包括年月/年月日/年月日时分/年月日时分秒日期格式。 +
+ +### 禁用 + +通过 `disabled` 属性控制组件禁用 + + + +
+ diff --git a/example/src/docs/zh-CN/date-picker/date-picker-events.md b/example/src/docs/zh-CN/date-picker/date-picker-events.md new file mode 100644 index 000000000..1f8fd44eb --- /dev/null +++ b/example/src/docs/zh-CN/date-picker/date-picker-events.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## DatePicker 日期选择器 + + + +用于设置/选择日期,包括年月/年月日/年月日时分/年月日时分秒日期格式。 +
+ +### 事件 + +主要事件有 change、blur、focus。 + + + +
+ diff --git a/example/src/docs/zh-CN/date-picker/date-range-shortcuts.md b/example/src/docs/zh-CN/date-picker/date-range-shortcuts.md new file mode 100644 index 000000000..05707cd1a --- /dev/null +++ b/example/src/docs/zh-CN/date-picker/date-range-shortcuts.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## DatePicker 日期选择器 + + + +用于设置/选择日期,包括年月/年月日/年月日时分/年月日时分秒日期格式。 +
+ +### 日期范围快捷选项 + +通过 `picker-options` 对象设置日期范围快捷选项。 + +通过 `firstDayOfWeek` 周起始日,该属性可选值为 1 到 7,默认值为 7。 + + + +
diff --git a/example/src/docs/zh-CN/date-picker/date-range.md b/example/src/docs/zh-CN/date-picker/date-range.md new file mode 100644 index 000000000..c92fab17b --- /dev/null +++ b/example/src/docs/zh-CN/date-picker/date-range.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## DatePicker 日期选择器 + + + +用于设置/选择日期,包括年月/年月日/年月日时分/年月日时分秒日期格式。 +
+ +### 选择日期范围 + +设置 `type` 属性为 daterange,可以设置以日期范围的形式进行选择。 +通过 `onPick` 获取选中日期后会执行的回调,需要与 `daterange` 或 `datetimerange` 才生效,需要配置在 `picker-options` 中。 + + + +
+ diff --git a/example/src/docs/zh-CN/date-picker/date-shortcuts.md b/example/src/docs/zh-CN/date-picker/date-shortcuts.md new file mode 100644 index 000000000..ad7675109 --- /dev/null +++ b/example/src/docs/zh-CN/date-picker/date-shortcuts.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## DatePicker 日期选择器 + + + +用于设置/选择日期,包括年月/年月日/年月日时分/年月日时分秒日期格式。 +
+ +### 选择日带快捷选项 + +通过 `picker-options` 属性,该属性是一个对象,在其中指定 `shortcuts` 对象数组可以设置快捷选项。同时可以根据需要设置 `disabledDate` 方法禁用日期。 + + + +
+ diff --git a/example/src/docs/zh-CN/date-picker/default-time-of-range.md b/example/src/docs/zh-CN/date-picker/default-time-of-range.md new file mode 100644 index 000000000..85656bf2c --- /dev/null +++ b/example/src/docs/zh-CN/date-picker/default-time-of-range.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## DatePicker 日期选择器 + + + +用于设置/选择日期,包括年月/年月日/年月日时分/年月日时分秒日期格式。 +
+ +### 日期范围默认时刻 + +使用 `datetimerange` 设置日期范围时,可以通过 `default-time` 属性设置起始与结束的时刻,默认是选定日期的 00:00:00 作为起始与结束的时刻。`default-time` 接受一个数组,数组的每一项都为一个字符串,第一项控制起始日期的时刻,第二项控制结束日期的时刻。 + + + +
+ diff --git a/example/src/docs/zh-CN/date-picker/default-value.md b/example/src/docs/zh-CN/date-picker/default-value.md new file mode 100644 index 000000000..e8d47a3eb --- /dev/null +++ b/example/src/docs/zh-CN/date-picker/default-value.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## DatePicker 日期选择器 + + + +用于设置/选择日期,包括年月/年月日/年月日时分/年月日时分秒日期格式。 +
+ +### 选择器打开时默认时间设置 + +`default-value` 属性指定日期选择器面板打开时默认选中的日期。 + + + +
+ diff --git a/example/src/docs/zh-CN/date-picker/disabled.md b/example/src/docs/zh-CN/date-picker/disabled.md new file mode 100644 index 000000000..bc42d5cce --- /dev/null +++ b/example/src/docs/zh-CN/date-picker/disabled.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## DatePicker 日期选择器 + + + +用于设置/选择日期,包括年月/年月日/年月日时分/年月日时分秒日期格式。 +
+ +### 禁用 + + + +
+ diff --git a/example/src/docs/zh-CN/date-picker/editable.md b/example/src/docs/zh-CN/date-picker/editable.md new file mode 100644 index 000000000..624fa27ec --- /dev/null +++ b/example/src/docs/zh-CN/date-picker/editable.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## DatePicker 日期选择器 + + + +用于设置/选择日期,包括年月/年月日/年月日时分/年月日时分秒日期格式。 +
+ +### 文本框不可输入 + +日期输入框默认可以输入日期,设置 `editable` 为 false 后,将不能输入。 + + + +
+ diff --git a/example/src/docs/zh-CN/date-picker/focus.md b/example/src/docs/zh-CN/date-picker/focus.md new file mode 100644 index 000000000..822873923 --- /dev/null +++ b/example/src/docs/zh-CN/date-picker/focus.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## DatePicker 日期选择器 + + + +用于设置/选择日期,包括年月/年月日/年月日时分/年月日时分秒日期格式。 + +
+ +### 获取焦点 + +通过 `focus` 方法设置使 input 获取焦点。 + + + +
diff --git a/example/src/docs/zh-CN/date-picker/max-min.md b/example/src/docs/zh-CN/date-picker/max-min.md new file mode 100644 index 000000000..867852294 --- /dev/null +++ b/example/src/docs/zh-CN/date-picker/max-min.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## DatePicker 日期选择器 + + + +用于设置/选择日期,包括年月/年月日/年月日时分/年月日时分秒日期格式。 +
+ +### 最大最小值 + +配置 `picker-options` 属性,在对象中的 `disabledDate` 方法中根据日期进行判断来禁用指定的日期段,通过这种方式来实现最大最小值。 + + + +
+ diff --git a/example/src/docs/zh-CN/date-picker/month-range-shortcuts.md b/example/src/docs/zh-CN/date-picker/month-range-shortcuts.md new file mode 100644 index 000000000..ef0e49b03 --- /dev/null +++ b/example/src/docs/zh-CN/date-picker/month-range-shortcuts.md @@ -0,0 +1,28 @@ +
+

+ +

+ +## DatePicker 日期选择器 + + + +用于设置/选择日期,包括年月/年月日/年月日时分/年月日时分秒日期格式。 + +
+ +### 月份范围快捷选项 + +同样通过 `picker-options` 对象设置月份范围快捷选项。 + + + +
+ +### 只读 + +通过 `readonly` 属性设置日历组件是否只读。 + + + +
diff --git a/example/src/docs/zh-CN/date-picker/month-range.md b/example/src/docs/zh-CN/date-picker/month-range.md new file mode 100644 index 000000000..c6d177d50 --- /dev/null +++ b/example/src/docs/zh-CN/date-picker/month-range.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## DatePicker 日期选择器 + + + +用于设置/选择日期,包括年月/年月日/年月日时分/年月日时分秒日期格式。 +
+ +### 选择月份范围 + +设置 `type` 属性为 monthrange,可以设置以月份范围的形式进行选择。 + + + +
+ diff --git a/example/src/docs/zh-CN/date-picker/other-picker-type.md b/example/src/docs/zh-CN/date-picker/other-picker-type.md new file mode 100644 index 000000000..243caee85 --- /dev/null +++ b/example/src/docs/zh-CN/date-picker/other-picker-type.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## DatePicker 日期选择器 + + + +用于设置/选择日期,包括年月/年月日/年月日时分/年月日时分秒日期格式。 +
+ +### 其他日期单位 + +通过 `type` 属性可以设置不同的日期单位,如下示例中配置的有 week、year、month、dates。 + + + +
+ diff --git a/example/src/docs/zh-CN/date-picker/set-size.md b/example/src/docs/zh-CN/date-picker/set-size.md new file mode 100644 index 000000000..285b8c2e1 --- /dev/null +++ b/example/src/docs/zh-CN/date-picker/set-size.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## DatePicker 日期选择器 + + + +用于设置/选择日期,包括年月/年月日/年月日时分/年月日时分秒日期格式。 +
+ +### 尺寸设置 + +通过 `size` 属性可以设置日期输入框的尺寸,可选值有 medium、small、mini。 + + + +
+ diff --git a/example/src/docs/zh-CN/date-picker/time-arrow-control.md b/example/src/docs/zh-CN/date-picker/time-arrow-control.md new file mode 100644 index 000000000..91cd76c81 --- /dev/null +++ b/example/src/docs/zh-CN/date-picker/time-arrow-control.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## DatePicker 日期选择器 + + + +用于设置/选择日期,包括年月/年月日/年月日时分/年月日时分秒日期格式。 +
+ +### 箭头按钮控制时间选择 + +当 `type` 为 datetime、datetimerange 时,设置 `time-arrow-control` 属性为 true,在时间面板中将显示箭头按钮,通过箭头按钮控制时间选择。默认为滚动选择时间。 + + + +
diff --git a/example/src/docs/zh-CN/date-picker/time-format.md b/example/src/docs/zh-CN/date-picker/time-format.md new file mode 100644 index 000000000..3900509c6 --- /dev/null +++ b/example/src/docs/zh-CN/date-picker/time-format.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## DatePicker 日期选择器 + + + +用于设置/选择日期,包括年月/年月日/年月日时分/年月日时分秒日期格式。 +
+ +### 时区选择 + +通过 `time-format` 属性可以设置日期选择面板的时间显示格式 + + + +
diff --git a/example/src/docs/zh-CN/date-picker/time-zone.md b/example/src/docs/zh-CN/date-picker/time-zone.md new file mode 100644 index 000000000..fd6f7a0cf --- /dev/null +++ b/example/src/docs/zh-CN/date-picker/time-zone.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## DatePicker 日期选择器 + + + +用于设置/选择日期,包括年月/年月日/年月日时分/年月日时分秒日期格式。 +
+ +### 时区选择 + +通过 `show-timezone` 属性可以设置日期选择面板时区选择,同时需要引入 timezoneData 时区数据 + + + +
diff --git a/example/src/docs/zh-CN/date-picker/unlink-panels.md b/example/src/docs/zh-CN/date-picker/unlink-panels.md new file mode 100644 index 000000000..d045d4069 --- /dev/null +++ b/example/src/docs/zh-CN/date-picker/unlink-panels.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## DatePicker 日期选择器 + + + +用于设置/选择日期,包括年月/年月日/年月日时分/年月日时分秒日期格式。 +
+ +### 范围选择取消面板联动 + +范围选择时,默认情况下,在开始日期面板中单击上一月或上一年箭头图标时,结束日期面板中日期也联动切换到上一月或上一年。在结束日期面板中切换下一月或下一年时,开始日期面板也随之联动。但若配置 `unlink-panels` 属性为 true ,面板之间就不再联动,切换年月时只对当前面板生效。 + + + +
+ diff --git a/example/src/docs/zh-CN/date-picker/utc8.md b/example/src/docs/zh-CN/date-picker/utc8.md new file mode 100644 index 000000000..80a0d15cd --- /dev/null +++ b/example/src/docs/zh-CN/date-picker/utc8.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## DatePicker 海外显示东八区时间 + + + +用于设置/选择日期,包括年月/年月日/年月日时分/年月日时分秒日期格式。 +
+ +### 时区选择 + +通过 `isutc8` 属性可以设置是否显示为东八区时间 + + + +
diff --git a/example/src/docs/zh-CN/date-picker/validate-event.md b/example/src/docs/zh-CN/date-picker/validate-event.md new file mode 100644 index 000000000..a9bdf43fe --- /dev/null +++ b/example/src/docs/zh-CN/date-picker/validate-event.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## DatePicker 日期选择器 + + + +用于设置/选择日期,包括年月/年月日/年月日时分/年月日时分秒日期格式。 +
+ +### 不触发表单校验 + +日期选择器在输入时默认会触发表单校验,触发方式有 blur、change。但若设置 `validate-event` 属性为 false,将不再触发表单校验。 + + + +
diff --git a/example/src/docs/zh-CN/detail-page/basic-usage.md b/example/src/docs/zh-CN/detail-page/basic-usage.md new file mode 100644 index 000000000..8160d2c19 --- /dev/null +++ b/example/src/docs/zh-CN/detail-page/basic-usage.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## DetailPage 表头详情栏 + + + +DetailPage 带表头的详情栏组件。 +
+ +### 基本用法 + +在数据对象中可设置 `hidden: true` 来指定默认隐藏的数据。 + + + +
+ + diff --git a/example/src/docs/zh-CN/detail-page/custom-show-text.md b/example/src/docs/zh-CN/detail-page/custom-show-text.md new file mode 100644 index 000000000..9881d4577 --- /dev/null +++ b/example/src/docs/zh-CN/detail-page/custom-show-text.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## DetailPage 表头详情栏 + + + +DetailPage 带表头的详情栏组件。 +
+ +### 自定义展示文本 + +通过 `title`、`text-split`、`dialog-title`、`label-title`、`value-title`、`tips`、`save-button`、`cancel-button` 这些属性可指定表头详情栏组件不同位置的展示文本。 + + + +
diff --git a/example/src/docs/zh-CN/dialog-box/basic-usage.md b/example/src/docs/zh-CN/dialog-box/basic-usage.md new file mode 100644 index 000000000..b907340f8 --- /dev/null +++ b/example/src/docs/zh-CN/dialog-box/basic-usage.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## DialogBox 对话框 + + + +模态对话框,在浮层中显示,引导用户进行相关操作。 +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/zh-CN/dialog-box/center.md b/example/src/docs/zh-CN/dialog-box/center.md new file mode 100644 index 000000000..c1f83c242 --- /dev/null +++ b/example/src/docs/zh-CN/dialog-box/center.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## DialogBox 对话框 + + + +模态对话框,在浮层中显示,引导用户进行相关操作。 +
+ +### 头部和底部水平居中 + +头部标题默认显示在区域左侧,设置 `center` 为 true 后,将居中显示。 + + + +
diff --git a/example/src/docs/zh-CN/dialog-box/close-on-click-modal.md b/example/src/docs/zh-CN/dialog-box/close-on-click-modal.md new file mode 100644 index 000000000..e360b1198 --- /dev/null +++ b/example/src/docs/zh-CN/dialog-box/close-on-click-modal.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## DialogBox 对话框 + + + +模态对话框,在浮层中显示,引导用户进行相关操作。 +
+ +### 点击遮罩时不关闭弹窗 + +默认弹窗打开后,可以单击遮罩层关闭弹窗,设置 `close-on-click-modal` 为 false 后将禁用该功能。 + + + +
diff --git a/example/src/docs/zh-CN/dialog-box/close-on-press-escape.md b/example/src/docs/zh-CN/dialog-box/close-on-press-escape.md new file mode 100644 index 000000000..dde878933 --- /dev/null +++ b/example/src/docs/zh-CN/dialog-box/close-on-press-escape.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## DialogBox 对话框 + + + +模态对话框,在浮层中显示,引导用户进行相关操作。 +
+ +### 禁用 ESC 关闭 + +默认弹窗打开后,可以按下 Esc 键关闭弹窗,设置 `close-on-press-escape` 为 false 后将禁用该功能。 + + + +
diff --git a/example/src/docs/zh-CN/dialog-box/custom-dialog-content.md b/example/src/docs/zh-CN/dialog-box/custom-dialog-content.md new file mode 100644 index 000000000..208395ed9 --- /dev/null +++ b/example/src/docs/zh-CN/dialog-box/custom-dialog-content.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## DialogBox 对话框 + + + +模态对话框,在浮层中显示,引导用户进行相关操作。 +
+ +### 自定义内容 + +通过 default 默认插槽自定义弹窗主体部分的内容。 + + + +
diff --git a/example/src/docs/zh-CN/dialog-box/custom-dialog-footer.md b/example/src/docs/zh-CN/dialog-box/custom-dialog-footer.md new file mode 100644 index 000000000..377952501 --- /dev/null +++ b/example/src/docs/zh-CN/dialog-box/custom-dialog-footer.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## DialogBox 对话框 + + + +模态对话框,在浮层中显示,引导用户进行相关操作。 +
+ +### 自定义底部 + +通过 `footer` 插槽自定义弹窗底部操作区内容。 + + + +
diff --git a/example/src/docs/zh-CN/dialog-box/custom-dialog-title.md b/example/src/docs/zh-CN/dialog-box/custom-dialog-title.md new file mode 100644 index 000000000..740f8261d --- /dev/null +++ b/example/src/docs/zh-CN/dialog-box/custom-dialog-title.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## DialogBox 对话框 + + + +模态对话框,在浮层中显示,引导用户进行相关操作。 +
+ +### 自定义标题 + +除 `title` 属性可以设置弹窗标题外,还可以通过 `title` 插槽自定义弹窗标题区的内容。 + + + +
diff --git a/example/src/docs/zh-CN/dialog-box/dialog-top-height.md b/example/src/docs/zh-CN/dialog-box/dialog-top-height.md new file mode 100644 index 000000000..06dc39cdd --- /dev/null +++ b/example/src/docs/zh-CN/dialog-box/dialog-top-height.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## DialogBox 对话框 + + + +模态对话框,在浮层中显示,引导用户进行相关操作。 +
+ +### 弹窗距离顶部的高度 + +通过 `top` 属性指定弹窗距离窗口顶部的高度,默认为屏高的 15% 。 + + + +
diff --git a/example/src/docs/zh-CN/dialog-box/dialog-width.md b/example/src/docs/zh-CN/dialog-box/dialog-width.md new file mode 100644 index 000000000..b611c2306 --- /dev/null +++ b/example/src/docs/zh-CN/dialog-box/dialog-width.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## DialogBox 对话框 + + + +模态对话框,在浮层中显示,引导用户进行相关操作。 +
+ +### 弹窗的宽度 + +通过 `width` 属性指定弹窗的宽度。 + + + +
diff --git a/example/src/docs/zh-CN/dialog-box/draggable.md b/example/src/docs/zh-CN/dialog-box/draggable.md new file mode 100644 index 000000000..89119b2dc --- /dev/null +++ b/example/src/docs/zh-CN/dialog-box/draggable.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## DialogBox 对话框 + + + +模态对话框,在浮层中显示,引导用户进行相关操作。 +
+ +### 可拖拽的弹窗 + +默认弹窗不可拖拽,设置 `draggable` 属性为 true 后,鼠标移入标题区域单击可拖拽,拖拽事件有 `@drag-start`、`drag-move`、`drag-end`。 + + + +
diff --git a/example/src/docs/zh-CN/dialog-box/form-in-dialog.md b/example/src/docs/zh-CN/dialog-box/form-in-dialog.md new file mode 100644 index 000000000..2ea133063 --- /dev/null +++ b/example/src/docs/zh-CN/dialog-box/form-in-dialog.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## DialogBox 对话框 + + + +模态对话框,在浮层中显示,引导用户进行相关操作。 +
+ +### 弹窗表单 + +通过 default 默认插槽实现嵌套表单以及表单提交的逻辑。 + + + +
diff --git a/example/src/docs/zh-CN/dialog-box/fullscreen.md b/example/src/docs/zh-CN/dialog-box/fullscreen.md new file mode 100644 index 000000000..cde9876c0 --- /dev/null +++ b/example/src/docs/zh-CN/dialog-box/fullscreen.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## DialogBox 对话框 + + + +模态对话框,在浮层中显示,引导用户进行相关操作。 +
+ +### 全屏弹窗 + +设置 `fullscreen` 属性为 true 可显示全屏弹窗,默认弹窗宽度是 500px,此时设置宽度是不生效的。 + + + +
diff --git a/example/src/docs/zh-CN/dialog-box/hidden-close-buttons.md b/example/src/docs/zh-CN/dialog-box/hidden-close-buttons.md new file mode 100644 index 000000000..0c789d6be --- /dev/null +++ b/example/src/docs/zh-CN/dialog-box/hidden-close-buttons.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## DialogBox 对话框 + + + +模态对话框,在浮层中显示,引导用户进行相关操作。 +
+ +### 隐藏关闭按钮 + +默认弹窗右上角会显示关闭图标,单击可以关闭弹窗。若设置 `show-close` 为 false 后,将隐藏关闭图标,要实现关闭弹窗的功能可以通过底部操作区按钮的 click 事件切换 `visible` 属性的值为 false 。 + + + +
diff --git a/example/src/docs/zh-CN/dialog-box/hidden-header.md b/example/src/docs/zh-CN/dialog-box/hidden-header.md new file mode 100644 index 000000000..422cc0984 --- /dev/null +++ b/example/src/docs/zh-CN/dialog-box/hidden-header.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## DialogBox 对话框 + + + +模态对话框,在浮层中显示,引导用户进行相关操作。 +
+ +### 隐藏标题区域 + +弹窗默认有标题区域,设置 `show-header` 为 false 后,将隐藏标题区域。 + + + +
diff --git a/example/src/docs/zh-CN/dialog-box/lock-scroll.md b/example/src/docs/zh-CN/dialog-box/lock-scroll.md new file mode 100644 index 000000000..9f8be11bd --- /dev/null +++ b/example/src/docs/zh-CN/dialog-box/lock-scroll.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## DialogBox 对话框 + + + +模态对话框,在浮层中显示,引导用户进行相关操作。 +
+ +### 弹出时禁用滚动 + +弹窗弹出后,背景页面默认仍然是不可以滚动的,设置 `lock-scroll` 为 fasle 后将不锁定被遮罩内容的滚动。 + + + +
diff --git a/example/src/docs/zh-CN/dialog-box/no-modal.md b/example/src/docs/zh-CN/dialog-box/no-modal.md new file mode 100644 index 000000000..f0578f771 --- /dev/null +++ b/example/src/docs/zh-CN/dialog-box/no-modal.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## DialogBox 对话框 + + + +模态对话框,在浮层中显示,引导用户进行相关操作。 +
+ +### 不启用遮罩层 + +默认弹窗打开时会显示遮罩层,设置 `modal` 为 false 后将不启用遮罩层。无遮罩层时,单击弹窗外部区域仍然可以关闭弹窗。 + + + +
diff --git a/example/src/docs/zh-CN/dialog-box/open-close-events.md b/example/src/docs/zh-CN/dialog-box/open-close-events.md new file mode 100644 index 000000000..59a3efa93 --- /dev/null +++ b/example/src/docs/zh-CN/dialog-box/open-close-events.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## DialogBox 对话框 + + + +模态对话框,在浮层中显示,引导用户进行相关操作。 +
+ +### 弹出与关闭事件 + +`open` :对话框打开时触发,`opened` :对话框打开动画结束时触发,`close` :对话框关闭时触发,`closed` :对话框关闭动画结束时触发。 + + + +
diff --git a/example/src/docs/zh-CN/dialog-box/right-dialog.md b/example/src/docs/zh-CN/dialog-box/right-dialog.md new file mode 100644 index 000000000..a8a092044 --- /dev/null +++ b/example/src/docs/zh-CN/dialog-box/right-dialog.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## DialogBox 对话框 + + + +模态对话框,在浮层中显示,引导用户进行相关操作。 +
+ +### 右侧弹窗 + +设置 `right-slide` 属性为 true 后,弹窗将从窗口右侧弹出。 + +设置 ` modal-append-to-body` 属性默认为 true 遮罩层应用在 body 上。 + + + +
diff --git a/example/src/docs/zh-CN/dialog-box/secondary-dialog.md b/example/src/docs/zh-CN/dialog-box/secondary-dialog.md new file mode 100644 index 000000000..428128a65 --- /dev/null +++ b/example/src/docs/zh-CN/dialog-box/secondary-dialog.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## DialogBox 对话框 + + + +模态对话框,在浮层中显示,引导用户进行相关操作。 +
+ +### 二级弹窗 + +通过 default 默认插槽和底部操作区按钮实现二级弹窗。设置 `append-to-body` 属性后,二级弹窗的实体 DOM 结构将追加到 body 元素上。 + + + +
diff --git a/example/src/docs/zh-CN/drop-times/basic-usage.md b/example/src/docs/zh-CN/drop-times/basic-usage.md new file mode 100644 index 000000000..ee13bc7b4 --- /dev/null +++ b/example/src/docs/zh-CN/drop-times/basic-usage.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## dropTimes 下拉时间 + + + +时间选值框是下拉框的特例,按时分格式(不支持自定义格式)展示下拉列表以供用户选择,并能扩展下拉框部分参数。 +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/zh-CN/drop-times/size.md b/example/src/docs/zh-CN/drop-times/size.md new file mode 100644 index 000000000..590b16559 --- /dev/null +++ b/example/src/docs/zh-CN/drop-times/size.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## dropTimes 下拉时间 + + + +时间选值框是下拉框的特例,按时分格式(不支持自定义格式)展示下拉列表以供用户选择,并能扩展下拉框部分参数。 +
+ +### 设置组件大小的size属性 + + 可设置为:medium,small,mini + + +
diff --git a/example/src/docs/zh-CN/drop-times/start-end-step.md b/example/src/docs/zh-CN/drop-times/start-end-step.md new file mode 100644 index 000000000..1c0ce3820 --- /dev/null +++ b/example/src/docs/zh-CN/drop-times/start-end-step.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## dropTimes 下拉时间 + + + +时间选值框是下拉框的特例,按时分格式(不支持自定义格式)展示下拉列表以供用户选择,并能扩展下拉框部分参数。 +
+ +### 步长与时间区间 + +`start` 设置区间的起始时间,默认为 0 ,`end` 设置区间的结束时间,默认为 24 * 60 ,`step` 设置间隔的步长,默认为 15 。 + + + +
diff --git a/example/src/docs/zh-CN/dropdown/basic-usage.md b/example/src/docs/zh-CN/dropdown/basic-usage.md new file mode 100644 index 000000000..31ab7cd9d --- /dev/null +++ b/example/src/docs/zh-CN/dropdown/basic-usage.md @@ -0,0 +1,30 @@ +
+

+ +

+ +## Dropdown 下拉菜单 + + + +将动作或菜单折叠到下拉菜单中。(暂不支持多级菜单) + +
+ +### 基本用法 + + + +
+ + + +### Dropdown-Menu 属性 + + + +
+ +### Dropdown-Item 属性 + + diff --git a/example/src/docs/zh-CN/dropdown/disabled.md b/example/src/docs/zh-CN/dropdown/disabled.md new file mode 100644 index 000000000..f00bef313 --- /dev/null +++ b/example/src/docs/zh-CN/dropdown/disabled.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## Dropdown 下拉菜单 + + + +将动作或菜单折叠到下拉菜单中。 + +
+ +### 禁用 + +Dropdown、DropdownItem 两个组件分别可以通过 `disabled` 属性设置禁用状态。 + + diff --git a/example/src/docs/zh-CN/dropdown/events.md b/example/src/docs/zh-CN/dropdown/events.md new file mode 100644 index 000000000..1e21cdc84 --- /dev/null +++ b/example/src/docs/zh-CN/dropdown/events.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## Dropdown 下拉菜单 + + + +将动作或菜单折叠到下拉菜单中。 + +
+ +### 内置事件 + +内置事件包含:`button-click`、`item-click`、`visible-change` 事件。 + + diff --git a/example/src/docs/zh-CN/dropdown/hide-on-click.md b/example/src/docs/zh-CN/dropdown/hide-on-click.md new file mode 100644 index 000000000..a1b82b4d0 --- /dev/null +++ b/example/src/docs/zh-CN/dropdown/hide-on-click.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Dropdown 下拉菜单 + + + +将动作或菜单折叠到下拉菜单中。 + +
+ +### 菜单隐藏方式 + +下拉菜单默认在点击菜单项后会被隐藏,将 `hide-on-click` 属性默认为 `false` 可以关闭此功能。 + + + diff --git a/example/src/docs/zh-CN/dropdown/size.md b/example/src/docs/zh-CN/dropdown/size.md new file mode 100644 index 000000000..286e4b964 --- /dev/null +++ b/example/src/docs/zh-CN/dropdown/size.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Dropdown 下拉菜单 + + + +将动作或菜单折叠到下拉菜单中。 + +
+ +### 不同尺寸 + +额外的尺寸:`medium`、`small`、`mini`,通过设置 `size` 属性来配置它们。 + + + diff --git a/example/src/docs/zh-CN/dropdown/split-button.md b/example/src/docs/zh-CN/dropdown/split-button.md new file mode 100644 index 000000000..4bf49be4a --- /dev/null +++ b/example/src/docs/zh-CN/dropdown/split-button.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Dropdown 下拉菜单 + + + +将动作或菜单折叠到下拉菜单中。 + +
+ +### 触发对象 + +可使用内置按钮触发下拉菜单。 + + + diff --git a/example/src/docs/zh-CN/dropdown/trigger.md b/example/src/docs/zh-CN/dropdown/trigger.md new file mode 100644 index 000000000..6d64ad625 --- /dev/null +++ b/example/src/docs/zh-CN/dropdown/trigger.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Dropdown 下拉菜单 + + + +将动作或菜单折叠到下拉菜单中。 + +
+ +### 触发方式 + +可以配置 `click` 激活或者 `hover` 激活。 + + + diff --git a/example/src/docs/zh-CN/fall-menu/basic-usage.md b/example/src/docs/zh-CN/fall-menu/basic-usage.md new file mode 100644 index 000000000..995e4985c --- /dev/null +++ b/example/src/docs/zh-CN/fall-menu/basic-usage.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## FallMenu 瀑布菜单 + + + +FallMenu 瀑布菜单以横向方式显示,支持三级菜单配置,适用于版型定制,以弹出的方式展示。 +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/zh-CN/fall-menu/custom-menuitem.md b/example/src/docs/zh-CN/fall-menu/custom-menuitem.md new file mode 100644 index 000000000..d3f348e66 --- /dev/null +++ b/example/src/docs/zh-CN/fall-menu/custom-menuitem.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## FallMenu 瀑布菜单 + + + +FallMenu 瀑布菜单以横向方式显示,支持三级菜单配置,适用于版型定制,以弹出的方式展示。 +
+ +### 自定义内容 + +通过 `level1` 插槽自定义一级菜单内容,通过 `level2` 插槽自定义二级菜单内容,通过 `level3` 插槽自定义三级菜单内容。 + + + +
diff --git a/example/src/docs/zh-CN/fall-menu/custom-slider-icon.md b/example/src/docs/zh-CN/fall-menu/custom-slider-icon.md new file mode 100644 index 000000000..687a7df30 --- /dev/null +++ b/example/src/docs/zh-CN/fall-menu/custom-slider-icon.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## FallMenu 瀑布菜单 + + + +FallMenu 瀑布菜单以横向方式显示,支持三级菜单配置,适用于版型定制,以弹出的方式展示。 +
+ +### 自定义左/右侧图标 + +通过 `left` 插槽自定义左侧切换图标为 IconLeft ,通过 `right` 插槽右侧切换图标 IconRight 。 + + + +
diff --git a/example/src/docs/zh-CN/fall-menu/data-resource.md b/example/src/docs/zh-CN/fall-menu/data-resource.md new file mode 100644 index 000000000..98706c17a --- /dev/null +++ b/example/src/docs/zh-CN/fall-menu/data-resource.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## FallMenu 瀑布菜单 + + + +FallMenu 瀑布菜单以横向方式显示,支持三级菜单配置,适用于版型定制,以弹出的方式展示。 +
+ +### 数据源 + +通过 `data` 设置瀑布菜单的数据。 + + + +
diff --git a/example/src/docs/zh-CN/file-upload/abort-quest.md b/example/src/docs/zh-CN/file-upload/abort-quest.md new file mode 100644 index 000000000..9b26912f2 --- /dev/null +++ b/example/src/docs/zh-CN/file-upload/abort-quest.md @@ -0,0 +1,16 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 手动取消上传请求 + +调用组件abort方法,取消上传请求 + diff --git a/example/src/docs/zh-CN/file-upload/accept-file-type.md b/example/src/docs/zh-CN/file-upload/accept-file-type.md new file mode 100644 index 000000000..332e3f8b7 --- /dev/null +++ b/example/src/docs/zh-CN/file-upload/accept-file-type.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 可上传的文件类型 + +通过配置 accept(image) 来限制上传文件的格式为 image + + + +通过配置 accept(.doc,.docx) 来限制上传文件的格式为 .doc .docx + +
diff --git a/example/src/docs/zh-CN/file-upload/basic-usage.md b/example/src/docs/zh-CN/file-upload/basic-usage.md new file mode 100644 index 000000000..5aa109d0a --- /dev/null +++ b/example/src/docs/zh-CN/file-upload/basic-usage.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 基本用法 + +属性 action(type:String) 上传服务器地址。 + + +
+ + diff --git a/example/src/docs/zh-CN/file-upload/clear-files.md b/example/src/docs/zh-CN/file-upload/clear-files.md new file mode 100644 index 000000000..12dcc49a6 --- /dev/null +++ b/example/src/docs/zh-CN/file-upload/clear-files.md @@ -0,0 +1,16 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 手动清空已上传文件列表 + +调用组件clearFiles方法,清空已上传的文件列表(该方法不支持在 before-upload 中调用) + diff --git a/example/src/docs/zh-CN/file-upload/custom-prefix.md b/example/src/docs/zh-CN/file-upload/custom-prefix.md new file mode 100644 index 000000000..c4b8bfcb6 --- /dev/null +++ b/example/src/docs/zh-CN/file-upload/custom-prefix.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 钩子函数 + +`before-remove` 删除文件之前的钩子,参数为上传的文件和文件列表,若返回 false 或者返回 Promise 且被 reject,则停止删除。`before-upload` 上传文件之前的钩子,参数为上传的文件,若返回 false 或者返回 Promise 且被 reject,则停止上传。 + + + +
diff --git a/example/src/docs/zh-CN/file-upload/custom-trigger.md b/example/src/docs/zh-CN/file-upload/custom-trigger.md new file mode 100644 index 000000000..53855f19c --- /dev/null +++ b/example/src/docs/zh-CN/file-upload/custom-trigger.md @@ -0,0 +1,16 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 自定义触发文件选项框 + +可在组件中写一个名为trigger的插槽,来触发弹出文件选项框 + diff --git a/example/src/docs/zh-CN/file-upload/custom-upload-request.md b/example/src/docs/zh-CN/file-upload/custom-upload-request.md new file mode 100644 index 000000000..8d23a5641 --- /dev/null +++ b/example/src/docs/zh-CN/file-upload/custom-upload-request.md @@ -0,0 +1,27 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 自定义上传请求 + +通过配置 `headers` ,设置自定义上传请求头信息 + + + +
+ +### 覆盖默认请求 + +通过配置 `http-request` ,覆盖默认的上传行为,可以自定义上传的实现 + + + +
diff --git a/example/src/docs/zh-CN/file-upload/custom-upload-tip.md b/example/src/docs/zh-CN/file-upload/custom-upload-tip.md new file mode 100644 index 000000000..774277539 --- /dev/null +++ b/example/src/docs/zh-CN/file-upload/custom-upload-tip.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 自定义上传提示 + +可通过 tip 插槽来自定义上传提示 + + diff --git a/example/src/docs/zh-CN/file-upload/drag-select-file.md b/example/src/docs/zh-CN/file-upload/drag-select-file.md new file mode 100644 index 000000000..685ffff26 --- /dev/null +++ b/example/src/docs/zh-CN/file-upload/drag-select-file.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 拖拽上传 + +可配置drag(type:boolean),来控制组件是否可以拖拽文件 + + +
diff --git a/example/src/docs/zh-CN/file-upload/drag-upload.md b/example/src/docs/zh-CN/file-upload/drag-upload.md new file mode 100644 index 000000000..1e68e18b9 --- /dev/null +++ b/example/src/docs/zh-CN/file-upload/drag-upload.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 拖拽上传 + +可配置 `drag(type:boolean)`,来控制组件是否可以拖拽文件上传,如果配置了 `accept` 属性,可通过 `@drop-error` 事件获取不合规的拖拽文件。 + + +
diff --git a/example/src/docs/zh-CN/file-upload/dynamic-disable.md b/example/src/docs/zh-CN/file-upload/dynamic-disable.md new file mode 100644 index 000000000..b47ae4f05 --- /dev/null +++ b/example/src/docs/zh-CN/file-upload/dynamic-disable.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 禁用 + +可配置disabled(type:boolean),来控制组件是否禁用 + + +
diff --git a/example/src/docs/zh-CN/file-upload/file-picture-card.md b/example/src/docs/zh-CN/file-upload/file-picture-card.md new file mode 100644 index 000000000..630180430 --- /dev/null +++ b/example/src/docs/zh-CN/file-upload/file-picture-card.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 文件缩略图 + + + +
diff --git a/example/src/docs/zh-CN/file-upload/image-size.md b/example/src/docs/zh-CN/file-upload/image-size.md new file mode 100644 index 000000000..8d201c7df --- /dev/null +++ b/example/src/docs/zh-CN/file-upload/image-size.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### mini 模式 + +
+ +获取上传的片的原始尺寸 + + + +
diff --git a/example/src/docs/zh-CN/file-upload/jalor-request.md b/example/src/docs/zh-CN/file-upload/jalor-request.md new file mode 100644 index 000000000..5aca06b1d --- /dev/null +++ b/example/src/docs/zh-CN/file-upload/jalor-request.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 网关上传 + +不配置 `action` 属性时,默认生成网关链接,也可以通过 `getFileUploadUrl()` 方法获取生成的网关链接,如果要修改网关后面的上传地址请修改 `$service.setting.services.Fileupload.Upload`。 + + + +
diff --git a/example/src/docs/zh-CN/file-upload/manual-upload.md b/example/src/docs/zh-CN/file-upload/manual-upload.md new file mode 100644 index 000000000..87e6f37ce --- /dev/null +++ b/example/src/docs/zh-CN/file-upload/manual-upload.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 手动上传 + +通过 action 配置上传地址,通过 submit 设置手动上传 + + + +
diff --git a/example/src/docs/zh-CN/file-upload/max-file-count.md b/example/src/docs/zh-CN/file-upload/max-file-count.md new file mode 100644 index 000000000..7c551cc1d --- /dev/null +++ b/example/src/docs/zh-CN/file-upload/max-file-count.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 最大上传文件数 + +
+ +可通过配置limit(type:Number,大于0的整数)来限制上传文件的个数 + + +
diff --git a/example/src/docs/zh-CN/file-upload/mini-mode.md b/example/src/docs/zh-CN/file-upload/mini-mode.md new file mode 100644 index 000000000..00f4531fd --- /dev/null +++ b/example/src/docs/zh-CN/file-upload/mini-mode.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### mini 模式 + +
+ +可通过配置 mini-mode,设置显示 mini 模式 + + + +
diff --git a/example/src/docs/zh-CN/file-upload/multiple-file.md b/example/src/docs/zh-CN/file-upload/multiple-file.md new file mode 100644 index 000000000..4a0cc89b0 --- /dev/null +++ b/example/src/docs/zh-CN/file-upload/multiple-file.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 文件多选 + +文件选择默认单选 +可配置multiple = 'true' 实现文件多选 + + +
diff --git a/example/src/docs/zh-CN/file-upload/picture-card.md b/example/src/docs/zh-CN/file-upload/picture-card.md new file mode 100644 index 000000000..550a8cdbd --- /dev/null +++ b/example/src/docs/zh-CN/file-upload/picture-card.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 照片墙 + +可配置list-type = 'picture-card'开启照片墙模式 + + +
diff --git a/example/src/docs/zh-CN/file-upload/picture-list.md b/example/src/docs/zh-CN/file-upload/picture-list.md new file mode 100644 index 000000000..c832dcb3c --- /dev/null +++ b/example/src/docs/zh-CN/file-upload/picture-list.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 图片列表缩略图 + +
+ +可通过配置list-type="picture",来实现图片列表缩略图显示 + + +
diff --git a/example/src/docs/zh-CN/file-upload/prevent-delete-file.md b/example/src/docs/zh-CN/file-upload/prevent-delete-file.md new file mode 100644 index 000000000..790bba2a1 --- /dev/null +++ b/example/src/docs/zh-CN/file-upload/prevent-delete-file.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 阻止删除文件 + +:before-remove(移除文件前回调事件),方法里面return true/false,表示是否可以删除 + + +
diff --git a/example/src/docs/zh-CN/file-upload/prevent-upload-file.md b/example/src/docs/zh-CN/file-upload/prevent-upload-file.md new file mode 100644 index 000000000..24c298db9 --- /dev/null +++ b/example/src/docs/zh-CN/file-upload/prevent-upload-file.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 阻止上传文件 + +before-upload(上传前回调事件),方法里面 return true/false,表示是否可以进行上传文件 + + + +
diff --git a/example/src/docs/zh-CN/file-upload/size.md b/example/src/docs/zh-CN/file-upload/size.md new file mode 100644 index 000000000..018153301 --- /dev/null +++ b/example/src/docs/zh-CN/file-upload/size.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 设置组件大小 + +可选值为`medium`,`small`,`mini` + + + +
diff --git a/example/src/docs/zh-CN/file-upload/upload-events.md b/example/src/docs/zh-CN/file-upload/upload-events.md new file mode 100644 index 000000000..0c4e6ebf0 --- /dev/null +++ b/example/src/docs/zh-CN/file-upload/upload-events.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 事件 + +`preview` 点击文件列表中已上传的文件时触发的事件。 +`remove` 文件列表移除文件时触发的事件。 +`error` 文件上传失败时触发的事件。 +`exceed` 文件超出个数限制时触发的事件。 +`progress` 文件上传时触发的事件。 +`change` 文件状态改变时触发的事件,添加文件、上传成功和上传失败时都会被触发。 +`success` 文件上传成功时触发的事件。 + + + +
diff --git a/example/src/docs/zh-CN/file-upload/upload-file-filters.md b/example/src/docs/zh-CN/file-upload/upload-file-filters.md new file mode 100644 index 000000000..784b9e96e --- /dev/null +++ b/example/src/docs/zh-CN/file-upload/upload-file-filters.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 基本用法 + + + +
diff --git a/example/src/docs/zh-CN/file-upload/upload-file-list.md b/example/src/docs/zh-CN/file-upload/upload-file-list.md new file mode 100644 index 000000000..5ecc7c880 --- /dev/null +++ b/example/src/docs/zh-CN/file-upload/upload-file-list.md @@ -0,0 +1,28 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 上传的文件列表 + +通过 `show-file-list` 配置是否显示是否显示已上传文件列表,默认值为 true ,需要与 file-list 同时使用 +可配置 `:file-list(type:Object)`来显示已上传的文件名和地址 + + + + +### 上传的文件列表弹出显示 + +通过 `list-type = thumb` 开启文件列表弹窗显示,`thumbOption` 设置弹窗相关数据; + + + + +
diff --git a/example/src/docs/zh-CN/file-upload/upload-limit.md b/example/src/docs/zh-CN/file-upload/upload-limit.md new file mode 100644 index 000000000..bcbaaf6dd --- /dev/null +++ b/example/src/docs/zh-CN/file-upload/upload-limit.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 最大上传限制 + +可配置:before-upload(上传前事件回调),对文件类型和大小做限制 + + +
diff --git a/example/src/docs/zh-CN/file-upload/upload-request.md b/example/src/docs/zh-CN/file-upload/upload-request.md new file mode 100644 index 000000000..a1281ed5a --- /dev/null +++ b/example/src/docs/zh-CN/file-upload/upload-request.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 上传请求 + +可通过配置 action 为上传地址,可通过配置 headers 为头部请求信息 + + + +
diff --git a/example/src/docs/zh-CN/file-upload/upload-user-head.md b/example/src/docs/zh-CN/file-upload/upload-user-head.md new file mode 100644 index 000000000..bd7cce4f2 --- /dev/null +++ b/example/src/docs/zh-CN/file-upload/upload-user-head.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 用户头像上传 + + diff --git a/example/src/docs/zh-CN/file-upload/with-credentials.md b/example/src/docs/zh-CN/file-upload/with-credentials.md new file mode 100644 index 000000000..a144fd75f --- /dev/null +++ b/example/src/docs/zh-CN/file-upload/with-credentials.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## FileUpload 文件上传 + + + +可以设定文件的类型与上传的个数等。可自定义上传服务。 +
+ +### 支持发送 cookie 凭证信息 + +可通过配置:with-credentials = 'true' 开启访问服务器携带 cookie,默认为 false 。 + + + +
diff --git a/example/src/docs/zh-CN/floatbar/basic-usage.md b/example/src/docs/zh-CN/floatbar/basic-usage.md new file mode 100644 index 000000000..bef1ec1b1 --- /dev/null +++ b/example/src/docs/zh-CN/floatbar/basic-usage.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Floatbar 浮动块 + + + +始终浮动在屏幕某一位置,不会因网页滚动使此模块离开屏幕。 +
+ +### 基本用法 + +默认固定在屏幕右侧固定位置 + + + +
+ + diff --git a/example/src/docs/zh-CN/floatbar/custom-floatbar-item.md b/example/src/docs/zh-CN/floatbar/custom-floatbar-item.md new file mode 100644 index 000000000..34dd57f36 --- /dev/null +++ b/example/src/docs/zh-CN/floatbar/custom-floatbar-item.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Floatbar 浮动块 + + + +始终浮动在屏幕某一位置,不会因网页滚动使此模块离开屏幕。 +
+ +### 自定义内容 + +通过默认插槽设置浮动块的内容 + + + +
diff --git a/example/src/docs/zh-CN/floatbar/custom-style.md b/example/src/docs/zh-CN/floatbar/custom-style.md new file mode 100644 index 000000000..1a50fc38a --- /dev/null +++ b/example/src/docs/zh-CN/floatbar/custom-style.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Floatbar 浮动块 + + + +始终浮动在屏幕某一位置,不会因网页滚动使此模块离开屏幕。 +
+ +### 自定义样式 + +可通过配置 css 样式,设置浮动块的样式 + + + +
diff --git a/example/src/docs/zh-CN/floatbar/operation-floatbar-item.md b/example/src/docs/zh-CN/floatbar/operation-floatbar-item.md new file mode 100644 index 000000000..7108d7d3e --- /dev/null +++ b/example/src/docs/zh-CN/floatbar/operation-floatbar-item.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Floatbar 浮动块 + + + +始终浮动在屏幕某一位置,不会因网页滚动使此模块离开屏幕。 +
+ +### 操作浮动块内容 + + + +
diff --git a/example/src/docs/zh-CN/font.md b/example/src/docs/zh-CN/font.md new file mode 100644 index 000000000..4a8c84a79 --- /dev/null +++ b/example/src/docs/zh-CN/font.md @@ -0,0 +1,24 @@ +
+

+ +

+ +## Font 字体 + + + +
+ +### 中文字体集 + + + +### 英文字体 + + + +### 字体使用规范 + + + + diff --git a/example/src/docs/zh-CN/form/form-clear-validate.md b/example/src/docs/zh-CN/form/form-clear-validate.md new file mode 100644 index 000000000..e85bf8e9d --- /dev/null +++ b/example/src/docs/zh-CN/form/form-clear-validate.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## 移除表单项的校验结果 + + + +Form 组件下的移除表单项的校验结果的方法。 + +
+ +### 移除表单项的校验结果 + +调用 `clearValidate` 方法移除表单项的校验结果。传入待移除的表单项的 `prop` 属性或者 `prop` 组成的数组,如不传则移除整个表单的校验结果。 + + + +
diff --git a/example/src/docs/zh-CN/form/form-disabled.md b/example/src/docs/zh-CN/form/form-disabled.md new file mode 100644 index 000000000..7d96cbe64 --- /dev/null +++ b/example/src/docs/zh-CN/form/form-disabled.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Form 表单 + + + +由按钮、输入框、选择器、单选框、多选框等控件组成,用以收集、校验、提交数据。 +
+ +### 校验提示的形式 + +通过 `disabled` 可设置表单是否禁用,默认为 `false`。 + + diff --git a/example/src/docs/zh-CN/form/form-validate-setting.md b/example/src/docs/zh-CN/form/form-validate-setting.md new file mode 100644 index 000000000..b2a986edf --- /dev/null +++ b/example/src/docs/zh-CN/form/form-validate-setting.md @@ -0,0 +1,307 @@ +## 表单校验配置 + +
+
+ +表单校验是基于 `async-validator` 封装的,主要用到 `validate` 函数和 `rules` 的配置规则。 + +### API + +#### validate + +常用于提交表单的时候,对整个表单需校验字段进行校验,得到校验结果,使用示例如下所示: + +```js +this.$refs[formName].validate((valid, error) => {}) +``` + +参数说明: + +- `valid`:Boolean 类型,值为 `true` 时表示表单所有字段都校验通过,可提交表单。值为 `false` 时表示有字段没校验通过。 + +- `error`:Array 类型,包含校验不通过的字段。 + +### Rules + +用于设置表单每个需校验字段的校验规则,可设置每个字段的校验类型,是否必填,校验不成功的提示信息等。 + +#### type + +通过 `type` 设置需校验字段的校验类型,使用这个,我们就可以对一些特定的字段进行校验,而不用再像以前一样写正则,做判断。使用示例如下所示: + +```js +rules: { + name: { type: 'string', required: true } +} +``` + +可设置的值如下: + +- `string`:字符串类型(默认值) + +- `number`:数字类型 + +- `boolean`:布尔类型 + +- `method`:函数类型 + +- `regexp`:正则表达式 + +- `integer`:整型 + +- `float`:双精度浮点型数字 + +- `array`:数组类型 + +- `object`:对象类型 + +- `enum`:枚举值 + +- `date`:值必须是由日期决定的有效值 + +- `url`:网址格式 + +- `hex`:16进制数字 + +- `email`:电子邮箱类型 + +- `any`:任意类型 + +#### required + +`required` 的属性值为 Boolean 类型,用于设置字段是否为必填项,即非空验证。 + +- `true`:设置为 `true`,表示该字段为必填项,且 label 会带红色 \* 号 + +- `false`:默认值,表示该字段不是必填项,label 不会带红色 \* 号 + +#### pattern + +配置用于校验该字段的正则表达式。使用示例如下所示: + +```js +rules: { + name: { required: true, pattern: /^[a-z]+$/ } +} +``` + +#### min + +对于 string 和 array 类型,将对长度进行比较,对于 number 类型,数字不能小于 `min`。使用示例如下所示: + +```js +rules: { + users: { min: 2, message: '长度必须不小于2' } +} +``` + +#### max + +对于 string 和 array 类型,将对长度进行比较,对于 number 类型,数字不能大于 `max`。使用示例如下所示: + +```js +rules: { + users: { max: 11, message: '长度必须不大于11' } +} +``` + +#### len + +要验证字段的确切长度,请指定 `len` 属性。对于 string 和 array 类型,将对 length 属性进行比较。对于 number 类型,此属性表示该数字的精确匹配,即,它只能严格等于 `len`。如果 `len` 属性与 `min` 和 `max` 属性一起使用,则 `len` 优先。使用示例如下所示: + +```js +rules: { + users: { len: 2, message: '长度必须为2' } +} +``` + +#### trigger + +通过 `trigger` 配置触发校验规则的方式,为 `change` 时,当输入框值改变即触发校验,为 `blur` 时则失焦后触发校验。使用示例如下所示: + +```js +rules: { + users: { len: 2, message: '长度必须为2', trigger: 'change' } +} +``` + +可配置的值如下: + +- `blur`:则失焦后触发校验。 + +- `change`:当输入框值改变即触发校验 + +#### enum + +枚举值验证,验证字段的值是否在 `enum` 属性配置的数组 `['admin', 'user', 'guest']` 中。例如: + +```js +rules: { + role: { type: 'enum', enum: ['admin', 'user', 'guest'] } +} +``` + +#### whitespace + +验证必填字段是否只有空格。通常将只包含空白的必填字段视为错误。若要将仅由空格组成的字符串视为错误,则可设置 `whitespace` 为 `true` ,如果没有该配置,则全空格的输入值也是有效的。 + +```js +rules: { + name: { required: true, whitespace: true, message: '相对人名称不能为空' } +} +``` + +#### fields + +深层规则。如果需要验证深层对象属性,可以通过将嵌套规则分配给规则的 `fields` 属性来验证 object 或 array 类型的验证规则。请注意,如果不在父规则上指定 `required` 属性,则不在源对象上声明字段是完全有效的,并且深度验证规则将不会执行,因为没有任何可验证的对象。例如: + +- object 类型: + +```js +rules: { + address: { + type: 'object', required: true, // 父规则上必须指定 required 为 true + fields: { + street: { type: 'string', required: true }, + city: { type: 'string', required: true }, + zip: { type: 'string', required: true, len: 8, message: 'invalid zip' } + } + }, + name: { type: 'string', required: true } +} +``` + +- array 类型: + +```js +rules: { + roles: { + type: 'array', required: true, len: 3, + fields: { + 0: { type: 'string', required: true }, + 1: { type: 'string', required: true }, + 2: { type: 'string', required: true } + } + } +} +``` + +#### defaultField + +`defaultField` 属性可与 array 或 object 类型一起使用,以验证容器的所有值。它可以是包含验证规则的 object 或 array。例如: + +```js +rules: { + urls: { + type: 'array', required: true, + defaultField: { type: 'url' } + } +} +``` + +#### transform + +有时有必要在验证之前转换值,以强制或以某种方式对其进行清理。为此 `transform` ,向验证规则添加一个功能。在验证之前,先转换属性,然后将其重新分配给源对象,以更改该属性的值。使用场景比如:去除用户输入的空格。 + +```js +rules: { + name: { + type: 'string', + required: true, + pattern: /^[a-z]+$/, + transform(value) { + return value.trim(); + } + } +} +``` + +#### messages + +用于配置字段校验不成功时的提示信息,支持国际化。 + +- 实现此目的最简单的方法是将消息分配给规则 + +```js +rules: { + name: { type: 'string', required: true, message: 'Name is required' } +} +``` + +- 消息可以是任何类型,例如 jsx 格式 + +```js +rules: { + name: { type: 'string', required: true, message: 'Name is required' } +} +``` + +- 消息也可以是一个函数,例如,如果使用 vue-i18n + +```js +rules: { + name: { type: 'string', required: true, message: () => this.$t( 'name is required' ) } +} +``` + +#### validator + +通过 `validator` 选项为某个字段进行自定义校验,校验方法中 `callback` 必须被调用。 + +如下所示,先在 `methods` 对象中定义一个自定义校验的方法: + +```js +// 自定义的校验passwordValue的方法 +validatePass(rule, value, callback) { + if (!/^(?=._[a-z])(?=._[A-Z])(?=.\*\\d)[a-zA-Z\d]{8,}$/.test(value)) { + callback(new Error('最少八个字符,至少包含一个大写字母,一个小写字母和一个数字')) + } else { + if (this.ruleForm.passwordValue !== '') { + this.$refs.ruleForm.validateField('passwordValue') + } + callback() + } +} +``` + +然后在对应的需要校验的规则中配置 `validator: this.validatePass`: + +```js +rules: { + passwordValue: [ + { required: true, message: '必填', trigger: 'blur' }, + { validator: this.validatePass, trigger: 'blur' } + ] +} +``` + +#### asyncValidator + +通过 `asyncValidator` 选项为某个字段进行自定义异步校验,校验方法中 `callback` 必须被调用。 + +如下所示,先在 `methods` 对象中定义一个自定义的异步校验的方法: + +```js +// 自定义异步校验passwordValue的方法 +promiseField(rule, value, callback) { + ajax({ + url: 'xx', + value: value + }).then(function(data) { + callback(); + }, function(error) { + callback(new Error(error)) + }) +} +``` + +然后在对应的需要校验的规则中配置 `asyncValidator: this.promiseField`: + +```js +rules: { + passwordValue: [ + { required: true, message: '必填', trigger: 'blur' }, + { asyncValidator: this.promiseField, trigger: 'blur' } + ] +} +``` diff --git a/example/src/docs/zh-CN/form/form-validation.md b/example/src/docs/zh-CN/form/form-validation.md new file mode 100644 index 000000000..b44003ffc --- /dev/null +++ b/example/src/docs/zh-CN/form/form-validation.md @@ -0,0 +1,36 @@ +
+

+ +

+ +## Form 表单 + + + +由按钮、输入框、选择器、单选框、多选框等控件组成,用以收集、校验、提交数据。 + +
+ +### 表单校验 + +包括常用的必填、日期、时间、URL、邮件等校验规则。通过 `trigger` 配置触发校验规则的方式,为 `change` 时,当输入框值改变即触发校验,为 `blur` 时则失焦后触发校验。 + + + +:::tip 注意 + +校验时若校验类型为 `date`,则需要使用 `DatePicker` 组件进行日期选择,若使用 `Input` 组件进行日期输入,建议使用自定义校验规则。 + +::: + +### 自定义校验规则 + +通过 `validator` 选项进行自定义校验,校验方法中 `callback` 必须被调用。通过配置 `validate-on-rule-change` 属性,设置是否在 `rules` 属性改变后立即触发一次验证 + + + +### 校验提示位置 + +通过 `validate-position` 可自定义错误提示出现的位置,在 `Form` 组件上设置后,子组件`FormItem`会继承父组件设置。单独在 `FormItem` 组件上进行设置优先级高于在 `From`上的设置。 + + \ No newline at end of file diff --git a/example/src/docs/zh-CN/form/form.md b/example/src/docs/zh-CN/form/form.md new file mode 100644 index 000000000..757387d2b --- /dev/null +++ b/example/src/docs/zh-CN/form/form.md @@ -0,0 +1,28 @@ +
+

+ +

+ +## Form 表单 + + + +由按钮、输入框、选择器、单选框、多选框等控件组成,用以收集、校验、提交数据。 + +
+ +### 常用表单 + +在 Form 组件中,每一个表单域由一个 FormItem 组件构成,表单域中可以放置各种类型的表单控件,包括 Input、Select、Checkbox、Radio、Switch、DatePicker、TimePicker。 + + + +### 行内表单 + +当垂直方向空间受限且表单较简单时,可以在一行内放置表单,设置 `inline` 属性可以让表单域变为行内的表单域。 + + + +
+ + diff --git a/example/src/docs/zh-CN/form/formitem.md b/example/src/docs/zh-CN/form/formitem.md new file mode 100644 index 000000000..7a6b3ebcd --- /dev/null +++ b/example/src/docs/zh-CN/form/formitem.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## FormItem 表单项 + + + +Form 组件下的 FormItem 配置。 +
+ +### 行内表单 + +当垂直方向空间受限且表单较简单时,可以在一行内放置表单,设置 `inline` 属性可以让表单域变为行内的表单域。 + + + +
+ + diff --git a/example/src/docs/zh-CN/form/novalid-tip.md b/example/src/docs/zh-CN/form/novalid-tip.md new file mode 100644 index 000000000..a8a9c01a9 --- /dev/null +++ b/example/src/docs/zh-CN/form/novalid-tip.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Form 表单 + + + +配置是否显示校验提示框的tip内容提示 + +
+ +### 隐藏表单项校验提示 + +通过配置 `novalid-tip` 设置是否显示校验提示框的tip内容提示。 + + + +
diff --git a/example/src/docs/zh-CN/form/size.md b/example/src/docs/zh-CN/form/size.md new file mode 100644 index 000000000..7601ac757 --- /dev/null +++ b/example/src/docs/zh-CN/form/size.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## FormItem 表单项 + + + +由按钮、输入框、选择器、单选框、多选框等控件组成,用以收集、校验、提交数据。 + +
+ +### 表单尺寸 + +通过在 `tiny-form` 标签上设置 `size` 属性可以改变表单内组件尺寸;设置 `disabled` 属性可以改变表单内组件禁用状态 + + + +
diff --git a/example/src/docs/zh-CN/form/slot-label.md b/example/src/docs/zh-CN/form/slot-label.md new file mode 100644 index 000000000..c3374cbff --- /dev/null +++ b/example/src/docs/zh-CN/form/slot-label.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## FormItem 表单项 + + + +由按钮、输入框、选择器、单选框、多选框等控件组成,用以收集、校验、提交数据。 + +
+ +### 标签文本插槽 + +通过在 `label` 插槽,自定义标签文本的内容 + + + +
diff --git a/example/src/docs/zh-CN/form/validate-type.md b/example/src/docs/zh-CN/form/validate-type.md new file mode 100644 index 000000000..fc0eb0444 --- /dev/null +++ b/example/src/docs/zh-CN/form/validate-type.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Form 表单 + + + +由按钮、输入框、选择器、单选框、多选框等控件组成,用以收集、校验、提交数据。 +
+ +### 校验提示的形式 + +通过 `validate-type` 可设置校验提示信息是以 `text` 文本显示还是以 `tip` 提示框的形式显示,默认为 `tip` 。也可直接配置在某一个 `` 上控制某一项的校验提示形式。 + + diff --git a/example/src/docs/zh-CN/fullscreen/basic-usage.md b/example/src/docs/zh-CN/fullscreen/basic-usage.md new file mode 100644 index 000000000..bdd3fc00d --- /dev/null +++ b/example/src/docs/zh-CN/fullscreen/basic-usage.md @@ -0,0 +1,24 @@ +
+

+ +

+ +## Fullscreen 全屏显示 + + + +
+ +### 组件式使用 + + + +
+ +### 函数式使用 + + + +
+ + diff --git a/example/src/docs/zh-CN/grid/align/column-align.md b/example/src/docs/zh-CN/grid/align/column-align.md new file mode 100644 index 000000000..bef3abd57 --- /dev/null +++ b/example/src/docs/zh-CN/grid/align/column-align.md @@ -0,0 +1,23 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 列对齐 + +`align` 设置单独列对齐方式 可选值为 `left` `center` `right`,默认值为 `left`。 + +:::tip +列设置的 `align` 会覆盖掉表格设置的 `align` +::: + + + +
diff --git a/example/src/docs/zh-CN/grid/align/footer-align.md b/example/src/docs/zh-CN/grid/align/footer-align.md new file mode 100644 index 000000000..4f25dc76d --- /dev/null +++ b/example/src/docs/zh-CN/grid/align/footer-align.md @@ -0,0 +1,32 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 表尾左对齐 + +`footer-align` 设置表尾对齐方式的可选值为 `left` `center` `right`,默认值为 `left`。 + +:::tip +表格上配置 `footer-align` 会被列配置的 `footer-align` 覆盖 +::: + + + +### 表尾右对齐 + + + + +### 表尾居中对齐 + + + +
diff --git a/example/src/docs/zh-CN/grid/align/grid-align.md b/example/src/docs/zh-CN/grid/align/grid-align.md new file mode 100644 index 000000000..ed1cc4023 --- /dev/null +++ b/example/src/docs/zh-CN/grid/align/grid-align.md @@ -0,0 +1,31 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 表格左对齐 + +`align` 设置全部列对齐方式可选值为 `left` `center` `right`,默认值为 `left`。 + +:::tip +表格设置对齐方式优先级最低,会被单独设置对齐方式覆盖 +::: + + + +### 表格右对齐 + + + +### 表格居中对齐 + + + +
diff --git a/example/src/docs/zh-CN/grid/align/header-align.md b/example/src/docs/zh-CN/grid/align/header-align.md new file mode 100644 index 000000000..2b44ee95e --- /dev/null +++ b/example/src/docs/zh-CN/grid/align/header-align.md @@ -0,0 +1,31 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 表头左对齐 + +`header-align` 设置表头对齐方式可选值为 `left` `center` `right`,默认值为 `left`。 + +:::tip +表格上配置 `header-align` 会被列配置的 `header-align` 覆盖 +::: + + + +### 表头右对齐 + + + +### 表头居中对齐 + + + +
diff --git a/example/src/docs/zh-CN/grid/cascade/any-parent-cascade.md b/example/src/docs/zh-CN/grid/cascade/any-parent-cascade.md new file mode 100644 index 000000000..b85ae6f48 --- /dev/null +++ b/example/src/docs/zh-CN/grid/cascade/any-parent-cascade.md @@ -0,0 +1,23 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### Grid-数据级联-任意父级联 + +需要在 `grid` 标签上配 `edit-config` 对象,`activeMethod` 编辑前的事件处理编辑项数据集。 +`grid-column` 列上面配置 `editor` 对象,`component` 用来渲染编辑组件。 +`attrs` 配置级联数据。 +`events` 来设置事件。 +具体参考下面示例。 + + + +
diff --git a/example/src/docs/zh-CN/grid/cascade/normal-column-cascade.md b/example/src/docs/zh-CN/grid/cascade/normal-column-cascade.md new file mode 100644 index 000000000..c51b9c096 --- /dev/null +++ b/example/src/docs/zh-CN/grid/cascade/normal-column-cascade.md @@ -0,0 +1,23 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### Grid-数据级联-正常列级联 + +需要在 `grid` 标签上配 `edit-config` 对象,`activeMethod` 编辑前的事件处理编辑项数据集。 +`grid-column` 列上面配置 `editor` 对象,`component` 用来渲染编辑组件。 +`attrs` 配置级联数据。 +`events` 来设置事件。 +具体参考下面示例。 + + + +
diff --git a/example/src/docs/zh-CN/grid/common-header.vue b/example/src/docs/zh-CN/grid/common-header.vue new file mode 100644 index 000000000..5637797ef --- /dev/null +++ b/example/src/docs/zh-CN/grid/common-header.vue @@ -0,0 +1,17 @@ + + + diff --git a/example/src/docs/zh-CN/grid/context-menu/cell-menu.md b/example/src/docs/zh-CN/grid/context-menu/cell-menu.md new file mode 100644 index 000000000..ce72b6014 --- /dev/null +++ b/example/src/docs/zh-CN/grid/context-menu/cell-menu.md @@ -0,0 +1,24 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### Grid-右键菜单-单元格菜单 + +配置 `context-menu="{body: {options: bodyMenus},visibleMethod}"` 对象来控制单元格菜单。 +`bodyMenus` 里面配置 `visible` 是否显示菜单,`disabled` 是否禁用菜单项。 +可配合 `visibleMethod` 方法来控制菜单权限。 +`@cell-context-menu` 监控菜单弹出前事件。 +`@context-menu-click` 监控菜单点击事件。 +具体参考下面示例。 + + + +
diff --git a/example/src/docs/zh-CN/grid/context-menu/footer-menu.md b/example/src/docs/zh-CN/grid/context-menu/footer-menu.md new file mode 100644 index 000000000..76c612716 --- /dev/null +++ b/example/src/docs/zh-CN/grid/context-menu/footer-menu.md @@ -0,0 +1,24 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### Grid-右键菜单-表尾菜单 + +必须要配置 `:context-menu="{body: {options: bodyMenus}}" `,`show-footer`,`:footer-method="footerMethod"` 才能展示表尾菜单 +配置 `:context-menu="{body: {options: bodyMenus}, footer: {options: footerMenus},visibleMethod}"` 对象来控制表头菜单。 +`footerMenus` 里面配置 `visible` 是否显示菜单, `disabled` 是否禁用菜单项。 +可配合 `visibleMethod` 方法来控制菜单权限。 +`@context-menu-click` 监控菜单点击事件。 +具体参考下面示例。 + + + +
diff --git a/example/src/docs/zh-CN/grid/context-menu/header-menu.md b/example/src/docs/zh-CN/grid/context-menu/header-menu.md new file mode 100644 index 000000000..50a28b9b8 --- /dev/null +++ b/example/src/docs/zh-CN/grid/context-menu/header-menu.md @@ -0,0 +1,23 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### Grid-右键菜单-表头菜单 + +配置 `:context-menu="{header: {options: headerMenus}, visibleMethod}"` 对象来控制表头菜单。 +`headerMenus` 里面配置 `visible` 是否显示菜单, `disabled` 是否禁用菜单项。 +可配合 `visibleMethod` 方法来控制菜单权限。 +`@context-menu-click` 监控菜单点击事件。 +具体参考下面示例。 + + + +
diff --git a/example/src/docs/zh-CN/grid/context-menu/menu-permissions.md b/example/src/docs/zh-CN/grid/context-menu/menu-permissions.md new file mode 100644 index 000000000..9a7296539 --- /dev/null +++ b/example/src/docs/zh-CN/grid/context-menu/menu-permissions.md @@ -0,0 +1,24 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### Grid-右键菜单-菜单权限 + +配置 `:context-menu="{header: {options: headerMenus},body: {options: bodyMenus}, footer: {options: footerMenus},visibleMethod}"` 对象来控制表头菜单。 +`header,bodyMenus,footer` 里面配置 `visible` 是否显示菜单, `disabled` 是否禁用菜单项。 +使用配合 `visibleMethod` 方法来控制菜单权限。 +`@cell-context-menu` 监控菜单弹出前事件。 +`@context-menu-click` 监控菜单点击事件。 +具体参考下面示例。 + + + +
diff --git a/example/src/docs/zh-CN/grid/custom-style/cell-style.md b/example/src/docs/zh-CN/grid/custom-style/cell-style.md new file mode 100644 index 000000000..6a1b5a5d3 --- /dev/null +++ b/example/src/docs/zh-CN/grid/custom-style/cell-style.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 单元格样式 + +通过 `cell-class-name` 自定义设置表格的单元格样式 + + + +### 列样式 + +通过 `class-name` 自定义设置表格的列样式 + + + +
diff --git a/example/src/docs/zh-CN/grid/custom-style/footer-style.md b/example/src/docs/zh-CN/grid/custom-style/footer-style.md new file mode 100644 index 000000000..b83ecdd46 --- /dev/null +++ b/example/src/docs/zh-CN/grid/custom-style/footer-style.md @@ -0,0 +1,23 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 表尾样式(自定义表尾行样式) + +通过 `footer-cell-class-name` 和 `footer-row-class-name` 设置表尾的单元格和行样式 + + + +### 表尾样式(自定义表尾单元格样式) + + + +
diff --git a/example/src/docs/zh-CN/grid/custom-style/header-style.md b/example/src/docs/zh-CN/grid/custom-style/header-style.md new file mode 100644 index 000000000..b51cabedf --- /dev/null +++ b/example/src/docs/zh-CN/grid/custom-style/header-style.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 设置表头样式 + +通过 `header-cell-class-name` 和 `header-row-class-name` 设置表头的单元格和行样式 + +### 设置表头单元格样式 + + + +### 设置表头行样式 + + + +
diff --git a/example/src/docs/zh-CN/grid/custom-style/row-style.md b/example/src/docs/zh-CN/grid/custom-style/row-style.md new file mode 100644 index 000000000..046d1f26d --- /dev/null +++ b/example/src/docs/zh-CN/grid/custom-style/row-style.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 设置行样式 + +通过 `row-class-name` 自定义设置表格的行样式 + +### 设置行样式 + + + +
diff --git a/example/src/docs/zh-CN/grid/customized/column-fixed.md b/example/src/docs/zh-CN/grid/customized/column-fixed.md new file mode 100644 index 000000000..c86973ba9 --- /dev/null +++ b/example/src/docs/zh-CN/grid/customized/column-fixed.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 列冻结 + +在 `column` 标签上配置 `fixed="left"` 可以固定在左侧,并在 `toolbar` 标签上配置 `setting` 开启个性化设置,在个性化面板里可以设置是否固定列 + + + +
diff --git a/example/src/docs/zh-CN/grid/customized/column-sort.md b/example/src/docs/zh-CN/grid/customized/column-sort.md new file mode 100644 index 000000000..30608b974 --- /dev/null +++ b/example/src/docs/zh-CN/grid/customized/column-sort.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 排序 + +在 `column` 标签上配置 `sortable` 可以排序(未配置的列,在个性化面板中的排序图标会隐藏),并在 `toolbar` 标签上配置 `setting` 开启个性化设置,在个性化面板里进行排序,排序过后会保存在本地的 `localStroage` 里,刷新页面页面上会显示排序过后的数据 + + + +
diff --git a/example/src/docs/zh-CN/grid/customized/column-sortable.md b/example/src/docs/zh-CN/grid/customized/column-sortable.md new file mode 100644 index 000000000..612d31255 --- /dev/null +++ b/example/src/docs/zh-CN/grid/customized/column-sortable.md @@ -0,0 +1,27 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 本地记录 + +配置 `setting` 的 `sortable` 为 `sortablejs` 可实现拖拽排序列功能, 此功能在多级列头下无效 + + + +
+ +### 加载远端数据 + +通过 `reloadCustoms` 方法,将第二个参数置为 `true` 可按序加载列 + + + +
diff --git a/example/src/docs/zh-CN/grid/customized/column-visible-hidden.md b/example/src/docs/zh-CN/grid/customized/column-visible-hidden.md new file mode 100644 index 000000000..ad4d1969a --- /dev/null +++ b/example/src/docs/zh-CN/grid/customized/column-visible-hidden.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 列显示隐藏 + +在 `toolbar` 标签上配置 `setting` 开启个性化设置,在个性化面板里可以设置是否显示和隐藏列 + + + +### 手动隐藏显示列 + +通过调用 `hideColumn(column)` 方法隐藏指定列,`showColumn(column)` 方法显示指定列。使用这两个方法隐藏/显示列时,还需要再调用 `refreshColumn()` 方法刷新列配置才能实际生效。 + + + +
diff --git a/example/src/docs/zh-CN/grid/customized/column-width.md b/example/src/docs/zh-CN/grid/customized/column-width.md new file mode 100644 index 000000000..85108828b --- /dev/null +++ b/example/src/docs/zh-CN/grid/customized/column-width.md @@ -0,0 +1,29 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 列宽 + +在 `grid` 标签上配置 `resizable="true"` 可以调整列宽,并在 `toolbar` 标签上配置 `resizable="{storage: true}"` 保存在本地的 `localStroage` 里,刷新页面表格的列宽按照拖动后的列宽显示 + + + +### 手动重置列操作 + +:::tip 方法说明 +`resetResizable()`:手动重置列宽拖动的操作,还原到初始状态 +`resetCustoms()`:手动重置列的显示/隐藏操作,还原到初始状态 +`resetAll()`:手动重置列的所有操作,还原到初始状态 +::: + +请先对列宽进行拖动、隐藏列等操作,然后单击对应按钮查看效果。 + + diff --git a/example/src/docs/zh-CN/grid/customized/local-storage.md b/example/src/docs/zh-CN/grid/customized/local-storage.md new file mode 100644 index 000000000..228944941 --- /dev/null +++ b/example/src/docs/zh-CN/grid/customized/local-storage.md @@ -0,0 +1,22 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 本地存储 + +在 `toolbar` 标签上配置 `:setting="{storage:'local'}"` 开启个性化并保存到本地 `localSotrage` 里 + +:::danger 在V3.10.0版本中新增了列顺序存储功能, 在 @remote-setting 事件中暴露的数据由原来仅修改过的列信息变成了所有的列信息 +::: + + + +
diff --git a/example/src/docs/zh-CN/grid/customized/page-size.md b/example/src/docs/zh-CN/grid/customized/page-size.md new file mode 100644 index 000000000..b91705586 --- /dev/null +++ b/example/src/docs/zh-CN/grid/customized/page-size.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 + +
+ +### 分页条数 + +在 `toolbar` 标签上配置 `setting` 开启个性化设置,在个性化面板里选择其它设置,其它设置里可以选择每页显示的条数,可以通过 `setting` 的 `other` 属性控制显示其他设置,`Boolean` 类型默认为 `true` + + + +
diff --git a/example/src/docs/zh-CN/grid/customized/prsonalized-drag.md b/example/src/docs/zh-CN/grid/customized/prsonalized-drag.md new file mode 100644 index 000000000..3b3a91a99 --- /dev/null +++ b/example/src/docs/zh-CN/grid/customized/prsonalized-drag.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 个性化面板拖拽前事件 + +在 `toolbar` 标签上配置 `setting` 开启个性化设置,在个性化面板里配置 `onBeforeMove` 拖拽前事件,也可配置 `filter` 设置类名, 拖拽个性化面板某一行会触发个性化面板的拖拽前事件。 + + + +
diff --git a/example/src/docs/zh-CN/grid/customized/server-storage.md b/example/src/docs/zh-CN/grid/customized/server-storage.md new file mode 100644 index 000000000..13d23306d --- /dev/null +++ b/example/src/docs/zh-CN/grid/customized/server-storage.md @@ -0,0 +1,29 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 服务端存储 + +在 `toolbar` 标签上配置 `:setting="{storage:'remote'}"` 开启个性化并启用远程服务获取个性化数据,并配置 `@remote-setting` 调用 `reloadCustoms` 方法更新个性化数据。 + +:::warning 注意 +如果是根据服务端数据控制显示/隐藏列,调用接口获取到个性化的数据后需手动调用 `reloadCustoms` 方法更新。 +::: +:::danger 在V3.10.0版本中新增了列顺序存储功能, 在 @remote-setting 事件中暴露的数据由原来仅修改过的列信息变成了所有的列信息 +::: + + + +:::tip 说明 +Grid 个性化设置默认不是服务端存储,如果需要服务端存储,需要每个 Grid 单独实现。 +::: + +
diff --git a/example/src/docs/zh-CN/grid/customized/sort-type.md b/example/src/docs/zh-CN/grid/customized/sort-type.md new file mode 100644 index 000000000..74c6bcfa1 --- /dev/null +++ b/example/src/docs/zh-CN/grid/customized/sort-type.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 排序类型 + +在 `column` 标签上配置 `sortable` 可以排序,并在 `toolbar` 标签上配置 `setting` 开启个性化设置,在个性化面板里选择其它设置,其它设置里可以选择排序类型,排序类型有当前页排序和所有数据排序选项,默认是当前页排序 + + + +
diff --git a/example/src/docs/zh-CN/grid/data-source/auto-load.md b/example/src/docs/zh-CN/grid/data-source/auto-load.md new file mode 100644 index 000000000..18bf1a61c --- /dev/null +++ b/example/src/docs/zh-CN/grid/data-source/auto-load.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +表格属性 `auto-load` 设置是否开启自动请求服务,配置 fetch-data 时有效。如下示例设置 `auto-load` 为 false 后,就不会自动加载数据。 + + + +
diff --git a/example/src/docs/zh-CN/grid/data-source/column-asyn-rendering.md b/example/src/docs/zh-CN/grid/data-source/column-asyn-rendering.md new file mode 100644 index 000000000..a98f93bc5 --- /dev/null +++ b/example/src/docs/zh-CN/grid/data-source/column-asyn-rendering.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +异步渲染配置步骤: +1、表格属性设置 `is-async-column` 开启异步渲染; +2、表格列设置 `format-config` 开启该列数据异步渲染。 + + + +
diff --git a/example/src/docs/zh-CN/grid/data-source/columns.md b/example/src/docs/zh-CN/grid/data-source/columns.md new file mode 100644 index 000000000..a174e261f --- /dev/null +++ b/example/src/docs/zh-CN/grid/data-source/columns.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +表格属性 `columns` 设置表格列的配置信息,具体参考列配置项。 + +
+ + + +
diff --git a/example/src/docs/zh-CN/grid/data-source/proxy-config.md b/example/src/docs/zh-CN/grid/data-source/proxy-config.md new file mode 100644 index 000000000..eed0d3f85 --- /dev/null +++ b/example/src/docs/zh-CN/grid/data-source/proxy-config.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +表格属性 `proxy-config` 设置代理配置。 + +
+ + + +
diff --git a/example/src/docs/zh-CN/grid/data-source/request-service.md b/example/src/docs/zh-CN/grid/data-source/request-service.md new file mode 100644 index 000000000..f3b59e109 --- /dev/null +++ b/example/src/docs/zh-CN/grid/data-source/request-service.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +表格属性设置 `fetch-data` 开启服务请求。 + + + +
diff --git a/example/src/docs/zh-CN/grid/data-source/static-data.md b/example/src/docs/zh-CN/grid/data-source/static-data.md new file mode 100644 index 000000000..a2b9785e7 --- /dev/null +++ b/example/src/docs/zh-CN/grid/data-source/static-data.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +表格属性设置 `data` 开启双向绑定静态数据。 + + + +
diff --git a/example/src/docs/zh-CN/grid/drag/column-drag.md b/example/src/docs/zh-CN/grid/drag/column-drag.md new file mode 100644 index 000000000..1e70911e4 --- /dev/null +++ b/example/src/docs/zh-CN/grid/drag/column-drag.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 列拖拽 + +通过设置 `drop-config` 的 `column` 属性控制列拖拽,默认为开启列拖拽,列拖拽事件有 `@column-drop-start`、`column-drop-move`、`column-drop-end`。 + + + +
diff --git a/example/src/docs/zh-CN/grid/drag/row-drag.md b/example/src/docs/zh-CN/grid/drag/row-drag.md new file mode 100644 index 000000000..d17a2f7e7 --- /dev/null +++ b/example/src/docs/zh-CN/grid/drag/row-drag.md @@ -0,0 +1,28 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 行拖拽 + +通过设置 `drop-config` 的 `row` 属性控制行拖拽,默认为开启行拖拽,行拖拽事件有 `@row-drop-start`、`row-drop-move`、`row-drop-end`。 + + + +
+ +### 拖拽控制 + +可以通过设置 `drop-config` 的 `onBeforeMove` 事件控制行拖动,也可以配置`drop-config` 的 `filter` 与自定义样式结合使用来限制拖动 + + + +
+ diff --git a/example/src/docs/zh-CN/grid/dynamically-columns.md b/example/src/docs/zh-CN/grid/dynamically-columns.md new file mode 100644 index 000000000..a7b996cf8 --- /dev/null +++ b/example/src/docs/zh-CN/grid/dynamically-columns.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### Grid-根据选择日期动态生成列 + + + +
diff --git a/example/src/docs/zh-CN/grid/edit/cell-editing.md b/example/src/docs/zh-CN/grid/edit/cell-editing.md new file mode 100644 index 000000000..e56702a05 --- /dev/null +++ b/example/src/docs/zh-CN/grid/edit/cell-editing.md @@ -0,0 +1,28 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 单元格编辑 + +表格属性设置 `edit-config` 开启编辑模式,然后在该属性对象内设置 `mode: 'cell'` 开启行编辑,即:`:edit-config="{ mode: 'cell' }"`。 +表格列属性设置 `show-icon` 设置列头是否显示编辑图标,在编辑时有效。 + + + +
+ +### 手动激活编辑 + +`setActiveCell(row, field)` 方法可激活指定单元格编辑。`setActiveRow(row)` 方法激活行编辑,如果是 mode=cell 则默认激活第一个单元格。 + + + +
diff --git a/example/src/docs/zh-CN/grid/edit/custom-editing.md b/example/src/docs/zh-CN/grid/edit/custom-editing.md new file mode 100644 index 000000000..ec2e1171b --- /dev/null +++ b/example/src/docs/zh-CN/grid/edit/custom-editing.md @@ -0,0 +1,27 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 表格 + +表格属性设置 `edit-config` 开启编辑模式,然后在该属性对象内设置 `activeMethod` 自定义编辑规则。 + + + +
+ +### 自定义编辑校验规则 + +表格属性设置 `edit-config` 开启编辑模式,并配置 `edit-rules` 对象来设置校验对象和校验规则,然后在 `editor` 对象中设置 `isValidAlways` 开启编辑实时校验。 + + + +
diff --git a/example/src/docs/zh-CN/grid/edit/format-value.md b/example/src/docs/zh-CN/grid/edit/format-value.md new file mode 100644 index 000000000..3b08b3554 --- /dev/null +++ b/example/src/docs/zh-CN/grid/edit/format-value.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 单元格编辑 + +表格列属性 `format-value` 格式化单元格编辑器组件的传入值。 + + + +
diff --git a/example/src/docs/zh-CN/grid/edit/row-editing.md b/example/src/docs/zh-CN/grid/edit/row-editing.md new file mode 100644 index 000000000..ffc8ee101 --- /dev/null +++ b/example/src/docs/zh-CN/grid/edit/row-editing.md @@ -0,0 +1,31 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 行编辑 + +表格属性设置 `edit-config` 开启编辑模式,然后在该属性对象内设置 `mode: 'row'` 开启行编辑,即:`:edit-config="{ mode: 'row' }"`。 + + + +### 还原更改 + +调用方法 `revertData(rows, field)` 可以还原指定行 row 或者整个表格的数据。rows 为对象则还原一行数据,为数组则还原多行数据,field 可不指定。不指定任何参数时则还原整个表格数据。 + + + +### 检查数据是否改变 + +`hasRowChange(row, field)` 检查行或列数据是否发生改变,field 可不指定。 + + + +
diff --git a/example/src/docs/zh-CN/grid/edit/status-of-editing.md b/example/src/docs/zh-CN/grid/edit/status-of-editing.md new file mode 100644 index 000000000..b0e084b6d --- /dev/null +++ b/example/src/docs/zh-CN/grid/edit/status-of-editing.md @@ -0,0 +1,23 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 开启编辑状态 + + 表格属性设置 `edit-config` 开启编辑模式,然后在该属性对象内设置 `showStatus` 开启或关闭单元格更新状态(单元格左上角倒三角形更新标识),默认值为 `true` 开启状态。 + + + +### 关闭编辑状态 + + + +
diff --git a/example/src/docs/zh-CN/grid/edit/trigger-mode-for-editing.md b/example/src/docs/zh-CN/grid/edit/trigger-mode-for-editing.md new file mode 100644 index 000000000..d94f27eff --- /dev/null +++ b/example/src/docs/zh-CN/grid/edit/trigger-mode-for-editing.md @@ -0,0 +1,27 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 点击触发编辑 + +表格属性设置 `edit-config` 开启编辑模式,然后在该属性对象内设置 `trigger` 修改触发方式。可选值有 `点击触发(click)/ 双击触发(dblclick)/ 手动触发(manual)`,默认值为 `click 点击触发`。 + + + +### 双击触发编辑 + + + +### 手动触发编辑 + + + +
diff --git a/example/src/docs/zh-CN/grid/editor/custom-editor-aui3.md b/example/src/docs/zh-CN/grid/editor/custom-editor-aui3.md new file mode 100644 index 000000000..efc854d18 --- /dev/null +++ b/example/src/docs/zh-CN/grid/editor/custom-editor-aui3.md @@ -0,0 +1,32 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 引入 Tiny Vue 组件作为编辑器 + +通过 `属性配置` 方式引入 Tiny Vue `Select` 组件。 + + + +
+ +通过 `属性配置` 方式引入 `Autocomplete` 组件。 + + + +
+ + +通过 `slot 插槽` 方式引入 `Autocomplete` 组件。 + + + +
diff --git a/example/src/docs/zh-CN/grid/editor/custom-editor.md b/example/src/docs/zh-CN/grid/editor/custom-editor.md new file mode 100644 index 000000000..0d4d29529 --- /dev/null +++ b/example/src/docs/zh-CN/grid/editor/custom-editor.md @@ -0,0 +1,22 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### Grid-编辑器-自定义编辑器 + +`grid` 标签上配置 `edit-config`。 +在 `grid-column` 列配置 `editor` 对象, `component` 渲染自定义编辑组件。 +自定义编辑默认编辑框为小框,可以配合样式修改编辑框。 +具体参考下面示例。 + + + +
diff --git a/example/src/docs/zh-CN/grid/editor/editor-events.md b/example/src/docs/zh-CN/grid/editor/editor-events.md new file mode 100644 index 000000000..489cfdb9d --- /dev/null +++ b/example/src/docs/zh-CN/grid/editor/editor-events.md @@ -0,0 +1,22 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### Grid-编辑器-自定义编辑器 + +`grid` 标签上配置 `edit-config`。 +在 `grid-column` 列配置 `editor` 对象, `component` 渲染自定义编辑组件, 通过其events选项配置编辑器组件的事件。 +自定义编辑默认编辑框为小框,可以配合样式修改编辑框。 +具体参考下面示例。 + + + +
diff --git a/example/src/docs/zh-CN/grid/editor/inner-editor.md b/example/src/docs/zh-CN/grid/editor/inner-editor.md new file mode 100644 index 000000000..f281a4a0c --- /dev/null +++ b/example/src/docs/zh-CN/grid/editor/inner-editor.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### Grid-编辑器-内置编辑器 + +`grid` 标签上配置 `edit-config`。在 `grid-column` 列配置 `editor` 对象, `component` 渲染内置编辑组件, `events` 配置组件事件。具体参考下面示例。 + +:::tip 说明 + +TinyGrid 内置编辑器只支持 `Input` 和 `Select` 组件,需要使用其他组件可参考自定义编辑器 + +::: + + + +
diff --git a/example/src/docs/zh-CN/grid/editor/mutil-render.md b/example/src/docs/zh-CN/grid/editor/mutil-render.md new file mode 100644 index 000000000..aea96dbd5 --- /dev/null +++ b/example/src/docs/zh-CN/grid/editor/mutil-render.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### Grid-编辑器-下拉多选 + +配置列为下拉多选时,单元格渲染需要自行实现,如下例中使用`format-text`渲染多个枚举值。也可以使用`renderer`自己实现自定义的组件去渲染。 + + + +
diff --git a/example/src/docs/zh-CN/grid/editor/popeditor-in-grid.md b/example/src/docs/zh-CN/grid/editor/popeditor-in-grid.md new file mode 100644 index 000000000..d6d5416e1 --- /dev/null +++ b/example/src/docs/zh-CN/grid/editor/popeditor-in-grid.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### Popeditor 弹窗编辑 + +在 `grid-column` 列元素上配置 `editor` 属性,该对象中可以指定 `component` 为 `Popeditor`、`attrs` 为 Popeditor 组件的属性。需要注意的是,引入 Popeditor 组件后,需要在 `data()` 中进行实例化。 + + + +
+ +### Popeditor 弹窗编辑,配置远程搜索 + + + +
diff --git a/example/src/docs/zh-CN/grid/empty-data-tip.md b/example/src/docs/zh-CN/grid/empty-data-tip.md new file mode 100644 index 000000000..4b879e404 --- /dev/null +++ b/example/src/docs/zh-CN/grid/empty-data-tip.md @@ -0,0 +1,32 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 + +
+ +### 自定义提示 + +空数据时默认显示 `图标 + 文字` 提示,用户也可通过设置插槽 `v-slot:empty` 或者 属性 `render-empty` 来自定义提示内容。 + + + +### 默认提示 + + + +
+ +### 固定居中 + +配置 `is-center-empty` 为 `true` 时,拖动横向滚动条可以保持空数据提示使终相对表格宽度居中显示 + + + +
diff --git a/example/src/docs/zh-CN/grid/event/cell-click-event.md b/example/src/docs/zh-CN/grid/event/cell-click-event.md new file mode 100644 index 000000000..4c6efde81 --- /dev/null +++ b/example/src/docs/zh-CN/grid/event/cell-click-event.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 单元格点击事件 + +在 `grid` 标签上配置 `cell-click` 可以监听到单元格的点击事件 + + + +
diff --git a/example/src/docs/zh-CN/grid/event/cell-dblclick-event.md b/example/src/docs/zh-CN/grid/event/cell-dblclick-event.md new file mode 100644 index 000000000..65aeafe56 --- /dev/null +++ b/example/src/docs/zh-CN/grid/event/cell-dblclick-event.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 单元格双击事件 + +在 `grid` 标签上配置 `cell-dblclick` 可以监听到单元格的双击事件 + + + +
diff --git a/example/src/docs/zh-CN/grid/event/cell-mouseenter-event.md b/example/src/docs/zh-CN/grid/event/cell-mouseenter-event.md new file mode 100644 index 000000000..61e843098 --- /dev/null +++ b/example/src/docs/zh-CN/grid/event/cell-mouseenter-event.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 鼠标进入单元格事件 + +在 `grid` 标签上配置 `cell-dblclick` 可以监听到单元格的双击事件 + + + +
diff --git a/example/src/docs/zh-CN/grid/event/cell-mouseleave-event.md b/example/src/docs/zh-CN/grid/event/cell-mouseleave-event.md new file mode 100644 index 000000000..e280ccca0 --- /dev/null +++ b/example/src/docs/zh-CN/grid/event/cell-mouseleave-event.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 鼠标离开单元格事件 + +在 `grid` 标签上配置 `cell-mouseleave` 可以监听到鼠标离开单元格事件 + + + +
diff --git a/example/src/docs/zh-CN/grid/event/current-change-event.md b/example/src/docs/zh-CN/grid/event/current-change-event.md new file mode 100644 index 000000000..147d2c36a --- /dev/null +++ b/example/src/docs/zh-CN/grid/event/current-change-event.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 行选中事件 + +只对 在 `grid` 标签上配置 `highlightCurrentRow` 有效,当手动选中行时触发的事件 + + + +
diff --git a/example/src/docs/zh-CN/grid/event/edit-actived-event.md b/example/src/docs/zh-CN/grid/event/edit-actived-event.md new file mode 100644 index 000000000..7ce67b2ff --- /dev/null +++ b/example/src/docs/zh-CN/grid/event/edit-actived-event.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 单元格被激活编辑时会触发该事件 + +只对 在 `grid` 标签上配置 `edit-actived` 有效,单元格被激活编辑时触发的事件 + + + +
diff --git a/example/src/docs/zh-CN/grid/event/edit-closed-event.md b/example/src/docs/zh-CN/grid/event/edit-closed-event.md new file mode 100644 index 000000000..404ac972d --- /dev/null +++ b/example/src/docs/zh-CN/grid/event/edit-closed-event.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 单元格编辑完成触发该事件 + +只对 在 `grid` 标签上配置 `edit-closed` 有效,单元格编辑完成触发该事件 + + + +
+ +### 两个表格数据相互关联 + + + +
diff --git a/example/src/docs/zh-CN/grid/event/edit-disabled-event.md b/example/src/docs/zh-CN/grid/event/edit-disabled-event.md new file mode 100644 index 000000000..234a955b9 --- /dev/null +++ b/example/src/docs/zh-CN/grid/event/edit-disabled-event.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 + +
+ +### 当单元格激活时如果是禁用状态时会触发该事件 + +只对 在 `grid` 标签上配置 `edit-disabled-event` 有效,同时需要在 `edit-config` 配置中的 `activeMethod` 方法控制单元格是否可以编辑(返回 `true` 可以编辑,反之亦然)。 + + + +
diff --git a/example/src/docs/zh-CN/grid/event/footer-cell-click-event.md b/example/src/docs/zh-CN/grid/event/footer-cell-click-event.md new file mode 100644 index 000000000..d017e7df6 --- /dev/null +++ b/example/src/docs/zh-CN/grid/event/footer-cell-click-event.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 表尾单元格被点击时会触发该事件 + +只对 在 `grid` 标签上配置 `footer-cell-click` 可以监听点击表尾单元格事件 + + + +
diff --git a/example/src/docs/zh-CN/grid/event/footer-cell-context-menu-event.md b/example/src/docs/zh-CN/grid/event/footer-cell-context-menu-event.md new file mode 100644 index 000000000..04ccc3654 --- /dev/null +++ b/example/src/docs/zh-CN/grid/event/footer-cell-context-menu-event.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 + +
+ +### 右键点击表尾单元格事件 + +在 `grid` 标签上配置 `footer-cell-context-menu` 右键点击表尾单元格事件,配置 `footer-cell-click` 可以触发点击表尾单元格事件。 + + + +
diff --git a/example/src/docs/zh-CN/grid/event/footer-cell-dblclick-event.md b/example/src/docs/zh-CN/grid/event/footer-cell-dblclick-event.md new file mode 100644 index 000000000..d086200e1 --- /dev/null +++ b/example/src/docs/zh-CN/grid/event/footer-cell-dblclick-event.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 双击表尾单元格事件 + +在 `grid` 标签上配置 `footer-cell-dblclick` 可以监听到双击表尾单元格事件 + + + +
diff --git a/example/src/docs/zh-CN/grid/event/grid-events.md b/example/src/docs/zh-CN/grid/event/grid-events.md new file mode 100644 index 000000000..807ac6b7b --- /dev/null +++ b/example/src/docs/zh-CN/grid/event/grid-events.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 事件对象 + +表格属性 `envents` 设置表格的事件对象。 + +
+ + + +
diff --git a/example/src/docs/zh-CN/grid/event/grid-methods.md b/example/src/docs/zh-CN/grid/event/grid-methods.md new file mode 100644 index 000000000..6673ae84b --- /dev/null +++ b/example/src/docs/zh-CN/grid/event/grid-methods.md @@ -0,0 +1,24 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 获取表格行方法 +::: tip 获取行的方法 + `getCurrentRow` 获取当前行 + `getRowIndex` 获取当前行号 + `getRadioRow` Radio 单选选中行 + `getRowById` 通过 rowId 获取当前行 + `getRowNode` 通过 tr 元素获取行信息 +::: + + + +
diff --git a/example/src/docs/zh-CN/grid/event/grid-scroll-event.md b/example/src/docs/zh-CN/grid/event/grid-scroll-event.md new file mode 100644 index 000000000..ee7b91c24 --- /dev/null +++ b/example/src/docs/zh-CN/grid/event/grid-scroll-event.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 事件 + +在 `grid` 标签上配置 `scroll` 事件,可以监听表格的滚动 + + + +
diff --git a/example/src/docs/zh-CN/grid/event/header-cell-context-menu-event.md b/example/src/docs/zh-CN/grid/event/header-cell-context-menu-event.md new file mode 100644 index 000000000..e0b5ef88b --- /dev/null +++ b/example/src/docs/zh-CN/grid/event/header-cell-context-menu-event.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 右键点击表头事件 + +只对 在 `grid` 标签上配置 `header-cell-context-menu` 可以监听右键点击表头事件 + + + +
diff --git a/example/src/docs/zh-CN/grid/event/header-click-event.md b/example/src/docs/zh-CN/grid/event/header-click-event.md new file mode 100644 index 000000000..15498f41c --- /dev/null +++ b/example/src/docs/zh-CN/grid/event/header-click-event.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 表头点击事件 + +在 `grid` 标签上配置 `header-cell-click` 可以监听到表头的点击事件 + + + +
diff --git a/example/src/docs/zh-CN/grid/event/header-dblclick-event.md b/example/src/docs/zh-CN/grid/event/header-dblclick-event.md new file mode 100644 index 000000000..39e68e652 --- /dev/null +++ b/example/src/docs/zh-CN/grid/event/header-dblclick-event.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 表头双击事件 + +在 `grid` 标签上配置 `header-cell-dblclick` 可以监听到表头的双击事件 + + + +
diff --git a/example/src/docs/zh-CN/grid/event/page-change-event.md b/example/src/docs/zh-CN/grid/event/page-change-event.md new file mode 100644 index 000000000..2dab12363 --- /dev/null +++ b/example/src/docs/zh-CN/grid/event/page-change-event.md @@ -0,0 +1,29 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 分页发生改变事件 + +只对 在 `grid` 标签上配置 `page-change` 可以监听分页发生改变事件 + + + +
+
+
+ +### 分页发生改变前的事件 + +通过在 `grid` 标签上配置 `is-before-page-change` 选择是否打开页面改变时的前置处理特性。在值为 `true` 时,翻页操作或者改变页大小操作不会立即生效,留给用户处理业务逻辑,之后通过调用预留的 `callback` 或者 `rollback` 使之生效或者失效;通过事件 `before-page-change` 在进行翻页操作或者改变页大小操作时触发,然后控制是否跳转分页。 + + + +
diff --git a/example/src/docs/zh-CN/grid/event/radio-change-event.md b/example/src/docs/zh-CN/grid/event/radio-change-event.md new file mode 100644 index 000000000..7adf07bbb --- /dev/null +++ b/example/src/docs/zh-CN/grid/event/radio-change-event.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 勾选行事件 + +在 `grid` 标签上配置 `radio-change` 可以监听勾选行事件 +只对 type=radio 有效,当手动勾选并且值发生改变时触发的事件 + + + +
diff --git a/example/src/docs/zh-CN/grid/event/resizable-change-event.md b/example/src/docs/zh-CN/grid/event/resizable-change-event.md new file mode 100644 index 000000000..5c66d4be8 --- /dev/null +++ b/example/src/docs/zh-CN/grid/event/resizable-change-event.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 列宽改变事件 + +在 `grid` 标签上配置 `resizable-change` 可以监听列宽改变事件 + + + +
diff --git a/example/src/docs/zh-CN/grid/event/select-all-event.md b/example/src/docs/zh-CN/grid/event/select-all-event.md new file mode 100644 index 000000000..e44bdf8d8 --- /dev/null +++ b/example/src/docs/zh-CN/grid/event/select-all-event.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 手动勾选全选时触发的事件 + +在 `grid` 标签上配置 `select-all` 有效 +只对 type=selection 有效,当手动勾选全选时触发的事件 + + + +
diff --git a/example/src/docs/zh-CN/grid/event/select-change-event.md b/example/src/docs/zh-CN/grid/event/select-change-event.md new file mode 100644 index 000000000..a209f4517 --- /dev/null +++ b/example/src/docs/zh-CN/grid/event/select-change-event.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 勾选行事件 + +在 `grid` 标签上配置 `select-change` 可以监听到勾选行事件 +只对 type=selection 有效,当手动勾选并且值发生改变时触发的事件 + + + +
diff --git a/example/src/docs/zh-CN/grid/event/toggle-expand-change-event.md b/example/src/docs/zh-CN/grid/event/toggle-expand-change-event.md new file mode 100644 index 000000000..cd04c1efe --- /dev/null +++ b/example/src/docs/zh-CN/grid/event/toggle-expand-change-event.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 行展开收起事件 + +在 `grid` 标签上配置 `toggle-expand-change` 可以监听到行展开收起事件 + + + +
diff --git a/example/src/docs/zh-CN/grid/event/toggle-tree-change-event.md b/example/src/docs/zh-CN/grid/event/toggle-tree-change-event.md new file mode 100644 index 000000000..388c03f7b --- /dev/null +++ b/example/src/docs/zh-CN/grid/event/toggle-tree-change-event.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 树节点展开收起事件 + +在 `grid` 标签上配置 `toggle-tree-change` 可以监听树节点展开收起事件 + + +
diff --git a/example/src/docs/zh-CN/grid/event/toolbar-button-click-event.md b/example/src/docs/zh-CN/grid/event/toolbar-button-click-event.md new file mode 100644 index 000000000..7b8ede7b6 --- /dev/null +++ b/example/src/docs/zh-CN/grid/event/toolbar-button-click-event.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 工具栏点击事件 + +在 `grid` 标签上配置 `resizable-change` 可以监听工具栏点击事件 + + + +
diff --git a/example/src/docs/zh-CN/grid/event/valid-error-event.md b/example/src/docs/zh-CN/grid/event/valid-error-event.md new file mode 100644 index 000000000..e319f1da5 --- /dev/null +++ b/example/src/docs/zh-CN/grid/event/valid-error-event.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 校验不通过事件 + +在 `grid` 标签上配置 `valid-error` 监听校验不通过事件 + + + +
diff --git a/example/src/docs/zh-CN/grid/faq.md b/example/src/docs/zh-CN/grid/faq.md new file mode 100644 index 000000000..8e9250c02 --- /dev/null +++ b/example/src/docs/zh-CN/grid/faq.md @@ -0,0 +1,23 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 表格列头与单元格错位 + +当出现grid表头与表体单元格错位时,可以选择性地做以下偿试 +1.给每列设置列宽,可以使用`column-width`属性,也可以单独给每列进行设置 +2.将`show-overflow`、`show-header-overflow` 都设置为 `true` +3.将 `table-layout` 设置为 `auto` + + + + +
diff --git a/example/src/docs/zh-CN/grid/filter/advanced-filter.md b/example/src/docs/zh-CN/grid/filter/advanced-filter.md new file mode 100644 index 000000000..c03b06419 --- /dev/null +++ b/example/src/docs/zh-CN/grid/filter/advanced-filter.md @@ -0,0 +1,22 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 过滤高级设置 + +通过 `inputFilter` 可以给input过滤区域配置自定义组件与条件,通过 `extends` 可以增加快捷过滤列表 + + + +
+ + + diff --git a/example/src/docs/zh-CN/grid/filter/custom-filter.md b/example/src/docs/zh-CN/grid/filter/custom-filter.md new file mode 100644 index 000000000..5a9900faf --- /dev/null +++ b/example/src/docs/zh-CN/grid/filter/custom-filter.md @@ -0,0 +1,27 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 过滤 + +通过 `filter` 属性设置列筛选规则 + + + +
+ +### 自定义筛选 + +通过 `params` 属性设置额外的参数 + + + + diff --git a/example/src/docs/zh-CN/grid/filter/default-filter.md b/example/src/docs/zh-CN/grid/filter/default-filter.md new file mode 100644 index 000000000..7ec7e30e9 --- /dev/null +++ b/example/src/docs/zh-CN/grid/filter/default-filter.md @@ -0,0 +1,46 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 + +
+ +### 过滤 + +::: tip filter 配置 + +通过自定义的 `filter` 的作用域插槽自定义筛选的规则 + +可以配置项: + +multi 设置在显示枚举选项功能是否为多选, 仅在 enumable:true 下有效。 + +enumable 设置在过滤面板中显示枚举选项。 + +inputFilter 设置在过滤面板中显示输入筛选的项。 + +defaultFilter 设置在过滤面板中显示默认的筛选条件。 + +values 设置在显示枚举选项功能(enumable)下制定静态数据源。 + +label 设置枚举数据的显示值属性字段, 默认'label'。 + +value 设置枚举数据的实际值属性字段, 默认'value'。 + +::: + + + +### 自定义参数 + +通过 `params` 添加自定义参数 + + + +
diff --git a/example/src/docs/zh-CN/grid/filter/default-relation.md b/example/src/docs/zh-CN/grid/filter/default-relation.md new file mode 100644 index 000000000..64a96ed9b --- /dev/null +++ b/example/src/docs/zh-CN/grid/filter/default-relation.md @@ -0,0 +1,24 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 输入过滤的默认选项 + +通过属性 `inputFilter.relation` 配置输入过滤的默认选项。 +输入过滤的内置选项:`equals`,`unequal`,`greaterThan`,`lessThan`,`equalToGreaterThan`,`equalToLessThan`,`contains`,`startwith`,`endwith`;也可以配置自定义选项。 +配置自定义选项的同时要配置过滤方法,通过属性 `inputFilter.method` 配置。 + + + +
+ + + diff --git a/example/src/docs/zh-CN/grid/filter/server-filter.md b/example/src/docs/zh-CN/grid/filter/server-filter.md new file mode 100644 index 000000000..d76ac2f3c --- /dev/null +++ b/example/src/docs/zh-CN/grid/filter/server-filter.md @@ -0,0 +1,24 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 + +
+ +### 服务端过滤 + +配置 remote-filter 开启服务端过滤,服务端过滤会调用表格 fetch-data 进行查询,filter-change 服务端过滤后触发的事件 + +:::warning +该示例中的 `services/getGridMockData` 服务需要自行实现,示例模拟了远程服务返回的数据 +::: + + + +
diff --git a/example/src/docs/zh-CN/grid/fixed/left-fixed.md b/example/src/docs/zh-CN/grid/fixed/left-fixed.md new file mode 100644 index 000000000..93e8266ad --- /dev/null +++ b/example/src/docs/zh-CN/grid/fixed/left-fixed.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 左冻结 + + 通过 `fixed` 属性设置列冻结。可选值为 `left right` 默认为 `left` + + + +
diff --git a/example/src/docs/zh-CN/grid/fixed/multi-column-fixed.md b/example/src/docs/zh-CN/grid/fixed/multi-column-fixed.md new file mode 100644 index 000000000..a97c2b8cc --- /dev/null +++ b/example/src/docs/zh-CN/grid/fixed/multi-column-fixed.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 操作列冻结 + + 通过 `fixed` 属性设置列冻结。可选值为 `left right` 默认为 `left` + + + +
diff --git a/example/src/docs/zh-CN/grid/fixed/right-fixed.md b/example/src/docs/zh-CN/grid/fixed/right-fixed.md new file mode 100644 index 000000000..c35cf9943 --- /dev/null +++ b/example/src/docs/zh-CN/grid/fixed/right-fixed.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 右冻结 + +通过 `fixed` 属性设置列冻结。可选值为 `left right` 默认为 `left` + + + +
diff --git a/example/src/docs/zh-CN/grid/footer/custom-footer.md b/example/src/docs/zh-CN/grid/footer/custom-footer.md new file mode 100644 index 000000000..2a4358e56 --- /dev/null +++ b/example/src/docs/zh-CN/grid/footer/custom-footer.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 自定义表尾合计 + +通过 `footer-method` 设置表尾合计的逻辑 必须配置 `show-footer` + + + +
diff --git a/example/src/docs/zh-CN/grid/footer/footer-class-name.md b/example/src/docs/zh-CN/grid/footer/footer-class-name.md new file mode 100644 index 000000000..2eb1f6295 --- /dev/null +++ b/example/src/docs/zh-CN/grid/footer/footer-class-name.md @@ -0,0 +1,23 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 表尾class类名 + +
+ +通过表格列属性 `footer-class-name` 给表尾的单元格附加 className,也可以是函数 Function({$rowIndex, column, columnIndex, $columnIndex})。 + +
+ + + +
diff --git a/example/src/docs/zh-CN/grid/footer/footer-row-or-column-span.md b/example/src/docs/zh-CN/grid/footer/footer-row-or-column-span.md new file mode 100644 index 000000000..563074d7f --- /dev/null +++ b/example/src/docs/zh-CN/grid/footer/footer-row-or-column-span.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 表尾合并行或列 + +通过 `footer-method` 和 `footer-span-method` 设置表尾合计行或列逻辑 必须配置 `show-footer` + + + +
diff --git a/example/src/docs/zh-CN/grid/footer/footer-summation.md b/example/src/docs/zh-CN/grid/footer/footer-summation.md new file mode 100644 index 000000000..30e1097e9 --- /dev/null +++ b/example/src/docs/zh-CN/grid/footer/footer-summation.md @@ -0,0 +1,23 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 表尾统计 + + + +
+ +### 表尾统计(空数据) + + + +
\ No newline at end of file diff --git a/example/src/docs/zh-CN/grid/grid-basic-usage.md b/example/src/docs/zh-CN/grid/grid-basic-usage.md new file mode 100644 index 000000000..5d33efe9e --- /dev/null +++ b/example/src/docs/zh-CN/grid/grid-basic-usage.md @@ -0,0 +1,36 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 + +
+ +### 标签式 + + + +### 配置式 + + + +### 表格属性说明 + + + +
+ +### 表格列属性说明 + + + +
+ +### 表格工具栏说明 + + diff --git a/example/src/docs/zh-CN/grid/grid-border.md b/example/src/docs/zh-CN/grid/grid-border.md new file mode 100644 index 000000000..cb3a42151 --- /dev/null +++ b/example/src/docs/zh-CN/grid/grid-border.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +表格属性设置 `border` 给表格加上边框。 + + + +
diff --git a/example/src/docs/zh-CN/grid/grid-customs.md b/example/src/docs/zh-CN/grid/grid-customs.md new file mode 100644 index 000000000..9665c6e02 --- /dev/null +++ b/example/src/docs/zh-CN/grid/grid-customs.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +表格属性 `customs` 初始化显示/隐藏列(通过 visible 设置为 false 则默认隐藏列)。 + + + +
diff --git a/example/src/docs/zh-CN/grid/grid-loading-tip.md b/example/src/docs/zh-CN/grid/grid-loading-tip.md new file mode 100644 index 000000000..250c27d19 --- /dev/null +++ b/example/src/docs/zh-CN/grid/grid-loading-tip.md @@ -0,0 +1,23 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 关闭加载中状态 + +表格属性设置 `loading` 开启或关闭加载状态,默认值为 `false` 不开启。 + + + +### 开启加载中状态 + + + +
diff --git a/example/src/docs/zh-CN/grid/grid-optimization.md b/example/src/docs/zh-CN/grid/grid-optimization.md new file mode 100644 index 000000000..e8e7b1f81 --- /dev/null +++ b/example/src/docs/zh-CN/grid/grid-optimization.md @@ -0,0 +1,26 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 优化配置项 + +:::tip optimization(Object) 配置说明 +| animat(Boolean) | 表格动画效果开关(关闭后视觉效果更快)默认为 true | +| delayHover(Number) | 当表格发生拖动、滚动...等行为时,至少多少毫秒之后才允许触发 hover 事件 默认 250ms | +| scrollX(Object) | 横向 X 虚拟滚动配置(用于特殊场景手动调优)例如:{ gt: 100 } | +| scrollY(Object) | 纵向 Y 虚拟滚动配置(用于特殊场景手动调优)例如:{ gt: 500 } | +::: + +
+ + + +
diff --git a/example/src/docs/zh-CN/grid/grid-size.md b/example/src/docs/zh-CN/grid/grid-size.md new file mode 100644 index 000000000..54b7832ef --- /dev/null +++ b/example/src/docs/zh-CN/grid/grid-size.md @@ -0,0 +1,27 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### size 设置大小为 medium + +表格设置 `size` 属性调整表格尺寸大小。 + + + +### size 设置大小为 small + + + +### size 设置大小为 mini + + + +
diff --git a/example/src/docs/zh-CN/grid/grid-stripe.md b/example/src/docs/zh-CN/grid/grid-stripe.md new file mode 100644 index 000000000..8546e157d --- /dev/null +++ b/example/src/docs/zh-CN/grid/grid-stripe.md @@ -0,0 +1,33 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +`stripe` 是否带有斑马纹 默认不开启,设置stripe属性为true时开启。(注:需要注意的是,在可编辑表格场景下,临时插入的数据不会有斑马纹样式) + +
+ +默认没有斑马纹: +
+ + + +
+ +设置为有斑马纹: +
+ + + + + +
diff --git a/example/src/docs/zh-CN/grid/header/custom-grid-header.md b/example/src/docs/zh-CN/grid/header/custom-grid-header.md new file mode 100644 index 000000000..d9cd61e66 --- /dev/null +++ b/example/src/docs/zh-CN/grid/header/custom-grid-header.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 自定义表头 + +通过列 `slot` 插槽自定义表头 + + + +
diff --git a/example/src/docs/zh-CN/grid/header/header-class-name.md b/example/src/docs/zh-CN/grid/header/header-class-name.md new file mode 100644 index 000000000..957d69538 --- /dev/null +++ b/example/src/docs/zh-CN/grid/header/header-class-name.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本说明 + +通过列属性 `header-class-name` 给表头的单元格附加 className,也可以是函数 Function({$rowIndex, column, columnIndex, $columnIndex})。 + +
+ + + +
diff --git a/example/src/docs/zh-CN/grid/header/hide-grid-header.md b/example/src/docs/zh-CN/grid/header/hide-grid-header.md new file mode 100644 index 000000000..0f1317a68 --- /dev/null +++ b/example/src/docs/zh-CN/grid/header/hide-grid-header.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 控制隐藏表头 + +设置 `showHeader` 属性为 `fasle` 控制隐藏表头,默认为 `true`。 + + + +
diff --git a/example/src/docs/zh-CN/grid/header/slot-header.md b/example/src/docs/zh-CN/grid/header/slot-header.md new file mode 100644 index 000000000..bca4b0ed2 --- /dev/null +++ b/example/src/docs/zh-CN/grid/header/slot-header.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 自定义表头 + +设置 `header` 插槽,配置自定义表头内容的模板。 + + + +
diff --git a/example/src/docs/zh-CN/grid/highlight/highlight-cell.md b/example/src/docs/zh-CN/grid/highlight/highlight-cell.md new file mode 100644 index 000000000..588542cc3 --- /dev/null +++ b/example/src/docs/zh-CN/grid/highlight/highlight-cell.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +设置 `highlight-cell` 是否在编辑时高亮单元格边框,只对 `editConfig` 配置时有效 + + + +
diff --git a/example/src/docs/zh-CN/grid/highlight/highlight-current-column.md b/example/src/docs/zh-CN/grid/highlight/highlight-current-column.md new file mode 100644 index 000000000..dc31ef94d --- /dev/null +++ b/example/src/docs/zh-CN/grid/highlight/highlight-current-column.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +设置 `highlight-current-column` 属性控制鼠标选中的当前列是否开启高亮 + + + +
diff --git a/example/src/docs/zh-CN/grid/highlight/highlight-current-row.md b/example/src/docs/zh-CN/grid/highlight/highlight-current-row.md new file mode 100644 index 000000000..8c0dfbd5a --- /dev/null +++ b/example/src/docs/zh-CN/grid/highlight/highlight-current-row.md @@ -0,0 +1,24 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +设置 `highlight-current-row` 属性控制鼠标选中行是否开启高亮 + + +:::warning +带有斑马线的行无高亮效果 +::: + + + +
diff --git a/example/src/docs/zh-CN/grid/highlight/highlight-hover-column.md b/example/src/docs/zh-CN/grid/highlight/highlight-hover-column.md new file mode 100644 index 000000000..511147bcc --- /dev/null +++ b/example/src/docs/zh-CN/grid/highlight/highlight-hover-column.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +设置 `highlight-hover-column` 属性为控制鼠标悬停到当前列列头是否开启高亮。 + + + +
diff --git a/example/src/docs/zh-CN/grid/highlight/highlight-hover-row.md b/example/src/docs/zh-CN/grid/highlight/highlight-hover-row.md new file mode 100644 index 000000000..9cb00bca7 --- /dev/null +++ b/example/src/docs/zh-CN/grid/highlight/highlight-hover-row.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 高亮悬停行 + +设置 `highlight-hover-row` 属性控制鼠标悬停到当前行是否开启高亮。 默认为 `true` 开启高亮, 如果不需要悬停高亮设置 `highlight-hover-row` 为 `false`。 + + + +### 设置指定行高亮 + +`setCurrentRow(row)` 可设置某一行为高亮状态。 + + + +
diff --git a/example/src/docs/zh-CN/grid/import-export/export-excel.md b/example/src/docs/zh-CN/grid/import-export/export-excel.md new file mode 100644 index 000000000..e1a9b305c --- /dev/null +++ b/example/src/docs/zh-CN/grid/import-export/export-excel.md @@ -0,0 +1,195 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 + +
+ +### 基本用法 + + + +### 基于 XLSX 插件进行导出 + +:::tip 提示 + +`xlsx` 是一个非常强大的前端 `EXCEL` 文件操作库,支持表格带格式导入导出,可兼容 `IE9+` 版本的浏览器。 + +详情参考: + +::: + +```javascript + + + +``` + +
diff --git a/example/src/docs/zh-CN/grid/import-export/import-grid.md b/example/src/docs/zh-CN/grid/import-export/import-grid.md new file mode 100644 index 000000000..2962dc3be --- /dev/null +++ b/example/src/docs/zh-CN/grid/import-export/import-grid.md @@ -0,0 +1,90 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 + +
+ +### 基于 XLSX 插件进行导入 + +:::tip + +提示 `xlsx` 是一个非常强大的前端 `EXCEL` 文件操作库,支持表格带格式导入导出,可兼容 `IE9+` 版本的浏览器。 + +详情参考: + +::: + +```javascript + + + +``` + +
diff --git a/example/src/docs/zh-CN/grid/keyboard/keyboard-config.md b/example/src/docs/zh-CN/grid/keyboard/keyboard-config.md new file mode 100644 index 000000000..3dc4f0c5a --- /dev/null +++ b/example/src/docs/zh-CN/grid/keyboard/keyboard-config.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +表格属性 `keyboard-config` 设置按键配置项。 + +
+ + + +
diff --git a/example/src/docs/zh-CN/grid/keyboard/keyboard-navigation.md b/example/src/docs/zh-CN/grid/keyboard/keyboard-navigation.md new file mode 100644 index 000000000..e251586f4 --- /dev/null +++ b/example/src/docs/zh-CN/grid/keyboard/keyboard-navigation.md @@ -0,0 +1,36 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 键盘导航 + +:::tip 按键说明 +| Arrow Up ↑ | 移动到当前活动单元格上面的单元格 | +| Arrow Down ↓ | 移动到当前活动单元格下面的单元格 | +| Arrow Left ← | 移动到当前活动单元格左边的单元格 | +| Arrow Right → | 移动到当前活动单元格右边的单元格 | +| Tab | 移动到当前选中或活动单元格的右侧单元格,如果到最后一列且存在下一行,则从下一行开始移动 | +| Tab + Shift | 移动到当前选中或活动单元格的左侧单元格,如果到第一列且存在上一行,则从上一行开始移动 | +| Spacebar | 如果单元格是复选框或单选框则切换勾选状态 | +| Enter | 取消编辑并移动到当前活动单元格下面的单元格 | +| Delete | 清空内容 | +| Backspace | 清空内容并激活选中单元格为编辑状态 | +| F2 | 激活单元格编辑 | +| Esc | 取消单元格编辑 | +| Page Up | 向上翻页滚动 | +| Page Down | 向下翻页滚动 | +| Home | 滚动到顶部 | +| End | 滚动到底部 | +::: + + + +
diff --git a/example/src/docs/zh-CN/grid/keyboard/mouse-config.md b/example/src/docs/zh-CN/grid/keyboard/mouse-config.md new file mode 100644 index 000000000..13ba65d9b --- /dev/null +++ b/example/src/docs/zh-CN/grid/keyboard/mouse-config.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +表格属性 `mouse-config` 设置鼠标配置项。 + +
+ + + +
diff --git a/example/src/docs/zh-CN/grid/large-data/full-data-loading.md b/example/src/docs/zh-CN/grid/large-data/full-data-loading.md new file mode 100644 index 000000000..c64228934 --- /dev/null +++ b/example/src/docs/zh-CN/grid/large-data/full-data-loading.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +当表格数据过多时会有性能问题,用户可通过 `$refs` 获取表格对象,设置表格对象的 `loadData` 方法启用全量加载来优化性能。 + + + +
diff --git a/example/src/docs/zh-CN/grid/large-data/load-column.md b/example/src/docs/zh-CN/grid/large-data/load-column.md new file mode 100644 index 000000000..e32382169 --- /dev/null +++ b/example/src/docs/zh-CN/grid/large-data/load-column.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 生成 1000 列 + +通过 `loadColumn(columns)` 方法可以加载列配置,对于需要重新加载列的场景下可能会用到。 + + + +
diff --git a/example/src/docs/zh-CN/grid/large-data/scroll-paging.md b/example/src/docs/zh-CN/grid/large-data/scroll-paging.md new file mode 100644 index 000000000..ef0e88d8b --- /dev/null +++ b/example/src/docs/zh-CN/grid/large-data/scroll-paging.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +滚动分页配置步骤: +1、表格属性设置 `fetch-data` 开启服务请求; +2、表格属性设置 `scroll-load` 开启滚动分页。 + + + +
diff --git a/example/src/docs/zh-CN/grid/large-data/scroll-to.md b/example/src/docs/zh-CN/grid/large-data/scroll-to.md new file mode 100644 index 000000000..c579c4b9a --- /dev/null +++ b/example/src/docs/zh-CN/grid/large-data/scroll-to.md @@ -0,0 +1,23 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 滚动到指定位置 + +:::tip 方法说明 +`scrollTo(scrollLeft, scrollTop)`:滚动到对应的位置 +`scrollToRow(row)`:滚动到对应的行 +`scrollToColumn(column)`:手滚动到对应的列 +::: + + + +
diff --git a/example/src/docs/zh-CN/grid/large-data/virtual-rolling.md b/example/src/docs/zh-CN/grid/large-data/virtual-rolling.md new file mode 100644 index 000000000..5e3ae672b --- /dev/null +++ b/example/src/docs/zh-CN/grid/large-data/virtual-rolling.md @@ -0,0 +1,39 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +虚拟滚动配置步骤: +1、表格属性设置 `height` 固定高度; +2、表格属性设置 `optimization` 开启虚拟滚动。 + +:::tip optimization(Object) 配置说明 +| delayHover(Number) | 当表格发生拖动、滚动...等行为时,至少多少毫秒之后才允许触发 hover 事件 默认 250ms | +| scrollX(Object) | 横向 X 虚拟滚动配置(用于特殊场景手动调优)例如:{ gt: 100 } | +| scrollY(Object) | 纵向 Y 虚拟滚动配置(用于特殊场景手动调优)例如:{ gt: 500 } | +::: + +:::tip 开启虚拟滚动注意事项 +1、开启虚拟滚动的前提是需要保证每列的宽度一样,可以通过在 `` 标签上的 `column-width` 属性配置统一的宽度。 +2、开启虚拟滚动将会禁用列宽调整功能,因为列拖拽会改变列宽度,导致虚拟滚动渲染的列数计算有误从而引起表格样式错乱,所以禁止列拖拽。 +::: + + + + +
+ +### 树表虚滚 + + + +
diff --git a/example/src/docs/zh-CN/grid/mixin-ui/mixin-antd.md b/example/src/docs/zh-CN/grid/mixin-ui/mixin-antd.md new file mode 100644 index 000000000..6f5854697 --- /dev/null +++ b/example/src/docs/zh-CN/grid/mixin-ui/mixin-antd.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + + + +
diff --git a/example/src/docs/zh-CN/grid/mixin-ui/mixin-aui2.md b/example/src/docs/zh-CN/grid/mixin-ui/mixin-aui2.md new file mode 100644 index 000000000..829c71570 --- /dev/null +++ b/example/src/docs/zh-CN/grid/mixin-ui/mixin-aui2.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### TINY 2.0 + + + +
diff --git a/example/src/docs/zh-CN/grid/mixin-ui/mixin-elementui.md b/example/src/docs/zh-CN/grid/mixin-ui/mixin-elementui.md new file mode 100644 index 000000000..31f1ae1b8 --- /dev/null +++ b/example/src/docs/zh-CN/grid/mixin-ui/mixin-elementui.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### ElementUI + +:::warning 该示例在IE下显示异常,原因是示例中的 ElementUI 组件不兼容 IE11 导致。 +::: + + + +
diff --git a/example/src/docs/zh-CN/grid/mixin-ui/mixin-iview.md b/example/src/docs/zh-CN/grid/mixin-ui/mixin-iview.md new file mode 100644 index 000000000..4c9452f77 --- /dev/null +++ b/example/src/docs/zh-CN/grid/mixin-ui/mixin-iview.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + + + +
diff --git a/example/src/docs/zh-CN/grid/mixin-ui/mixin-xui.md b/example/src/docs/zh-CN/grid/mixin-ui/mixin-xui.md new file mode 100644 index 000000000..4c9452f77 --- /dev/null +++ b/example/src/docs/zh-CN/grid/mixin-ui/mixin-xui.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + + + +
diff --git a/example/src/docs/zh-CN/grid/nested-grid.md b/example/src/docs/zh-CN/grid/nested-grid.md new file mode 100644 index 000000000..43f296fce --- /dev/null +++ b/example/src/docs/zh-CN/grid/nested-grid.md @@ -0,0 +1,43 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 嵌套表格 + +需要在 `grid` 标签上配 `edit-config` 对象,`activeMethod` 编辑前的事件处理编辑项数据集。`grid-column` 列上面配置 `editor` 对象,`component` 用来渲染编辑组件。`attrs` 配置级联数据。`events` 来设置事件。具体参考下面示例。 + + + +### 检查行是否已展开 + +通过调用 `hasRowExpand(row)` 方法可以检查行是否已展开,参数 row 为行数据对象。 + + + +### 设置展开所有行 + +通过调用 `setAllRowExpansion(checked)` 方法可设置所有行的展开与否。 + + + +### 设置展开指定行 + +通过调用 `setRowExpansion(rows, checked)` 方法可设置展开指定行,第二个参数设置这一行展开与否,展开指定行时,通过调用clearRowExpand()方法先,关闭已展开的行。 + + + +### 手动切换展开行 + +通过调用 `toggleRowExpansion(row)` 方法可手动切换展开行。 + + + +
diff --git a/example/src/docs/zh-CN/grid/operation-column/checkbox-operation-column.md b/example/src/docs/zh-CN/grid/operation-column/checkbox-operation-column.md new file mode 100644 index 000000000..dda754041 --- /dev/null +++ b/example/src/docs/zh-CN/grid/operation-column/checkbox-operation-column.md @@ -0,0 +1,61 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +表格列属性设置 `type="selection"` 显示多选列。 + + + +
+ +### 手动取消多选行 + + + +### 手动选中所有行 + +`setAllSelection(checked)` 用于多选行,可设置所有行的选中状态。 + + + +### 手动选中指定行 + +`setSelection(rows, checked)` 用于多选行,可设置指定行为选中状态,第一个参数可传入对象或数组,如果是对象则选择单行,如果是数组则选择多行,第二个参数为选中与否。 + +:::tip +`setSelection` 方法不会触发 `select-change` 事件,只有点击才会触发 +::: + + + +### 手动切换所有行选中状态 + +`toggleAllSelection()` 方法可直接切换所有行的选中状态。 + + + +### 手动切换指定行选中状态 + +`toggleRowSelection(row)` 方法可直接切换某一行的选中状态。 + + + +
+ +### 多选禁用 + +多选模式,通过 `select-config` 配置项的属性 `checkMethod` ,传入自定义方法判断哪些数据项被禁用,方法会判断每个数据项,需返回值为 `true` 或者 `false`,代表此数据项启用或者禁用。 + + + +
diff --git a/example/src/docs/zh-CN/grid/operation-column/column-key.md b/example/src/docs/zh-CN/grid/operation-column/column-key.md new file mode 100644 index 000000000..a24643770 --- /dev/null +++ b/example/src/docs/zh-CN/grid/operation-column/column-key.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +通过属性 `column-key` 设置是否需要为每一列的 VNode 设置 `key` 属性(非特殊情况下不需要使用)。 + +
+ + + +
diff --git a/example/src/docs/zh-CN/grid/operation-column/custom-operation-column.md b/example/src/docs/zh-CN/grid/operation-column/custom-operation-column.md new file mode 100644 index 000000000..c34f03051 --- /dev/null +++ b/example/src/docs/zh-CN/grid/operation-column/custom-operation-column.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +通过插槽设置自定义操作列,即 `` 自定义操作列内容 `` 。 + + + +
diff --git a/example/src/docs/zh-CN/grid/operation-column/radio-operation-column.md b/example/src/docs/zh-CN/grid/operation-column/radio-operation-column.md new file mode 100644 index 000000000..064acd5d6 --- /dev/null +++ b/example/src/docs/zh-CN/grid/operation-column/radio-operation-column.md @@ -0,0 +1,46 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 + +
+ +### 基本用法 + +表格列属性设置 `type="radio"` 显示单选列。 + + + +
+ +### 手动取消单选行 + + + +### 手动选中某一行 + +`setRadioRow(row)` 用于单选行,设置某一行为选中状态。 + + + +### 单选配置项 + +`radio-config` 配置项,可以配置单选框的默认选中项和禁用配置等特性。 + + + +
+ +### 单选禁用 + +单选模式,通过 `radio-config` 配置项的属性 `checkMethod` ,传入自定义方法判断哪些数据项被禁用,方法会判断每个数据项,需返回值为 `true` 或者 `false`,代表此数据项启用或者禁用。 + + + +
diff --git a/example/src/docs/zh-CN/grid/pager/custom-pager.md b/example/src/docs/zh-CN/grid/pager/custom-pager.md new file mode 100644 index 000000000..75909e010 --- /dev/null +++ b/example/src/docs/zh-CN/grid/pager/custom-pager.md @@ -0,0 +1,24 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +和内置分页类似,只需要把我们官方分页组件改为第三方分页组件即可,其他的保持一致。 +自定义分页配置步骤: +1、`import` 引入第三方的 `Pager` 组件,例如引入 `ElementUI` 的 `Pager` 组件的示例: `import { Pager } from 'element-ui'` 。 +2、`Pager` 传入给 `data()` 函数存储起来以便模板中使用。 +3、表格属性设置 `pager` 进行分页相关配置,通过 `pager` 的属性 `{component: Pager}` 注入分页组件。 +4、配置 seq-serial 属性可以设置翻页后序号连续显示,默认是不连续显示的 + + + +
diff --git a/example/src/docs/zh-CN/grid/pager/inner-pager.md b/example/src/docs/zh-CN/grid/pager/inner-pager.md new file mode 100644 index 000000000..5a8bef2cd --- /dev/null +++ b/example/src/docs/zh-CN/grid/pager/inner-pager.md @@ -0,0 +1,67 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 + +
+ +### 基本用法 + +为保障表格足够轻量和开放性需求,表格进行模块化拆分,核心代码轻量化,分页功能需要引入分页组件,内置分页配置步骤: +1、`import` 引入我们官方的 `Pager` 组件,即 `import Pager from '@opentiny/vue-pager'` 或者 `{ Pager } from '@opentiny/vue'` 。 +2、`Pager` 传入给 `data()` 函数存储起来以便模板中使用。 +3、表格属性设置 `pager` 进行分页相关配置,通过 `pager` 的属性 `{component: Pager}` 注入分页组件。 +4、配置 seq-serial 属性可以设置翻页后序号连续显示,默认是不连续显示的 + + + +
+ +### 提示保存数据 + +配置 `showSaveMsg` 属性,当检查到表格数据存在修改时,会提示用户进行保存 + + + +
+ +### 升级指导 + +TINY 2.x 版本内置分页配置,在 op 中增加如下配置: + +```js +showPager: true, +pagerOp: { + mode: 'number', + pageVO: { + curPage: 1, + pageSize: 5 + }, + pageSizes: [5, 15, 50, 100] +} +``` + +TINY 3 版本内置分页配置,在标签上配置 `pager` 属性,配置内容如下所示: + +```js +import { Grid, GridColumn, Pager } from '@opentiny/vue' +... +pagerConfig: { + component: Pager, + attrs: { + currentPage: 1, + pageSize: 5, + pageSizes: [5, 10], + total: 0, + layout: 'total, prev, pager, next, jumper, sizes' + } +} +``` + +
diff --git a/example/src/docs/zh-CN/grid/renderer/async-colunm-render.md b/example/src/docs/zh-CN/grid/renderer/async-colunm-render.md new file mode 100644 index 000000000..74834b6ff --- /dev/null +++ b/example/src/docs/zh-CN/grid/renderer/async-colunm-render.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 列异步数据渲染 + +将列`format-config`的 `async`属性配置为`true`后,支持动态修改其`data`数据自动渲染。 这种整列异步渲染一般将`type`设置为`enum`,通过`value`与`label`可以配置渲染单元格的映射。 + + + +
diff --git a/example/src/docs/zh-CN/grid/renderer/custom-renderer.md b/example/src/docs/zh-CN/grid/renderer/custom-renderer.md new file mode 100644 index 000000000..080371ecd --- /dev/null +++ b/example/src/docs/zh-CN/grid/renderer/custom-renderer.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 自定义渲染器 + +自定义渲染器可以自定义渲染单元格,也可渲染一个 `vue 组件`。在 `grid-column` 列配置 `renderer`,支持方法和对象配置。具体参考下面示例。 + + + +
diff --git a/example/src/docs/zh-CN/grid/renderer/inner-renderer.md b/example/src/docs/zh-CN/grid/renderer/inner-renderer.md new file mode 100644 index 000000000..590c79900 --- /dev/null +++ b/example/src/docs/zh-CN/grid/renderer/inner-renderer.md @@ -0,0 +1,38 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 内置渲染器 + +内置渲染器设置当前表格列的显示获取类型。 +在 `grid-column` 列配置 `format-text` 对象,配合 `format-config` 可以控制数据格式。 + +:::tip +`format-text` 的可取值包括: + * `integer`:显示成整数。 + * `number`:显示成小数。 + * `money`:显示成钱数。 + * rate:显示成百分比的数据。 + * filesize:显示成文件大小的数据。 + * boole:显示成对号或者叉号的图标。 + * date:显示成年月日。 + * dateTime:显示成年月日时分。 + * longDateTime:显示成年月日时分秒。 + * time:显示成时分。 + * longTime:显示成时分秒。 + * yearMonth:显示成年月。 + * enum:通过数据的值,查询出要显示的文本。 + * ellipsis:显示成省略的内容,鼠标移到该单元格上,显示完整内容的提示信息。需要同时配置 format 的 len 属性。 +::: + + + +
diff --git a/example/src/docs/zh-CN/grid/reverse-column-row.md b/example/src/docs/zh-CN/grid/reverse-column-row.md new file mode 100644 index 000000000..0c2ca56cf --- /dev/null +++ b/example/src/docs/zh-CN/grid/reverse-column-row.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### Grid-表格行列反转 + +需要在 `grid` 标签上配 `:columns="tableColumn"` `:show-header="false"`。点击“反转表格”按钮可查看效果,现阶段只能执行一次,执行多次会有问题。具体参考下面示例。 + + + +
diff --git a/example/src/docs/zh-CN/grid/row-grouping.md b/example/src/docs/zh-CN/grid/row-grouping.md new file mode 100644 index 000000000..aa89e60e5 --- /dev/null +++ b/example/src/docs/zh-CN/grid/row-grouping.md @@ -0,0 +1,27 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +`row-group` 属性可以配置行分组,行分组会将具有相同值的列进行分组展示。 + + + +
+ +### 自定义分组 + +`row-group` 配置项 `render` 可以自定义渲染分组内容, `closeable` 可以控制分组行是否可以折叠。 + + + +
diff --git a/example/src/docs/zh-CN/grid/serial-column/custom-serial-column.md b/example/src/docs/zh-CN/grid/serial-column/custom-serial-column.md new file mode 100644 index 000000000..bd6bd706b --- /dev/null +++ b/example/src/docs/zh-CN/grid/serial-column/custom-serial-column.md @@ -0,0 +1,27 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +表格列属性设置 `type="index"` 显示序号列,`index-method` 方法设置自定义序号规则。 + + + +
+ +### 自定义序号列的起始值 + +表格列属性设置 `type="index"` 显示序号列,`start-index` 设置自定义序号列的起始值。 + + + +
diff --git a/example/src/docs/zh-CN/grid/serial-column/default-serial-column.md b/example/src/docs/zh-CN/grid/serial-column/default-serial-column.md new file mode 100644 index 000000000..6eb3ea3ca --- /dev/null +++ b/example/src/docs/zh-CN/grid/serial-column/default-serial-column.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +表格列属性设置 `type="index"` 显示序号列。 + + + +
diff --git a/example/src/docs/zh-CN/grid/slot/buttons-slot.md b/example/src/docs/zh-CN/grid/slot/buttons-slot.md new file mode 100644 index 000000000..6d6c385fc --- /dev/null +++ b/example/src/docs/zh-CN/grid/slot/buttons-slot.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 工具栏插槽 + + + +
diff --git a/example/src/docs/zh-CN/grid/slot/default-slot.md b/example/src/docs/zh-CN/grid/slot/default-slot.md new file mode 100644 index 000000000..7fb6eaa2a --- /dev/null +++ b/example/src/docs/zh-CN/grid/slot/default-slot.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 默认插槽 + + + +
diff --git a/example/src/docs/zh-CN/grid/slot/empty-slot.md b/example/src/docs/zh-CN/grid/slot/empty-slot.md new file mode 100644 index 000000000..4cde7182c --- /dev/null +++ b/example/src/docs/zh-CN/grid/slot/empty-slot.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 空数据显示插槽 + + + + + +
diff --git a/example/src/docs/zh-CN/grid/sort/combinations-sort.md b/example/src/docs/zh-CN/grid/sort/combinations-sort.md new file mode 100644 index 000000000..f2b588a60 --- /dev/null +++ b/example/src/docs/zh-CN/grid/sort/combinations-sort.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 多字段组合排序 + +通过表格列设置 `sortable` 属性开启该列排序功能,然后设置 `sort-by` 属性实现多字段组合排序,数组列表就是排序的字段列表。 + + + +
diff --git a/example/src/docs/zh-CN/grid/sort/custom-sort.md b/example/src/docs/zh-CN/grid/sort/custom-sort.md new file mode 100644 index 000000000..8e016cb39 --- /dev/null +++ b/example/src/docs/zh-CN/grid/sort/custom-sort.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 自定义排序 + +通过表格列设置 `sortable` 属性开启该列排序功能,然后设置 `sort-method` 方法实现自定义排序。 + + + +### 手动排序 + +通过 `sort(field, order)` 方法可手动对表格进行排序(如果 order 为空则自动切换排序)。 + + + +
diff --git a/example/src/docs/zh-CN/grid/sort/default-sort.md b/example/src/docs/zh-CN/grid/sort/default-sort.md new file mode 100644 index 000000000..4d78798b7 --- /dev/null +++ b/example/src/docs/zh-CN/grid/sort/default-sort.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 默认排序 + +通过表格列设置 `sortable` 属性开启该列排序功能。 + + + +
+ +### 唯一主键 + +通过表格设置 `row-id` 自定义行数据唯一主键的字段名。该属性的默认值为 _XID + + diff --git a/example/src/docs/zh-CN/grid/sort/server-sort.md b/example/src/docs/zh-CN/grid/sort/server-sort.md new file mode 100644 index 000000000..c515d443d --- /dev/null +++ b/example/src/docs/zh-CN/grid/sort/server-sort.md @@ -0,0 +1,27 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +:::tip +* 表格设置 `remote-sort` 开启所有列服务端排序,列设置 `remote-sort` 开启该列服务端排序 +* 列排序优先级高于表格排序 +* 列设置 `sortable` 时有效 +::: + +### 表格服务端排序 + +通过表格列设置 `sortable` 属性开启该列排序功能,然后表格设置 `remote-sort` 方法开启服务端排序。 + +:::warning +该示例中的 `services/getGridMockData` 服务需要自行实现,示例模拟了远程服务返回的数据 +::: + + diff --git a/example/src/docs/zh-CN/grid/span/column-span.md b/example/src/docs/zh-CN/grid/span/column-span.md new file mode 100644 index 000000000..bfb362a64 --- /dev/null +++ b/example/src/docs/zh-CN/grid/span/column-span.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 列合并 + +列合并是通过表格列设置方法 `span-method` 实现的自定义合并规则。例如: + +> 实现2列合并 + + + +> 实现3列合并 + + + +
diff --git a/example/src/docs/zh-CN/grid/span/custom-span.md b/example/src/docs/zh-CN/grid/span/custom-span.md new file mode 100644 index 000000000..ea3732336 --- /dev/null +++ b/example/src/docs/zh-CN/grid/span/custom-span.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + + + +
diff --git a/example/src/docs/zh-CN/grid/span/row-span.md b/example/src/docs/zh-CN/grid/span/row-span.md new file mode 100644 index 000000000..c22189b59 --- /dev/null +++ b/example/src/docs/zh-CN/grid/span/row-span.md @@ -0,0 +1,27 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +通过表格列属性 `row-span` 设置内置的行合并规则,该属性仅适用于普通表格,嵌套树表不支持。 + + + +
+ +### 自定义合并规则 + +通过表格列属性 `span-method` 设置自定义合并规则。 + + + +
diff --git a/example/src/docs/zh-CN/grid/summary/configuration-summary.md b/example/src/docs/zh-CN/grid/summary/configuration-summary.md new file mode 100644 index 000000000..1d3d6221e --- /dev/null +++ b/example/src/docs/zh-CN/grid/summary/configuration-summary.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +通过 `summary-config` 设置配置式的统计。 + + + +
diff --git a/example/src/docs/zh-CN/grid/summary/custom-summary.md b/example/src/docs/zh-CN/grid/summary/custom-summary.md new file mode 100644 index 000000000..fb6c56615 --- /dev/null +++ b/example/src/docs/zh-CN/grid/summary/custom-summary.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +通过 `footer-method` 和 `show-footer` 配置自定义统计。 + + + +
diff --git a/example/src/docs/zh-CN/grid/tip/cell-tip.md b/example/src/docs/zh-CN/grid/tip/cell-tip.md new file mode 100644 index 000000000..274ca5b38 --- /dev/null +++ b/example/src/docs/zh-CN/grid/tip/cell-tip.md @@ -0,0 +1,29 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 单元格提示 + +单元格提示有2种,一种是 `show-tip` 提示(内容是否超出都会提示),另一种是 `show-overflow` 内容超出当前行时隐藏并提示。 + +:::tip + +`show-overflow` 可选值有: +* `title`:和原生标签的 `title` 属性一致 +* `ellipsis`:内容超出部分显示 `...`,没有提示 +* `tooltip`:内容超出部分显示 `...`,左侧/右侧弹出提示层显示全部信息,`show-overflow` 开启时的缺省提示 + +`tooltip` 提示可通过 `Grid` 属性 `:tooltip-config` 进行配置,配置方式参考 `Tooltip` 组件 +::: + + + +
diff --git a/example/src/docs/zh-CN/grid/tip/column-header-tip.md b/example/src/docs/zh-CN/grid/tip/column-header-tip.md new file mode 100644 index 000000000..1bdf73add --- /dev/null +++ b/example/src/docs/zh-CN/grid/tip/column-header-tip.md @@ -0,0 +1,26 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 列头提示 + +列头提示有2种,一种是 `show-header-tip` 提示(内容是否超出都会提示),另一种是 `show-header-overflow` 内容超出当前行时隐藏并提示。 + +:::tip +`show-header-overflow` 可选值有: +* `tooltip`:内容超出部分显示 `...`,左侧/右侧弹出提示层显示全部信息,`show-overflow` 开启时的缺省提示 +* `title`:和原生标签的 `title` 属性一致 +* `ellipsis`:内容超出部分显示 `...`,没有提示 +::: + + + +
diff --git a/example/src/docs/zh-CN/grid/tip/overflow-tip.md b/example/src/docs/zh-CN/grid/tip/overflow-tip.md new file mode 100644 index 000000000..36be1063b --- /dev/null +++ b/example/src/docs/zh-CN/grid/tip/overflow-tip.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + + + +
diff --git a/example/src/docs/zh-CN/grid/toolbar/copy-row-data.md b/example/src/docs/zh-CN/grid/toolbar/copy-row-data.md new file mode 100644 index 000000000..2cebaa507 --- /dev/null +++ b/example/src/docs/zh-CN/grid/toolbar/copy-row-data.md @@ -0,0 +1,23 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +工具栏配置步骤: +1、表格以插槽方式引入表格工具栏组件 `GridToolbar`,并设置工具栏组件属性 `slot="toolbar"` 。 +2、设置工具栏组件属性 `buttons` 进行按钮组相关配置。 +3、表格事件设置 `@toolbar-button-click` 获取工具栏 `buttons` 的事件,用户可自定义实现复制行操作的业务逻辑。 +* `size` 属性设置工具栏尺寸大小。 + + + +
diff --git a/example/src/docs/zh-CN/grid/toolbar/custom-toolbar.md b/example/src/docs/zh-CN/grid/toolbar/custom-toolbar.md new file mode 100644 index 000000000..98a1a1538 --- /dev/null +++ b/example/src/docs/zh-CN/grid/toolbar/custom-toolbar.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +工具栏配置步骤: +1、表格以插槽方式引入表格工具栏组件 `GridToolbar`,并设置工具栏组件插槽 `#toolbar` 。 +2、通过工具栏组件的插槽 `#buttons` 自定义内容。 + + + +
diff --git a/example/src/docs/zh-CN/grid/toolbar/grid-full-screen.md b/example/src/docs/zh-CN/grid/toolbar/grid-full-screen.md new file mode 100644 index 000000000..385707f83 --- /dev/null +++ b/example/src/docs/zh-CN/grid/toolbar/grid-full-screen.md @@ -0,0 +1,28 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 + +
+ +### 基本用法 + +工具栏配置步骤: +1、表格以插槽方式引入表格工具栏组件 `GridToolbar`,并设置工具栏组件属性 `slot="toolbar"` 。 +2、设置工具栏组件属性 `full-screen` 开启表格全屏功能。 + + + +
+ +### 全屏时改变表格高度 + + + +
diff --git a/example/src/docs/zh-CN/grid/toolbar/import-and-export.md b/example/src/docs/zh-CN/grid/toolbar/import-and-export.md new file mode 100644 index 000000000..bbcb88ced --- /dev/null +++ b/example/src/docs/zh-CN/grid/toolbar/import-and-export.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +工具栏配置步骤: +1、表格以插槽方式引入表格工具栏组件 `GridToolbar`,并设置工具栏组件属性 `slot="toolbar"` 。 +2、设置工具栏组件属性 `full-screen` 开启表格全屏功能。 + + + +
diff --git a/example/src/docs/zh-CN/grid/toolbar/insert-delete-update.md b/example/src/docs/zh-CN/grid/toolbar/insert-delete-update.md new file mode 100644 index 000000000..d0c0c8f67 --- /dev/null +++ b/example/src/docs/zh-CN/grid/toolbar/insert-delete-update.md @@ -0,0 +1,53 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 + +
+ +### 基本用法 + +工具栏配置步骤: +1、表格以插槽方式引入表格工具栏组件 `GridToolbar`,并设置工具栏组件属性 `slot="toolbar"` 。 +2、设置工具栏组件属性 `buttons` 进行按钮组相关配置。 +3、表格事件设置 `@toolbar-button-click` 获取工具栏 `buttons` 的事件,用户可自定义实现增删改操作的业务逻辑。 + +:::tip 新增的行需要标记新增状态的样式时需要配置 edit-config 的 markInsert 项为 true +::: + + + +
+ +### 取消删除 + +在工具栏中配置 `mark_cancel` 的 code,勾选数据后,单击 `删除/取消删除` 按钮,勾选的数据将标记删除线。再单击 `保存` 按钮请求服务删除标记的数据。已标记删除线的数据勾选后再次单击 `删除/取消删除` 按钮,会取消删除线。 + +:::warning 需要配置 fetch-data 请求服务时才有标记删除线和取消删除线的效果 +::: + + + +
+ +### 清空数据 + +clearData 方法手动清空单元格内容,如果不传参数,则清空整个表格内容。如果传了行则清空指定行内容,如果传了指定字段,则清空该字段内容。具体参考下面示例。 + + + +
+ +### 指定行插入数据和删除指定行 + +通过 `insertAt(records, row)` 方法可以在指定行插入一行或多行数据。`remove(rows)` 方法可以删除指定一行或多行数据,rows 为对象则是一行,数组则是多行数据,为空则删除所有数据。 + + + +
diff --git a/example/src/docs/zh-CN/grid/toolbar/refresh-grid.md b/example/src/docs/zh-CN/grid/toolbar/refresh-grid.md new file mode 100644 index 000000000..4037b3d59 --- /dev/null +++ b/example/src/docs/zh-CN/grid/toolbar/refresh-grid.md @@ -0,0 +1,24 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +工具栏配置步骤: +1、表格以插槽方式引入表格工具栏组件 `GridToolbar`,并设置工具栏组件属性 `slot="toolbar"` 。 +2、设置工具栏组件属性 `refresh` 开启表格刷新功能。 +* 设置工具栏属性 `loading` 开启/关闭加载中。 + +自定义实现刷新时直接调用`handleFetch('reload')` + + + +
diff --git a/example/src/docs/zh-CN/grid/toolbar/save-data.md b/example/src/docs/zh-CN/grid/toolbar/save-data.md new file mode 100644 index 000000000..4b57ac1d7 --- /dev/null +++ b/example/src/docs/zh-CN/grid/toolbar/save-data.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +通过表格属性 `save-data` 服务端数据保存方法。 +通过表格属性 `delete-data` 服务端数据删除方法。 + + + +
diff --git a/example/src/docs/zh-CN/grid/toolbar/search-whole-grid.md b/example/src/docs/zh-CN/grid/toolbar/search-whole-grid.md new file mode 100644 index 000000000..441d029a1 --- /dev/null +++ b/example/src/docs/zh-CN/grid/toolbar/search-whole-grid.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + + + +
diff --git a/example/src/docs/zh-CN/grid/toolbar/toolbar-op-config.md b/example/src/docs/zh-CN/grid/toolbar/toolbar-op-config.md new file mode 100644 index 000000000..ec88bb74f --- /dev/null +++ b/example/src/docs/zh-CN/grid/toolbar/toolbar-op-config.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 配置式 + +TINY 3 版本通过 `v-bind` 绑定一个对象来实现配置式。在绑定的对象中 `toolbar` 字段用于工具栏配置,可配合 `events` 字段对工具栏中按钮进行 `toolbarButtonClick` 事件配置。另外,`pager` 字段用于分页配置,`fetchData` 字段用于请求服务。 + + + +
diff --git a/example/src/docs/zh-CN/grid/tree-grid/tree-grid-base-usage.md b/example/src/docs/zh-CN/grid/tree-grid/tree-grid-base-usage.md new file mode 100644 index 000000000..f27f7b4ee --- /dev/null +++ b/example/src/docs/zh-CN/grid/tree-grid/tree-grid-base-usage.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 有子级的数据结构 + +在 grid 标签上配置 tree-config="{children: 'children'}"以树的形式来展示数据,还需要在展示树节点的字段上配置 tree-node 属性 + + + +### 扁平化数据结构 + +注意:扁平化的数据结构需要调用 aggregateTableData 方法把数据转换成带有子级的数据才能正常的显示出树表的结构 + + + +
diff --git a/example/src/docs/zh-CN/grid/tree-grid/tree-grid-expand-config.md b/example/src/docs/zh-CN/grid/tree-grid/tree-grid-expand-config.md new file mode 100644 index 000000000..9e53d208e --- /dev/null +++ b/example/src/docs/zh-CN/grid/tree-grid/tree-grid-expand-config.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +表格属性 `expand-config` 设置展开行配置项。 + + + +
diff --git a/example/src/docs/zh-CN/grid/tree-grid/tree-grid-expand.md b/example/src/docs/zh-CN/grid/tree-grid/tree-grid-expand.md new file mode 100644 index 000000000..be647226c --- /dev/null +++ b/example/src/docs/zh-CN/grid/tree-grid/tree-grid-expand.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## 树表 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 展开行 + +在 column 标签上配置 type="expand" 展开行,可以通过 v-slot 插槽插入需要的模板信息 + + + +### 检查树节点是否已展开 + +通过 `hasTreeExpand(row)` 方法可以检查树节点是否已展开,参数 row 为行数据对象。 + + + +
diff --git a/example/src/docs/zh-CN/grid/tree-grid/tree-grid-fixed-column.md b/example/src/docs/zh-CN/grid/tree-grid/tree-grid-fixed-column.md new file mode 100644 index 000000000..361f757ee --- /dev/null +++ b/example/src/docs/zh-CN/grid/tree-grid/tree-grid-fixed-column.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## 树表 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 冻结列 + +在列的标签上可以通过配置 fixed="left" 属性把该列固定在左侧,配置 fixed="right" 属性把该列固定在右侧 + + + +
diff --git a/example/src/docs/zh-CN/grid/tree-grid/tree-grid-index.md b/example/src/docs/zh-CN/grid/tree-grid/tree-grid-index.md new file mode 100644 index 000000000..3bf829aaf --- /dev/null +++ b/example/src/docs/zh-CN/grid/tree-grid/tree-grid-index.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## 树表 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 展开行序号列配置 + +在 `treeConfig` 属性里配置 `ordered` 为 `false` 展开行,序号列按父子级的结构排序。默认 `ordered` 属性为 `true` 展开行后序号列按序号排序。 + + diff --git a/example/src/docs/zh-CN/grid/tree-grid/tree-grid-insert-delete-update.md b/example/src/docs/zh-CN/grid/tree-grid/tree-grid-insert-delete-update.md new file mode 100644 index 000000000..23cb0e3ab --- /dev/null +++ b/example/src/docs/zh-CN/grid/tree-grid/tree-grid-insert-delete-update.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## 树表 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 增删改 + +在 grid-toolbar 标签上配置 slot="toolbar" 插槽,配置相关的操作按钮 ,注意:新增数据需要在 grid 标签上配置 edit-config 编辑框的配置信息,并通过 ref 获取到组件实例调用方法进行相关操作,findTree、filterTree 是工具类里的查找和过滤方法。由于tree数据节构的特殊性,grid的`getInsertRecords`与`getRecordset`方法无法获取到新增数据,此类数据需要用户自行处理。 + + + +
diff --git a/example/src/docs/zh-CN/grid/tree-grid/tree-grid-keyboard-operation.md b/example/src/docs/zh-CN/grid/tree-grid/tree-grid-keyboard-operation.md new file mode 100644 index 000000000..fafed5574 --- /dev/null +++ b/example/src/docs/zh-CN/grid/tree-grid/tree-grid-keyboard-operation.md @@ -0,0 +1,24 @@ +
+

+ +

+ +## 树表 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 键盘操作 + +键盘移动高亮行,设置斑马线属性 stripe 为 false,鼠标悬停高亮行 highlight-hover-row 为 false,高亮当前行 highlight-current-row ,并配置 keyboard-config={isArrow: true} 属性启用方向键功能 + +

| Arrow Up ↑ | 移动到高亮行的上一行

+

| Arrow Down ↓ | 移动到高亮行的下一行

+

| Enter | 展开节点,进入子节点

+

| Backspace | 关闭节点,返回到父节点

+ + + +
diff --git a/example/src/docs/zh-CN/grid/tree-grid/tree-grid-operation-column.md b/example/src/docs/zh-CN/grid/tree-grid/tree-grid-operation-column.md new file mode 100644 index 000000000..0f042e08f --- /dev/null +++ b/example/src/docs/zh-CN/grid/tree-grid/tree-grid-operation-column.md @@ -0,0 +1,37 @@ +
+

+ +

+ +## 树表 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 操作列 + +列通过配置 type="radio" 实现单选,配置 type="selection" 实现多选 + + + +### 手动展开所有树节点 + +`setAllTreeExpansion(checked)` 可设置所有树节点的展开与否。 + + + +### 手动展开指定树节点 + +`setTreeExpansion(rows, checked)` 可设置展开指定的树形节点,第二个参数设置这一行展开与否。 + + + +### 手动切换展开树形节点 + +`toggleTreeExpansion(row)` 可设置切换展开树形节点。 + + + +
diff --git a/example/src/docs/zh-CN/grid/validation/before-submit-validation.md b/example/src/docs/zh-CN/grid/validation/before-submit-validation.md new file mode 100644 index 000000000..d164cdc81 --- /dev/null +++ b/example/src/docs/zh-CN/grid/validation/before-submit-validation.md @@ -0,0 +1,27 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### Grid-表格校验-提交前校验 + +grid 标签配置 edit-config 对象,并配置 edit-rules 对象来设置校验对象和校验规则,通过按钮点击事件调用 this.\$refs.basicGrid.validate()方法来触发表格校验,具体参考下面示例。 + + + +
+ +### Grid-表格校验-触发校验时自动定位到当前校验的单元格 + +grid 编辑器引入 Tiny Vue 组件,标签配置 edit-config 对象,并配置 edit-rules 对象来设置校验对象和校验规则,通过按钮点击事件调用 this.\$refs.basicGrid.validate()方法来触发表格校验,具体参考下面示例。 + + + +
diff --git a/example/src/docs/zh-CN/grid/validation/editing-validation.md b/example/src/docs/zh-CN/grid/validation/editing-validation.md new file mode 100644 index 000000000..34c39642a --- /dev/null +++ b/example/src/docs/zh-CN/grid/validation/editing-validation.md @@ -0,0 +1,52 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### Grid-表格校验-编辑时校验 + +grid 标签配置 edit-config 对象,并配置 edit-rules 对象来设置校验对象和校验规则。具体参考下面示例。 + + + +
+ +### Grid-表格校验-隐藏列编辑时校验 + +grid 标签配置 edit-config 对象且列配置type:visible 且配置isValidAlways属性时, 即列总是显示可编辑状态时,支持编辑时校验,并配置 edit-rules 对象来设置校验对象和校验规则。具体参考下面示例。 + + + +
+ +### 自定义校验配置 + +配置 valid-config 对象来设置校验提示信息展示在表格内部。具体参考下面示例。 + + + +
+ +### 数据关联校验 + +在自定义校验时,`validator`方法`rule`参数中可获取到当前行与列的信息。可以按业务的需求实现数据关联的校验逻辑 + + + +
+ +### 自定义组件与插槽编辑器校验 + +在使用自定义组件时,组件需要实现`v-model`的功能。在使用插槽时想要实时校验需要手动触发组件的校验方法 + + + +
+ diff --git a/example/src/docs/zh-CN/grid/validation/select-validation.md b/example/src/docs/zh-CN/grid/validation/select-validation.md new file mode 100644 index 000000000..a45dec15f --- /dev/null +++ b/example/src/docs/zh-CN/grid/validation/select-validation.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### Grid-表格校验-选中时校验 + +grid 标签配置 edit-config 对象,并配置 edit-rules 对象来设置校验对象和校验规则,通过按钮点击事件调用 this.$refs.basicGrid.validate()方法来触发表格校验,具体参考下面示例。 + + + +
diff --git a/example/src/docs/zh-CN/grid/validation/valide-tipconfig.md b/example/src/docs/zh-CN/grid/validation/valide-tipconfig.md new file mode 100644 index 000000000..1d78f3328 --- /dev/null +++ b/example/src/docs/zh-CN/grid/validation/valide-tipconfig.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### Grid-表格校验-选中时校验 + +表格默认错误提示显示在 `body` 上, 可以通过设置 `tooltip-config` 的 `appendTobody` 设置为 `false` 来解决页面滚动时tip位置错误的问题。设置 `placement` 属性调整默认显示方向。`tooltip-config` 的配置可参参考 tooltip 组件 + + + +
diff --git a/example/src/docs/zh-CN/grid/width-height/adaptive-column-width.md b/example/src/docs/zh-CN/grid/width-height/adaptive-column-width.md new file mode 100644 index 000000000..35d8bb7d1 --- /dev/null +++ b/example/src/docs/zh-CN/grid/width-height/adaptive-column-width.md @@ -0,0 +1,23 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 列宽自适应撑开 + +表格属性设置 fit 自动撑开,默认值为 true 开启自适应撑开,值为 false 时必须设置列宽度,否则表格宽度由单元格内容撑开。 + + + +### 列宽不自适应撑开 + + + +
diff --git a/example/src/docs/zh-CN/grid/width-height/adaptive-grid-width-height.md b/example/src/docs/zh-CN/grid/width-height/adaptive-grid-width-height.md new file mode 100644 index 000000000..e2f8fb225 --- /dev/null +++ b/example/src/docs/zh-CN/grid/width-height/adaptive-grid-width-height.md @@ -0,0 +1,23 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 开启响应式表格宽高 + +表格属性设置 autoResize 属性开启响应式表格宽高,默认开启。 + + + +### 关闭响应式表格宽高 + + + +
diff --git a/example/src/docs/zh-CN/grid/width-height/auto-height.md b/example/src/docs/zh-CN/grid/width-height/auto-height.md new file mode 100644 index 000000000..871ea925c --- /dev/null +++ b/example/src/docs/zh-CN/grid/width-height/auto-height.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 开启响应式表格宽高 + +表格属性设置 autoResize 属性开启响应式表格宽高的同时,将高度`heigh`设置为`auto`就可以自动跟随父容器高度。 + + + + diff --git a/example/src/docs/zh-CN/grid/width-height/column-min-width.md b/example/src/docs/zh-CN/grid/width-height/column-min-width.md new file mode 100644 index 000000000..c0869d219 --- /dev/null +++ b/example/src/docs/zh-CN/grid/width-height/column-min-width.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +通过属性 `column-min-width` 设置总体列可以调整到的最小宽度,不设置时默认为列头 span 的宽度 + 36(头部固定宽度)。 + +
+ + + +
diff --git a/example/src/docs/zh-CN/grid/width-height/column-width.md b/example/src/docs/zh-CN/grid/width-height/column-width.md new file mode 100644 index 000000000..7675cf46e --- /dev/null +++ b/example/src/docs/zh-CN/grid/width-height/column-width.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +通过属性 `column-width` 设置所有列宽度,默认值为均匀分配。 + +
+ + + +
diff --git a/example/src/docs/zh-CN/grid/width-height/fixed-column-width.md b/example/src/docs/zh-CN/grid/width-height/fixed-column-width.md new file mode 100644 index 000000000..1fc9d8958 --- /dev/null +++ b/example/src/docs/zh-CN/grid/width-height/fixed-column-width.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +表格列属性设置 width 固定宽度,支持数值和百分比。 + + + +
diff --git a/example/src/docs/zh-CN/grid/width-height/fixed-grid-height.md b/example/src/docs/zh-CN/grid/width-height/fixed-grid-height.md new file mode 100644 index 000000000..043e9d46c --- /dev/null +++ b/example/src/docs/zh-CN/grid/width-height/fixed-grid-height.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +表格属性设置 height 固定表格高度。 + + + +
diff --git a/example/src/docs/zh-CN/grid/width-height/max-min-grid-height.md b/example/src/docs/zh-CN/grid/width-height/max-min-grid-height.md new file mode 100644 index 000000000..e76fa4ee1 --- /dev/null +++ b/example/src/docs/zh-CN/grid/width-height/max-min-grid-height.md @@ -0,0 +1,23 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 设置 minHeight 最小高度 + +表格属性设置 minHeight 限制最小高度,maxHeight 限制最大高度。 + + + +### 设置 maxHeight 最大高度 + + + +
diff --git a/example/src/docs/zh-CN/grid/width-height/min-width.md b/example/src/docs/zh-CN/grid/width-height/min-width.md new file mode 100644 index 000000000..f5674aecf --- /dev/null +++ b/example/src/docs/zh-CN/grid/width-height/min-width.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +通过表格列属性 `min-width` 本列最小宽度;会自动将剩余空间按比例分配。 + +
+ + + +
diff --git a/example/src/docs/zh-CN/grid/width-height/recalculate.md b/example/src/docs/zh-CN/grid/width-height/recalculate.md new file mode 100644 index 000000000..c8d9695eb --- /dev/null +++ b/example/src/docs/zh-CN/grid/width-height/recalculate.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 重新计算表格 + +通过 `recalculate()` 方法可以重新计算表格,当父容器宽度变化时可通过该方法重新计算表格。 + + + +
diff --git a/example/src/docs/zh-CN/grid/width-height/resize-column-width.md b/example/src/docs/zh-CN/grid/width-height/resize-column-width.md new file mode 100644 index 000000000..eea1307ee --- /dev/null +++ b/example/src/docs/zh-CN/grid/width-height/resize-column-width.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Grid 表格 + + + +表格组件,提供了非常强大数据表格功能,在 Grid 可以展示数据列表,可以对数据列表进行选择、编辑等。 +
+ +### 基本用法 + +表格属性设置 resizable 开启列宽拖拽。 + + + +
diff --git a/example/src/docs/zh-CN/icon.md b/example/src/docs/zh-CN/icon.md new file mode 100644 index 000000000..acf1935a1 --- /dev/null +++ b/example/src/docs/zh-CN/icon.md @@ -0,0 +1,29 @@ +
+

+ +

+ +## Icon 图标 + + + +提供了一套常用的图标集合,直接通过设置类名为 `icon-iconName` 来使用。 +
+ +### 基本用法 + + + +### 显示 Title + +通过在 Icon 的父级元素上增加 `title` 属性来实现给 Icon 图标增加 Title 的功能。 + + + +### 图标集合 + + + +
+ + diff --git a/example/src/docs/zh-CN/image/auto-fit-container-size.md b/example/src/docs/zh-CN/image/auto-fit-container-size.md new file mode 100644 index 000000000..2238a5a60 --- /dev/null +++ b/example/src/docs/zh-CN/image/auto-fit-container-size.md @@ -0,0 +1,27 @@ +
+

+ +

+ +## Image 图片预览 + + + +图片容器,在保留原生 img 的特性下,支持懒加载,自定义占位、加载失败等功能。 + +
+
+ +### 自适应容器尺寸 + +可通过 `fit` 属性确定图片如何适应到容器框,同原生 css 的 object-fit 属性。 + +:::tip object-fit 说明 +fill:被替换的内容将被缩放,以在填充元素的内容框时保持其宽高比 +contain:被替换的内容大小可以填充元素的内容框 +cover:被替换的内容大小保持其宽高比,同时填充元素的整个内容框 +none:被替换的内容尺寸不会被改变 +scale-down:内容的尺寸就像是指定了none 或 contain,取决于哪一个将导致更小的对象尺寸。 +::: + + diff --git a/example/src/docs/zh-CN/image/basic-usage.md b/example/src/docs/zh-CN/image/basic-usage.md new file mode 100644 index 000000000..3058e1d17 --- /dev/null +++ b/example/src/docs/zh-CN/image/basic-usage.md @@ -0,0 +1,23 @@ +
+

+ +

+ +## Image 图片预览 + + + +图片容器,在保留原生 img 的特性下,支持懒加载,自定义占位、加载失败等功能。 + +
+
+ +### 基本用法 + +通过 `src` 设置预览的图片路径。 + + + +
+ + diff --git a/example/src/docs/zh-CN/image/custom-load-failed-text.md b/example/src/docs/zh-CN/image/custom-load-failed-text.md new file mode 100644 index 000000000..d817a9964 --- /dev/null +++ b/example/src/docs/zh-CN/image/custom-load-failed-text.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Image 图片预览 + + + +图片容器,在保留原生 img 的特性下,支持懒加载,自定义占位、加载失败等功能。 + +
+
+ +### 加载失败 + +可通过 `slot = error` 自定义加载失败内容。 + + diff --git a/example/src/docs/zh-CN/image/custom-placeholder.md b/example/src/docs/zh-CN/image/custom-placeholder.md new file mode 100644 index 000000000..78ac06faa --- /dev/null +++ b/example/src/docs/zh-CN/image/custom-placeholder.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Image 图片预览 + + + +图片容器,在保留原生 img 的特性下,支持懒加载,自定义占位、加载失败等功能。 + +
+
+ +### 占位内容 + +可通过 `slot = placeholder` 自定义占位内容。 + + diff --git a/example/src/docs/zh-CN/image/lazy-load.md b/example/src/docs/zh-CN/image/lazy-load.md new file mode 100644 index 000000000..d4106a814 --- /dev/null +++ b/example/src/docs/zh-CN/image/lazy-load.md @@ -0,0 +1,23 @@ +
+

+ +

+ +## Image 图片预览 + + + +图片容器,在保留原生 img 的特性下,支持懒加载,自定义占位、加载失败等功能。 + +
+
+ +### 懒加载 + +可通过 `lazy` 开启懒加载功能,当图片滚动到可视范围内才会加载。可通过 `scroll-container` 来设置滚动容器,若未定义,则为最近一个 `overflow` 值为 `auto` 或 `scroll` 的父元素。 + +:::tip 提示 +lazy 懒加载的图片必须是远程的图片,不支持静态图片懒加载。 +::: + + diff --git a/example/src/docs/zh-CN/image/load-event.md b/example/src/docs/zh-CN/image/load-event.md new file mode 100644 index 000000000..e6a4874fc --- /dev/null +++ b/example/src/docs/zh-CN/image/load-event.md @@ -0,0 +1,29 @@ +
+

+ +

+ +## Image 图片预览 + + + +图片容器,在保留原生 img 的特性下,支持懒加载,自定义占位、加载失败等功能。 + +
+
+ +### 加载成功事件 + +图片加载成功触发 `load` 事件。 + + + +
+ +### 加载失败事件 + +图片加载失败触发 `error` 事件。 + + + +
diff --git a/example/src/docs/zh-CN/image/preview-in-dialog.md b/example/src/docs/zh-CN/image/preview-in-dialog.md new file mode 100644 index 000000000..15e2ace9f --- /dev/null +++ b/example/src/docs/zh-CN/image/preview-in-dialog.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Image 图片预览 + + + +图片容器,在保留原生 img 的特性下,支持懒加载,自定义占位、加载失败等功能。 + +
+
+ +### 对话框中预览图片 + +在 `dialog-box` 元素中嵌入 `image` 进行图片预览。 + + + +
diff --git a/example/src/docs/zh-CN/image/preview-src-list.md b/example/src/docs/zh-CN/image/preview-src-list.md new file mode 100644 index 000000000..7f0db8b05 --- /dev/null +++ b/example/src/docs/zh-CN/image/preview-src-list.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Image 图片预览 + + + +图片容器,在保留原生 img 的特性下,支持懒加载,自定义占位、加载失败等功能。 + +
+
+ +### 预览大图 + +通过 `preview-src-list` 开启预览大图的功能。 + + + +
diff --git a/example/src/docs/zh-CN/image/preview-z-index.md b/example/src/docs/zh-CN/image/preview-z-index.md new file mode 100644 index 000000000..e211b891e --- /dev/null +++ b/example/src/docs/zh-CN/image/preview-z-index.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Image 图片预览 + + + +图片容器,在保留原生 img 的特性下,支持懒加载,自定义占位、加载失败等功能。 + +
+
+ +### 图片预览层级 + +可通过 `z-index` 设置预览图片的层级。 + + diff --git a/example/src/docs/zh-CN/input/autofocus.md b/example/src/docs/zh-CN/input/autofocus.md new file mode 100644 index 000000000..d52878647 --- /dev/null +++ b/example/src/docs/zh-CN/input/autofocus.md @@ -0,0 +1,28 @@ +
+

+ +

+ +## Input 输入框 + + + +通过鼠标或键盘输入字符。 + +
+ +### 自动获取焦点 + +可通过 `autofocus` 属性设置自动获取焦点。`autofocus` 是原生属性。 + + + +
+ +### 自动补全 + +可通过 `autocomplete` 属性设置自动补全,默认值为 off ,可选 on 。 + + + +
diff --git a/example/src/docs/zh-CN/input/autosize-textarea.md b/example/src/docs/zh-CN/input/autosize-textarea.md new file mode 100644 index 000000000..e3ad81164 --- /dev/null +++ b/example/src/docs/zh-CN/input/autosize-textarea.md @@ -0,0 +1,28 @@ +
+

+ +

+ +## Input 输入框 + + + +通过鼠标或键盘输入字符。 + +
+ +### 可自适应文本高度的文本域 + +可通过 `autosize` 属性设置文本域自适应内容高度。可传入对象,如`{ minRows: 2, maxRows: 6 }`。注意:只对 `type="textarea"` 有效。 + + + +
+ +### 输入框的 tabindex + +可通过 `tabindex` 属性设置输入框的 tabindex + + + +
diff --git a/example/src/docs/zh-CN/input/basic-usage.md b/example/src/docs/zh-CN/input/basic-usage.md new file mode 100644 index 000000000..10cd43d34 --- /dev/null +++ b/example/src/docs/zh-CN/input/basic-usage.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Input 输入框 + + + +通过鼠标或键盘输入字符。 +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/zh-CN/input/clearable.md b/example/src/docs/zh-CN/input/clearable.md new file mode 100644 index 000000000..eb24b6231 --- /dev/null +++ b/example/src/docs/zh-CN/input/clearable.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Input 输入框 + + + +通过鼠标或键盘输入字符。 +
+ +### 可清空 + +可通过 `clearable` 属性设置输入框显示清空图标按钮。 + + + +
diff --git a/example/src/docs/zh-CN/input/complicated-input.md b/example/src/docs/zh-CN/input/complicated-input.md new file mode 100644 index 000000000..68c045f25 --- /dev/null +++ b/example/src/docs/zh-CN/input/complicated-input.md @@ -0,0 +1,44 @@ +
+

+ +

+ +## Input 输入框 + + + +通过鼠标或键盘输入字符。 + +
+ +### 前置内容 + +配置 `prepend` slot,设置输入框前置内容,注意:只对 `type="text"` 有效。 + + + +
+ +### 后置内容 + +配置 `append` slot,设置输入框后置内容,注意:只对 `type="text"` 有效。 + + + +
+ +### 头部内容 + +配置 `prefix` slot,设置输入框头部内容,注意:只对 `type="text"` 有效。 + + + +
+ +### 尾部内容 + +配置 `suffix` slot,设置输入框尾部内容,注意:只对 `type="text"` 有效。 + + + +
diff --git a/example/src/docs/zh-CN/input/counter.md b/example/src/docs/zh-CN/input/counter.md new file mode 100644 index 000000000..2aba2c5b1 --- /dev/null +++ b/example/src/docs/zh-CN/input/counter.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Input 输入框 + + + +通过鼠标或键盘输入字符。 +
+ +### 计数器 + +可通过 `counter` 属性设置显示输入框字符计数器。 + + + +
diff --git a/example/src/docs/zh-CN/input/custom-prefix-suffix-icon.md b/example/src/docs/zh-CN/input/custom-prefix-suffix-icon.md new file mode 100644 index 000000000..25f2f0163 --- /dev/null +++ b/example/src/docs/zh-CN/input/custom-prefix-suffix-icon.md @@ -0,0 +1,43 @@ +
+

+ +

+ +## Input 输入框 + + + +通过鼠标或键盘输入字符。 +
+ +### 头部图标 + +可通过 `prefix-icon` 属性设置输入框头部图标。 + + + +
+ +### 尾部图标 + +可通过 `suffix-icon` 属性设置输入框尾部图标。 + + + +
+ +### 可通过 slot="prefix" 设置头部图标 + +可通过 `slot="prefix"` 设置输入框头部图标。 + + + +
+ +### 可通过 slot="suffix" 设置尾部图标 + +可通过 `slot="suffix"` 设置输入框尾部图标。 + + + +
diff --git a/example/src/docs/zh-CN/input/disabled-readonly.md b/example/src/docs/zh-CN/input/disabled-readonly.md new file mode 100644 index 000000000..23fafad81 --- /dev/null +++ b/example/src/docs/zh-CN/input/disabled-readonly.md @@ -0,0 +1,33 @@ +
+

+ +

+ +## Input 输入框 + + + +通过鼠标或键盘输入字符。 +
+ +### 禁用 + +可通过 `disabled` 属性设置禁用输入框。`disabled` 是原生属性。 + + + +
+ +### 只读 + +可通过 `readonly` 属性设置输入框只读。`readonly` 是原生属性。 + + + +
+ +:::warning 配置`readonly`属性后,在IE下输入框仍然有光标闪烁问题 +配置 `readonly` 属性后,在IE下输入框仍然有光标闪烁问题,可在输入框配置`unselectable="on"`解决,但存在如下缺陷,请根据需求慎重修改。 +在IE浏览器下屏蔽了input的blur事件,若用到blur事件,请用click事件来代替。 +::: + diff --git a/example/src/docs/zh-CN/input/input-events.md b/example/src/docs/zh-CN/input/input-events.md new file mode 100644 index 000000000..4deb3a144 --- /dev/null +++ b/example/src/docs/zh-CN/input/input-events.md @@ -0,0 +1,43 @@ +
+

+ +

+ +## Input 输入框 + + + +通过鼠标或键盘输入字符。 +
+ +### 失焦事件 + +输入框失去焦点时触发 `blur` 事件。 + + + +
+ +### 值改变事件 + +输入框值改变时触发 `change` 事件。 + + + +
+ +### 清除事件 + +点击输入框清除按钮时触发 `clear` 事件。 + + + +
+ +### 聚焦事件 + +输入框获取焦点时触发 `focus` 事件。 + + + +
diff --git a/example/src/docs/zh-CN/input/input-methods.md b/example/src/docs/zh-CN/input/input-methods.md new file mode 100644 index 000000000..799f3b9d0 --- /dev/null +++ b/example/src/docs/zh-CN/input/input-methods.md @@ -0,0 +1,35 @@ +
+

+ +

+ +## Input 输入框 + + + +通过鼠标或键盘输入字符。 +
+ +### 记忆历史输入 + + + +
+ +### 失去焦点 + + + +
+ +### 获取焦点 + + + +
+ +### 选中输入框文本 + + + +
diff --git a/example/src/docs/zh-CN/input/input-size.md b/example/src/docs/zh-CN/input/input-size.md new file mode 100644 index 000000000..a5fe7c3ac --- /dev/null +++ b/example/src/docs/zh-CN/input/input-size.md @@ -0,0 +1,44 @@ +
+

+ +

+ +## Input 输入框 + + + +通过鼠标或键盘输入字符。 + +
+ +### 尺寸 + +可通过 `size` 属性设置尺寸大小,可选值:`medium / small / mini`。注意:只在 `type!="textarea"` 时有效。 + + + +
+ +### form + +可通过 `form` 属性设置原生属性 form 。 + + + +
+ +### name + +可通过 `name` 原生属性。 + + + +
+ +### 输入框关联文字 + +可通过 `label` 属性设置输入框关联的 label 文字。 + + + +
diff --git a/example/src/docs/zh-CN/input/max-min-length.md b/example/src/docs/zh-CN/input/max-min-length.md new file mode 100644 index 000000000..80b21fc84 --- /dev/null +++ b/example/src/docs/zh-CN/input/max-min-length.md @@ -0,0 +1,28 @@ +
+

+ +

+ +## Input 输入框 + + + +通过鼠标或键盘输入字符。 + +
+ +### 最大输入长度 + +可通过 `maxlength` 属性设置输入框最大输入长度。`maxlength` 是原生属性。 + + + +
+ +### 输入字数统计 + +可通过 `show-word-limit` 属性设置是否显示输入字数统计,只在 type = "text" 或 type = "textarea" 时有效 + + + +
diff --git a/example/src/docs/zh-CN/input/max-min.md b/example/src/docs/zh-CN/input/max-min.md new file mode 100644 index 000000000..8845f07d6 --- /dev/null +++ b/example/src/docs/zh-CN/input/max-min.md @@ -0,0 +1,27 @@ +
+

+ +

+ +## Input 输入框 + + + +通过鼠标或键盘输入字符。 +
+ +### 最大值 + +可通过 `max` 属性设置输入框最大值。`max` 是原生属性。 + + + +
+ +### 最小值 + +可通过 `min` 属性设置输入框最小值。`min` 是原生属性。 + + + +
diff --git a/example/src/docs/zh-CN/input/placeholder.md b/example/src/docs/zh-CN/input/placeholder.md new file mode 100644 index 000000000..fcab29f66 --- /dev/null +++ b/example/src/docs/zh-CN/input/placeholder.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Input 输入框 + + + +通过鼠标或键盘输入字符。 +
+ +### 占位文本 + +可通过 `placeholder` 属性设置自定义输入框的占位文本内容。`placeholder` 是原生属性。 + + + +
diff --git a/example/src/docs/zh-CN/input/resize-textarea.md b/example/src/docs/zh-CN/input/resize-textarea.md new file mode 100644 index 000000000..0a993044c --- /dev/null +++ b/example/src/docs/zh-CN/input/resize-textarea.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Input 输入框 + + + +通过鼠标或键盘输入字符。 +
+ +### 可缩放文本域 + +可通过 `resize` 属性设置文本域的缩放。可选值:`none / both / horizontal / vertical`。注意:只在 `type="textarea"` 时有效。 + + + +
diff --git a/example/src/docs/zh-CN/input/show-password.md b/example/src/docs/zh-CN/input/show-password.md new file mode 100644 index 000000000..ee5887da9 --- /dev/null +++ b/example/src/docs/zh-CN/input/show-password.md @@ -0,0 +1,28 @@ +
+

+ +

+ +## Input 输入框 + + + +通过鼠标或键盘输入字符。 + +
+ +### 密码显示 + +当 `type` 为 `password` 时,可通过 `show-password` 属性设置输入框显示密码显示/隐藏切换图标按钮。 + + + +
+ +### type 属性 + +通对应的 type 属性,可以设置为对应的类型。默认为 text,可选值为 text,textarea 和其他 原生 input 的 type 值 + + + +
diff --git a/example/src/docs/zh-CN/input/step.md b/example/src/docs/zh-CN/input/step.md new file mode 100644 index 000000000..ced7815b5 --- /dev/null +++ b/example/src/docs/zh-CN/input/step.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Input 输入框 + + + +通过鼠标或键盘输入字符。 + +
+ +### 输入字段的合法数字间隔 + +可通过 `step` 属性设置输入字段的合法数字间隔。`step` 是原生属性。 + + + +
diff --git a/example/src/docs/zh-CN/input/textarea-limit-rows.md b/example/src/docs/zh-CN/input/textarea-limit-rows.md new file mode 100644 index 000000000..9e072912d --- /dev/null +++ b/example/src/docs/zh-CN/input/textarea-limit-rows.md @@ -0,0 +1,28 @@ +
+

+ +

+ +## Input 输入框 + + + +通过鼠标或键盘输入字符。 + +
+ +### 文本域行数 + +可通过 `rows` 属性设置文本域显示行数。注意:只在 `text="textarea"` 时有效。 + + + +
+ +### 文本域宽度 + +可通过 `cols` 属性设置文本域显示宽度。注意:只在 `text="textarea"` 时有效。 + + + +
diff --git a/example/src/docs/zh-CN/input/validate-event.md b/example/src/docs/zh-CN/input/validate-event.md new file mode 100644 index 000000000..79956b785 --- /dev/null +++ b/example/src/docs/zh-CN/input/validate-event.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Input 输入框 + + + +通过鼠标或键盘输入字符。 +
+ +### 输入时触发表单校验 + +可通过 `validate-event` 属性设置输入时触发表单校验。通过 `trigger` 配置触发校验规则的方式,为 `change` 时,当输入框值改变即触发校验,为 `blur` 时则失焦后触发校验。 + + + +
diff --git a/example/src/docs/zh-CN/ip-address/basic-usage.md b/example/src/docs/zh-CN/ip-address/basic-usage.md new file mode 100644 index 000000000..dd9dbbff6 --- /dev/null +++ b/example/src/docs/zh-CN/ip-address/basic-usage.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## IpAddress 输入框 + + + +IP 地址输入框与 HTML 原生的 IpAddress 组件保持一致,同时提供数据绑定功能。 +
+ +### 基本用法 + +可通过 `value` 设置默认值,`type` 配置 `IPv4` 类型或是 `IPv6` 类型,默认是 `IPv4`。 + + + +
+ + diff --git a/example/src/docs/zh-CN/ip-address/custom-delimiter.md b/example/src/docs/zh-CN/ip-address/custom-delimiter.md new file mode 100644 index 000000000..6bdf843c2 --- /dev/null +++ b/example/src/docs/zh-CN/ip-address/custom-delimiter.md @@ -0,0 +1,27 @@ +
+

+ +

+ +## IpAddress 输入框 + + + +IP 地址输入框与 HTML 原生的 IpAddress 组件保持一致,同时提供数据绑定功能。 +
+ +### IPv4 类型 + +可通过 `delimiter` 属性设置分隔符(图标类)。 + + + +
+ +### 默认插槽 + +可通过默认插槽设置分隔符。 + + + +
diff --git a/example/src/docs/zh-CN/ip-address/ipaddress-events.md b/example/src/docs/zh-CN/ip-address/ipaddress-events.md new file mode 100644 index 000000000..609ee4517 --- /dev/null +++ b/example/src/docs/zh-CN/ip-address/ipaddress-events.md @@ -0,0 +1,43 @@ +
+

+ +

+ +## IpAddress 输入框 + + + +IP 地址输入框与 HTML 原生的 IpAddress 组件保持一致,同时提供数据绑定功能。 +
+ +### focus 事件 + +文本框获取焦点时触发 `focus` 事件。 + + + +### blur 事件 + +文本框失去焦点时触发 `blur` 事件。 + + + +### input 事件 + +文本框内容输入时触发 `input` 事件。 + + + +### change 事件 + +文本框内容改变后触发 `change` 事件。 + + + +### select 事件 + +文本框内容选中时触发 `select` 事件。 + + + +
diff --git a/example/src/docs/zh-CN/ip-address/readonly.md b/example/src/docs/zh-CN/ip-address/readonly.md new file mode 100644 index 000000000..bff7ee9ef --- /dev/null +++ b/example/src/docs/zh-CN/ip-address/readonly.md @@ -0,0 +1,28 @@ +
+

+ +

+ +## IpAddress 输入框 + + + +IP 地址输入框与 HTML 原生的 IpAddress 组件保持一致,同时提供数据绑定功能。 + +
+ +### 文本只读 + +通过 `readonly` 属性设置文本的只读行,默认为 false 。 + + + +
+ +### 禁用 + +通过 `disabled` 属性设置文本是否禁用,默认为 false。 + + + +
diff --git a/example/src/docs/zh-CN/ip-address/size.md b/example/src/docs/zh-CN/ip-address/size.md new file mode 100644 index 000000000..4360226dd --- /dev/null +++ b/example/src/docs/zh-CN/ip-address/size.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## IpAddress 输入框 + + + +IP 地址输入框与 HTML 原生的 IpAddress 组件保持一致,同时提供数据绑定功能。 + +
+ +### 输入框大小 + +可设置为`medium`,`small`,`mini` + + + +
diff --git a/example/src/docs/zh-CN/ip-address/type.md b/example/src/docs/zh-CN/ip-address/type.md new file mode 100644 index 000000000..24940905b --- /dev/null +++ b/example/src/docs/zh-CN/ip-address/type.md @@ -0,0 +1,27 @@ +
+

+ +

+ +## IpAddress 输入框 + + + +IP 地址输入框与 HTML 原生的 IpAddress 组件保持一致,同时提供数据绑定功能。 +
+ +### IPv4 类型 + +可通过 `type` 属性配置 `IPv4` 类型,默认是 `IPv4`。 + + + +
+ +### IPv6 类型 + +可通过 `type`属性配置为 `IPv6` 类型,默认是 `IPv4`。 + + + +
diff --git a/example/src/docs/zh-CN/layout.md b/example/src/docs/zh-CN/layout.md new file mode 100644 index 000000000..9941952f3 --- /dev/null +++ b/example/src/docs/zh-CN/layout.md @@ -0,0 +1,64 @@ +
+

+ +

+ +## Layout 布局 + + + +采用栅格布局,可使布局方法变得非常简单与清晰。 + +
+ +Tiny 采用 12 栅格系统,将屏幕区域划分 12 等份,通过使用栅格系统可轻松应对大多数页面布局。 +另提供两个布局组件 Row 与 Col,配合使用使排版布局更高效。 +
+ +### 栅格布局 + +通过使用 `Row` , `Col` 组件的 `span` 属性实现栅格系统布局。 + + +
+ +### 间隔 + +通过设置 `Row` 组件的 `gutter` 属性来指定子元素之间的间隔。 + + + +
+ +### 对齐方式 + +通过设置 `flex` 属性为 `true` 来启用 flex 布局,并通过 `justify` 与 `align` 属性调整子元素的对齐方式。 + +:::tip 提示 +flex 布局存在 IE 兼容性问题,只能在 IE 10 以上运行。 +::: + + + +
+ +### 排序 + +在启用 `flex` 布局时,可通过设置 `Row` 组件的 `order` 属性,给带 `no` 属性的 `col`排序。 + +:::tip 提示 +flex 布局存在 IE 兼容性问题,只能在 IE 10 以上运行。 +::: + + + +
+ +### 偏移 + +通过设置 `Col` 组件的 `offset` 属性来指定分栏偏移的栏数。 + + +
+ + diff --git a/example/src/docs/zh-CN/layout/col.md b/example/src/docs/zh-CN/layout/col.md new file mode 100644 index 000000000..3239d88d9 --- /dev/null +++ b/example/src/docs/zh-CN/layout/col.md @@ -0,0 +1,61 @@ +
+

+ +

+ +## Col 列配置 + + + +定义 Layout 的列配置信息。 +
+ +### 基本用法 + + + +
+ +### 偏移 + +通过设置 `Col` 组件的 `offset` 属性来指定分栏偏移的栏数。 + + + +
+ +### 移动 + +通过设置 `Col` 组件的 `move` 属性来指定分栏偏移的栏数。 + + + +
+ +### 排序 + +:::tip 提示 +flex 布局存在 IE 兼容性问题,只能在 IE 10 以上运行。 +::: + + + +
+ +### 响应式布局 + +参照了 Bootstrap 的响应式设计,预设了五个响应尺寸:`xs`、`sm`、`md`、`lg` 和 `xl`。 + + + +
+ +### 自定义元素标签 + +可选任意标签。 + + + +
+ + diff --git a/example/src/docs/zh-CN/layout/row.md b/example/src/docs/zh-CN/layout/row.md new file mode 100644 index 000000000..433e831f3 --- /dev/null +++ b/example/src/docs/zh-CN/layout/row.md @@ -0,0 +1,61 @@ +
+

+ +

+ +## Row 行配置 + + + +定义 Layout 的行配置信息。 +
+ +### 垂直排列方式 + +通过使用 `Row` 组件的 `align` 属性实现 flex 布局下的垂直排列方式。 + + + +
+ +### 栅格间隔 + +通过使用 `Row` 组件的 `gutter` 属性实现栅格间隔。 + + + +
+ +### 取消栅格默认间隔 + +组件的 `gutter` 属性未设置或者设置为0时,栅格默认有左右内边距10px,可以通过 `no-space` 取消栅格默认间隔。 + + + +
+ +### 水平排列方式 + +通过使用 `Row` 组件的 `justify` 属性实现 flex 布局下的水平排列方式。 + + + +
+ +### 排序方式 + +通过使用 `Row` 组件的 `order` 属性实现 flex 布局下排序方式。 + + + +
+ +### 自定义元素标签 + +通过使用 `Row` 组件的 `tag` 属性实现自定义元素标签,可选任意标签。 + + + +
+ + diff --git a/example/src/docs/zh-CN/link-menu/basic-usage.md b/example/src/docs/zh-CN/link-menu/basic-usage.md new file mode 100644 index 000000000..d8304269f --- /dev/null +++ b/example/src/docs/zh-CN/link-menu/basic-usage.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## LinkMenu 收藏夹菜单 + + + +LinkMenu 收藏夹形式的菜单,支持可配置菜单项。 + +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/zh-CN/link-menu/custom-foot.md b/example/src/docs/zh-CN/link-menu/custom-foot.md new file mode 100644 index 000000000..ec52a8c60 --- /dev/null +++ b/example/src/docs/zh-CN/link-menu/custom-foot.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## LinkMenu 收藏夹菜单 + + + +LinkMenu 收藏夹形式的菜单,支持可配置菜单项。 +
+ +### 自定义菜单弹窗底部 + +通过 `foot` 插槽自定义菜单弹窗的底部内容。`sureNodevalue` 方法用于获取选中的菜单节点并关闭菜单弹窗,同时展示选中的菜单。`hideDialog` 方法用于关闭弹窗。插槽可结合这两个方法一起使用。 + + + +
diff --git a/example/src/docs/zh-CN/link-menu/custom-icon.md b/example/src/docs/zh-CN/link-menu/custom-icon.md new file mode 100644 index 000000000..dea2ee566 --- /dev/null +++ b/example/src/docs/zh-CN/link-menu/custom-icon.md @@ -0,0 +1,28 @@ +
+

+ +

+ +## LinkMenu 收藏夹菜单 + + + +LinkMenu 收藏夹形式的菜单,支持可配置菜单项。 + +
+ +### 自定义折叠展开图标 + +通过 `icon` 属性自定义折叠展开图标。通过 `search-icon` 属性自定义搜索图标。 + + + +
+ +### 菜单内容超长时省略显示 + +通过 `ellipsis` 属性设置菜单内容超长时省略显示。 + + + +
diff --git a/example/src/docs/zh-CN/link-menu/data-resource.md b/example/src/docs/zh-CN/link-menu/data-resource.md new file mode 100644 index 000000000..26ebc004e --- /dev/null +++ b/example/src/docs/zh-CN/link-menu/data-resource.md @@ -0,0 +1,36 @@ +
+

+ +

+ +## LinkMenu 收藏夹菜单 + + + +LinkMenu 收藏夹形式的菜单,支持可配置菜单项。 + +
+ +### 数据源 + +通过 `data` 属性设置菜单的数据源,同时在数据对象中可通过 `disabled` 设置该节点是否可被勾选。 + + + +
+ +### 收藏菜单标题 + +通过 `title` 属性设置收藏夹菜单的标题 + + + +
+ +### 菜单内容超长时换行显示 + +通过 `wrap` 属性设置收藏夹菜单的标题 + + + +
diff --git a/example/src/docs/zh-CN/link-menu/get-menu-data-sync.md b/example/src/docs/zh-CN/link-menu/get-menu-data-sync.md new file mode 100644 index 000000000..78732a01e --- /dev/null +++ b/example/src/docs/zh-CN/link-menu/get-menu-data-sync.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## LinkMenu 收藏夹菜单 + + + +LinkMenu 收藏夹形式的菜单,支持可配置菜单项。 +
+ +### 自定义菜单弹窗底部 + +通过 `get-menu-data-sync` 自定义菜单数据服务。 + + + +
diff --git a/example/src/docs/zh-CN/link-menu/menu-items.md b/example/src/docs/zh-CN/link-menu/menu-items.md new file mode 100644 index 000000000..b33a486bd --- /dev/null +++ b/example/src/docs/zh-CN/link-menu/menu-items.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## LinkMenu 收藏夹菜单 + + + +LinkMenu 收藏夹形式的菜单,支持可配置菜单项。 +
+ +### 可收藏栏目数 + +通过 `max-item` 属性指定可勾选并收藏的栏目数。指定 `default-expand-all` 为 false 时,打开菜单弹窗时所有节点为折叠状态。 + + + +
diff --git a/example/src/docs/zh-CN/link/basic-usage.md b/example/src/docs/zh-CN/link/basic-usage.md new file mode 100644 index 000000000..69c347fda --- /dev/null +++ b/example/src/docs/zh-CN/link/basic-usage.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Link 文字链接 + + + +文字超链接。 +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/zh-CN/link/config-href.md b/example/src/docs/zh-CN/link/config-href.md new file mode 100644 index 000000000..05c72d68d --- /dev/null +++ b/example/src/docs/zh-CN/link/config-href.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Link 文字链接 + + + +文字超链接。 +
+ +### 链接地址 + +通过属性 `href` 指定链接需要跳转的地址,可配合原生属性 `target` 一起使用。 + + + +
diff --git a/example/src/docs/zh-CN/link/custom-icon.md b/example/src/docs/zh-CN/link/custom-icon.md new file mode 100644 index 000000000..2c433436d --- /dev/null +++ b/example/src/docs/zh-CN/link/custom-icon.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Link 文字链接 + + + +文字超链接。 +
+ +### 自定义图标 + +通过属性 `icon`、默认插槽、`icon` 插槽都可以自定义图标。 + + + +
diff --git a/example/src/docs/zh-CN/link/dynamic-disable.md b/example/src/docs/zh-CN/link/dynamic-disable.md new file mode 100644 index 000000000..61a82b879 --- /dev/null +++ b/example/src/docs/zh-CN/link/dynamic-disable.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Link 文字链接 + + + +文字超链接。 +
+ +### 基本用法 + +通过 `disabled` 属性可以指定是否禁用链接。 + + + +
diff --git a/example/src/docs/zh-CN/link/focus-no-underline.md b/example/src/docs/zh-CN/link/focus-no-underline.md new file mode 100644 index 000000000..3ff356608 --- /dev/null +++ b/example/src/docs/zh-CN/link/focus-no-underline.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Link 文字链接 + + + +文字超链接。 +
+ +### 聚焦时不显示下划线 + +鼠标悬停在链接上时,默认会显示下划线,设置 `underline` 为 false 后聚焦时不显示下划线。 + + + +
diff --git a/example/src/docs/zh-CN/link/link-style.md b/example/src/docs/zh-CN/link/link-style.md new file mode 100644 index 000000000..102bc0461 --- /dev/null +++ b/example/src/docs/zh-CN/link/link-style.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Link 文字链接 + + + +文字超链接。 +
+ +### 主题样式 + +通过 `type` 属性设置链接的主题类型。 + + + +
diff --git a/example/src/docs/zh-CN/loading/basic-usage.md b/example/src/docs/zh-CN/loading/basic-usage.md new file mode 100644 index 000000000..77b324af6 --- /dev/null +++ b/example/src/docs/zh-CN/loading/basic-usage.md @@ -0,0 +1,23 @@ +
+

+ +

+ +## Loading 加载 + + + +加载数据时显示的动画效果。 + +
+
+ +### 基本用法 + +通过静态方法 `Loading.service` 在指定 `target` 上设置加载。 + + + +
+ + diff --git a/example/src/docs/zh-CN/loading/body-lock.md b/example/src/docs/zh-CN/loading/body-lock.md new file mode 100644 index 000000000..89afc3c27 --- /dev/null +++ b/example/src/docs/zh-CN/loading/body-lock.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Loading 加载 + + + +加载数据时显示的动画效果。 + +
+
+ +### 修饰符 + + + +
diff --git a/example/src/docs/zh-CN/loading/custom-background.md b/example/src/docs/zh-CN/loading/custom-background.md new file mode 100644 index 000000000..477664ca3 --- /dev/null +++ b/example/src/docs/zh-CN/loading/custom-background.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Loading 加载 + + + +加载数据时显示的动画效果。 + +
+
+ +### 自定义遮罩背景色 + +通过 `background` 自定义背景颜色和透明度。 + + + +
diff --git a/example/src/docs/zh-CN/loading/custom-class.md b/example/src/docs/zh-CN/loading/custom-class.md new file mode 100644 index 000000000..7bb7cd9bf --- /dev/null +++ b/example/src/docs/zh-CN/loading/custom-class.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Loading 加载 + + + +加载数据时显示的动画效果。 + +
+
+ +### 自定义样式 + +通过 `customClass` 指定类名进行样式修改。 + + + +
diff --git a/example/src/docs/zh-CN/loading/custom-loading-target.md b/example/src/docs/zh-CN/loading/custom-loading-target.md new file mode 100644 index 000000000..05bdf6270 --- /dev/null +++ b/example/src/docs/zh-CN/loading/custom-loading-target.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Loading 加载 + + + +加载数据时显示的动画效果。 + +
+
+ +### 区域加载 + +通过 `target` 指定 Loading 需要覆盖的 DOM 节点。 + + + +
diff --git a/example/src/docs/zh-CN/loading/custom-spinner.md b/example/src/docs/zh-CN/loading/custom-spinner.md new file mode 100644 index 000000000..fc2fc6bcd --- /dev/null +++ b/example/src/docs/zh-CN/loading/custom-spinner.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Loading 加载 + + + +加载数据时显示的动画效果。 + +
+
+ +### 自定义加载图标 + +通过 `spinner` 自定义加载图标。 + + + +
diff --git a/example/src/docs/zh-CN/loading/fullscreen-loading.md b/example/src/docs/zh-CN/loading/fullscreen-loading.md new file mode 100644 index 000000000..f1c82d78d --- /dev/null +++ b/example/src/docs/zh-CN/loading/fullscreen-loading.md @@ -0,0 +1,23 @@ +
+

+ +

+ +## Loading 加载 + + + +加载数据时显示的动画效果。 + +
+
+ +### 全局加载 + +通过 `v-loading.lock.fullscreen` 指令方式或者服务方式进行全局加载,如需使用指令方式全局加载需要如下操作: +在 `Vue 2` 版本环境中添加 `Vue.use(Loading)` +在 `Vue 3` 版本环境中添加 `app.use(Loading)` + + + +
diff --git a/example/src/docs/zh-CN/loading/loading-tip-text.md b/example/src/docs/zh-CN/loading/loading-tip-text.md new file mode 100644 index 000000000..3f86f44b8 --- /dev/null +++ b/example/src/docs/zh-CN/loading/loading-tip-text.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Loading 加载 + + + +加载数据时显示的动画效果。 + +
+
+ +### 自定义加载提示文本 + +通过 `text` 自定义加载文字的提示文本。 + + + +
diff --git a/example/src/docs/zh-CN/milestone/basic-usage.md b/example/src/docs/zh-CN/milestone/basic-usage.md new file mode 100644 index 000000000..b163bef9a --- /dev/null +++ b/example/src/docs/zh-CN/milestone/basic-usage.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Milestone + + + +里程碑模式是一个高度定制化的组件,用户可以自定义组件的状态,节点颜色,线条颜色等。支持在节点间插入活动旗子,tip 显示活动信息。 +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/zh-CN/milestone/custom-bottom.md b/example/src/docs/zh-CN/milestone/custom-bottom.md new file mode 100644 index 000000000..691206251 --- /dev/null +++ b/example/src/docs/zh-CN/milestone/custom-bottom.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Milestone + + + +里程碑模式是一个高度定制化的组件,用户可以自定义组件的状态,节点颜色,线条颜色等。支持在节点间插入活动旗子,tip 显示活动信息。 +
+ +### 自定义节点下方内容 + +通过 `bottom` 作用域插槽可自定义节点下方的内容。 + + + +
diff --git a/example/src/docs/zh-CN/milestone/custom-flag.md b/example/src/docs/zh-CN/milestone/custom-flag.md new file mode 100644 index 000000000..fb61846b1 --- /dev/null +++ b/example/src/docs/zh-CN/milestone/custom-flag.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Milestone + + + +里程碑模式是一个高度定制化的组件,用户可以自定义组件的状态,节点颜色,线条颜色等。支持在节点间插入活动旗子,tip 显示活动信息。 +
+ +### 自定义旗帜内容 + +通过 `flag` 作用域插槽可自定义节点旗帜的内容。 + + + +
diff --git a/example/src/docs/zh-CN/milestone/custom-icon-slot.md b/example/src/docs/zh-CN/milestone/custom-icon-slot.md new file mode 100644 index 000000000..1a1eea6bb --- /dev/null +++ b/example/src/docs/zh-CN/milestone/custom-icon-slot.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Milestone + + + +里程碑模式是一个高度定制化的组件,用户可以自定义组件的状态,节点颜色,线条颜色等。支持在节点间插入活动旗子,tip 显示活动信息。 +
+ +### 自定义节点下方内容 + +通过 `icon` 作用域插槽可自定义图标。 + + + +
diff --git a/example/src/docs/zh-CN/milestone/custom-top.md b/example/src/docs/zh-CN/milestone/custom-top.md new file mode 100644 index 000000000..a91157bea --- /dev/null +++ b/example/src/docs/zh-CN/milestone/custom-top.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Milestone + + + +里程碑模式是一个高度定制化的组件,用户可以自定义组件的状态,节点颜色,线条颜色等。支持在节点间插入活动旗子,tip 显示活动信息。 +
+ +### 自定义节点上方内容 + +通过 `top` 作用域插槽可自定义节点上方的内容。 + + + +
diff --git a/example/src/docs/zh-CN/milestone/data-field-mapping.md b/example/src/docs/zh-CN/milestone/data-field-mapping.md new file mode 100644 index 000000000..39aca2c8a --- /dev/null +++ b/example/src/docs/zh-CN/milestone/data-field-mapping.md @@ -0,0 +1,28 @@ +
+

+ +

+ +## Milestone + + + +里程碑模式是一个高度定制化的组件,用户可以自定义组件的状态,节点颜色,线条颜色等。支持在节点间插入活动旗子,tip 显示活动信息。 +
+ +### 数据字段映射 + +:::tip 数据字段映射属性说明 +`completed-field`:设置里程碑完成状态对应的取值,默认为 `completed` +`flag-content-field`:设置节点旗子数据中描述对应的字段名,默认为 `content` +`flag-field`:设置节点信息中旗子数据所在字段名,默认为 `flags` +`flag-name-field`:设置节点旗子数据中名称对应的字段名,默认为 `name` +`flag-status-field`:设置节点旗子数据中状态对应的字段名,默认为 `status` +`name-field`:设置节点信息中名称对应的字段名,默认为 `name` +`status-field`:设置数据状态对应的字段名,默认为 `status` +`time-field`:设置节点时间信息对应的字段名,默认为 `time` +::: + + + +
diff --git a/example/src/docs/zh-CN/milestone/data-source.md b/example/src/docs/zh-CN/milestone/data-source.md new file mode 100644 index 000000000..21a6e96be --- /dev/null +++ b/example/src/docs/zh-CN/milestone/data-source.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Milestone + + + +里程碑模式是一个高度定制化的组件,用户可以自定义组件的状态,节点颜色,线条颜色等。支持在节点间插入活动旗子,tip 显示活动信息。 +
+ +### 数据源 + +通过 `data` 属性设置里程碑数据。 + + + +
diff --git a/example/src/docs/zh-CN/milestone/flag-before.md b/example/src/docs/zh-CN/milestone/flag-before.md new file mode 100644 index 000000000..ca5c1e607 --- /dev/null +++ b/example/src/docs/zh-CN/milestone/flag-before.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Milestone + + + +里程碑模式是一个高度定制化的组件,用户可以自定义组件的状态,节点颜色,线条颜色等。支持在节点间插入活动旗子,tip 显示活动信息。 +
+ +### 旗帜数据来源前面节点 + +通过 `flag-before` 可设置里程碑上活动(即旗子)上的数据从前面还是后面节点上获取,默认为 `false` 取后面节点上的数据。 + + + +
diff --git a/example/src/docs/zh-CN/milestone/line-style.md b/example/src/docs/zh-CN/milestone/line-style.md new file mode 100644 index 000000000..c3f7d3433 --- /dev/null +++ b/example/src/docs/zh-CN/milestone/line-style.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Milestone + + + +里程碑模式是一个高度定制化的组件,用户可以自定义组件的状态,节点颜色,线条颜色等。支持在节点间插入活动旗子,tip 显示活动信息。 +
+ +### 进度条颜色 + +通过 `line-style` 属性设置线条颜色。 + + + +
diff --git a/example/src/docs/zh-CN/milestone/milestone-events.md b/example/src/docs/zh-CN/milestone/milestone-events.md new file mode 100644 index 000000000..bea9f8c8a --- /dev/null +++ b/example/src/docs/zh-CN/milestone/milestone-events.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Milestone + + + +里程碑模式是一个高度定制化的组件,用户可以自定义组件的状态,节点颜色,线条颜色等。支持在节点间插入活动旗子,tip 显示活动信息。 +
+ +### 事件 + +单击里程碑节点时触发 `click` 事件,参数(index:节点索引, node:节点数据信息)。单击里程碑旗帜时触发 `flagclick` 事件,参数(index:节点内旗子的索引, node:节点上旗子的数据信息)。 + + + +
diff --git a/example/src/docs/zh-CN/milestone/milestone-space.md b/example/src/docs/zh-CN/milestone/milestone-space.md new file mode 100644 index 000000000..526951d59 --- /dev/null +++ b/example/src/docs/zh-CN/milestone/milestone-space.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Milestone + + + +里程碑模式是一个高度定制化的组件,用户可以自定义组件的状态,节点颜色,线条颜色等。支持在节点间插入活动旗子,tip 显示活动信息。 +
+ +### 宽度 + +通过 `space` 属性设置步骤条的宽度。 + + + +
diff --git a/example/src/docs/zh-CN/milestone/milestones-status.md b/example/src/docs/zh-CN/milestone/milestones-status.md new file mode 100644 index 000000000..dd9a63a9f --- /dev/null +++ b/example/src/docs/zh-CN/milestone/milestones-status.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## Milestone + + + +里程碑模式是一个高度定制化的组件,用户可以自定义组件的状态,节点颜色,线条颜色等。支持在节点间插入活动旗子,tip 显示活动信息。 +
+ +### 状态与颜色对应关系 + +`milestones-status` 属性对象中,键对应 `data` 属性的数据中的 `status` 字段,然后控制不同状态与颜色的对应关系。 + + +
diff --git a/example/src/docs/zh-CN/milestone/show-number.md b/example/src/docs/zh-CN/milestone/show-number.md new file mode 100644 index 000000000..64d7eaa09 --- /dev/null +++ b/example/src/docs/zh-CN/milestone/show-number.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Milestone + + + +里程碑模式是一个高度定制化的组件,用户可以自定义组件的状态,节点颜色,线条颜色等。支持在节点间插入活动旗子,tip 显示活动信息。 +
+ +### 取消未完成状态序号显示 + +设置 `show-number` 为 false 后,里程碑未完成的节点上将不显示序号,默认为 true 。 + + + +
diff --git a/example/src/docs/zh-CN/milestone/solid-style.md b/example/src/docs/zh-CN/milestone/solid-style.md new file mode 100644 index 000000000..913845412 --- /dev/null +++ b/example/src/docs/zh-CN/milestone/solid-style.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Milestone + + + +里程碑模式是一个高度定制化的组件,用户可以自定义组件的状态,节点颜色,线条颜色等。支持在节点间插入活动旗子,tip 显示活动信息。 +
+ +### 已完成节点实心显示 + +通过设置 `solid` 属性为 true 可设置已经完成节点显示为实心,且光晕不透明,默认为 false 。 + + + +
diff --git a/example/src/docs/zh-CN/milestone/start-index.md b/example/src/docs/zh-CN/milestone/start-index.md new file mode 100644 index 000000000..0551e61e9 --- /dev/null +++ b/example/src/docs/zh-CN/milestone/start-index.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Milestone + + + +里程碑模式是一个高度定制化的组件,用户可以自定义组件的状态,节点颜色,线条颜色等。支持在节点间插入活动旗子,tip 显示活动信息。 +
+ +### 序号起始值 + +通过 `start` 属性设置里程碑节点的序号起始值,默认为 -1 。 + + + +
diff --git a/example/src/docs/zh-CN/modal/basic-usage.md b/example/src/docs/zh-CN/modal/basic-usage.md new file mode 100644 index 000000000..3cf51e8eb --- /dev/null +++ b/example/src/docs/zh-CN/modal/basic-usage.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Modal 模态框 + + +
+ +### 基本用法 + +可通过 `Modal.alert` 方法设置弹出框,通过 `Modal.confirm` 方法设置确认弹出框。 + + + +
+ + diff --git a/example/src/docs/zh-CN/modal/is-form-reset.md b/example/src/docs/zh-CN/modal/is-form-reset.md new file mode 100644 index 000000000..b7a45e6a3 --- /dev/null +++ b/example/src/docs/zh-CN/modal/is-form-reset.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Modal 模态框 + + +
+ +### 模态框弹出表单 + +模态框弹出表单,关闭模态框的时候,默认重置表单,设置 `is-form-reset` 为false,则关闭模态框的时候不重置表单 + + + +
diff --git a/example/src/docs/zh-CN/modal/modal-duration.md b/example/src/docs/zh-CN/modal/modal-duration.md new file mode 100644 index 000000000..4c051b861 --- /dev/null +++ b/example/src/docs/zh-CN/modal/modal-duration.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Modal 模态框 + + +
+ +### 自动关闭延时 + +可通过 `duration` 属性设置自动关闭的延迟时间,只对 type=message 有效。 + + + +
diff --git a/example/src/docs/zh-CN/modal/modal-esc-closable.md b/example/src/docs/zh-CN/modal/modal-esc-closable.md new file mode 100644 index 000000000..4475d4554 --- /dev/null +++ b/example/src/docs/zh-CN/modal/modal-esc-closable.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Modal 模态框 + + +
+ +### 按 Esc 键关闭弹出框 + +可通过 `esc-closable` 属性设置是否允许按 Esc 键关闭窗口,默认为 `false`。 + + + +
diff --git a/example/src/docs/zh-CN/modal/modal-event.md b/example/src/docs/zh-CN/modal/modal-event.md new file mode 100644 index 000000000..8534d703a --- /dev/null +++ b/example/src/docs/zh-CN/modal/modal-event.md @@ -0,0 +1,57 @@ +
+

+ +

+ +## Modal 模态框 + + +
+ +### 取消按钮事件 + +点击取消按钮时触发 `cancel` 事件。 + + + +
+ +### 关闭按钮事件 + +点击关闭按钮时会触发 `close` 事件。 + + + +
+ +### 确定按钮事件 + +点击确定按钮时会触发 `confirm` 事件。 + + + +
+ +### 窗口关闭事件 + +窗口关闭时会触发 `hide` 事件。 + + + +
+ +### 窗口显示事件 + +在窗口显示时会触发 `show` 事件。 + + + +
+ +### 窗口缩放事件 + +窗口缩放时会触发 `zoom` 事件。 + + + +
diff --git a/example/src/docs/zh-CN/modal/modal-fullscreen.md b/example/src/docs/zh-CN/modal/modal-fullscreen.md new file mode 100644 index 000000000..59fa4c69c --- /dev/null +++ b/example/src/docs/zh-CN/modal/modal-fullscreen.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Modal 模态框 + + +
+ +### 最大化显示 + +可通过 `fullscreen` 属性设置是否最大化显示。 + + + +
diff --git a/example/src/docs/zh-CN/modal/modal-id.md b/example/src/docs/zh-CN/modal/modal-id.md new file mode 100644 index 000000000..309c27dbc --- /dev/null +++ b/example/src/docs/zh-CN/modal/modal-id.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Modal 模态框 + + +
+ +### 防止重复提示 + +如果不想窗口重复点击,可以设置唯一的 `id` 防止重复提示,只对 type=message 有效。 + + + +
diff --git a/example/src/docs/zh-CN/modal/modal-lock-scroll.md b/example/src/docs/zh-CN/modal/modal-lock-scroll.md new file mode 100644 index 000000000..e0e6a34bb --- /dev/null +++ b/example/src/docs/zh-CN/modal/modal-lock-scroll.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Modal 模态框 + + +
+ +### 锁住滚动条 + +可通过 `lock-scroll` 属性设置是否锁住滚动条,不允许页面滚动。 + + + +
diff --git a/example/src/docs/zh-CN/modal/modal-lock-view.md b/example/src/docs/zh-CN/modal/modal-lock-view.md new file mode 100644 index 000000000..07e6b8647 --- /dev/null +++ b/example/src/docs/zh-CN/modal/modal-lock-view.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Modal 模态框 + + +
+ +### 锁住页面 + +可通过 `lock-view` 属性设置是否锁住页面,不允许窗口之外的任何操作。 + + + +
diff --git a/example/src/docs/zh-CN/modal/modal-mask-closable.md b/example/src/docs/zh-CN/modal/modal-mask-closable.md new file mode 100644 index 000000000..4b4308569 --- /dev/null +++ b/example/src/docs/zh-CN/modal/modal-mask-closable.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Modal 模态框 + + +
+ +### 点击遮罩层关闭窗口 + +可通过 `mask-closable` 属性设置是否允许点击遮罩层关闭窗口。 + + + +
diff --git a/example/src/docs/zh-CN/modal/modal-mask.md b/example/src/docs/zh-CN/modal/modal-mask.md new file mode 100644 index 000000000..ca48f4f2b --- /dev/null +++ b/example/src/docs/zh-CN/modal/modal-mask.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Modal 模态框 + + +
+ +### 显示遮罩层 + +可通过 `mask` 属性设置是否显示遮罩层,默认为 `true`。 + + + +
diff --git a/example/src/docs/zh-CN/modal/modal-message.md b/example/src/docs/zh-CN/modal/modal-message.md new file mode 100644 index 000000000..29d9e5118 --- /dev/null +++ b/example/src/docs/zh-CN/modal/modal-message.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Modal 模态框 + + +
+ +### 自定义内容 + +可通过 `message` 属性设置窗口的内容。 + + + +
diff --git a/example/src/docs/zh-CN/modal/modal-resize.md b/example/src/docs/zh-CN/modal/modal-resize.md new file mode 100644 index 000000000..feb63cc3b --- /dev/null +++ b/example/src/docs/zh-CN/modal/modal-resize.md @@ -0,0 +1,34 @@ +
+

+ +

+ +## Modal 模态框 + + + +
+ +### 调整窗口大小 + +可通过和`width`和`height`设置窗口的宽高,而通过 `resize` 设置是否允许拖动调整窗口大小。 + + + +
+ +### 调整窗口大小后窗口显示的最小宽度 + +配置 `resize` 可拖拽属性为 `true`后,可通过 `min-width` 属性设置拖拽后窗口的最小宽度。 + + + +
+ +### 调整窗口大小后窗口显示的最小高度 + +配置 `resize` 可拖拽属性为 `true`后,可通过 `min-height` 属性设置拖拽后窗口的最小高度。 + + + +
diff --git a/example/src/docs/zh-CN/modal/modal-showFooter.md b/example/src/docs/zh-CN/modal/modal-showFooter.md new file mode 100644 index 000000000..d8548fe39 --- /dev/null +++ b/example/src/docs/zh-CN/modal/modal-showFooter.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Modal 模态框 + + +
+ +### 不显示底部 + +可通过 `showFooter` 属性设置是否显示底部,默认为 `true`。 + + + +
diff --git a/example/src/docs/zh-CN/modal/modal-showHeader.md b/example/src/docs/zh-CN/modal/modal-showHeader.md new file mode 100644 index 000000000..23d08c601 --- /dev/null +++ b/example/src/docs/zh-CN/modal/modal-showHeader.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Modal 模态框 + + +
+ +### 不显示头部 + +可通过 `showHeader` 属性设置是否显示头部,默认为 `true`。 + + + +
diff --git a/example/src/docs/zh-CN/modal/modal-slots.md b/example/src/docs/zh-CN/modal/modal-slots.md new file mode 100644 index 000000000..c55a447be --- /dev/null +++ b/example/src/docs/zh-CN/modal/modal-slots.md @@ -0,0 +1,34 @@ +
+

+ +

+ +## Modal 模态框 + + + +
+ +### 默认插槽 + +可通过 `templete` 设置默认插槽。 + + + +
+ +### 底部插槽 + +可通过 `slot="footer"` 设置底部插槽。 + + + +
+ +### 嵌套 grid + +可通过插槽嵌套 grid + + + +
diff --git a/example/src/docs/zh-CN/modal/modal-status.md b/example/src/docs/zh-CN/modal/modal-status.md new file mode 100644 index 000000000..5c5baeb13 --- /dev/null +++ b/example/src/docs/zh-CN/modal/modal-status.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Modal 模态框 + + +
+ +### 消息状态 + +可通过 `status` 属性设置消息状态,可选值有 `info | success | warning | error | loading`。 + + + +
diff --git a/example/src/docs/zh-CN/modal/modal-title.md b/example/src/docs/zh-CN/modal/modal-title.md new file mode 100644 index 000000000..51721c642 --- /dev/null +++ b/example/src/docs/zh-CN/modal/modal-title.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Modal 模态框 + + +
+ +### 标题 + +可通过 `title` 属性设置窗口的标题。 + + + +
diff --git a/example/src/docs/zh-CN/modal/modal-top.md b/example/src/docs/zh-CN/modal/modal-top.md new file mode 100644 index 000000000..d74164207 --- /dev/null +++ b/example/src/docs/zh-CN/modal/modal-top.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Modal 模态框 + + +
+ +### 距离顶部的位置 + +可通过 `top` 属性设置消息距离顶部的位置,只对 type=message 有效。 + + + +
diff --git a/example/src/docs/zh-CN/modal/modal-type.md b/example/src/docs/zh-CN/modal/modal-type.md new file mode 100644 index 000000000..88d17c24f --- /dev/null +++ b/example/src/docs/zh-CN/modal/modal-type.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Modal 模态框 + + +
+ +### 窗口类型 + +可通过 `type` 属性设置窗口类型,可选值 `alert | confirm | message`。 + + + +
diff --git a/example/src/docs/zh-CN/modal/modal-value.md b/example/src/docs/zh-CN/modal/modal-value.md new file mode 100644 index 000000000..56890d4d0 --- /dev/null +++ b/example/src/docs/zh-CN/modal/modal-value.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Modal 模态框 + + +
+ +### 绑定值 + +可通过 `value/v-model` 属性绑定值。 + + + +
diff --git a/example/src/docs/zh-CN/modal/modal-zIndex.md b/example/src/docs/zh-CN/modal/modal-zIndex.md new file mode 100644 index 000000000..d498b1a13 --- /dev/null +++ b/example/src/docs/zh-CN/modal/modal-zIndex.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Modal 模态框 + + +
+ +### 自定义堆叠顺序 + +可通过 `zIndex` 属性设置自定义堆叠顺序(对于某些特殊场景,比如被遮挡时可能会用到)。 + + + +
diff --git a/example/src/docs/zh-CN/nav-menu/basic-usage.md b/example/src/docs/zh-CN/nav-menu/basic-usage.md new file mode 100644 index 000000000..df384ff36 --- /dev/null +++ b/example/src/docs/zh-CN/nav-menu/basic-usage.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## NavMenu 导航菜单 + + + +NavMenu 导航菜单,主要用于定义页面顶部导航的菜单。 +
+ +### 基本用法 + +通过 `data` 属性配置菜单数据,若不配置默认读取后台服务,比如 Jalor 6,读取 services/jalor/web/support/workspace/current 服务的 leftMenuNode 数据。 + + + +
+ + diff --git a/example/src/docs/zh-CN/nav-menu/before-skip.md b/example/src/docs/zh-CN/nav-menu/before-skip.md new file mode 100644 index 000000000..127cf6591 --- /dev/null +++ b/example/src/docs/zh-CN/nav-menu/before-skip.md @@ -0,0 +1,27 @@ +
+

+ +

+ +## NavMenu 导航菜单 + + + +NavMenu 导航菜单,主要用于定义页面顶部导航的菜单。 +
+ +### 菜单跳转处理 + +提供 `before-skip` 钩子函数,用于菜单点击跳转前处理相关逻辑,返回 `false` 将无法跳转。 + + + +
+ +### 使用组件默认服务时,菜单跳转处理 + +如果使用组件的默认服务 `/workspace/current` 获取菜单数据 `response.data.leftMenuNode.children`,那么在使用 `before-skip` 时,需配置属性 `prevent`,用来阻止默认的跳转行为。属性 `prevent` 默认值为 `false`。 + + + +
diff --git a/example/src/docs/zh-CN/nav-menu/custom-service.md b/example/src/docs/zh-CN/nav-menu/custom-service.md new file mode 100644 index 000000000..ad0c3d1dc --- /dev/null +++ b/example/src/docs/zh-CN/nav-menu/custom-service.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## NavMenu 导航菜单 + + + +NavMenu 导航菜单,主要用于定义页面顶部导航的菜单。 +
+ +### 自定义服务 + +通过 `fetch-menu-data` 可以自定义菜单服务,若数据中字段不是默认的 `title`、`url`,则可以通过 `fields` 对数据中的字段进行映射。 + + + +
diff --git a/example/src/docs/zh-CN/nav-menu/data-resource.md b/example/src/docs/zh-CN/nav-menu/data-resource.md new file mode 100644 index 000000000..f862ac382 --- /dev/null +++ b/example/src/docs/zh-CN/nav-menu/data-resource.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## NavMenu 导航菜单 + + + +NavMenu 导航菜单,主要用于定义页面顶部导航的菜单。 +
+ +### 数据源 + +通过 `data` 属性配置菜单数据。 + + + +
diff --git a/example/src/docs/zh-CN/nav-menu/overflow.md b/example/src/docs/zh-CN/nav-menu/overflow.md new file mode 100644 index 000000000..c8dcc63cc --- /dev/null +++ b/example/src/docs/zh-CN/nav-menu/overflow.md @@ -0,0 +1,26 @@ +
+

+ +

+ +## NavMenu 导航菜单 + + + +NavMenu 导航菜单,主要用于定义页面顶部导航的菜单。 +
+ +### 显示策略 + +当一级菜单无法在当前菜单容器里显示完全时,可以通过 `overflow` 属性配置显示策略,共有 `auto`、`retract`、`fixed`、`hidden` 4个选项,默认为 `auto`。 + +::: tip overflow 选项说明 +auto:菜单栏右侧显示 `更多` 菜单,鼠标悬停该菜单时,将显示剩余未展示的菜单。 +fixed:菜单栏左侧显示 `三明治折叠/展开` 图标,鼠标悬停该图标时,将显示所有菜单。 +retract:菜单栏不显示任何菜单,只显示 `三明治折叠/展开` 图标,鼠标悬停该图标时,将显示所有菜单。 +hidden:剩余未展示的菜单隐藏不显示。 +::: + + + +
diff --git a/example/src/docs/zh-CN/nav-menu/slot-logo.md b/example/src/docs/zh-CN/nav-menu/slot-logo.md new file mode 100644 index 000000000..6937a87c5 --- /dev/null +++ b/example/src/docs/zh-CN/nav-menu/slot-logo.md @@ -0,0 +1,27 @@ +
+

+ +

+ +## NavMenu 导航菜单 + + + +NavMenu 导航菜单,主要用于定义页面顶部导航的菜单。 +
+ +### Toolbar 插槽 + +提供 `toolbar` 插槽用于自定义 Toolbar 。 + + + +
+ +### Logo 插槽 + +提供 `logo` 插槽用于自定义 Logo 。 + + + +
diff --git a/example/src/docs/zh-CN/notify/basic-usage.md b/example/src/docs/zh-CN/notify/basic-usage.md new file mode 100644 index 000000000..83f3ba542 --- /dev/null +++ b/example/src/docs/zh-CN/notify/basic-usage.md @@ -0,0 +1,31 @@ +
+

+ +

+ +## Notify 通知 + + + +
+ +### 属性列表 + +| 名称 | 类型 | 描述 | 默认值 | +| ----------- | ------------------ | ---------------------------------------------------- | ------------- | +| type | String | 通知消息类型,可选值为 info、success、warning、error | info | +| title | [String, Function] | 通知消息标题,可用 jsx 定制 | undefined | +| message | [String, Function] | 通知消息文本,可用 jsx 定制 | undefined | +| position | String | 通知显示位置,可选值为 top-right、bottom-right | bottom-right | +| duration | Number | 自动关闭延时毫秒数 | 4500 | +| customClass | [String, Object] | 自定义样式类 | undefined | +| showClose | Boolean | 是否显示关闭按钮 | true | +| showIcon | Boolean | 是否显示类型图标 | true | +| closeIcon | Object | 关闭图标组件对象 | IconClose | +| statusIcon | Object | 类型图标组件对象 | IconInfoSolid | +| beforeClose | () => Boolean | 关闭前回调方法,返回 false 可阻止关闭 | undefined | +| onClose | Function | 关闭回调 | undefined | + + + +
diff --git a/example/src/docs/zh-CN/numeric/about-step.md b/example/src/docs/zh-CN/numeric/about-step.md new file mode 100644 index 000000000..6a8965a7f --- /dev/null +++ b/example/src/docs/zh-CN/numeric/about-step.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Numeric 计数器 + + + +Numeric 计数器可用于输入数字,可自定义数值范围,步进大小。支持鼠标键盘增减。 +
+ +### 步长 + +可通过 `step` 属性设置计数器的步长。 + + + +
diff --git a/example/src/docs/zh-CN/numeric/allow-empty.md b/example/src/docs/zh-CN/numeric/allow-empty.md new file mode 100644 index 000000000..081a791b8 --- /dev/null +++ b/example/src/docs/zh-CN/numeric/allow-empty.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Numeric 计数器 + + + +Numeric 计数器可用于输入数字,可自定义数值范围,步进大小。支持鼠标键盘增减。 +
+ +### 步长 + +可通过 `allow-empty` 属性设置计数器内容的可清空特性。默认为 `false`,表示不可清空。 + + + +
diff --git a/example/src/docs/zh-CN/numeric/basic-usage.md b/example/src/docs/zh-CN/numeric/basic-usage.md new file mode 100644 index 000000000..a95b289ba --- /dev/null +++ b/example/src/docs/zh-CN/numeric/basic-usage.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Numeric 计数器 + + + +Numeric 计数器可用于输入数字,可自定义数值范围,步进大小。支持鼠标键盘增减。 +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/zh-CN/numeric/calculate-according-to-num-of-goods.md b/example/src/docs/zh-CN/numeric/calculate-according-to-num-of-goods.md new file mode 100644 index 000000000..487c726a3 --- /dev/null +++ b/example/src/docs/zh-CN/numeric/calculate-according-to-num-of-goods.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Numeric 计数器 + + + +Numeric 计数器可用于输入数字,可自定义数值范围,步进大小。支持鼠标键盘增减。 +
+ +### 示例 + +根据商品数量自动计算价格。 + + + +
diff --git a/example/src/docs/zh-CN/numeric/controls.md b/example/src/docs/zh-CN/numeric/controls.md new file mode 100644 index 000000000..667ce1159 --- /dev/null +++ b/example/src/docs/zh-CN/numeric/controls.md @@ -0,0 +1,44 @@ +
+

+ +

+ +## Numeric 计数器 + + + +Numeric 计数器可用于输入数字,可自定义数值范围,步进大小。支持鼠标键盘增减。 + +
+ +### 控制按钮 + +可通过 `controls` 属性设置计数器是否有控制按钮。 + + + +
+ +### 控制按钮显示位置 + +可通过 `controls-position` 属性设置控制按钮显示的位置。 + + + +
+ +### 关联文字 + +可通过 `label` 属性设置输入框的关联文字。 + + + +
+ +### name + +可通过 `name` 属性设置原生属性。 + + + +
diff --git a/example/src/docs/zh-CN/numeric/dynamic-disabled.md b/example/src/docs/zh-CN/numeric/dynamic-disabled.md new file mode 100644 index 000000000..faa72cb4c --- /dev/null +++ b/example/src/docs/zh-CN/numeric/dynamic-disabled.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Numeric 计数器 + + + +Numeric 计数器可用于输入数字,可自定义数值范围,步进大小。支持鼠标键盘增减。 +
+ +### 禁用 + +通过设置 disabled 控制是否禁用计数器 + + + +
diff --git a/example/src/docs/zh-CN/numeric/max-min.md b/example/src/docs/zh-CN/numeric/max-min.md new file mode 100644 index 000000000..4e596abb3 --- /dev/null +++ b/example/src/docs/zh-CN/numeric/max-min.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Numeric 计数器 + + + +Numeric 计数器可用于输入数字,可自定义数值范围,步进大小。支持鼠标键盘增减。 + +
+ +### 数值循环 + +可通过设置 `max` 属性设置计数器允许的最大值,通过设置 `min` 属性设置计数器允许的最小值,通过设置 `circulate` 属性设置向上到达最大值后从最小值开始,或反过来。 + + + +
diff --git a/example/src/docs/zh-CN/numeric/mouse-wheel.md b/example/src/docs/zh-CN/numeric/mouse-wheel.md new file mode 100644 index 000000000..3710a7fe8 --- /dev/null +++ b/example/src/docs/zh-CN/numeric/mouse-wheel.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Numeric 计数器 + + + +Numeric 计数器可用于输入数字,可自定义数值范围,步进大小。支持鼠标键盘增减。 +
+ +### 鼠标滚轮滚动改变值 + +可通过 `mouseWheel` 属性控制鼠标滚动滑轮是否能改变数值。 + + + +
diff --git a/example/src/docs/zh-CN/numeric/numeric-events.md b/example/src/docs/zh-CN/numeric/numeric-events.md new file mode 100644 index 000000000..1b2d8ab79 --- /dev/null +++ b/example/src/docs/zh-CN/numeric/numeric-events.md @@ -0,0 +1,35 @@ +
+

+ +

+ +## Numeric 计数器 + + + +Numeric 计数器可用于输入数字,可自定义数值范围,步进大小。支持鼠标键盘增减。 +
+ +### 聚焦事件 + +输入框获得焦点时触发 `focus` 事件。 + + + +
+ +### 失焦事件 + +输入框失去焦点时触发 `blur` 事件。 + + + +
+ +### 值改变事件 + +输入框值被改变时触发 `change` 事件。 + + + +
diff --git a/example/src/docs/zh-CN/numeric/numeric-size.md b/example/src/docs/zh-CN/numeric/numeric-size.md new file mode 100644 index 000000000..62edf33d9 --- /dev/null +++ b/example/src/docs/zh-CN/numeric/numeric-size.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Numeric 计数器 + + + +Numeric 计数器可用于输入数字,可自定义数值范围,步进大小。支持鼠标键盘增减。 +
+ +### 尺寸 + +可通过 `size` 属性设置计数器尺寸。可取值 `medium / small / mini`。 + + + +
diff --git a/example/src/docs/zh-CN/numeric/precision.md b/example/src/docs/zh-CN/numeric/precision.md new file mode 100644 index 000000000..332abd71c --- /dev/null +++ b/example/src/docs/zh-CN/numeric/precision.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Numeric 计数器 + + + +Numeric 计数器可用于输入数字,可自定义数值范围,步进大小。支持鼠标键盘增减。 +
+ +### 数值精度 + +可通过 precision 属性设置计数器的精度值。 + + + +
diff --git a/example/src/docs/zh-CN/pager/basic-usage.md b/example/src/docs/zh-CN/pager/basic-usage.md new file mode 100644 index 000000000..2ed412621 --- /dev/null +++ b/example/src/docs/zh-CN/pager/basic-usage.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Pager 分页 + + + +当数据量过多时,使用分页分解数据,常用于 Grid 和 Repeater 组件。 +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/zh-CN/pager/current-page.md b/example/src/docs/zh-CN/pager/current-page.md new file mode 100644 index 000000000..51b78deec --- /dev/null +++ b/example/src/docs/zh-CN/pager/current-page.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Pager 分页 + + + +当数据量过多时,使用分页分解数据,常用于 Grid 和 Repeater 组件。 +
+ +### 当前页 + +通过 `current-page` 设置初始加载页码数, 通过 `total` 设置总条数 + + + +
diff --git a/example/src/docs/zh-CN/pager/custom-layout.md b/example/src/docs/zh-CN/pager/custom-layout.md new file mode 100644 index 000000000..a74ee54a5 --- /dev/null +++ b/example/src/docs/zh-CN/pager/custom-layout.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Pager 分页 + + + +当数据量过多时,使用分页分解数据,常用于 Grid 和 Repeater 组件。 + +
+ +### 自定义分页布局 + +`layout` 设置分页布局,通过在`layout`里调整`slot`的位置,从而调整插槽内容渲染的位置 + + + +
diff --git a/example/src/docs/zh-CN/pager/custom-next-prev-text.md b/example/src/docs/zh-CN/pager/custom-next-prev-text.md new file mode 100644 index 000000000..2591c1f6b --- /dev/null +++ b/example/src/docs/zh-CN/pager/custom-next-prev-text.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Pager 分页 + + + +当数据量过多时,使用分页分解数据,常用于 Grid 和 Repeater 组件。 +
+ +### 自定义上下页按钮文本 + +`prev-text` ,`next-text` 自定义上下页按钮文本 + + + +
diff --git a/example/src/docs/zh-CN/pager/hide-on-single-page.md b/example/src/docs/zh-CN/pager/hide-on-single-page.md new file mode 100644 index 000000000..710924047 --- /dev/null +++ b/example/src/docs/zh-CN/pager/hide-on-single-page.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Pager 分页 + + + +当数据量过多时,使用分页分解数据,常用于 Grid 和 Repeater 组件。 +
+ +### 只有一页时隐藏分页 + +`hide-on-single-page` 只有一页时隐藏分页 + + + +
diff --git a/example/src/docs/zh-CN/pager/page-count.md b/example/src/docs/zh-CN/pager/page-count.md new file mode 100644 index 000000000..884373740 --- /dev/null +++ b/example/src/docs/zh-CN/pager/page-count.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Pager 分页 + + + +当数据量过多时,使用分页分解数据,常用于 Grid 和 Repeater 组件。 +
+ +### 总页数 + +通过 `page-count` 设置总页数 + + + +
diff --git a/example/src/docs/zh-CN/pager/page-size.md b/example/src/docs/zh-CN/pager/page-size.md new file mode 100644 index 000000000..a0d911823 --- /dev/null +++ b/example/src/docs/zh-CN/pager/page-size.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Pager 分页 + + + +当数据量过多时,使用分页分解数据,常用于 Grid 和 Repeater 组件。 +
+ +### 每页显示数量 + +`page-sizes` 和 `page-size` 结合使用调整每页显示数量 + + + +
diff --git a/example/src/docs/zh-CN/pager/pager-append-to-body.md b/example/src/docs/zh-CN/pager/pager-append-to-body.md new file mode 100644 index 000000000..5f6a571e9 --- /dev/null +++ b/example/src/docs/zh-CN/pager/pager-append-to-body.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Pager 分页 + + + +当数据量过多时,使用分页分解数据,常用于 Grid 和 Repeater 组件。 +
+ +### 分页下拉框显示位置 + +`popper-append-to-body` 分页下拉框元素是否追加到body元素节点下,默认值为 `true` 。 + + + +
diff --git a/example/src/docs/zh-CN/pager/pager-count.md b/example/src/docs/zh-CN/pager/pager-count.md new file mode 100644 index 000000000..bccee9d0b --- /dev/null +++ b/example/src/docs/zh-CN/pager/pager-count.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Pager 分页 + + + +当数据量过多时,使用分页分解数据,常用于 Grid 和 Repeater 组件。 +
+ +### 页码按钮数量 + +`pager-count` 设置页码数量 + + + +
diff --git a/example/src/docs/zh-CN/pager/pager-events.md b/example/src/docs/zh-CN/pager/pager-events.md new file mode 100644 index 000000000..d0aff47b2 --- /dev/null +++ b/example/src/docs/zh-CN/pager/pager-events.md @@ -0,0 +1,35 @@ +
+

+ +

+ +## Pager 分页 + + + +当数据量过多时,使用分页分解数据,常用于 Grid 和 Repeater 组件。 +
+ +### 分页事件 + +`size-change` 每页条数改变时触发 + +
+ +`current-change` 切换当前页码时触发 + +
+ +`prev-click` 切换至前一页时触发 + +
+ +`next-click` 切换至后一页时触发 + +
+ +`before-page-change` 切换分页前事件 + + + +
diff --git a/example/src/docs/zh-CN/pager/pager-in-grid.md b/example/src/docs/zh-CN/pager/pager-in-grid.md new file mode 100644 index 000000000..7b0a1bb4d --- /dev/null +++ b/example/src/docs/zh-CN/pager/pager-in-grid.md @@ -0,0 +1,23 @@ +
+

+ +

+ +## Pager 分页 + + + +当数据量过多时,使用分页分解数据,常用于 Grid 和 Repeater 组件。 +
+ +### Grid 表格分页 + +Grid 表格使用分页组件 + +:::warning +该示例中的 `services/getGridMockData` 服务需要自行实现,示例模拟了远程服务返回的数据 +::: + + + +
diff --git a/example/src/docs/zh-CN/pager/pager-mode.md b/example/src/docs/zh-CN/pager/pager-mode.md new file mode 100644 index 000000000..7498dbd3b --- /dev/null +++ b/example/src/docs/zh-CN/pager/pager-mode.md @@ -0,0 +1,43 @@ +
+

+ +

+ +## Pager 分页 + + + +当数据量过多时,使用分页分解数据,常用于 Grid 和 Repeater 组件。 +
+ +### number 模式 + +通过 `mode="number"` 设置组件渲染模式 + + + +
+ +### fixed 模式 + +通过 `mode="fixed"` 设置组件渲染模式 + + + +
+ +### simple 模式 + +通过 `mode="simple"` 设置组件渲染模式 + + + +
+ +### complete 模式 + +通过 `mode="complete"` 设置组件渲染模式 + + + +
diff --git a/example/src/docs/zh-CN/pager/popper-class.md b/example/src/docs/zh-CN/pager/popper-class.md new file mode 100644 index 000000000..d0bbd946b --- /dev/null +++ b/example/src/docs/zh-CN/pager/popper-class.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Pager 分页 + + + +当数据量过多时,使用分页分解数据,常用于 Grid 和 Repeater 组件。 +
+ +### 自定义分页下拉框的类名 + +`popper-class` 可以自定义分页下拉框的类名 。 + + + +
\ No newline at end of file diff --git a/example/src/docs/zh-CN/pop-editor/basic-usage.md b/example/src/docs/zh-CN/pop-editor/basic-usage.md new file mode 100644 index 000000000..19c67be5d --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/basic-usage.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + + +该组件只能在弹出的面板中选择数据,不能手动输入数据;弹出面板中显示为 Tree 组件或者 Grid 组件。 +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/zh-CN/pop-editor/before-reset.md b/example/src/docs/zh-CN/pop-editor/before-reset.md new file mode 100644 index 000000000..df85fd2be --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/before-reset.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + + +该组件只能在弹出的面板中选择数据,不能手动输入数据;弹出面板中显示为 Tree 组件或者 Grid 组件。 +
+ +### 重置 + +通过 `before-reset` 属性设置重置前的钩子函数。 + + + +
diff --git a/example/src/docs/zh-CN/pop-editor/clearable.md b/example/src/docs/zh-CN/pop-editor/clearable.md new file mode 100644 index 000000000..0fde66fa6 --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/clearable.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + + +该组件只能在弹出的面板中选择数据,不能手动输入数据;弹出面板中显示为 Tree 组件或者 Grid 组件。 +
+ +### 弹出窗筛选条件支持可清空 + +`clearable` Popeditor 组件 支持在搜索表单配置清除按钮。 + + + +
diff --git a/example/src/docs/zh-CN/pop-editor/custom-conditions.md b/example/src/docs/zh-CN/pop-editor/custom-conditions.md new file mode 100644 index 000000000..20ca5472a --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/custom-conditions.md @@ -0,0 +1,33 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + + +该组件只能在弹出的面板中选择数据,不能手动输入数据;弹出面板中显示为 Tree 组件或者 Grid 组件。 +
+ +### 自定义查询条件 + +通过 `conditions` 属性可以自定义查询条件,组件内置的输入框支持按回车触发搜索的功能。 + + + +
+ +### 布局与配置 + +通过 `condition` 项目里属性里的`span`配置栅格,`labelWidth` 配置label宽度。 `component`配置自定义组件,并通过 `attrs`配置组件属性 + + + +
+ +### Form 表单中使用并开启表单校验 + + + +
diff --git a/example/src/docs/zh-CN/pop-editor/custom-icon.md b/example/src/docs/zh-CN/pop-editor/custom-icon.md new file mode 100644 index 000000000..cabb84844 --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/custom-icon.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + + +该组件只能在弹出的面板中选择数据,不能手动输入数据;弹出面板中显示为 Tree 组件或者 Grid 组件。 +
+ +### 自定义图标 + +通过 `icon` 属性可以自定义组件图标,需引入对应的 svg 图标。 + + + +
diff --git a/example/src/docs/zh-CN/pop-editor/custom-title.md b/example/src/docs/zh-CN/pop-editor/custom-title.md new file mode 100644 index 000000000..996a2f2d7 --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/custom-title.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + + +该组件只能在弹出的面板中选择数据,不能手动输入数据;弹出面板中显示为 Tree 组件或者 Grid 组件。 +
+ +### 自定义标题 + +通过 `title` 属性设置弹出窗口标题,支持国际化信息配置。 + + + +
diff --git a/example/src/docs/zh-CN/pop-editor/draggable.md b/example/src/docs/zh-CN/pop-editor/draggable.md new file mode 100644 index 000000000..d77ee607e --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/draggable.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + + +该组件只能在弹出的面板中选择数据,不能手动输入数据;弹出面板中显示为 Tree 组件或者 Grid 组件。 +
+ +### 拖动窗口 + +通过 `draggable` 属性设置弹出窗口拖动特性。默认为 `true` 表示可在标题栏按住鼠标左键拖动窗口,设置为 `false` 则固定窗口位置不可拖动。 + + + +
diff --git a/example/src/docs/zh-CN/pop-editor/dynamic-disabled.md b/example/src/docs/zh-CN/pop-editor/dynamic-disabled.md new file mode 100644 index 000000000..7d3f961a3 --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/dynamic-disabled.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + + +该组件只能在弹出的面板中选择数据,不能手动输入数据;弹出面板中显示为 Tree 组件或者 Grid 组件。 +
+ +### 禁用 + +通过 `disabled` 属性设置为是否只读。 + + + +
diff --git a/example/src/docs/zh-CN/pop-editor/dynamic-readonly.md b/example/src/docs/zh-CN/pop-editor/dynamic-readonly.md new file mode 100644 index 000000000..2ab66bea7 --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/dynamic-readonly.md @@ -0,0 +1,27 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + + +该组件只能在弹出的面板中选择数据,不能手动输入数据;弹出面板中显示为 Tree 组件或者 Grid 组件。 +
+ +### 只读 + +通过 `readonly` 属性设置为是否只读。 + + + +
+ +### 输入框的 tabindex + +通过 `tabindex` 属性置是否可通过 Tab 键获焦及获焦顺序(`readonly` 属性设置为 false 时有效)。 + + + +
diff --git a/example/src/docs/zh-CN/pop-editor/editable.md b/example/src/docs/zh-CN/pop-editor/editable.md new file mode 100644 index 000000000..05fca1644 --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/editable.md @@ -0,0 +1,11 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + +
+ +
diff --git a/example/src/docs/zh-CN/pop-editor/history-data-source.md b/example/src/docs/zh-CN/pop-editor/history-data-source.md new file mode 100644 index 000000000..80a255671 --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/history-data-source.md @@ -0,0 +1,11 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + +
+ +
diff --git a/example/src/docs/zh-CN/pop-editor/manual-popup.md b/example/src/docs/zh-CN/pop-editor/manual-popup.md new file mode 100644 index 000000000..2ce639f82 --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/manual-popup.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + + +该组件只能在弹出的面板中选择数据,不能手动输入数据;弹出面板中显示为 Tree 组件或者 Grid 组件。 +
+ +### 手动弹出面板 + + + +
diff --git a/example/src/docs/zh-CN/pop-editor/multi-selected.md b/example/src/docs/zh-CN/pop-editor/multi-selected.md new file mode 100644 index 000000000..5462d1715 --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/multi-selected.md @@ -0,0 +1,26 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + + +该组件只能在弹出的面板中选择数据,不能手动输入数据;弹出面板中显示为 Tree 组件或者 Grid 组件。 +
+ +### 多选 + +通过设置 `multi` 属性为 true 实现多选。 +通过设置 `show-history` 当弹出面板配置的是表格时,设置历史记录标签页是否显示表格,默认为 false。 + + + +
+ +### 多选且初始数据为数组 + + + +
diff --git a/example/src/docs/zh-CN/pop-editor/pager.md b/example/src/docs/zh-CN/pop-editor/pager.md new file mode 100644 index 000000000..4d784a182 --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/pager.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + + +常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮、下拉按钮等类型。 +
+ +### 分页 + +`showPager` 属性只有当 `popseletor` 为 `grid` 时才能生效,默认值为 `false` 不启用分页,配置为 `true` 后还需配置 `pagerOp` 属性;并且需要监听 `page-change` 事件改变 `gridOp` 的 `data` 数据源 + +
diff --git a/example/src/docs/zh-CN/pop-editor/popeditor-events.md b/example/src/docs/zh-CN/pop-editor/popeditor-events.md new file mode 100644 index 000000000..f56e66799 --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/popeditor-events.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + + +该组件只能在弹出的面板中选择数据,不能手动输入数据;弹出面板中显示为 Tree 组件或者 Grid 组件。 +
+ +### change 事件 + +`change` Popeditor 组件 Input 框的 change 事件。 `page-change` Popeditor 组件表格模式带分页切换事件。 + + + +### close 事件 + +`close` 弹框关闭时触发的事件。 + + + +
diff --git a/example/src/docs/zh-CN/pop-editor/remote-search.md b/example/src/docs/zh-CN/pop-editor/remote-search.md new file mode 100644 index 000000000..46f8a62ba --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/remote-search.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + + +该组件只能在弹出的面板中选择数据,不能手动输入数据;弹出面板中显示为 Tree 组件或者 Grid 组件。 +
+ +### 远程搜索 + +通过 `remote-search` 属性配置远程搜索,在 remoteSearch 方法里可以把 conditions 搜索条件传给后台,后台处理好数据后就能正常的显示在页面上。 + + + +
diff --git a/example/src/docs/zh-CN/pop-editor/render-text.md b/example/src/docs/zh-CN/pop-editor/render-text.md new file mode 100644 index 000000000..a82ac53f4 --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/render-text.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + + +该组件只能在弹出的面板中选择数据,不能手动输入数据;弹出面板中显示为 Tree 组件或者 Grid 组件。 + +
+ +### 渲染反查 + +在组件加载的第一批数据中不含有当前所设置的 `value` 对应的数据时,可以设置 `text-render-source` 进行反查 + + + +
+ diff --git a/example/src/docs/zh-CN/pop-editor/resize.md b/example/src/docs/zh-CN/pop-editor/resize.md new file mode 100644 index 000000000..da5969957 --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/resize.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + + +该组件只能在弹出的面板中选择数据,不能手动输入数据;弹出面板中显示为 Tree 组件或者 Grid 组件。 + +
+ +### 全屏展示 + +通过配置 `resize` 控制是否全屏展示 + + + +
+ diff --git a/example/src/docs/zh-CN/pop-editor/selected-data-source.md b/example/src/docs/zh-CN/pop-editor/selected-data-source.md new file mode 100644 index 000000000..80a255671 --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/selected-data-source.md @@ -0,0 +1,11 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + +
+ +
diff --git a/example/src/docs/zh-CN/pop-editor/show-clear-btn.md b/example/src/docs/zh-CN/pop-editor/show-clear-btn.md new file mode 100644 index 000000000..172de60fb --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/show-clear-btn.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + + +该组件只能在弹出的面板中选择数据,不能手动输入数据;弹出面板中显示为 Tree 组件或者 Grid 组件。 +
+ +### 不可清除 + +通过 `show-clear-btn` 属性设置是否可以清除。 + + + +
diff --git a/example/src/docs/zh-CN/pop-editor/show-history.md b/example/src/docs/zh-CN/pop-editor/show-history.md new file mode 100644 index 000000000..4d586d07d --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/show-history.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + + +该组件只能在弹出的面板中选择数据,不能手动输入数据;弹出面板中显示为 Tree 组件或者 Grid 组件。 +
+ +### 设置历史记录标签页 + +当弹出面板配置的是表格时,通过配置 `show-history` 设置历史记录标签页是否显示表格,该值默认为false。 + +
diff --git a/example/src/docs/zh-CN/pop-editor/show-overflow.md b/example/src/docs/zh-CN/pop-editor/show-overflow.md new file mode 100644 index 000000000..6e704545a --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/show-overflow.md @@ -0,0 +1,26 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + + +该组件只能在弹出的面板中选择数据,不能手动输入数据;弹出面板中显示为 Tree 组件或者 Grid 组件。 +
+ +### 数据超出隐藏 + +在数据的列上配置 `showOverflow` 属性用于设置数据超出列宽时的显示和隐藏。值的类型可以为 Boolean 和 String,有三个值可以选择,如下所示。默认为换行显示全部内容。 + +:::tip 可选值说明 +tooltip:内容超出部分显示 ...,左侧/右侧弹出提示层显示全部信息。 +title:和原生标签的 title 属性一致。 +ellipsis:内容超出部分显示 ...,没有提示。 +true:为 true 时,效果和 tooltip 一致。 +::: + + + +
diff --git a/example/src/docs/zh-CN/pop-editor/show-toolbar.md b/example/src/docs/zh-CN/pop-editor/show-toolbar.md new file mode 100644 index 000000000..c2975a0da --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/show-toolbar.md @@ -0,0 +1,11 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + +
+ +
diff --git a/example/src/docs/zh-CN/pop-editor/showPrimary.md b/example/src/docs/zh-CN/pop-editor/showPrimary.md new file mode 100644 index 000000000..80a255671 --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/showPrimary.md @@ -0,0 +1,11 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + +
+ +
diff --git a/example/src/docs/zh-CN/pop-editor/single-select-radio.md b/example/src/docs/zh-CN/pop-editor/single-select-radio.md new file mode 100644 index 000000000..264e71a6b --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/single-select-radio.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + + +该组件只能在弹出的面板中选择数据,不能手动输入数据;弹出面板中显示为 Tree 组件或者 Grid 组件。 +
+ +### 树模式单选 + +通过 `popseletor` 属性开启树模式,然后 `tree-op` 属性是 `Tree` 组件的 `op 配置方式`。 + + + +
diff --git a/example/src/docs/zh-CN/pop-editor/size.md b/example/src/docs/zh-CN/pop-editor/size.md new file mode 100644 index 000000000..0a0211161 --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/size.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + + +该组件只能在弹出的面板中选择数据,不能手动输入数据;弹出面板中显示为 Tree 组件或者 Grid 组件。 +
+ +### 编辑框大小 + +通过 `size` 属性设置 PopEditor 编辑框大小,可选值有 `medium`、`small`、`mini`。 + +
diff --git a/example/src/docs/zh-CN/pop-editor/slot.md b/example/src/docs/zh-CN/pop-editor/slot.md new file mode 100644 index 000000000..b20259180 --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/slot.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + + +该组件只能在弹出的面板中选择数据,不能手动输入数据;弹出面板中显示为 Tree 组件或者 Grid 组件。 +
+ +### 组件查询条件插槽 + +通过插槽 `search` 自定义弹出面板查询结构。 + + + +
diff --git a/example/src/docs/zh-CN/pop-editor/table-edit.md b/example/src/docs/zh-CN/pop-editor/table-edit.md new file mode 100644 index 000000000..622fe02ea --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/table-edit.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + + +该组件只能在弹出的面板中选择数据,不能手动输入数据;弹出面板中显示为 Tree 组件或者 Grid 组件。 +
+ +### 表格编辑 + +gridOp 当 popseletor 为 grid 时生效,目前支持配置 columns 表格列 和 data 数据源,详细配置项参考 Grid 表格组件,需同时配置 textField、valueField 字段。 + + + +
diff --git a/example/src/docs/zh-CN/pop-editor/text-field.md b/example/src/docs/zh-CN/pop-editor/text-field.md new file mode 100644 index 000000000..5a45e4a74 --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/text-field.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + + +该组件只能在弹出的面板中选择数据,不能手动输入数据;弹出面板中显示为 Tree 组件或者 Grid 组件。 +
+ +### 显示字段映射 + +通过 `text-field` 属性设置组件显示的字段。 + + + +
diff --git a/example/src/docs/zh-CN/pop-editor/text-render-source.md b/example/src/docs/zh-CN/pop-editor/text-render-source.md new file mode 100644 index 000000000..c2975a0da --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/text-render-source.md @@ -0,0 +1,11 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + +
+ +
diff --git a/example/src/docs/zh-CN/pop-editor/tree-edit.md b/example/src/docs/zh-CN/pop-editor/tree-edit.md new file mode 100644 index 000000000..748ade905 --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/tree-edit.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + + +该组件只能在弹出的面板中选择数据,不能手动输入数据;弹出面板中显示为 Tree 组件或者 Grid 组件。 +
+ +### 自定义标题 + +通过 `popseletor` 属性开启树模式,然后 `tree-op` 属性是 `Tree` 组件的 `op 配置方式`。 + + + +
diff --git a/example/src/docs/zh-CN/pop-editor/trigger.md b/example/src/docs/zh-CN/pop-editor/trigger.md new file mode 100644 index 000000000..98aea3b82 --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/trigger.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + + +该组件只能在弹出的面板中选择数据,不能手动输入数据;弹出面板中显示为 Tree 组件或者 Grid 组件。 +
+ +### 单选时触发勾选的方式 + +弹出编辑为单选时,默认只能通过单击单选按钮进行勾选。但也可以通过设置属性 `trigger` 为 `row` 实现单击行中任意位置进行勾选。或者设置 `trigger` 为 `cell`,单击操作列的单元格上任意位置进行勾选。 + + + +
diff --git a/example/src/docs/zh-CN/pop-editor/value-field.md b/example/src/docs/zh-CN/pop-editor/value-field.md new file mode 100644 index 000000000..a2f417f60 --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/value-field.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + + +该组件只能在弹出的面板中选择数据,不能手动输入数据;弹出面板中显示为 Tree 组件或者 Grid 组件。 +
+ +### 提交字段映射 + +通过 `value-field` 属性设置组件提交给后台的字段。 + + + +
diff --git a/example/src/docs/zh-CN/pop-editor/width-height.md b/example/src/docs/zh-CN/pop-editor/width-height.md new file mode 100644 index 000000000..bb98c4a4f --- /dev/null +++ b/example/src/docs/zh-CN/pop-editor/width-height.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## PopEditor 弹出编辑 + + + +该组件只能在弹出的面板中选择数据,不能手动输入数据;弹出面板中显示为 Tree 组件或者 Grid 组件。 +
+ +### 宽高 + +通过 `width height` 属性配置宽高。 +通过 `dialog-class` 自定义配置弹窗类名 + + + +
diff --git a/example/src/docs/zh-CN/pop-upload/basic-usage.md b/example/src/docs/zh-CN/pop-upload/basic-usage.md new file mode 100644 index 000000000..63c9ec72f --- /dev/null +++ b/example/src/docs/zh-CN/pop-upload/basic-usage.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## PopUpload 弹出框上传 + + + +点击所设置的元素,弹出上传对话框。 +
+ +### 基本用法 + +通过 `action` 属性设置上传的服务接口。 + + + +
+ + diff --git a/example/src/docs/zh-CN/pop-upload/custom-request-headers.md b/example/src/docs/zh-CN/pop-upload/custom-request-headers.md new file mode 100644 index 000000000..e71628a33 --- /dev/null +++ b/example/src/docs/zh-CN/pop-upload/custom-request-headers.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## PopUpload 弹出框上传 + + + +点击所设置的元素,弹出上传对话框。 +
+ +### 自定义请求头 + +通过 `headers` 属性自定义上传请求头信息。 + + + +
diff --git a/example/src/docs/zh-CN/pop-upload/data.md b/example/src/docs/zh-CN/pop-upload/data.md new file mode 100644 index 000000000..b5feadc95 --- /dev/null +++ b/example/src/docs/zh-CN/pop-upload/data.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## PopUpload 弹出框上传 + + + +点击所设置的元素,弹出上传对话框。 +
+ +### 基本用法 + +通过 `data` 属性设置上传时附带的额外参数。 + + + +
diff --git a/example/src/docs/zh-CN/pop-upload/file-limit.md b/example/src/docs/zh-CN/pop-upload/file-limit.md new file mode 100644 index 000000000..ab51220f8 --- /dev/null +++ b/example/src/docs/zh-CN/pop-upload/file-limit.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## PopUpload 弹出框上传 + + + +点击所设置的元素,弹出上传对话框。 + +
+ +### 最大上传文件数 + +通过 `limit` 属性可以指定最大上传的文件数量,配置 `multiple` 属性后可同时选择多个文件。 + + + +
diff --git a/example/src/docs/zh-CN/pop-upload/file-type.md b/example/src/docs/zh-CN/pop-upload/file-type.md new file mode 100644 index 000000000..67e353dac --- /dev/null +++ b/example/src/docs/zh-CN/pop-upload/file-type.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## PopUpload 弹出框上传 + + + +点击所设置的元素,弹出上传对话框。 +
+ +### 可上传文件类型 + +通过 `accept` 属性可以对选择文件时的文件类型进行控制,而 `upload-file-type` 属性可以指定在上传时进行校验的文件类型。 + + + +
diff --git a/example/src/docs/zh-CN/pop-upload/fill-button-text.md b/example/src/docs/zh-CN/pop-upload/fill-button-text.md new file mode 100644 index 000000000..dcc57d188 --- /dev/null +++ b/example/src/docs/zh-CN/pop-upload/fill-button-text.md @@ -0,0 +1,44 @@ +
+

+ +

+ +## PopUpload 弹出框上传 + + + +点击所设置的元素,弹出上传对话框。 + +
+ +### 文件上传弹框中取消按钮的文本 + +通过 `cancel-button-text` 属性指定取消按钮的文本内容 + + + +
+ +### 文件上传弹框中提交按钮的文本 + +通过 `submit-button-text` 属性指定文件上传弹框中提交按钮的文本 + + + +
+ +### 文件上传弹框中取消按钮的文本 + +通过 `dialog-title` 属性指定文件上传弹框中取消按钮的文本 + + + +
+ +### 打开弹出框的按钮的文本 + +通过 `upload-button-text` 属性指定打开弹出框的按钮的文本 + + + +
diff --git a/example/src/docs/zh-CN/pop-upload/http-request.md b/example/src/docs/zh-CN/pop-upload/http-request.md new file mode 100644 index 000000000..96f00525f --- /dev/null +++ b/example/src/docs/zh-CN/pop-upload/http-request.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## PopUpload 弹出框上传 + + + +点击所设置的元素,弹出上传对话框。 +
+ +### 覆盖默认请求 + +通过配置 `http-request` 覆盖默认的上传行为,可以自定义上传的实现 + + + +
diff --git a/example/src/docs/zh-CN/pop-upload/max-upload-file-size.md b/example/src/docs/zh-CN/pop-upload/max-upload-file-size.md new file mode 100644 index 000000000..6b084522c --- /dev/null +++ b/example/src/docs/zh-CN/pop-upload/max-upload-file-size.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## PopUpload 弹出框上传 + + + +点击所设置的元素,弹出上传对话框。 +
+ +### 可上传文件大小 + +通过 `max-upload-file-size` 属性指定可上传文件的大小。 + + + +
diff --git a/example/src/docs/zh-CN/pop-upload/prevent-delete-file.md b/example/src/docs/zh-CN/pop-upload/prevent-delete-file.md new file mode 100644 index 000000000..31389fdf6 --- /dev/null +++ b/example/src/docs/zh-CN/pop-upload/prevent-delete-file.md @@ -0,0 +1,26 @@ +
+

+ +

+ +## PopUpload 弹出框上传 + + + +点击所设置的元素,弹出上传对话框。 + +
+ +### 阻止删除文件 + +:before-remove(移除文件前回调事件),方法里面return true/false,表示是否可以删除 + + +
+ +### 阻止上传文件 + +:before-upload 上传文件之前的钩子,参数为上传的文件,若返回 false 或者返回 Promise 且被 reject,则停止上传 + + +
diff --git a/example/src/docs/zh-CN/pop-upload/size.md b/example/src/docs/zh-CN/pop-upload/size.md new file mode 100644 index 000000000..b3d2e06a5 --- /dev/null +++ b/example/src/docs/zh-CN/pop-upload/size.md @@ -0,0 +1,22 @@ +
+

+ +

+ +## PopUpload 弹出框上传 + + + +点击所设置的元素,弹出上传对话框。 + +
+ +### 设置组件大小 + +可设置为:`medium`,`small`,`mini` + +通过 `disabled` 属性设置是否禁用,默认值为 false 。 + + + +
diff --git a/example/src/docs/zh-CN/pop-upload/upload-name.md b/example/src/docs/zh-CN/pop-upload/upload-name.md new file mode 100644 index 000000000..ccabadea0 --- /dev/null +++ b/example/src/docs/zh-CN/pop-upload/upload-name.md @@ -0,0 +1,28 @@ +
+

+ +

+ +## PopUpload 弹出框上传 + + + +点击所设置的元素,弹出上传对话框。 + +
+ +### 上传的文件字段名 + +通过 `upload-name` 属性设置上传的文件字段名,默认值为 file 。 + + + +
+ +### 发送 cookie 凭证信息 + +通过 `with-credentials` 属性设置是否支持发送 cookie 凭证信息,默认为 false 。 + + + +
diff --git a/example/src/docs/zh-CN/popover/arrow-offset.md b/example/src/docs/zh-CN/popover/arrow-offset.md new file mode 100644 index 000000000..dfa0c20e8 --- /dev/null +++ b/example/src/docs/zh-CN/popover/arrow-offset.md @@ -0,0 +1,16 @@ +
+

+ +

+ +## Popover + + + +Popover可通过对一个触发源操作触发弹出框,支持自定义弹出内容,延迟触发和渐变动画 +
+ +### 箭头偏移 + +`arrow-offset` 设置箭头的偏移量,来改变箭头的位置。 + diff --git a/example/src/docs/zh-CN/popover/basic-usage.md b/example/src/docs/zh-CN/popover/basic-usage.md new file mode 100644 index 000000000..add6e329d --- /dev/null +++ b/example/src/docs/zh-CN/popover/basic-usage.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Popover + + + +Popover可通过对一个触发源操作触发弹出框,支持自定义弹出内容,延迟触发和渐变动画 +
+ +### 基本用法 + + +
+ diff --git a/example/src/docs/zh-CN/popover/close-delay.md b/example/src/docs/zh-CN/popover/close-delay.md new file mode 100644 index 000000000..b2855c621 --- /dev/null +++ b/example/src/docs/zh-CN/popover/close-delay.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Popover + + + +Popover 可通过对一个触发源操作触发弹出框,支持自定义弹出内容,延迟触发和渐变动画 +
+ +### 延迟隐藏 + +`close-delay` 弹出框延迟隐藏单位为毫秒(Number) + + diff --git a/example/src/docs/zh-CN/popover/custom-tip-text.md b/example/src/docs/zh-CN/popover/custom-tip-text.md new file mode 100644 index 000000000..b20841b4d --- /dev/null +++ b/example/src/docs/zh-CN/popover/custom-tip-text.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Popover + + + +Popover 可通过对一个触发源操作触发弹出框,支持自定义弹出内容,延迟触发和渐变动画 +
+ +### 自定义提示文本 + +`content` 设置自定义文本,也可在标签内直接嵌套默认插槽为自定义文本 + + diff --git a/example/src/docs/zh-CN/popover/custom-transition.md b/example/src/docs/zh-CN/popover/custom-transition.md new file mode 100644 index 000000000..6e68a2068 --- /dev/null +++ b/example/src/docs/zh-CN/popover/custom-transition.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Popover + + + +Popover 可通过对一个触发源操作触发弹出框,支持自定义弹出内容,延迟触发和渐变动画 +
+ +### 自定义渐变动画 + +`transition` 设置弹框的显示隐藏淡入淡出动画,默认取值 fade-in-linear,fade-in ( 无动画效果 ) + + diff --git a/example/src/docs/zh-CN/popover/dynamic-disable.md b/example/src/docs/zh-CN/popover/dynamic-disable.md new file mode 100644 index 000000000..0c920d6be --- /dev/null +++ b/example/src/docs/zh-CN/popover/dynamic-disable.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Popover + + + +Popover 可通过对一个触发源操作触发弹出框,支持自定义弹出内容,延迟触发和渐变动画 +
+ +### 禁用 + +`disabled` 设置是否禁用弹出框。 + + diff --git a/example/src/docs/zh-CN/popover/frame-offset.md b/example/src/docs/zh-CN/popover/frame-offset.md new file mode 100644 index 000000000..55a740d60 --- /dev/null +++ b/example/src/docs/zh-CN/popover/frame-offset.md @@ -0,0 +1,16 @@ +
+

+ +

+ +## Popover + + + +Popover可通过对一个触发源操作触发弹出框,支持自定义弹出内容,延迟触发和渐变动画 +
+ +### 弹出框偏移 + +`offset` 设置弹框的偏移量,来改变弹框的位置。 + diff --git a/example/src/docs/zh-CN/popover/hidden-arrow.md b/example/src/docs/zh-CN/popover/hidden-arrow.md new file mode 100644 index 000000000..7ded67834 --- /dev/null +++ b/example/src/docs/zh-CN/popover/hidden-arrow.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Popover + + + +Popover 可通过对一个触发源操作触发弹出框,支持自定义弹出内容,延迟触发和渐变动画 +
+ +### 隐藏提示框箭头 + +`visible-arrow` 设定是否显示提示框的箭头 + + diff --git a/example/src/docs/zh-CN/popover/open-delay.md b/example/src/docs/zh-CN/popover/open-delay.md new file mode 100644 index 000000000..acf7074fc --- /dev/null +++ b/example/src/docs/zh-CN/popover/open-delay.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Popover + + + +Popover 可通过对一个触发源操作触发弹出框,支持自定义弹出内容,延迟触发和渐变动画 +
+ +### 延迟显示 + +`open-delay`,设置延迟时间 ( type:number,单位毫秒 ) + + diff --git a/example/src/docs/zh-CN/popover/popover-content.md b/example/src/docs/zh-CN/popover/popover-content.md new file mode 100644 index 000000000..b99432bbb --- /dev/null +++ b/example/src/docs/zh-CN/popover/popover-content.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Popover + + + +Popover 可通过对一个触发源操作触发弹出框,支持自定义弹出内容,延迟触发和渐变动画 +
+ +### 添加内容 + +`content` 设置要显示的内容。 + + diff --git a/example/src/docs/zh-CN/popover/popover-events.md b/example/src/docs/zh-CN/popover/popover-events.md new file mode 100644 index 000000000..9b99df287 --- /dev/null +++ b/example/src/docs/zh-CN/popover/popover-events.md @@ -0,0 +1,33 @@ +
+

+ +

+ +## Popover + + + +Popover 可通过对一个触发源操作触发弹出框,支持自定义弹出内容,延迟触发和渐变动画 +
+ +### 事件 + +`input` 加载完触发回调 + +
+ +`hide` 隐藏时触发回调 + +
+ +`show` 显示时触发回调 + +
+ +`after-leave` 显示时触发回调 + +
+ +`after-enter` 显示动画播放完毕后触发回调 + + diff --git a/example/src/docs/zh-CN/popover/popover-placement.md b/example/src/docs/zh-CN/popover/popover-placement.md new file mode 100644 index 000000000..5c8eccf11 --- /dev/null +++ b/example/src/docs/zh-CN/popover/popover-placement.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Popover + + + +Popover 可通过对一个触发源操作触发弹出框,支持自定义弹出内容,延迟触发和渐变动画 +
+ +### 显示位置 + +`placement` 设置弹出框的的位置,可选值为(to/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end) + + diff --git a/example/src/docs/zh-CN/popover/popover-width.md b/example/src/docs/zh-CN/popover/popover-width.md new file mode 100644 index 000000000..1dd678ad7 --- /dev/null +++ b/example/src/docs/zh-CN/popover/popover-width.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Popover + + + +Popover 可通过对一个触发源操作触发弹出框,支持自定义弹出内容,延迟触发和渐变动画 +
+ +### 宽度 + +`width` 弹出框的宽度 + + diff --git a/example/src/docs/zh-CN/popover/popper-class.md b/example/src/docs/zh-CN/popover/popper-class.md new file mode 100644 index 000000000..2154e5728 --- /dev/null +++ b/example/src/docs/zh-CN/popover/popper-class.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Popover + + + +Popover 可通过对一个触发源操作触发弹出框,支持自定义弹出内容,延迟触发和渐变动画 +
+ +### 自定义样式 + +`popper-class` 可配置单个或多个 class + + diff --git a/example/src/docs/zh-CN/popover/popper-options.md b/example/src/docs/zh-CN/popover/popper-options.md new file mode 100644 index 000000000..9f37f3823 --- /dev/null +++ b/example/src/docs/zh-CN/popover/popper-options.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Popover + + + +Popover 可通过对一个触发源操作触发弹出框,支持自定义弹出内容,延迟触发和渐变动画 +
+ +### 弹出框选项 + +`popper-options` 配置弹出框选项 + + diff --git a/example/src/docs/zh-CN/popover/trigger-mode.md b/example/src/docs/zh-CN/popover/trigger-mode.md new file mode 100644 index 000000000..044ba5aef --- /dev/null +++ b/example/src/docs/zh-CN/popover/trigger-mode.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Popover + + + +Popover 可通过对一个触发源操作触发弹出框,支持自定义弹出内容,延迟触发和渐变动画 +
+ +### 触发方式 + +`trigger`设定弹出框的触发方式
`click` 点击触发
`focus` 鼠标长按触发
`hover` 鼠标悬浮触发
`manual` 点击触发,再次点击隐藏 + + diff --git a/example/src/docs/zh-CN/popover/trigger-reference.md b/example/src/docs/zh-CN/popover/trigger-reference.md new file mode 100644 index 000000000..cae02cbbc --- /dev/null +++ b/example/src/docs/zh-CN/popover/trigger-reference.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Popover + + + +Popover 可通过对一个触发源操作触发弹出框,支持自定义弹出内容,延迟触发和渐变动画 +
+ +### 触发源 + +`slot` 设置弹出框的触发源 + + diff --git a/example/src/docs/zh-CN/progress/basic-usage.md b/example/src/docs/zh-CN/progress/basic-usage.md new file mode 100644 index 000000000..99a5ffa50 --- /dev/null +++ b/example/src/docs/zh-CN/progress/basic-usage.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Progress + + + +用于展示操作进度,告知用户当前状态和预期。 +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/zh-CN/progress/custom-color.md b/example/src/docs/zh-CN/progress/custom-color.md new file mode 100644 index 000000000..e80c93e00 --- /dev/null +++ b/example/src/docs/zh-CN/progress/custom-color.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Progress + + + +用于展示操作进度,告知用户当前状态和预期。 +
+ +### 自定义颜色 + +通过 `color` 设置进度条颜色。color 进度条背景色(会覆盖 status 状态颜色) + + + +
diff --git a/example/src/docs/zh-CN/progress/dynamic-control-changes.md b/example/src/docs/zh-CN/progress/dynamic-control-changes.md new file mode 100644 index 000000000..2429330a1 --- /dev/null +++ b/example/src/docs/zh-CN/progress/dynamic-control-changes.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Progress + + + +用于展示操作进度,告知用户当前状态和预期。 +
+ +### 动态控制进度条变化 + +通过设置 `percentage` 动态控制进度条变化 + + + +
diff --git a/example/src/docs/zh-CN/progress/format-text.md b/example/src/docs/zh-CN/progress/format-text.md new file mode 100644 index 000000000..c71a76c3c --- /dev/null +++ b/example/src/docs/zh-CN/progress/format-text.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Progress + + + +用于展示操作进度,告知用户当前状态和预期。 + +
+ +### 自定义显示文字 + +`text-inside` 进度条显示文字内置在进度条内(只在 type=line 时可用),`format`自定义进度条的文字 + + + +
diff --git a/example/src/docs/zh-CN/progress/progress-status.md b/example/src/docs/zh-CN/progress/progress-status.md new file mode 100644 index 000000000..42c3802a4 --- /dev/null +++ b/example/src/docs/zh-CN/progress/progress-status.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Progress + + + +用于展示操作进度,告知用户当前状态和预期。 +
+ +### 状态 + +`status` 进度条当前状态(success/exception/warning) + + diff --git a/example/src/docs/zh-CN/progress/progress-type.md b/example/src/docs/zh-CN/progress/progress-type.md new file mode 100644 index 000000000..f5b8c9dad --- /dev/null +++ b/example/src/docs/zh-CN/progress/progress-type.md @@ -0,0 +1,36 @@ +
+

+ +

+ +## Progress + + + +用于展示操作进度,告知用户当前状态和预期。 + +
+ +取值 line:线性进度条。取值 circle:环形进度条,取值 dashboard:仪表盘形进度条 + +
+ +### line 类型 + +`type="line"` 显示为 line 类型 + + + +### circle 类型 + +`type="circle"` 显示为 circle 类型。`width`可以调整环形进度条画布宽度,默认值为126px。 + + + +### dashboard 类型 + +`type="dashboard"` 显示为 dashboard 类型。`width`可以调整环形进度条画布宽度,默认值为126px。 + + + +
diff --git a/example/src/docs/zh-CN/progress/progress-width.md b/example/src/docs/zh-CN/progress/progress-width.md new file mode 100644 index 000000000..abb69bfa6 --- /dev/null +++ b/example/src/docs/zh-CN/progress/progress-width.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Progress + + + +用于展示操作进度,告知用户当前状态和预期。 +
+ +### 宽度 + +`stroke-width`进度条的宽度,单位 px + + + +
diff --git a/example/src/docs/zh-CN/progress/text-inside-or-no-text.md b/example/src/docs/zh-CN/progress/text-inside-or-no-text.md new file mode 100644 index 000000000..62e389a36 --- /dev/null +++ b/example/src/docs/zh-CN/progress/text-inside-or-no-text.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Progress + + + +用于展示操作进度,告知用户当前状态和预期。 +
+ +### 文字内显或不显 + +`show-text` 是否显示进度条文字内容 + + + +
diff --git a/example/src/docs/zh-CN/radio/active-color.md b/example/src/docs/zh-CN/radio/active-color.md new file mode 100644 index 000000000..2a3471924 --- /dev/null +++ b/example/src/docs/zh-CN/radio/active-color.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Radio 单选框 + + + +用于配置不同场景的选项,在一组备选项中进行单选。 +
+ +### 颜色设置 + +按钮形式的 Radio 激活时可通过 `text-color` 属性设置文本颜色,通过 `fill` 属性设置填充色和边框色。 + + + +
diff --git a/example/src/docs/zh-CN/radio/basic-usage.md b/example/src/docs/zh-CN/radio/basic-usage.md new file mode 100644 index 000000000..09a424be7 --- /dev/null +++ b/example/src/docs/zh-CN/radio/basic-usage.md @@ -0,0 +1,56 @@ +
+

+ +

+ +## Radio 单选框 + + + +用于配置不同场景的选项,在一组备选项中进行单选。 + +
+ +### 基本用法 + +通过 `v-model` 绑定变量,设置的变量值为默认选中的 Radio,变量值对应 `label` 属性的值。通过 `text` 也可以配置显示文本,与默认插槽配置纯文本的结果一致 + +
+ +`label` 可以是 `String`、`Number` 或 `Boolean`。 + + + +
+ +### 配置式单选组 + +提供 `options` 属性,支持通过配置对象数组数据的形式来渲染单选组。使用该属性后,可以不用再在标签中以插槽的形式插入 `` 或 `` 标签。 + +
+ +`options` 对象数组中包括三个字段:`label`、`text`、`events`。 + +
+ +另外还提供 `type` 属性,配合 `options` 属性一起使用,默认值为 `radio`。还可以配置为 `button`,配置后单选组将以按钮的形式展示。 + + + +
+ +### Radio + + + +
+ +### RadioGroup + + + +
+ +### RadioButton + + diff --git a/example/src/docs/zh-CN/radio/dynamic-disable.md b/example/src/docs/zh-CN/radio/dynamic-disable.md new file mode 100644 index 000000000..33006987f --- /dev/null +++ b/example/src/docs/zh-CN/radio/dynamic-disable.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Radio 单选框 + + + +用于配置不同场景的选项,在一组备选项中进行单选。 +
+ +### 禁用状态 + +设置 `disabled` 属性即可启动禁用状态,默认为 false 。 + + + +
diff --git a/example/src/docs/zh-CN/radio/group-options.md b/example/src/docs/zh-CN/radio/group-options.md new file mode 100644 index 000000000..cd951a7ef --- /dev/null +++ b/example/src/docs/zh-CN/radio/group-options.md @@ -0,0 +1,19 @@ +

+ +

+ +## Radio 单选框 + + + +用于配置不同场景的选项,在一组备选项中进行单选。 + +
+ +### 单选框事件 + +可在 RadioGroup 组件上设置 `options ` 属性,可循环配置 Radio。 + + + +
diff --git a/example/src/docs/zh-CN/radio/radio-default.md b/example/src/docs/zh-CN/radio/radio-default.md new file mode 100644 index 000000000..8657f0a43 --- /dev/null +++ b/example/src/docs/zh-CN/radio/radio-default.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Radio 单选框 + + + +用于配置不同场景的选项,在一组备选项中进行单选。 + +
+ +### 默认插槽 + +通过 `default` 默认插槽列表。 + + + +
diff --git a/example/src/docs/zh-CN/radio/radio-events.md b/example/src/docs/zh-CN/radio/radio-events.md new file mode 100644 index 000000000..080856a8b --- /dev/null +++ b/example/src/docs/zh-CN/radio/radio-events.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Radio 单选框 + + + +用于配置不同场景的选项,在一组备选项中进行单选。 +
+ +### 单选框事件 + +可在 Radio、RadioGroup 组件上设置 `change` 事件,当绑定值变化时触发,回调函数为选中的 Radio label 值。 + + + +
diff --git a/example/src/docs/zh-CN/radio/radio-size.md b/example/src/docs/zh-CN/radio/radio-size.md new file mode 100644 index 000000000..a38bc0915 --- /dev/null +++ b/example/src/docs/zh-CN/radio/radio-size.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Radio 单选框 + + + +用于配置不同场景的选项,在一组备选项中进行单选。 +
+ +### 尺寸设置 + +可对按钮形式的 Radio 或带有边框的 Radio 设置 `size` 属性,以改变其尺寸,包括 medium、small、mini 三个选项。 + + + +
diff --git a/example/src/docs/zh-CN/radio/radio-text.md b/example/src/docs/zh-CN/radio/radio-text.md new file mode 100644 index 000000000..720d2eda4 --- /dev/null +++ b/example/src/docs/zh-CN/radio/radio-text.md @@ -0,0 +1,36 @@ +
+

+ +

+ +## Radio 单选框 + + + +用于配置不同场景的选项,在一组备选项中进行单选。 + +
+ +### 文字内容 + +可在 Radio 组件上设置 `text` 属性,设置内容。 + + + +
+ +### 按钮内容 + +通过 `label` 属性可以设置 Radio 的内容 + + + +
+ +### name + +通过 `name` 属性可以设置原生 name 属性。 + + + +
diff --git a/example/src/docs/zh-CN/radio/radio-value.md b/example/src/docs/zh-CN/radio/radio-value.md new file mode 100644 index 000000000..2a9ba7a19 --- /dev/null +++ b/example/src/docs/zh-CN/radio/radio-value.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Radio 单选框 + + + +用于配置不同场景的选项,在一组备选项中进行单选。 + +
+ +### 垂直布局 + +可在 RadioGroup 组件上设置 `value/v-model` 属性,绑定值。 + + + +
diff --git a/example/src/docs/zh-CN/radio/vertical.md b/example/src/docs/zh-CN/radio/vertical.md new file mode 100644 index 000000000..a4b4cf7ab --- /dev/null +++ b/example/src/docs/zh-CN/radio/vertical.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Radio 单选框 + + + +用于配置不同场景的选项,在一组备选项中进行单选。 +
+ +### 垂直布局 + +可在 RadioGroup 组件上设置 `vertical` 属性,使单选框垂直布局。 + + + +
diff --git a/example/src/docs/zh-CN/radio/with-border.md b/example/src/docs/zh-CN/radio/with-border.md new file mode 100644 index 000000000..c0e278f0b --- /dev/null +++ b/example/src/docs/zh-CN/radio/with-border.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Radio 单选框 + + + +用于配置不同场景的选项,在一组备选项中进行单选。 +
+ +### 带有边框 + +可通过设置 `border` 属性,给单选框增加边框。 + + + +
diff --git a/example/src/docs/zh-CN/rate/allow-half.md b/example/src/docs/zh-CN/rate/allow-half.md new file mode 100644 index 000000000..e5e3d8492 --- /dev/null +++ b/example/src/docs/zh-CN/rate/allow-half.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Rate 评分 + + + +Rate 快速评级,对评价进行展示。 +
+ +### 半选 + +可通过 `allow-half` 定义是否支持半选。 + + + +
diff --git a/example/src/docs/zh-CN/rate/basic-usage.md b/example/src/docs/zh-CN/rate/basic-usage.md new file mode 100644 index 000000000..ab460c108 --- /dev/null +++ b/example/src/docs/zh-CN/rate/basic-usage.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Rate 评分 + + + +Rate 快速评级,对评价进行展示。 +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/zh-CN/rate/custom-3-threshold-colors.md b/example/src/docs/zh-CN/rate/custom-3-threshold-colors.md new file mode 100644 index 000000000..01590620d --- /dev/null +++ b/example/src/docs/zh-CN/rate/custom-3-threshold-colors.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Rate 评分 + + + +Rate 快速评级,对评价进行展示。 +
+ +### 自定义 3 分段颜色 + +可通过 `colors` 定义 3 分段颜色。 + + + +
diff --git a/example/src/docs/zh-CN/rate/custom-3-threshold-icon.md b/example/src/docs/zh-CN/rate/custom-3-threshold-icon.md new file mode 100644 index 000000000..b4e673402 --- /dev/null +++ b/example/src/docs/zh-CN/rate/custom-3-threshold-icon.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Rate 评分 + + + +Rate 快速评级,对评价进行展示。 +
+ +### 自定义 3 分段图标样式 + +可通过 `icon-classes` 自定义 3 分段图标样式。 + + + +
diff --git a/example/src/docs/zh-CN/rate/disabled-not-selected-style.md b/example/src/docs/zh-CN/rate/disabled-not-selected-style.md new file mode 100644 index 000000000..06ac0b520 --- /dev/null +++ b/example/src/docs/zh-CN/rate/disabled-not-selected-style.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## Rate 评分 + + + +Rate 快速评级,对评价进行展示。 +
+ +### 自定义禁用时未选中图标颜色 + +可通过 `disabled-void-color` 自定义禁用时未选中图标颜色。 + + + +### 自定义禁用时未选中图标类名 + +可通过 `disabled-void-icon-class` 自定义禁用时未选中图标类名。 + + + +
diff --git a/example/src/docs/zh-CN/rate/dynamic-disable.md b/example/src/docs/zh-CN/rate/dynamic-disable.md new file mode 100644 index 000000000..9761152f4 --- /dev/null +++ b/example/src/docs/zh-CN/rate/dynamic-disable.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Rate 评分 + + + +Rate 快速评级,对评价进行展示。 +
+ +### 禁用 + +可通过 `disabled` 定义是否禁用。 + + + +
diff --git a/example/src/docs/zh-CN/rate/max-score.md b/example/src/docs/zh-CN/rate/max-score.md new file mode 100644 index 000000000..2f61794bd --- /dev/null +++ b/example/src/docs/zh-CN/rate/max-score.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Rate 评分 + + + +Rate 快速评级,对评价进行展示。 +
+ +### 最大分值 + +可通过 `max` 设置最大分值。 + + + +
diff --git a/example/src/docs/zh-CN/rate/not-selected-style.md b/example/src/docs/zh-CN/rate/not-selected-style.md new file mode 100644 index 000000000..800dd9c08 --- /dev/null +++ b/example/src/docs/zh-CN/rate/not-selected-style.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## Rate 评分 + + + +Rate 快速评级,对评价进行展示。 +
+ +### 自定义未选中图标颜色 + +可通过 `void-color` 定义未选中图标颜色。 + + + +### 自定义未选中图标类名 + +可通过 `void-icon-class` 定义未选中图标类名。 + + + +
diff --git a/example/src/docs/zh-CN/rate/radio-rate.md b/example/src/docs/zh-CN/rate/radio-rate.md new file mode 100644 index 000000000..7b89a45ad --- /dev/null +++ b/example/src/docs/zh-CN/rate/radio-rate.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Rate 评分 + + + +Rate 快速评级,对评价进行展示。 +
+ +### 单选模式 + +可通过 `radio` 设置单选模式。 + + + +
diff --git a/example/src/docs/zh-CN/rate/rate-events.md b/example/src/docs/zh-CN/rate/rate-events.md new file mode 100644 index 000000000..6606021b8 --- /dev/null +++ b/example/src/docs/zh-CN/rate/rate-events.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Rate 评分 + + + +Rate 快速评级,对评价进行展示。 +
+ +### 事件 + +监听 `change` 事件触发处理方法。 + + + +
diff --git a/example/src/docs/zh-CN/rate/show-score.md b/example/src/docs/zh-CN/rate/show-score.md new file mode 100644 index 000000000..eb77d3e9a --- /dev/null +++ b/example/src/docs/zh-CN/rate/show-score.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Rate 评分 + + + +Rate 快速评级,对评价进行展示。 +
+ +### 分数显示 + +可通过 `show-score score-template` 分别定义是否显示分数和显示的模板。 + + + +
diff --git a/example/src/docs/zh-CN/rate/size-and-space.md b/example/src/docs/zh-CN/rate/size-and-space.md new file mode 100644 index 000000000..ac7c5b591 --- /dev/null +++ b/example/src/docs/zh-CN/rate/size-and-space.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Rate 评分 + + + +Rate 快速评级,对评价进行展示。 +
+ +### 大小及占位宽度 + +可通过 `size space` 分别大小和占位宽度。 + + + +
diff --git a/example/src/docs/zh-CN/rate/text-on-bottom.md b/example/src/docs/zh-CN/rate/text-on-bottom.md new file mode 100644 index 000000000..a1b2330ae --- /dev/null +++ b/example/src/docs/zh-CN/rate/text-on-bottom.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Rate 评分 + + + +Rate 快速评级,对评价进行展示。 +
+ +### 图标下文字提示 + +可通过 `text-on-bottom` 定义是否在图标下显示文字提示。 + + + +
diff --git a/example/src/docs/zh-CN/rate/texts-and-text-color.md b/example/src/docs/zh-CN/rate/texts-and-text-color.md new file mode 100644 index 000000000..b2be840f7 --- /dev/null +++ b/example/src/docs/zh-CN/rate/texts-and-text-color.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Rate 评分 + + + +Rate 快速评级,对评价进行展示。 +
+ +### 辅助文字及颜色 + +可通过 `texts show-text text-color` 三个属性分别设置辅助文字内容、是否显示辅助文字及辅助文字颜色。 + + + +
diff --git a/example/src/docs/zh-CN/rate/threshold-value.md b/example/src/docs/zh-CN/rate/threshold-value.md new file mode 100644 index 000000000..fb49a9022 --- /dev/null +++ b/example/src/docs/zh-CN/rate/threshold-value.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Rate 评分 + + + +Rate 快速评级,对评价进行展示。 +
+ +### 界限值 + +可通过 `low-threshold high-threshold` 分别设置下限值和上限值,通过`colors`配置显示星的颜色 + + + +
diff --git a/example/src/docs/zh-CN/scroll-text/basic-usage.md b/example/src/docs/zh-CN/scroll-text/basic-usage.md new file mode 100644 index 000000000..ec7896008 --- /dev/null +++ b/example/src/docs/zh-CN/scroll-text/basic-usage.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## ScrollText 文字滚动 + + + +常用于文字提示信息滚动轮播显示。 +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/zh-CN/scroll-text/custom-scroll-text.md b/example/src/docs/zh-CN/scroll-text/custom-scroll-text.md new file mode 100644 index 000000000..b402f91f4 --- /dev/null +++ b/example/src/docs/zh-CN/scroll-text/custom-scroll-text.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## ScrollText 文字滚动 + + + +常用于文字提示信息滚动轮播显示。 +
+ +### 自定义文本内容 + +可通过 `text` 自定义文本内容。 + + + +### 通过 solt 插槽自定义文本内容 + +可通过 solt 插槽自定义文本内容。 + + + +
diff --git a/example/src/docs/zh-CN/scroll-text/custom-text-style.md b/example/src/docs/zh-CN/scroll-text/custom-text-style.md new file mode 100644 index 000000000..e6f9ea426 --- /dev/null +++ b/example/src/docs/zh-CN/scroll-text/custom-text-style.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## ScrollText 文字滚动 + + + +常用于文字提示信息滚动轮播显示。 +
+ +### 自定义文本样式 + +可通过 `class` 自定义文本样式。 + + + +
diff --git a/example/src/docs/zh-CN/scroll-text/hover-stop.md b/example/src/docs/zh-CN/scroll-text/hover-stop.md new file mode 100644 index 000000000..c8ab58753 --- /dev/null +++ b/example/src/docs/zh-CN/scroll-text/hover-stop.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## ScrollText 文字滚动 + + + +常用于文字提示信息滚动轮播显示。 +
+ +### 鼠标悬停时文本停止滚动 + +可通过 `hover-stop` 设鼠标悬停时文本是否停止滚动。 + + + +
diff --git a/example/src/docs/zh-CN/scroll-text/scroll-direction.md b/example/src/docs/zh-CN/scroll-text/scroll-direction.md new file mode 100644 index 000000000..c74b9f2e9 --- /dev/null +++ b/example/src/docs/zh-CN/scroll-text/scroll-direction.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## ScrollText 文字滚动 + + + +常用于文字提示信息滚动轮播显示。 +
+ +### 文字滚动方向 + +可通过 `direction` 设置文字滚动方向。 + + + +
diff --git a/example/src/docs/zh-CN/scroll-text/scroll-time.md b/example/src/docs/zh-CN/scroll-text/scroll-time.md new file mode 100644 index 000000000..d044b1612 --- /dev/null +++ b/example/src/docs/zh-CN/scroll-text/scroll-time.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## ScrollText 文字滚动 + + + +常用于文字提示信息滚动轮播显示。 +
+ +### 滚动时间间隔 + +可通过 `time` 设置滚动时间间隔。 + + + +
diff --git a/example/src/docs/zh-CN/search/basic-usage.md b/example/src/docs/zh-CN/search/basic-usage.md new file mode 100644 index 000000000..9b1df1b9f --- /dev/null +++ b/example/src/docs/zh-CN/search/basic-usage.md @@ -0,0 +1,27 @@ + +
+

+ +

+ +## Search 搜索 + + + +指定条件对象进行搜索数据。 +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/zh-CN/search/clearable.md b/example/src/docs/zh-CN/search/clearable.md new file mode 100644 index 000000000..edd29dcb7 --- /dev/null +++ b/example/src/docs/zh-CN/search/clearable.md @@ -0,0 +1,28 @@ + +
+

+ +

+ +## Search 搜索 + + + +指定条件对象进行搜索数据。 +
+ +### 可清除 + +可通过 `clearable` 属性设置显示清空图标按钮。 + + + +
+ diff --git a/example/src/docs/zh-CN/search/custom-search-types.md b/example/src/docs/zh-CN/search/custom-search-types.md new file mode 100644 index 000000000..b95dae87d --- /dev/null +++ b/example/src/docs/zh-CN/search/custom-search-types.md @@ -0,0 +1,25 @@ + +
+

+ +

+ +## Search 搜索 + + + +指定条件对象进行搜索数据。 +
+ +### 自定义搜索类型的内容 + + + +
diff --git a/example/src/docs/zh-CN/search/default-value.md b/example/src/docs/zh-CN/search/default-value.md new file mode 100644 index 000000000..6557e1820 --- /dev/null +++ b/example/src/docs/zh-CN/search/default-value.md @@ -0,0 +1,27 @@ + +
+

+ +

+ +## Search 搜索 + + + +指定条件对象进行搜索数据。 +
+ +### 默认值搜索 + +可通过 `v-model` 配置组件默认搜索条件。 + + + +
diff --git a/example/src/docs/zh-CN/search/mini-mode.md b/example/src/docs/zh-CN/search/mini-mode.md new file mode 100644 index 000000000..2076e221c --- /dev/null +++ b/example/src/docs/zh-CN/search/mini-mode.md @@ -0,0 +1,27 @@ + +
+

+ +

+ +## Search 搜索 + + + +指定条件对象进行搜索数据。 +
+ +### 迷你模式 + +可通过 `mini` 设置组件为mini模式。 + + + +
diff --git a/example/src/docs/zh-CN/search/search-events.md b/example/src/docs/zh-CN/search/search-events.md new file mode 100644 index 000000000..743281dd3 --- /dev/null +++ b/example/src/docs/zh-CN/search/search-events.md @@ -0,0 +1,35 @@ + +
+

+ +

+ +## Search 搜索 + + + +指定条件对象进行搜索数据。 +
+ +### 自定义 search 事件 + + + +### 自定义 change 事件 + + + +
+ +### 自定义 select 事件 + + + +
diff --git a/example/src/docs/zh-CN/search/search-in-navigation-menu.md b/example/src/docs/zh-CN/search/search-in-navigation-menu.md new file mode 100644 index 000000000..54d089c2b --- /dev/null +++ b/example/src/docs/zh-CN/search/search-in-navigation-menu.md @@ -0,0 +1,26 @@ + + +
+

+ +

+ +## Search 搜索 + + + +指定条件对象进行搜索数据。 +
+ +### 事件 + + + +
diff --git a/example/src/docs/zh-CN/search/search-types.md b/example/src/docs/zh-CN/search/search-types.md new file mode 100644 index 000000000..a2913029c --- /dev/null +++ b/example/src/docs/zh-CN/search/search-types.md @@ -0,0 +1,27 @@ + +
+

+ +

+ +## Search 搜索 + + + +指定条件对象进行搜索数据。 +
+ +### 搜索类型 + +可通过 `search-types` 配置组件可选的搜索类型。 + + + +
diff --git a/example/src/docs/zh-CN/search/show-selected-types.md b/example/src/docs/zh-CN/search/show-selected-types.md new file mode 100644 index 000000000..9119307b0 --- /dev/null +++ b/example/src/docs/zh-CN/search/show-selected-types.md @@ -0,0 +1,27 @@ + +
+

+ +

+ +## Search 搜索 + + + +指定条件对象进行搜索数据。 +
+ +### 自定义搜索类型 + + + + + +
diff --git a/example/src/docs/zh-CN/search/transparent-mode.md b/example/src/docs/zh-CN/search/transparent-mode.md new file mode 100644 index 000000000..725ee0aae --- /dev/null +++ b/example/src/docs/zh-CN/search/transparent-mode.md @@ -0,0 +1,29 @@ + +
+

+ +

+ +## Search 搜索 + + + +指定条件对象进行搜索数据。 +
+ +### 透明模式 + +可通过 `transparent` 设置组件为透明模式(`mini`模式下有效)。 + + + + + +
diff --git a/example/src/docs/zh-CN/select/allow-create.md b/example/src/docs/zh-CN/select/allow-create.md new file mode 100644 index 000000000..11419906a --- /dev/null +++ b/example/src/docs/zh-CN/select/allow-create.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Select 选择器 + + + +Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件。 +
+ +### 创建条目 + +通过 `allow-create` 属性可通过在输入框中输入文字来创建选项中并不存在的新的条目。注意此时 `filterable` 属性必须为真。而`default-first-option` 属性设置为 true 后,通过按下回车就可以选中当前选项列表中的第一个选项,无需使用鼠标或键盘方向键进行定位。 + + + +
+ + diff --git a/example/src/docs/zh-CN/select/automatic-select.md b/example/src/docs/zh-CN/select/automatic-select.md new file mode 100644 index 000000000..eae24412c --- /dev/null +++ b/example/src/docs/zh-CN/select/automatic-select.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Select 选择器 + + + +Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件。 +
+ +### 获取焦点既弹出下拉菜单 + +设置 `automatic-dropdown` 属性为 true 后,对于不可搜索的 Select,在输入框获得焦点后将自动弹出选项菜单。 + + + +
+ + diff --git a/example/src/docs/zh-CN/select/basic-usage.md b/example/src/docs/zh-CN/select/basic-usage.md new file mode 100644 index 000000000..403144365 --- /dev/null +++ b/example/src/docs/zh-CN/select/basic-usage.md @@ -0,0 +1,40 @@ +
+

+ +

+ +## Select 选择器 + + + +Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件。 + +:::warning +在大数据量场景,为了防止大量 dom 渲染开销导致页面卡顿,请使用 [嵌套 Grid](#/webnova/zh-CN/component/select/nest-grid) +::: + +
+ +### 基本用法 + +`v-model` 的值为当前被选中的 `tiny-option` 的 `value` 属性值。 + + + +
+ +### Select 属性 + + + +
+ +### Option 属性 + + + +
+ +### Option-Group 属性 + + diff --git a/example/src/docs/zh-CN/select/binding-obj.md b/example/src/docs/zh-CN/select/binding-obj.md new file mode 100644 index 000000000..d17e05717 --- /dev/null +++ b/example/src/docs/zh-CN/select/binding-obj.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Select 选择器 + + + +Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件。 +
+ +### 绑定值为对象 + +如果绑定值为对象时,则必须要配置 `value-key` 属性指定 value 唯一标识的键名。 + + + +
diff --git a/example/src/docs/zh-CN/select/cache-usage.md b/example/src/docs/zh-CN/select/cache-usage.md new file mode 100644 index 000000000..f2ca694b2 --- /dev/null +++ b/example/src/docs/zh-CN/select/cache-usage.md @@ -0,0 +1,26 @@ +
+

+ +

+ +## Select 选择器 + + + +Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件。 +
+ +### 配置方式 + +通过设置 `cache-op` 开启缓存功能并且通过 `options` 设置下来选项。 + + + +
+ +### 插槽方式 + +通过 slot 设置列表渲染组件为 `vue-option` 来输出下拉列表,则需要手动加入缓存功能。 + + + diff --git a/example/src/docs/zh-CN/select/clear-options.md b/example/src/docs/zh-CN/select/clear-options.md new file mode 100644 index 000000000..5910370e3 --- /dev/null +++ b/example/src/docs/zh-CN/select/clear-options.md @@ -0,0 +1,28 @@ +
+

+ +

+ +## Select 选择器 + + + +Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件。 + +
+ +### 选项可清除 + +通过 `clearable` 属性可将选择器清空,鼠标悬停于选择器上时,会出现清除图标。需要注意的是,`clearable` 属性仅适用于单选。 + + + +
+ +### name + +通过 `name` 属性可已设置 name 的属性 + + + +
diff --git a/example/src/docs/zh-CN/select/custom-empty-data-text.md b/example/src/docs/zh-CN/select/custom-empty-data-text.md new file mode 100644 index 000000000..45bcf3d96 --- /dev/null +++ b/example/src/docs/zh-CN/select/custom-empty-data-text.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Select 选择器 + + + +Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件。 +
+ +### 自定义空数据显示文字 + +通过 `no-data-text` 属性可以自定义选项为空时显示的文字。 + + + +
diff --git a/example/src/docs/zh-CN/select/custom-no-result-text.md b/example/src/docs/zh-CN/select/custom-no-result-text.md new file mode 100644 index 000000000..88d74860f --- /dev/null +++ b/example/src/docs/zh-CN/select/custom-no-result-text.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Select 选择器 + + + +Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件。 +
+ +### 自定义无匹配搜索文字 + +通过 `no-match-text` 属性可自定义搜索条件无匹配时显示的文字。 + + + +
+ + diff --git a/example/src/docs/zh-CN/select/custom-options.md b/example/src/docs/zh-CN/select/custom-options.md new file mode 100644 index 000000000..9ec77f9fb --- /dev/null +++ b/example/src/docs/zh-CN/select/custom-options.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Select 选择器 + + + +Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件。 +
+ +### 自定义下拉内容 + +通过 Option 的默认插槽实现,将自定义的 HTML 模板插入 `tiny-option` 的 slot 中即可。 + + + +
+ + diff --git a/example/src/docs/zh-CN/select/custom-prefix.md b/example/src/docs/zh-CN/select/custom-prefix.md new file mode 100644 index 000000000..10efbacba --- /dev/null +++ b/example/src/docs/zh-CN/select/custom-prefix.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Select 选择器 + + + +Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件。 +
+ +### 自定义头部内容 + +通过 `prefix` 插槽自定义输入框头部内容。 + + + +
+ + diff --git a/example/src/docs/zh-CN/select/dynamic-disable.md b/example/src/docs/zh-CN/select/dynamic-disable.md new file mode 100644 index 000000000..d0ec82705 --- /dev/null +++ b/example/src/docs/zh-CN/select/dynamic-disable.md @@ -0,0 +1,26 @@ +
+

+ +

+ +## Select 选择器 + + + +Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件。 + +
+ +### 禁用 + +设置 `disabled` 属性后整个选择器不可用。 + + + +### 下拉选项某些项禁用 + +tiny-options 标签设置 `disabled` 属性后该选项不可用。 + + + +
diff --git a/example/src/docs/zh-CN/select/filterable.md b/example/src/docs/zh-CN/select/filterable.md new file mode 100644 index 000000000..92a1cadf4 --- /dev/null +++ b/example/src/docs/zh-CN/select/filterable.md @@ -0,0 +1,28 @@ +
+

+ +

+ +## Select 选择器 + + + +Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件。 + +
+ +### 可搜索 + +通过 `filterable` 属性可启用搜索功能。默认情况下,Select 会找出所有 `label` 属性包含输入值的选项。如果希望使用其他的搜索逻辑,可以通过传入一个 `filter-method` 来实现。`filter-method` 为一个 Function,它会在输入值发生变化时调用,参数为当前输入值。 + + + +
+ +### 搜索允许复制 + +搜索单选场景,不能复制输入框的内容,需要添加属性 `allow-copy` 才能复制。属性 `allow-copy` 默认为 `false`。 +在鼠标悬浮在输入框上时,按下鼠标左键并移动鼠标,可选中之前输入文本; +在鼠标悬浮在输入框上时,点击鼠标左键,还是原有行为,即输入内容变为 placeholder,内容清空,进入输入状态; + + diff --git a/example/src/docs/zh-CN/select/hide-select-input-border.md b/example/src/docs/zh-CN/select/hide-select-input-border.md new file mode 100644 index 000000000..ca1a7591f --- /dev/null +++ b/example/src/docs/zh-CN/select/hide-select-input-border.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Select 选择器 + + + +Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件。 +
+ +### 隐藏搜索框边框 + + + +
+ + diff --git a/example/src/docs/zh-CN/select/is-drop-inherit-width.md b/example/src/docs/zh-CN/select/is-drop-inherit-width.md new file mode 100644 index 000000000..4cc965988 --- /dev/null +++ b/example/src/docs/zh-CN/select/is-drop-inherit-width.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Select 选择器 + + + +Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件。 +
+ +### 下拉列表跟随输入框宽度 + +通过 `is-drop-inherit-width` 属性设置下拉列表是否跟随输入框宽度。默认为 `false` 表示不跟随,内容可撑开下拉列表宽度,设置为 `true` 则跟随宽度。 + + + +
+ + diff --git a/example/src/docs/zh-CN/select/manual-focus-blur.md b/example/src/docs/zh-CN/select/manual-focus-blur.md new file mode 100644 index 000000000..15cfedf0c --- /dev/null +++ b/example/src/docs/zh-CN/select/manual-focus-blur.md @@ -0,0 +1,28 @@ +
+

+ +

+ +## Select 选择器 + + + +Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件。 + +
+ +### 手动获取焦点 + +通过调用 `focus()` 方法使 input 获取焦点。 + + + +
+ +### 手动失去焦点 + +通过调用 `blur()` 方法使 input 失去焦点。 + + + +
diff --git a/example/src/docs/zh-CN/select/multi-select.md b/example/src/docs/zh-CN/select/multi-select.md new file mode 100644 index 000000000..3a75158e3 --- /dev/null +++ b/example/src/docs/zh-CN/select/multi-select.md @@ -0,0 +1,35 @@ +
+

+ +

+ +## Select 选择器 + + + +Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件。 +
+ +### 多选 + +通过 `multiple` 属性启用多选功能,此时 `v-model` 的值为当前选中值所组成的数组。默认情况下选中值会以 Tag 的形式展现。 + + + +
+ +### 折叠 Tag + +多选时通过设置 `collapse-tags` 属性将选中值合并为一段文字。 + + + +
+ +### 选择个数限制 + +`multiple-limit` 属性可指定多选时用户最多可以选择的项目数,默认为 0 不限制。 + + + +
diff --git a/example/src/docs/zh-CN/select/nest-grid.md b/example/src/docs/zh-CN/select/nest-grid.md new file mode 100644 index 000000000..f4118b070 --- /dev/null +++ b/example/src/docs/zh-CN/select/nest-grid.md @@ -0,0 +1,74 @@ +
+

+ +

+ +## Select 选择器 + + + +Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件。 + +
+ +### 嵌套单选 Grid + + + +
+ +### 嵌套单选 Grid,可搜索,可清除 + + + +
+ +### 嵌套多选 Grid + + + +
+ +### 嵌套 Grid 同时开启远程搜索 + + + +
+ +### text-field + +通过 `text-field` 属性可以设置下拉框的文本对应的数据源的字段名称。 + + + +
+ +### value-field + +通过 `value-field` 属性可以下拉框的值所对应数据源的字段名称,下拉框的值用于提交到服务器。 + + + +
+ +### 嵌套 Grid 数据项禁用 + +下拉表格多选模式,通过 `select-config` 配置项的属性 `checkMethod` ,传入自定义方法判断哪些数据项被禁用,方法会判断每个数据项,需返回值为 `true` 或者 `false`,代表此数据项启用或者禁用。下拉表格单选模式,通过 `radio-config` 配置项的属性 `checkMethod` ,传入自定义方法判断哪些数据项被禁用,方法会判断每个数据项,需返回值为 `true` 或者 `false`,代表此数据项启用或者禁用。 + + + +
+ +### 嵌套 Grid 开启远程搜索 + +配置 `render-type` 为 `grid` 嵌套Grid;将 `filterable` 和 `remote` 设置为 `true`,同时传入 `remote-method` 方法,开启远程搜索。 + + + +
+ +### 嵌套 Grid 且数据量大 + + + +
diff --git a/example/src/docs/zh-CN/select/nest-tree.md b/example/src/docs/zh-CN/select/nest-tree.md new file mode 100644 index 000000000..21301ae8f --- /dev/null +++ b/example/src/docs/zh-CN/select/nest-tree.md @@ -0,0 +1,27 @@ +
+

+ +

+ +## Select 选择器 + + + +Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件。 +
+ +### 嵌套单选 Tree + + + +
+ +### 嵌套多选 Tree + + + +### 可搜索 tree + + + +
diff --git a/example/src/docs/zh-CN/select/optimization.md b/example/src/docs/zh-CN/select/optimization.md new file mode 100644 index 000000000..e6bf56cc4 --- /dev/null +++ b/example/src/docs/zh-CN/select/optimization.md @@ -0,0 +1,27 @@ +
+

+ +

+ +## Select 选择器 + + + +Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件。 + +
+ +### 配置方式 + +通过 `options` 设置下拉选项并且设置 `optimization` 开启大数据虚拟滚动功能。使用标签配置选项时不支持开启虚拟滚动。 +多选模式下,最大选中项数 `multiple-limit` 默认值为 20,如果选中项比较多,建议开启 `collapse-tags` 进行折叠显示。 + + + + diff --git a/example/src/docs/zh-CN/select/option-group.md b/example/src/docs/zh-CN/select/option-group.md new file mode 100644 index 000000000..df7694056 --- /dev/null +++ b/example/src/docs/zh-CN/select/option-group.md @@ -0,0 +1,28 @@ +
+

+ +

+ +## Select 选择器 + + + +Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件。 + +
+ +### 分组 + +使用 `tiny-option-group` 对备选项进行分组,它的 `label` 属性为分组名,使用 `disabled` 属性设置该分组下所有选项为禁用。 + + + +
+ +### 分组禁用部分选项 + +使用 `tiny-option-group` 对备选项进行分组,禁用部分分组。 + + + +
diff --git a/example/src/docs/zh-CN/select/popup-style-position.md b/example/src/docs/zh-CN/select/popup-style-position.md new file mode 100644 index 000000000..cafd2a078 --- /dev/null +++ b/example/src/docs/zh-CN/select/popup-style-position.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Select 选择器 + + + +Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件。 +
+ +### 弹出框样式与定位 + +通过 `popper-class` 属性可自定义下拉弹框的样式。`popper-append-to-body` 指定是否将弹出框插入至 body 元素。在弹出框的定位出现问题时,可将该属性设置为 false 。 + + + +
+ + diff --git a/example/src/docs/zh-CN/select/remote-filter.md b/example/src/docs/zh-CN/select/remote-filter.md new file mode 100644 index 000000000..da1d0400a --- /dev/null +++ b/example/src/docs/zh-CN/select/remote-filter.md @@ -0,0 +1,34 @@ +
+

+ +

+ +## Select 选择器 + + + +Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件。 + +
+ +### 远程搜索 + +为了启用远程搜索,需要将 `filterable` 和 `remote` 设置为 `true`,同时传入一个 `remote-method`。`remote-method` 为一个 Function,它会在输入值发生变化时调用,参数为当前输入值。`reserve-keyword` 属性在多选且可搜索时,可以在选中一个选项后保留当前的搜索关键词。 + + + +
+ +### 获焦时触发远程搜索 + + + +
+ +### 远程搜索允许复制 + +远程搜索单选场景,不能复制输入框的内容,需要添加属性 `allow-copy` 才能复制。属性 `allow-copy` 默认为 `false`。 +在鼠标悬浮在输入框上时,按下鼠标左键并移动鼠标,可选中之前输入文本; +在鼠标悬浮在输入框上时,点击鼠标左键,还是原有行为,即输入内容变为 placeholder,内容清空,进入输入状态; + + diff --git a/example/src/docs/zh-CN/select/select-events.md b/example/src/docs/zh-CN/select/select-events.md new file mode 100644 index 000000000..a93761ec3 --- /dev/null +++ b/example/src/docs/zh-CN/select/select-events.md @@ -0,0 +1,37 @@ +
+

+ +

+ +## Select 选择器 + + + +Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件。 +
+ +### change clear blur focus 事件 + +:::tip 事件说明 +change:选中值发生变化时触发,回调参数为目前的选中值 +clear:可清空的单选模式下用户点击清空按钮时触发 +blur:当 input 失去焦点时触发 +focus:当 input 获得焦点时触发 +scroll:当 select 下拉列表滚动时触发 +::: + + + +
+ +### visible-change remove-tag 事件 + +:::tip 事件说明 +visible-change:下拉框出现/隐藏时触发,回调参数为:出现则为 true,隐藏则为 false +remove-tag:多选模式下移除tag时触发,回调参数为移除的 tag 值 +::: + + + +
+ diff --git a/example/src/docs/zh-CN/select/select-size.md b/example/src/docs/zh-CN/select/select-size.md new file mode 100644 index 000000000..12aedc1e5 --- /dev/null +++ b/example/src/docs/zh-CN/select/select-size.md @@ -0,0 +1,32 @@ +
+

+ +

+ +## Select 选择器 + + + +Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件。 +
+ +### medium + +通过 `size` 属性定义输入框尺寸,可选项有 medium、small、mini 。 +通过 `options` 配置 Select 数据项,使用后不需要再配置 tiny-option。 + + + +
+ +### small + + + +
+ +### mini + + + +
diff --git a/example/src/docs/zh-CN/select/set-input-value.md b/example/src/docs/zh-CN/select/set-input-value.md new file mode 100644 index 000000000..c0316b89a --- /dev/null +++ b/example/src/docs/zh-CN/select/set-input-value.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Select 选择器 + + + +Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件。 +
+ +### 改变输入框的值 + + + +
diff --git a/example/src/docs/zh-CN/select/show-alloption.md b/example/src/docs/zh-CN/select/show-alloption.md new file mode 100644 index 000000000..bd3fa1a06 --- /dev/null +++ b/example/src/docs/zh-CN/select/show-alloption.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Select 选择器 + + + +Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件。 +
+ +### 不展示全选选项 + +`show-alloption` 属性设置为 false 后将不展示 `全选` 选项,默认为 true 。 + + + +
diff --git a/example/src/docs/zh-CN/select/show-tip.md b/example/src/docs/zh-CN/select/show-tip.md new file mode 100644 index 000000000..6819e1ad0 --- /dev/null +++ b/example/src/docs/zh-CN/select/show-tip.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Select 选择器 + + + +Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件。 +
+ +### Tip 提示 + +设置 `show-overflow-tooltip` 属性后,多选 Tag 折叠时,鼠标悬停到带有 `...` 的 Tag 会提示全部内容。 + + + +
diff --git a/example/src/docs/zh-CN/select/slot-select.md b/example/src/docs/zh-CN/select/slot-select.md new file mode 100644 index 000000000..26ebb1ae0 --- /dev/null +++ b/example/src/docs/zh-CN/select/slot-select.md @@ -0,0 +1,28 @@ +
+

+ +

+ +## Select 选择器 + + + +Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件。 + +
+ +### 空数据插槽 + +通过 `empty` 设置没有数据时显示的提示语。 + + + +
+ +### 默认插槽 + +通过 `default` 默认插槽列表。 + + + +
diff --git a/example/src/docs/zh-CN/select/tag-copy-all.md b/example/src/docs/zh-CN/select/tag-copy-all.md new file mode 100644 index 000000000..551b52d2c --- /dev/null +++ b/example/src/docs/zh-CN/select/tag-copy-all.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Select 选择器 + + + +Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件。 +
+ +### Select选择器选项支持复制所有 + +设置 `copyable` 属性后,可以复制所有的 `tag` 文本内容以逗号分隔 + + + +
diff --git a/example/src/docs/zh-CN/select/tag-copy.md b/example/src/docs/zh-CN/select/tag-copy.md new file mode 100644 index 000000000..939304fc0 --- /dev/null +++ b/example/src/docs/zh-CN/select/tag-copy.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Select 选择器 + + + +Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件。 +
+ +### Select选择器选项可复制 + +设置 `tag-selectable` 属性后,输入框中已选择的选项可通过鼠标选择,然后按 Ctrl + C 或右键进行复制。 + + + +
diff --git a/example/src/docs/zh-CN/select/upgrade-guide.md b/example/src/docs/zh-CN/select/upgrade-guide.md new file mode 100644 index 000000000..3f17b2f4e --- /dev/null +++ b/example/src/docs/zh-CN/select/upgrade-guide.md @@ -0,0 +1,29 @@ +
+

+ +

+ +## Select 选择器 + + + +Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件。 +
+ +### 升级指导 + +#### 服务请求前事件 + +TINY 2 的 Dropdown 下拉框事件中存在 `beforeRequest` 事件,经常被用于在请求服务前对参数等内容进行干预。 + +```js +beforeRequest: function (source, controller) { + source.data = { + id: 1 + } +} +``` + +但在 TINY 3 中不存在 Dropdown 下拉框,一般使用 Select 选择器组件进行替代,而该组件中并没有 `beforeRequest` 事件,那么若需要在请求服务前进行干预,需要怎么做呢?

+ +思路:在 Select 组件中通过 `tiny-option` 组件或者 `options` 属性设置数据,那么在请求服务前,就可以直接进行干预,不用任何事件。 diff --git a/example/src/docs/zh-CN/slide-bar/basic-usage.md b/example/src/docs/zh-CN/slide-bar/basic-usage.md new file mode 100644 index 000000000..c281519d9 --- /dev/null +++ b/example/src/docs/zh-CN/slide-bar/basic-usage.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## SlideBar 滚动块 + + + +SlideBar 滚动块,可以用作文字块的滑动。 +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/zh-CN/slide-bar/custom-content.md b/example/src/docs/zh-CN/slide-bar/custom-content.md new file mode 100644 index 000000000..134c2730e --- /dev/null +++ b/example/src/docs/zh-CN/slide-bar/custom-content.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## SlideBar 滚动块 + + + +SlideBar 滚动块,可以用作文字块的滑动。 +
+ +### 自定义滚动块内容 + +通过插槽自定义滚动块内容。 + + + +
diff --git a/example/src/docs/zh-CN/slide-bar/custom-tag.md b/example/src/docs/zh-CN/slide-bar/custom-tag.md new file mode 100644 index 000000000..584de12d9 --- /dev/null +++ b/example/src/docs/zh-CN/slide-bar/custom-tag.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## SlideBar 滚动块 + + + +SlideBar 滚动块,可以用作文字块的滑动。 +
+ +### 自定义 DOM 标签 + +可通过 `tag sub-tag` 自定义 DOM 标签。 + + + +
diff --git a/example/src/docs/zh-CN/slide-bar/slide-bar-events.md b/example/src/docs/zh-CN/slide-bar/slide-bar-events.md new file mode 100644 index 000000000..bbf527b3a --- /dev/null +++ b/example/src/docs/zh-CN/slide-bar/slide-bar-events.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## SlideBar 滚动块 + + + +SlideBar 滚动块,可以用作文字块的滑动。 +
+ +### 滚动块事件 + + + +
diff --git a/example/src/docs/zh-CN/slide-bar/wheel-blocks.md b/example/src/docs/zh-CN/slide-bar/wheel-blocks.md new file mode 100644 index 000000000..01aa6c344 --- /dev/null +++ b/example/src/docs/zh-CN/slide-bar/wheel-blocks.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## SlideBar 滚动块 + + + +SlideBar 滚动块,可以用作文字块的滑动。 +
+ +### 每次滚动块数 + +可通过 `wheel-blocks` 设置每次滚动块数。 +可通过 `value` 调用服务时候获取数据的来源 + + + +
diff --git a/example/src/docs/zh-CN/slider/about-step.md b/example/src/docs/zh-CN/slider/about-step.md new file mode 100644 index 000000000..3959b4083 --- /dev/null +++ b/example/src/docs/zh-CN/slider/about-step.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Slider 滑块 + + + +通过鼠标滑动滑块来确定位置和大小。多种形式,横向、纵向和范围滑块。 +
+ +### 步长 + +通过设置`step`来配置滑块滑动的步长 + + + +
diff --git a/example/src/docs/zh-CN/slider/basic-usage.md b/example/src/docs/zh-CN/slider/basic-usage.md new file mode 100644 index 000000000..29ffc7735 --- /dev/null +++ b/example/src/docs/zh-CN/slider/basic-usage.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Slider 滑块 + + + +通过鼠标滑动滑块来确定位置和大小。多种形式,横向、纵向和范围滑块。 +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/zh-CN/slider/dynamic-disable.md b/example/src/docs/zh-CN/slider/dynamic-disable.md new file mode 100644 index 000000000..0360469a2 --- /dev/null +++ b/example/src/docs/zh-CN/slider/dynamic-disable.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Slider 滑块 + + + +通过鼠标滑动滑块来确定位置和大小。多种形式,横向、纵向和范围滑块。 +
+ +### 禁用 + +通过设置属性`disabled` ,设置滑动滑块禁止滑动 + + + +
diff --git a/example/src/docs/zh-CN/slider/max-min.md b/example/src/docs/zh-CN/slider/max-min.md new file mode 100644 index 000000000..710fe4d48 --- /dev/null +++ b/example/src/docs/zh-CN/slider/max-min.md @@ -0,0 +1,28 @@ +
+

+ +

+ +## Slider 滑块 + + + +通过鼠标滑动滑块来确定位置和大小。多种形式,横向、纵向和范围滑块。 + +
+ +### 最大最小值 + +通过设置`min` `max` 来设置滑块取值范围 + + + +
+ +### 当前值 + +通过设置`format-tooltip` 来属性设置 value + + + +
diff --git a/example/src/docs/zh-CN/slider/range-select.md b/example/src/docs/zh-CN/slider/range-select.md new file mode 100644 index 000000000..49b25983f --- /dev/null +++ b/example/src/docs/zh-CN/slider/range-select.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Slider 滑块 + + + +通过鼠标滑动滑块来确定位置和大小。多种形式,横向、纵向和范围滑块。 +
+ +### 范围选择 + +通过`v-model` 为数组 设定初始范围选择 + + + +
diff --git a/example/src/docs/zh-CN/slider/shortcut-operation.md b/example/src/docs/zh-CN/slider/shortcut-operation.md new file mode 100644 index 000000000..44245165c --- /dev/null +++ b/example/src/docs/zh-CN/slider/shortcut-operation.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Slider 滑块 + + + +通过鼠标滑动滑块来确定位置和大小。多种形式,横向、纵向和范围滑块。 +
+ +### 快捷键操作 + +设置总步数,即按快捷键 PageDown/PageUp 时,每次移动的距离是(最大值-最小值)/分页数 + + + +
diff --git a/example/src/docs/zh-CN/slider/show-input.md b/example/src/docs/zh-CN/slider/show-input.md new file mode 100644 index 000000000..42b9f6484 --- /dev/null +++ b/example/src/docs/zh-CN/slider/show-input.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Slider 滑块 + + + +通过鼠标滑动滑块来确定位置和大小。多种形式,横向、纵向和范围滑块。 +
+ +### 输入框模式 + +通过配置`show-input`,开启滑块输入框模式 + + + +
diff --git a/example/src/docs/zh-CN/slider/show-tip.md b/example/src/docs/zh-CN/slider/show-tip.md new file mode 100644 index 000000000..f3eb02fd0 --- /dev/null +++ b/example/src/docs/zh-CN/slider/show-tip.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Slider 滑块 + + + +通过鼠标滑动滑块来确定位置和大小。多种形式,横向、纵向和范围滑块。 +
+ +### 提示 + +通过设定`:show-tip="false"`,关闭滑块提示。(默认开启) + + + +
diff --git a/example/src/docs/zh-CN/slider/slider-events.md b/example/src/docs/zh-CN/slider/slider-events.md new file mode 100644 index 000000000..8cd4f7b4b --- /dev/null +++ b/example/src/docs/zh-CN/slider/slider-events.md @@ -0,0 +1,31 @@ +
+

+ +

+ +## Slider 滑块 + + + +通过鼠标滑动滑块来确定位置和大小。多种形式,横向、纵向和范围滑块。 +
+ +### 事件 + +

change 事件

+ + + +
+ +

start 滑块开始滑动事件

+ + + +
+ +

stop 滑块停止滑动事件

+ + + +
diff --git a/example/src/docs/zh-CN/slider/slider-slot.md b/example/src/docs/zh-CN/slider/slider-slot.md new file mode 100644 index 000000000..766642805 --- /dev/null +++ b/example/src/docs/zh-CN/slider/slider-slot.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## Slider 滑块 + + + +通过鼠标滑动滑块来确定位置和大小。多种形式,横向、纵向和范围滑块。 +
+ +### 自定义插槽 + + + +
+ diff --git a/example/src/docs/zh-CN/slider/vertical-mode.md b/example/src/docs/zh-CN/slider/vertical-mode.md new file mode 100644 index 000000000..4635c9e75 --- /dev/null +++ b/example/src/docs/zh-CN/slider/vertical-mode.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Slider 滑块 + + + +通过鼠标滑动滑块来确定位置和大小。多种形式,横向、纵向和范围滑块。 +
+ +### 竖向模式 + +通过设置`vertical` 属性来展示滑块竖向模式(不设置,默认为横向模式) +竖向模式可以通过 `height` 设置组件高度 + + + +
diff --git a/example/src/docs/zh-CN/split/basic-usage.md b/example/src/docs/zh-CN/split/basic-usage.md new file mode 100644 index 000000000..94cfe1126 --- /dev/null +++ b/example/src/docs/zh-CN/split/basic-usage.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Split 面板分割 + + + +常用于将一片区域,分割为可以拖拽调整宽度或高度的两部分区域。 +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/zh-CN/split/nested-use.md b/example/src/docs/zh-CN/split/nested-use.md new file mode 100644 index 000000000..9ce25e5c2 --- /dev/null +++ b/example/src/docs/zh-CN/split/nested-use.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Split 面板分割 + + + +常用于将一片区域,分割为可以拖拽调整宽度或高度的两部分区域。 +
+ +### 嵌套使用 + + + +
diff --git a/example/src/docs/zh-CN/split/split-events.md b/example/src/docs/zh-CN/split/split-events.md new file mode 100644 index 000000000..dd62123e9 --- /dev/null +++ b/example/src/docs/zh-CN/split/split-events.md @@ -0,0 +1,35 @@ +
+

+ +

+ +## Split 面板分割 + + + +常用于将一片区域,分割为可以拖拽调整宽度或高度的两部分区域。 +
+ +### movestart 事件 + +开始移动事件 + + + +
+ +### moving 事件 + +移动中事件 + + + +
+ +### moveend 事件 + +移动完成事件 + + + +
diff --git a/example/src/docs/zh-CN/split/split-mode.md b/example/src/docs/zh-CN/split/split-mode.md new file mode 100644 index 000000000..f8a0e0e6e --- /dev/null +++ b/example/src/docs/zh-CN/split/split-mode.md @@ -0,0 +1,23 @@ +
+

+ +

+ +## Split 面板分割 + + + +常用于将一片区域,分割为可以拖拽调整宽度或高度的两部分区域。 +
+ +### 分割方式 + +同个mode设置分割类型,可选值为 `horizontal`(横向) 或 `vertical`(纵向);默认值`horizontal`。 + + + +### 不可拖拽 + + + +
diff --git a/example/src/docs/zh-CN/split/split-slot.md b/example/src/docs/zh-CN/split/split-slot.md new file mode 100644 index 000000000..3659af0cc --- /dev/null +++ b/example/src/docs/zh-CN/split/split-slot.md @@ -0,0 +1,29 @@ +
+

+ +

+ +## Split 面板分割 + + + +常用于将一片区域,分割为可以拖拽调整宽度或高度的两部分区域。 +
+ +### 左右面板插槽 + + + +
+ +### 上下面板插槽 + + + +
+ +### 拖拽插槽 + + + +
diff --git a/example/src/docs/zh-CN/split/split-threshold.md b/example/src/docs/zh-CN/split/split-threshold.md new file mode 100644 index 000000000..c8764123a --- /dev/null +++ b/example/src/docs/zh-CN/split/split-threshold.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Split 面板分割 + + + +常用于将一片区域,分割为可以拖拽调整宽度或高度的两部分区域。 +
+ +### 面板阈值 + + + +
diff --git a/example/src/docs/zh-CN/steps/advanced-steps.md b/example/src/docs/zh-CN/steps/advanced-steps.md new file mode 100644 index 000000000..017ce90a1 --- /dev/null +++ b/example/src/docs/zh-CN/steps/advanced-steps.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Steps 步骤条 + + +
+ +### 高级向导 + +设置 `type` 为 `advanced` 启用高级向导功能。 + + + +
diff --git a/example/src/docs/zh-CN/steps/basic-usage.md b/example/src/docs/zh-CN/steps/basic-usage.md new file mode 100644 index 000000000..fa88b1fbd --- /dev/null +++ b/example/src/docs/zh-CN/steps/basic-usage.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Steps 步骤条 + + +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/zh-CN/steps/custom-steps-item.md b/example/src/docs/zh-CN/steps/custom-steps-item.md new file mode 100644 index 000000000..d32cc3f54 --- /dev/null +++ b/example/src/docs/zh-CN/steps/custom-steps-item.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Steps 步骤条 + + +
+ +### 自定义数据项 + +默认情况下,绑定数据的子对象包含 name、count、status 字段。 +`name-field`:设置节点信息中名称对应的字段名,默认为 'name' 。 +`count-field`:设置高级向导里徽标计数对应的字段名,默认为 'count' 。 +`status-field`:设置数据状态对应的字段名,默认为 'status' 。 + + + +
diff --git a/example/src/docs/zh-CN/steps/data-resource.md b/example/src/docs/zh-CN/steps/data-resource.md new file mode 100644 index 000000000..1d768c743 --- /dev/null +++ b/example/src/docs/zh-CN/steps/data-resource.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Steps 步骤条 + + +
+ +### 数据源 + +通过 `data` 属性配置步骤条数据源。 + + + +
diff --git a/example/src/docs/zh-CN/steps/normal-steps.md b/example/src/docs/zh-CN/steps/normal-steps.md new file mode 100644 index 000000000..a5e15dfee --- /dev/null +++ b/example/src/docs/zh-CN/steps/normal-steps.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Steps 步骤条 + + +
+ +### 普通步骤条 + +使用 `tiny-time-line` 标签,并设置 `type` 为 `normal` 实现普通步骤条。 + + + +
diff --git a/example/src/docs/zh-CN/steps/order-progress.md b/example/src/docs/zh-CN/steps/order-progress.md new file mode 100644 index 000000000..89e62a5f8 --- /dev/null +++ b/example/src/docs/zh-CN/steps/order-progress.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Steps 步骤条 + + +
+ +### 订单流程 + +通过 Steps 组件模拟订单流程。 + + + +
diff --git a/example/src/docs/zh-CN/steps/steps-event.md b/example/src/docs/zh-CN/steps/steps-event.md new file mode 100644 index 000000000..362af6633 --- /dev/null +++ b/example/src/docs/zh-CN/steps/steps-event.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Steps 步骤条 + + +
+ +### 点击事件 + +点击节点时触发 `click` 事件。 + + + +
diff --git a/example/src/docs/zh-CN/steps/steps-slot.md b/example/src/docs/zh-CN/steps/steps-slot.md new file mode 100644 index 000000000..cf1c37ed5 --- /dev/null +++ b/example/src/docs/zh-CN/steps/steps-slot.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Steps 步骤条 + + +
+ +### 插槽的使用 + +通过作用域插槽 `item` 自定义步骤条节点内容。 + + + +
diff --git a/example/src/docs/zh-CN/steps/timeline-steps.md b/example/src/docs/zh-CN/steps/timeline-steps.md new file mode 100644 index 000000000..c66c8504d --- /dev/null +++ b/example/src/docs/zh-CN/steps/timeline-steps.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Steps 步骤条 + + +
+ +### 时间线步骤条 + +使用 `tiny-time-line` 标签,并设置 `type` 为 `timeline` 实现时间线步骤条。同时若配置 `vertical` 属性,时间线步骤条将变成竖向模式,而若再配置 `reverse` 属性,则还可以实现时间线步骤条竖向模式的反向形式。 + + + +
diff --git a/example/src/docs/zh-CN/switch/basic-usage.md b/example/src/docs/zh-CN/switch/basic-usage.md new file mode 100644 index 000000000..eb6b91e84 --- /dev/null +++ b/example/src/docs/zh-CN/switch/basic-usage.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Switch 开关 + + + +Switch 在两种状态间切换选择。 +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/zh-CN/switch/custom-open-close.md b/example/src/docs/zh-CN/switch/custom-open-close.md new file mode 100644 index 000000000..b35bc0564 --- /dev/null +++ b/example/src/docs/zh-CN/switch/custom-open-close.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Switch 开关 + + + +通过具名插槽 open 和 close 自定义 Switch 显示。 +
+ +### 自定义开关显示 + + + +
diff --git a/example/src/docs/zh-CN/switch/custom-true-false-value.md b/example/src/docs/zh-CN/switch/custom-true-false-value.md new file mode 100644 index 000000000..2b9d70fc8 --- /dev/null +++ b/example/src/docs/zh-CN/switch/custom-true-false-value.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Switch 开关 + + + +通过 true-value 和 false-value 属性设置 Switch 在开和关状态下的不同取值。 +
+ +### 自定义开关取值 + +`false-value` 属性表示的是关闭时取付给 `false-value` 的值。 +`true-value` 属性表示的是开启时取付给 `true-value` 的值,v-model里定义的属性名是 `value` 时就能拿的到 `true-value` 或`false-value` 里的值。 + + + +
diff --git a/example/src/docs/zh-CN/switch/dynamic-disable.md b/example/src/docs/zh-CN/switch/dynamic-disable.md new file mode 100644 index 000000000..656914823 --- /dev/null +++ b/example/src/docs/zh-CN/switch/dynamic-disable.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Switch 开关 + + + +通过 disabled 属性设置 Switch 禁用状态。 +
+ +### 禁用状态 + +`disable` 属性表示的是当前状态是无法被使用的,默认值为false(true/false)。 + + + +
diff --git a/example/src/docs/zh-CN/switch/enent.md b/example/src/docs/zh-CN/switch/enent.md new file mode 100644 index 000000000..01f45f4c8 --- /dev/null +++ b/example/src/docs/zh-CN/switch/enent.md @@ -0,0 +1,16 @@ +
+

+ +

+ +## Switch 开关 + + +
+ +### Switch事件 + +可在 `switch` 组件上设置 change 事件,当绑定值变化时触发 + + +
diff --git a/example/src/docs/zh-CN/switch/mini-mode.md b/example/src/docs/zh-CN/switch/mini-mode.md new file mode 100644 index 000000000..e96f7464e --- /dev/null +++ b/example/src/docs/zh-CN/switch/mini-mode.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Switch 开关 + + + +设置是否显示为 mini 模式,默认为 false。当设置 `mini` 为 `true` 时,不会显示文字提示。 +
+ +### 迷你尺寸 + + + +
diff --git a/example/src/docs/zh-CN/tabs/basic-usage.md b/example/src/docs/zh-CN/tabs/basic-usage.md new file mode 100644 index 000000000..2de3ef0f9 --- /dev/null +++ b/example/src/docs/zh-CN/tabs/basic-usage.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Tabs 标签页 + + + +分隔内容上有关联但属于不同类别的数据集合。 +
+ +### 基本用法 + +通过 `v-model` 设置初始激活的标签页,绑定的值对应 `tiny-tab-item` 元素中 `name` 属性的值。一个 `tiny-tab-item` 为一个标签页,通过 `title` 属性设置标签页标题。 + + + +
+ + diff --git a/example/src/docs/zh-CN/tabs/before-leave.md b/example/src/docs/zh-CN/tabs/before-leave.md new file mode 100644 index 000000000..b2985b6b0 --- /dev/null +++ b/example/src/docs/zh-CN/tabs/before-leave.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tabs 标签页 + + + +分隔内容上有关联但属于不同类别的数据集合。 +
+ +### 离开前事件 + +`before-leave` 切换标签之前的钩子函数,若返回 false 或者返回 Promise 且被 reject,则阻止切换,返回 true 则可以切换。 + + + +
diff --git a/example/src/docs/zh-CN/tabs/custom-tab-content.md b/example/src/docs/zh-CN/tabs/custom-tab-content.md new file mode 100644 index 000000000..95f947fad --- /dev/null +++ b/example/src/docs/zh-CN/tabs/custom-tab-content.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Tabs 标签页 + + + +分隔内容上有关联但属于不同类别的数据集合。 +
+ +### 自定义标签页内容 + + + +
diff --git a/example/src/docs/zh-CN/tabs/custom-tab-title.md b/example/src/docs/zh-CN/tabs/custom-tab-title.md new file mode 100644 index 000000000..1961d2b88 --- /dev/null +++ b/example/src/docs/zh-CN/tabs/custom-tab-title.md @@ -0,0 +1,27 @@ +
+

+ +

+ +## Tabs 标签页 + + + +分隔内容上有关联但属于不同类别的数据集合。 +
+ +### 自定义标签页标题 + +通过 `tiny-tab-item` 的 `title` 插槽自定义标签页标题,比如在标题前增加图标。 + + + +
+ +### 循环创建标签页 + +通过 `v-for` 根据数据循环创建多个 `tiny-tab-item` 。 + + + +
diff --git a/example/src/docs/zh-CN/tabs/position.md b/example/src/docs/zh-CN/tabs/position.md new file mode 100644 index 000000000..efd5620f6 --- /dev/null +++ b/example/src/docs/zh-CN/tabs/position.md @@ -0,0 +1,31 @@ +
+

+ +

+ +## Tabs 标签页 + + + +分隔内容上有关联但属于不同类别的数据集合。 +
+ +### top 显示位置 + +通过 `position` 属性设置标签页显示位置,可选值有 `top`、`right`、`bottom`、`left`,默认为 `top` 。 + + + +### 右侧显示 + + + +### 下方显示 (不符合 Tiny 规范) + + + +### 左侧显示 + + + +
diff --git a/example/src/docs/zh-CN/tabs/prevent-tab-switching.md b/example/src/docs/zh-CN/tabs/prevent-tab-switching.md new file mode 100644 index 000000000..73e7c139d --- /dev/null +++ b/example/src/docs/zh-CN/tabs/prevent-tab-switching.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Tabs 标签页 + + + +分隔内容上有关联但属于不同类别的数据集合。 +
+ +### 阻止标签页切换 + + + +
diff --git a/example/src/docs/zh-CN/tabs/show-different-grid-data.md b/example/src/docs/zh-CN/tabs/show-different-grid-data.md new file mode 100644 index 000000000..3364e668d --- /dev/null +++ b/example/src/docs/zh-CN/tabs/show-different-grid-data.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tabs 标签页 + + + +分隔内容上有关联但属于不同类别的数据集合。 +
+ +### 标签页切换不同 Grid + +> Tabs 组件里使用 Grid 组件需要 Grid 设置属性 `:auto-resize="true"`,这样才能让 Grid 自适应父元素响应变化。 + + + +
diff --git a/example/src/docs/zh-CN/tabs/stretch-wh.md b/example/src/docs/zh-CN/tabs/stretch-wh.md new file mode 100644 index 000000000..f8c8e6ddb --- /dev/null +++ b/example/src/docs/zh-CN/tabs/stretch-wh.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tabs 标签页 + + + +分隔内容上有关联但属于不同类别的数据集合。 +
+ +### 可自动撑开 + +`stretch` 属性设置标签的宽度是否自撑开,默认为 false 。 + + + +
diff --git a/example/src/docs/zh-CN/tabs/tab-style.md b/example/src/docs/zh-CN/tabs/tab-style.md new file mode 100644 index 000000000..b7bd6ae41 --- /dev/null +++ b/example/src/docs/zh-CN/tabs/tab-style.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## Tabs 标签页 + + + +分隔内容上有关联但属于不同类别的数据集合。 +
+ +### card 类型 + +通过 `tab-style` 设置标签页风格类型,默认为 `card` 通过 `active-name` 设置初始激活的标签页 。 + + + +### bordercard 类型 + +通过 `tab-style` 设置标签页风格类型为 `bordercard` 。 + + + +
diff --git a/example/src/docs/zh-CN/tabs/tabs-events.md b/example/src/docs/zh-CN/tabs/tabs-events.md new file mode 100644 index 000000000..b73fee8d1 --- /dev/null +++ b/example/src/docs/zh-CN/tabs/tabs-events.md @@ -0,0 +1,37 @@ +
+

+ +

+ +## Tabs 标签页 + + + +分隔内容上有关联但属于不同类别的数据集合。 +
+ +### add 事件 + +点击新增按钮增加标签页时触发 `add` 事件 + + + +### click 事件 + +单击标签页时触发 `click` 事件 + + + +### close 事件 + +关闭标签页时触发 `close` 事件 + + + +### edit 事件 + +点击新增按钮增加标签页 或 标签页被关闭后触发 `edit` 事件 + + + +
diff --git a/example/src/docs/zh-CN/tabs/tabs-size.md b/example/src/docs/zh-CN/tabs/tabs-size.md new file mode 100644 index 000000000..658fdf9e0 --- /dev/null +++ b/example/src/docs/zh-CN/tabs/tabs-size.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Tabs 标签页 + + + +分隔内容上有关联但属于不同类别的数据集合。 +
+ +### 尺寸 + + + +
diff --git a/example/src/docs/zh-CN/tabs/with-add.md b/example/src/docs/zh-CN/tabs/with-add.md new file mode 100644 index 000000000..bd92a19e8 --- /dev/null +++ b/example/src/docs/zh-CN/tabs/with-add.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tabs 标签页 + + + +分隔内容上有关联但属于不同类别的数据集合。 +
+ +### 标签页可增加 + +设置 `with-add` 属性启用标签可增加功能。同时通过 `add` 事件自定义实现增加标签页的逻辑。配置 `show-more-tabs` 属性后当标签页超过一定宽度时将显示 `更多` 按钮。 + + + +
diff --git a/example/src/docs/zh-CN/tabs/with-close.md b/example/src/docs/zh-CN/tabs/with-close.md new file mode 100644 index 000000000..c61f87bf8 --- /dev/null +++ b/example/src/docs/zh-CN/tabs/with-close.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tabs 标签页 + + + +分隔内容上有关联但属于不同类别的数据集合。 +
+ +### 标签页可关闭 + +通过 `withClose` 属性设置是否可关闭标签页。同时可通过 `close` 事件自定义实现关闭标签页的逻辑。 + + + +
diff --git a/example/src/docs/zh-CN/tag/basic-usage.md b/example/src/docs/zh-CN/tag/basic-usage.md new file mode 100644 index 000000000..72dd6a926 --- /dev/null +++ b/example/src/docs/zh-CN/tag/basic-usage.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tag 标签 + + + +Tag 标签组件,用于标记事物的属性和维度 +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/zh-CN/tag/color-border.md b/example/src/docs/zh-CN/tag/color-border.md new file mode 100644 index 000000000..e7f274a3a --- /dev/null +++ b/example/src/docs/zh-CN/tag/color-border.md @@ -0,0 +1,27 @@ +
+

+ +

+ +## Tag 标签 + + + +Tag 标签组件,用于标记事物的属性和维度 +
+ +### 颜色 + +可通过 `color` 设置标签背景色。 + + + +
+ +### 边框 + +可通过 `hit` 设置标签边框,可选值(true/false)true为有边框,false无边框,默认值为 false。 + + + +
diff --git a/example/src/docs/zh-CN/tag/create-and-close.md b/example/src/docs/zh-CN/tag/create-and-close.md new file mode 100644 index 000000000..ce44a853e --- /dev/null +++ b/example/src/docs/zh-CN/tag/create-and-close.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## Tag 标签 + + + +Tag 标签组件,用于标记事物的属性和维度 +
+ +### 动态编辑标签 + +通过点击`+ New Tag`在文本框中输入你要定义的标签名就能在标签列表中最后一个创建标签 。`closable` 属性可以为标签设置成可去除标签。 + + + +
+ +### 可移除标签 + + + +
diff --git a/example/src/docs/zh-CN/tag/tag-effect.md b/example/src/docs/zh-CN/tag/tag-effect.md new file mode 100644 index 000000000..d52996b75 --- /dev/null +++ b/example/src/docs/zh-CN/tag/tag-effect.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Tag 标签 + + + +Tag 标签组件,用于标记事物的属性和维度 +
+ +### 主题 + +可通过 `effect` 设置Tag标签主题,可选值(dark / light / plain)。 +`type`可以为标签设置相应的类型,可选值(success / info / warning / danger)。 + + + +
diff --git a/example/src/docs/zh-CN/tag/tag-events.md b/example/src/docs/zh-CN/tag/tag-events.md new file mode 100644 index 000000000..44a0c1bf9 --- /dev/null +++ b/example/src/docs/zh-CN/tag/tag-events.md @@ -0,0 +1,23 @@ +
+

+ +

+ +## Tag 标签 + + + +Tag 标签组件,用于标记事物的属性和维度 +
+ +### Click 事件 + + + +
+ +### Close 事件 + + + +
diff --git a/example/src/docs/zh-CN/tag/tag-mode.md b/example/src/docs/zh-CN/tag/tag-mode.md new file mode 100644 index 000000000..1953a01ba --- /dev/null +++ b/example/src/docs/zh-CN/tag/tag-mode.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## Tag 标签 + + + +Tag 标签组件,用于标记事物的属性和维度 +
+ +### 基本用法 + + + +
diff --git a/example/src/docs/zh-CN/tag/tag-size.md b/example/src/docs/zh-CN/tag/tag-size.md new file mode 100644 index 000000000..f6115bf7f --- /dev/null +++ b/example/src/docs/zh-CN/tag/tag-size.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tag 标签 + + + +Tag 标签组件,用于标记事物的属性和维度 +
+ +### 尺寸 + +可通过 `size` 设置Tag标签大小,可选值(medium / small / mini)。 + + + +
diff --git a/example/src/docs/zh-CN/textpopup/basic-usage.md b/example/src/docs/zh-CN/textpopup/basic-usage.md new file mode 100644 index 000000000..37342494f --- /dev/null +++ b/example/src/docs/zh-CN/textpopup/basic-usage.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## TextPopup 输入框 + + + +TextPopup 输入框,提供数据绑定功能。 +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/zh-CN/textpopup/textpopup-label.md b/example/src/docs/zh-CN/textpopup/textpopup-label.md new file mode 100644 index 000000000..05ce80aa2 --- /dev/null +++ b/example/src/docs/zh-CN/textpopup/textpopup-label.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## TextPopup 输入框 + + + +TextPopup 输入框,提供数据绑定功能。 +
+ +### 标签名 + +`label` 相当于取一个别名的意思,可通过 `value 或 v-model` 设置标签名。 + + +
diff --git a/example/src/docs/zh-CN/textpopup/textpopup-placeholder.md b/example/src/docs/zh-CN/textpopup/textpopup-placeholder.md new file mode 100644 index 000000000..7ee83c951 --- /dev/null +++ b/example/src/docs/zh-CN/textpopup/textpopup-placeholder.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## TextPopup 输入框 + + + +TextPopup 输入框,提供数据绑定功能。 +
+ +### 提示占位文本 + +`placeholder` 属性的值为 `string` 此属性会把值默认显示到输入框中。 + + +
diff --git a/example/src/docs/zh-CN/textpopup/textpopup-readonly.md b/example/src/docs/zh-CN/textpopup/textpopup-readonly.md new file mode 100644 index 000000000..ac299d2ea --- /dev/null +++ b/example/src/docs/zh-CN/textpopup/textpopup-readonly.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## TextPopup 输入框 + + + +TextPopup 输入框,提供数据绑定功能。 +
+ +### 只读 + +可通过 `readonly` 设置是否只读。 + + +
diff --git a/example/src/docs/zh-CN/textpopup/textpopup-separtor.md b/example/src/docs/zh-CN/textpopup/textpopup-separtor.md new file mode 100644 index 000000000..1ba88cbd4 --- /dev/null +++ b/example/src/docs/zh-CN/textpopup/textpopup-separtor.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## TextPopup 输入框 + + + +TextPopup 输入框,提供数据绑定功能。 +
+ +### 分隔符 + +可通过 `separtor` 设置分隔符,在文本框中输入回车就是分隔符的位置。 + + +
diff --git a/example/src/docs/zh-CN/textpopup/textpopup-value.md b/example/src/docs/zh-CN/textpopup/textpopup-value.md new file mode 100644 index 000000000..194dda460 --- /dev/null +++ b/example/src/docs/zh-CN/textpopup/textpopup-value.md @@ -0,0 +1,24 @@ +
+

+ +

+ +## TextPopup 输入框 + + + +TextPopup 输入框,提供数据绑定功能。 +
+ +### 绑定值 + +可通过 `value` 或 `v-model` 设置绑定值。 + + +
+ +### 清除 value 值 + + + +
diff --git a/example/src/docs/zh-CN/textpopup/textpopup-width.md b/example/src/docs/zh-CN/textpopup/textpopup-width.md new file mode 100644 index 000000000..02dfef1c2 --- /dev/null +++ b/example/src/docs/zh-CN/textpopup/textpopup-width.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## TextPopup 输入框 + + + +TextPopup 输入框,提供数据绑定功能。 +
+ +### 宽度 + +可通过 `width` 设置宽度。 + + +
diff --git a/example/src/docs/zh-CN/time-line/basic-usage.md b/example/src/docs/zh-CN/time-line/basic-usage.md new file mode 100644 index 000000000..451853072 --- /dev/null +++ b/example/src/docs/zh-CN/time-line/basic-usage.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## TimeLine 时间线 + + +
+ +### 基本用法 + +通过 `data` 属性设置时间线步骤条数据,通过 `active` 属性设置步骤条的选中步骤。 + + + +
+ + diff --git a/example/src/docs/zh-CN/time-line/custom-normal-step.md b/example/src/docs/zh-CN/time-line/custom-normal-step.md new file mode 100644 index 000000000..083f4969f --- /dev/null +++ b/example/src/docs/zh-CN/time-line/custom-normal-step.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## TimeLine 时间线 + + +
+ +### 自定义横向时间线 + +`slot` 为 `top`可以自定义步骤条顶部内容,`slot` 为 `bottom` 可以自定义步骤条底部内容。 + + + +
diff --git a/example/src/docs/zh-CN/time-line/custom-vertical-step.md b/example/src/docs/zh-CN/time-line/custom-vertical-step.md new file mode 100644 index 000000000..8915313c3 --- /dev/null +++ b/example/src/docs/zh-CN/time-line/custom-vertical-step.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## TimeLine 时间线 + + +
+ +### 自定义竖向时间线 + +`slot` 为 `left`可以自定义步骤条左侧内容,`slot` 为 `right` 可以自定义步骤条右侧内容。 + + + +
diff --git a/example/src/docs/zh-CN/time-line/different-data.md b/example/src/docs/zh-CN/time-line/different-data.md new file mode 100644 index 000000000..a894b7ee7 --- /dev/null +++ b/example/src/docs/zh-CN/time-line/different-data.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## TimeLine 时间线 + + +
+ +### 数据映射 + +通过 `name-field` 属性设置节点信息中名称对应的字段名,通过 `time-field` 属性设置节点时间信息对应的字段名。 + + + +
diff --git a/example/src/docs/zh-CN/time-line/event.md b/example/src/docs/zh-CN/time-line/event.md new file mode 100644 index 000000000..bb4b088a5 --- /dev/null +++ b/example/src/docs/zh-CN/time-line/event.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## TimeLine 时间线 + + + +
+ +### click 事件 + +单击时触发 click 事件 + + + +
diff --git a/example/src/docs/zh-CN/time-line/set-start-value.md b/example/src/docs/zh-CN/time-line/set-start-value.md new file mode 100644 index 000000000..4afdf7ce5 --- /dev/null +++ b/example/src/docs/zh-CN/time-line/set-start-value.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## TimeLine 时间线 + + +
+ +### 设置序号起始值 + +通过 `start` 属性设置步骤条序号起始值。 + + + +
diff --git a/example/src/docs/zh-CN/time-line/set-step-width.md b/example/src/docs/zh-CN/time-line/set-step-width.md new file mode 100644 index 000000000..2047a7677 --- /dev/null +++ b/example/src/docs/zh-CN/time-line/set-step-width.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## TimeLine 时间线 + + +
+ +### 宽度设置 + +通过 `space`属性设置步骤条的宽度。 + + + +
diff --git a/example/src/docs/zh-CN/time-line/show-number.md b/example/src/docs/zh-CN/time-line/show-number.md new file mode 100644 index 000000000..1eca75876 --- /dev/null +++ b/example/src/docs/zh-CN/time-line/show-number.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## TimeLine 时间线 + + +
+ +### 未完成的序号显示 + +通过 `show-number` 属性设置未完成的状态是否显示序号。 + + + +
diff --git a/example/src/docs/zh-CN/time-line/show-status.md b/example/src/docs/zh-CN/time-line/show-status.md new file mode 100644 index 000000000..5f791bc10 --- /dev/null +++ b/example/src/docs/zh-CN/time-line/show-status.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## TimeLine 时间线 + + +
+ +### 显示组件内部状态 + +通过 `show-status` 属性设置是否显示组件内部状态。默认为 `false`,表示不显示。 + + + +
diff --git a/example/src/docs/zh-CN/time-line/vertical-step.md b/example/src/docs/zh-CN/time-line/vertical-step.md new file mode 100644 index 000000000..89f06aab1 --- /dev/null +++ b/example/src/docs/zh-CN/time-line/vertical-step.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## TimeLine 时间线 + + +
+ +### 竖向时间线 + +通过 `vertical` 属性设置竖向时间线。 + + + +
+ +### 竖向时间线的方向 + +通过 `reverse` 属性设置竖向步骤条的方向。 + + + +
diff --git a/example/src/docs/zh-CN/time-picker/about-clear.md b/example/src/docs/zh-CN/time-picker/about-clear.md new file mode 100644 index 000000000..b6d8d071f --- /dev/null +++ b/example/src/docs/zh-CN/time-picker/about-clear.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## TimePicker 时间选择器 + + + + +
+ +### 清除输入 + + + +
diff --git a/example/src/docs/zh-CN/time-picker/about-format.md b/example/src/docs/zh-CN/time-picker/about-format.md new file mode 100644 index 000000000..f94dc5a17 --- /dev/null +++ b/example/src/docs/zh-CN/time-picker/about-format.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## TimePicker 时间选择器 + + + + +
+ +### 格式化相关 + + + +
+ diff --git a/example/src/docs/zh-CN/time-picker/align.md b/example/src/docs/zh-CN/time-picker/align.md new file mode 100644 index 000000000..2f4188be1 --- /dev/null +++ b/example/src/docs/zh-CN/time-picker/align.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## TimePicker 时间选择器 + + + + +
+ +### 对齐方式 + + + +
+ diff --git a/example/src/docs/zh-CN/time-picker/arrow-control.md b/example/src/docs/zh-CN/time-picker/arrow-control.md new file mode 100644 index 000000000..36fb1f62c --- /dev/null +++ b/example/src/docs/zh-CN/time-picker/arrow-control.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## TimePicker 时间选择器 + + + + +
+ +### 箭头选择 + +`arrow-control` 属性设置是否使用箭头进行时间选择,仅对 `` 有效 + + + +
diff --git a/example/src/docs/zh-CN/time-picker/basic-usage.md b/example/src/docs/zh-CN/time-picker/basic-usage.md new file mode 100644 index 000000000..2f6163106 --- /dev/null +++ b/example/src/docs/zh-CN/time-picker/basic-usage.md @@ -0,0 +1,31 @@ +
+

+ +

+ +## TimePicker 时间选择器 + + + + +
+ +### 基本用法 + + + +
+ + + +
+ +### Time Picker Options + + + +
+ +### Date Format + + diff --git a/example/src/docs/zh-CN/time-picker/clear-icon.md b/example/src/docs/zh-CN/time-picker/clear-icon.md new file mode 100644 index 000000000..859491f62 --- /dev/null +++ b/example/src/docs/zh-CN/time-picker/clear-icon.md @@ -0,0 +1,27 @@ +
+

+ +

+ +## TimePicker 时间选择器 + + + + +
+ +### 清除输入 + +通过 `clear-icon` 自定义清空图标 + + + +
+ +### 清除按钮 + +通过 `clearable` 属性设置是否显示清除按钮,默认值为 true + + + +
diff --git a/example/src/docs/zh-CN/time-picker/custom-range.md b/example/src/docs/zh-CN/time-picker/custom-range.md new file mode 100644 index 000000000..39019c6c5 --- /dev/null +++ b/example/src/docs/zh-CN/time-picker/custom-range.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## TimePicker 时间选择器 + + + + +
+ +### 范围选择自定义相关 + + + +
+ diff --git a/example/src/docs/zh-CN/time-picker/date-range-shortcuts.md b/example/src/docs/zh-CN/time-picker/date-range-shortcuts.md new file mode 100644 index 000000000..68f023395 --- /dev/null +++ b/example/src/docs/zh-CN/time-picker/date-range-shortcuts.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## TimePicker 时间选择器 + + + + +
+ +### 日期范围快捷选项 + + + +
+ diff --git a/example/src/docs/zh-CN/time-picker/date-range.md b/example/src/docs/zh-CN/time-picker/date-range.md new file mode 100644 index 000000000..1187bb806 --- /dev/null +++ b/example/src/docs/zh-CN/time-picker/date-range.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## TimePicker 时间选择器 + + + + +
+ +### 选择日期范围 + + + +
+ diff --git a/example/src/docs/zh-CN/time-picker/date-shortcuts.md b/example/src/docs/zh-CN/time-picker/date-shortcuts.md new file mode 100644 index 000000000..7ef9ceb56 --- /dev/null +++ b/example/src/docs/zh-CN/time-picker/date-shortcuts.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## TimePicker 时间选择器 + + + + +
+ +### 选择日带快捷选项 + + + +
+ diff --git a/example/src/docs/zh-CN/time-picker/date.md b/example/src/docs/zh-CN/time-picker/date.md new file mode 100644 index 000000000..37e54f3af --- /dev/null +++ b/example/src/docs/zh-CN/time-picker/date.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## TimePicker 时间选择器 + + + + +
+ +### 日期显示格式 + +`WW` 属性设置周,例如 01, `W` 属性设置不补 0。 + +`yyyy` 属性设置年,例如 2020。 + +`MM` 属性设置月,例如 01 `M` 属性设置不补 0。 + +`dd` 属性设置日,例如 01 `d` 属性设置不补 0。 + + + +
diff --git a/example/src/docs/zh-CN/time-picker/default-time-of-range.md b/example/src/docs/zh-CN/time-picker/default-time-of-range.md new file mode 100644 index 000000000..b698c9a26 --- /dev/null +++ b/example/src/docs/zh-CN/time-picker/default-time-of-range.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## TimePicker 时间选择器 + + + + +
+ +### 日期范围默认时刻 + + + +
+ diff --git a/example/src/docs/zh-CN/time-picker/default-value.md b/example/src/docs/zh-CN/time-picker/default-value.md new file mode 100644 index 000000000..251cfa088 --- /dev/null +++ b/example/src/docs/zh-CN/time-picker/default-value.md @@ -0,0 +1,35 @@ +
+

+ +

+ +## TimePicker 时间选择器 + + + + +
+ +### 选择器打开时默认时间设置 + +通过 `default-value` 设置选择器打开显示默认时间 + + + +
+ +### 原生属性 + +通过 `name` 属性设置默认 name + + + +
+ +### 下拉框的类名 + +通过 `popper-class` 属性设置下拉框的类名 + + + +
diff --git a/example/src/docs/zh-CN/time-picker/disabled.md b/example/src/docs/zh-CN/time-picker/disabled.md new file mode 100644 index 000000000..050e6d924 --- /dev/null +++ b/example/src/docs/zh-CN/time-picker/disabled.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## TimePicker 时间选择器 + + +
+ +### 禁用 + + + +
diff --git a/example/src/docs/zh-CN/time-picker/editable.md b/example/src/docs/zh-CN/time-picker/editable.md new file mode 100644 index 000000000..0f445208f --- /dev/null +++ b/example/src/docs/zh-CN/time-picker/editable.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## TimePicker 时间选择器 + + + + +
+ +### 文本框不可输入 + +日期输入框默认可以输入日期,设置 `editable` 为 false 后,将不能输入。 + + + +
diff --git a/example/src/docs/zh-CN/time-picker/format.md b/example/src/docs/zh-CN/time-picker/format.md new file mode 100644 index 000000000..96ab2caa8 --- /dev/null +++ b/example/src/docs/zh-CN/time-picker/format.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## TimePicker 时间选择器 + + + + +
+ +### 时间格式化 + +`format` 时间格式化显示 +`timestamp` JS 时间戳,仅 value-format 可用;组件绑定值为 number 类型 + + diff --git a/example/src/docs/zh-CN/time-picker/is-range.md b/example/src/docs/zh-CN/time-picker/is-range.md new file mode 100644 index 000000000..8076c5fa1 --- /dev/null +++ b/example/src/docs/zh-CN/time-picker/is-range.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## TimePicker 时间选择器 + + + + +
+ +### 范围选择 + +`is-range` 设置是否为范围选择,默认为 false,`range-separator`,设置范围选择分隔符(为可选值)默认为‘-’ + + diff --git a/example/src/docs/zh-CN/time-picker/month-range-shortcuts.md b/example/src/docs/zh-CN/time-picker/month-range-shortcuts.md new file mode 100644 index 000000000..b54f9c5f1 --- /dev/null +++ b/example/src/docs/zh-CN/time-picker/month-range-shortcuts.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## TimePicker 时间选择器 + + + + +
+ +### 月份范围快捷选项 + + + +
+ diff --git a/example/src/docs/zh-CN/time-picker/month-range.md b/example/src/docs/zh-CN/time-picker/month-range.md new file mode 100644 index 000000000..47d46cdc9 --- /dev/null +++ b/example/src/docs/zh-CN/time-picker/month-range.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## TimePicker 时间选择器 + + + + +
+ +### 选择月份范围 + + + +
+ diff --git a/example/src/docs/zh-CN/time-picker/other-picker-type.md b/example/src/docs/zh-CN/time-picker/other-picker-type.md new file mode 100644 index 000000000..57c71bb9c --- /dev/null +++ b/example/src/docs/zh-CN/time-picker/other-picker-type.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## TimePicker 时间选择器 + + + + +
+ +### 其他日期单位 + + + +
+ diff --git a/example/src/docs/zh-CN/time-picker/picker-options.md b/example/src/docs/zh-CN/time-picker/picker-options.md new file mode 100644 index 000000000..91441edb9 --- /dev/null +++ b/example/src/docs/zh-CN/time-picker/picker-options.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## TimePicker 时间选择器 + + + + +
+ +### 选择范围 + +picker-options 设置时间选择范围 + + diff --git a/example/src/docs/zh-CN/time-picker/set-size.md b/example/src/docs/zh-CN/time-picker/set-size.md new file mode 100644 index 000000000..deaa35a5b --- /dev/null +++ b/example/src/docs/zh-CN/time-picker/set-size.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## TimePicker 时间选择器 + + + + +
+ +### 尺寸设置 + + + + + + + +
diff --git a/example/src/docs/zh-CN/time-picker/suffix-icon.md b/example/src/docs/zh-CN/time-picker/suffix-icon.md new file mode 100644 index 000000000..723d6ec4e --- /dev/null +++ b/example/src/docs/zh-CN/time-picker/suffix-icon.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## TimePicker 时间选择器 + + + + +
+ +### 自定义后置图标 + +通过 `suffix-icon` 属性设置日期输入框后置图标,从 `@opentiny/vue-icon` 中导入一个图标并进行初始化后传给 `suffix-icon`。 + + + +
diff --git a/example/src/docs/zh-CN/time-picker/time-low.md b/example/src/docs/zh-CN/time-picker/time-low.md new file mode 100644 index 000000000..bd7870522 --- /dev/null +++ b/example/src/docs/zh-CN/time-picker/time-low.md @@ -0,0 +1,39 @@ +
+

+ +

+ +## TimePicker 时间选择器 + + + + +
+ +### 时间显示类型 + +通过 `hh` 属性可设置 12 小时制。 `HH` 属性为 24 小时制,须和 A 或 a 使用。 `h` 与 `H` 属性设置不补 0。 + +通过 `mm` 属性可设置分钟显示格式,例如 01。 `m` 属性设置不补 0。 + +通过 `ss` 属性可设置秒的显示格式,例如 01。 `s` 属性设置不补 0。 + +通过 `a` 属性可设置显示时间为 am/pm `A`属性设置显示时间为 AM/PM。 + + + +
+ +### 时间显示类型 + +通过 `h` 与 `H` 属性设置不补 0。 + +通过 `m` 属性设置不补 0。 + +通过 `s` 属性设置不补 0。 + +通过 `a` 属性可设置显示时间为 am/pm `A`属性设置显示时间为 AM/PM。 + + + +
diff --git a/example/src/docs/zh-CN/time-picker/time-picker-events.md b/example/src/docs/zh-CN/time-picker/time-picker-events.md new file mode 100644 index 000000000..a99ea67a8 --- /dev/null +++ b/example/src/docs/zh-CN/time-picker/time-picker-events.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## TimePicker 时间选择器 + + + + +
+ +### 事件 + +当聚焦和失焦时会触发 focus 和 bulr 事件,当确定选值时会触发 change 事件 + + + +
diff --git a/example/src/docs/zh-CN/time-picker/unlink-panels.md b/example/src/docs/zh-CN/time-picker/unlink-panels.md new file mode 100644 index 000000000..efa7782dd --- /dev/null +++ b/example/src/docs/zh-CN/time-picker/unlink-panels.md @@ -0,0 +1,18 @@ +
+

+ +

+ +## TimePicker 时间选择器 + + + + +
+ +### 范围选择取消面板联动 + + + +
+ diff --git a/example/src/docs/zh-CN/time-select/basic-usage.md b/example/src/docs/zh-CN/time-select/basic-usage.md new file mode 100644 index 000000000..0e8fcf6a9 --- /dev/null +++ b/example/src/docs/zh-CN/time-select/basic-usage.md @@ -0,0 +1,33 @@ +
+

+ +

+ +## TimeSelect 时间选择器 + + + +时间选值框是下拉框的特例,按时分格式(不支持自定义格式)展示下拉列表以供用户选择,并能扩展下拉框部分参数。 +
+ +### 基本用法 + + + +
+ +### Time-select + + + +
+ +### Time Select Options + + + +
+ +### Date Format + + diff --git a/example/src/docs/zh-CN/time-select/clear-icon.md b/example/src/docs/zh-CN/time-select/clear-icon.md new file mode 100644 index 000000000..c6eef5f94 --- /dev/null +++ b/example/src/docs/zh-CN/time-select/clear-icon.md @@ -0,0 +1,32 @@ +
+

+ +

+ +## TimeSelect 时间选择器 + + + +时间选值框是下拉框的特例,按时分格式(不支持自定义格式)展示下拉列表以供用户选择,并能扩展下拉框部分参数。 + +
+ +### 清除按钮 + +通过 `clear-icon` 自定义清空图标 + + + +
+ +### 显示清除按钮 + +通过 `clearable` 属性设置是否显示清除按钮,默认值为 true + + + +### 原生属性 + +通过 `name` 属性设置原生属性。 + + diff --git a/example/src/docs/zh-CN/time-select/default-time.md b/example/src/docs/zh-CN/time-select/default-time.md new file mode 100644 index 000000000..3a04650da --- /dev/null +++ b/example/src/docs/zh-CN/time-select/default-time.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## TimeSelect 时间选择器 + + + +时间选值框是下拉框的特例,按时分格式(不支持自定义格式)展示下拉列表以供用户选择,并能扩展下拉框部分参数。 +
+ +### 默认时间 + +`default-time` 设置默认时间 + + diff --git a/example/src/docs/zh-CN/time-select/default-value.md b/example/src/docs/zh-CN/time-select/default-value.md new file mode 100644 index 000000000..7faad0b0b --- /dev/null +++ b/example/src/docs/zh-CN/time-select/default-value.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## TimeSelect 时间选择器 + + + +时间选值框是下拉框的特例,按时分格式(不支持自定义格式)展示下拉列表以供用户选择,并能扩展下拉框部分参数。 +
+ +### 选择器打开时默认时间设置 + +通过 `default-value` 设置选择器打开显示默认时间 + + diff --git a/example/src/docs/zh-CN/time-select/disabled.md b/example/src/docs/zh-CN/time-select/disabled.md new file mode 100644 index 000000000..b3a6dbafc --- /dev/null +++ b/example/src/docs/zh-CN/time-select/disabled.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## TimeSelect 时间选择器 + + + +时间选值框是下拉框的特例,按时分格式(不支持自定义格式)展示下拉列表以供用户选择,并能扩展下拉框部分参数。 +
+ +### 默认可编辑 + + + +### 禁用 + + diff --git a/example/src/docs/zh-CN/time-select/editable.md b/example/src/docs/zh-CN/time-select/editable.md new file mode 100644 index 000000000..ca5f2dfa8 --- /dev/null +++ b/example/src/docs/zh-CN/time-select/editable.md @@ -0,0 +1,22 @@ +
+

+ +

+ +## TimeSelect 时间选择器 + + + +时间选值框是下拉框的特例,按时分格式(不支持自定义格式)展示下拉列表以供用户选择,并能扩展下拉框部分参数。 +
+ + + +### 文本框不可编辑 + +日期输入框默认可以输入日期,设置 `editable` 为 false 后,将不能输入。 + + diff --git a/example/src/docs/zh-CN/time-select/event.md b/example/src/docs/zh-CN/time-select/event.md new file mode 100644 index 000000000..af53bea7f --- /dev/null +++ b/example/src/docs/zh-CN/time-select/event.md @@ -0,0 +1,23 @@ +
+

+ +

+ +## TimeSelect 时间选择器 + + + +时间选值框是下拉框的特例,按时分格式(不支持自定义格式)展示下拉列表以供用户选择,并能扩展下拉框部分参数。 +
+ +### 事件 + +`focus` input 框聚焦时触发,`blur` input 框失焦时触发 + + + +
+ +`change` 当确定选值时触发 + + diff --git a/example/src/docs/zh-CN/time-select/focus.md b/example/src/docs/zh-CN/time-select/focus.md new file mode 100644 index 000000000..d917a17f4 --- /dev/null +++ b/example/src/docs/zh-CN/time-select/focus.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## TimeSelect 时间选择器 + + + +时间选值框是下拉框的特例,按时分格式(不支持自定义格式)展示下拉列表以供用户选择,并能扩展下拉框部分参数。 +
+ +### 手动获取焦点 + + + +
diff --git a/example/src/docs/zh-CN/time-select/picker-options.md b/example/src/docs/zh-CN/time-select/picker-options.md new file mode 100644 index 000000000..a7abf7926 --- /dev/null +++ b/example/src/docs/zh-CN/time-select/picker-options.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## TimeSelect 时间选择器 + + + +时间选值框是下拉框的特例,按时分格式(不支持自定义格式)展示下拉列表以供用户选择,并能扩展下拉框部分参数。 +
+ +### 指定时间点 + +picker-options 设置时间点 + + diff --git a/example/src/docs/zh-CN/time-select/popper-class.md b/example/src/docs/zh-CN/time-select/popper-class.md new file mode 100644 index 000000000..718e62b43 --- /dev/null +++ b/example/src/docs/zh-CN/time-select/popper-class.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## TimeSelect 时间选择器 + + + +时间选值框是下拉框的特例,按时分格式(不支持自定义格式)展示下拉列表以供用户选择,并能扩展下拉框部分参数。 +
+ +### 自定义类名 + + + +
diff --git a/example/src/docs/zh-CN/time-select/range-placeholder.md b/example/src/docs/zh-CN/time-select/range-placeholder.md new file mode 100644 index 000000000..7bac09b5c --- /dev/null +++ b/example/src/docs/zh-CN/time-select/range-placeholder.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## TimeSelect 时间选择器 + + + +时间选值框是下拉框的特例,按时分格式(不支持自定义格式)展示下拉列表以供用户选择,并能扩展下拉框部分参数。 +
+ +### 固定时间范围 + + diff --git a/example/src/docs/zh-CN/time-select/size.md b/example/src/docs/zh-CN/time-select/size.md new file mode 100644 index 000000000..fd03d5249 --- /dev/null +++ b/example/src/docs/zh-CN/time-select/size.md @@ -0,0 +1,23 @@ +
+

+ +

+ +## TimeSelect 时间选择器 + + + +时间选值框是下拉框的特例,按时分格式(不支持自定义格式)展示下拉列表以供用户选择,并能扩展下拉框部分参数。 +
+ +### mini 尺寸 + + + +### small 尺寸 + + + +### medium 尺寸 + + diff --git a/example/src/docs/zh-CN/time-select/suffix-icon.md b/example/src/docs/zh-CN/time-select/suffix-icon.md new file mode 100644 index 000000000..2a89259f1 --- /dev/null +++ b/example/src/docs/zh-CN/time-select/suffix-icon.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## TimeSelect 时间选择器 + + + +时间选值框是下拉框的特例,按时分格式(不支持自定义格式)展示下拉列表以供用户选择,并能扩展下拉框部分参数。 +
+ +### 后置图标 + +通过 `suffix-icon` 属性设置日期输入框后置图标,从 `@opentiny/vue-icon` 中导入一个图标并进行初始化后传给 `suffix-icon`。 + + diff --git a/example/src/docs/zh-CN/toggle-menu/basic-usage.md b/example/src/docs/zh-CN/toggle-menu/basic-usage.md new file mode 100644 index 000000000..c18b55e2e --- /dev/null +++ b/example/src/docs/zh-CN/toggle-menu/basic-usage.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## ToggleMenu 收缩菜单 + + + +以树形方式显示、适用于版型定制的一种组件,菜单可收缩,收缩后只显示图标,点击图标展示子节点菜单。 +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/zh-CN/toggle-menu/custom-icon.md b/example/src/docs/zh-CN/toggle-menu/custom-icon.md new file mode 100644 index 000000000..46c522311 --- /dev/null +++ b/example/src/docs/zh-CN/toggle-menu/custom-icon.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## ToggleMenu 收缩菜单 + + + +以树形方式显示、适用于版型定制的一种组件,菜单可收缩,收缩后只显示图标,点击图标展示子节点菜单。 +
+ +### 自定义菜单左侧图标 + +可通过 `icon` 属性自定义菜单左侧图标。 + + + +
diff --git a/example/src/docs/zh-CN/toggle-menu/custom-searchicon.md b/example/src/docs/zh-CN/toggle-menu/custom-searchicon.md new file mode 100644 index 000000000..45cff7014 --- /dev/null +++ b/example/src/docs/zh-CN/toggle-menu/custom-searchicon.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## ToggleMenu 收缩菜单 + + + +以树形方式显示、适用于版型定制的一种组件,菜单可收缩,收缩后只显示图标,点击图标展示子节点菜单。 +
+ +### 自定义搜索图标 + +可通过 `search-icon` 属性自定义搜索图标。 + + + +
diff --git a/example/src/docs/zh-CN/toggle-menu/default-expand-all.md b/example/src/docs/zh-CN/toggle-menu/default-expand-all.md new file mode 100644 index 000000000..e90f01230 --- /dev/null +++ b/example/src/docs/zh-CN/toggle-menu/default-expand-all.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## ToggleMenu 收缩菜单 + + + +以树形方式显示、适用于版型定制的一种组件,菜单可收缩,收缩后只显示图标,点击图标展示子节点菜单。 +
+ +### 默认展开所有节点 + +可通过 `default-expand-all` 属性设置是否默认展开所有节点,通过 `expand-on-click-node` 属性设置是否可以通过点击节点展开/收起菜单。 + + + +
diff --git a/example/src/docs/zh-CN/toggle-menu/dragable.md b/example/src/docs/zh-CN/toggle-menu/dragable.md new file mode 100644 index 000000000..215f67a45 --- /dev/null +++ b/example/src/docs/zh-CN/toggle-menu/dragable.md @@ -0,0 +1,22 @@ +
+

+ +

+ +## ToggleMenu 收缩菜单 + + + +以树形方式显示、适用于版型定制的一种组件,菜单可收缩,收缩后只显示图标,点击图标展示子节点菜单。 + +
+ +### 拖拽节点 + +可通过 `draggable` 属性设置是否开启拖拽节点的功能,默认值为 `false`。 + +可通过 `ellipsis` 属性设置是否开启文本内容超长是省略显示,默认值为 `false` + + + +
diff --git a/example/src/docs/zh-CN/toggle-menu/events.md b/example/src/docs/zh-CN/toggle-menu/events.md new file mode 100644 index 000000000..8bd989c22 --- /dev/null +++ b/example/src/docs/zh-CN/toggle-menu/events.md @@ -0,0 +1,51 @@ +
+

+ +

+ +## ToggleMenu 收缩菜单 + + + +以树形方式显示、适用于版型定制的一种组件,菜单可收缩,收缩后只显示图标,点击图标展示子节点菜单。 +
+ +### 点击节点事件 + +`node-click` 点击节点后触发的事件。 + + + +
+ +### 展开节点事件 + +`node-expand` 展开节点后触发的事件。 + + + +
+ +### 收缩节点事件 + +`node-collapse` 收缩节点后触发的事件。 + + + +
+ +### 拖放节点事件 + +`node-drop` 拖放节点后触发的事件,需要设置 `dragable` 属性为 `true`。 + + + +
+ +### 拖拽事件 + +`node-drag-start` 拖拽节点后的事件,`node-drag-enter` 拖拽进入其他节点时触发的事件,`node-drag-over` 在拖拽节点时触发的事件,`node-drag-leave` 拖拽离开某个节点时触发的事件,`node-drag-end` 拖拽结束时触发的事件。 + + + +
diff --git a/example/src/docs/zh-CN/toggle-menu/get-menu-data-sync.md b/example/src/docs/zh-CN/toggle-menu/get-menu-data-sync.md new file mode 100644 index 000000000..476364309 --- /dev/null +++ b/example/src/docs/zh-CN/toggle-menu/get-menu-data-sync.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## ToggleMenu 收缩菜单 + + + +以树形方式显示、适用于版型定制的一种组件,菜单可收缩,收缩后只显示图标,点击图标展示子节点菜单。 + +
+ +### 自定义菜单数据服务 + +可通过 `get-menu-data-sync ` 自定义菜单数据服务。 + + + +
diff --git a/example/src/docs/zh-CN/toggle-menu/show-filter.md b/example/src/docs/zh-CN/toggle-menu/show-filter.md new file mode 100644 index 000000000..c3cdb0a03 --- /dev/null +++ b/example/src/docs/zh-CN/toggle-menu/show-filter.md @@ -0,0 +1,36 @@ +
+

+ +

+ +## ToggleMenu 收缩菜单 + + + +以树形方式显示、适用于版型定制的一种组件,菜单可收缩,收缩后只显示图标,点击图标展示子节点菜单。 + +
+ +### 显示过滤搜索框 + +可通过 `show-filter` 属性设置是否展示过滤搜索框,默认为 `true`,可设置为`false`不展示过滤搜索框。 + + + +
+ +### 自动过滤 + +可通过 `placeholder` 属性设置输入框的占位符。 通过 `automatic-filtering` 设置输入时是否自动过滤,默认值为 true。 + + + +
+ +### 内容超出换行 + +可通过 `warp` 属性设置菜单内容超长是否换行显示 + + + +
diff --git a/example/src/docs/zh-CN/toggle-menu/toggle-props.md b/example/src/docs/zh-CN/toggle-menu/toggle-props.md new file mode 100644 index 000000000..c4a6a31f4 --- /dev/null +++ b/example/src/docs/zh-CN/toggle-menu/toggle-props.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## ToggleMenu 收缩菜单 + + + +以树形方式显示、适用于版型定制的一种组件,菜单可收缩,收缩后只显示图标,点击图标展示子节点菜单。 + +
+ +### props 选项映射 + +可通过 `props` 配置选项映射字段该属性的默认值为 {children: 'children',label: 'label',disabled: 'disabled'} 。 + + + +
+ +### 自定义节点内容 +通过 `node` 插槽自定义节点内容。 + + diff --git a/example/src/docs/zh-CN/tooltip/basic-usage.md b/example/src/docs/zh-CN/tooltip/basic-usage.md new file mode 100644 index 000000000..4f36772fd --- /dev/null +++ b/example/src/docs/zh-CN/tooltip/basic-usage.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## ToolTip 文字提示 + + + +动态显示提示信息,一般通过鼠标事件进行响应;提供 warning、error、info、success 四种类型显示不同类别的信息。 +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/zh-CN/tooltip/custom-transition.md b/example/src/docs/zh-CN/tooltip/custom-transition.md new file mode 100644 index 000000000..a0291edbb --- /dev/null +++ b/example/src/docs/zh-CN/tooltip/custom-transition.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## ToolTip 文字提示 + + + +动态显示提示信息,一般通过鼠标事件进行响应;提供 warning、error、info、success 四种类型显示不同类别的信息。 +
+ +### 自定义渐变动画 + +通过 `transition` 定义渐变动画,默认选值为 `tiny-fade-in-linear` + + + +
diff --git a/example/src/docs/zh-CN/tooltip/dynamic-disable.md b/example/src/docs/zh-CN/tooltip/dynamic-disable.md new file mode 100644 index 000000000..7709efce0 --- /dev/null +++ b/example/src/docs/zh-CN/tooltip/dynamic-disable.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## ToolTip 文字提示 + + + +动态显示提示信息,一般通过鼠标事件进行响应;提供 warning、error、info、success 四种类型显示不同类别的信息。 +
+ +### 禁用 + +通过 `diabled` 设置禁用 + + + +
diff --git a/example/src/docs/zh-CN/tooltip/manual-control-tip.md b/example/src/docs/zh-CN/tooltip/manual-control-tip.md new file mode 100644 index 000000000..78f53042e --- /dev/null +++ b/example/src/docs/zh-CN/tooltip/manual-control-tip.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## ToolTip 文字提示 + + + +动态显示提示信息,一般通过鼠标事件进行响应;提供 warning、error、info、success 四种类型显示不同类别的信息。 +
+ +### 手动控制 + +手动控制模式,通过设置 `manual` 属性为 true 后,mouseenter 和 mouseleave 事件将不会生效,然后可以通过设置 `v-model` 动态控制显示和隐藏 + + + +
diff --git a/example/src/docs/zh-CN/tooltip/tabindex.md b/example/src/docs/zh-CN/tooltip/tabindex.md new file mode 100644 index 000000000..e07fcbc3f --- /dev/null +++ b/example/src/docs/zh-CN/tooltip/tabindex.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## ToolTip 文字提示 + + + +动态显示提示信息,一般通过鼠标事件进行响应;提供 warning、error、info、success 四种类型显示不同类别的信息。 +
+ +### tabindex 配置 + +通过配置 `tabindex`, 配置的属性会自动添加到该组件的触发原上。 + + + +
diff --git a/example/src/docs/zh-CN/tooltip/tooltip-content.md b/example/src/docs/zh-CN/tooltip/tooltip-content.md new file mode 100644 index 000000000..348c51152 --- /dev/null +++ b/example/src/docs/zh-CN/tooltip/tooltip-content.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## ToolTip 文字提示 + + + +动态显示提示信息,一般通过鼠标事件进行响应;提供 warning、error、info、success 四种类型显示不同类别的信息。 +
+ +### 插槽 + +通过 `content` 插槽添加自定义内容。 + + + +
diff --git a/example/src/docs/zh-CN/tooltip/tooltip-enterable.md b/example/src/docs/zh-CN/tooltip/tooltip-enterable.md new file mode 100644 index 000000000..be4556ea2 --- /dev/null +++ b/example/src/docs/zh-CN/tooltip/tooltip-enterable.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## ToolTip 文字提示 + + + +动态显示提示信息,一般通过鼠标事件进行响应;提供 warning、error、info、success 四种类型显示不同类别的信息。 +
+ +### 鼠标是否可进入 + +通过 `enterable` 属性设置鼠标是否可进入到 tooltip 中。 + + + +
diff --git a/example/src/docs/zh-CN/tooltip/tooltip-hide-delay.md b/example/src/docs/zh-CN/tooltip/tooltip-hide-delay.md new file mode 100644 index 000000000..469b293fc --- /dev/null +++ b/example/src/docs/zh-CN/tooltip/tooltip-hide-delay.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## ToolTip 文字提示 + + + +动态显示提示信息,一般通过鼠标事件进行响应;提供 warning、error、info、success 四种类型显示不同类别的信息。 +
+ +### 自动隐藏和延迟时间 + +通过 `hide-after` 属性设置 Tooltip 组件出现后自动隐藏延时,单位毫秒,为 0 则不会自动隐藏。通过 `open-delay` 属性设置 Tooltip 组件延迟出现的时间,单位毫秒。 + + + +
diff --git a/example/src/docs/zh-CN/tooltip/tooltip-offset.md b/example/src/docs/zh-CN/tooltip/tooltip-offset.md new file mode 100644 index 000000000..0e3b4b5a5 --- /dev/null +++ b/example/src/docs/zh-CN/tooltip/tooltip-offset.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## ToolTip 文字提示 + + + +动态显示提示信息,一般通过鼠标事件进行响应;提供 warning、error、info、success 四种类型显示不同类别的信息。 +
+ +### 偏移量 + +通过 `offset` 属性设置 Tooltip 组件出现位置的偏移量。 + + + +
diff --git a/example/src/docs/zh-CN/tooltip/tooltip-popper-class.md b/example/src/docs/zh-CN/tooltip/tooltip-popper-class.md new file mode 100644 index 000000000..0ba35d541 --- /dev/null +++ b/example/src/docs/zh-CN/tooltip/tooltip-popper-class.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## ToolTip 文字提示 + + + +动态显示提示信息,一般通过鼠标事件进行响应;提供 warning、error、info、success 四种类型显示不同类别的信息。 +
+ +### 添加样式类名 + +通过 `popper-class` 属性为 Tooltip 的 popper 添加类名。 + + + +
diff --git a/example/src/docs/zh-CN/tooltip/tooltip-popper-options.md b/example/src/docs/zh-CN/tooltip/tooltip-popper-options.md new file mode 100644 index 000000000..bb4313d2d --- /dev/null +++ b/example/src/docs/zh-CN/tooltip/tooltip-popper-options.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## ToolTip 文字提示 + + + +动态显示提示信息,一般通过鼠标事件进行响应;提供 warning、error、info、success 四种类型显示不同类别的信息。 +
+ +### popper配置 + +通过 `popper-options` 属性为 Tooltip 的 popper 配置参数,具体可参考[popper.js](https://popper.js.org/) + + + +
diff --git a/example/src/docs/zh-CN/tooltip/tooltip-theme.md b/example/src/docs/zh-CN/tooltip/tooltip-theme.md new file mode 100644 index 000000000..2bdd55de6 --- /dev/null +++ b/example/src/docs/zh-CN/tooltip/tooltip-theme.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## ToolTip 文字提示 + + + +动态显示提示信息,一般通过鼠标事件进行响应;提供 warning、error、info、success 四种类型显示不同类别的信息。 +
+ +### 主题 + +通过 `effect` 属性设置主题,可选值 dark/light 两种主题。 + + + +
diff --git a/example/src/docs/zh-CN/tooltip/tooltip-visible-arrow.md b/example/src/docs/zh-CN/tooltip/tooltip-visible-arrow.md new file mode 100644 index 000000000..abb51c3cc --- /dev/null +++ b/example/src/docs/zh-CN/tooltip/tooltip-visible-arrow.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## ToolTip 文字提示 + + + +动态显示提示信息,一般通过鼠标事件进行响应;提供 warning、error、info、success 四种类型显示不同类别的信息。 +
+ +### 是否显示箭头 + +通过 `visible-arrow` 属性设置是否显示 Tooltip 箭头。 + + + +
diff --git a/example/src/docs/zh-CN/transfer/basic-usage.md b/example/src/docs/zh-CN/transfer/basic-usage.md new file mode 100644 index 000000000..cfcb18163 --- /dev/null +++ b/example/src/docs/zh-CN/transfer/basic-usage.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## Transfer 穿梭框 + + + +穿梭框,提供表格数据的双向选择。 +
+ +### 基本用法 + +通过 `value` 属性进行双向绑定,其指定的值为默认选择的值,将展示在右侧列表。 + +
+ +`data` 属性提供数据源,其是一个对象数组,对象中默认字段有 key、label、disabled 。 + + + +
+ + diff --git a/example/src/docs/zh-CN/transfer/checked-format-text.md b/example/src/docs/zh-CN/transfer/checked-format-text.md new file mode 100644 index 000000000..c4fdecd37 --- /dev/null +++ b/example/src/docs/zh-CN/transfer/checked-format-text.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Transfer 穿梭框 + + + +穿梭框,提供表格数据的双向选择。 +
+ +### 列表顶部勾选状态文案 + +指定 `format` 属性后,勾选数据时,左右侧列表顶部将展示已勾选数据和所有数据的比值。 + + + +
+ diff --git a/example/src/docs/zh-CN/transfer/custom-button-texts.md b/example/src/docs/zh-CN/transfer/custom-button-texts.md new file mode 100644 index 000000000..5bbad4bb0 --- /dev/null +++ b/example/src/docs/zh-CN/transfer/custom-button-texts.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Transfer 穿梭框 + + + +穿梭框,提供表格数据的双向选择。 +
+ +### 自定义按钮文案 + +通过 `button-texts` 属性自定义左右穿梭的按钮文本。 + + + +
+ + diff --git a/example/src/docs/zh-CN/transfer/custom-filter-method.md b/example/src/docs/zh-CN/transfer/custom-filter-method.md new file mode 100644 index 000000000..e39a77a62 --- /dev/null +++ b/example/src/docs/zh-CN/transfer/custom-filter-method.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Transfer 穿梭框 + + + +穿梭框,提供表格数据的双向选择。 +
+ +### 自定义搜索方法 + +提供 `filter-method` 钩子函数,可自定义搜索的方法。 + + + +
+ + diff --git a/example/src/docs/zh-CN/transfer/custom-footer.md b/example/src/docs/zh-CN/transfer/custom-footer.md new file mode 100644 index 000000000..2e5129115 --- /dev/null +++ b/example/src/docs/zh-CN/transfer/custom-footer.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Transfer 穿梭框 + + + +穿梭框,提供表格数据的双向选择。 +
+ +### 自定义列表底部 + +通过 `left-footer`、`right-footer` 插槽可分别对左右列表底部进行自定义。 + + + +
+ + diff --git a/example/src/docs/zh-CN/transfer/custom-render-content.md b/example/src/docs/zh-CN/transfer/custom-render-content.md new file mode 100644 index 000000000..93517e0ae --- /dev/null +++ b/example/src/docs/zh-CN/transfer/custom-render-content.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## Transfer 穿梭框 + + + +穿梭框,提供表格数据的双向选择。 +
+ +### 自定义数据项渲染 + +使用 render-content 自定义数据项 + + + +
+ +使用 scoped-slot 自定义数据项 + + + +
diff --git a/example/src/docs/zh-CN/transfer/custom-transfer-titles.md b/example/src/docs/zh-CN/transfer/custom-transfer-titles.md new file mode 100644 index 000000000..ae8595e7c --- /dev/null +++ b/example/src/docs/zh-CN/transfer/custom-transfer-titles.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Transfer 穿梭框 + + + +穿梭框,提供表格数据的双向选择。 +
+ +### 自定义列表标题 + +通过 `titles` 属性可对左右列表的标题进行自定义。 + + + +
diff --git a/example/src/docs/zh-CN/transfer/data-source.md b/example/src/docs/zh-CN/transfer/data-source.md new file mode 100644 index 000000000..9fb96428e --- /dev/null +++ b/example/src/docs/zh-CN/transfer/data-source.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Transfer 穿梭框 + + + +穿梭框,提供表格数据的双向选择。 +
+ +### 数据源 + +可请求服务获取数据,再将数据赋予 `data` 。 + + + +
diff --git a/example/src/docs/zh-CN/transfer/default-checked.md b/example/src/docs/zh-CN/transfer/default-checked.md new file mode 100644 index 000000000..eb88ff19f --- /dev/null +++ b/example/src/docs/zh-CN/transfer/default-checked.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Transfer 穿梭框 + + + +穿梭框,提供表格数据的双向选择。 +
+ +### 默认勾选项 + +通过 `left-default-checked`、`right-default-checked` 属性分别指定左右侧列表默认的勾选数据。 + + + +
diff --git a/example/src/docs/zh-CN/transfer/drop-config.md b/example/src/docs/zh-CN/transfer/drop-config.md new file mode 100644 index 000000000..00009cf2a --- /dev/null +++ b/example/src/docs/zh-CN/transfer/drop-config.md @@ -0,0 +1,22 @@ +
+

+ +

+ +## Transfer 穿梭框 + + + +穿梭框,提供表格数据的双向选择。 +
+ +### 左右拖拽 + +:::tip 使用拖拽功能时请先安装 sortablejs 插件 +::: + +通过 `drop-config` 属性配置 sortablejs 插件进行左右拖拽穿梭。 + + + +
diff --git a/example/src/docs/zh-CN/transfer/filter-placeholder.md b/example/src/docs/zh-CN/transfer/filter-placeholder.md new file mode 100644 index 000000000..e96730f9b --- /dev/null +++ b/example/src/docs/zh-CN/transfer/filter-placeholder.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Transfer 穿梭框 + + + +穿梭框,提供表格数据的双向选择。 +
+ +### 搜索框占位符 + +通过 `filter-placeholder` 属性自定义搜索框占位符。 + + + +
diff --git a/example/src/docs/zh-CN/transfer/filterable.md b/example/src/docs/zh-CN/transfer/filterable.md new file mode 100644 index 000000000..3d978254c --- /dev/null +++ b/example/src/docs/zh-CN/transfer/filterable.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Transfer 穿梭框 + + + +穿梭框,提供表格数据的双向选择。 +
+ +### 可搜索 + +通过 `filterable` 属性开启左右侧列表的搜索功能。 + + + +
diff --git a/example/src/docs/zh-CN/transfer/manual-clear-query.md b/example/src/docs/zh-CN/transfer/manual-clear-query.md new file mode 100644 index 000000000..cc099b30a --- /dev/null +++ b/example/src/docs/zh-CN/transfer/manual-clear-query.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Transfer 穿梭框 + + + +穿梭框,提供表格数据的双向选择。 +
+ +### 手动清空搜索框 + +调用 `clearQuery()` 方法可清空左右侧列表的搜索框,参数为 left 或者 right 。 + + + +
diff --git a/example/src/docs/zh-CN/transfer/nested-table.md b/example/src/docs/zh-CN/transfer/nested-table.md new file mode 100644 index 000000000..7d3fd5f35 --- /dev/null +++ b/example/src/docs/zh-CN/transfer/nested-table.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Transfer 穿梭框 + + + +穿梭框,提供表格数据的双向选择。 +
+ +### 嵌套表格 + +当 `render` 属性里的 `plugin` 设置为 `Table` 时指定穿梭框渲染成表格,具体配置可参考 `grid` 组件的配置。 + + + +
diff --git a/example/src/docs/zh-CN/transfer/nested-tree.md b/example/src/docs/zh-CN/transfer/nested-tree.md new file mode 100644 index 000000000..1c76ec26e --- /dev/null +++ b/example/src/docs/zh-CN/transfer/nested-tree.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Transfer 穿梭框 + + + +穿梭框,提供表格数据的双向选择。 +
+ +### 嵌套树 + +当 `render` 属性里的 `plugin` 设置为 `Tree` 时指定穿梭框渲染成树,通过 `treeConfig` 属性配置树相关的配置(具体配置可参考 `tree` 组件的配置)。 + + + +
diff --git a/example/src/docs/zh-CN/transfer/panel-slot.md b/example/src/docs/zh-CN/transfer/panel-slot.md new file mode 100644 index 000000000..d29c64175 --- /dev/null +++ b/example/src/docs/zh-CN/transfer/panel-slot.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Transfer 穿梭框 + + + +穿梭框,提供表格数据的双向选择。 + +
+ +### 面板插槽 + +可通过 `left-panel` 和 `right-panel` 自定义左、右侧面板内容;通过 `button` 自定义穿梭按钮 + + + +
diff --git a/example/src/docs/zh-CN/transfer/props-of-data-source.md b/example/src/docs/zh-CN/transfer/props-of-data-source.md new file mode 100644 index 000000000..9ee16589d --- /dev/null +++ b/example/src/docs/zh-CN/transfer/props-of-data-source.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Transfer 穿梭框 + + + +穿梭框,提供表格数据的双向选择。 +
+ +### 数据源的字段别名 + +当数据对象中的字段和默认不一致时,可通过 `props` 属性进行映射。 + + + +
diff --git a/example/src/docs/zh-CN/transfer/show-all-btn.md b/example/src/docs/zh-CN/transfer/show-all-btn.md new file mode 100644 index 000000000..662921570 --- /dev/null +++ b/example/src/docs/zh-CN/transfer/show-all-btn.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Transfer 穿梭框 + + + +穿梭框,提供表格数据的双向选择。 +
+ +### 展示全部移动按钮 + +可通过 `show-all-btn` 属性设置展示全部移动按钮。 + + + +
diff --git a/example/src/docs/zh-CN/transfer/target-order.md b/example/src/docs/zh-CN/transfer/target-order.md new file mode 100644 index 000000000..685392032 --- /dev/null +++ b/example/src/docs/zh-CN/transfer/target-order.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## Transfer 穿梭框 + + + +穿梭框,提供表格数据的双向选择。 +
+ +### 右侧排序策略 + +通过 `target-order` 属性设置右侧列表元素的排序策略,有 original、push、unshift 三个选项,默认为 original 。 + +:::tip 排序策略 +若为 original,则保持与数据源相同的顺序 +若为 push,则新加入的元素排在最后 +若为 unshift,则新加入的元素排在最前 +::: + + + +
diff --git a/example/src/docs/zh-CN/transfer/transfer-events.md b/example/src/docs/zh-CN/transfer/transfer-events.md new file mode 100644 index 000000000..1ca41dfbe --- /dev/null +++ b/example/src/docs/zh-CN/transfer/transfer-events.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## Transfer 穿梭框 + + + +穿梭框,提供表格数据的双向选择。 +
+ +### 穿梭框事件 + +主要有 `change`、`left-check-change`、`right-check-change` 三个事件。 + +:::tip 事件说明 +change:右侧列表元素变化时触发 +left-check-change:左侧列表元素被用户选中 / 取消选中时触发 +right-check-change:右侧列表元素被用户选中 / 取消选中时触发 +::: + + + +
diff --git a/example/src/docs/zh-CN/tree-menu/accordion.md b/example/src/docs/zh-CN/tree-menu/accordion.md new file mode 100644 index 000000000..bf84f631e --- /dev/null +++ b/example/src/docs/zh-CN/tree-menu/accordion.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## TreeMenu 树型菜单 + + + +以树形方式显示的菜单,适用于版型定制的一种组件。 +
+ +### 手风琴 + +通过 `accordion` 设置手风琴效果。 + + + +
diff --git a/example/src/docs/zh-CN/tree-menu/basic-usage.md b/example/src/docs/zh-CN/tree-menu/basic-usage.md new file mode 100644 index 000000000..8f6f018e1 --- /dev/null +++ b/example/src/docs/zh-CN/tree-menu/basic-usage.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## TreeMenu 树型菜单 + + + +以树形方式显示的菜单,适用于版型定制的一种组件。 +
+ +### 基本用法 + +不配置数据时,默认从框架服务读取数据。 + + + +
+ + diff --git a/example/src/docs/zh-CN/tree-menu/can-draggable.md b/example/src/docs/zh-CN/tree-menu/can-draggable.md new file mode 100644 index 000000000..0dbc54163 --- /dev/null +++ b/example/src/docs/zh-CN/tree-menu/can-draggable.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## TreeMenu 树型菜单 + + + +以树形方式显示的菜单,适用于版型定制的一种组件。 +
+ +### 拖动菜单 + +可通过属性置 `draggable` 实现菜单拖拽。 + + + +
diff --git a/example/src/docs/zh-CN/tree-menu/check-strictly.md b/example/src/docs/zh-CN/tree-menu/check-strictly.md new file mode 100644 index 000000000..e63b5c1ec --- /dev/null +++ b/example/src/docs/zh-CN/tree-menu/check-strictly.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## TreeMenu 树型菜单 + + + +以树形方式显示的菜单,适用于版型定制的一种组件。 +
+ +### 父子级不相关联 + +通过 `check-strictly` 设置选择时父子级不相关联,需要与 `show-checkbox` 同时使用 。 + + + +
diff --git a/example/src/docs/zh-CN/tree-menu/data-resource.md b/example/src/docs/zh-CN/tree-menu/data-resource.md new file mode 100644 index 000000000..f72f5e51e --- /dev/null +++ b/example/src/docs/zh-CN/tree-menu/data-resource.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## TreeMenu 树型菜单 + + + +以树形方式显示的菜单,适用于版型定制的一种组件。 +
+ +### 数据源 + +通过 `data` 设置树形菜单的数据。 + + + +
+ +### 自定义菜单服务数据 + +通过 `get-menu-data-sync` 自定义菜单服务数据,直接返回数据。 + + diff --git a/example/src/docs/zh-CN/tree-menu/default-expand-all.md b/example/src/docs/zh-CN/tree-menu/default-expand-all.md new file mode 100644 index 000000000..b4406f576 --- /dev/null +++ b/example/src/docs/zh-CN/tree-menu/default-expand-all.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## TreeMenu 树型菜单 + + + +以树形方式显示的菜单,适用于版型定制的一种组件。 +
+ +### 默认展开全部菜单 + +可通过属性 `default-expand-all` 配置默认展开全部菜单。 +通过属性 `default-checked-keys` 配置默认选中,需要与 `show-checkbox`, `node-key` 同时使用。 + + + +
diff --git a/example/src/docs/zh-CN/tree-menu/default-expanded-keys.md b/example/src/docs/zh-CN/tree-menu/default-expanded-keys.md new file mode 100644 index 000000000..558a31f46 --- /dev/null +++ b/example/src/docs/zh-CN/tree-menu/default-expanded-keys.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## TreeMenu 树型菜单 + + + +以树形方式显示的菜单,适用于版型定制的一种组件。 +
+ +### 默认展开某节点 + +通过 `default-expanded-keys` 设置初始化展开某一节点 。 + + + +
diff --git a/example/src/docs/zh-CN/tree-menu/empty-text.md b/example/src/docs/zh-CN/tree-menu/empty-text.md new file mode 100644 index 000000000..8e2b8db7f --- /dev/null +++ b/example/src/docs/zh-CN/tree-menu/empty-text.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## TreeMenu 树型菜单 + + + +以树形方式显示的菜单,适用于版型定制的一种组件。 +
+ +### 自定义空数据文本 + +可通过属性 `empty-text` 配置空数据显示文本。 + + diff --git a/example/src/docs/zh-CN/tree-menu/expand-on-click-node.md b/example/src/docs/zh-CN/tree-menu/expand-on-click-node.md new file mode 100644 index 000000000..644467bd5 --- /dev/null +++ b/example/src/docs/zh-CN/tree-menu/expand-on-click-node.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## TreeMenu 树型菜单 + + + +以树形方式显示的菜单,适用于版型定制的一种组件。 +
+ +### 点击文字展开菜单 + +可通过属性 `expand-on-click-node` 配置点击文字即可展开子菜单。 + + + +
diff --git a/example/src/docs/zh-CN/tree-menu/filter-node-method.md b/example/src/docs/zh-CN/tree-menu/filter-node-method.md new file mode 100644 index 000000000..e4a90f3ce --- /dev/null +++ b/example/src/docs/zh-CN/tree-menu/filter-node-method.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## TreeMenu 树型菜单 + + + +以树形方式显示的菜单,适用于版型定制的一种组件。 +
+ +### 搜索规则配置 + +可配置 `filter-node-method` 进行搜索规则配置,默认为模糊匹配,以下示例是精确配置。 + + + +
diff --git a/example/src/docs/zh-CN/tree-menu/lazy-load.md b/example/src/docs/zh-CN/tree-menu/lazy-load.md new file mode 100644 index 000000000..2f26ddcc2 --- /dev/null +++ b/example/src/docs/zh-CN/tree-menu/lazy-load.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## TreeMenu 树型菜单 + + + +以树形方式显示的菜单,适用于版型定制的一种组件。 +
+ +### 懒加载子节点 + +可通过 ` lazy ` 是否懒加载子节点,需与 load 方法结合使用。 + + + +
diff --git a/example/src/docs/zh-CN/tree-menu/search-icon.md b/example/src/docs/zh-CN/tree-menu/search-icon.md new file mode 100644 index 000000000..4edc63d94 --- /dev/null +++ b/example/src/docs/zh-CN/tree-menu/search-icon.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## TreeMenu 树型菜单 + + + +以树形方式显示的菜单,适用于版型定制的一种组件。 + +
+ +### 自定义搜索图标 + +可配置 `search-icon` 属性设置自定义搜索图标 + + + +
diff --git a/example/src/docs/zh-CN/tree-menu/show-checkbox.md b/example/src/docs/zh-CN/tree-menu/show-checkbox.md new file mode 100644 index 000000000..b0e9405ec --- /dev/null +++ b/example/src/docs/zh-CN/tree-menu/show-checkbox.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## TreeMenu 树型菜单 + + + +以树形方式显示的菜单,适用于版型定制的一种组件。 + +
+ +### 搜索规则配置 + +可配置 `show-checkbox ` 属性设置节点是否可被选择。 + + + +
diff --git a/example/src/docs/zh-CN/tree-menu/text-ellipsis.md b/example/src/docs/zh-CN/tree-menu/text-ellipsis.md new file mode 100644 index 000000000..d60ad751b --- /dev/null +++ b/example/src/docs/zh-CN/tree-menu/text-ellipsis.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## TreeMenu 树型菜单 + + + +以树形方式显示的菜单,适用于版型定制的一种组件。 +
+ +### 文字超长省略显示 + +可通过 `ellipsis` 配置当菜单文字过长时,显示成省略号。通过 `prefix-icon` 自定义前置图标。 + + + +
diff --git a/example/src/docs/zh-CN/tree-menu/text-wrap.md b/example/src/docs/zh-CN/tree-menu/text-wrap.md new file mode 100644 index 000000000..8da6ddf93 --- /dev/null +++ b/example/src/docs/zh-CN/tree-menu/text-wrap.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## TreeMenu 树型菜单 + + + +以树形方式显示的菜单,适用于版型定制的一种组件。 + +
+ +### 文字超长换行显示 + +可通过 `wrap` 配置当菜单文字过长时,换行显示。通过 showTitle 属性配置是否展示 title,默认值为 true。 +可通过 `show-filter` 配置是否显示搜索过滤框,默认为 true。 +可通过 `show-title` 配置是否显示 title ,默认为 true。 + + +
diff --git a/example/src/docs/zh-CN/tree-menu/tree-menu-event.md b/example/src/docs/zh-CN/tree-menu/tree-menu-event.md new file mode 100644 index 000000000..d5b75e9df --- /dev/null +++ b/example/src/docs/zh-CN/tree-menu/tree-menu-event.md @@ -0,0 +1,49 @@ +
+

+ +

+ +## TreeMenu 树型菜单 + + + +以树形方式显示的菜单,适用于版型定制的一种组件。 +
+ +### 事件 + +`current-change` 当前选中节点变化时触发的事件。 + + + +
+ +`check-change` 节点选中状态发生变化时的回调。 + + + +
+ +`node-click` 节点被点击时的回调。 + + + +
+ +`node-collapse` 节点被关闭时触发的事件。 + + + +
+ +`node-expand` 节点被展开时触发的事件。 + + + +
+ +`allow-drag`节点能否被拖动回调事件,`allow-drop` 节点能否被拖放回调事件。需配置 `draggable` 同时使用。 + + + +
diff --git a/example/src/docs/zh-CN/tree-menu/tree-menu-indent.md b/example/src/docs/zh-CN/tree-menu/tree-menu-indent.md new file mode 100644 index 000000000..933ed2502 --- /dev/null +++ b/example/src/docs/zh-CN/tree-menu/tree-menu-indent.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## TreeMenu 树型菜单 + + + +以树形方式显示的菜单,适用于版型定制的一种组件。 +
+ +### 水平缩进 + +可通过属性 `indent` 控制子级相对于父级菜单的水平缩进距离,单位 px 。 + + + +
diff --git a/example/src/docs/zh-CN/tree-menu/tree-menu-slot.md b/example/src/docs/zh-CN/tree-menu/tree-menu-slot.md new file mode 100644 index 000000000..967517657 --- /dev/null +++ b/example/src/docs/zh-CN/tree-menu/tree-menu-slot.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## TreeMenu 树型菜单 + + + +以树形方式显示的菜单,适用于版型定制的一种组件。 +
+ +### 插槽 + +可通过配置默认作用域插槽来显示菜单内容。 + + + +
diff --git a/example/src/docs/zh-CN/tree/accordion-mode.md b/example/src/docs/zh-CN/tree/accordion-mode.md new file mode 100644 index 000000000..ed3c9e012 --- /dev/null +++ b/example/src/docs/zh-CN/tree/accordion-mode.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tree 树形控件 + + + +可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单。 +
+ +### 手风琴模式 + +通过 `accordion` 属性设置是否每次只打开一个同级树节点展开(手风琴模式),默认值为 `false`。 + + + +
diff --git a/example/src/docs/zh-CN/tree/allow-drag.md b/example/src/docs/zh-CN/tree/allow-drag.md new file mode 100644 index 000000000..e244af0ff --- /dev/null +++ b/example/src/docs/zh-CN/tree/allow-drag.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tree 树形控件 + + + +可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单。 +
+ +### 自定义节点能否被拖拽 + +通过 `allow-drag` 钩子函数判断节点能否被拖拽,返回值为 `false` 时,节点不能拖拽。 + + + +
diff --git a/example/src/docs/zh-CN/tree/allow-drop.md b/example/src/docs/zh-CN/tree/allow-drop.md new file mode 100644 index 000000000..dd106b365 --- /dev/null +++ b/example/src/docs/zh-CN/tree/allow-drop.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tree 树形控件 + + + +可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单。 +
+ +### 自定义目标节点能否被放置 + +通过 `allow-drop` 属性设置拖拽时判断目标节点能否被放置。type 参数有三种情况:'prev'、'inner' 和 'next',分别表示放置在目标节点前、插入至目标节点和放置在目标节点后。 + + + +
diff --git a/example/src/docs/zh-CN/tree/auto-expand-parent.md b/example/src/docs/zh-CN/tree/auto-expand-parent.md new file mode 100644 index 000000000..37bc353d0 --- /dev/null +++ b/example/src/docs/zh-CN/tree/auto-expand-parent.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tree 树形控件 + + + +可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单。 +
+ +### 自动展开父节点 + +通过 `auto-expand-parent` 属性是否展示父节点,默认为 `true`。 + + + +
diff --git a/example/src/docs/zh-CN/tree/basic-usage.md b/example/src/docs/zh-CN/tree/basic-usage.md new file mode 100644 index 000000000..5a4e2d47e --- /dev/null +++ b/example/src/docs/zh-CN/tree/basic-usage.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tree 树形控件 + + + +可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单。 +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/zh-CN/tree/check-on-click-node.md b/example/src/docs/zh-CN/tree/check-on-click-node.md new file mode 100644 index 000000000..73dcde912 --- /dev/null +++ b/example/src/docs/zh-CN/tree/check-on-click-node.md @@ -0,0 +1,20 @@ +
+

+ +

+ +## Tree 树形控件 + + + +可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单。 +
+ +### 点击节点时选中 + +通过 `check-on-click-node` 属性设置点击节点内容同时可以勾选数据/去勾选数据。 +通过 `icon-trigger-click-node` 属性控制点击图标是否触发 node-click 事件,默认为 true。 + + + +
diff --git a/example/src/docs/zh-CN/tree/check-strictly.md b/example/src/docs/zh-CN/tree/check-strictly.md new file mode 100644 index 000000000..1f0dbed74 --- /dev/null +++ b/example/src/docs/zh-CN/tree/check-strictly.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tree 树形控件 + + + +可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单。 +
+ +### 父子不互相关联 + +通过 `check-strictly` 属性设置父子层级勾选不关联。 + + + +
diff --git a/example/src/docs/zh-CN/tree/contextmenu.md b/example/src/docs/zh-CN/tree/contextmenu.md new file mode 100644 index 000000000..a76a42eef --- /dev/null +++ b/example/src/docs/zh-CN/tree/contextmenu.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tree 树形控件 + + + +右键点击节点弹出自定义菜单 +
+ +### 可自定义右键菜单内容 + +通过 `show-contextmenu` 属性设置是否开启弹窗右键菜单,调用实例的 `closeMenu` 方法可以关闭自定义菜单。 + + + +
diff --git a/example/src/docs/zh-CN/tree/current-node-key.md b/example/src/docs/zh-CN/tree/current-node-key.md new file mode 100644 index 000000000..c479be86d --- /dev/null +++ b/example/src/docs/zh-CN/tree/current-node-key.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tree 树形控件 + + + +可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单。 +
+ +### 当前选中节点标志 + +通过 `current-node-key` 设置当前选中节点标志,要配合 node-key="id" 使用。 + + + +
diff --git a/example/src/docs/zh-CN/tree/custom-empty-text.md b/example/src/docs/zh-CN/tree/custom-empty-text.md new file mode 100644 index 000000000..a655a02ee --- /dev/null +++ b/example/src/docs/zh-CN/tree/custom-empty-text.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tree 树形控件 + + + +可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单。 +
+ +### 自定义空数据文本 + +配置 `template #empty` 设置自定义空数据文本。 + + + +
diff --git a/example/src/docs/zh-CN/tree/custom-node-icon.md b/example/src/docs/zh-CN/tree/custom-node-icon.md new file mode 100644 index 000000000..4ad97d955 --- /dev/null +++ b/example/src/docs/zh-CN/tree/custom-node-icon.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tree 树形控件 + + + +可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单。 +
+ +### 自定义展开折叠图标 + +通过 `icon` 属性设置树节点展开折叠图标,从 `@opentiny/vue-icon` 中导入一个图标并进行初始化后传给 `icon` 属性。 + + + +
diff --git a/example/src/docs/zh-CN/tree/data-source.md b/example/src/docs/zh-CN/tree/data-source.md new file mode 100644 index 000000000..d997b6d74 --- /dev/null +++ b/example/src/docs/zh-CN/tree/data-source.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tree 树形控件 + + + +可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单。 +
+ +### 数据源 + +通过配置 `data` 属性来设置数据源,可配置静态数据源和动态数据源。 + + + +
diff --git a/example/src/docs/zh-CN/tree/default-checked-keys.md b/example/src/docs/zh-CN/tree/default-checked-keys.md new file mode 100644 index 000000000..f3410e44e --- /dev/null +++ b/example/src/docs/zh-CN/tree/default-checked-keys.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tree 树形控件 + + + +可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单。 +
+ +### 默认勾选的节点 + +通过 `default-checked-keys` 属性设置默认勾选数据。 + + + +
diff --git a/example/src/docs/zh-CN/tree/default-expand-all.md b/example/src/docs/zh-CN/tree/default-expand-all.md new file mode 100644 index 000000000..1f54d771d --- /dev/null +++ b/example/src/docs/zh-CN/tree/default-expand-all.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tree 树形控件 + + + +可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单。 +
+ +### 默认展开所有节点 + +通过 `default-expand-all` 属性设置默认展开所有节点。 + + + +
diff --git a/example/src/docs/zh-CN/tree/default-expanded-keys.md b/example/src/docs/zh-CN/tree/default-expanded-keys.md new file mode 100644 index 000000000..2fa17deca --- /dev/null +++ b/example/src/docs/zh-CN/tree/default-expanded-keys.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tree 树形控件 + + + +可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单。 +
+ +### 点击节点展开收缩 + +通过 `expand-on-click-node` 属性设置点击节点可以展开/收缩节点。 + + + +
diff --git a/example/src/docs/zh-CN/tree/disable-node.md b/example/src/docs/zh-CN/tree/disable-node.md new file mode 100644 index 000000000..1337ba494 --- /dev/null +++ b/example/src/docs/zh-CN/tree/disable-node.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tree 树形控件 + + + +可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单。 +
+ +### 禁用状态 + +数据源里面带 `disabled: true` 渲染时自动禁用。 + + + +
diff --git a/example/src/docs/zh-CN/tree/events.md b/example/src/docs/zh-CN/tree/events.md new file mode 100644 index 000000000..4de2cd4dc --- /dev/null +++ b/example/src/docs/zh-CN/tree/events.md @@ -0,0 +1,29 @@ +
+

+ +

+ +## Tree 树形控件 + + + +可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单。 +
+ +### 拖拽节点事件 + + + +
+ +### 勾选节点事件 + + + +
+ +### 鼠标右键点击节点事件 + + + +
diff --git a/example/src/docs/zh-CN/tree/expand-on-click-node.md b/example/src/docs/zh-CN/tree/expand-on-click-node.md new file mode 100644 index 000000000..0efb2cb7c --- /dev/null +++ b/example/src/docs/zh-CN/tree/expand-on-click-node.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tree 树形控件 + + + +可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单。 +
+ +### 点击节点展开收缩 + +通过 `expand-on-click-node` 属性设置点击节点内容时可展开/收起节点。 + + + +
diff --git a/example/src/docs/zh-CN/tree/filter-node.md b/example/src/docs/zh-CN/tree/filter-node.md new file mode 100644 index 000000000..ae2ad7c02 --- /dev/null +++ b/example/src/docs/zh-CN/tree/filter-node.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tree 树形控件 + + + +可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单。 +
+ +### 节点过滤 + +通过 `filter-node-method` 属性设置节点过滤的方法。 + + + +
diff --git a/example/src/docs/zh-CN/tree/highlight-current.md b/example/src/docs/zh-CN/tree/highlight-current.md new file mode 100644 index 000000000..739d0a3bd --- /dev/null +++ b/example/src/docs/zh-CN/tree/highlight-current.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tree 树形控件 + + + +可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单。 +
+ +### 高亮当前选择节点 + +通过 `highlight-current` 属性设置高亮当前选择的节点。 + + + +
diff --git a/example/src/docs/zh-CN/tree/indent.md b/example/src/docs/zh-CN/tree/indent.md new file mode 100644 index 000000000..caf3cc486 --- /dev/null +++ b/example/src/docs/zh-CN/tree/indent.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tree 树形控件 + + + +可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单。 +
+ +### 水平缩进 + +通过 `indent` 属性控制水平缩进距离,单位 `px`,默认值为 `18px`。 + + + +
diff --git a/example/src/docs/zh-CN/tree/lazy-load-node.md b/example/src/docs/zh-CN/tree/lazy-load-node.md new file mode 100644 index 000000000..ec200daed --- /dev/null +++ b/example/src/docs/zh-CN/tree/lazy-load-node.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tree 树形控件 + + + +可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单。 +
+ +### 懒加载子节点 + +通过 `lazy` 属性设置是否懒加载子节点,需与 `load` 方法结合使用。默认值为 `false`。 + + + +
diff --git a/example/src/docs/zh-CN/tree/node-draggable.md b/example/src/docs/zh-CN/tree/node-draggable.md new file mode 100644 index 000000000..bd09b3d52 --- /dev/null +++ b/example/src/docs/zh-CN/tree/node-draggable.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tree 树形控件 + + + +可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单。 +
+ +### 可拖拽节点 + +通过 `draggable` 属性设置节点是否可拖拽。 + + + +
diff --git a/example/src/docs/zh-CN/tree/node-key.md b/example/src/docs/zh-CN/tree/node-key.md new file mode 100644 index 000000000..e38273c4c --- /dev/null +++ b/example/src/docs/zh-CN/tree/node-key.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tree 树形控件 + + + +可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单。 +
+ +### 唯一标识 + +通过 `node-key` 属性设置唯一标识。 + + + +
diff --git a/example/src/docs/zh-CN/tree/node-props-config.md b/example/src/docs/zh-CN/tree/node-props-config.md new file mode 100644 index 000000000..33e9dfdb3 --- /dev/null +++ b/example/src/docs/zh-CN/tree/node-props-config.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tree 树形控件 + + + +可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单。 +
+ +### 数据节点属性配置 + +通过 `props` 属性设置数据节点属性的配置,该属性的默认值为 `{children: 'children',label: 'label',disabled: 'disabled'}`。 + + + +
diff --git a/example/src/docs/zh-CN/tree/render-after-expand.md b/example/src/docs/zh-CN/tree/render-after-expand.md new file mode 100644 index 000000000..d3b752c2e --- /dev/null +++ b/example/src/docs/zh-CN/tree/render-after-expand.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tree 树形控件 + + + +可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单。 +
+ +### 展开后渲染 + +配置 `render-after-expand` 属性设置是否展开后渲染数据,默认为 `true`。 + + + +
diff --git a/example/src/docs/zh-CN/tree/render-content.md b/example/src/docs/zh-CN/tree/render-content.md new file mode 100644 index 000000000..482fc27d5 --- /dev/null +++ b/example/src/docs/zh-CN/tree/render-content.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tree 树形控件 + + + +可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单。 +
+ +### 自定义内容区渲染 + +通过 `render-content` 属性设置自定义内容。 + + + +
diff --git a/example/src/docs/zh-CN/tree/set-tree-icon.md b/example/src/docs/zh-CN/tree/set-tree-icon.md new file mode 100644 index 000000000..4229fd2ff --- /dev/null +++ b/example/src/docs/zh-CN/tree/set-tree-icon.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tree 树形控件 + + + +可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单。 +
+ +### 展开折叠图标分别设置 + +通过 `expandIcon` 属性设置展开的图标,通过 `shrinkIcon` 属性设置折叠的图标。 + + + +
diff --git a/example/src/docs/zh-CN/tree/show-checkbox.md b/example/src/docs/zh-CN/tree/show-checkbox.md new file mode 100644 index 000000000..c1733b253 --- /dev/null +++ b/example/src/docs/zh-CN/tree/show-checkbox.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tree 树形控件 + + + +可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单。 +
+ +### 是否开启多选模式 + +通过 `show-checkbox` 属性设置节点是否可被选择,默认为 `false`。 + + + +
diff --git a/example/src/docs/zh-CN/tree/single-select-radio.md b/example/src/docs/zh-CN/tree/single-select-radio.md new file mode 100644 index 000000000..e32ccca9b --- /dev/null +++ b/example/src/docs/zh-CN/tree/single-select-radio.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tree 树形控件 + + + +可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单。 +
+ +### 单选 + +通过 `show-radio` 属性设置树节点的单选特性,默认为 `false`,与 `show-checkbox` 属性互斥,不能同时设置为 `true`。 + + + +
diff --git a/example/src/docs/zh-CN/tree/slot-deffault.md b/example/src/docs/zh-CN/tree/slot-deffault.md new file mode 100644 index 000000000..f1c386814 --- /dev/null +++ b/example/src/docs/zh-CN/tree/slot-deffault.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Tree 树形控件 + + + +可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单。 +
+ +### 默认插槽 + +通过 `default` 插槽,可自定义树节点的内容,参数为 { node, data }。 + + + +
diff --git a/example/src/docs/zh-CN/user-contact/basic-usage.md b/example/src/docs/zh-CN/user-contact/basic-usage.md new file mode 100644 index 000000000..2c0b7d95e --- /dev/null +++ b/example/src/docs/zh-CN/user-contact/basic-usage.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## UserContact 联系人 + + + +UserContact 联系人组件,展现用户账号和基本联系方式,包括头像、姓名、描述、三种元素,任意组合。 +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/zh-CN/user-contact/data-source.md b/example/src/docs/zh-CN/user-contact/data-source.md new file mode 100644 index 000000000..c78da2033 --- /dev/null +++ b/example/src/docs/zh-CN/user-contact/data-source.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## UserContact 联系人 + + + +UserContact 联系人组件,展现用户账号和基本联系方式,包括头像、姓名、描述三种元素,任意组合。 +
+ +### 设置数据源 + +可通过 `data` 设置数据源, `imgUrl` 表示的是图片路径, `userName` 表示的是姓名, `userDescription` 表示的是描述。 + + + +
diff --git a/example/src/docs/zh-CN/user-contact/not-displayed-content.md b/example/src/docs/zh-CN/user-contact/not-displayed-content.md new file mode 100644 index 000000000..4dc7417d6 --- /dev/null +++ b/example/src/docs/zh-CN/user-contact/not-displayed-content.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## UserContact 联系人 + + + +UserContact 联系人组件,展现用户账号和基本联系方式,包括头像、姓名、用户描述三种元素,任意组合。 +
+ +### 定制弹框不显示的内容 + +定制弹框不显示的内容 +`show-img` 是否显示头像,值为 true 时显示, false 隐藏,默认 true。 +`show-name` 是否显示名字,值为 true 时显示, false 隐藏,默认 true。 +`show-description` 是否显示用户描述,值为 true 时显示, false 隐藏,默认 true。 + + +
diff --git a/example/src/docs/zh-CN/user-contact/slots-usercontact.md b/example/src/docs/zh-CN/user-contact/slots-usercontact.md new file mode 100644 index 000000000..f11168b73 --- /dev/null +++ b/example/src/docs/zh-CN/user-contact/slots-usercontact.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## UserContact 联系人 + + + +UserContact 联系人组件,展现用户账号和基本联系方式,包括头像、姓名、描述三种元素,任意组合。 +
+ +### 自定义默认插槽 + + + +
diff --git a/example/src/docs/zh-CN/user-head/basic-usage.md b/example/src/docs/zh-CN/user-head/basic-usage.md new file mode 100644 index 000000000..c4ac3b793 --- /dev/null +++ b/example/src/docs/zh-CN/user-head/basic-usage.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## UserHead 用户头像 + + + +UserHead 用户头像组件,用来代表用户或事物,支持图片、图标或字符展示。 +
+ +### 基本用法 + + + +
+ + diff --git a/example/src/docs/zh-CN/user-head/custom-background-color.md b/example/src/docs/zh-CN/user-head/custom-background-color.md new file mode 100644 index 000000000..513f4873a --- /dev/null +++ b/example/src/docs/zh-CN/user-head/custom-background-color.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## UserHead 用户头像 + + + +UserHead 用户头像组件,用来代表用户或事物,支持图片、图标或字符展示。 +
+ +### 自定义背景颜色 + +可通过 `background-color` 自定义背景颜色。 + + + +
diff --git a/example/src/docs/zh-CN/user-head/custom-color.md b/example/src/docs/zh-CN/user-head/custom-color.md new file mode 100644 index 000000000..ce4d9eec5 --- /dev/null +++ b/example/src/docs/zh-CN/user-head/custom-color.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## UserHead 用户头像 + + + +UserHead 用户头像组件,用来代表用户或事物,支持图片、图标或字符展示。 +
+ +### 自定义颜色 + +可通过 `color` 自定义颜色,图标或文字类型(type属性值为 icon 或 label )的情况下,设置字体颜色和背景色。 + + + +
diff --git a/example/src/docs/zh-CN/user-head/custom-user-head-content.md b/example/src/docs/zh-CN/user-head/custom-user-head-content.md new file mode 100644 index 000000000..e761c97f6 --- /dev/null +++ b/example/src/docs/zh-CN/user-head/custom-user-head-content.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## UserHead 用户头像 + + + +UserHead 用户头像组件,用来代表用户或事物,支持图片、图标或字符展示。 +
+ +### 自定义图像内容 + +通过插槽自定义图像内容。 + + + +
diff --git a/example/src/docs/zh-CN/user-head/icon-user-head.md b/example/src/docs/zh-CN/user-head/icon-user-head.md new file mode 100644 index 000000000..e97572d1a --- /dev/null +++ b/example/src/docs/zh-CN/user-head/icon-user-head.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## UserHead 用户头像 + + + +UserHead 用户头像组件,用来代表用户或事物,支持图片、图标或字符展示。 +
+ +### 图标头像 + +可通过 `type="icon"` 设置图标头像。 + + + +
diff --git a/example/src/docs/zh-CN/user-head/image-user-head.md b/example/src/docs/zh-CN/user-head/image-user-head.md new file mode 100644 index 000000000..cc3e90d50 --- /dev/null +++ b/example/src/docs/zh-CN/user-head/image-user-head.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## UserHead 用户头像 + + + +UserHead 用户头像组件,用来代表用户或事物,支持图片、图标或字符展示。 +
+ +### 图片头像 + +可通过 `type="image"` 设置图片头像。 + + + +
diff --git a/example/src/docs/zh-CN/user-head/label-user-head.md b/example/src/docs/zh-CN/user-head/label-user-head.md new file mode 100644 index 000000000..3ce9fc7f1 --- /dev/null +++ b/example/src/docs/zh-CN/user-head/label-user-head.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## UserHead 用户头像 + + + +UserHead 用户头像组件,用来代表用户或事物,支持图片、图标或字符展示。 +
+ +### 文字头像 + +可通过 `type="label"` 设置文字头像。 + + + +
diff --git a/example/src/docs/zh-CN/user-head/message-count.md b/example/src/docs/zh-CN/user-head/message-count.md new file mode 100644 index 000000000..e32464a30 --- /dev/null +++ b/example/src/docs/zh-CN/user-head/message-count.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## UserHead 用户头像 + + + +UserHead 用户头像组件,用来代表用户或事物,支持图片、图标或字符展示。 +
+ +### 头像消息计数 + + + +### 使用小红点代替具体数值 + + + +### 消息计数上限 + + + +
diff --git a/example/src/docs/zh-CN/user-head/min-user-head.md b/example/src/docs/zh-CN/user-head/min-user-head.md new file mode 100644 index 000000000..b1b57c70a --- /dev/null +++ b/example/src/docs/zh-CN/user-head/min-user-head.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## UserHead 用户头像 + + + +UserHead 用户头像组件,用来代表用户或事物,支持图片、图标或字符展示。 +
+ +### 小头像 + +可通过 `min` 设置小头像。 + + + +
diff --git a/example/src/docs/zh-CN/user-head/render-user-head-in-grid.md b/example/src/docs/zh-CN/user-head/render-user-head-in-grid.md new file mode 100644 index 000000000..7447842d8 --- /dev/null +++ b/example/src/docs/zh-CN/user-head/render-user-head-in-grid.md @@ -0,0 +1,17 @@ +
+

+ +

+ +## UserHead 用户头像 + + + +UserHead 用户头像组件,用来代表用户或事物,支持图片、图标或字符展示。 +
+ +### Grid 单元格展示头像 + + + +
diff --git a/example/src/docs/zh-CN/user-head/round-user-head.md b/example/src/docs/zh-CN/user-head/round-user-head.md new file mode 100644 index 000000000..20db04866 --- /dev/null +++ b/example/src/docs/zh-CN/user-head/round-user-head.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## UserHead 用户头像 + + + +UserHead 用户头像组件,用来代表用户或事物,支持图片、图标或字符展示。 +
+ +### 圆形头像 + +可通过 `round` 设置圆形头像。 + + + +
diff --git a/example/src/docs/zh-CN/wizard/base-flow.md b/example/src/docs/zh-CN/wizard/base-flow.md new file mode 100644 index 000000000..fd1cc0167 --- /dev/null +++ b/example/src/docs/zh-CN/wizard/base-flow.md @@ -0,0 +1,15 @@ +
+

+ +

+ +## Wizard 流程图 + + + +以特定的图形符号加上说明,表示各流程节点关系的组件。 +
+ +### 基本流程图 + +
diff --git a/example/src/docs/zh-CN/wizard/basic-usage.md b/example/src/docs/zh-CN/wizard/basic-usage.md new file mode 100644 index 000000000..7854bb12b --- /dev/null +++ b/example/src/docs/zh-CN/wizard/basic-usage.md @@ -0,0 +1,21 @@ +
+

+ +

+ +## Wizard 流程图 + + + +以特定的图形符号加上说明,表示各流程节点关系的组件。 +
+ +### 基本用法 + +通过 `base-flow` 属性设置基本流程图模式,以节点图示的方式,显示流程节点及节点间关系,节点的信息只有节点名称和状态。 + + + +
+ + diff --git a/example/src/docs/zh-CN/wizard/page-guide.md b/example/src/docs/zh-CN/wizard/page-guide.md new file mode 100644 index 000000000..2a3c07fce --- /dev/null +++ b/example/src/docs/zh-CN/wizard/page-guide.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Wizard 流程图 + + + +以特定的图形符号加上说明,表示各流程节点关系的组件。 +
+ +### 页向导流程图 + +通过 `page-guide` 属性设置页向导流程图模式,用于导航当前页面与上一页面、下一页面的前后关系,包括流程图区域、页面展示区域、功能按钮区域。 + + + +
diff --git a/example/src/docs/zh-CN/wizard/slot.md b/example/src/docs/zh-CN/wizard/slot.md new file mode 100644 index 000000000..c1002f238 --- /dev/null +++ b/example/src/docs/zh-CN/wizard/slot.md @@ -0,0 +1,25 @@ +
+

+ +

+ +## Wizard 流程图 + + + +以特定的图形符号加上说明,表示各流程节点关系的组件。 +
+ +### 步骤插槽 + +页向导流程图里通过 `stepbutton` 插槽可以自定义步骤按钮或内容。 + + + +
+ +### 基本插槽 + +通过 `base` 配置基本内容。 + + diff --git a/example/src/docs/zh-CN/wizard/status-icon.md b/example/src/docs/zh-CN/wizard/status-icon.md new file mode 100644 index 000000000..93077f4b3 --- /dev/null +++ b/example/src/docs/zh-CN/wizard/status-icon.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Wizard 流程图 + + + +以特定的图形符号加上说明,表示各流程节点关系的组件。 +
+ +### 自定义状态图标 + +通过 `status-icon` 属性自定义状态图标。 + + + +
diff --git a/example/src/docs/zh-CN/wizard/time-line-flow.md b/example/src/docs/zh-CN/wizard/time-line-flow.md new file mode 100644 index 000000000..1d5f78af9 --- /dev/null +++ b/example/src/docs/zh-CN/wizard/time-line-flow.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Wizard 流程图 + + + +以特定的图形符号加上说明,表示各流程节点关系的组件。 +
+ +### 时间线流程图 + +通过 `time-line-flow` 属性设置时间线流程图,通过 `time-icon` 属性自定义时间图标。以时间点的方式竖向显示流程节点处理信息,包括节点名称、状态、完成时间、用户。 + + + +
diff --git a/example/src/docs/zh-CN/wizard/vertical.md b/example/src/docs/zh-CN/wizard/vertical.md new file mode 100644 index 000000000..d27ba53d4 --- /dev/null +++ b/example/src/docs/zh-CN/wizard/vertical.md @@ -0,0 +1,19 @@ +
+

+ +

+ +## Wizard 流程图 + + + +以特定的图形符号加上说明,表示各流程节点关系的组件。 +
+ +### 垂直流程图 + +通过 `vertical` 属性设置垂直流程图模式,以节点图示的方式竖向显示流程节点及节点间关系,节点的信息包含节点名称、状态、完成时间、用户。 + + + +
diff --git a/example/src/main.js b/example/src/main.js new file mode 100644 index 000000000..5e2bacdce --- /dev/null +++ b/example/src/main.js @@ -0,0 +1,45 @@ +import Vue from 'vue' +import VueI18n from 'vue-i18n' +import VueRouter from 'vue-router' +import { Loading, Modal } from '@opentiny/vue' +import { initI18n } from '@opentiny/vue-locale' +import App from './App.vue' +import Home from './components/Home.vue' +import DemoView from './DemoView.vue' +import PcRouter from './route.config.comp' +import MobileRouter from './route.config.comp.mobile' + +Vue.use(VueRouter) +Vue.use(Loading) +Vue.use(Modal) +Vue.use(VueI18n) + +Vue.component('NovaDemoView', DemoView) +Vue.component('mobileView', DemoView) +Vue.component('NovaUxlink', { render: () => null }) +Vue.component('uxlink', { render: () => null }) +Vue.component('mobileUxlink', { render: () => null }) +Vue.component('NovaAttributes', { render: () => null }) +Vue.component('mobileAttributes', { render: () => null }) + +Vue.config.productionTip = false +const mode = localStorage.getItem('vue-example-mode') || 'pc' + +const TinyMode = 'tiny_mode' +Vue.prototype[TinyMode] = { value: mode } + +const router = new VueRouter({ + routes: [ + { + path: '/', + component: Home, + children: mode === 'mobile' ? MobileRouter : PcRouter + } + ] +}) + +new Vue({ + i18n: initI18n({ VueI18n }), + router, + render: (h) => h(App) +}).$mount('#app') diff --git a/example/src/main3.js b/example/src/main3.js new file mode 100644 index 000000000..9abe9a76e --- /dev/null +++ b/example/src/main3.js @@ -0,0 +1,47 @@ +import * as Vue3 from 'vue' +import { createI18n } from 'vue-i18n' +import { createRouter, createWebHashHistory } from 'vue-router' +import { Loading } from '@opentiny/vue' +import { initI18n } from '@opentiny/vue-locale' +import App from './App.vue' +import Home from './components/Home.vue' +import DemoView from './DemoView.vue' +import PcRouter from './route.config.comp' +import MobileRouter from './route.config.comp.mobile' +import TinyThemeTool from '@opentiny/vue-theme/theme-tool.js' +import { CURRENT_THEME_KEY, DEFAULT_THEME, THEME_MAP } from './const' + +const app = Vue3.createApp(App) + +const currentTheme = localStorage.getItem(CURRENT_THEME_KEY) || DEFAULT_THEME +const theme = new TinyThemeTool(THEME_MAP[currentTheme], 'tinyStyleSheetId') +app.config.globalProperties.theme = theme + +app.use(Loading) + +app.component('NovaDemoView', DemoView) +app.component('mobileView', DemoView) +app.component('NovaUxlink', { render: () => null }) +app.component('uxlink', { render: () => null }) +app.component('mobileUxlink', { render: () => null }) +app.component('NovaAttributes', { render: () => null }) +app.component('mobileAttributes', { render: () => null }) + +const mode = localStorage.getItem('vue-example-mode') || 'pc' +const router = createRouter({ + history: createWebHashHistory(), + routes: [ + { + path: '/', + component: Home, + children: mode === 'mobile' ? MobileRouter : PcRouter + } + ] +}) + +app.use(router) + +const TinyMode = 'tiny_mode' +app.config.globalProperties[TinyMode] = { value: mode } +app.use(initI18n({ createI18n })) +app.mount('#app') diff --git a/example/src/nav.config.comp.json b/example/src/nav.config.comp.json new file mode 100644 index 000000000..b37e471fa --- /dev/null +++ b/example/src/nav.config.comp.json @@ -0,0 +1,3790 @@ +{ + "component": [ + { + "name": "框架风格", + "children": [ + { + "path": "/color", + "name": "Color 色彩" + }, + { + "path": "/container", + "name": "Container 版型" + }, + { + "path": "/font", + "name": "Font 字体" + }, + { + "path": "/icon", + "name": "Icon 图标" + }, + { + "path": "/layout", + "name": "Layout 布局", + "children": [ + { + "path": "/layout/row", + "name": "Row 行配置" + }, + { + "path": "/layout/col", + "name": "Col 列配置" + } + ] + } + ] + }, + { + "name": "导航组件", + "children": [ + { + "path": "/breadcrumb", + "name": "Breadcrumb 面包屑", + "children": [ + { + "path": "/breadcrumb/custom-item", + "name": "自定义节点" + }, + { + "path": "/breadcrumb/custom-separator", + "name": "自定义分隔符" + } + ] + }, + { + "path": "/fall-menu", + "name": "FallMenu 瀑布菜单", + "children": [ + { + "path": "/fall-menu/data-resource", + "name": "数据源" + }, + { + "path": "/fall-menu/custom-slider-icon", + "name": "自定义左右侧滑动图标" + }, + { + "path": "/fall-menu/custom-menuitem", + "name": "自定义菜单内容" + } + ] + }, + { + "path": "/floatbar", + "name": "Floatbar 浮动块", + "children": [ + { + "path": "/floatbar/custom-style", + "name": "自定义样式" + }, + { + "path": "/floatbar/custom-floatbar-item", + "name": "自定义浮动块内容" + }, + { + "path": "/floatbar/operation-floatbar-item", + "name": "操作浮动块内容" + } + ] + }, + { + "path": "/toggle-menu", + "name": "ToggleMenu 收缩菜单", + "children": [ + { + "path": "/toggle-menu/custom-icon", + "name": "自定义菜单左侧图标" + }, + { + "path": "/toggle-menu/get-menu-data-sync", + "name": "自定义服务" + }, + { + "path": "/toggle-menu/toggle-props", + "name": "选项配置" + }, + { + "path": "/toggle-menu/default-expand-all", + "name": "默认展开所有节点" + }, + { + "path": "/toggle-menu/dragable", + "name": "拖拽节点" + }, + { + "path": "/toggle-menu/show-filter", + "name": "显示过滤搜索框" + }, + { + "path": "/toggle-menu/events", + "name": "事件" + } + ] + }, + { + "path": "/link-menu", + "name": "LinkMenu 收藏夹菜单", + "children": [ + { + "path": "/link-menu/data-resource", + "name": "数据源" + }, + { + "path": "/link-menu/menu-items", + "name": "可收藏栏目数" + }, + { + "path": "/link-menu/get-menu-data-sync", + "name": "自定义菜单服务" + }, + { + "path": "/link-menu/custom-icon", + "name": "自定义折叠展开图标" + }, + { + "path": "/link-menu/custom-foot", + "name": "自定义菜单弹窗底部" + } + ] + }, + { + "path": "/milestone", + "name": "Milestone 里程碑", + "children": [ + { + "path": "/milestone/data-source", + "name": "数据源" + }, + { + "path": "/milestone/data-field-mapping", + "name": "数据字段映射" + }, + { + "path": "/milestone/flag-before", + "name": "旗帜数据来源前面节点" + }, + { + "path": "/milestone/line-style", + "name": "进度条颜色" + }, + { + "path": "/milestone/milestones-status", + "name": "状态与颜色对应关系" + }, + { + "path": "/milestone/show-number", + "name": "取消未完成状态序号显示" + }, + { + "path": "/milestone/solid-style", + "name": "已完成节点实心显示" + }, + { + "path": "/milestone/milestone-space", + "name": "宽度" + }, + { + "path": "/milestone/start-index", + "name": "序号起始值" + }, + { + "path": "/milestone/custom-icon-slot", + "name": "自定义节点图标插槽" + }, + { + "path": "/milestone/custom-bottom", + "name": "自定义节点下方内容" + }, + { + "path": "/milestone/custom-top", + "name": "自定义节点上方内容" + }, + { + "path": "/milestone/custom-flag", + "name": "自定义旗帜内容" + }, + { + "path": "/milestone/milestone-events", + "name": "事件" + } + ] + }, + { + "path": "/nav-menu", + "name": "NavMenu 导航菜单", + "children": [ + { + "path": "/nav-menu/data-resource", + "name": "数据源" + }, + { + "path": "/nav-menu/overflow", + "name": "显示策略" + }, + { + "path": "/nav-menu/slot-logo", + "name": "插槽" + }, + { + "path": "/nav-menu/before-skip", + "name": "菜单跳转处理" + }, + { + "path": "/nav-menu/custom-service", + "name": "自定义服务" + } + ] + }, + { + "path": "/steps", + "name": "Steps 步骤条", + "children": [ + { + "path": "/steps/data-resource", + "name": "数据源" + }, + { + "path": "/steps/normal-steps", + "name": "普通步骤条" + }, + { + "path": "/steps/advanced-steps", + "name": "高级向导" + }, + { + "path": "/steps/timeline-steps", + "name": "时间线步骤条" + }, + { + "path": "/steps/custom-steps-item", + "name": "自定义数据项" + }, + { + "path": "/steps/order-progress", + "name": "订单流程" + }, + { + "path": "/steps/steps-event", + "name": "事件" + }, + { + "path": "/steps/steps-slot", + "name": "插槽" + } + ] + }, + { + "path": "/tabs", + "name": "Tabs 标签页", + "children": [ + { + "path": "/tabs/tab-style", + "name": "风格类型" + }, + { + "path": "/tabs/with-add", + "name": "标签页可增加" + }, + { + "path": "/tabs/with-close", + "name": "标签页可关闭" + }, + { + "path": "/tabs/position", + "name": "显示位置" + }, + { + "path": "/tabs/before-leave", + "name": "切换标签页前的钩子" + }, + { + "path": "/tabs/stretch-wh", + "name": "标签页宽度自适应" + }, + { + "path": "/tabs/tabs-events", + "name": "事件" + }, + { + "path": "/tabs/custom-tab-title", + "name": "自定义标签页标题" + }, + { + "path": "/tabs/show-different-grid-data", + "name": "标签页切换不同 Grid" + } + ] + }, + { + "path": "/time-line", + "name": "TimeLine 时间线", + "children": [ + { + "path": "/time-line/vertical-step", + "name": "竖向时间线" + }, + { + "path": "/time-line/set-step-width", + "name": "宽度设置" + }, + { + "path": "/time-line/different-data", + "name": "数据映射" + }, + { + "path": "/time-line/set-start-value", + "name": "设置序号起始值" + }, + { + "path": "/time-line/show-status", + "name": "组件内部状态" + }, + { + "path": "/time-line/show-number", + "name": "未完成的序号显示" + }, + { + "path": "/time-line/custom-normal-step", + "name": "自定义横向时间线" + }, + { + "path": "/time-line/custom-vertical-step", + "name": "自定义竖向时间线" + }, + { + "path": "/time-line/event", + "name": "事件" + } + ] + }, + { + "path": "/tree-menu", + "name": "TreeMenu 树型菜单", + "children": [ + { + "path": "/tree-menu/data-resource", + "name": "数据源" + }, + { + "path": "/tree-menu/text-ellipsis", + "name": "文字超长省略显示" + }, + { + "path": "/tree-menu/text-wrap", + "name": "文字超长换行显示" + }, + { + "path": "/tree-menu/check-strictly", + "name": "父子级不相关联" + }, + { + "path": "/tree-menu/default-expanded-keys", + "name": "默认展开单节点" + }, + { + "path": "/tree-menu/lazy-load", + "name": "懒加载子节点" + }, + { + "path": "/tree-menu/filter-node-method", + "name": "搜索规则配置" + }, + { + "path": "/tree-menu/empty-text", + "name": "自定义空数据文本" + }, + { + "path": "/tree-menu/default-expand-all", + "name": "默认展开全部菜单" + }, + { + "path": "/tree-menu/can-draggable", + "name": "拖动菜单" + }, + { + "path": "/tree-menu/expand-on-click-node", + "name": "点击文字展开菜单" + }, + { + "path": "/tree-menu/tree-menu-indent", + "name": "水平缩进" + }, + { + "path": "/tree-menu/accordion", + "name": "手风琴" + }, + { + "path": "/tree-menu/show-checkbox", + "name": "节点" + }, + { + "path": "/tree-menu/search-icon", + "name": "搜索图标" + }, + { + "path": "/tree-menu/tree-menu-slot", + "name": "插槽" + }, + { + "path": "/tree-menu/tree-menu-event", + "name": "事件" + } + ] + }, + { + "path": "/wizard", + "name": "Wizard 流程图", + "children": [ + { + "path": "/wizard/page-guide", + "name": "页向导流程图" + }, + { + "path": "/wizard/vertical", + "name": "垂直流程图" + }, + { + "path": "/wizard/time-line-flow", + "name": "时间线流程图" + }, + { + "path": "/wizard/slot", + "name": "插槽" + } + ] + }, + { + "path": "/dropdown", + "name": "Dropdown 下拉菜单", + "children": [ + { + "path": "/dropdown/split-button", + "name": "触发对象" + }, + { + "path": "/dropdown/trigger", + "name": "触发方式" + }, + { + "path": "/dropdown/hide-on-click", + "name": "菜单隐藏方式" + }, + { + "path": "/dropdown/disabled", + "name": "禁用" + }, + { + "path": "/dropdown/size", + "name": "不同尺寸" + }, + { + "path": "/dropdown/events", + "name": "事件" + } + ] + } + ] + }, + { + "name": "容器组件", + "children": [ + { + "path": "/carousel", + "name": "Carousel 走马灯", + "children": [ + { + "path": "/carousel/indicator-trigger", + "name": "指示器和触发方式" + }, + { + "path": "/carousel/manual-play", + "name": "手动轮播" + }, + { + "path": "/carousel/close-loop", + "name": "关闭循环轮播" + }, + { + "path": "/carousel/autoplay", + "name": "自动切换" + }, + { + "path": "/carousel/play-interval", + "name": "轮播间隔时间" + }, + { + "path": "/carousel/up-down-carousel", + "name": "纵向轮播" + }, + { + "path": "/carousel/show-title", + "name": "显示标题" + }, + { + "path": "/carousel/carousel-arrow", + "name": "左右切换箭头" + }, + { + "path": "/carousel/card-mode", + "name": "卡片化展示" + } + ] + }, + { + "path": "/dialog-box", + "name": "DialogBox 对话框", + "children": [ + { + "path": "/dialog-box/secondary-dialog", + "name": "二级弹窗" + }, + { + "path": "/dialog-box/custom-dialog-title", + "name": "自定义弹窗标题" + }, + { + "path": "/dialog-box/custom-dialog-content", + "name": "自定义弹窗内容" + }, + { + "path": "/dialog-box/custom-dialog-footer", + "name": "自定义弹窗底部" + }, + { + "path": "/dialog-box/hidden-close-buttons", + "name": "隐藏关闭按钮" + }, + { + "path": "/dialog-box/close-on-press-escape", + "name": "禁用 ESC 关闭" + }, + { + "path": "/dialog-box/dialog-top-height", + "name": "弹窗距离顶部的高度" + }, + { + "path": "/dialog-box/dialog-width", + "name": "弹窗的宽度" + }, + { + "path": "/dialog-box/close-on-click-modal", + "name": "点击遮罩层不关闭" + }, + { + "path": "/dialog-box/no-modal", + "name": "不启用遮罩层" + }, + { + "path": "/dialog-box/right-dialog", + "name": "右侧弹窗" + }, + { + "path": "/dialog-box/hidden-header", + "name": "隐藏弹窗头部" + }, + { + "path": "/dialog-box/lock-scroll", + "name": "弹出时禁用滚动" + }, + { + "path": "/dialog-box/center", + "name": "弹窗头部和底部内容居中" + }, + { + "path": "/dialog-box/draggable", + "name": "可拖拽" + }, + { + "path": "/dialog-box/fullscreen", + "name": "全屏弹窗" + }, + { + "path": "/dialog-box/open-close-events", + "name": "弹出与关闭事件" + }, + { + "path": "/dialog-box/form-in-dialog", + "name": "弹窗表单" + } + ] + }, + { + "path": "/collapse", + "name": "Collapse 折叠面板", + "children": [ + { + "path": "/collapse/accordion", + "name": "手风琴效果" + }, + { + "path": "/collapse/dynamic-disable", + "name": "禁用状态" + }, + { + "path": "/collapse/custom-collapse-title", + "name": "自定义面板标题" + }, + { + "path": "/collapse/collapse-events", + "name": "折叠面板事件" + }, + { + "path": "/collapse/block-close", + "name": "阻止折叠面板关闭" + }, + { + "path": "/collapse/nested-grid", + "name": "嵌套表格" + }, + { + "path": "/collapse/nested-form", + "name": "嵌套表单" + } + ] + }, + { + "path": "/split", + "name": "Split 面板分割", + "children": [ + { + "path": "/split/split-threshold", + "name": "面板阈值" + }, + { + "path": "/split/split-mode", + "name": "分割方式" + }, + { + "path": "/split/split-events", + "name": "事件" + }, + { + "path": "/split/split-slot", + "name": "插槽" + }, + { + "path": "/split/nested-use", + "name": "嵌套使用" + } + ] + } + ] + }, + { + "name": "表单组件", + "children": [ + { + "path": "/Autocomplete", + "name": "Autocomplete 自动完成", + "children": [ + { + "path": "/autocomplete/select-event", + "name": "事件" + }, + { + "path": "/autocomplete/disabled", + "name": "禁用" + }, + { + "path": "/autocomplete/size", + "name": "输入框大小" + }, + { + "path": "/autocomplete/clearable", + "name": "可清除" + }, + { + "path": "/autocomplete/append-prepend", + "name": "输入框前/后置内容" + }, + { + "path": "/autocomplete/custom-icon", + "name": "自定义图标" + }, + { + "path": "/autocomplete/debounce", + "name": "去抖延时" + }, + { + "path": "/autocomplete/hide-loading", + "name": "隐藏加载图标" + }, + { + "path": "/autocomplete/cust-template", + "name": "自定义模板" + }, + { + "path": "/autocomplete/remote-search", + "name": "远程搜索" + }, + { + "path": "/autocomplete/value-key", + "name": "指定显示的键名" + }, + { + "path": "/autocomplete/popper-class", + "name": "自定义列表样式" + }, + { + "path": "/autocomplete/placement", + "name": "设置菜单弹出位置" + }, + { + "path": "/autocomplete/highlight-first-item", + "name": "高亮显示第一项" + }, + { + "path": "/autocomplete/no-trigger-on-focus", + "name": "聚焦不显示建议列表" + } + ] + }, + { + "path": "/button", + "name": "Button 按钮", + "children": [ + { + "path": "/button/text-button", + "name": "文字按钮" + }, + { + "path": "/button/icon-button", + "name": "图标按钮" + }, + { + "path": "/button/round", + "name": "圆角按钮" + }, + { + "path": "/button/img-button", + "name": "图片按钮" + }, + { + "path": "/button/button-style", + "name": "主题样式" + }, + { + "path": "/button/show-loading", + "name": "显示加载中" + }, + { + "path": "/button/button-size", + "name": "尺寸" + }, + { + "path": "/button/circle-button", + "name": "圆形按钮" + }, + { + "path": "/button/autofocus", + "name": "聚焦" + }, + { + "path": "/button/plain-button", + "name": "朴素按钮" + }, + { + "path": "/button/reset-time", + "name": "防止表单重复提交" + }, + { + "path": "/button/default-focus", + "name": "默认聚焦" + }, + { + "path": "/button/button-events", + "name": "事件" + }, + { + "path": "/button/dynamic-disable-button", + "name": "动态禁用按钮" + } + ] + }, + { + "path": "/button-group", + "name": "ButtonGroup 按钮组", + "children": [ + { + "path": "/button-group/button-group-data", + "name": "按钮组数据" + }, + { + "path": "/button-group/size", + "name": "设置组件大小" + }, + { + "path": "/button-group/dynamic-disable", + "name": "禁用状态" + }, + { + "path": "/button-group/plain-button-group", + "name": "朴素按钮" + }, + { + "path": "/button-group/text-value-field", + "name": "数据字段映射" + }, + { + "path": "/button-group/default-slot-usage", + "name": "默认插槽" + } + ] + }, + { + "path": "/cascader", + "name": "Cascader 级联选择器", + "children": [ + { + "path": "/cascader/disabled-items", + "name": "禁用选项" + }, + { + "path": "/cascader/clearable", + "name": "可清空" + }, + { + "path": "/cascader/default-multiple", + "name": "多选" + }, + { + "path": "/cascader/check-strictly", + "name": "父子级不相关联" + }, + { + "path": "/cascader/auto-load", + "name": "动态加载" + }, + { + "path": "/cascader/props-children", + "name": "指定选择" + }, + { + "path": "/cascader/filterable", + "name": "可搜索" + }, + { + "path": "/cascader/show-all-levels", + "name": "仅显示最后一级" + }, + { + "path": "/cascader/events", + "name": "事件" + } + ] + }, + { + "path": "/cascader-panel", + "name": "CascaderPanel 级联面板", + "children": [ + { + "path": "/cascader-panel/change", + "name": "事件" + }, + { + "path": "/cascader-panel/custom-option-content", + "name": "自定义节点内容" + }, + { + "path": "/cascader-panel/cascader-panel-props", + "name": "Props 选项" + } + ] + }, + { + "path": "/checkbox", + "name": "Checkbox 复选框", + "children": [ + { + "path": "/checkbox/checkbox-group", + "name": "复选框组" + }, + { + "path": "/checkbox/indeterminate", + "name": "全选与半选" + }, + { + "path": "/checkbox/min-max", + "name": "可选数量限制" + }, + { + "path": "/checkbox/checkbox-button", + "name": "按钮形式复选框" + }, + { + "path": "/checkbox/vertical-checkbox", + "name": "垂直布局" + }, + { + "path": "/checkbox/dynamic-create-checkbox", + "name": "动态生成复选框" + }, + { + "path": "/checkbox/content-overflow", + "name": "内容超出时的提示信息" + }, + { + "path": "/checkbox/text", + "name": "文本" + }, + { + "path": "/checkbox/with-border", + "name": "尺寸" + }, + { + "path": "/checkbox/checkbox-events", + "name": "事件" + }, + { + "path": "/checkbox/checkbox-slot", + "name": "插槽" + } + ] + }, + { + "path": "/date-picker", + "name": "DatePicker 日期选择器", + "children": [ + { + "path": "/date-picker/date-shortcuts", + "name": "选择日带快捷选项" + }, + { + "path": "/date-picker/other-picker-type", + "name": "其他日期单位" + }, + { + "path": "/date-picker/time-zone", + "name": "时区选择" + }, + { + "path": "/date-picker/date-range", + "name": "选择日期范围" + }, + { + "path": "/date-picker/date-range-shortcuts", + "name": "日期范围快捷选项" + }, + { + "path": "/date-picker/default-time-of-range", + "name": "日期范围默认时刻" + }, + { + "path": "/date-picker/month-range", + "name": "选择月份范围" + }, + { + "path": "/date-picker/month-range-shortcuts", + "name": "月份范围快捷选项" + }, + { + "path": "/date-picker/max-min", + "name": "最大最小值" + }, + { + "path": "/date-picker/align", + "name": "对齐方式" + }, + { + "path": "/date-picker/set-size", + "name": "尺寸设置" + }, + { + "path": "/date-picker/about-clear", + "name": "清除输入" + }, + { + "path": "/date-picker/about-format", + "name": "格式化相关" + }, + { + "path": "/date-picker/time-format", + "name": "timeFormat格式化" + }, + { + "path": "/date-picker/custom-suffix-icon", + "name": "自定义后置图标" + }, + { + "path": "/date-picker/custom-range", + "name": "范围选择自定义相关" + }, + { + "path": "/date-picker/unlink-panels", + "name": "范围选择取消面板联动" + }, + { + "path": "/date-picker/default-value", + "name": "选择器打开时默认时间设置" + }, + { + "path": "/date-picker/editable", + "name": "文本框不可输入" + }, + { + "path": "/date-picker/date-picker-events", + "name": "事件" + }, + { + "path": "/date-picker/focus", + "name": "获取焦点" + }, + { + "path": "/date-picker/time-arrow-control", + "name": "箭头按钮控制时间选择" + }, + { + "path": "/date-picker/validate-event", + "name": "不触发表单校验" + }, + { + "path": "/date-picker/utc8", + "name": "海外显示东八区时间" + } + ] + }, + { + "path": "/drop-times", + "name": "DropTimes 下拉时间", + "children": [ + { + "path": "/drop-times/start-end-step", + "name": "步长与时间区间" + }, + { + "path": "/drop-times/size", + "name": "设置组件大小" + } + ] + }, + { + "path": "/file-upload", + "name": "FileUpload 文件上传", + "children": [ + { + "path": "/file-upload/jalor-request", + "name": "默认网关上传" + }, + { + "path": "/file-upload/size", + "name": "设置组件大小" + }, + { + "path": "/file-upload/accept-file-type", + "name": "可上传的文件类型" + }, + { + "path": "/file-upload/manual-upload", + "name": "手动上传" + }, + { + "path": "/file-upload/prevent-delete-file", + "name": "阻止删除文件" + }, + { + "path": "/file-upload/prevent-upload-file", + "name": "阻止上传文件" + }, + { + "path": "/file-upload/upload-request", + "name": "上传请求" + }, + { + "path": "/file-upload/mini-mode", + "name": "mini模式" + }, + { + "path": "/file-upload/drag-upload", + "name": "拖拽上传" + }, + { + "path": "/file-upload/drag-select-file", + "name": "拖拽选择文件" + }, + { + "path": "/file-upload/upload-file-list", + "name": "上传的文件列表" + }, + { + "path": "/file-upload/custom-upload-request", + "name": "自定义上传请求" + }, + { + "path": "/file-upload/upload-limit", + "name": "最大上传限制" + }, + { + "path": "/file-upload/picture-card", + "name": "照片墙" + }, + { + "path": "/file-upload/file-picture-card", + "name": "文件缩略图" + }, + { + "path": "/file-upload/picture-list", + "name": "图片列表缩略图" + }, + { + "path": "/file-upload/max-file-count", + "name": "最大上传文件数" + }, + { + "path": "/file-upload/multiple-file", + "name": "文件多选" + }, + { + "path": "/file-upload/custom-prefix", + "name": "钩子函数" + }, + { + "path": "/file-upload/upload-events", + "name": "事件" + }, + { + "path": "/file-upload/with-credentials", + "name": "支持发送 cookie 凭证信息" + }, + { + "path": "/file-upload/clear-files", + "name": "手动清空已上传文件列表" + }, + { + "path": "/file-upload/abort-quest", + "name": "手动取消上传请求" + }, + { + "path": "/file-upload/custom-upload-tip", + "name": "自定义上传提示" + }, + { + "path": "/file-upload/custom-trigger", + "name": "自定义触发文件选项框" + }, + { + "path": "/file-upload/upload-user-head", + "name": "用户头像上传" + }, + { + "path": "/file-upload/image-size", + "name": "获取上传图片的长宽尺寸" + } + ] + }, + { + "path": "/form", + "name": "Form 表单", + "children": [ + { + "path": "/form/formitem", + "name": "FormItem 表单项" + }, + { + "path": "/form/form-validation", + "name": "表单校验" + }, + { + "path": "/form/form-validate-setting", + "name": "表单校验配置" + }, + { + "path": "/form/size", + "name": "表单尺寸" + }, + { + "path": "/form/form-clear-validate", + "name": "移除表单校验" + }, + { + "path": "/form/slot-label", + "name": "标签文本插槽" + }, + { + "path": "/form/novalid-tip", + "name": "隐藏校验tip提示框" + }, + { + "path": "/form/validate-type", + "name": "校验提示的形式" + }, + { + "path": "/form/form-disabled", + "name": "表单禁用" + } + ] + }, + { + "path": "/input", + "name": "Input 输入框", + "children": [ + { + "path": "/input/clearable", + "name": "可清空" + }, + { + "path": "/input/show-password", + "name": "密码框" + }, + { + "path": "/input/input-size", + "name": "尺寸" + }, + { + "path": "/input/custom-prefix-suffix-icon", + "name": "自定义输入框前后图标" + }, + { + "path": "/input/resize-textarea", + "name": "可缩放文本域" + }, + { + "path": "/input/textarea-limit-rows", + "name": "文本域限制输入行数" + }, + { + "path": "/input/autosize-textarea", + "name": "可自适应文本高度的文本域" + }, + { + "path": "/input/complicated-input", + "name": "复合型输入框" + }, + { + "path": "/input/max-min", + "name": "最大最小值" + }, + { + "path": "/input/max-min-length", + "name": "输入长度限制" + }, + { + "path": "/input/counter", + "name": "输入计数器" + }, + { + "path": "/input/step", + "name": "输入字段的合法数字间隔" + }, + { + "path": "/input/validate-event", + "name": "输入时触发表单校验" + }, + { + "path": "/input/autofocus", + "name": "自动获取焦点" + }, + { + "path": "/input/input-events", + "name": "事件" + }, + { + "path": "/input/input-methods", + "name": "方法" + } + ] + }, + { + "path": "/ip-address", + "name": "IpAddress 输入框", + "children": [ + { + "path": "/ip-address/type", + "name": "类型" + }, + { + "path": "/ip-address/readonly", + "name": "文本只读" + }, + { + "path": "/ip-address/size", + "name": "输入框大小" + }, + { + "path": "/ip-address/custom-delimiter", + "name": "自定义分隔符" + }, + { + "path": "/ip-address/ipaddress-events", + "name": "事件" + } + ] + }, + { + "path": "/link", + "name": "Link 文字链接", + "children": [ + { + "path": "/link/link-style", + "name": "主题样式" + }, + { + "path": "/link/dynamic-disable", + "name": "禁用状态" + }, + { + "path": "/link/focus-no-underline", + "name": "聚焦时不显示下划线" + }, + { + "path": "/link/custom-icon", + "name": "自定义图标" + }, + { + "path": "/link/config-href", + "name": "链接地址" + } + ] + }, + { + "path": "/numeric", + "name": "Numeric 计数器", + "children": [ + { + "path": "/numeric/allow-empty", + "name": "可清空输入" + }, + { + "path": "/numeric/about-step", + "name": "步长" + }, + { + "path": "/numeric/max-min", + "name": "最大最小值" + }, + { + "path": "/numeric/numeric-size", + "name": "尺寸" + }, + { + "path": "/numeric/controls", + "name": "控制按钮" + }, + { + "path": "/numeric/precision", + "name": "数值精度" + }, + { + "path": "/numeric/mouse-wheel", + "name": "鼠标滚轮滚动改变值" + }, + { + "path": "/numeric/numeric-events", + "name": "事件" + }, + { + "path": "/numeric/calculate-according-to-num-of-goods", + "name": "根据商品数量自动计算价格" + } + ] + }, + { + "path": "/pop-editor", + "name": "PopEditor 弹出编辑", + "children": [ + { + "path": "/pop-editor/custom-conditions", + "name": "自定义查询条件" + }, + { + "path": "/pop-editor/draggable", + "name": "窗口拖动" + }, + { + "path": "/pop-editor/show-clear-btn", + "name": "不可清除" + }, + { + "path": "/pop-editor/resize", + "name": "弹出窗全屏展示" + }, + { + "path": "/pop-editor/table-edit", + "name": "表格编辑" + }, + { + "path": "/pop-editor/width-height", + "name": "宽高" + }, + { + "path": "/pop-editor/custom-icon", + "name": "自定义图标" + }, + { + "path": "/pop-editor/multi-selected", + "name": "多选" + }, + { + "path": "/pop-editor/popeditor-events", + "name": "事件" + }, + { + "path": "/pop-editor/dynamic-readonly", + "name": "只读" + }, + { + "path": "/pop-editor/before-reset", + "name": "重置" + }, + { + "path": "/pop-editor/slot", + "name": "插槽" + }, + { + "path": "/pop-editor/dynamic-disabled", + "name": "禁用" + }, + { + "path": "/pop-editor/clearable", + "name": "支持在搜索表单配置清除按钮" + }, + { + "path": "/pop-editor/text-field", + "name": "显示字段映射" + }, + { + "path": "/pop-editor/value-field", + "name": "提交字段映射" + }, + { + "path": "/pop-editor/custom-title", + "name": "自定义标题" + }, + { + "path": "/pop-editor/remote-search", + "name": "远程搜索" + }, + { + "path": "/pop-editor/pager", + "name": "分页" + }, + { + "path": "/pop-editor/render-text", + "name": "渲染反查" + }, + { + "path": "/pop-editor/tree-edit", + "name": "树模式" + }, + { + "path": "/pop-editor/single-select-radio", + "name": "树模式单选" + }, + { + "path": "/pop-editor/size", + "name": "编辑框大小" + }, + { + "path": "/pop-editor/show-overflow", + "name": "数据超出隐藏" + }, + { + "path": "/pop-editor/trigger", + "name": "单选时触发勾选的方式" + }, + { + "path": "/pop-editor/show-history", + "name": "设置历史记录标签页" + } + ] + }, + { + "path": "/pop-upload", + "name": "PopUpload 弹出框上传", + "children": [ + { + "path": "/pop-upload/custom-request-headers", + "name": "自定义请求头" + }, + { + "path": "/pop-upload/size", + "name": "设置组件大小" + }, + { + "path": "/pop-upload/http-request", + "name": "自定义上传请求" + }, + { + "path": "/pop-upload/upload-name", + "name": "上传文件字段名" + }, + { + "path": "/pop-upload/fill-button-text", + "name": "自定义文本内容" + }, + { + "path": "/pop-upload/file-limit", + "name": "最大上传文件数" + }, + { + "path": "/pop-upload/file-type", + "name": "可上传文件类型" + }, + { + "path": "/pop-upload/max-upload-file-size", + "name": "可上传文件大小" + }, + { + "path": "/pop-upload/before-remove-file", + "name": "上传文件移除前" + } + ] + }, + { + "path": "/radio", + "name": "Radio 单选框", + "children": [ + { + "path": "/radio/with-border", + "name": "带有边框" + }, + { + "path": "/radio/dynamic-disable", + "name": "禁用状态" + }, + { + "path": "/radio/vertical", + "name": "垂直布局" + }, + { + "path": "/radio/active-color", + "name": "颜色设置" + }, + { + "path": "/radio/radio-text", + "name": "文本内容" + }, + { + "path": "/radio/radio-size", + "name": "尺寸设置" + }, + { + "path": "/radio/radio-events", + "name": "单选框事件" + }, + { + "path": "/radio/group-options", + "name": "循环配置" + }, + { + "path": "/radio/radio-default", + "name": "插槽" + } + ] + }, + { + "path": "/search", + "name": "Search 搜索", + "children": [ + { + "path": "/search/clearable", + "name": "可清除" + }, + { + "path": "/search/mini-mode", + "name": "mini 模式" + }, + { + "path": "/search/transparent-mode", + "name": "透明模式" + }, + { + "path": "/search/default-value", + "name": "默认搜索" + }, + { + "path": "/search/search-types", + "name": "搜索类型" + }, + { + "path": "/search/custom-search-types", + "name": "自定义搜索类型的内容" + }, + { + "path": "/search/show-selected-types", + "name": "自定义搜索类型选择后的展示" + }, + { + "path": "/search/search-events", + "name": "事件" + } + ] + }, + { + "path": "/select", + "name": "Select 选择器", + "children": [ + { + "path": "/select/multi-select", + "name": "多选" + }, + { + "path": "/select/dynamic-disable", + "name": "禁用" + }, + { + "path": "/select/select-size", + "name": "尺寸" + }, + { + "path": "/select/option-group", + "name": "分组" + }, + { + "path": "/select/select-events", + "name": "事件" + }, + { + "path": "/select/filterable", + "name": "可搜索" + }, + { + "path": "/select/allow-create", + "name": "创建条目" + }, + { + "path": "/select/remote-filter", + "name": "远程搜索" + }, + { + "path": "/select/clear-options", + "name": "选项可清除" + }, + { + "path": "/select/tag-copy", + "name": "选项可复制" + }, + { + "path": "/select/tag-copy-all", + "name": "可复制所有图标显示隐藏" + }, + { + "path": "/select/binding-obj", + "name": "绑定值为对象" + }, + { + "path": "/select/custom-no-result-text", + "name": "自定义无匹配搜索文字" + }, + { + "path": "/select/custom-empty-data-text", + "name": "自定义空数据显示文字" + }, + { + "path": "/select/popup-style-position", + "name": "弹出框样式与定位" + }, + { + "path": "/select/automatic-select", + "name": "获取焦点即弹出下拉菜单" + }, + { + "path": "/select/custom-prefix", + "name": "自定义头部内容" + }, + { + "path": "/select/custom-options", + "name": "自定义下拉内容" + }, + { + "path": "/select/show-alloption", + "name": "不展示全选选项" + }, + { + "path": "/select/set-input-value", + "name": "改变输入框的值" + }, + { + "path": "/select/manual-focus-blur", + "name": "手动获取焦点" + }, + { + "path": "/select/is-drop-inherit-width", + "name": "下拉跟随宽度" + }, + { + "path": "/select/slot-select", + "name": "插槽" + }, + { + "path": "/select/nest-grid", + "name": "嵌套 Grid" + }, + { + "path": "/select/nest-tree", + "name": "嵌套 Tree" + }, + { + "path": "/select/cache-usage", + "name": "本地缓存" + }, + { + "path": "/select/optimization", + "name": "虚拟滚动" + }, + { + "path": "/select/upgrade-guide", + "name": "升级指导" + } + ] + }, + { + "path": "/slider", + "name": "Slider 滑块", + "children": [ + { + "path": "/slider/vertical-mode", + "name": "竖向模式" + }, + { + "path": "/slider/max-min", + "name": "最大最小值" + }, + { + "path": "/slider/range-select", + "name": "范围选择" + }, + { + "path": "/slider/show-input", + "name": "输入框模式" + }, + { + "path": "/slider/shortcut-operation", + "name": "快捷键操作" + }, + { + "path": "/slider/dynamic-disable", + "name": "禁用" + }, + { + "path": "/slider/show-tip", + "name": "提示" + }, + { + "path": "/slider/about-step", + "name": "步长" + }, + { + "path": "/slider/slider-events", + "name": "事件" + }, + { + "path": "/slider/slider-slot", + "name": "自定义插槽" + } + ] + }, + { + "path": "/switch", + "name": "Switch 开关", + "children": [ + { + "path": "/switch/mini-mode", + "name": "mini 模式" + }, + { + "path": "/switch/custom-open-close", + "name": "自定义开关的显示" + }, + { + "path": "/switch/custom-true-false-value", + "name": "自定义开关的取值" + }, + { + "path": "/switch/dynamic-disable", + "name": "禁用" + } + ] + }, + { + "path": "/time-picker", + "name": "TimePicker 时间选择器", + "children": [ + { + "path": "/time-picker/picker-options", + "name": "选择范围" + }, + { + "path": "/time-picker/arrow-control", + "name": "箭头选择" + }, + { + "path": "/time-picker/clear-icon", + "name": "自定义清除图标" + }, + { + "path": "/time-picker/suffix-icon", + "name": "自定义后置图标" + }, + { + "path": "/time-picker/format", + "name": "时间格式化" + }, + { + "path": "/time-picker/time-low", + "name": "时间显示格式" + }, + { + "path": "/time-picker/date", + "name": "日期显示格式" + }, + { + "path": "/time-picker/is-range", + "name": "是否为时间范围选择" + }, + { + "path": "/time-picker/default-value", + "name": "默认选择时间" + }, + { + "path": "/time-picker/editable", + "name": "文本框不可输入" + }, + { + "path": "/time-picker/time-picker-events", + "name": "事件" + } + ] + }, + { + "path": "/time-select", + "name": "TimeSelect 时间选择", + "children": [ + { + "path": "/time-select/range-placeholder", + "name": "固定时间范围" + }, + { + "path": "/time-select/default-value", + "name": "选择默认值" + }, + { + "path": "/time-select/picker-options", + "name": "指定时间固点" + }, + { + "path": "/time-select/suffix-icon", + "name": "自定义后置图标" + }, + { + "path": "/time-select/clear-icon", + "name": "自定义清除图标" + }, + { + "path": "/time-select/event", + "name": "事件" + }, + { + "path": "/time-select/editable", + "name": "文本框不可输入" + }, + { + "path": "/time-select/disabled", + "name": "禁用" + }, + { + "path": "/time-select/popper-class", + "name": "自定义类名" + }, + { + "path": "/time-select/size", + "name": "尺寸" + }, + { + "path": "/time-select/focus", + "name": "手动获取焦点" + } + ] + } + ] + }, + { + "name": "表格组件", + "path": "/grid", + "children": [ + { + "name": "序号列", + "children": [ + { + "path": "/grid/serial-column/default-serial-column", + "name": "默认序号列" + }, + { + "path": "/grid/serial-column/custom-serial-column", + "name": "自定义序号列" + } + ] + }, + { + "name": "操作列", + "children": [ + { + "path": "/grid/operation-column/radio-operation-column", + "name": "单选" + }, + { + "path": "/grid/operation-column/checkbox-operation-column", + "name": "多选" + }, + { + "path": "/grid/operation-column/custom-operation-column", + "name": "自定义操作列" + } + ] + }, + { + "name": "空数据", + "path": "/grid/empty-data-tip" + }, + { + "name": "数据源", + "children": [ + { + "path": "/grid/data-source/static-data", + "name": "静态数据" + }, + { + "path": "/grid/data-source/request-service", + "name": "请求服务" + }, + { + "path": "/grid/data-source/auto-load", + "name": "自动加载数据" + }, + { + "path": "/grid/data-source/columns", + "name": "列数据配置" + }, + { + "path": "/grid/data-source/column-asyn-rendering", + "name": "列异步渲染" + } + ] + }, + { + "name": "大数据", + "children": [ + { + "path": "/grid/large-data/scroll-paging", + "name": "滚动分页" + }, + { + "path": "/grid/large-data/virtual-rolling", + "name": "虚拟滚动" + }, + { + "path": "/grid/large-data/full-data-loading", + "name": "全量加载" + }, + { + "path": "/grid/large-data/load-column", + "name": "生成 1000 列" + }, + { + "path": "/grid/large-data/scroll-to", + "name": "滚动到指定位置" + } + ] + }, + { + "name": "分页", + "children": [ + { + "path": "/grid/pager/inner-pager", + "name": "内置分页" + } + ] + }, + { + "name": "编辑", + "children": [ + { + "path": "/grid/edit/row-editing", + "name": "行编辑" + }, + { + "path": "/grid/edit/cell-editing", + "name": "单元格编辑" + }, + { + "path": "/grid/edit/format-value", + "name": "格式化单元格编辑器" + }, + { + "path": "/grid/edit/custom-editing", + "name": "自定义编辑" + }, + { + "path": "/grid/edit/status-of-editing", + "name": "编辑状态" + }, + { + "path": "/grid/edit/trigger-mode-for-editing", + "name": "触发方式" + } + ] + }, + { + "name": "工具栏", + "children": [ + { + "path": "/grid/toolbar/insert-delete-update", + "name": "增删改" + }, + { + "path": "/grid/toolbar/save-data", + "name": "服务端数据方法" + }, + { + "path": "/grid/toolbar/copy-row-data", + "name": "复制行" + }, + { + "path": "/grid/toolbar/import-and-export", + "name": "导入导出" + }, + { + "path": "/grid/toolbar/refresh-grid", + "name": "刷新" + }, + { + "path": "/grid/toolbar/grid-full-screen", + "name": "全屏" + }, + { + "path": "/grid/toolbar/custom-toolbar", + "name": "自定义工具栏" + }, + { + "path": "/grid/toolbar/toolbar-op-config", + "name": "配置式" + } + ] + }, + { + "name": "加载中", + "path": "/grid/grid-loading-tip" + }, + { + "name": "尺寸", + "path": "/grid/grid-size" + }, + { + "name": "宽高", + "children": [ + { + "path": "/grid/width-height/resize-column-width", + "name": "调整列宽" + }, + { + "path": "/grid/width-height/fixed-column-width", + "name": "固定列宽度" + }, + { + "path": "/grid/width-height/adaptive-column-width", + "name": "自适应列宽度" + }, + { + "path": "/grid/width-height/fixed-grid-height", + "name": "固定表格高度" + }, + { + "path": "/grid/width-height/adaptive-grid-width-height", + "name": "响应式表格宽高" + }, + { + "path": "/grid/width-height/auto-height", + "name": "自动高度" + }, + { + "path": "/grid/width-height/max-min-grid-height", + "name": "最大最小表格高度" + }, + { + "path": "/grid/width-height/column-min-width", + "name": "列最小宽度" + }, + { + "path": "/grid/width-height/min-width", + "name": "单列最小宽度" + }, + { + "path": "/grid/width-height/column-width", + "name": "总体列宽度" + }, + { + "path": "/grid/width-height/recalculate", + "name": "重新计算表格" + } + ] + }, + { + "name": "边框", + "path": "/grid/grid-border" + }, + { + "name": "高亮", + "children": [ + { + "path": "/grid/highlight/highlight-hover-row", + "name": "高亮悬停行" + }, + { + "path": "/grid/highlight/highlight-current-row", + "name": "高亮当前选中行" + }, + { + "path": "/grid/highlight/highlight-hover-column", + "name": "高亮悬停列" + }, + { + "path": "/grid/highlight/highlight-current-column", + "name": "高亮当前选中列" + }, + { + "path": "/grid/highlight/highlight-cell", + "name": "高亮编辑中的单元格" + } + ] + }, + { + "name": "斑马线条纹", + "path": "/grid/grid-stripe" + }, + { + "name": "优化配置项", + "path": "/grid/grid-optimization" + }, + { + "name": "Tip 提示", + "children": [ + { + "path": "/grid/tip/column-header-tip", + "name": "列头提示" + }, + { + "path": "/grid/tip/cell-tip", + "name": "单元格提示" + } + ] + }, + { + "name": "对齐方式", + "children": [ + { + "path": "/grid/align/column-align", + "name": "列对齐" + }, + { + "path": "/grid/align/header-align", + "name": "表头对齐" + }, + { + "path": "/grid/align/footer-align", + "name": "表尾对齐" + }, + { + "path": "/grid/align/grid-align", + "name": "表格对齐" + } + ] + }, + { + "name": "表头", + "children": [ + { + "path": "/grid/header/hide-grid-header", + "name": "隐藏表头" + }, + { + "path": "/grid/header/custom-grid-header", + "name": "自定义表头" + }, + { + "path": "/grid/header/slot-header", + "name": "表头插槽" + }, + { + "path": "/grid/header/header-class-name", + "name": "表头的单元格类名" + } + ] + }, + { + "name": "表尾", + "children": [ + { + "path": "/grid/footer/footer-summation", + "name": "表尾合计" + }, + { + "path": "/grid/footer/footer-class-name", + "name": "表尾单元格类名" + }, + { + "path": "/grid/footer/footer-row-or-column-span", + "name": "表尾合并行或列" + } + ] + }, + { + "name": "自定义样式", + "children": [ + { + "path": "/grid/custom-style/row-style", + "name": "行样式" + }, + { + "path": "/grid/custom-style/header-style", + "name": "表头样式" + }, + { + "path": "/grid/custom-style/footer-style", + "name": "表尾样式" + }, + { + "path": "/grid/custom-style/cell-style", + "name": "单元格样式" + } + ] + }, + { + "name": "排序", + "children": [ + { + "path": "/grid/sort/default-sort", + "name": "默认排序" + }, + { + "path": "/grid/sort/combinations-sort", + "name": "多字段组合排序" + }, + { + "path": "/grid/sort/custom-sort", + "name": "自定义排序" + }, + { + "path": "/grid/sort/server-sort", + "name": "服务端排序" + } + ] + }, + { + "name": "筛选", + "children": [ + { + "path": "/grid/filter/default-filter", + "name": "默认筛选" + }, + { + "path": "/grid/filter/advanced-filter", + "name": "高级筛选" + }, + { + "path": "/grid/filter/custom-filter", + "name": "自定义筛选" + }, + { + "path": "/grid/filter/server-filter", + "name": "服务端筛选" + }, + { + "path": "/grid/filter/default-relation", + "name": "输入过滤的默认选项" + } + ] + }, + { + "name": "冻结", + "children": [ + { + "path": "/grid/fixed/left-fixed", + "name": "左侧冻结" + }, + { + "path": "/grid/fixed/right-fixed", + "name": "右侧冻结" + }, + { + "path": "/grid/fixed/multi-column-fixed", + "name": "多列冻结" + } + ] + }, + { + "name": "合并", + "children": [ + { + "path": "/grid/span/row-span", + "name": "行合并" + }, + { + "path": "/grid/span/column-span", + "name": "列合并" + } + ] + }, + { + "name": "分组", + "path": "/grid/row-grouping" + }, + { + "name": "统计", + "children": [ + { + "path": "/grid/summary/custom-summary", + "name": "自定义统计" + }, + { + "path": "/grid/summary/configuration-summary", + "name": "配置式统计" + } + ] + }, + { + "name": "拖拽", + "children": [ + { + "path": "/grid/drag/row-drag", + "name": "行拖拽" + }, + { + "path": "/grid/drag/column-drag", + "name": "列拖拽" + } + ] + }, + { + "name": "数据级联", + "children": [ + { + "path": "/grid/cascade/normal-column-cascade", + "name": "正常列级联" + }, + { + "path": "/grid/cascade/any-parent-cascade", + "name": "任意父级联" + } + ] + }, + { + "name": "右键菜单", + "children": [ + { + "path": "/grid/context-menu/header-menu", + "name": "表头菜单" + }, + { + "path": "/grid/context-menu/footer-menu", + "name": "表尾菜单" + }, + { + "path": "/grid/context-menu/cell-menu", + "name": "单元格菜单" + }, + { + "path": "/grid/context-menu/menu-permissions", + "name": "菜单权限" + } + ] + }, + { + "name": "编辑器", + "children": [ + { + "path": "/grid/editor/inner-editor", + "name": "内置编辑器" + }, + { + "path": "/grid/editor/custom-editor", + "name": "自定义编辑器" + }, + { + "path": "/grid/editor/custom-editor-aui3", + "name": "Tiny Vue 组件作为编辑器" + }, + { + "path": "/grid/editor/custom-editor-mutil", + "name": "下拉多选" + }, + { + "path": "/grid/editor/popeditor-events", + "name": "编辑器事件" + }, + { + "path": "/grid/editor/popeditor-in-grid", + "name": "Popeditor 弹窗编辑" + } + ] + }, + { + "name": "渲染器", + "children": [ + { + "path": "/grid/renderer/inner-renderer", + "name": "内置渲染器" + }, + { + "path": "/grid/renderer/custom-renderer", + "name": "自定义渲染器" + }, + { + "path": "/grid/renderer/async-colunm-render", + "name": "列异步数据渲染" + } + ] + }, + { + "name": "表格校验", + "children": [ + { + "path": "/grid/validation/editing-validation", + "name": "编辑时校验" + }, + { + "path": "/grid/validation/select-validation", + "name": "选中时校验" + }, + { + "path": "/grid/validation/before-submit-validation", + "name": "提交前校验" + }, + { + "path": "/grid/validation/tipconfig", + "name": "错误提示配置" + } + ] + }, + { + "name": "事件", + "children": [ + { + "path": "/grid/event/header-click-event", + "name": "表头单击事件" + }, + { + "path": "/grid/event/header-dblclick-event", + "name": "表头双击事件" + }, + { + "path": "/grid/event/cell-click-event", + "name": "单元格单击事件" + }, + { + "path": "/grid/event/cell-dblclick-event", + "name": "单元格双击事件" + }, + { + "path": "/grid/event/cell-mouseenter-event", + "name": "单元格鼠标进入事件" + }, + { + "path": "/grid/event/cell-mouseleave-event", + "name": "单元格鼠标离开事件" + }, + { + "path": "/grid/event/grid-scroll-event", + "name": "表格滚动事件" + }, + { + "path": "/grid/event/grid-events", + "name": "表格的事件对象" + }, + { + "path": "/grid/event/current-change-event", + "name": "行选中事件" + }, + { + "path": "/grid/event/edit-actived-event", + "name": "单元格激活编辑事件" + }, + { + "path": "/grid/event/edit-closed-event", + "name": "单元格编辑完成事件" + }, + { + "path": "/grid/event/edit-disabled-event", + "name": "单元格激活时如果是禁用状态事件" + }, + { + "path": "/grid/event/footer-cell-context-menu-event", + "name": "右键点击表尾单元格事件" + }, + { + "path": "/grid/event/header-cell-context-menu-event", + "name": "右键点击表头事件" + }, + { + "path": "/grid/event/page-change-event", + "name": "分页发生改变事件" + }, + { + "path": "/grid/event/radio-change-event", + "name": "radio 勾选行事件" + }, + { + "path": "/grid/event/resizable-change-event", + "name": "列宽改变事件" + }, + { + "path": "/grid/event/select-all-event", + "name": "全部选中事件" + }, + { + "path": "/grid/event/select-change-event", + "name": "select 勾选行事件" + }, + { + "path": "/grid/event/toggle-expand-change-event", + "name": "行展开收起事件" + }, + { + "path": "/grid/event/toggle-tree-change-event", + "name": "树节点展开收起事件" + }, + { + "path": "/grid/event/toolbar-button-click-event", + "name": "工具栏点击事件" + }, + { + "path": "/grid/event/valid-error-event", + "name": "校验不通过事件" + }, + { + "path": "/grid/event/grid-methods", + "name": "获取表格方法" + } + ] + }, + { + "name": "插槽", + "children": [ + { + "path": "/grid/slot/default-slot", + "name": "默认插槽" + }, + { + "path": "/grid/slot/buttons-slot", + "name": "工具栏插槽" + }, + { + "path": "/grid/slot/empty-slot", + "name": "空数据显示插槽" + } + ] + }, + { + "name": "个性化", + "children": [ + { + "path": "/grid/customized/column-width", + "name": "列宽" + }, + { + "path": "/grid/customized/column-sort", + "name": "列排序" + }, + { + "path": "/grid/customized/sort-type", + "name": "排序类型" + }, + { + "path": "/grid/customized/column-fixed", + "name": "列冻结" + }, + { + "path": "/grid/customized/column-sortable", + "name": "列顺序" + }, + { + "path": "/grid/customized/column-visible-hidden", + "name": "列显示隐藏" + }, + { + "path": "/grid/customized/prsonalized-drag", + "name": "个性化面板拖拽事件" + }, + { + "path": "/grid/customized/page-size", + "name": "分页条数" + }, + { + "path": "/grid/customized/local-storage", + "name": "本地存储" + }, + { + "path": "/grid/customized/server-storage", + "name": "服务端存储" + } + ] + }, + { + "name": "树表", + "children": [ + { + "path": "/grid/tree-grid/tree-grid-base-usage", + "name": "基础用法" + }, + { + "path": "/grid/tree-grid/tree-grid-operation-column", + "name": "操作列" + }, + { + "path": "/grid/tree-grid/tree-grid-fixed-column", + "name": "冻结列" + }, + { + "path": "/grid/tree-grid/tree-grid-expand", + "name": "展开行" + }, + { + "path": "/grid/tree-grid/tree-grid-index", + "name": "展开行序号列配置" + }, + { + "path": "/grid/tree-grid/tree-grid-expand-config", + "name": "展开行配置项" + }, + { + "path": "/grid/tree-grid/tree-grid-insert-delete-update", + "name": "增删改" + }, + { + "path": "/grid/tree-grid/tree-grid-keyboard-operation", + "name": "键盘操作" + } + ] + }, + { + "name": "嵌套表格", + "path": "/grid/nested-grid" + }, + { + "name": "导入导出", + "children": [ + { + "path": "/grid/import-export/export-excel", + "name": "导出Excel" + }, + { + "path": "/grid/import-export/import-grid", + "name": "导入Excel" + } + ] + }, + { + "name": "鼠标和键盘配置", + "children": [ + { + "name": "键盘导航", + "path": "/grid/keyboard/keyboard-navigation" + }, + { + "path": "/grid/keyboard/keyboard-config", + "name": "按键配置项" + }, + { + "path": "/grid/keyboard/mouse-config", + "name": "鼠标配置项" + } + ] + }, + { + "name": "表格行列反转", + "path": "/grid/reverse-column-row" + }, + { + "name": "动态生成列", + "path": "/grid/dynamically-columns" + }, + { + "name": "常见问题", + "path": "/grid/faq" + } + ] + }, + { + "name": "数据组件", + "children": [ + { + "path": "/pager", + "name": "Pager 分页", + "children": [ + { + "path": "/pager/current-page", + "name": "当前页" + }, + { + "path": "/pager/pager-mode", + "name": "显示模式" + }, + { + "path": "/pager/page-count", + "name": "总页数" + }, + { + "path": "/pager/pager-events", + "name": "分页事件" + }, + { + "path": "/pager/pager-append-to-body", + "name": "下拉框位置" + }, + { + "path": "/pager/popper-class", + "name": "自定义下拉框类名" + }, + { + "path": "/pager/custom-layout", + "name": "自定义分页布局" + }, + { + "path": "/pager/pager-count", + "name": "页码按钮数量" + }, + { + "path": "/pager/page-size", + "name": "每页显示数量" + }, + { + "path": "/pager/hide-on-single-page", + "name": "只有一页时隐藏分页" + }, + { + "path": "/pager/custom-next-prev-text", + "name": "自定义上下页按钮文本" + }, + { + "path": "/pager/pager-in-grid", + "name": "Grid 表格分页" + } + ] + }, + { + "path": "/progress", + "name": "Progress 进度条", + "children": [ + { + "path": "/progress/progress-type", + "name": "类型" + }, + { + "path": "/progress/progress-width", + "name": "宽度" + }, + { + "path": "/progress/progress-status", + "name": "状态" + }, + { + "path": "/progress/text-inside-or-no-text", + "name": "文字内显或不显" + }, + { + "path": "/progress/custom-color", + "name": "自定义颜色" + }, + { + "path": "/progress/format-text", + "name": "自定义显示文字" + }, + { + "path": "/progress/dynamic-control-changes", + "name": "动态控制进度条变化" + } + ] + }, + { + "path": "/tree", + "name": "Tree 树形控件", + "children": [ + { + "path": "/tree/data-source", + "name": "数据源" + }, + { + "path": "/tree/disable-node", + "name": "禁用状态" + }, + { + "path": "/tree/custom-empty-text", + "name": "自定义空数据文本" + }, + { + "path": "/tree/render-after-expand", + "name": "展开后渲染" + }, + { + "path": "/tree/node-key", + "name": "唯一标识" + }, + { + "path": "/tree/check-strictly", + "name": "父子不互相关联" + }, + { + "path": "/tree/default-expand-all", + "name": "默认展开所有节点" + }, + { + "path": "/tree/expand-on-click-node", + "name": "点击节点展开收缩" + }, + { + "path": "/tree/check-on-click-node", + "name": "点击节点时选中" + }, + { + "path": "/tree/auto-expand-parent", + "name": "自动展开父节点" + }, + { + "path": "/tree/default-checked-keys", + "name": "默认勾选的节点" + }, + { + "path": "/tree/default-expanded-keys", + "name": "默认展开的节点" + }, + { + "path": "/tree/current-node-key", + "name": "当前选中节点标志" + }, + { + "path": "/tree/slot-deffault", + "name": "默认插槽" + }, + { + "path": "/tree/render-content", + "name": "自定义内容区渲染" + }, + { + "path": "/tree/show-checkbox", + "name": "是否开启多选模式" + }, + { + "path": "/tree/node-draggable", + "name": "可拖拽节点" + }, + { + "path": "/tree/allow-drag", + "name": "自定义节点能否被拖拽" + }, + { + "path": "/tree/allow-drop", + "name": "自定义目标节点能否被放置" + }, + { + "path": "/tree/node-props-config", + "name": "数据节点属性配置" + }, + { + "path": "/tree/lazy-load-node", + "name": "懒加载子节点" + }, + { + "path": "/tree/highlight-current", + "name": "高亮当前选中节点" + }, + { + "path": "/tree/filter-node", + "name": "节点过滤" + }, + { + "path": "/tree/accordion-mode", + "name": "手风琴模式" + }, + { + "path": "/tree/indent", + "name": "水平缩进" + }, + { + "path": "/tree/custom-node-icon", + "name": "自定义展开折叠图标" + }, + { + "path": "/tree/set-tree-icon", + "name": "展开折叠图标分别设置" + }, + { + "path": "/tree/contextmenu", + "name": "右键打开自定义菜单栏" + }, + { + "path": "/tree/events", + "name": "事件" + }, + { + "path": "/tree/show-radio", + "name": "单选" + } + ] + }, + { + "path": "/transfer", + "name": "Transfer 穿梭框", + "children": [ + { + "path": "/transfer/data-source", + "name": "数据源" + }, + { + "path": "/transfer/show-all-btn", + "name": "展示全部移动按钮" + }, + { + "path": "/transfer/custom-transfer-titles", + "name": "自定义列表标题" + }, + { + "path": "/transfer/custom-button-texts", + "name": "自定义按钮文案" + }, + { + "path": "/transfer/filter-placeholder", + "name": "搜索框占位符" + }, + { + "path": "/transfer/custom-filter-method", + "name": "自定义搜索方法" + }, + { + "path": "/transfer/default-checked", + "name": "默认勾选项" + }, + { + "path": "/transfer/custom-render-content", + "name": "自定义数据项渲染" + }, + { + "path": "/transfer/checked-format-text", + "name": "列表顶部勾选状态文案" + }, + { + "path": "/transfer/filterable", + "name": "可搜索" + }, + { + "path": "/transfer/props-of-data-source", + "name": "数据源的字段别名" + }, + { + "path": "/transfer/target-order", + "name": "右侧排序策略" + }, + { + "path": "/transfer/drop-config", + "name": "左右拖拽" + }, + { + "path": "/transfer/transfer-events", + "name": "穿梭框事件" + }, + { + "path": "/transfer/manual-clear-query", + "name": "手动清空搜索框" + }, + { + "path": "/transfer/custom-footer", + "name": "自定义列表底部" + }, + { + "path": "/transfer/panel-slot", + "name": "自定义面板内容" + }, + { + "path": "/transfer/nested-table", + "name": "嵌套表格" + }, + { + "path": "/transfer/nested-tree", + "name": "嵌套树" + } + ] + } + ] + }, + { + "name": "提示组件", + "children": [ + { + "path": "/alert", + "name": "Alert 警告", + "children": [ + { + "path": "/alert/alert-type", + "name": "类型" + }, + { + "path": "/alert/large-size", + "name": "大尺寸" + }, + { + "path": "/alert/custom-title", + "name": "自定义标题" + }, + { + "path": "/alert/align-center", + "name": "文字居中" + }, + { + "path": "/alert/custom-close-text", + "name": "自定义关闭按钮文本" + }, + { + "path": "/alert/custom-alert-icon", + "name": "自定义警告图标" + }, + { + "path": "/alert/not-closable", + "name": "不可关闭" + }, + { + "path": "/alert/custom-description", + "name": "自定义提示内容" + }, + { + "path": "/alert/interactive-operation", + "name": "自定义交互操作" + }, + { + "path": "/alert/alert-close-event", + "name": "关闭事件" + }, + { + "path": "/alert/feedback-of-result", + "name": "表单提交结果反馈" + }, + { + "path": "/alert/show-icon", + "name": "显示图标" + } + ] + }, + { + "path": "/badge", + "name": "Badge 标记", + "children": [ + { + "path": "/badge/badge-style", + "name": "主题样式" + }, + { + "path": "/badge/is-dot", + "name": "小圆点标记" + }, + { + "path": "/badge/max-num", + "name": "计数最大值" + }, + { + "path": "/badge/href-target", + "name": "跳转链接" + }, + { + "path": "/badge/custom-badge-target", + "name": "自定义标记目标" + }, + { + "path": "/badge/custom-tip-text", + "name": "自定义提示内容" + }, + { + "path": "/badge/hidden-badge-while-read-message", + "name": "消息已读动态隐藏标记" + } + ] + }, + { + "path": "/loading", + "name": "Loading 加载", + "children": [ + { + "path": "/loading/loading-tip-text", + "name": "自定义加载提示文本" + }, + { + "path": "/loading/custom-background", + "name": "自定义遮罩背景色" + }, + { + "path": "/loading/custom-class", + "name": "自定义样式" + }, + { + "path": "/loading/body-lock", + "name": "修饰符" + }, + { + "path": "/loading/fullscreen-loading", + "name": "全局加载" + }, + { + "path": "/loading/custom-spinner", + "name": "自定义加载图标" + }, + { + "path": "/loading/custom-loading-target", + "name": "区域加载" + } + ] + }, + { + "path": "/tooltip", + "name": "Tooltip 文字提示", + "children": [ + { + "path": "/tooltip/custom-transition", + "name": "自定义渐变动画" + }, + { + "path": "/tooltip/dynamic-disable", + "name": "禁用" + }, + { + "path": "/tooltip/manual-control-tip", + "name": "手动控制" + }, + { + "path": "/tooltip/tooltip-theme", + "name": "主题" + }, + { + "path": "/tooltip/tooltip-hide-delay", + "name": "自动隐藏和延迟时间" + }, + { + "path": "/tooltip/tooltip-offset", + "name": "偏移量" + }, + { + "path": "/tooltip/tooltip-enterable", + "name": "鼠标是否可进入" + }, + { + "path": "/tooltip/tooltip-visible-arrow", + "name": "是否显示箭头" + }, + { + "path": "/tooltip/tooltip-popper-class", + "name": "添加样式类名" + }, + { + "path": "/tooltip/tooltip-content", + "name": "插槽的使用" + }, + { + "path": "/tooltip/tooltip-popper-options", + "name": "popper配置" + }, + { + "path": "/tooltip/tabindex", + "name": "tabindex配置" + } + ] + }, + { + "path": "/popover", + "name": "Popover 弹出框", + "children": [ + { + "path": "/popover/popover-content", + "name": "添加内容" + }, + { + "path": "/popover/arrow-offset", + "name": "箭头偏移" + }, + { + "path": "/popover/frame-offset", + "name": "弹出框偏移" + }, + { + "path": "/popover/close-delay", + "name": "延迟隐藏" + }, + { + "path": "/popover/dynamic-disable", + "name": "禁用" + }, + { + "path": "/popover/open-delay", + "name": "延迟显示" + }, + { + "path": "/popover/popover-placement", + "name": "显示位置" + }, + { + "path": "/popover/popper-class", + "name": "自定义样式" + }, + { + "path": "/popover/custom-transition", + "name": "自定义渐变动画" + }, + { + "path": "/popover/trigger-mode", + "name": "触发方式" + }, + { + "path": "/popover/hidden-arrow", + "name": "隐藏提示框箭头" + }, + { + "path": "/popover/popover-width", + "name": "宽度" + }, + { + "path": "/popover/popper-options", + "name": "弹出框选项" + }, + { + "path": "/popover/trigger-reference", + "name": "触发源" + }, + { + "path": "/popover/custom-tip-text", + "name": "自定义提示文本" + }, + { + "path": "/popover/popover-events", + "name": "事件" + } + ] + }, + { + "path": "/modal", + "name": "Modal 模态框", + "children": [ + { + "path": "/modal/modal-fullscreen", + "name": "最大化显示" + }, + { + "path": "/modal/modal-esc-closable", + "name": "按 Esc 键关闭窗口" + }, + { + "path": "/modal/modal-duration", + "name": "自动关闭延时" + }, + { + "path": "/modal/modal-id", + "name": "防止重复提示" + }, + { + "path": "/modal/modal-lock-scroll", + "name": "锁住滚动条" + }, + { + "path": "/modal/modal-lock-view", + "name": "锁住页面" + }, + { + "path": "/modal/modal-mask", + "name": "显示遮罩层" + }, + { + "path": "/modal/modal-mask-closable", + "name": "点击遮罩层关闭窗口" + }, + { + "path": "/modal/modal-message", + "name": "自定义内容" + }, + { + "path": "/modal/is-form-reset", + "name": "弹出表单" + }, + { + "path": "/modal/modal-slots", + "name": "插槽" + }, + { + "path": "/modal/modal-resize", + "name": "调整窗口大小" + }, + { + "path": "/modal/modal-showFooter", + "name": "不显示底部" + }, + { + "path": "/modal/modal-showHeader", + "name": "不显示头部" + }, + { + "path": "/modal/modal-status", + "name": "消息状态" + }, + { + "path": "/modal/modal-title", + "name": "标题" + }, + { + "path": "/modal/modal-top", + "name": "距离顶部的位置" + }, + { + "path": "/modal/modal-type", + "name": "窗口类型" + }, + { + "path": "/modal/modal-value", + "name": "绑定值" + }, + { + "path": "/modal/modal-zIndex", + "name": "自定义堆叠顺序" + }, + { + "path": "/modal/modal-event", + "name": "事件" + }, + { + "path": "/modal/modal-slots", + "name": "插槽" + } + ] + }, + { + "path": "/notify", + "name": "Notify 通知", + "children": [] + } + ] + }, + { + "name": "其他组件", + "children": [ + { + "path": "/bulletin-board", + "name": "BulletinBoard 公告牌", + "children": [ + { + "path": "/bulletin-board/bulletin-board-title", + "name": "公告牌标题" + }, + { + "path": "/bulletin-board/default-active-tab", + "name": "默认激活的选项卡" + }, + { + "path": "/bulletin-board/custom-tab-title", + "name": "选项卡标题" + }, + { + "path": "/bulletin-board/base-on-url", + "name": "基于Url的跳转" + }, + { + "path": "/bulletin-board/base-on-route", + "name": "基于Route的跳转" + }, + { + "path": "/bulletin-board/show-more-link", + "name": "显示 “更多” 链接" + }, + { + "path": "/bulletin-board/custom-new-bulletin-icon", + "name": "自定义新公告前缀" + } + ] + }, + { + "path": "/calendar", + "name": "Calendar 日历", + "children": [ + { + "path": "/calendar/calendar-mode", + "name": "显示模式" + }, + { + "path": "/calendar/show-selected-date", + "name": "显示选中日期" + }, + { + "path": "/calendar/custom-day-cell", + "name": "自定义日期单元格" + }, + { + "path": "/calendar/custom-calendar-toolbar", + "name": "自定义工具栏" + }, + { + "path": "/calendar/dynamic-add-schedule", + "name": "添加日程事件" + } + ] + }, + { + "path": "/credit-card-form", + "name": "CreditCardForm 信用卡表单", + "children": [ + { + "path": "/credit-card-form/background-image", + "name": "背景图片" + }, + { + "path": "/credit-card-form/credit-card-form-events", + "name": "事件" + } + ] + }, + { + "path": "/crop", + "name": "Crop 图片裁剪", + "children": [ + { + "path": "/crop/aspect-ratio", + "name": "裁剪框宽高比" + }, + { + "path": "/crop/min-crop-box-width-height", + "name": "裁剪框最小宽高" + }, + { + "path": "/crop/no-background", + "name": "不显示网格背景" + }, + { + "path": "/crop/no-guides", + "name": "不显示虚线" + }, + { + "path": "/crop/no-modal", + "name": "不显示模态" + }, + { + "path": "/crop/view-mode", + "name": "视图模式" + }, + { + "path": "/crop/drag-mode", + "name": "拖拽模式" + }, + { + "path": "/crop/auto-crop-area", + "name": "自动裁剪面积" + }, + { + "path": "/crop/get-container-data", + "name": "获取容器数据" + }, + { + "path": "/crop/get-crop-box-data", + "name": "获取剪切框数据" + }, + { + "path": "/crop/get-cropped-canvas", + "name": "获取裁剪后的图片数据" + }, + { + "path": "/crop/get-data", + "name": "获取裁剪区域数据" + }, + { + "path": "/crop/get-image-data", + "name": "获取图像数据" + }, + { + "path": "/crop/replace-image", + "name": "替换图片" + }, + { + "path": "/crop/wheel-zoom-ratio", + "name": "鼠标滚轮缩放图像时比例" + }, + { + "path": "/crop/zoom-on-wheel", + "name": "禁用鼠标滚轮缩放图像" + }, + { + "path": "/crop/crop-events", + "name": "事件" + } + ] + }, + { + "path": "/detail-page", + "name": "DetailPage 表头详情栏", + "children": [ + { + "path": "/detail-page/custom-show-text", + "name": "自定义展示文本" + } + ] + }, + { + "path": "/image", + "name": "Image 图片预览", + "children": [ + { + "path": "/image/auto-fit-container-size", + "name": "自适应容器尺寸" + }, + { + "path": "/image/custom-placeholder", + "name": "占位内容" + }, + { + "path": "/image/lazy-load", + "name": "懒加载" + }, + { + "path": "/image/preview-src-list", + "name": "预览大图" + }, + { + "path": "/image/preview-z-index", + "name": "图片预览层级" + }, + { + "path": "/image/load-event", + "name": "加载事件" + }, + { + "path": "/image/custom-load-failed-text", + "name": "加载失败" + }, + { + "path": "/image/preview-in-dialog", + "name": "对话框中预览图片" + } + ] + }, + { + "path": "/rate", + "name": "Rate 评分", + "children": [ + { + "path": "/rate/custom-3-threshold-colors", + "name": "自定义 3 分段颜色" + }, + { + "path": "/rate/disabled-not-selected-style", + "name": "自定义禁用时未选中图标颜色及样式" + }, + { + "path": "/rate/custom-3-threshold-icon", + "name": "自定义 3 分段图标样式" + }, + { + "path": "/rate/texts-and-text-color", + "name": "辅助文字及颜色" + }, + { + "path": "/rate/size-and-space", + "name": "大小及占位宽度" + }, + { + "path": "/rate/not-selected-style", + "name": "自定义未选中图标颜色及样式" + }, + { + "path": "/rate/text-on-bottom", + "name": "图标下文字提示" + }, + { + "path": "/rate/allow-half", + "name": "半选" + }, + { + "path": "/rate/dynamic-disable", + "name": "禁用" + }, + { + "path": "/rate/show-score", + "name": "分数显示" + }, + { + "path": "/rate/radio-rate", + "name": "单选模式" + }, + { + "path": "/rate/max-score", + "name": "最大分值" + }, + { + "path": "/rate/threshold-value", + "name": "界限值" + }, + { + "path": "/rate/rate-events", + "name": "事件" + } + ] + }, + { + "path": "/scroll-text", + "name": "ScrollText 文字滚动", + "children": [ + { + "path": "/scroll-text/scroll-direction", + "name": "文本滚动方向" + }, + { + "path": "/scroll-text/hover-stop", + "name": "鼠标悬停时文本停止滚动" + }, + { + "path": "/scroll-text/custom-scroll-text", + "name": "自定义文本内容" + }, + { + "path": "/scroll-text/scroll-time", + "name": "滚动时间间隔" + }, + { + "path": "/scroll-text/custom-text-style", + "name": "自定义文本样式" + } + ] + }, + { + "path": "/slide-bar", + "name": "SlideBar 滚动块", + "children": [ + { + "path": "/slide-bar/wheel-blocks", + "name": "每次滚动块数" + }, + { + "path": "/slide-bar/custom-content", + "name": "自定义滚动块内容" + }, + { + "path": "/slide-bar/custom-tag", + "name": "自定义 DOM 标签" + }, + { + "path": "/slide-bar/slide-bar-events", + "name": "滚动块事件" + } + ] + }, + { + "path": "/tag", + "name": "Tag 标签", + "children": [ + { + "path": "/tag/color-border", + "name": "颜色和边框" + }, + { + "path": "/tag/tag-size", + "name": "尺寸" + }, + { + "path": "/tag/tag-effect", + "name": "主题" + }, + { + "path": "/tag/create-and-close", + "name": "增删" + }, + { + "path": "/tag/tag-events", + "name": "事件" + } + ] + }, + { + "path": "/textpopup", + "name": "TextPopup 输入框", + "children": [ + { + "path": "/textpopup/textpopup-placeholder", + "name": "提示占位文本" + }, + { + "path": "/textpopup/textpopup-readonly", + "name": "只读" + }, + { + "path": "/textpopup/textpopup-separtor", + "name": "分隔符" + }, + { + "path": "/textpopup/textpopup-value", + "name": "绑定值" + }, + { + "path": "/textpopup/textpopup-width", + "name": "宽度" + } + ] + }, + { + "path": "/user-contact", + "name": "UserContact 联系人", + "children": [ + { + "path": "/user-contact/data-source", + "name": "数据源" + }, + { + "path": "/user-contact/not-displayed-content", + "name": "定制弹框不显示的内容" + }, + { + "path": "/user-contact/slots-usercontact", + "name": "默认插槽" + } + ] + }, + { + "path": "/user-head", + "name": "UserHead 用户头像", + "children": [ + { + "path": "/user-head/min-user-head", + "name": "小头像" + }, + { + "path": "/user-head/round-user-head", + "name": "圆形头像" + }, + { + "path": "/user-head/label-user-head", + "name": "文字头像" + }, + { + "path": "/user-head/icon-user-head", + "name": "图标头像" + }, + { + "path": "/user-head/image-user-head", + "name": "图片头像" + }, + { + "path": "/user-head/message-count", + "name": "消息计数" + }, + { + "path": "/user-head/custom-color", + "name": "自定义颜色" + }, + { + "path": "/user-head/custom-background-color", + "name": "自定义背景颜色" + }, + { + "path": "/user-head/custom-user-head-content", + "name": "自定义图像内容" + }, + { + "path": "/user-head/render-user-head-in-grid", + "name": "Grid单元格展示头像" + } + ] + }, + { + "path": "/fullscreen", + "name": "Fullscreen 全屏显示", + "children": [] + } + ] + } + ] +} diff --git a/example/src/nav.config.comp.mobile.json b/example/src/nav.config.comp.mobile.json new file mode 100644 index 000000000..dc9aea2ea --- /dev/null +++ b/example/src/nav.config.comp.mobile.json @@ -0,0 +1,978 @@ +{ + "component": [ + { + "name": "导航组件", + "children": [ + { + "path": "/nav-bar", + "name": "NavBar 导航栏", + "children": [ + { + "path": "/nav-bar/left-right-arrow", + "name": "显示左右箭头" + }, + { + "path": "/nav-bar/left-right-text", + "name": "指定左右文本" + }, + { + "path": "/nav-bar/slots", + "name": "自定义左右侧内容" + }, + { + "path": "/nav-bar/z-index", + "name": "设置层级" + } + ] + }, + { + "path": "/tabbar", + "name": "Tabbar 标签栏", + "children": [ + { + "path": "/tabbar/onlytext", + "name": "纯文本" + }, + { + "path": "/tabbar/active-inactive-color", + "name": "自定义颜色" + }, + { + "path": "/tabbar/badge", + "name": "徽标提示" + }, + { + "path": "/tabbar/border", + "name": "无边框" + }, + { + "path": "/tabbar/event-change", + "name": "切换事件" + }, + { + "path": "/tabbar/route", + "name": "路由跳转" + }, + { + "path": "/tabbar/slot-icon", + "name": "自定义图标" + } + ] + }, + { + "path": "/mobileTabs", + "name": "Tabs 选项卡", + "children": [ + { + "path": "/tabs/with-add", + "name": "新增标签页" + }, + { + "path": "/tabs/active-color", + "name": "自定义当前标签页颜色" + }, + { + "path": "/tabs/swipe", + "name": "滑动内容切换标签页" + }, + { + "path": "/tabs/events", + "name": "事件" + }, + { + "path": "/tabs/before-leave", + "name": "切换标签页前的钩子" + }, + { + "path": "/tabs/three-level", + "name": "嵌套标签页" + } + ] + }, + { + "path": "/time-line", + "name": "TimeLine 时间轴", + "children": [ + { + "path": "/time-line/different-data", + "name": "数据映射" + }, + { + "path": "/time-line/slot", + "name": "插槽" + }, + { + "path": "/time-line/space", + "name": "设置高度" + } + ] + } + ] + }, + { + "name": "容器组件", + "children": [ + { + "path": "/dialog-box", + "name": "DialogBox 对话框", + "children": [ + { + "path": "/dialog-box/with-input", + "name": "输入类提示框" + }, + { + "path": "/dialog-box/close-on-click-modal", + "name": "单击遮罩层不关闭" + }, + { + "path": "/dialog-box/show-header", + "name": "不显示标题" + }, + { + "path": "/dialog-box/slot-title", + "name": "自定义标题" + }, + { + "path": "/dialog-box/slot-footer", + "name": "自定义底部" + }, + { + "path": "/dialog-box/events-open-close", + "name": "打开与关闭事件" + }, + { + "path": "/dialog-box/cancel-confirm", + "name": "取消与确认事件的回调" + }, + { + "path": "/dialog-box/lock-scroll", + "name": "弹出时禁用滚动" + } + ] + } + ] + }, + { + "name": "数据组件", + "children": [ + { + "path": "/progress", + "name": "Progress 进度条", + "children": [ + { + "path": "/progress/progress-type", + "name": "类型" + }, + { + "path": "/progress/progress-width", + "name": "宽度" + }, + { + "path": "/progress/progress-status", + "name": "状态" + }, + { + "path": "/progress/text-inside-or-no-text", + "name": "文字内显或不显" + }, + { + "path": "/progress/custom-color", + "name": "自定义颜色" + }, + { + "path": "/progress/format-text", + "name": "自定义显示文字" + }, + { + "path": "/progress/format", + "name": "自定义显示内容" + }, + { + "path": "/progress/dynamic-control-changes", + "name": "动态控制进度条变化" + }, + { + "path": "/progress/dynamic-progress", + "name": "动态进度条" + }, + { + "path": "/progress/width", + "name": "画布宽度" + } + ] + } + ] + }, + { + "name": "表单组件", + "children": [ + { + "path": "/button", + "name": "Button 按钮", + "children": [ + { + "path": "/button/icon", + "name": "图标按钮" + }, + { + "path": "/button/plain", + "name": "朴素按钮" + }, + { + "path": "/button/native-type", + "name": "按钮属性" + }, + { + "path": "/button/reset-time", + "name": "禁用时间" + }, + { + "path": "/button/round", + "name": "圆角按钮" + }, + { + "path": "/button/text", + "name": "文字按钮" + }, + { + "path": "/button/size", + "name": "不同尺寸" + }, + { + "path": "/button/loading", + "name": "加载中" + }, + { + "path": "/button/event-click", + "name": "单击事件" + } + ] + }, + { + "path": "/form", + "name": "Form 表单", + "children": [ + { + "path": "/form/only-read", + "name": "纯展示" + }, + { + "path": "/form/form-select", + "name": "选择展示" + }, + { + "path": "/form/form-writeone", + "name": "可填写(1)" + }, + { + "path": "/form/form-writetwo", + "name": "可填写(2)" + }, + { + "path": "/form/form-tabselect", + "name": "分段器" + }, + { + "path": "/form/validate-position", + "name": "校验显示位置" + }, + { + "path": "/form/hide-required-asterisk", + "name": "显示红色星号" + }, + { + "path": "/form/label-width", + "name": "标签宽度" + }, + { + "path": "/form/validate", + "name": "表单校验" + } + ] + }, + { + "path": "/checkbox", + "name": "Checkbox 复选框", + "children": [ + { + "path": "/checkbox/indeterminate", + "name": "全选与半选" + }, + { + "path": "/checkbox/label", + "name": "选中值设置" + }, + { + "path": "/checkbox/event-change", + "name": "事件" + }, + { + "path": "/checkbox/default", + "name": "插槽" + } + ] + }, + { + "path": "/Slider", + "name": "Slider 滑块", + "children": [ + { + "path": "/slider/vertical-mode", + "name": "竖向模式" + }, + { + "path": "/slider/max-min", + "name": "最大最小值" + }, + { + "path": "/slider/range-select", + "name": "范围选择" + }, + { + "path": "/slider/show-input", + "name": "输入框模式" + }, + { + "path": "/slider/shortcut-operation", + "name": "总步数" + }, + { + "path": "/slider/dynamic-disable", + "name": "禁用" + }, + { + "path": "/slider/show-tip", + "name": "提示" + }, + { + "path": "/slider/about-step", + "name": "步长" + }, + { + "path": "/slider/slider-events", + "name": "事件" + }, + { + "path": "/slider/slider-slot", + "name": "自定义插槽" + } + ] + }, + { + "path": "/checkbox-group", + "name": "CheckboxGroup 复选框组", + "children": [ + { + "path": "/checkbox-group/min-max", + "name": "可选数量" + }, + { + "path": "/checkbox-group/vertical", + "name": "垂直排列" + }, + { + "path": "/checkbox-group/disabled", + "name": "是否禁用" + }, + { + "path": "/checkbox-group/event-change", + "name": "事件" + } + ] + }, + { + "path": "/dropdown-menu", + "name": "DropdownMenu 筛选排序", + "children": [ + { + "path": "/dropdown-menu/screen-funnel", + "name": "筛选漏斗" + }, + { + "path": "/dropdown-menu/overlay", + "name": "无遮罩层" + }, + { + "path": "/dropdown-menu/activeColor", + "name": "标题和选项的选中态颜色" + }, + { + "path": "/dropdown-menu/duration", + "name": "动画时长" + }, + { + "path": "/dropdown-menu/direction", + "name": "菜单弹出位置" + }, + { + "path": "/dropdown-menu/type", + "name": "筛选类型" + }, + { + "path": "/dropdown-menu/icon", + "name": "自定义icon" + }, + { + "path": "/dropdown-menu/closeOnClickOverlay", + "name": "点击遮罩层关闭弹出菜单" + }, + { + "path": "/dropdown-menu/closeOnClickOutside", + "name": "点击外边元素关闭弹出菜单" + }, + { + "path": "/dropdown-menu/item-disabled", + "name": "是否禁用" + }, + { + "path": "/dropdown-menu/slot", + "name": "插槽" + }, + { + "path": "/dropdown-menu/event", + "name": "事件" + } + ] + }, + { + "path": "/image-viewer", + "name": "ImageViewer 图片预览", + "children": [ + { + "path": "/image-viewer/image-full-current", + "name": "全屏显示" + }, + { + "path": "/image-viewer/start-position", + "name": "初始起始位置" + }, + { + "path": "/image-viewer/slot-index", + "name": "自定义下标" + }, + { + "path": "/image-viewer/events-change-close", + "name": "切换与关闭事件" + } + ] + }, + { + "path": "/input", + "name": "Input 输入框", + "children": [ + { + "path": "/input/type-form", + "name": "type为form类型" + }, + { + "path": "/input/mobile-tips", + "name": "form类型的提示文字" + }, + { + "path": "/input/autosize", + "name": "自适应内容高度" + }, + { + "path": "/input/autofocus", + "name": "自动获取焦点" + }, + { + "path": "/input/blur-focus", + "name": "获取/失去焦点" + }, + { + "path": "/input/clearable", + "name": "可清空" + }, + { + "path": "/input/counter", + "name": "计数与输入统计" + }, + { + "path": "/input/max-min-length", + "name": "输入长度限制" + }, + { + "path": "/input/validate-event", + "name": "表单校正" + }, + { + "path": "/input/show-password", + "name": "密码框" + }, + { + "path": "/input/slots-append-prepend", + "name": "复合型输入框" + }, + { + "path": "/input/suffix-icon", + "name": "自定义后置图标" + }, + { + "path": "/input/events", + "name": "事件" + }, + { + "path": "/input/method-select", + "name": "选中输入框文本" + }, + { + "path": "/input/slot-content", + "name": "插槽" + }, + { + "path": "/input/props", + "name": "原生属性" + } + ] + }, + { + "path": "/list", + "name": "List 列表", + "children": [ + { + "path": "/list/slots", + "name": "自定义列表内容" + }, + { + "path": "/list/single-line", + "name": "单行" + }, + { + "path": "/list/double-list", + "name": "双行列表" + }, + { + "path": "/list/imformation-list", + "name": "资讯类列表" + } + ] + }, + { + "path": "/radio", + "name": "Radio 单选", + "children": [ + { + "path": "/radio/border", + "name": "显示边框" + }, + { + "path": "/radio/disabled", + "name": "是否禁用" + }, + { + "path": "/radio/event-change", + "name": "值改变事件" + } + ] + }, + { + "path": "/search", + "name": "Search 搜索", + "children": [ + { + "path": "/search/button-text", + "name": "自定义搜索按钮文本" + }, + { + "path": "/search/default-value", + "name": "默认搜索" + }, + { + "path": "/search/events", + "name": "事件" + } + ] + }, + { + "path": "/switch", + "name": "Switch 开关", + "children": [ + { + "path": "/switch/true-false-value", + "name": "自定义打开关闭的值" + }, + { + "path": "/switch/event-change", + "name": "值改变事件" + }, + { + "path": "/switch/disabled", + "name": "是否禁用" + }, + { + "path": "/switch/scenario", + "name": "应用场景" + } + ] + }, + { + "path": "/numeric", + "name": "Numeric 计数器", + "children": [ + { + "path": "/numeric/step", + "name": "步长" + }, + { + "path": "/numeric/max", + "name": "最大值最小值" + }, + { + "path": "/numeric/size", + "name": "尺寸" + }, + { + "path": "/numeric/controls", + "name": "控制按钮" + }, + { + "path": "/numeric/circulate", + "name": "是否循环" + }, + { + "path": "/numeric/controlsposition", + "name": "控制按钮显示位置" + }, + { + "path": "/numeric/precision", + "name": "数值精度" + }, + { + "path": "/numeric/event", + "name": "事件" + }, + { + "path": "/numeric/automaticprice", + "name": "根据商品数量自动计算价格" + } + ] + }, + { + "path": "/file-upload", + "name": "FileUpload 文件上传", + "children": [ + { + "path": "/file-upload/only-exist-mobile", + "name": "特殊属性" + }, + { + "path": "/file-upload/size", + "name": "设置组件大小" + }, + { + "path": "/file-upload/data", + "name": "参数" + }, + { + "path": "/file-upload/dynamic-disable", + "name": "是否禁用" + }, + { + "path": "/file-upload/accept-file-type", + "name": "可上传的文件类型" + }, + { + "path": "/file-upload/manual-upload", + "name": "手动上传" + }, + { + "path": "/file-upload/prevent-delete-file", + "name": "阻止删除文件" + }, + { + "path": "/file-upload/prevent-upload-file", + "name": "阻止上传文件" + }, + { + "path": "/file-upload/upload-request", + "name": "上传请求" + }, + { + "path": "/file-upload/mini-mode", + "name": "mini模式" + }, + { + "path": "/file-upload/upload-file-list", + "name": "上传的文件列表" + }, + { + "path": "/file-upload/custom-upload-request", + "name": "自定义上传请求" + }, + { + "path": "/file-upload/upload-limit", + "name": "最大上传限制" + }, + { + "path": "/file-upload/picture-card", + "name": "照片墙" + }, + { + "path": "/file-upload/file-picture-card", + "name": "文件缩略图" + }, + { + "path": "/file-upload/max-file-count", + "name": "最大上传文件数" + }, + { + "path": "/file-upload/multiple-file", + "name": "文件多选" + }, + { + "path": "/file-upload/custom-prefix", + "name": "钩子函数" + }, + { + "path": "/file-upload/upload-events", + "name": "事件" + }, + { + "path": "/file-upload/with-credentials", + "name": "支持发送 cookie 凭证信息" + }, + { + "path": "/file-upload/clear-files", + "name": "手动清空已上传文件列表" + }, + { + "path": "/file-upload/abort-quest", + "name": "手动取消上传请求" + }, + { + "path": "/file-upload/custom-upload-tip", + "name": "自定义上传提示" + }, + { + "path": "/file-upload/custom-trigger", + "name": "自定义触发文件选项框" + }, + { + "path": "/file-upload/upload-user-head", + "name": "用户头像上传" + }, + { + "path": "/file-upload/image-size", + "name": "获取上传图片的长宽尺寸" + } + ] + } + ] + }, + { + "name": "提示组件", + "children": [ + { + "path": "/pull-refresh", + "name": "PullRefresh 提示", + "children": [ + { + "path": "/pull-refresh/pulling-text", + "name": "下拉提示文字" + }, + { + "path": "/pull-refresh/loosing-text", + "name": "下拉可刷新的文字提示" + }, + { + "path": "/pull-refresh/success-text", + "name": "刷新成功的文字" + }, + { + "path": "/pull-refresh/success-duration", + "name": "刷新成功的文字展示时长" + }, + { + "path": "/pull-refresh/animation-duration", + "name": "弹回动画所用的时间" + }, + { + "path": "/pull-refresh/head-height", + "name": "下拉时头部的高度" + }, + { + "path": "/pull-refresh/disabled", + "name": "禁用下拉刷新" + }, + { + "path": "/pull-refresh/pull-refresh-slot", + "name": "插槽" + } + ] + }, + { + "path": "/alert", + "name": "Alert 提示", + "children": [ + { + "path": "/alert/custom-close", + "name": "自定义关闭" + }, + { + "path": "/alert/icon", + "name": "自定义提示图标" + }, + { + "path": "/alert/size", + "name": "不同尺寸" + }, + { + "path": "/alert/slot-default", + "name": "自定义提示内容" + } + ] + }, + { + "path": "/badge", + "name": "Badge 徽章", + "children": [ + { + "path": "/badge/is-dot", + "name": "小圆点标记" + }, + { + "path": "/badge/is-mini", + "name": "小尺寸" + }, + { + "path": "/badge/type", + "name": "不同主题" + }, + { + "path": "/badge/hidden", + "name": "隐藏徽标" + }, + { + "path": "/badge/href-target", + "name": "跳转链接" + }, + { + "path": "/badge/content", + "name": "自定义提示内容" + } + ] + } + ] + }, + { + "name": "其他组件", + "children": [ + { + "path": "/exception", + "name": "Exception 缺省页", + "children": [ + { + "path": "/exception/message", + "name": "文本内容" + }, + { + "path": "/exception/subMessage", + "name": "副文本内容" + }, + { + "path": "/exception/exceptionClass", + "name": "缺省页类名" + }, + { + "path": "/exception/buttonText", + "name": "按钮文本内容" + }, + { + "path": "/exception/type", + "name": "缺省页类型" + } + ] + }, + { + "path": "/mobile-avatar", + "name": "Avatar 头像", + "children": [ + { + "path": "/mobile-avatar/avatar-size", + "name": "设置头像大小" + }, + { + "path": "/mobile-avatar/avatar-src-set", + "name": "设置头像" + } + ] + }, + { + "path": "/mobile-icon", + "name": "Icon 图标", + "children": [ + { + "path": "/mobile-icon/icon-set", + "name": "设置图标大小" + } + ] + }, + { + "path": "/action-sheet", + "name": "ActionSheet 上滑列表", + "children": [ + { + "path": "/action-sheet/ellipsis", + "name": "内容超出显示省略号" + }, + { + "path": "/action-sheet/click-item", + "name": "点击列表事件" + }, + { + "path": "/action-sheet/slot", + "name": "插槽" + } + ] + }, + { + "path": "/mini-picker", + "name": " MiniPicker 选择器", + "children": [ + { + "path": "/mini-picker/multicolumn", + "name": "多列选择" + }, + { + "path": "/mini-picker/cascad", + "name": "级联选择" + }, + { + "path": "/mini-picker/defaultindex", + "name": "初始值索引" + }, + { + "path": "/mini-picker/cancel-button-text", + "name": "自定义按钮内容" + }, + { + "path": "/mini-picker/visibleitemcount", + "name": "可见选项个数" + }, + { + "path": "/mini-picker/itemheight", + "name": "选项高度" + }, + { + "path": "/mini-picker/methods", + "name": "方法" + }, + { + "path": "/mini-picker/cancel", + "name": "cancel事件" + }, + { + "path": "/mini-picker/change", + "name": "change事件" + }, + { + "path": "/mini-picker/toolbar", + "name": "插槽" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/example/src/route.config.comp.js b/example/src/route.config.comp.js new file mode 100644 index 000000000..4634b7aed --- /dev/null +++ b/example/src/route.config.comp.js @@ -0,0 +1,1994 @@ +import router1 from './route.config.comp1' +import router2 from './route.config.comp2' + +const routers = [ + { + path: 'credit-card-form', + meta: { title: '其他组件-CreditCardForm 信用卡表单', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-breadcrumb' */ './docs/zh-CN/credit-card-form/basic-usage.md') + }, + { + path: 'credit-card-form/background-image', + meta: { title: '其他组件-CreditCardForm 信用卡表单-背景图片', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-breadcrumb' */ './docs/zh-CN/credit-card-form/background-image.md') + }, + { + path: 'credit-card-form/credit-card-form-events', + meta: { title: '其他组件-CreditCardForm 信用卡表单-事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-breadcrumb' */ './docs/zh-CN/credit-card-form/credit-card-form-events.md') + }, + { + path: 'crop', + meta: { title: '其他组件-Crop 图片裁剪', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-crop' */ './docs/zh-CN/crop/basic-usage.md') + }, + { + path: 'crop/aspect-ratio', + meta: { title: '其他组件-Crop 图片裁剪-裁剪框宽高比', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-crop' */ './docs/zh-CN/crop/aspect-ratio.md') + }, + { + path: 'crop/min-crop-box-width-height', + meta: { title: '其他组件-Crop 图片裁剪-裁剪框最小宽高', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-crop' */ './docs/zh-CN/crop/min-crop-box-width-height.md') + }, + { + path: 'crop/no-background', + meta: { title: '其他组件-Crop 图片裁剪-不显示网格背景', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-crop' */ './docs/zh-CN/crop/no-background.md') + }, + { + path: 'crop/no-guides', + meta: { title: '其他组件-Crop 图片裁剪-不显示虚线', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-crop' */ './docs/zh-CN/crop/no-guides.md') + }, + { + path: 'crop/no-modal', + meta: { title: '其他组件-Crop 图片裁剪-不显示模态', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-crop' */ './docs/zh-CN/crop/no-modal.md') + }, + { + path: 'crop/view-mode', + meta: { title: '其他组件-Crop 图片裁剪-视图模式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-crop' */ './docs/zh-CN/crop/view-mode.md') + }, + { + path: 'crop/drag-mode', + meta: { title: '其他组件-Crop 图片裁剪-拖拽模式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-crop' */ './docs/zh-CN/crop/drag-mode.md') + }, + { + path: 'crop/auto-crop-area', + meta: { title: '其他组件-Crop 图片裁剪-自动裁剪面积', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-crop' */ './docs/zh-CN/crop/auto-crop-area.md') + }, + { + path: 'crop/get-container-data', + meta: { title: '其他组件-Crop 图片裁剪-获取容器数据', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-crop' */ './docs/zh-CN/crop/get-container-data.md') + }, + { + path: 'crop/get-crop-box-data', + meta: { title: '其他组件-Crop 图片裁剪-获取剪切框数据', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-crop' */ './docs/zh-CN/crop/get-crop-box-data.md') + }, + { + path: 'crop/get-cropped-canvas', + meta: { title: '其他组件-Crop 图片裁剪-获取裁剪后的图片数据', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-crop' */ './docs/zh-CN/crop/get-cropped-canvas.md') + }, + { + path: 'crop/get-data', + meta: { title: '其他组件-Crop 图片裁剪-获取裁剪区域数据', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-crop' */ './docs/zh-CN/crop/get-data.md') + }, + { + path: 'crop/get-image-data', + meta: { title: '其他组件-Crop 图片裁剪-获取图像数据', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-crop' */ './docs/zh-CN/crop/get-image-data.md') + }, + { + path: 'crop/replace-image', + meta: { title: '其他组件-Crop 图片裁剪-替换图片', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-crop' */ './docs/zh-CN/crop/replace-image.md') + }, + { + path: 'crop/wheel-zoom-ratio', + meta: { title: '其他组件-Crop 图片裁剪-鼠标滚轮缩放图像时比例', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-crop' */ './docs/zh-CN/crop/wheel-zoom-ratio.md') + }, + { + path: 'crop/zoom-on-wheel', + meta: { title: '其他组件-Crop 图片裁剪-禁用鼠标滚轮缩放图像', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-crop' */ './docs/zh-CN/crop/zoom-on-wheel.md') + }, + { + path: 'crop/crop-events', + meta: { title: '其他组件-Crop 图片裁剪-事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-crop' */ './docs/zh-CN/crop/crop-events.md') + }, + { + path: 'breadcrumb', + meta: { title: '导航组件-Breadcrumb 面包屑', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-breadcrumb' */ './docs/zh-CN/breadcrumb/normal-item.md') + }, + { + path: 'breadcrumb/custom-item', + meta: { title: '导航组件-Breadcrumb 面包屑-自定义节点', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-breadcrumb' */ './docs/zh-CN/breadcrumb/custom-item.md') + }, + { + path: 'breadcrumb/custom-separator', + meta: { title: '导航组件-Breadcrumb 面包屑-自定义分隔符', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-breadcrumb' */ './docs/zh-CN/breadcrumb/custom-separator.md') + }, + { + path: 'fall-menu', + meta: { title: '导航组件-FallMenu 瀑布菜单', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-fall-menu' */ './docs/zh-CN/fall-menu/basic-usage.md') + }, + { + path: 'fall-menu/data-resource', + meta: { title: '导航组件-FallMenu 瀑布菜单-数据源', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-fall-menu' */ './docs/zh-CN/fall-menu/data-resource.md') + }, + { + path: 'toggle-menu', + meta: { title: '导航组件-ToggleMenu 收缩菜单', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-toggle-menu' */ './docs/zh-CN/toggle-menu/basic-usage.md') + }, + { + path: 'toggle-menu/custom-icon', + meta: { title: '导航组件-ToggleMenu 收缩菜单', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-toggle-menu' */ './docs/zh-CN/toggle-menu/custom-icon.md') + }, + { + path: 'toggle-menu/get-menu-data-sync', + meta: { title: '导航组件-ToggleMenu 自定义服务', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-toggle-menu' */ './docs/zh-CN/toggle-menu/get-menu-data-sync.md') + }, + { + path: 'toggle-menu/toggle-props', + meta: { title: '导航组件-ToggleMenu 选项配置', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-toggle-menu' */ './docs/zh-CN/toggle-menu/toggle-props.md') + }, + { + path: 'toggle-menu/default-expand-all', + meta: { title: '导航组件-ToggleMenu 收缩菜单', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-toggle-menu' */ './docs/zh-CN/toggle-menu/default-expand-all.md') + }, + { + path: 'toggle-menu/dragable', + meta: { title: '导航组件-ToggleMenu 收缩菜单', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-toggle-menu' */ './docs/zh-CN/toggle-menu/dragable.md') + }, + { + path: 'toggle-menu/show-filter', + meta: { title: '导航组件-ToggleMenu 收缩菜单', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-toggle-menu' */ './docs/zh-CN/toggle-menu/show-filter.md') + }, + { + path: 'toggle-menu/events', + meta: { title: '导航组件-ToggleMenu 收缩菜单', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-toggle-menu' */ './docs/zh-CN/toggle-menu/events.md') + }, + { + path: 'link-menu', + meta: { title: '导航组件-LinkMenu 收藏夹菜单', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-link-menu' */ './docs/zh-CN/link-menu/basic-usage.md') + }, + { + path: 'link-menu/data-resource', + meta: { title: '导航组件-LinkMenu 收藏夹菜单-数据源', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-link-menu' */ './docs/zh-CN/link-menu/data-resource.md') + }, + { + path: 'link-menu/get-menu-data-sync', + meta: { title: '导航组件-LinkMen 自定义菜单数据服务', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-link-menu' */ './docs/zh-CN/link-menu/get-menu-data-sync.md') + }, + { + path: 'link-menu/menu-items', + meta: { title: '导航组件-LinkMenu 收藏夹菜单-可收藏栏目数', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-link-menu' */ './docs/zh-CN/link-menu/menu-items.md') + }, + { + path: 'link-menu/custom-icon', + meta: { title: '导航组件-LinkMenu 收藏夹菜单-自定义折叠展开图标', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-link-menu' */ './docs/zh-CN/link-menu/custom-icon.md') + }, + { + path: 'link-menu/custom-foot', + meta: { title: '导航组件-LinkMenu 收藏夹菜单-自定义菜单弹窗底部', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-link-menu' */ './docs/zh-CN/link-menu/custom-foot.md') + }, + { + path: 'nav-menu', + meta: { title: '导航组件-NavMenu 导航菜单', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-nav-menu' */ './docs/zh-CN/nav-menu/basic-usage.md') + }, + { + path: 'nav-menu/data-resource', + meta: { title: '导航组件-NavMenu 导航菜单-数据源', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-nav-menu' */ './docs/zh-CN/nav-menu/data-resource.md') + }, + { + path: 'nav-menu/overflow', + meta: { title: '导航组件-NavMenu 导航菜单-显示策略', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-nav-menu' */ './docs/zh-CN/nav-menu/overflow.md') + }, + { + path: 'nav-menu/slot-logo', + meta: { title: '导航组件-NavMenu 导航菜单-插槽', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-nav-menu' */ './docs/zh-CN/nav-menu/slot-logo.md') + }, + { + path: 'nav-menu/before-skip', + meta: { title: '导航组件-NavMenu 导航菜单-菜单跳转处理', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-nav-menu' */ './docs/zh-CN/nav-menu/before-skip.md') + }, + { + path: 'nav-menu/custom-service', + meta: { title: '导航组件-NavMenu 导航菜单-自定义服务', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-nav-menu' */ './docs/zh-CN/nav-menu/custom-service.md') + }, + { + path: 'fall-menu/custom-slider-icon', + meta: { title: '导航组件-FallMenu 瀑布菜单-自定义左右侧滑动图标', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-fall-menu' */ './docs/zh-CN/fall-menu/custom-slider-icon.md') + }, + { + path: 'fall-menu/custom-menuitem', + meta: { title: '导航组件-FallMenu 瀑布菜单-自定义菜单内容', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-fall-menu' */ './docs/zh-CN/fall-menu/custom-menuitem.md') + }, + { + path: 'floatbar', + meta: { title: '导航组件-Floatbar 浮动块', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-floatbar' */ './docs/zh-CN/floatbar/basic-usage.md') + }, + { + path: 'floatbar/custom-style', + meta: { title: '导航组件-Floatbar 浮动块-自定义样式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-floatbar' */ './docs/zh-CN/floatbar/custom-style.md') + }, + { + path: 'floatbar/custom-floatbar-item', + meta: { title: '导航组件-Floatbar 浮动块-自定义浮动块内容', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-floatbar' */ './docs/zh-CN/floatbar/custom-floatbar-item.md') + }, + { + path: 'steps', + meta: { title: '导航组件-Steps 步骤条', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-steps' */ './docs/zh-CN/steps/basic-usage.md') + }, + { + path: 'steps/data-resource', + meta: { title: '导航组件-Steps 步骤条-数据源', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-steps' */ './docs/zh-CN/steps/data-resource.md') + }, + { + path: 'steps/normal-steps', + meta: { title: '导航组件-Steps 步骤条-普通步骤条', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-steps' */ './docs/zh-CN/steps/normal-steps.md') + }, + { + path: 'steps/advanced-steps', + meta: { title: '导航组件-Steps 步骤条-高级向导', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-steps' */ './docs/zh-CN/steps/advanced-steps.md') + }, + { + path: 'steps/timeline-steps', + meta: { title: '导航组件-Steps 步骤条-时间线步骤条', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-steps' */ './docs/zh-CN/steps/timeline-steps.md') + }, + { + path: 'steps/custom-steps-item', + meta: { title: '导航组件-Steps 步骤条-自定义数据项', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-steps' */ './docs/zh-CN/steps/custom-steps-item.md') + }, + { + path: 'steps/order-progress', + meta: { title: '导航组件-Steps 步骤条-订单流程', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-steps' */ './docs/zh-CN/steps/order-progress.md') + }, + { + path: 'steps/steps-event', + meta: { title: '导航组件-Steps 步骤条-事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-steps' */ './docs/zh-CN/steps/steps-event.md') + }, + { + path: 'steps/steps-slot', + meta: { title: '导航组件-Steps 步骤条-插槽', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-steps' */ './docs/zh-CN/steps/steps-slot.md') + }, + { + path: 'tabs', + meta: { title: '导航组件-Tabs 标签页', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tabs' */ './docs/zh-CN/tabs/basic-usage.md') + }, + { + path: 'tabs/tab-style', + meta: { title: '导航组件-Tabs 标签页-风格类型', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tabs' */ './docs/zh-CN/tabs/tab-style.md') + }, + { + path: 'tabs/with-add', + meta: { title: '导航组件-Tabs 标签页-自定义增加标签页触发器', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tabs' */ './docs/zh-CN/tabs/with-add.md') + }, + { + path: 'tabs/with-close', + meta: { title: '导航组件-Tabs 标签页-标签页可关闭', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tabs' */ './docs/zh-CN/tabs/with-close.md') + }, + { + path: 'tabs/position', + meta: { title: '导航组件-Tabs 标签页-显示位置', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tabs' */ './docs/zh-CN/tabs/position.md') + }, + { + path: 'tabs/before-leave', + meta: { title: '导航组件-Tabs 标签页-切换标签页前的钩子', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tabs' */ './docs/zh-CN/tabs/before-leave.md') + }, + { + path: 'tabs/stretch-wh', + meta: { title: '导航组件-Tabs 标签页-标签页宽度自适应', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tabs' */ './docs/zh-CN/tabs/stretch-wh.md') + }, + { + path: 'tabs/tabs-events', + meta: { title: '导航组件-Tabs 标签页-事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tabs' */ './docs/zh-CN/tabs/tabs-events.md') + }, + { + path: 'tabs/custom-tab-title', + meta: { title: '导航组件-Tabs 标签页-自定义标签页标题', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tabs' */ './docs/zh-CN/tabs/custom-tab-title.md') + }, + { + path: 'tabs/show-different-grid-data', + meta: { title: '导航组件-Tabs 标签页-切换标签页查询不同 Grid 数据', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tabs' */ './docs/zh-CN/tabs/show-different-grid-data.md') + }, + { + path: 'time-line', + meta: { title: '导航组件-TimeLine 时间线-基本用法', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-line' */ './docs/zh-CN/time-line/basic-usage.md') + }, + { + path: 'time-line/custom-normal-step', + meta: { title: '导航组件-TimeLine 时间线-自定义横向时间线', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-line' */ './docs/zh-CN/time-line/custom-normal-step.md') + }, + { + path: 'time-line/event', + meta: { title: '导航组件-TimeLine 时间线-自定义横向时间线', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-line' */ './docs/zh-CN//time-line/event.md') + }, + { + path: 'time-line/custom-vertical-step', + meta: { title: '导航组件-TimeLine 时间线-自定义竖向时间线', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-line' */ './docs/zh-CN/time-line/custom-vertical-step.md') + }, + { + path: 'time-line/different-data', + meta: { title: '导航组件-TimeLine 时间线-数据映射', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-line' */ './docs/zh-CN/time-line/different-data.md') + }, + { + path: 'time-line/set-start-value', + meta: { title: '导航组件-TimeLine 时间线-设置序号起始值', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-line' */ './docs/zh-CN/time-line/set-start-value.md') + }, + { + path: 'time-line/set-step-width', + meta: { title: '导航组件-TimeLine 时间线-宽度设置', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-line' */ './docs/zh-CN/time-line/set-step-width.md') + }, + { + path: 'time-line/show-status', + meta: { title: '导航组件-TimeLine 时间线-组件内部状态', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-line' */ './docs/zh-CN/time-line/show-status.md') + }, + { + path: 'time-line/show-number', + meta: { title: '导航组件-TimeLine 时间线-未完成的序号显示', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-line' */ './docs/zh-CN/time-line/show-number.md') + }, + { + path: 'time-line/vertical-step', + meta: { title: '导航组件-TimeLine 时间线-竖向时间线', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-line' */ './docs/zh-CN/time-line/vertical-step.md') + }, + { + path: 'carousel', + meta: { title: '容器组件-Carousel 走马灯', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-carousel' */ './docs/zh-CN/carousel/basic-usage.md') + }, + { + path: 'carousel/indicator-trigger', + meta: { title: '容器组件-Carousel 走马灯-指示器和触发方式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-carousel' */ './docs/zh-CN/carousel/indicator-trigger.md') + }, + { + path: 'carousel/manual-play', + meta: { title: '容器组件-Carousel 走马灯-手动轮播', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-carousel' */ './docs/zh-CN/carousel/manual-play.md') + }, + { + path: 'carousel/close-loop', + meta: { title: '容器组件-Carousel 走马灯-关闭循环轮播', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-carousel' */ './docs/zh-CN/carousel/close-loop.md') + }, + { + path: 'carousel/autoplay', + meta: { title: '容器组件-Carousel 走马灯-自动切换', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-carousel' */ './docs/zh-CN/carousel/autoplay.md') + }, + { + path: 'carousel/play-interval', + meta: { title: '容器组件-Carousel 走马灯-轮播间隔时间', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-carousel' */ './docs/zh-CN/carousel/play-interval.md') + }, + { + path: 'carousel/up-down-carousel', + meta: { title: '容器组件-Carousel 走马灯-纵向轮播', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-carousel' */ './docs/zh-CN/carousel/up-down-carousel.md') + }, + { + path: 'carousel/show-title', + meta: { title: '容器组件-Carousel 走马灯-显示标题', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-carousel' */ './docs/zh-CN/carousel/show-title.md') + }, + { + path: 'carousel/carousel-arrow', + meta: { title: '容器组件-Carousel 走马灯-左右切换箭头', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-carousel' */ './docs/zh-CN/carousel/carousel-arrow.md') + }, + { + path: 'carousel/card-mode', + meta: { title: '容器组件-Carousel 走马灯-卡片化展示', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-carousel' */ './docs/zh-CN/carousel/card-mode.md') + }, + { + path: 'dialog-box', + meta: { title: '容器组件-DialogBox 对话框', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-dialog-box' */ './docs/zh-CN/dialog-box/basic-usage.md') + }, + { + path: 'dialog-box/secondary-dialog', + meta: { title: '容器组件-DialogBox 对话框-二级弹窗', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-dialog-box' */ './docs/zh-CN/dialog-box/secondary-dialog.md') + }, + { + path: 'dialog-box/custom-dialog-title', + meta: { title: '容器组件-DialogBox 对话框-自定义弹窗标题', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-dialog-box' */ './docs/zh-CN/dialog-box/custom-dialog-title.md') + }, + { + path: 'dialog-box/custom-dialog-content', + meta: { title: '容器组件-DialogBox 对话框-自定义弹窗内容', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-dialog-box' */ './docs/zh-CN/dialog-box/custom-dialog-content.md') + }, + { + path: 'dialog-box/custom-dialog-footer', + meta: { title: '容器组件-DialogBox 对话框-自定义弹窗底部', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-dialog-box' */ './docs/zh-CN/dialog-box/custom-dialog-footer.md') + }, + { + path: 'dialog-box/hidden-close-buttons', + meta: { title: '容器组件-DialogBox 对话框-隐藏关闭按钮', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-dialog-box' */ './docs/zh-CN/dialog-box/hidden-close-buttons.md') + }, + { + path: 'dialog-box/close-on-press-escape', + meta: { title: '容器组件-DialogBox 对话框-禁用 ESC 关闭', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-dialog-box' */ './docs/zh-CN/dialog-box/close-on-press-escape.md') + }, + { + path: 'dialog-box/dialog-top-height', + meta: { title: '容器组件-DialogBox 对话框-弹窗距离顶部的高度', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-dialog-box' */ './docs/zh-CN/dialog-box/dialog-top-height.md') + }, + { + path: 'dialog-box/dialog-width', + meta: { title: '容器组件-DialogBox 对话框-弹窗的宽度', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-dialog-box' */ './docs/zh-CN/dialog-box/dialog-width.md') + }, + { + path: 'dialog-box/close-on-click-modal', + meta: { title: '容器组件-DialogBox 对话框-点击遮罩层不关闭', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-dialog-box' */ './docs/zh-CN/dialog-box/close-on-click-modal.md') + }, + { + path: 'dialog-box/no-modal', + meta: { title: '容器组件-DialogBox 对话框-不启用遮罩层', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-dialog-box' */ './docs/zh-CN/dialog-box/no-modal.md') + }, + { + path: 'dialog-box/right-dialog', + meta: { title: '容器组件-DialogBox 对话框-右侧弹窗', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-dialog-box' */ './docs/zh-CN/dialog-box/right-dialog.md') + }, + { + path: 'dialog-box/hidden-header', + meta: { title: '容器组件-DialogBox 对话框-隐藏弹窗头部', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-dialog-box' */ './docs/zh-CN/dialog-box/hidden-header.md') + }, + { + path: 'dialog-box/lock-scroll', + meta: { title: '容器组件-DialogBox 对话框-弹出时禁用滚动', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-dialog-box' */ './docs/zh-CN/dialog-box/lock-scroll.md') + }, + { + path: 'dialog-box/center', + meta: { title: '容器组件-DialogBox 对话框-弹窗头部和底部内容居中', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-dialog-box' */ './docs/zh-CN/dialog-box/center.md') + }, + { + path: 'dialog-box/draggable', + meta: { title: '容器组件-DialogBox 对话框-可拖拽', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-dialog-box' */ './docs/zh-CN/dialog-box/draggable.md') + }, + { + path: 'dialog-box/fullscreen', + meta: { title: '容器组件-DialogBox 对话框-全屏弹窗', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-dialog-box' */ './docs/zh-CN/dialog-box/fullscreen.md') + }, + { + path: 'dialog-box/open-close-events', + meta: { title: '容器组件-DialogBox 对话框-弹出与关闭事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-dialog-box' */ './docs/zh-CN/dialog-box/open-close-events.md') + }, + { + path: 'dialog-box/form-in-dialog', + meta: { title: '容器组件-DialogBox 对话框-弹窗表单', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-dialog-box' */ './docs/zh-CN/dialog-box/form-in-dialog.md') + }, + { + path: 'split', + meta: { title: '容器组件-Split 面板分割', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-split' */ './docs/zh-CN/split/basic-usage.md') + }, + { + path: 'split/split-threshold', + meta: { title: '容器组件-Split 面板分割-面板阈值', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-split' */ './docs/zh-CN/split/split-threshold.md') + }, + { + path: 'split/split-mode', + meta: { title: '容器组件-Split 面板分割-分割方式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-split' */ './docs/zh-CN/split/split-mode.md') + }, + { + path: 'split/split-events', + meta: { title: '容器组件-Split 面板分割-事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-split' */ './docs/zh-CN/split/split-events.md') + }, + { + path: 'split/split-slot', + meta: { title: '容器组件-Split 面板分割-插槽', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-split' */ './docs/zh-CN/split/split-slot.md') + }, + { + path: 'split/nested-use', + meta: { title: '容器组件-Split 面板分割-嵌套使用', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-split' */ './docs/zh-CN/split/nested-use.md') + }, + { + path: 'autocomplete', + meta: { title: '表单组件-Autocomplete 自动完成', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-autocomplete' */ './docs/zh-CN/autocomplete/basic-usage.md') + }, + { + path: 'autocomplete/cust-template', + meta: { title: '表单组件-Autocomplete 自动完成-自定义模板', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-autocomplete' */ './docs/zh-CN/autocomplete/cust-template.md') + }, + { + path: 'autocomplete/append-prepend', + meta: { title: '表单组件-Autocomplete 输入框前/后置内容', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-autocomplete' */ './docs/zh-CN/autocomplete/append-prepend.md') + }, + { + path: 'autocomplete/disabled', + meta: { title: '表单组件-Autocomplete 禁用', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-autocomplete' */ './docs/zh-CN/autocomplete/disabled.md') + }, + { + path: 'autocomplete/size', + meta: { title: '设置输入框大小,可选值为:medium,small,mini', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-autocomplete' */ './docs/zh-CN/autocomplete/size.md') + }, + { + path: 'autocomplete/remote-search', + meta: { title: '表单组件-Autocomplete 自动完成-远程搜索', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-autocomplete' */ './docs/zh-CN/autocomplete/remote-search.md') + }, + { + path: 'autocomplete/select-event', + meta: { title: '表单组件-Autocomplete 自动完成-事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-autocomplete' */ './docs/zh-CN/autocomplete/select-event.md') + }, + { + path: 'autocomplete/clearable', + meta: { title: '表单组件-Autocomplete 自动完成-可清除', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-autocomplete' */ './docs/zh-CN/autocomplete/clearable.md') + }, + { + path: 'autocomplete/custom-icon', + meta: { title: '表单组件-Autocomplete 自动完成-自定义图标', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-autocomplete' */ './docs/zh-CN/autocomplete/custom-icon.md') + }, + { + path: 'autocomplete/debounce', + meta: { title: '表单组件-Autocomplete 自动完成-去抖延时', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-autocomplete' */ './docs/zh-CN/autocomplete/debounce.md') + }, + { + path: 'autocomplete/hide-loading', + meta: { title: '表单组件-Autocomplete 自动完成-隐藏加载图标', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-autocomplete' */ './docs/zh-CN/autocomplete/hide-loading.md') + }, + { + path: 'autocomplete/value-key', + meta: { title: '表单组件-Autocomplete 自动完成-指定显示的键名', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-autocomplete' */ './docs/zh-CN/autocomplete/value-key.md') + }, + { + path: 'autocomplete/popper-class', + meta: { title: '表单组件-Autocomplete 自动完成-自定义列表样式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-autocomplete' */ './docs/zh-CN/autocomplete/popper-class.md') + }, + { + path: 'autocomplete/placement', + meta: { title: '表单组件-Autocomplete 自动完成-设置菜单弹出位置', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-autocomplete' */ './docs/zh-CN/autocomplete/placement.md') + }, + { + path: 'autocomplete/highlight-first-item', + meta: { title: '表单组件-Autocomplete 自动完成-高亮显示第一项', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-autocomplete' */ './docs/zh-CN/autocomplete/highlight-first-item.md') + }, + { + path: 'autocomplete/no-trigger-on-focus', + meta: { title: '表单组件-Autocomplete 自动完成-聚焦不显示建议列表', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-autocomplete' */ './docs/zh-CN/autocomplete/no-trigger-on-focus.md') + }, + { + path: 'button', + meta: { title: '表单组件-Button 按钮', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-button' */ './docs/zh-CN/button/basic-usage.md') + }, + { + path: 'button/text-button', + meta: { title: '表单组件-Button 按钮-文字按钮', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-button' */ './docs/zh-CN/button/text-button.md') + }, + { + path: 'button/round', + meta: { title: '表单组件-Button 按钮-是否圆角', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-button' */ './docs/zh-CN/button/round.md') + }, + { + path: 'button/autofocus', + meta: { title: '表单组件-Button 是否默认聚焦', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-button' */ './docs/zh-CN/button/autofocus.md') + }, + { + path: 'button/icon-button', + meta: { title: '表单组件-Button 按钮-图标按钮', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-button' */ './docs/zh-CN/button/icon-button.md') + }, + { + path: 'button/img-button', + meta: { title: '表单组件-Button 按钮-图片按钮', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-button' */ './docs/zh-CN/button/img-button.md') + }, + { + path: 'button/button-style', + meta: { title: '表单组件-Button 按钮-主题样式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-button' */ './docs/zh-CN/button/button-style.md') + }, + { + path: 'button/show-loading', + meta: { title: '表单组件-Button 按钮-显示加载中', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-button' */ './docs/zh-CN/button/show-loading.md') + }, + { + path: 'button/button-size', + meta: { title: '表单组件-Button 按钮-尺寸', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-button' */ './docs/zh-CN/button/button-size.md') + }, + { + path: 'button/circle-button', + meta: { title: '表单组件-Button 按钮-圆形按钮', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-button' */ './docs/zh-CN/button/circle-button.md') + }, + { + path: 'button/plain-button', + meta: { title: '表单组件-Button 按钮-朴素按钮', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-button' */ './docs/zh-CN/button/plain-button.md') + }, + { + path: 'button/reset-time', + meta: { title: '表单组件-Button 按钮-防止表单重复提交', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-button' */ './docs/zh-CN/button/reset-time.md') + }, + { + path: 'button/default-focus', + meta: { title: '表单组件-Button 按钮-默认聚焦', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-button' */ './docs/zh-CN/button/default-focus.md') + }, + { + path: 'button/button-events', + meta: { title: '表单组件-Button 按钮-事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-button' */ './docs/zh-CN/button/button-events.md') + }, + { + path: 'button/dynamic-disable-button', + meta: { title: '表单组件-Button 按钮-动态禁用按钮', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-button' */ './docs/zh-CN/button/dynamic-disable-button.md') + }, + { + path: 'date-picker', + meta: { title: '表单组件-DatePicker 日期选择器', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-date-picker' */ './docs/zh-CN/date-picker/basic-usage.md') + }, + { + path: 'date-picker/time-zone', + meta: { title: '表单组件-DatePicker 日期选择器-选择日带快捷选项', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-date-picker' */ './docs/zh-CN/date-picker/time-zone.md') + }, + { + path: 'date-picker/date-shortcuts', + meta: { title: '表单组件-DatePicker 日期选择器-选择日带快捷选项', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-date-picker' */ './docs/zh-CN/date-picker/date-shortcuts.md') + }, + { + path: 'date-picker/focus', + meta: { title: '表单组件-DatePicker 获取焦点', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-date-picker' */ './docs/zh-CN/date-picker/focus.md') + }, + { + path: 'date-picker/utc8', + meta: { title: '表单组件-DatePicker 显示东八区时间', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-date-picker' */ './docs/zh-CN/date-picker/utc8.md') + }, + { + path: 'date-picker/other-picker-type', + meta: { title: '表单组件-DatePicker 日期选择器-其他日期单位', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-date-picker' */ './docs/zh-CN/date-picker/other-picker-type.md') + }, + { + path: 'date-picker/date-range', + meta: { title: '表单组件-DatePicker 日期选择器-选择日期范围', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-date-picker' */ './docs/zh-CN/date-picker/date-range.md') + }, + { + path: 'date-picker/date-range-shortcuts', + meta: { title: '表单组件-DatePicker 日期选择器-日期范围快捷选项', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-date-picker' */ './docs/zh-CN/date-picker/date-range-shortcuts.md') + }, + { + path: 'date-picker/default-time-of-range', + meta: { title: '表单组件-DatePicker 日期选择器-日期范围默认时刻', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-date-picker' */ './docs/zh-CN/date-picker/default-time-of-range.md') + }, + { + path: 'date-picker/month-range', + meta: { title: '表单组件-DatePicker 日期选择器-选择月份范围', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-date-picker' */ './docs/zh-CN/date-picker/month-range.md') + }, + { + path: 'date-picker/month-range-shortcuts', + meta: { title: '表单组件-DatePicker 日期选择器-月份范围快捷选项', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-date-picker' */ './docs/zh-CN/date-picker/month-range-shortcuts.md') + }, + { + path: 'date-picker/max-min', + meta: { title: '表单组件-DatePicker 日期选择器-最大最小值', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-date-picker' */ './docs/zh-CN/date-picker/max-min.md') + }, + { + path: 'date-picker/align', + meta: { title: '表单组件-DatePicker 日期选择器-对齐方式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-date-picker' */ './docs/zh-CN/date-picker/align.md') + }, + { + path: 'date-picker/set-size', + meta: { title: '表单组件-DatePicker 日期选择器-尺寸设置', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-date-picker' */ './docs/zh-CN/date-picker/set-size.md') + }, + { + path: 'date-picker/about-clear', + meta: { title: '表单组件-DatePicker 日期选择器-清除输入', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-date-picker' */ './docs/zh-CN/date-picker/about-clear.md') + }, + { + path: 'date-picker/about-format', + meta: { title: '表单组件-DatePicker 日期选择器-格式化相关', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-date-picker' */ './docs/zh-CN/date-picker/about-format.md') + }, + { + path: 'date-picker/time-format', + meta: { title: '表单组件-DatePicker 日期选择器-timeFormat格式化', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-date-picker' */ './docs/zh-CN/date-picker/time-format.md') + }, + { + path: 'date-picker/custom-suffix-icon', + meta: { title: '表单组件-DatePicker 日期选择器-自定义后置图标', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-date-picker' */ './docs/zh-CN/date-picker/custom-suffix-icon.md') + }, + { + path: 'date-picker/custom-range', + meta: { title: '表单组件-DatePicker 日期选择器-范围选择自定义相关', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-date-picker' */ './docs/zh-CN/date-picker/custom-range.md') + }, + { + path: 'date-picker/unlink-panels', + meta: { title: '表单组件-DatePicker 日期选择器-范围选择取消面板联动', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-date-picker' */ './docs/zh-CN/date-picker/unlink-panels.md') + }, + { + path: 'date-picker/default-value', + meta: { title: '表单组件-DatePicker 日期选择器-选择器打开时默认时间设置', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-date-picker' */ './docs/zh-CN/date-picker/default-value.md') + }, + { + path: 'date-picker/editable', + meta: { title: '表单组件-DatePicker 日期选择器-文本框不可输入', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-date-picker' */ './docs/zh-CN/date-picker/editable.md') + }, + { + path: 'date-picker/date-picker-events', + meta: { title: '表单组件-DatePicker 日期选择器-事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-date-picker' */ './docs/zh-CN/date-picker/date-picker-events.md') + }, + { + path: 'date-picker/time-arrow-control', + meta: { title: '表单组件-DatePicker 日期选择器-箭头按钮控制时间选择', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-date-picker' */ './docs/zh-CN/date-picker/time-arrow-control.md') + }, + { + path: 'date-picker/validate-event', + meta: { title: '表单组件-DatePicker 日期选择器-不触发表单校验', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-date-picker' */ './docs/zh-CN/date-picker/validate-event.md') + }, + { + path: 'time-picker', + meta: { title: '表单组件-TimePicker 时间选择器', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-picker' */ './docs/zh-CN/time-picker/basic-usage.md') + }, + { + path: 'time-picker/selectable-range', + meta: { title: '表单组件-TimePicker 时间选择器-选择范围', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-picker' */ './docs/zh-CN/time-picker/basic-usage.md') + }, + { + path: 'time-picker/arrow-control', + meta: { title: '表单组件-TimePicker 时间选择器-选择范围', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-picker' */ './docs/zh-CN/time-picker/arrow-control.md') + }, + { + path: 'time-picker/default-time-of-range', + meta: { title: '表单组件-TimePicker 时间选择器-时间范围默认时刻', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-picker' */ './docs/zh-CN/time-picker/default-time-of-range.md') + }, + { + path: 'time-picker/picker-options', + meta: { title: '表单组件-TimePicker 时间选择器-选择范围', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-picker' */ './docs/zh-CN/time-picker/picker-options.md') + }, + { + path: 'time-picker/format', + meta: { title: '表单组件-TimePicker 时间选择器-时间格式化', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-picker' */ './docs/zh-CN/time-picker/format.md') + }, + { + path: 'time-picker/clear-icon', + meta: { title: '表单组件-TimePicker 时间选择器-清除图标', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-picker' */ './docs/zh-CN/time-picker/clear-icon.md') + }, + { + path: 'time-picker/is-range', + meta: { title: '表单组件-TimePicker 时间选择器-时间范围选择', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-picker' */ './docs/zh-CN/time-picker/is-range.md') + }, + { + path: 'time-picker/suffix-icon', + meta: { title: '表单组件-TimePicker 时间选择器-自定义后置图标', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-picker' */ './docs/zh-CN/time-picker/suffix-icon.md') + }, + { + path: 'time-picker/default-value', + meta: { title: '表单组件-TimePicker 时间选择器-选择器打开时默认时间设置', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-picker' */ './docs/zh-CN/time-picker/default-value.md') + }, + { + path: 'time-picker/editable', + meta: { title: '表单组件-TimePicker 时间选择器-文本框不可输入', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-picker' */ './docs/zh-CN/time-picker/editable.md') + }, + { + path: 'time-picker/disabled', + meta: { title: '表单组件-TimePicker 时间选择器-禁用', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-picker' */ './docs/zh-CN/time-picker/disabled.md') + }, + { + path: 'time-picker/time-low', + meta: { title: '表单组件-TimePicker 时间选择器-显示格式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-picker' */ './docs/zh-CN/time-picker/time-low.md') + }, + { + path: 'time-picker/date', + meta: { title: '表单组件-TimePicker 时间选择器-显示格式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-picker' */ './docs/zh-CN/time-picker/date.md') + }, + { + path: 'time-picker/set-size', + meta: { title: '表单组件-TimePicker 时间选择器-尺寸设置', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-picker' */ './docs/zh-CN/time-picker/set-size.md') + }, + { + path: 'time-picker/time-picker-events', + meta: { title: '表单组件-TimePicker 时间选择器-事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-picker' */ './docs/zh-CN/time-picker/time-picker-events.md') + }, + { + path: 'drop-times', + meta: { title: '表单组件-DropTimes 下拉时间', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-drop-times' */ './docs/zh-CN/drop-times/basic-usage.md') + }, + { + path: 'drop-times/start-end-step', + meta: { title: '表单组件-DropTimes 下拉时间-步长与时间区间', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-drop-times' */ './docs/zh-CN/drop-times/start-end-step.md') + }, + { + path: 'drop-times/size', + meta: { title: '设置组件大小,可设置为:medium,small,mini', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-drop-times' */ './docs/zh-CN/drop-times/size.md') + }, + { + path: 'input', + meta: { title: '表单组件-Input 输入框', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-input' */ './docs/zh-CN/input/basic-usage.md') + }, + { + path: 'input/disabled-readonly', + meta: { title: '表单组件-Input 输入框-禁用和只读', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-input' */ './docs/zh-CN/input/disabled-readonly.md') + }, + { + path: 'input/clearable', + meta: { title: '表单组件-Input 输入框-可清空', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-input' */ './docs/zh-CN/input/clearable.md') + }, + { + path: 'input/show-password', + meta: { title: '表单组件-Input 输入框-密码框', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-input' */ './docs/zh-CN/input/show-password.md') + }, + { + path: 'input/input-size', + meta: { title: '表单组件-Input 输入框-尺寸', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-input' */ './docs/zh-CN/input/input-size.md') + }, + { + path: 'input/custom-prefix-suffix-icon', + meta: { title: '表单组件-Input 输入框-自定义输入框前后图标', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-input' */ './docs/zh-CN/input/custom-prefix-suffix-icon.md') + }, + { + path: 'input/resize-textarea', + meta: { title: '表单组件-Input 输入框-可缩放文本域', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-input' */ './docs/zh-CN/input/resize-textarea.md') + }, + { + path: 'input/textarea-limit-rows', + meta: { title: '表单组件-Input 输入框-文本域限制输入行数', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-input' */ './docs/zh-CN/input/textarea-limit-rows.md') + }, + { + path: 'input/autosize-textarea', + meta: { title: '表单组件-Input 输入框-可自适应文本高度的文本域', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-input' */ './docs/zh-CN/input/autosize-textarea.md') + }, + { + path: 'input/complicated-input', + meta: { title: '表单组件-Input 输入框-复合型输入框', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-input' */ './docs/zh-CN/input/complicated-input.md') + }, + { + path: 'input/max-min', + meta: { title: '表单组件-Input 输入框-最大最小值', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-input' */ './docs/zh-CN/input/max-min.md') + }, + { + path: 'input/max-min-length', + meta: { title: '表单组件-Input 输入框-输入长度限制', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-input' */ './docs/zh-CN/input/max-min-length.md') + }, + { + path: 'input/counter', + meta: { title: '表单组件-Input 输入框-输入计数器', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-input' */ './docs/zh-CN/input/counter.md') + }, + { + path: 'input/step', + meta: { title: '表单组件-Input 输入框-输入字段的合法数字间隔', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-input' */ './docs/zh-CN/input/step.md') + }, + { + path: 'input/validate-event', + meta: { title: '表单组件-Input 输入框-输入时触发表单校验', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-input' */ './docs/zh-CN/input/validate-event.md') + }, + { + path: 'input/autofocus', + meta: { title: '表单组件-Input 输入框-自动获取焦点', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-input' */ './docs/zh-CN/input/autofocus.md') + }, + { + path: 'input/input-events', + meta: { title: '表单组件-Input 输入框-事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-input' */ './docs/zh-CN/input/input-events.md') + }, + { + path: 'input/input-methods', + meta: { title: '表单组件-Input 输入框-方法', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-input' */ './docs/zh-CN/input/input-methods.md') + }, + { + path: 'ip-address', + meta: { title: '表单组件-IpAddress 输入框', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-ip-address' */ './docs/zh-CN/ip-address/basic-usage.md') + }, + { + path: 'ip-address/type', + meta: { title: '表单组件-IpAddress 输入框-IPv4 类型', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-ip-address' */ './docs/zh-CN/ip-address/type.md') + }, + { + path: 'ip-address/readonly', + meta: { title: '表单组件-IpAddress 文本只读', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-ip-address' */ './docs/zh-CN/ip-address/readonly.md') + }, + { + path: 'ip-address/size', + meta: { title: '设置组件大小,可以设置为:medium,small,mini', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-ip-address' */ './docs/zh-CN/ip-address/size.md') + }, + { + path: 'ip-address/custom-delimiter', + meta: { title: '表单组件-IpAddress 输入框-自定义分隔符', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-ip-address' */ './docs/zh-CN/ip-address/custom-delimiter.md') + }, + { + path: 'ip-address/ipaddress-events', + meta: { title: '表单组件-IpAddress 输入框-事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-ip-address' */ './docs/zh-CN/ip-address/ipaddress-events.md') + }, + { + path: 'numeric', + meta: { title: '表单组件-Numeric 计数器', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-numeric' */ './docs/zh-CN/numeric/basic-usage.md') + }, + { + path: 'numeric/allow-empty', + meta: { title: '表单组件-Numeric 计数器-可清空输入', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-numeric' */ './docs/zh-CN/numeric/allow-empty.md') + }, + { + path: 'numeric/about-step', + meta: { title: '表单组件-Numeric 计数器-步长', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-numeric' */ './docs/zh-CN/numeric/about-step.md') + }, + { + path: 'numeric/max-min', + meta: { title: '表单组件-Numeric 计数器-最大最小值', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-numeric' */ './docs/zh-CN/numeric/max-min.md') + }, + { + path: 'numeric/dynamic-disabled', + meta: { title: '表单组件-Numeric 计数器-禁用', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-numeric' */ './docs/zh-CN/numeric/dynamic-disabled.md') + }, + { + path: 'numeric/numeric-size', + meta: { title: '表单组件-Numeric 计数器-尺寸', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-numeric' */ './docs/zh-CN/numeric/numeric-size.md') + }, + { + path: 'numeric/controls', + meta: { title: '表单组件-Numeric 计数器-控制按钮', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-numeric' */ './docs/zh-CN/numeric/controls.md') + }, + { + path: 'numeric/precision', + meta: { title: '表单组件-Numeric 计数器-数值精度', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-numeric' */ './docs/zh-CN/numeric/precision.md') + }, + { + path: 'numeric/mouse-wheel', + meta: { title: '表单组件-Numeric 计数器-鼠标滚轮滚动改变值', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-numeric' */ './docs/zh-CN/numeric/mouse-wheel.md') + }, + { + path: 'numeric/numeric-events', + meta: { title: '表单组件-Numeric 计数器-事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-numeric' */ './docs/zh-CN/numeric/numeric-events.md') + }, + { + path: 'numeric/calculate-according-to-num-of-goods', + meta: { title: '表单组件-Numeric 计数器-根据商品数量自动计算价格', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-numeric' */ './docs/zh-CN/numeric/calculate-according-to-num-of-goods.md') + }, + { + path: 'pop-editor', + meta: { title: '表单组件-PopEditor 弹出编辑', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-editor' */ './docs/zh-CN/pop-editor/basic-usage.md') + }, + { + path: 'pop-editor/size', + meta: { title: '设置组件大小,可以设置为:medium,small,mini', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-editor' */ './docs/zh-CN/pop-editor/size.md') + }, + { + path: 'pop-editor/show-overflow', + meta: { title: '设置数据类容过长时对数据超出部分隐藏', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-editor' */ './docs/zh-CN/pop-editor/show-overflow.md') + }, + { + path: 'pop-editor/trigger', + meta: { title: 'trigger配置', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-editor' */ './docs/zh-CN/pop-editor/trigger.md') + }, + { + path: 'pop-editor/slot', + meta: { title: 'slot配置', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-editor' */ './docs/zh-CN/pop-editor/slot.md') + }, + { + path: 'pop-editor/custom-conditions', + meta: { title: '表单组件-PopEditor 弹出编辑-自定义查询条件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-editor' */ './docs/zh-CN/pop-editor/custom-conditions.md') + }, + { + path: 'pop-editor/before-reset', + meta: { title: '重置前的钩子函数', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-editor' */ './docs/zh-CN/pop-editor/before-reset.md') + }, + { + path: 'pop-editor/draggable', + meta: { title: '表单组件-PopEditor 弹出编辑-窗口拖动', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-editor' */ './docs/zh-CN/pop-editor/draggable.md') + }, + { + path: 'pop-editor/show-clear-btn', + meta: { title: '表单组件-PopEditor 弹出编辑-可清除', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-editor' */ './docs/zh-CN/pop-editor/show-clear-btn.md') + }, + { + path: 'pop-editor/resize', + meta: { title: '表单组件-PopEditor 弹出编辑-可清除', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-editor' */ './docs/zh-CN/pop-editor/resize.md') + }, + { + path: 'pop-editor/table-edit', + meta: { title: '表单组件-PopEditor 弹出编辑-表格编辑', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-editor' */ './docs/zh-CN/pop-editor/table-edit.md') + }, + { + path: 'pop-editor/width-height', + meta: { title: '表单组件-PopEditor 弹出编辑-宽高', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-editor' */ './docs/zh-CN/pop-editor/width-height.md') + }, + { + path: 'pop-editor/custom-icon', + meta: { title: '表单组件-PopEditor 弹出编辑-自定义图标', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-editor' */ './docs/zh-CN/pop-editor/custom-icon.md') + }, + { + path: 'pop-editor/multi-selected', + meta: { title: '表单组件-PopEditor 弹出编辑-多选', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-editor' */ './docs/zh-CN/pop-editor/multi-selected.md') + }, + { + path: 'pop-editor/remote-search', + meta: { title: '表单组件-PopEditor 弹出编辑-远程搜索', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-editor' */ './docs/zh-CN/pop-editor/remote-search.md') + }, + { + path: 'pop-editor/render-text', + meta: { title: '表单组件-PopEditor 渲染反查', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-editor' */ './docs/zh-CN/pop-editor/render-text.md') + }, + { + path: 'pop-editor/clearable', + meta: { title: '表单组件-PopEditor 支持在搜索表单配置清除按钮', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-editor' */ './docs/zh-CN/pop-editor/clearable.md') + }, + { + path: 'pop-editor/popeditor-events', + meta: { title: '表单组件-PopEditor 弹出编辑-事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-editor' */ './docs/zh-CN/pop-editor/popeditor-events.md') + }, + { + path: 'pop-editor/dynamic-readonly', + meta: { title: '表单组件-PopEditor 弹出编辑-只读', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-editor' */ './docs/zh-CN/pop-editor/dynamic-readonly.md') + }, + { + path: 'pop-editor/dynamic-disabled', + meta: { title: '表单组件-PopEditor 弹出编辑-禁用', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-editor' */ './docs/zh-CN/pop-editor/dynamic-disabled.md') + }, + { + path: 'pop-editor/text-field', + meta: { title: '表单组件-PopEditor 弹出编辑-显示字段映射', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-editor' */ './docs/zh-CN/pop-editor/text-field.md') + }, + { + path: 'pop-editor/value-field', + meta: { title: '表单组件-PopEditor 弹出编辑-提交字段映射', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-editor' */ './docs/zh-CN/pop-editor/value-field.md') + }, + { + path: 'pop-editor/custom-title', + meta: { title: '表单组件-PopEditor 弹出编辑-自定义标题', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-editor' */ './docs/zh-CN/pop-editor/custom-title.md') + }, + { + path: 'pop-editor/pager', + meta: { title: '表单组件-PopEditor 弹出编辑-分页', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-editor' */ './docs/zh-CN/pop-editor/pager.md') + }, + { + path: 'pop-editor/tree-edit', + meta: { title: '表单组件-PopEditor 弹出编辑-分页', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-editor' */ './docs/zh-CN/pop-editor/tree-edit.md') + }, + { + path: 'pop-editor/single-select-radio', + meta: { title: '表单组件-PopEditor 弹出编辑-树模式单选', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-editor' */ './docs/zh-CN/pop-editor/single-select-radio.md') + }, + { + path: 'pop-editor/show-history', + meta: { title: '表单组件-PopEditor 弹出编辑-设置历史记录标签页', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-editor' */ './docs/zh-CN/pop-editor/show-history.md') + }, + { + path: 'pop-upload', + meta: { title: '表单组件-PopUpload 弹出框上传', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-upload' */ './docs/zh-CN/pop-upload/basic-usage.md') + }, + { + path: 'pop-upload/custom-request-headers', + meta: { title: '表单组件-PopUpload 弹出框上传-自定义请求头', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-upload' */ './docs/zh-CN/pop-upload/custom-request-headers.md') + }, + { + path: 'pop-upload/fill-button-text', + meta: { title: '设置组件大小,可设置为:medium,small,mini', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-upload' */ './docs/zh-CN/pop-upload/fill-button-text.md') + }, + { + path: 'pop-upload/upload-name', + meta: { title: '设置组件字段名,该属性的默认值为 file', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-upload' */ './docs/zh-CN/pop-upload/upload-name.md') + }, + { + path: 'pop-upload/http-request', + meta: { title: '通过配置 http-request ,覆盖默认的上传行为,可以自定义上传的实现', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-upload' */ './docs/zh-CN/pop-upload/http-request.md') + }, + { + path: 'pop-upload/size', + meta: { title: '设置组件大小,可设置为:medium,small,mini', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-upload' */ './docs/zh-CN/pop-upload/size.md') + }, + { + path: 'pop-upload/file-limit', + meta: { title: '表单组件-PopUpload 弹出框上传-最大上传文件数', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-upload' */ './docs/zh-CN/pop-upload/file-limit.md') + }, + { + path: 'pop-upload/file-type', + meta: { title: '表单组件-PopUpload 弹出框上传-可上传文件类型', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-upload' */ './docs/zh-CN/pop-upload/file-type.md') + }, + { + path: 'pop-upload/max-upload-file-size', + meta: { title: '表单组件-PopUpload 弹出框上传-可上传文件大小', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-upload' */ './docs/zh-CN/pop-upload/max-upload-file-size.md') + }, + { + path: 'pop-upload/before-remove-file', + meta: { title: '表单组件-PopUpload 弹出框文件-移除前事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pop-upload' */ './docs/zh-CN/pop-upload/prevent-delete-file.md') + }, + { + path: 'search', + meta: { title: '表单组件-Search 搜索', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-search' */ './docs/zh-CN/search/basic-usage.md') + }, + { + path: 'search/clearable', + meta: { title: '表单组件-Search 搜索可清除', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-search' */ './docs/zh-CN/search/clearable.md') + }, + { + path: 'search/mini-mode', + meta: { title: '表单组件-Search 搜索-Mini 模式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-search' */ './docs/zh-CN/search/mini-mode.md') + }, + { + path: 'search/transparent-mode', + meta: { title: '表单组件-Search 搜索-透明模式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-search' */ './docs/zh-CN/search/transparent-mode.md') + }, + { + path: 'search/default-value', + meta: { title: '表单组件-Search 搜索-默认搜索', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-search' */ './docs/zh-CN/search/default-value.md') + }, + { + path: 'search/search-types', + meta: { title: '表单组件-Search 搜索-搜索类型', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-search' */ './docs/zh-CN/search/search-types.md') + }, + { + path: 'search/custom-search-types', + meta: { title: '表单组件-Search 搜索-自定义搜索类型的内容', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-search' */ './docs/zh-CN/search/custom-search-types.md') + }, + { + path: 'search/show-selected-types', + meta: { title: '表单组件-Search 搜索-自定义搜索类型选择后的展示', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-search' */ './docs/zh-CN/search/show-selected-types.md') + }, + { + path: 'search/search-events', + meta: { title: '表单组件-Search 搜索-事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-search' */ './docs/zh-CN/search/search-events.md') + }, + // { + // path: 'search/search-in-navigation-menu', + // meta: { title: '表单组件-Search 搜索-导航菜单搜索功能', lang: 'zh-CN', sign: 'component' }, + // component: () => import(/* webpackChunkName: 'v3-search' */ './docs/zh-CN/search/search-in-navigation-menu.md') + // }, + { + path: 'radio', + meta: { title: '表单组件-Radio 单选框', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-radio' */ './docs/zh-CN/radio/basic-usage.md') + }, + { + path: 'radio/with-border', + meta: { title: '表单组件-Radio 单选框-带有边框', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-radio' */ './docs/zh-CN/radio/with-border.md') + }, + { + path: 'radio/radio-default', + meta: { title: '表单组件-Radio 单选框-带有边框', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-radio' */ './docs/zh-CN/radio/radio-default.md') + }, + { + path: 'radio/radio-value', + meta: { title: '表单组件-Radio 单选框-带有边框', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-radio' */ './docs/zh-CN/radio/radio-value.md') + }, + { + path: 'radio/radio-text', + meta: { title: '表单组件-Radio 单选框-带有边框', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-radio' */ './docs/zh-CN/radio/radio-text.md') + }, + { + path: 'radio/dynamic-disable', + meta: { title: '表单组件-Radio 单选框-禁用状态', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-radio' */ './docs/zh-CN/radio/dynamic-disable.md') + }, + { + path: 'radio/vertical', + meta: { title: '表单组件-Radio 单选框-垂直布局', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-radio' */ './docs/zh-CN/radio/vertical.md') + }, + { + path: 'radio/active-color', + meta: { title: '表单组件-Radio 单选框-颜色设置', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-radio' */ './docs/zh-CN/radio/active-color.md') + }, + { + path: 'radio/radio-size', + meta: { title: '表单组件-Radio 单选框-尺寸设置', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-radio' */ './docs/zh-CN/radio/radio-size.md') + }, + { + path: 'radio/radio-events', + meta: { title: '表单组件-Radio 单选框-单选框事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-radio' */ './docs/zh-CN/radio/radio-events.md') + }, + { + path: 'radio/group-options', + meta: { title: '表单组件-Radio 单选框-单选框事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-radio' */ './docs/zh-CN/radio/group-options.md') + }, + { + path: 'radio/active-color', + meta: { title: '表单组件-Radio 单选框-单选框事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-radio' */ './docs/zh-CN/radio/active-color.md') + }, + { + path: 'radio/dynamic-disable', + meta: { title: '表单组件-Radio 单选框-单选框事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-radio' */ './docs/zh-CN/radio/dynamic-disable.md') + }, + { + path: 'radio/basic-usage', + meta: { title: '表单组件-Radio 单选框-单选框事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-radio' */ './docs/zh-CN/radio/basic-usage.md') + }, + { + path: 'radio/vertical', + meta: { title: '表单组件-Radio 单选框-单选框事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-radio' */ './docs/zh-CN/radio/vertical.md') + }, + { + path: 'cascader', + meta: { title: '表单组件-Cascader 级联选择器', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-cascader' */ './docs/zh-CN/cascader/basic-usage.md') + }, + { + path: 'cascader/disabled-items', + meta: { title: '表单组件-Cascader 级联选择器-禁用选项', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-cascader' */ './docs/zh-CN/cascader/disabled-items.md') + }, + { + path: 'cascader/props-children', + meta: { title: '表单组件-Cascader 指定选项的子选项为选项对象的某个属性值', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-cascader' */ './docs/zh-CN/cascader/props-children.md') + }, + { + path: 'cascader/clearable', + meta: { title: '表单组件-Cascader 级联选择器-可清空', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-cascader' */ './docs/zh-CN/cascader/clearable.md') + }, + { + path: 'cascader/default-multiple', + meta: { title: '表单组件-Cascader 级联选择器-多选', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-cascader' */ './docs/zh-CN/cascader/default-multiple.md') + }, + { + path: 'cascader/check-strictly', + meta: { title: '表单组件-Cascader 级联选择器-父子级不相关联', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-cascader' */ './docs/zh-CN/cascader/check-strictly.md') + }, + { + path: 'cascader/auto-load', + meta: { title: '表单组件-Cascader 级联选择器-动态加载', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-cascader' */ './docs/zh-CN/cascader/auto-load.md') + }, + { + path: 'cascader/filterable', + meta: { title: '表单组件-Cascader 级联选择器-可搜索', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-cascader' */ './docs/zh-CN/cascader/filterable.md') + }, + { + path: 'cascader/show-all-levels', + meta: { title: '表单组件-Cascader 级联选择器-仅显示最后一级', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-cascader' */ './docs/zh-CN/cascader/show-all-levels.md') + }, + { + path: 'cascader/events', + meta: { title: '表单组件-Cascader 级联选择器-事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-cascader' */ './docs/zh-CN/cascader/events.md') + }, + { + path: 'cascader-panel', + meta: { title: '表单组件-CascaderPanel 级联面板', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-cascader-panel' */ './docs/zh-CN/cascader-panel/basic-usage.md') + }, + { + path: 'cascader-panel/change', + meta: { title: '表单组件-CascaderPanel change', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-cascader-panel' */ './docs/zh-CN/cascader-panel/change.md') + }, + { + path: 'cascader-panel/custom-option-content', + meta: { title: '表单组件-Cascader 级联选择器-自定义节点内容', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-cascader' */ './docs/zh-CN/cascader-panel/custom-option-content.md') + }, + { + path: 'cascader-panel/cascader-panel-props', + meta: { title: '表单组件-CascaderPanel props 选项', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-cascader-panel' */ './docs/zh-CN/cascader-panel/cascader-panel-props.md') + }, + { + path: 'checkbox', + meta: { title: '表单组件-Checkbox 复选框', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-checkbox' */ './docs/zh-CN/checkbox/basic-usage.md') + }, + { + path: 'checkbox/with-border', + meta: { title: '表单组件-Checkbox 复选框-尺寸', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-checkbox' */ './docs/zh-CN/checkbox/with-border.md') + }, + { + path: 'checkbox/indeterminate', + meta: { title: '表单组件-Checkbox 复选框-全选与半选', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-checkbox' */ './docs/zh-CN/checkbox/indeterminate.md') + }, + { + path: 'checkbox/text', + meta: { title: '表单组件-Checkbox 复选框-全选与半选', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-checkbox' */ './docs/zh-CN/checkbox/text.md') + }, + { + path: 'checkbox/content-overflow', + meta: { title: '表单组件-Checkbox 复选框-内容超出时的提示信息', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-checkbox' */ './docs/zh-CN/checkbox/content-overflow.md') + }, + { + path: 'checkbox/dynamic-create-checkbox', + meta: { title: '表单组件-Checkbox 复选框-动态生成复选框', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-checkbox' */ './docs/zh-CN/checkbox/dynamic-create-checkbox.md') + }, + { + path: 'checkbox/checkbox-slot', + meta: { title: '表单组件-Checkbox 复选框-插槽', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-checkbox' */ './docs/zh-CN/checkbox/checkbox-slot.md') + }, + { + path: 'checkbox/checkbox-group', + meta: { title: '表单组件-Checkbox 复选框-复选框组', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-checkbox' */ './docs/zh-CN/checkbox/checkbox-group.md') + }, + { + path: 'checkbox/checkbox-button', + meta: { title: '表单组件-Checkbox 复选框-按钮形式复选框', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-checkbox' */ './docs/zh-CN/checkbox/checkbox-button.md') + }, + { + path: 'checkbox/vertical-checkbox', + meta: { title: '表单组件-Checkbox 复选框-垂直布局', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-checkbox' */ './docs/zh-CN/checkbox/vertical-checkbox.md') + }, + { + path: 'checkbox/min-max', + meta: { title: '表单组件-Checkbox 复选框-可选数量限制', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-checkbox' */ './docs/zh-CN/checkbox/min-max.md') + }, + { + path: 'checkbox/checkbox-events', + meta: { title: '表单组件-Checkbox 复选框-事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-checkbox' */ './docs/zh-CN/checkbox/checkbox-events.md') + }, + { + path: 'slider', + meta: { title: '表单组件-Slider 滑块', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-slider' */ './docs/zh-CN/slider/basic-usage.md') + }, + { + path: 'slider/vertical-mode', + meta: { title: '表单组件-Slider 滑块-竖向模式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-slider' */ './docs/zh-CN/slider/vertical-mode.md') + }, + { + path: 'slider/max-min', + meta: { title: '表单组件-Slider 滑块-最大最小值', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-slider' */ './docs/zh-CN/slider/max-min.md') + }, + { + path: 'slider/range-select', + meta: { title: '表单组件-Slider 滑块-范围选择', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-slider' */ './docs/zh-CN/slider/range-select.md') + }, + { + path: 'slider/show-input', + meta: { title: '表单组件-Slider 滑块-输入框模式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-slider' */ './docs/zh-CN/slider/show-input.md') + }, + { + path: 'slider/shortcut-operation', + meta: { title: '表单组件-Slider 滑块-快捷键操作', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-slider' */ './docs/zh-CN/slider/shortcut-operation.md') + }, + { + path: 'slider/dynamic-disable', + meta: { title: '表单组件-Slider 滑块-禁用', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-slider' */ './docs/zh-CN/slider/dynamic-disable.md') + }, + { + path: 'slider/show-tip', + meta: { title: '表单组件-Slider 滑块-提示', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-slider' */ './docs/zh-CN/slider/show-tip.md') + }, + { + path: 'slider/about-step', + meta: { title: '表单组件-Slider 滑块-步长', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-slider' */ './docs/zh-CN/slider/about-step.md') + }, + { + path: 'slider/slider-events', + meta: { title: '表单组件-Slider 滑块-事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-slider' */ './docs/zh-CN/slider/slider-events.md') + }, + { + path: 'slider/slider-slot', + meta: { title: '表单组件-Slider 滑块-自定义插槽', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-slider' */ './docs/zh-CN/slider/slider-slot.md') + }, + { + path: 'switch', + meta: { title: '表单组件-Switch 开关', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-switch' */ './docs/zh-CN/switch/basic-usage.md') + }, + { + path: 'switch/mini-mode', + meta: { title: '表单组件-Switch 开关-mini 模式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-switch' */ './docs/zh-CN/switch/mini-mode.md') + }, + { + path: 'switch/custom-open-close', + meta: { title: '表单组件-Switch 开关-自定义开关的显示', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-switch' */ './docs/zh-CN/switch/custom-open-close.md') + }, + { + path: 'switch/custom-true-false-value', + meta: { title: '表单组件-Switch 开关-自定义开关的取值', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-switch' */ './docs/zh-CN/switch/custom-true-false-value.md') + }, + { + path: 'switch/dynamic-disable', + meta: { title: '表单组件-Switch 开关-禁用', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-switch' */ './docs/zh-CN/switch/dynamic-disable.md') + }, + { + path: 'switch/enent', + meta: { title: '表单组件-Switch 开关-自定义开关的取值', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-switch' */ './docs/zh-CN/switch/enent.md') + }, + { + path: 'time-select', + meta: { title: '表单组件-time-select 时间选择', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-select' */ './docs/zh-CN/time-select/basic-usage.md') + }, + { + path: 'time-select/range-placeholder', + meta: { title: '表单组件-time-select-range-placeholder 占位符范围', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-select' */ './docs/zh-CN/time-select/range-placeholder.md') + }, + { + path: 'time-select/suffix-icon', + meta: { title: '表单组件-time-select-suffix-icon 后置图标', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-select' */ './docs/zh-CN/time-select/suffix-icon.md') + }, + { + path: 'time-select/picker-options', + meta: { title: '表单组件-time-select-picker-options 指定时间范围', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-select' */ './docs/zh-CN/time-select/picker-options.md') + }, + { + path: 'time-select/clear-icon', + meta: { title: '表单组件-time-select-clear-icon 清除按钮', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-select' */ './docs/zh-CN/time-select/clear-icon.md') + }, + { + path: 'time-select/default-value', + meta: { title: '表单组件-time-select-default-value 默认值', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-select' */ './docs/zh-CN/time-select/default-value.md') + }, + { + path: 'time-select/event', + meta: { title: '表单组件-time-select-event 事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-select' */ './docs/zh-CN/time-select/event.md') + }, + { + path: 'time-select/editable', + meta: { title: '表单组件-time-select-editable 不可编辑', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-select' */ './docs/zh-CN/time-select/editable.md') + }, + { + path: 'time-select/disabled', + meta: { title: '表单组件-time-select-disabled 禁用', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-select' */ './docs/zh-CN/time-select/disabled.md') + }, + { + path: 'time-select/popper-class', + meta: { title: '表单组件-time-select-popper-class 自定义类名', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-select' */ './docs/zh-CN/time-select/popper-class.md') + }, + { + path: 'time-select/size', + meta: { title: '表单组件-time-select-size 尺寸', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-select' */ './docs/zh-CN/time-select/size.md') + }, + { + path: 'time-select/focus', + meta: { title: '表单组件-time-select-focus 手动获取焦点', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-time-select' */ './docs/zh-CN/time-select/focus.md') + }, + { + path: 'transfer/panel-slot', + meta: { title: '表单组件-Transfer 自定义面板内容', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-transfer' */ './docs/zh-CN/transfer/panel-slot.md') + }, + { + path: 'transfer', + meta: { title: '表单组件-Transfer 穿梭框', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-transfer' */ './docs/zh-CN/transfer/basic-usage.md') + }, + { + path: 'transfer/data-source', + meta: { title: '表单组件-Transfer 穿梭框-数据源', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-transfer' */ './docs/zh-CN/transfer/data-source.md') + }, + { + path: 'transfer/show-all-btn', + meta: { title: '表单组件-Transfer 穿梭框-展示全部移动按钮', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-transfer' */ './docs/zh-CN/transfer/show-all-btn.md') + }, + { + path: 'transfer/custom-transfer-titles', + meta: { title: '表单组件-Transfer 穿梭框-自定义列表标题', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-transfer' */ './docs/zh-CN/transfer/custom-transfer-titles.md') + }, + { + path: 'transfer/custom-button-texts', + meta: { title: '表单组件-Transfer 穿梭框-自定义按钮文案', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-transfer' */ './docs/zh-CN/transfer/custom-button-texts.md') + }, + { + path: 'transfer/filter-placeholder', + meta: { title: '表单组件-Transfer 穿梭框-搜索框占位符', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-transfer' */ './docs/zh-CN/transfer/filter-placeholder.md') + }, + { + path: 'transfer/custom-filter-method', + meta: { title: '表单组件-Transfer 穿梭框-自定义搜索方法', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-transfer' */ './docs/zh-CN/transfer/custom-filter-method.md') + }, + { + path: 'transfer/default-checked', + meta: { title: '表单组件-Transfer 穿梭框-默认勾选项', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-transfer' */ './docs/zh-CN/transfer/default-checked.md') + }, + { + path: 'transfer/custom-render-content', + meta: { title: '表单组件-Transfer 穿梭框-自定义数据项渲染', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-transfer' */ './docs/zh-CN/transfer/custom-render-content.md') + }, + { + path: 'transfer/checked-format-text', + meta: { title: '表单组件-Transfer 穿梭框-列表顶部勾选状态文案', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-transfer' */ './docs/zh-CN/transfer/checked-format-text.md') + }, + { + path: 'transfer/filterable', + meta: { title: '表单组件-Transfer 穿梭框-可搜索', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-transfer' */ './docs/zh-CN/transfer/filterable.md') + }, + { + path: 'transfer/props-of-data-source', + meta: { title: '表单组件-Transfer 穿梭框-数据源的字段别名', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-transfer' */ './docs/zh-CN/transfer/props-of-data-source.md') + }, + { + path: 'transfer/target-order', + meta: { title: '表单组件-Transfer 穿梭框-右侧排序策略', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-transfer' */ './docs/zh-CN/transfer/target-order.md') + }, + { + path: 'transfer/drop-config', + meta: { title: '表单组件-Transfer 穿梭框-左右拖拽', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-transfer' */ './docs/zh-CN/transfer/drop-config.md') + }, + { + path: 'transfer/transfer-events', + meta: { title: '表单组件-Transfer 穿梭框-穿梭框事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-transfer' */ './docs/zh-CN/transfer/transfer-events.md') + }, + { + path: 'transfer/manual-clear-query', + meta: { title: '表单组件-Transfer 穿梭框-手动清空搜索框', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-transfer' */ './docs/zh-CN/transfer/manual-clear-query.md') + }, + { + path: 'transfer/custom-footer', + meta: { title: '表单组件-Transfer 穿梭框-自定义列表底部', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-transfer' */ './docs/zh-CN/transfer/custom-footer.md') + }, + { + path: 'transfer/nested-table', + meta: { title: '表单组件-Transfer 穿梭框-嵌套表格', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-transfer' */ './docs/zh-CN/transfer/nested-table.md') + }, + { + path: 'transfer/nested-tree', + meta: { title: '表单组件-Transfer 穿梭框-嵌套树', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-transfer' */ './docs/zh-CN/transfer/nested-tree.md') + }, + { + path: 'grid', + meta: { title: '表格组件-导入导出', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/grid-basic-usage.md') + }, + { + path: 'grid/serial-column/default-serial-column', + meta: { title: '表格组件-序号列-默认序号列', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/serial-column/default-serial-column.md') + }, + { + path: 'grid/serial-column/custom-serial-column', + meta: { title: '表格组件-序号列-自定义序号列', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/serial-column/custom-serial-column.md') + }, + { + path: 'grid/operation-column/radio-operation-column', + meta: { title: '表格组件-操作列-单选', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/operation-column/radio-operation-column.md') + }, + { + path: 'grid/operation-column/checkbox-operation-column', + meta: { title: '表格组件-操作列-多选', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/operation-column/checkbox-operation-column.md') + }, + { + path: 'grid/operation-column/column-key', + meta: { title: '表格组件-操作列-列key属性', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/operation-column/column-key.md') + }, + { + path: 'grid/operation-column/custom-operation-column', + meta: { title: '表格组件-操作列-自定义操作列', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/operation-column/custom-operation-column.md') + }, + { + path: 'grid/empty-data-tip', + meta: { title: '表格组件-空数据', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/empty-data-tip.md') + }, + { + path: 'grid/data-source/static-data', + meta: { title: '表格组件-数据源-静态数据', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/data-source/static-data.md') + }, + { + path: 'grid/data-source/request-service', + meta: { title: '表格组件-数据源-请求服务', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/data-source/request-service.md') + }, + { + path: 'grid/data-source/auto-load', + meta: { title: '表格组件-数据源-自动加载数据', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/data-source/auto-load.md') + }, + { + path: 'grid/data-source/columns', + meta: { title: '表格组件-数据源-列数据配置', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/data-source/columns.md') + }, + { + path: 'grid/data-source/column-asyn-rendering', + meta: { title: '表格组件-数据源-列异步渲染', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/data-source/column-asyn-rendering.md') + }, + { + path: 'grid/large-data/scroll-paging', + meta: { title: '表格组件-大数据-滚动分页', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/large-data/scroll-paging.md') + }, + { + path: 'grid/large-data/virtual-rolling', + meta: { title: '表格组件-大数据-虚拟滚动', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/large-data/virtual-rolling.md') + }, + { + path: 'grid/large-data/full-data-loading', + meta: { title: '表格组件-大数据-全量加载', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/large-data/full-data-loading.md') + }, + { + path: 'grid/large-data/load-column', + meta: { title: '表格组件-大数据-生成 1000 列', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/large-data/load-column.md') + }, + { + path: 'grid/large-data/scroll-to', + meta: { title: '表格组件-大数据-滚动到指定位置', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/large-data/scroll-to.md') + }, + { + path: 'grid/pager/inner-pager', + meta: { title: '表格组件-分页-内置分页', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/pager/inner-pager.md') + }, + { + path: 'grid/pager/custom-pager', + meta: { title: '表格组件-分页-自定义分页', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/pager/custom-pager.md') + }, + { + path: 'grid/edit/row-editing', + meta: { title: '表格组件-编辑-行编辑', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/edit/row-editing.md') + }, + { + path: 'grid/edit/cell-editing', + meta: { title: '表格组件-编辑-单元格编辑', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/edit/cell-editing.md') + }, + { + path: 'grid/edit/format-value', + meta: { title: '表格组件-编辑-格式化单元格编辑器', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/edit/format-value.md') + }, + { + path: 'grid/edit/custom-editing', + meta: { title: '表格组件-编辑-自定义编辑', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/edit/custom-editing.md') + }, + { + path: 'grid/edit/status-of-editing', + meta: { title: '表格组件-编辑-编辑状态', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/edit/status-of-editing.md') + }, + { + path: 'grid/edit/trigger-mode-for-editing', + meta: { title: '表格组件-编辑-触发方式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/edit/trigger-mode-for-editing.md') + }, + { + path: 'grid/toolbar/insert-delete-update', + meta: { title: '表格组件-工具栏-增删改', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/toolbar/insert-delete-update.md') + }, + { + path: 'grid/toolbar/save-data', + meta: { title: '表格组件-工具栏-服务端数据保存方法', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/toolbar/save-data.md') + }, + { + path: 'grid/toolbar/copy-row-data', + meta: { title: '表格组件-工具栏-复制行', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/toolbar/copy-row-data.md') + }, + { + path: 'grid/toolbar/import-and-export', + meta: { title: '表格组件-工具栏-导入导出', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/toolbar/import-and-export.md') + }, + { + path: 'grid/toolbar/refresh-grid', + meta: { title: '表格组件-工具栏-刷新', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/toolbar/refresh-grid.md') + }, + { + path: 'grid/toolbar/grid-full-screen', + meta: { title: '表格组件-工具栏-全屏', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/toolbar/grid-full-screen.md') + }, + { + path: 'grid/toolbar/custom-toolbar', + meta: { title: '表格组件-工具栏-自定义工具栏', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/toolbar/custom-toolbar.md') + }, + { + path: 'grid/toolbar/toolbar-op-config', + meta: { title: '表格组件-工具栏-配置式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/toolbar/toolbar-op-config.md') + }, + { + path: 'grid/grid-loading-tip', + meta: { title: '表格组件-加载中', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/grid-loading-tip.md') + } +] + +routers.push(...router1, ...router2) + +export default routers diff --git a/example/src/route.config.comp.mobile.js b/example/src/route.config.comp.mobile.js new file mode 100644 index 000000000..c26c7475c --- /dev/null +++ b/example/src/route.config.comp.mobile.js @@ -0,0 +1,1130 @@ +const router = [ + { + path: 'alert', + meta: { title: 'MobileAlert 提示组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/alert/mobilealert.md') + }, + { + path: 'alert/custom-close', + meta: { title: 'MobileAlert 提示组件 - 自定义关闭', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/alert/custom-close.md') + }, + { + path: 'alert/icon', + meta: { title: 'MobileAlert 提示组件 - 自定义提示图标', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/alert/icon.md') + }, + { + path: 'alert/size', + meta: { title: 'MobileAlert 提示组件 - 不同尺寸', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/alert/size.md') + }, + { + path: 'alert/slot-default', + meta: { title: 'MobileAlert 提示组件 - 自定义提示内容', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/alert/slot-default.md') + }, + { + path: 'mobile-avatar', + meta: { title: 'MobileAvatar 头像组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/mobileavatar.md') + }, + { + path: 'mobile-avatar/avatar-size', + meta: { title: 'MobileAvatar 头像组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/avatar/avatar-size.md') + }, + { + path: 'mobile-avatar/avatar-src-set', + meta: { title: 'MobileAvatar 头像组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/avatar/avatar-src-set.md') + }, + { + path: 'mobile-icon', + meta: { title: 'MobileIcon图标组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/mobileicon.md') + }, + { + path: 'mobile-icon/icon-set', + meta: { title: 'MobileIcon 图标组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/icon/icon-set.md') + }, + { + path: 'progress', + meta: { title: 'progress 进度条', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/progress/basic-usage.md') + }, + { + path: 'progress/custom-color', + meta: { title: 'progress 进度条', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/progress/custom-color.md') + }, + { + path: 'progress/dynamic-control-changes', + meta: { title: 'progress 进度条', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/progress/dynamic-control-changes.md') + }, + { + path: 'progress/format', + meta: { title: 'progress 进度条', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/progress/format.md') + }, + { + path: 'progress/width', + meta: { title: 'progress 进度条', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/progress/width.md') + }, + { + path: 'progress/format-text', + meta: { title: 'progress 进度条', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/progress/format-text.md') + }, + { + path: 'progress/progress-status', + meta: { title: 'progress 进度条', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/progress/progress-status.md') + }, + { + path: 'progress/progress-type', + meta: { title: 'progress 进度条', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/progress/progress-type.md') + }, + { + path: 'progress/progress-width', + meta: { title: 'progress 进度条', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/progress/progress-width.md') + }, + { + path: 'progress/text-inside-or-no-text', + meta: { title: 'progress 进度条', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/progress/text-inside-or-no-text.md') + }, + { + path: 'progress/dynamic-progress', + meta: { title: 'progress 进度条', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/progress/dynamic-progress.md') + }, + { + path: 'slider', + meta: { title: 'slider 滑条', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/slider/basic-usage.md') + }, + { + path: 'slider/about-step', + meta: { title: 'slider 滑条', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/slider/about-step.md') + }, + { + path: 'slider/dynamic-disable', + meta: { title: 'slider 滑条', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/slider/dynamic-disable.md') + }, + { + path: 'slider/shortcut-operation', + meta: { title: 'slider 滑条', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/slider/shortcut-operation.md') + }, + { + path: 'slider/format-tooltip', + meta: { title: 'slider 滑条', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/slider/format-tooltip.md') + }, + { + path: 'slider/max-min', + meta: { title: 'slider 滑条', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/slider/max-min.md') + }, + { + path: 'slider/range-select', + meta: { title: 'slider 滑条', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/slider/range-select.md') + }, + { + path: 'slider/show-input', + meta: { title: 'slider 滑条', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/slider/show-input.md') + }, + { + path: 'slider/show-tip', + meta: { title: 'slider 滑条', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/slider/show-tip.md') + }, + { + path: 'slider/slider-events', + meta: { title: 'slider 滑条', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/slider/slider-events.md') + }, + { + path: 'slider/slider-slot', + meta: { title: 'slider 滑条', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/slider/slider-slot.md') + }, + { + path: 'slider/vertical-mode', + meta: { title: 'slider 滑条', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/slider/vertical-mode.md') + }, + { + path: 'pull-refresh', + meta: { title: 'pull-refresh 下拉刷新', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/pull-refresh/base.md') + }, + { + path: 'pull-refresh/animation-duration', + meta: { title: 'pull-refresh 下拉刷新', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/pull-refresh/animation-duration.md') + }, + { + path: 'pull-refresh/disabled', + meta: { title: 'pull-refresh 下拉刷新', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/pull-refresh/disabled.md') + }, + { + path: 'pull-refresh/head-height', + meta: { title: 'pull-refresh 下拉刷新', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/pull-refresh/head-height.md') + }, + { + path: 'pull-refresh/loosing-text', + meta: { title: 'pull-refresh 下拉刷新', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/pull-refresh/loosing-text.md') + }, + { + path: 'pull-refresh/pull-refresh-slot', + meta: { title: 'pull-refresh 下拉刷新', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/pull-refresh/pull-refresh-slot.md') + }, + { + path: 'pull-refresh/pulling-text', + meta: { title: 'pull-refresh 下拉刷新', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/pull-refresh/pulling-text.md') + }, + { + path: 'pull-refresh/success-duration', + meta: { title: 'pull-refresh 下拉刷新', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/pull-refresh/success-duration.md') + }, + { + path: 'pull-refresh/success-text', + meta: { title: 'pull-refresh 下拉刷新', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/pull-refresh/success-text.md') + }, + { + path: 'form', + meta: { title: 'form 表单', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/form/base.md') + }, + { + path: 'form/only-read', + meta: { title: 'form 表单', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/form/only-read.md') + }, + { + path: 'form/hide-required-asterisk', + meta: { title: 'form 表单', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/form/hide-required-asterisk.md') + }, + { + path: 'form/form-select', + meta: { title: 'form 表单', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/form/form-select.md') + }, + { + path: 'form/label-width', + meta: { title: 'form 表单', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/form/label-width.md') + }, + { + path: 'form/validate', + meta: { title: 'form 表单', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/form/validate.md') + }, + { + path: 'form/form-writeone', + meta: { title: 'form 表单', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/form/form-writeone.md') + }, + { + path: 'form/form-writetwo', + meta: { title: 'form 表单', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/form/form-writetwo.md') + }, + { + path: 'form/form-tabselect', + meta: { title: 'form 表单', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/form/form-tabselect.md') + }, + { + path: 'form/validate-position', + meta: { title: 'form 表单', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/form/validate-position.md') + }, + { + path: 'badge', + meta: { title: 'mobileBadge 徽章组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/badge/mobilebadge.md') + }, + { + path: 'badge/is-dot', + meta: { title: 'mobileBadge 徽章组件 - 小圆点标记', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/badge/is-dot.md') + }, + { + path: 'badge/is-mini', + meta: { title: 'mobileBadge 徽章组件 - 小尺寸', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/badge/is-mini.md') + }, + { + path: 'badge/type', + meta: { title: 'mobileBadge 徽章组件 - 不同主题', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/badge/type.md') + }, + { + path: 'badge/hidden', + meta: { title: 'mobileBadge 徽章组件 - 隐藏徽标', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/badge/hidden.md') + }, + { + path: 'badge/href-target', + meta: { title: 'mobileBadge 徽章组件 - 跳转链接', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/badge/href-target.md') + }, + { + path: 'badge/content', + meta: { title: 'mobileBadge 徽章组件 - 自定义提示内容', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/badge/content.md') + }, + { + path: 'button', + meta: { title: 'mobileButton 按钮组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/button/mobilebutton.md') + }, + { + path: 'button/icon', + meta: { title: 'mobileButton 按钮组件 - 图标按钮', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/button/icon.md') + }, + { + path: 'button/native-type', + meta: { title: 'mobileButton 按钮组件 - 朴素按钮', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/button/native-type.md') + }, + { + path: 'button/reset-time', + meta: { title: 'mobileButton 按钮组件 - 朴素按钮', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/button/reset-time.md') + }, + { + path: 'button/plain', + meta: { title: 'mobileButton 按钮组件 - 按钮属性', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/button/plain.md') + }, + { + path: 'button/round', + meta: { title: 'mobileButton 按钮组件 - 圆角按钮', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/button/round.md') + }, + { + path: 'button/text', + meta: { title: 'mobileButton 按钮组件 - 文字按钮', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/button/text.md') + }, + { + path: 'button/size', + meta: { title: 'mobileButton 按钮组件 - 不同尺寸', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/button/size.md') + }, + { + path: 'button/loading', + meta: { title: 'mobileButton 按钮组件 - 加载中', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/button/loading.md') + }, + { + path: 'button/event-click', + meta: { title: 'mobileButton 按钮组件 - 单击事件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/button/event-click.md') + }, + { + path: 'checkbox', + meta: { title: 'mobileCheckbox 复选框组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/checkbox/mobilecheckbox.md') + }, + { + path: 'checkbox/indeterminate', + meta: { title: 'mobileCheckbox 复选框组件 - 全选与半选', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/checkbox/indeterminate.md') + }, + { + path: 'checkbox/label', + meta: { title: 'mobileCheckbox 复选框组件 - 选中值设置', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/checkbox/label.md') + }, + { + path: 'checkbox/event-change', + meta: { title: 'mobileCheckbox 复选框组件 - 事件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/checkbox/event-change.md') + }, + { + path: 'checkbox/default', + meta: { title: 'mobileCheckbox 复选框组件 - 插槽', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/checkbox/default.md') + }, + { + path: 'checkbox-group', + meta: { title: 'monileCheckboxGroup 复选框组组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/checkbox-group/monilecheckboxgroup.md') + }, + { + path: 'checkbox-group/min-max', + meta: { title: 'monileCheckboxGroup 复选框组组件 - 可选数量', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/checkbox-group/min-max.md') + }, + { + path: 'checkbox-group/disabled', + meta: { title: 'monileCheckboxGroup 复选框组组件 - 是否禁用', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/checkbox-group/disabled.md') + }, + { + path: 'checkbox-group/vertical', + meta: { title: 'monileCheckboxGroup 复选框组组件 - 垂直排列', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/checkbox-group/vertical.md') + }, + { + path: 'checkbox-group/event-change', + meta: { title: 'monileCheckboxGroup 复选框组组件 - 事件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/checkbox-group/event-change.md') + }, + { + path: 'dialog-box', + meta: { title: 'mobileDialogBox 提示框组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/dialog-box/mobiledialogbox.md') + }, + { + path: 'dialog-box/close-on-click-modal', + meta: { title: 'mobileDialogBox 提示框组件 - 单击遮罩层不关闭', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/dialog-box/close-on-click-modal.md') + }, + { + path: 'dialog-box/lock-scroll', + meta: { title: 'mobileDialogBox 提示框组件 - 弹出时禁用滚动', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/dialog-box/lock-scroll.md') + }, + { + path: 'dialog-box/slot-footer', + meta: { title: 'mobileDialogBox 提示框组件 -自定义底部', lang: 'zh-CN' }, + name: 'component-mobileDialogBox 提示框组件 - 自定义底部', + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/dialog-box/slot-footer.md') + }, + { + path: 'dialog-box/show-header', + meta: { title: 'mobileDialogBox 提示框组件 - 不显示标题', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/dialog-box/show-header.md') + }, + { + path: 'dialog-box/with-input', + meta: { title: 'mobileDialogBox 提示框组件 - 输入类提示框', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/dialog-box/with-input.md') + }, + { + path: 'dialog-box/slot-title', + meta: { title: 'mobileDialogBox 提示框组件 - 自定义标题', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/dialog-box/slot-title.md') + }, + { + path: 'dialog-box/events-open-close', + meta: { title: 'mobileDialogBox 提示框组件 - 打开与关闭事件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/dialog-box/events-open-close.md') + }, + { + path: 'dialog-box/cancel-confirm', + meta: { title: 'mobileDialogBox 提示框组件 - 取消与确认事件的回调', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/dialog-box/cancel-confirm.md') + }, + { + path: 'image-viewer', + meta: { title: 'mobileImageViewer 图片预览组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/image-viewer/mobileimageviewer.md') + }, + { + path: 'image-viewer/image-full-current', + meta: { title: 'mobileImageViewer 图片预览组件 - 全屏显示', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/image-viewer/image-full-current.md') + }, + { + path: 'image-viewer/start-position', + meta: { title: 'mobileImageViewer 图片预览组件 - 初始起始位置', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/image-viewer/start-position.md') + }, + { + path: 'image-viewer/slot-index', + meta: { title: 'mobileImageViewer 图片预览组件 - 自定义下标', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/image-viewer/slot-index.md') + }, + { + path: 'image-viewer/events-change-close', + meta: { title: 'mobileImageViewer 图片预览组件 - 切换与关闭事件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/image-viewer/events-change-close.md') + }, + { + path: 'list', + meta: { title: 'mobileList 列表组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/list/mobilelist.md') + }, + { + path: 'list/slots', + meta: { title: 'mobileList 列表组件 - 自定义列表内容', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/list/slots.md') + }, + { + path: 'list/single-line', + meta: { title: 'mobileList 列表组件 - 单行', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/list/single-line.md') + }, + { + path: 'list/double-list', + meta: { title: 'mobileList 列表组件 - 双行列表', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/list/doublelist.md') + }, + { + path: 'list//imformation-list', + meta: { title: 'mobileList 列表组件 - 资讯类列表', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/list/imformationlist.md') + }, + { + path: 'input', + meta: { title: 'mobileInput 输入框组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/input/mobileinput.md') + }, + { + path: 'input/type-form', + meta: { title: 'mobileInput 输入框组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/input/type-be-form.md') + }, + { + path: 'input/slot-content', + meta: { title: 'mobileInput 头部插槽', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/input/slot-content.md') + }, + { + path: 'input/props', + meta: { title: 'mobileInput 输入框组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/input/props.md') + }, + { + path: 'input/validate-event', + meta: { title: 'mobileInput 输入框组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/input/validate-event.md') + }, + { + path: 'input/blur-focus', + meta: { title: 'mobileInput 输入框组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/input/blur-focus.md') + }, + { + path: 'input/autofocus', + meta: { title: 'mobileInput 输入框组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/input/autofocus.md') + }, + { + path: 'input/mobile-tips', + meta: { title: 'mobileInput 输入框组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/input/type-be-form-tips.md') + }, + { + path: 'input/isselect-and-selectmenu', + meta: { title: 'mobileInput 输入框组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/input/type-be-form.md') + }, + { + path: 'input/autosize', + meta: { title: 'mobileInput 输入框组件 - 自适应内容高度', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/input/autosize.md') + }, + { + path: 'input/clearable', + meta: { title: 'mobileInput 输入框组件 - 可清空', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/input/clearable.md') + }, + { + path: 'input/counter', + meta: { title: 'mobileInput 输入框组件 - 计数与输入统计', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/input/counter.md') + }, + { + path: 'input/max-min-length', + meta: { title: 'mobileInput 输入框组件 - 输入长度限制', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/input/max-min-length.md') + }, + { + path: 'input/show-password', + meta: { title: 'mobileInput 输入框组件 - 密码框', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/input/show-password.md') + }, + { + path: 'input/slots-append-prepend', + meta: { title: 'mobileInput 输入框组件 - 复合型输入框', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/input/slots-append-prepend.md') + }, + { + path: 'input/suffix-icon', + meta: { title: 'mobileInput 输入框组件 - 自定义后置图标', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/input/suffix-icon.md') + }, + { + path: 'input/events', + meta: { title: 'mobileInput 输入框组件 - 事件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/input/events.md') + }, + { + path: 'input/method-select', + meta: { title: 'mobileInput 输入框组件 - 选中输入框文本', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/input/method-select.md') + }, + { + path: 'nav-bar', + meta: { title: 'mobileNavBar 导航栏框组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/nav-bar/mobilenavbar.md') + }, + { + path: 'nav-bar/left-right-arrow', + meta: { title: 'mobileNavBar 导航栏框组件 - 显示左右箭头', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/nav-bar/left-right-arrow.md') + }, + { + path: 'nav-bar/z-index', + meta: { title: 'mobileNavBar 导航栏框组件 - 设置层级', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/nav-bar/z-index.md') + }, + { + path: 'nav-bar/left-right-text', + meta: { title: 'mobileNavBar 导航栏框组件 - 指定左右文本', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/nav-bar/left-right-text.md') + }, + { + path: 'nav-bar/slots', + meta: { title: 'mobileNavBar 导航栏框组件 - 自定义左右侧内容', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/nav-bar/slots.md') + }, + { + path: 'radio', + meta: { title: 'mobileRadio 单选框组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/radio/mobileradio.md') + }, + { + path: 'radio/border', + meta: { title: 'mobileRadio 单选框组件 - 显示边框', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/radio/border.md') + }, + { + path: 'radio/disabled', + meta: { title: 'mobileRadio 单选框组件 - 是否禁用', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/radio/disabled.md') + }, + { + path: 'radio/event-change', + meta: { title: 'mobileRadio 单选框组件 - 值改变事件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/radio/event-change.md') + }, + { + path: 'search', + meta: { title: 'mobileSearch 搜索框组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/search/mobilesearch.md') + }, + { + path: 'search/button-text', + meta: { title: 'mobileSearch 搜索框组件 - 自定义搜索按钮文本', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/search/button-text.md') + }, + { + path: 'search/default-value', + meta: { title: 'mobileSearch 搜索框组件 - 默认搜索', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/search/default-value.md') + }, + { + path: 'search/events', + meta: { title: 'mobileSearch 搜索框组件 - 事件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/search/events.md') + }, + { + path: 'switch', + meta: { title: 'mobileSwitch 开关组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/switch/mobileswitch.md') + }, + { + path: 'switch/true-false-value', + meta: { title: 'mobileSwitch 开关组件 - 自定义打开关闭的值', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/switch/true-false-value.md') + }, + { + path: 'switch/disabled', + meta: { title: 'mobileSwitch 开关组件 - 是否禁用', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/switch/disabled.md') + }, + { + path: 'switch/event-change', + meta: { title: 'mobileSwitch 开关组件 - 值改变事件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/switch/event-change.md') + }, + { + path: 'switch/scenario', + meta: { title: 'mobileSwitch 开关组件 - 应用场景', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/switch/scenario.md') + }, + { + path: 'tabbar', + meta: { title: 'mobileTabbar 标签栏组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/tabbar/mobiletabbar.md') + }, + { + path: 'tabbar/onlytext', + meta: { title: 'mobileTabbar 标签栏组件 - 纯文本', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/tabbar/onlytext.md') + }, + { + path: 'tabbar/active-inactive-color', + meta: { title: 'mobileTabbar 标签栏组件 - 自定义颜色', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/tabbar/active-inactive-color.md') + }, + { + path: 'tabbar/badge', + meta: { title: 'mobileTabbar 标签栏组件 - 徽标提示', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/tabbar/badge.md') + }, + { + path: 'tabbar/border', + meta: { title: 'mobileTabbar 标签栏组件 - 无边框', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/tabbar/border.md') + }, + { + path: 'tabbar/event-change', + meta: { title: 'mobileTabbar 标签栏组件 - 切换事件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/tabbar/event-change.md') + }, + { + path: 'tabbar/route', + meta: { title: 'mobileTabbar 标签栏组件 - 路由跳转', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/tabbar/route.md') + }, + { + path: 'tabbar/slot-icon', + meta: { title: 'mobileTabbar 标签栏组件 - 自定义图标', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/tabbar/slot-icon.md') + }, + { + path: 'mobileTabs', + meta: { title: 'mobileTabs 选项卡组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/mobiletabs.md') + }, + { + path: 'tabs/swipe', + meta: { title: 'mobileTabs 选项卡组件 - 内容滑动切换标签页', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/tabs/swipe.md') + }, + { + path: 'tabs/events', + meta: { title: 'mobileTabs 选项卡组件 - 内容滑动切换标签页', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/tabs/tabs-event.md') + }, + { + path: 'tabs/before-leave', + meta: { title: 'mobileTabs 选项卡组件 - 内容滑动切换标签页', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/tabs/before-leave.md') + }, + { + path: 'tabs/with-add', + meta: { title: 'mobileTabs 选项卡组件 - 新增标签页', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/tabs/with-add.md') + }, + { + path: 'tabs/three-level', + meta: { title: 'mobileTabs 选项卡组件 - 新增标签页', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/tabs/three-level.md') + }, + { + path: 'tabs/active-color', + meta: { title: 'mobileTabs 选项卡组件 - 新增标签页', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/tabs/active-color.md') + }, + { + path: 'time-line', + meta: { title: 'mobileTimeLine 时间轴组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/mobiletimeline.md') + }, + { + path: 'time-line/slot', + meta: { title: 'mobileTimeLine 时间轴组件 - 插槽', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/time-line/slot.md') + }, + { + path: 'time-line/different-data', + meta: { title: 'mobileTimeLine 时间轴组件 - 数据映射', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/time-line/different-data.md') + }, + { + path: 'time-line/space', + meta: { title: 'mobileTimeLine 时间轴组件 - 高度', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/time-line/space.md') + }, + { + path: 'dropdown-menu', + meta: { title: 'mobileDropdownMenu 筛选排序组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/mobiledropdownmenu.md') + }, + { + path: 'dropdown-menu/screen-funnel', + meta: { title: 'mobileDropdownMenu 筛选排序组件 - 筛选漏斗', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/dropdown-menu/screen-funnel.md') + }, + { + path: 'dropdown-menu/overlay', + meta: { title: 'mobileDropdownMenu 筛选排序组件 - 遮罩层', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/dropdown-menu/overlay.md') + }, + { + path: 'dropdown-menu/activeColor', + meta: { title: 'mobileDropdownMenu 筛选排序组件 - 自定义选中项颜色', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/dropdown-menu/activeColor.md') + }, + { + path: 'dropdown-menu/duration', + meta: { title: 'mobileDropdownMenu 筛选排序组件 - 动画时长', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/dropdown-menu/duration.md') + }, + { + path: 'dropdown-menu/type', + meta: { title: 'mobileDropdownMenu 筛选排序组件 - 筛选类型', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/dropdown-menu/type.md') + }, + { + path: 'dropdown-menu/item-disabled', + meta: { title: 'mobileDropdownMenu 筛选排序组件 - 是否禁用', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/dropdown-menu/item-disabled.md') + }, + { + path: 'dropdown-menu/icon', + meta: { title: 'mobileDropdownMenu 筛选排序组件 - 自定义icon', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/dropdown-menu/icon.md') + }, + { + path: 'dropdown-menu/direction', + meta: { title: 'mobileDropdownMenu 筛选排序组件 - 菜单弹出位置', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/dropdown-menu/direction.md') + }, + { + path: 'dropdown-menu/closeOnClickOverlay', + meta: { title: 'mobileDropdownMenu 筛选排序组件 - 点击遮罩层关闭菜单项', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/dropdown-menu/closeOnClickOverlay.md') + }, + { + path: 'dropdown-menu/closeOnClickOutside', + meta: { title: 'mobileDropdownMenu 筛选排序组件 - 点击外部元素关闭菜单', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/dropdown-menu/closeOnClickOutside.md') + }, + { + path: 'dropdown-menu/slot', + meta: { title: 'mobileDropdownMenu 筛选排序组件 - 插槽', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/dropdown-menu/slot.md') + }, + { + path: 'dropdown-menu/event', + meta: { title: 'mobileDropdownMenu 筛选排序组件 - 事件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/dropdown-menu/event.md') + }, + { + path: 'exception', + meta: { title: 'mobileexception 缺省页组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/mobileexception.md') + }, + { + path: 'exception/message', + meta: { title: 'mobileexception 缺省页组件 - 文本内容', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/exception/message.md') + }, + { + path: 'exception/subMessage', + meta: { title: 'mobileexception 缺省页组件 - 副文本内容', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/exception/subMessage.md') + }, + { + path: 'exception/buttonText', + meta: { title: 'mobileexception 缺省页组件 - 按钮文本', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/exception/buttonText.md') + }, + { + path: 'exception/exceptionClass', + meta: { title: 'mobileexception 缺省页组件 - 类名', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/exception/exceptionClass.md') + }, + { + path: 'action-sheet', + meta: { title: 'actionSheet 上滑列表组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/action-sheet/actionsheet.md') + }, + { + path: 'action-sheet/ellipsis', + meta: { title: 'actionSheet 上滑列表组件 - 内容超出显示省略号', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/action-sheet/ellipsis.md') + }, + { + path: 'action-sheet/slot', + meta: { title: 'actionSheet 上滑列表组件 - 插槽', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/action-sheet/slot.md') + }, + { + path: 'action-sheet/click-item', + meta: { title: 'actionSheet 上滑列表组件 - 点击列表是事件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/action-sheet/clickitem.md') + }, + { + path: 'mini-picker', + meta: { title: 'miniPicker 选择器组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/mini-picker/minipicker.md') + }, + { + path: 'mini-picker/toolbar', + meta: { title: 'miniPicker 选择器组件-插槽', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/mini-picker/toolbar.md') + }, + { + path: 'mini-picker/cascad', + meta: { title: 'miniPicker 选择器组件 - 级联选择', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/mini-picker/cascad.md') + }, + { + path: 'mini-picker/cancel-button-text', + meta: { title: 'miniPicker 选择器组件 - 取消按钮内容', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/mini-picker/cancel-button-text.md') + }, + { + path: 'mini-picker/cancel', + meta: { title: 'miniPicker 选择器组件 - 事件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/mini-picker/cancel.md') + }, + { + path: 'mini-picker/methods', + meta: { title: 'miniPicker 选择器组件 - 方法', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/mini-picker/methods.md') + }, + { + path: 'mini-picker/multicolumn', + meta: { title: 'miniPicker 选择器组件 - 多列选择', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/mini-picker/multicolumn.md') + }, + { + path: 'mini-picker/defaultindex', + meta: { title: 'miniPicker 选择器组件 - 初始值索引', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/mini-picker/defaultindex.md') + }, + { + path: 'mini-picker/visibleitemcount', + meta: { title: 'miniPicker 选择器组件 - 可见选项个数', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/mini-picker/visibleitemcount.md') + }, + { + path: 'mini-picker/itemheight', + meta: { title: 'miniPicker 选择器组件 - 选项高度', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/mini-picker/itemheight.md') + }, + { + path: 'mini-picker', + meta: { title: 'miniPicker 选择器组件 - 选项高度', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/mini-picker/itemheight.md') + }, + { + path: 'mini-picker/change', + meta: { title: 'miniPicker 选择器组件 - change事件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/mini-picker/change.md') + }, + { + path: 'file-upload', + meta: { title: '表单组件-FileUpload 文件上传', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'mobileComp' */ './docs/mobile/file-upload/basic-usage.md') + }, + { + path: 'file-upload/size', + meta: { title: '设置组件的大小,只对使用Tiny的Button组件有效', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'mobileComp' */ './docs/mobile/file-upload/size.md') + }, + { + path: 'file-upload/data', + meta: { title: '设置组件的大小,只对使用Tiny的Button组件有效', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'mobileComp' */ './docs/mobile/file-upload/data.md') + }, + { + path: 'file-upload/only-exist-mobile', + meta: { title: '表单组件-FileUpload 文件上传-可上传的文件类型', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'mobileComp' */ './docs/mobile/file-upload/only-exist-mobile.md') + }, + { + path: 'file-upload/accept-file-type', + meta: { title: '表单组件-FileUpload 文件上传-可上传的文件类型', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'mobileComp' */ './docs/mobile/file-upload/accept-file-type.md') + }, + { + path: 'file-upload/manual-upload', + meta: { title: '表单组件-FileUpload 文件上传-手动上传', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'mobileComp' */ './docs/mobile/file-upload/manual-upload.md') + }, + { + path: 'file-upload/prevent-delete-file', + meta: { title: '表单组件-FileUpload 文件上传-阻止删除文件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'mobileComp' */ './docs/mobile/file-upload/prevent-delete-file.md') + }, + { + path: 'file-upload/prevent-upload-file', + meta: { title: '表单组件-FileUpload 文件上传-阻止上传文件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'mobileComp' */ './docs/mobile/file-upload/prevent-upload-file.md') + }, + { + path: 'file-upload/upload-request', + meta: { title: '表单组件-FileUpload 文件上传-上传请求', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'mobileComp' */ './docs/mobile/file-upload/upload-request.md') + }, + { + path: 'file-upload/upload-file-list', + meta: { title: '表单组件-FileUpload 文件上传-上传的文件列表', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'mobileComp' */ './docs/mobile/file-upload/upload-file-list.md') + }, + { + path: 'file-upload/custom-upload-request', + meta: { title: '表单组件-FileUpload 文件上传-自定义上传请求', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'mobileComp' */ './docs/mobile/file-upload/custom-upload-request.md') + }, + { + path: 'file-upload/upload-limit', + meta: { title: '表单组件-FileUpload 文件上传-最大上传限制', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'mobileComp' */ './docs/mobile/file-upload/upload-limit.md') + }, + { + path: 'file-upload/picture-card', + meta: { title: '表单组件-FileUpload 文件上传-照片墙', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'mobileComp' */ './docs/mobile/file-upload/picture-card.md') + }, + { + path: 'file-upload/file-picture-card', + meta: { title: '表单组件-FileUpload 文件上传-文件缩略图', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'mobileComp' */ './docs/mobile/file-upload/file-picture-card.md') + }, + { + path: 'file-upload/dynamic-disable', + meta: { title: '表单组件-FileUpload 文件上传-文件缩略图', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'mobileComp' */ './docs/mobile/file-upload/dynamic-disable.md') + }, + { + path: 'file-upload/max-file-count', + meta: { title: '表单组件-FileUpload 文件上传-最大上传文件数', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'mobileComp' */ './docs/mobile/file-upload/max-file-count.md') + }, + { + path: 'file-upload/mini-mode', + meta: { title: '表单组件-FileUpload 文件上传-迷你模式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'mobileComp' */ './docs/mobile/file-upload/mini-mode.md') + }, + { + path: 'file-upload/multiple-file', + meta: { title: '表单组件-FileUpload 文件上传-文件多选', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'mobileComp' */ './docs/mobile/file-upload/multiple-file.md') + }, + { + path: 'file-upload/custom-prefix', + meta: { title: '表单组件-FileUpload 文件上传-钩子函数', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'mobileComp' */ './docs/mobile/file-upload/custom-prefix.md') + }, + { + path: 'file-upload/upload-events', + meta: { title: '表单组件-FileUpload 文件上传-事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'mobileComp' */ './docs/mobile/file-upload/upload-events.md') + }, + { + path: 'file-upload/with-credentials', + meta: { title: '表单组件-FileUpload 文件上传-支持发送 cookie 凭证信息', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'mobileComp' */ './docs/mobile/file-upload/with-credentials.md') + }, + { + path: 'file-upload/clear-files', + meta: { title: '表单组件-FileUpload 文件上传-手动清空已上传文件列表', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'mobileComp' */ './docs/mobile/file-upload/clear-files.md') + }, + { + path: 'file-upload/abort-quest', + meta: { title: '表单组件-FileUpload 文件上传-手动取消上传请求', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'mobileComp' */ './docs/mobile/file-upload/abort-quest.md') + }, + { + path: 'file-upload/custom-upload-tip', + meta: { title: '表单组件-FileUpload 文件上传-自定义上传提示', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'mobileComp' */ './docs/mobile/file-upload/custom-upload-tip.md') + }, + { + path: 'file-upload/custom-trigger', + meta: { title: '表单组件-FileUpload 文件上传-自定义触发文件选项框', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'mobileComp' */ './docs/mobile/file-upload/custom-trigger.md') + }, + { + path: 'file-upload/upload-user-head', + meta: { title: '表单组件-FileUpload 文件上传-用户头像上传', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'mobileComp' */ './docs/mobile/file-upload/upload-user-head.md') + }, + { + path: 'file-upload/image-size', + meta: { title: '表单组件-FileUpload 文件上传-用户头像上传', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'mobileComp' */ './docs/mobile/file-upload/image-size.md') + }, + { + path: 'numeric', + meta: { title: 'numeric 计数器组件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/numeric/numeric.md') + }, + { + path: 'numeric/step', + meta: { title: 'numeric 计数器组件 - 步长', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/numeric/step.md') + }, + { + path: 'numeric/circulate', + meta: { title: 'numeric 计数器组件 - 循环', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/numeric/circulate.md') + }, + { + path: 'numeric/max', + meta: { title: 'numeric 计数器组件 - 最大值最小值', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/numeric/max.md') + }, + { + path: 'numeric/size', + meta: { title: 'numeric 计数器组件 - 尺寸', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/numeric/size.md') + }, + { + path: 'numeric/controls', + meta: { title: 'numeric 计数器组件 - 控制按钮', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/numeric/controls.md') + }, + { + path: 'numeric/controlsposition', + meta: { title: 'numeric 计数器组件 - 控制按钮显示位置', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/numeric/controlsposition.md') + }, + { + path: 'numeric/precision', + meta: { title: 'numeric 计数器组件 - 数值精度', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/numeric/precision.md') + }, + { + path: 'numeric/event', + meta: { title: 'numeric 计数器组件 - 事件', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/numeric/event.md') + }, + { + path: 'numeric/automaticprice', + meta: { title: 'numeric 计数器组件 - 根据商品数量自动计算价格。', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/numeric/automaticprice.md') + }, + { + path: 'exception/type', + meta: { title: 'mobileexception 缺省页组件 - 类型', lang: 'zh-CN' }, + component: () => import(/* webpackChunkName: "mobileComp" */ './docs/mobile/exception/type.md') + } +] + +export default router diff --git a/example/src/route.config.comp1.js b/example/src/route.config.comp1.js new file mode 100644 index 000000000..a6516f94c --- /dev/null +++ b/example/src/route.config.comp1.js @@ -0,0 +1,1952 @@ +export default [ + { + path: 'grid/grid-size', + meta: { title: '表格组件-尺寸', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/grid-size.md') + }, + { + path: 'grid/width-height/resize-column-width', + meta: { title: '表格组件-宽高-调整列宽', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/width-height/resize-column-width.md') + }, + { + path: 'grid/width-height/fixed-column-width', + meta: { title: '表格组件-宽高-固定列宽度', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/width-height/fixed-column-width.md') + }, + { + path: 'grid/width-height/adaptive-column-width', + meta: { title: '表格组件-宽高-自适应列宽度', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/width-height/adaptive-column-width.md') + }, + { + path: 'grid/width-height/fixed-grid-height', + meta: { title: '表格组件-宽高-固定表格高度', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/width-height/fixed-grid-height.md') + }, + { + path: 'grid/width-height/adaptive-grid-width-height', + meta: { title: '表格组件-宽高-响应式表格宽高', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/width-height/adaptive-grid-width-height.md') + }, + { + path: 'grid/width-height/auto-height', + meta: { title: '表格组件-宽高-响应式表格宽高', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/width-height/auto-height.md') + }, + { + path: 'grid/width-height/max-min-grid-height', + meta: { title: '表格组件-宽高-最大最小表格高度', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/width-height/max-min-grid-height.md') + }, + { + path: 'grid/width-height/column-min-width', + meta: { title: '表格组件-宽高-列最小宽度', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/width-height/column-min-width.md') + }, + { + path: 'grid/width-height/min-width', + meta: { title: '表格组件-宽高-单列最小宽度', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/width-height/min-width.md') + }, + { + path: 'grid/width-height/column-width', + meta: { title: '表格组件-宽高-总体列宽度', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/width-height/column-width.md') + }, + { + path: 'grid/width-height/recalculate', + meta: { title: '表格组件-宽高-重新计算表格', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/width-height/recalculate.md') + }, + { + path: 'grid/grid-border', + meta: { title: '表格组件-边框', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/grid-border.md') + }, + { + path: 'grid/highlight/highlight-hover-row', + meta: { title: '表格组件-高亮-高亮悬停行', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/highlight/highlight-hover-row.md') + }, + { + path: 'grid/highlight/highlight-current-row', + meta: { title: '表格组件-高亮-高亮当前选中行', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/highlight/highlight-current-row.md') + }, + { + path: 'grid/highlight/highlight-hover-column', + meta: { title: '表格组件-高亮-高亮悬停列', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/highlight/highlight-hover-column.md') + }, + { + path: 'grid/highlight/highlight-current-column', + meta: { title: '表格组件-高亮-高亮当前选中列', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/highlight/highlight-current-column.md') + }, + { + path: 'grid/highlight/highlight-cell', + meta: { title: '表格组件-高亮-高亮编辑中的单元格', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/highlight/highlight-cell.md') + }, + { + path: 'grid/grid-stripe', + meta: { title: '表格组件-斑马线条纹', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/grid-stripe.md') + }, + { + path: 'grid/grid-optimization', + meta: { title: '表格组件-优化配置项', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/grid-optimization.md') + }, + { + path: 'grid/tip/column-header-tip', + meta: { title: '表格组件-Tip 提示-列头提示', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/tip/column-header-tip.md') + }, + { + path: 'grid/tip/cell-tip', + meta: { title: '表格组件-Tip 提示-单元格提示', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/tip/cell-tip.md') + }, + { + path: 'grid/tip/overflow-tip', + meta: { title: '表格组件-Tip 提示-省略提示', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/tip/overflow-tip.md') + }, + { + path: 'grid/align/column-align', + meta: { title: '表格组件-对齐方式-列对齐', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/align/column-align.md') + }, + { + path: 'grid/align/header-align', + meta: { title: '表格组件-对齐方式-表头对齐', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/align/header-align.md') + }, + { + path: 'grid/align/footer-align', + meta: { title: '表格组件-对齐方式-表尾对齐', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/align/footer-align.md') + }, + { + path: 'grid/align/grid-align', + meta: { title: '表格组件-对齐方式-表格对齐', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/align/grid-align.md') + }, + { + path: 'grid/header/hide-grid-header', + meta: { title: '表格组件-表头-隐藏表头', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/header/hide-grid-header.md') + }, + { + path: 'grid/header/slot-header', + meta: { title: '表格组件-表头-自定义表头', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/header/slot-header.md') + }, + { + path: 'grid/header/custom-grid-header', + meta: { title: '表格组件-表头-自定义表头', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/header/custom-grid-header.md') + }, + { + path: 'grid/header/header-class-name', + meta: { title: '表格组件-表头-表头的单元格类名', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/header/header-class-name.md') + }, + { + path: 'grid/footer/footer-summation', + meta: { title: '表格组件-表尾-表尾合计', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/footer/footer-summation.md') + }, + { + path: 'grid/footer/footer-class-name', + meta: { title: '表格组件-表尾-表尾单元格类名', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/footer/footer-class-name.md') + }, + { + path: 'grid/footer/footer-row-or-column-span', + meta: { title: '表格组件-表尾-表尾合并行或列', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/footer/footer-row-or-column-span.md') + }, + { + path: 'grid/custom-style/row-style', + meta: { title: '表格组件-自定义样式-行样式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/custom-style/row-style.md') + }, + { + path: 'grid/custom-style/header-style', + meta: { title: '表格组件-自定义样式-表头样式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/custom-style/header-style.md') + }, + { + path: 'grid/custom-style/footer-style', + meta: { title: '表格组件-自定义样式-表尾样式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/custom-style/footer-style.md') + }, + { + path: 'grid/custom-style/cell-style', + meta: { title: '表格组件-自定义样式-单元格样式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/custom-style/cell-style.md') + }, + { + path: 'grid/sort/default-sort', + meta: { title: '表格组件-排序-默认排序', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/sort/default-sort.md') + }, + { + path: 'grid/sort/combinations-sort', + meta: { title: '表格组件-排序-多字段组合排序', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/sort/combinations-sort.md') + }, + { + path: 'grid/sort/custom-sort', + meta: { title: '表格组件-排序-自定义排序', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/sort/custom-sort.md') + }, + { + path: 'grid/sort/server-sort', + meta: { title: '表格组件-排序-服务端排序', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/sort/server-sort.md') + }, + { + path: 'grid/filter/default-filter', + meta: { title: '表格组件-筛选-默认筛选', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/filter/default-filter.md') + }, + { + path: 'grid/filter/advanced-filter', + meta: { title: '表格组件-筛选-自定义筛选', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/filter/advanced-filter.md') + }, + { + path: 'grid/filter/default-relation', + meta: { title: '表格组件-筛选-输入过滤的默认选项', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/filter/default-relation.md') + }, + { + path: 'grid/filter/custom-filter', + meta: { title: '表格组件-筛选-自定义筛选', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/filter/custom-filter.md') + }, + { + path: 'grid/filter/server-filter', + meta: { title: '表格组件-筛选-服务端筛选', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/filter/server-filter.md') + }, + { + path: 'grid/fixed/left-fixed', + meta: { title: '表格组件-冻结-左侧冻结', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/fixed/left-fixed.md') + }, + { + path: 'grid/fixed/right-fixed', + meta: { title: '表格组件-冻结-右侧冻结', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/fixed/right-fixed.md') + }, + { + path: 'grid/fixed/multi-column-fixed', + meta: { title: '表格组件-冻结-多列冻结', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/fixed/multi-column-fixed.md') + }, + { + path: 'grid/span/row-span', + meta: { title: '表格组件-合并-行合并', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/span/row-span.md') + }, + { + path: 'grid/span/column-span', + meta: { title: '表格组件-合并-列合并', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/span/column-span.md') + }, + { + path: 'grid/row-grouping', + meta: { title: '表格组件-分组', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/row-grouping.md') + }, + { + path: 'grid/summary/custom-summary', + meta: { title: '表格组件-统计-自定义统计', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/summary/custom-summary.md') + }, + { + path: 'grid/summary/configuration-summary', + meta: { title: '表格组件-统计-配置式统计', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/summary/configuration-summary.md') + }, + { + path: 'grid/drag/row-drag', + meta: { title: '表格组件-拖拽-行拖拽', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/drag/row-drag.md') + }, + { + path: 'grid/drag/column-drag', + meta: { title: '表格组件-拖拽-列拖拽', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/drag/column-drag.md') + }, + { + path: 'grid/cascade/normal-column-cascade', + meta: { title: '表格组件-数据级联-正常列级联', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/cascade/normal-column-cascade.md') + }, + { + path: 'grid/cascade/any-parent-cascade', + meta: { title: '表格组件-数据级联-任意父级联', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/cascade/any-parent-cascade.md') + }, + { + path: 'grid/context-menu/header-menu', + meta: { title: '表格组件-右键菜单-表头菜单', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/context-menu/header-menu.md') + }, + { + path: 'grid/context-menu/footer-menu', + meta: { title: '表格组件-右键菜单-表尾菜单', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/context-menu/footer-menu.md') + }, + { + path: 'grid/context-menu/cell-menu', + meta: { title: '表格组件-右键菜单-单元格菜单', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/context-menu/cell-menu.md') + }, + { + path: 'grid/context-menu/menu-permissions', + meta: { title: '表格组件-右键菜单-菜单权限', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/context-menu/menu-permissions.md') + }, + { + path: 'grid/mixin-ui/mixin-aui2', + meta: { title: '表格组件-混用组件库-TINY 2.0', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/mixin-ui/mixin-aui2.md') + }, + { + path: 'grid/mixin-ui/mixin-elementui', + meta: { title: '表格组件-混用组件库-ElementUI', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/mixin-ui/mixin-elementui.md') + }, + { + path: 'grid/editor/inner-editor', + meta: { title: '表格组件-编辑器-内置编辑器', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/editor/inner-editor.md') + }, + { + path: 'grid/editor/custom-editor', + meta: { title: '表格组件-编辑器-自定义编辑器', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/editor/custom-editor.md') + }, + { + path: 'grid/editor/custom-editor-aui3', + meta: { title: '表格组件-编辑器-自定义编辑器', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/editor/custom-editor-aui3.md') + }, + { + path: 'grid/editor/popeditor-in-grid', + meta: { title: '表格组件-编辑器-Popeditor 弹窗编辑', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/editor/popeditor-in-grid.md') + }, + { + path: 'grid/editor/popeditor-events', + meta: { title: '表格组件-渲染器-列异步数据渲染', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/editor/editor-events.md') + }, + { + path: 'grid/editor/custom-editor-mutil', + meta: { title: '表格组件-渲染器-列异步数据渲染', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/editor/mutil-render.md') + }, + { + path: 'grid/renderer/inner-renderer', + meta: { title: '表格组件-渲染器-内置渲染器', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/renderer/inner-renderer.md') + }, + { + path: 'grid/renderer/async-colunm-render', + meta: { title: '表格组件-渲染器-列异步数据渲染', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/renderer/async-colunm-render.md') + }, + { + path: 'grid/renderer/custom-renderer', + meta: { title: '表格组件-渲染器-自定义渲染器', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/renderer/custom-renderer.md') + }, + { + path: 'grid/validation/editing-validation', + meta: { title: '表格组件-表格校验-编辑时校验', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/validation/editing-validation.md') + }, + { + path: 'grid/validation/editing-isvalidalways-validation', + meta: { title: '表格组件-表格校验-隐藏列编辑时校验', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/validation/editing-validation.md') + }, + { + path: 'grid/validation/select-validation', + meta: { title: '表格组件-表格校验-选中时校验', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/validation/select-validation.md') + }, + { + path: 'grid/validation/before-submit-validation', + meta: { title: '表格组件-表格校验-提交前校验', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/validation/before-submit-validation.md') + }, + { + path: 'grid/validation/tipconfig', + meta: { title: '表格组件-表格校验-提示配置', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/validation/valide-tipconfig.md') + }, + { + path: 'grid/event/header-click-event', + meta: { title: '表格组件-事件-表头单击事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/event/header-click-event.md') + }, + { + path: 'grid/event/grid-methods', + meta: { title: '表格组件-方法', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/event/grid-methods.md') + }, + { + path: 'grid/event/header-dblclick-event', + meta: { title: '表格组件-事件-表头双击事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/event/header-dblclick-event.md') + }, + { + path: 'grid/event/cell-click-event', + meta: { title: '表格组件-事件-单元格单击事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/event/cell-click-event.md') + }, + { + path: 'grid/event/cell-dblclick-event', + meta: { title: '表格组件-事件-单元格双击事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/event/cell-dblclick-event.md') + }, + { + path: 'grid/event/cell-mouseenter-event', + meta: { title: '表格组件-事件-单元格鼠标进入事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/event/cell-mouseenter-event.md') + }, + { + path: 'grid/event/cell-mouseleave-event', + meta: { title: '表格组件-事件-单元格鼠标离开事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/event/cell-mouseleave-event.md') + }, + { + path: 'grid/event/grid-scroll-event', + meta: { title: '表格组件-事件-表格滚动事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/event/grid-scroll-event.md') + }, + { + path: 'grid/event/grid-events', + meta: { title: '表格组件-事件-表格的事件对象', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/event/grid-events.md') + }, + { + path: 'grid/event/current-change-event', + meta: { title: '表格组件-事件-选中行事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/event/current-change-event.md') + }, + { + path: 'grid/event/edit-actived-event', + meta: { title: '表格组件-事件-单元格激活编辑事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/event/edit-actived-event.md') + }, + { + path: 'grid/event/edit-closed-event', + meta: { title: '表格组件-事件-单元编辑完成事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/event/edit-closed-event.md') + }, + { + path: 'grid/event/edit-disabled-event', + meta: { title: '表格组件-事件-单元格激活时如果是禁用状态时会触发该事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/event/edit-disabled-event.md') + }, + { + path: 'grid/event/footer-cell-context-menu-event', + meta: { title: '表格组件-事件-右键点击表尾单元格事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/event/footer-cell-context-menu-event.md') + }, + { + path: 'grid/event/header-cell-context-menu-event', + meta: { title: '表格组件-事件-右键点击表头事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/event/header-cell-context-menu-event.md') + }, + { + path: 'grid/event/page-change-event', + meta: { title: '表格组件-事件-分页发生改变事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/event/page-change-event.md') + }, + { + path: 'grid/event/radio-change-event', + meta: { title: '表格组件-事件-勾选行事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/event/radio-change-event.md') + }, + { + path: 'grid/event/resizable-change-event', + meta: { title: '表格组件-事件-列宽改变事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/event/resizable-change-event.md') + }, + { + path: 'grid/event/select-all-event', + meta: { title: '表格组件-事件-全部选中事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/event/select-all-event.md') + }, + { + path: 'grid/event/select-change-event', + meta: { title: '表格组件-事件-勾选行事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/event/select-change-event.md') + }, + { + path: 'grid/event/toggle-expand-change-event', + meta: { title: '表格组件-事件-行展开收起事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/event/toggle-expand-change-event.md') + }, + { + path: 'grid/event/toggle-tree-change-event', + meta: { title: '表格组件-事件-树节点展开收起事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/event/toggle-tree-change-event.md') + }, + { + path: 'grid/event/toolbar-button-click-event', + meta: { title: '表格组件-事件-工具栏点击事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/event/toolbar-button-click-event.md') + }, + { + path: 'grid/event/valid-error-event', + meta: { title: '表格组件-事件-校验不通过事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/event/valid-error-event.md') + }, + { + path: 'grid/slot/default-slot', + meta: { title: '表格组件-插槽-默认插槽', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/slot/default-slot.md') + }, + { + path: 'grid/slot/buttons-slot', + meta: { title: '表格组件-插槽-按钮插槽', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/slot/buttons-slot.md') + }, + { + path: 'grid/slot/empty-slot', + meta: { title: '表格组件-插槽-空数据显示插槽', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/slot/empty-slot.md') + }, + { + path: 'grid/customized/column-width', + meta: { title: '表格组件-个性化-列宽', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/customized/column-width.md') + }, + { + path: 'grid/customized/column-sort', + meta: { title: '表格组件-个性化-列排序', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/customized/column-sort.md') + }, + { + path: 'grid/customized/column-sortable', + meta: { title: '表格组件-个性化-列顺序调整', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/customized/column-sortable.md') + }, + { + path: 'grid/customized/sort-type', + meta: { title: '表格组件-个性化-排序类型', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/customized/sort-type.md') + }, + { + path: 'grid/customized/column-fixed', + meta: { title: '表格组件-个性化-列冻结', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/customized/column-fixed.md') + }, + { + path: 'grid/customized/column-visible-hidden', + meta: { title: '表格组件-个性化-列显示隐藏', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/customized/column-visible-hidden.md') + }, + { + path: 'grid/customized/prsonalized-drag', + meta: { title: '表格组件-个性化-个性化拖拽', lang: 'zh-CN', sign: 'component' }, + name: 'v3-grid-customized-prsonalized-drag', + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/customized/prsonalized-drag.md') + }, + { + path: 'grid/customized/page-size', + meta: { title: '表格组件-个性化-分页条数', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/customized/page-size.md') + }, + { + path: 'grid/customized/local-storage', + meta: { title: '表格组件-个性化-本地存储', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/customized/local-storage.md') + }, + { + path: 'grid/customized/server-storage', + meta: { title: '表格组件-个性化-服务端存储', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/customized/server-storage.md') + }, + { + path: 'grid/tree-grid/tree-grid-base-usage', + meta: { title: '表格组件-树表-基础用法', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/tree-grid/tree-grid-base-usage.md') + }, + { + path: 'grid/tree-grid/tree-grid-operation-column', + meta: { title: '表格组件-树表-操作列', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/tree-grid/tree-grid-operation-column.md') + }, + { + path: 'grid/tree-grid/tree-grid-fixed-column', + meta: { title: '表格组件-树表-冻结列', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/tree-grid/tree-grid-fixed-column.md') + }, + { + path: 'grid/tree-grid/tree-grid-expand', + meta: { title: '表格组件-树表-展开行', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/tree-grid/tree-grid-expand.md') + }, + { + path: 'grid/tree-grid/tree-grid-index', + meta: { title: '表格组件-树表-展开行序号列配置', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/tree-grid/tree-grid-index.md') + }, + { + path: 'grid/tree-grid/tree-grid-expand-config', + meta: { title: '表格组件-树表-展开行配置项', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/tree-grid/tree-grid-expand-config.md') + }, + { + path: 'grid/tree-grid/tree-grid-insert-delete-update', + meta: { title: '表格组件-树表-增删改', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/tree-grid/tree-grid-insert-delete-update.md') + }, + { + path: 'grid/tree-grid/tree-grid-keyboard-operation', + meta: { title: '表格组件-树表-键盘操作', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/tree-grid/tree-grid-keyboard-operation.md') + }, + { + path: 'grid/nested-grid', + meta: { title: '表格组件-嵌套表格', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/nested-grid.md') + }, + { + path: 'grid/import-export/import-grid', + meta: { title: '表格组件-导入导出-导入', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/import-export/import-grid.md') + }, + { + path: 'grid/import-export/export-excel', + meta: { title: '表格组件-导入导出-导出Excel', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/import-export/export-excel.md') + }, + { + path: 'grid/keyboard/keyboard-navigation', + meta: { title: '表格组件-键盘导航', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/keyboard/keyboard-navigation.md') + }, + { + path: 'grid/keyboard/keyboard-config', + meta: { title: '表格组件-按键配置项', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/keyboard/keyboard-config.md') + }, + { + path: 'grid/keyboard/mouse-config', + meta: { title: '表格组件-鼠标配置项', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/keyboard/mouse-config.md') + }, + { + path: 'grid/reverse-column-row', + meta: { title: '表格组件-表格行列反转', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/reverse-column-row.md') + }, + { + path: 'grid/dynamically-columns', + meta: { title: '表格组件-动态生成列', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/dynamically-columns.md') + }, + { + path: 'grid/faq', + meta: { title: '表格组件-常见问题', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-grid' */ './docs/zh-CN/grid/faq.md') + }, + { + path: 'pager', + meta: { title: '数据组件-Pager 分页', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pager' */ './docs/zh-CN/pager/basic-usage.md') + }, + { + path: 'pager/pager-mode', + meta: { title: '数据组件-Pager 分页-显示模式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pager' */ './docs/zh-CN/pager/pager-mode.md') + }, + { + path: 'pager/custom-layout', + meta: { title: '数据组件-Pager 分页-自定义分页布局', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pager' */ './docs/zh-CN/pager/custom-layout.md') + }, + { + path: 'pager/pager-count', + meta: { title: '数据组件-Pager 分页-页码按钮数量', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pager' */ './docs/zh-CN/pager/pager-count.md') + }, + { + path: 'pager/page-size', + meta: { title: '数据组件-Pager 分页-每页显示数量', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pager' */ './docs/zh-CN/pager/page-size.md') + }, + { + path: 'pager/current-page', + meta: { title: '数据组件-Pager 分页-当前页', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pager' */ './docs/zh-CN/pager/current-page.md') + }, + { + path: 'pager/hide-on-single-page', + meta: { title: '数据组件-Pager 分页-只有一页时隐藏分页', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pager' */ './docs/zh-CN/pager/hide-on-single-page.md') + }, + { + path: 'pager/custom-next-prev-text', + meta: { title: '数据组件-Pager 分页-自定义上下页按钮文本', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pager' */ './docs/zh-CN/pager/custom-next-prev-text.md') + }, + { + path: 'pager/page-count', + meta: { title: '数据组件-Pager 分页-总页数', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pager' */ './docs/zh-CN/pager/page-count.md') + }, + { + path: 'pager/pager-events', + meta: { title: '数据组件-Pager 分页-分页事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pager' */ './docs/zh-CN/pager/pager-events.md') + }, + { + path: 'pager/pager-append-to-body', + meta: { title: '数据组件-Pager 分页-下拉框位置', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pager' */ './docs/zh-CN/pager/pager-append-to-body.md') + }, + { + path: 'pager/popper-class', + meta: { title: '数据组件-Pager 分页-自定义下拉框类名', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pager' */ './docs/zh-CN/pager/popper-class.md') + }, + { + path: 'pager/pager-in-grid', + meta: { title: '数据组件-Pager 分页-Grid 表格分页', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-pager' */ './docs/zh-CN/pager/pager-in-grid.md') + }, + { + path: 'badge', + meta: { title: '提示组件-Badge 标记', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-badge' */ './docs/zh-CN/badge/basic-usage.md') + }, + { + path: 'badge/badge-style', + meta: { title: '提示组件-Badge 标记-主题样式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-badge' */ './docs/zh-CN/badge/badge-style.md') + }, + { + path: 'badge/is-dot', + meta: { title: '提示组件-Badge 标记-小圆点标记', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-badge' */ './docs/zh-CN/badge/is-dot.md') + }, + { + path: 'badge/max-num', + meta: { title: '提示组件-Badge 标记-计数最大值', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-badge' */ './docs/zh-CN/badge/max-num.md') + }, + { + path: 'badge/href-target', + meta: { title: '提示组件-Badge 标记-跳转链接', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-badge' */ './docs/zh-CN/badge/href-target.md') + }, + { + path: 'badge/custom-badge-target', + meta: { title: '提示组件-Badge 标记-自定义标记目标', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-badge' */ './docs/zh-CN/badge/custom-badge-target.md') + }, + { + path: 'badge/custom-tip-text', + meta: { title: '提示组件-Badge 标记-自定义提示内容', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-badge' */ './docs/zh-CN/badge/custom-tip-text.md') + }, + { + path: 'badge/hidden-badge-while-read-message', + meta: { title: '提示组件-Badge 标记-消息已读动态隐藏标记', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-badge' */ './docs/zh-CN/badge/hidden-badge-while-read-message.md') + }, + { + path: 'loading', + meta: { title: '提示组件-Loading 加载', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-loading' */ './docs/zh-CN/loading/basic-usage.md') + }, + { + path: 'loading/loading-tip-text', + meta: { title: '提示组件-Loading 加载-自定义加载提示文本', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-loading' */ './docs/zh-CN/loading/loading-tip-text.md') + }, + { + path: 'loading/custom-background', + meta: { title: '提示组件-Loading 加载-自定义遮罩背景色', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-loading' */ './docs/zh-CN/loading/custom-background.md') + }, + { + path: 'loading/custom-class', + meta: { title: '提示组件-Loading 加载-自定义样式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-loading' */ './docs/zh-CN/loading/custom-class.md') + }, + { + path: 'loading/body-lock', + meta: { title: '提示组件-Loading 加载-修饰符', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-loading' */ './docs/zh-CN/loading/body-lock.md') + }, + { + path: 'loading/fullscreen-loading', + meta: { title: '提示组件-Loading 加载-全局加载', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-loading' */ './docs/zh-CN/loading/fullscreen-loading.md') + }, + { + path: 'loading/custom-spinner', + meta: { title: '提示组件-Loading 加载-自定义加载图标', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-loading' */ './docs/zh-CN/loading/custom-spinner.md') + }, + { + path: 'loading/custom-loading-target', + meta: { title: '提示组件-Loading 加载-区域加载', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-loading' */ './docs/zh-CN/loading/custom-loading-target.md') + }, + { + path: 'tooltip', + meta: { title: '提示组件-Tooltip 文字提示', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tooltip' */ './docs/zh-CN/tooltip/basic-usage.md') + }, + { + path: 'tooltip/custom-transition', + meta: { title: '提示组件-Tooltip 文字提示-自定义渐变动画', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tooltip' */ './docs/zh-CN/tooltip/custom-transition.md') + }, + { + path: 'tooltip/dynamic-disable', + meta: { title: '提示组件-Tooltip 文字提示-禁用', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tooltip' */ './docs/zh-CN/tooltip/dynamic-disable.md') + }, + { + path: 'tooltip/manual-control-tip', + meta: { title: '提示组件-Tooltip 文字提示-手动控制', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tooltip' */ './docs/zh-CN/tooltip/manual-control-tip.md') + }, + { + path: 'tooltip/tooltip-theme', + meta: { title: '提示组件-Tooltip 文字提示-主题', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tooltip' */ './docs/zh-CN/tooltip/tooltip-theme.md') + }, + { + path: 'tooltip/tooltip-hide-delay', + meta: { title: '提示组件-Tooltip 文字提示-自动隐藏和延迟时间', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tooltip' */ './docs/zh-CN/tooltip/tooltip-hide-delay.md') + }, + { + path: 'tooltip/tooltip-offset', + meta: { title: '提示组件-Tooltip 文字提示-偏移量', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tooltip' */ './docs/zh-CN/tooltip/tooltip-offset.md') + }, + { + path: 'tooltip/tooltip-enterable', + meta: { title: '提示组件-Tooltip 文字提示-鼠标是否可进入', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tooltip' */ './docs/zh-CN/tooltip/tooltip-enterable.md') + }, + { + path: 'tooltip/tooltip-visible-arrow', + meta: { title: '提示组件-Tooltip 文字提示-是否显示箭头', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tooltip' */ './docs/zh-CN/tooltip/tooltip-visible-arrow.md') + }, + { + path: 'tooltip/tooltip-popper-class', + meta: { title: '提示组件-Tooltip 文字提示-添加样式类名', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tooltip' */ './docs/zh-CN/tooltip/tooltip-popper-class.md') + }, + { + path: 'tooltip/tooltip-content', + meta: { title: '提示组件-Tooltip 文字提示-插槽的使用', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tooltip' */ './docs/zh-CN/tooltip/tooltip-content.md') + }, + { + path: 'tooltip/tooltip-popper-options', + meta: { title: '提示组件-Tooltip 文字提示-popper配置', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tooltip' */ './docs/zh-CN/tooltip/tooltip-popper-options.md') + }, + { + path: 'tooltip/tabindex', + meta: { title: '提示组件-Tooltip 文字提示-tabindex配置', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tooltip' */ './docs/zh-CN/tooltip/tabindex.md') + }, + { + path: 'modal', + meta: { title: '提示组件-Modal 模态框组件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-modal' */ './docs/zh-CN/modal/basic-usage.md') + }, + { + path: 'modal/modal-fullscreen', + meta: { title: '模态框组件-最大化显示', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-modal' */ './docs/zh-CN/modal/modal-fullscreen.md') + }, + { + path: 'modal/modal-esc-closable', + meta: { title: '模态框组件-按 Esc 键关闭窗口', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-modal' */ './docs/zh-CN/modal/modal-esc-closable.md') + }, + { + path: 'modal/modal-duration', + meta: { title: '模态框组件-自动关闭延时', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-modal' */ './docs/zh-CN/modal/modal-duration.md') + }, + { + path: 'modal/modal-id', + meta: { title: '模态框组件-防止重复提示', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-modal' */ './docs/zh-CN/modal/modal-id.md') + }, + { + path: 'modal/modal-lock-scroll', + meta: { title: '模态框组件-锁住滚动条', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-modal' */ './docs/zh-CN/modal/modal-lock-scroll.md') + }, + { + path: 'modal/modal-lock-view', + meta: { title: '模态框组件-锁住页面', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-modal' */ './docs/zh-CN/modal/modal-lock-view.md') + }, + { + path: 'modal/modal-mask', + meta: { title: '模态框组件-显示遮罩层', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-modal' */ './docs/zh-CN/modal/modal-mask.md') + }, + { + path: 'modal/modal-mask-closable', + meta: { title: '模态框组件-点击遮罩层关闭窗口', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-modal' */ './docs/zh-CN/modal/modal-mask-closable.md') + }, + { + path: 'modal/modal-message', + meta: { title: '模态框组件-自定义内容', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-modal' */ './docs/zh-CN/modal/modal-message.md') + }, + { + path: 'modal/modal-resize', + meta: { title: '模态框组件-拖动调整窗口大小', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-modal' */ './docs/zh-CN/modal/modal-resize.md') + }, + { + path: 'modal/modal-showHeader', + meta: { title: '模态框组件-不显示头部', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-modal' */ './docs/zh-CN/modal/modal-showHeader.md') + }, + { + path: 'modal/modal-showFooter', + meta: { title: '模态框组件-不显示底部', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-modal' */ './docs/zh-CN/modal/modal-showFooter.md') + }, + { + path: 'modal/modal-status', + meta: { title: '模态框组件-消息状态', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-modal' */ './docs/zh-CN/modal/modal-status.md') + }, + { + path: 'modal/modal-title', + meta: { title: '模态框组件-标题', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-modal' */ './docs/zh-CN/modal/modal-title.md') + }, + { + path: 'modal/modal-top', + meta: { title: '模态框组件-距离顶部的位置', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-modal' */ './docs/zh-CN/modal/modal-top.md') + }, + { + path: 'modal/modal-type', + meta: { title: '模态框组件-窗口类型', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-modal' */ './docs/zh-CN/modal/modal-type.md') + }, + { + path: 'modal/modal-value', + meta: { title: '模态框组件-绑定值', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-modal' */ './docs/zh-CN/modal/modal-value.md') + }, + { + path: 'modal/modal-zIndex', + meta: { title: '模态框组件-自定义堆叠顺序', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-modal' */ './docs/zh-CN/modal/modal-zIndex.md') + }, + { + path: 'modal/modal-event', + meta: { title: '模态框组件-事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-modal' */ './docs/zh-CN/modal/modal-event.md') + }, + { + path: 'modal/modal-slots', + meta: { title: '模态框组件-插槽', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-modal' */ './docs/zh-CN/modal/modal-slots.md') + }, + { + path: 'notify', + meta: { + title: '提示组件-Notify 通知组件', + lang: 'zh-CN', + sign: 'component' + }, + component: () => import(/* webpackChunkName: 'v3-notify' */ './docs/zh-CN/notify/basic-usage.md') + }, + { + path: 'modal/is-form-reset', + meta: { title: '模态框组件-弹出表单', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-modal' */ './docs/zh-CN/modal/is-form-reset.md') + }, + { + path: 'bulletin-board', + meta: { title: '其他组件-BulletinBoard 公告牌', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-bulletin-board' */ './docs/zh-CN/bulletin-board/basic-usage.md') + }, + { + path: 'bulletin-board/bulletin-board-title', + meta: { title: '其他组件-BulletinBoard 公告牌-公告牌标题', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-bulletin-board' */ './docs/zh-CN/bulletin-board/bulletin-board-title.md') + }, + { + path: 'bulletin-board/default-active-tab', + meta: { title: '其他组件-BulletinBoard 公告牌-默认激活的选项卡', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-bulletin-board' */ './docs/zh-CN/bulletin-board/default-active-tab.md') + }, + { + path: 'bulletin-board/custom-tab-title', + meta: { title: '其他组件-BulletinBoard 公告牌-选项卡标题', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-bulletin-board' */ './docs/zh-CN/bulletin-board/custom-tab-title.md') + }, + { + path: 'bulletin-board/base-on-url', + meta: { title: '其他组件-BulletinBoard 公告牌-基于Url的跳转', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-bulletin-board' */ './docs/zh-CN/bulletin-board/base-on-url.md') + }, + { + path: 'bulletin-board/base-on-route', + meta: { title: '其他组件-BulletinBoard 公告牌-基于Route的跳转', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-bulletin-board' */ './docs/zh-CN/bulletin-board/base-on-route.md') + }, + { + path: 'bulletin-board/show-more-link', + meta: { title: '其他组件-BulletinBoard 公告牌-显示 “更多” 链接', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-bulletin-board' */ './docs/zh-CN/bulletin-board/show-more-link.md') + }, + { + path: 'bulletin-board/custom-new-bulletin-icon', + meta: { title: '其他组件-BulletinBoard 公告牌-自定义新公告前缀', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-bulletin-board' */ './docs/zh-CN/bulletin-board/custom-new-bulletin-icon.md') + }, + { + path: 'calendar', + meta: { title: '其他组件-Calendar 日历', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-calendar' */ './docs/zh-CN/calendar/basic-usage.md') + }, + { + path: 'calendar/calendar-mode', + meta: { title: '其他组件-Calendar 日历-显示模式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-calendar' */ './docs/zh-CN/calendar/calendar-mode.md') + }, + { + path: 'calendar/show-selected-date', + meta: { title: '其他组件-Calendar 日历-显示选中日期', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-calendar' */ './docs/zh-CN/calendar/show-selected-date.md') + }, + { + path: 'calendar/custom-day-cell', + meta: { title: '其他组件-Calendar 日历-自定义日期单元格', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-calendar' */ './docs/zh-CN/calendar/custom-day-cell.md') + }, + { + path: 'calendar/custom-calendar-toolbar', + meta: { title: '其他组件-Calendar 日历-自定义工具栏', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-calendar' */ './docs/zh-CN/calendar/custom-calendar-toolbar.md') + }, + { + path: 'calendar/dynamic-add-schedule', + meta: { title: '其他组件-Calendar 日历-添加日程事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-calendar' */ './docs/zh-CN/calendar/dynamic-add-schedule.md') + }, + { + path: 'detail-page', + meta: { title: '其他组件-DetailPage 表头详情栏', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-detail-page' */ './docs/zh-CN/detail-page/basic-usage.md') + }, + { + path: 'detail-page/custom-show-text', + meta: { title: '其他组件-DetailPage 表头详情栏-自定义展示文本', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-detail-page' */ './docs/zh-CN/detail-page/custom-show-text.md') + }, + { + path: 'image', + meta: { title: '其他组件-Image 图片预览', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-image' */ './docs/zh-CN/image/basic-usage.md') + }, + { + path: 'image/auto-fit-container-size', + meta: { title: '其他组件-Image 图片预览-自适应容器尺寸', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-image' */ './docs/zh-CN/image/auto-fit-container-size.md') + }, + { + path: 'image/custom-placeholder', + meta: { title: '其他组件-Image 图片预览-自定义占位内容', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-image' */ './docs/zh-CN/image/custom-placeholder.md') + }, + { + path: 'image/lazy-load', + meta: { title: '其他组件-Image 图片预览-懒加载', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-image' */ './docs/zh-CN/image/lazy-load.md') + }, + { + path: 'image/preview-src-list', + meta: { title: '其他组件-Image 图片预览-开启预览大图', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-image' */ './docs/zh-CN/image/preview-src-list.md') + }, + { + path: 'image/preview-z-index', + meta: { title: '其他组件-Image 图片预览-图片预览层级', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-image' */ './docs/zh-CN/image/preview-z-index.md') + }, + { + path: 'image/load-event', + meta: { title: '其他组件-Image 图片预览-加载事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-image' */ './docs/zh-CN/image/load-event.md') + }, + { + path: 'image/custom-load-failed-text', + meta: { title: '其他组件-Image 图片预览-自定义图片加载失败时内容', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-image' */ './docs/zh-CN/image/custom-load-failed-text.md') + }, + { + path: 'image/preview-in-dialog', + meta: { title: '其他组件-Image 图片预览-对话框中进行图片预览', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-image' */ './docs/zh-CN/image/preview-in-dialog.md') + }, + { + path: 'rate', + meta: { title: '其他组件-Rate 评分', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-rate' */ './docs/zh-CN/rate/basic-usage.md') + }, + { + path: 'rate/custom-3-threshold-colors', + meta: { title: '其他组件-Rate 评分-自定义 3 分段颜色', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-rate' */ './docs/zh-CN/rate/custom-3-threshold-colors.md') + }, + { + path: 'rate/disabled-not-selected-style', + meta: { title: '其他组件-Rate 评分-自定义禁用时未选中图标颜色及样式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-rate' */ './docs/zh-CN/rate/disabled-not-selected-style.md') + }, + { + path: 'rate/custom-3-threshold-icon', + meta: { title: '其他组件-Rate 评分-自定义 3 分段图标样式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-rate' */ './docs/zh-CN/rate/custom-3-threshold-icon.md') + }, + { + path: 'rate/texts-and-text-color', + meta: { title: '其他组件-Rate 评分-辅助文字及颜色', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-rate' */ './docs/zh-CN/rate/texts-and-text-color.md') + }, + { + path: 'rate/size-and-space', + meta: { title: '其他组件-Rate 评分-大小及占位宽度', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-rate' */ './docs/zh-CN/rate/size-and-space.md') + }, + { + path: 'rate/not-selected-style', + meta: { title: '其他组件-Rate 评分-自定义未选中图标颜色及样式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-rate' */ './docs/zh-CN/rate/not-selected-style.md') + }, + { + path: 'rate/text-on-bottom', + meta: { title: '其他组件-Rate 评分-图标下文字提示', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-rate' */ './docs/zh-CN/rate/text-on-bottom.md') + }, + { + path: 'rate/allow-half', + meta: { title: '其他组件-Rate 评分-半选', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-rate' */ './docs/zh-CN/rate/allow-half.md') + }, + { + path: 'rate/dynamic-disable', + meta: { title: '其他组件-Rate 评分-禁用', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-rate' */ './docs/zh-CN/rate/dynamic-disable.md') + }, + { + path: 'rate/show-score', + meta: { title: '其他组件-Rate 评分-分数显示', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-rate' */ './docs/zh-CN/rate/show-score.md') + }, + { + path: 'rate/radio-rate', + meta: { title: '其他组件-Rate 评分-单选模式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-rate' */ './docs/zh-CN/rate/radio-rate.md') + }, + { + path: 'rate/max-score', + meta: { title: '其他组件-Rate 评分-最大分值', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-rate' */ './docs/zh-CN/rate/max-score.md') + }, + { + path: 'rate/threshold-value', + meta: { title: '其他组件-Rate 评分-界限值', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-rate' */ './docs/zh-CN/rate/threshold-value.md') + }, + { + path: 'rate/rate-events', + meta: { title: '其他组件-Rate 评分-事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-rate' */ './docs/zh-CN/rate/rate-events.md') + }, + { + path: 'scroll-text', + meta: { title: '其他组件-ScrollText 文字滚动', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-scroll-text' */ './docs/zh-CN/scroll-text/basic-usage.md') + }, + { + path: 'scroll-text/scroll-direction', + meta: { title: '其他组件-ScrollText 文字滚动-文本滚动方向', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-scroll-text' */ './docs/zh-CN/scroll-text/scroll-direction.md') + }, + { + path: 'scroll-text/hover-stop', + meta: { title: '其他组件-ScrollText 文字滚动-鼠标悬停时文本停止滚动', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-scroll-text' */ './docs/zh-CN/scroll-text/hover-stop.md') + }, + { + path: 'scroll-text/custom-scroll-text', + meta: { title: '其他组件-ScrollText 文字滚动-自定义文本内容', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-scroll-text' */ './docs/zh-CN/scroll-text/custom-scroll-text.md') + }, + { + path: 'scroll-text/scroll-time', + meta: { title: '其他组件-ScrollText 文字滚动-滚动时间间隔', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-scroll-text' */ './docs/zh-CN/scroll-text/scroll-time.md') + }, + { + path: 'scroll-text/custom-text-style', + meta: { title: '其他组件-ScrollText 文字滚动-自定义文本样式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-scroll-text' */ './docs/zh-CN/scroll-text/custom-text-style.md') + }, + { + path: 'tag', + meta: { title: '其他组件-Tag 标签', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tag' */ './docs/zh-CN/tag/basic-usage.md') + }, + { + path: 'tag/color-border', + meta: { title: '其他组件-Tag 标签-颜色和边框', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tag' */ './docs/zh-CN/tag/color-border.md') + }, + { + path: 'tag/tag-size', + meta: { title: '其他组件-Tag 标签-尺寸', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tag' */ './docs/zh-CN/tag/tag-size.md') + }, + { + path: 'tag/create-and-close', + meta: { title: '其他组件-Tag 标签-增删', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tag' */ './docs/zh-CN/tag/create-and-close.md') + }, + { + path: 'tag/tag-effect', + meta: { title: '其他组件-Tag 标签-主题', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tag' */ './docs/zh-CN/tag/tag-effect.md') + }, + { + path: 'tag/tag-events', + meta: { title: '其他组件-Tag 标签-事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tag' */ './docs/zh-CN/tag/tag-events.md') + }, + { + path: 'textpopup', + meta: { title: '其他组件-TextPopup 输入框', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tag' */ './docs/zh-CN/textpopup/basic-usage.md') + }, + { + path: 'textpopup/textpopup-placeholder', + meta: { title: '其他组件-TextPopup 输入框-提示占位文本', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tag' */ './docs/zh-CN/textpopup/textpopup-placeholder.md') + }, + { + path: 'textpopup/textpopup-readonly', + meta: { title: '其他组件-TextPopup 输入框-只读', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tag' */ './docs/zh-CN/textpopup/textpopup-readonly.md') + }, + { + path: 'textpopup/textpopup-separtor', + meta: { title: '其他组件-TextPopup 输入框-分隔符', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tag' */ './docs/zh-CN/textpopup/textpopup-separtor.md') + }, + { + path: 'textpopup/textpopup-value', + meta: { title: '其他组件-TextPopup 输入框-绑定值', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tag' */ './docs/zh-CN/textpopup/textpopup-value.md') + }, + { + path: 'textpopup/textpopup-width', + meta: { title: '其他组件-TextPopup 输入框-宽度', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tag' */ './docs/zh-CN/textpopup/textpopup-width.md') + }, + { + path: 'user-contact', + meta: { title: '其他组件-UserContact 联系人', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-user-contact' */ './docs/zh-CN/user-contact/basic-usage.md') + }, + { + path: 'user-contact/data-source', + meta: { title: '其他组件-UserContact 联系人-数据源', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-user-contact' */ './docs/zh-CN/user-contact/data-source.md') + }, + { + path: 'user-contact/slots-usercontact', + meta: { title: '其他组件-UserContact 联系人-默认插槽', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-user-contact' */ './docs/zh-CN/user-contact/slots-usercontact.md') + }, + { + path: 'user-contact/not-displayed-content', + meta: { title: '其他组件-UserContact 联系人-定制弹框不显示的内容', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-user-contact' */ './docs/zh-CN/user-contact/not-displayed-content.md') + }, + { + path: 'user-head', + meta: { title: '其他组件-UserHead 用户头像', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-user-head' */ './docs/zh-CN/user-head/basic-usage.md') + }, + { + path: 'user-head/min-user-head', + meta: { title: '其他组件-UserHead 用户头像-小头像', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-user-head' */ './docs/zh-CN/user-head/min-user-head.md') + }, + { + path: 'user-head/round-user-head', + meta: { title: '其他组件-UserHead 用户头像-圆形头像', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-user-head' */ './docs/zh-CN/user-head/round-user-head.md') + }, + { + path: 'user-head/label-user-head', + meta: { title: '其他组件-UserHead 用户头像-文字头像', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-user-head' */ './docs/zh-CN/user-head/label-user-head.md') + }, + { + path: 'user-head/icon-user-head', + meta: { title: '其他组件-UserHead 用户头像-图标头像', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-user-head' */ './docs/zh-CN/user-head/icon-user-head.md') + }, + { + path: 'user-head/image-user-head', + meta: { title: '其他组件-UserHead 用户头像-图片头像', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-user-head' */ './docs/zh-CN/user-head/image-user-head.md') + }, + { + path: 'user-head/message-count', + meta: { title: '其他组件-UserHead 用户头像-消息计数', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-user-head' */ './docs/zh-CN/user-head/message-count.md') + }, + { + path: 'user-head/custom-color', + meta: { title: '其他组件-UserHead 用户头像-自定义颜色', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-user-head' */ './docs/zh-CN/user-head/custom-color.md') + }, + { + path: 'user-head/custom-background-color', + meta: { title: '其他组件-UserHead 用户头像-自定义背景颜色', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-user-head' */ './docs/zh-CN/user-head/custom-background-color.md') + }, + { + path: 'user-head/custom-user-head-content', + meta: { title: '其他组件-UserHead 用户头像-自定义图像内容', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-user-head' */ './docs/zh-CN/user-head/custom-user-head-content.md') + }, + { + path: 'user-head/render-user-head-in-grid', + meta: { title: '其他组件-UserHead 用户头像-Grid单元格展示头像', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-user-head' */ './docs/zh-CN/user-head/render-user-head-in-grid.md') + }, + { + path: 'color', + meta: { title: '框架风格-Color 色彩', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-color' */ './docs/zh-CN/color.md') + }, + { + path: 'container', + meta: { title: '框架风格-Container 版型', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-container' */ './docs/zh-CN/container.md') + }, + { + path: 'font', + meta: { title: '框架风格-Font 字体', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-font' */ './docs/zh-CN/font.md') + }, + { + path: 'icon', + meta: { title: '框架风格-Icon 图标', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-icon' */ './docs/zh-CN/icon.md') + }, + { + path: 'layout', + meta: { title: '框架风格-Layout 布局', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-layout' */ './docs/zh-CN/layout.md') + }, + { + path: 'layout/row', + meta: { title: '框架风格-Layout 布局-Row 行配置', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-layout' */ './docs/zh-CN/layout/row.md') + }, + { + path: 'layout/col', + meta: { title: '框架风格-Layout 布局-Col 列配置', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-layout' */ './docs/zh-CN/layout/col.md') + }, + { + path: 'milestone', + meta: { title: '导航组件-Milestone 里程碑', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-milestone' */ './docs/zh-CN/milestone/basic-usage.md') + }, + { + path: 'milestone/data-source', + meta: { title: '导航组件-Milestone 里程碑-数据源', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-milestone' */ './docs/zh-CN/milestone/data-source.md') + }, + { + path: 'milestone/data-field-mapping', + meta: { title: '导航组件-Milestone 里程碑-数据字段映射', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-milestone' */ './docs/zh-CN/milestone/data-field-mapping.md') + }, + { + path: 'milestone/flag-before', + meta: { title: '导航组件-Milestone 里程碑-旗帜数据来源前面节点', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-milestone' */ './docs/zh-CN/milestone/flag-before.md') + }, + { + path: 'milestone/line-style', + meta: { title: '导航组件-Milestone 里程碑-进度条颜色', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-milestone' */ './docs/zh-CN/milestone/line-style.md') + }, + { + path: 'milestone/milestones-status', + meta: { title: '导航组件-Milestone 里程碑-状态与颜色对应关系', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-milestone' */ './docs/zh-CN/milestone/milestones-status.md') + }, + { + path: 'milestone/show-number', + meta: { title: '导航组件-Milestone 里程碑-取消未完成状态序号显示', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-milestone' */ './docs/zh-CN/milestone/show-number.md') + }, + { + path: 'milestone/solid-style', + meta: { title: '导航组件-Milestone 里程碑-已完成节点实心显示', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-milestone' */ './docs/zh-CN/milestone/solid-style.md') + }, + { + path: 'milestone/milestone-space', + meta: { title: '导航组件-Milestone 里程碑-宽度', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-milestone' */ './docs/zh-CN/milestone/milestone-space.md') + }, + { + path: 'milestone/start-index', + meta: { title: '导航组件-Milestone 里程碑-序号起始值', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-milestone' */ './docs/zh-CN/milestone/start-index.md') + }, + { + path: 'milestone/custom-icon-slot', + meta: { title: '导航组件-Milestone 里程碑-自定义图标插槽', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-milestone' */ './docs/zh-CN/milestone/custom-icon-slot.md') + }, + { + path: 'milestone/custom-bottom', + meta: { title: '导航组件-Milestone 里程碑-自定义节点下方内容', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-milestone' */ './docs/zh-CN/milestone/custom-bottom.md') + }, + { + path: 'milestone/custom-top', + meta: { title: '导航组件-Milestone 里程碑-自定义节点上方内容', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-milestone' */ './docs/zh-CN/milestone/custom-top.md') + }, + { + path: 'milestone/custom-flag', + meta: { title: '导航组件-Milestone 里程碑-自定义旗帜内容', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-milestone' */ './docs/zh-CN/milestone/custom-flag.md') + }, + { + path: 'milestone/milestone-events', + meta: { title: '导航组件-Milestone 里程碑-事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-milestone' */ './docs/zh-CN/milestone/milestone-events.md') + }, + { + path: 'tree-menu', + meta: { title: '导航组件-TreeMenu 树型菜单', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree-menu' */ './docs/zh-CN/tree-menu/basic-usage.md') + }, + { + path: 'tree-menu/data-resource', + meta: { title: '导航组件-TreeMenu 树型菜单-数据源', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree-menu' */ './docs/zh-CN/tree-menu/data-resource.md') + }, + { + path: 'tree-menu/accordion', + meta: { title: '导航组件-TreeMenu 树型菜单-手风琴', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree-menu' */ './docs/zh-CN/tree-menu/accordion.md') + }, + { + path: 'tree-menu/check-strictly', + meta: { title: '导航组件-TreeMenu 父子级不相关联', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree-menu' */ './docs/zh-CN/tree-menu/check-strictly.md') + }, + { + path: 'tree-menu/lazy-load', + meta: { title: '导航组件-TreeMenu 懒加载子节点', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree-menu' */ './docs/zh-CN/tree-menu/lazy-load.md') + }, + { + path: 'tree-menu/default-expanded-keys', + meta: { title: '导航组件-TreeMenu 默认展开单节点', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree-menu' */ './docs/zh-CN/tree-menu/default-expanded-keys.md') + }, + { + path: 'tree-menu/text-ellipsis', + meta: { title: '导航组件-TreeMenu 文字超长省略显示', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree-menu' */ './docs/zh-CN/tree-menu/text-ellipsis.md') + }, + { + path: 'tree-menu/show-checkbox', + meta: { title: '导航组件-TreeMenu 节点是否可被选择', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree-menu' */ './docs/zh-CN/tree-menu/show-checkbox.md') + }, + { + path: 'tree-menu/search-icon', + meta: { title: '导航组件-TreeMenu 自定义搜索图标', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree-menu' */ './docs/zh-CN/tree-menu/search-icon.md') + }, + { + path: 'tree-menu/text-wrap', + meta: { title: '导航组件-TreeMenu 文字超长省略显示', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree-menu' */ './docs/zh-CN/tree-menu/text-wrap.md') + }, + { + path: 'tree-menu/tree-menu-event', + meta: { title: '导航组件-TreeMenu 文字超长省略显示', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree-menu' */ './docs/zh-CN/tree-menu/tree-menu-event.md') + }, + { + path: 'tree-menu/filter-node-method', + meta: { title: '导航组件-filter-node-method 搜索规则配置', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree-menu' */ './docs/zh-CN/tree-menu/filter-node-method.md') + }, + { + path: 'tree-menu/tree-menu-slot', + meta: { title: '导航组件-TreeMenu 插槽', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree-menu' */ './docs/zh-CN/tree-menu/tree-menu-slot.md') + }, + { + path: 'tree-menu/empty-text', + meta: { title: '导航组件-TreeMenu 自定义空数据文本', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree-menu' */ './docs/zh-CN/tree-menu/empty-text.md') + }, + { + path: 'tree-menu/default-expand-all', + meta: { title: '导航组件-TreeMenu 默认展开全部菜单', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree-menu' */ './docs/zh-CN/tree-menu/default-expand-all.md') + }, + { + path: 'tree-menu/can-draggable', + meta: { title: '导航组件-TreeMenu 拖动菜单', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree-menu' */ './docs/zh-CN/tree-menu/can-draggable.md') + }, + { + path: 'tree-menu/expand-on-click-node', + meta: { title: '导航组件-TreeMenu 点击文字展开菜单', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree-menu' */ './docs/zh-CN/tree-menu/expand-on-click-node.md') + }, + { + path: 'tree-menu/tree-menu-indent', + meta: { title: '导航组件-TreeMenu 水平缩进', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree-menu' */ './docs/zh-CN/tree-menu/tree-menu-indent.md') + }, + { + path: 'wizard', + meta: { title: '导航组件-Wizard 流程图', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-wizard' */ './docs/zh-CN/wizard/basic-usage.md') + }, + { + path: 'wizard/page-guide', + meta: { title: '导航组件-Wizard 流程图', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-wizard' */ './docs/zh-CN/wizard/page-guide.md') + }, + { + path: 'wizard/vertical', + meta: { title: '导航组件-Wizard 流程图', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-wizard' */ './docs/zh-CN/wizard/vertical.md') + }, + { + path: 'wizard/time-line-flow', + meta: { title: '导航组件-Wizard 流程图', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-wizard' */ './docs/zh-CN/wizard/time-line-flow.md') + }, + { + path: 'wizard/slot', + meta: { title: '导航组件-Wizard 流程图', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-wizard' */ './docs/zh-CN/wizard/slot.md') + }, + { + path: 'collapse', + meta: { title: '容器组件-Collapse 折叠面板', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-collapse' */ './docs/zh-CN/collapse/basic-usage.md') + }, + { + path: 'collapse/accordion', + meta: { title: '容器组件-Collapse 折叠面板-手风琴效果', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-collapse' */ './docs/zh-CN/collapse/accordion.md') + }, + { + path: 'collapse/dynamic-disable', + meta: { title: '容器组件-Collapse 折叠面板-禁用状态', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-collapse' */ './docs/zh-CN/collapse/dynamic-disable.md') + }, + { + path: 'collapse/block-close', + meta: { title: '容器组件-Collapse 折叠面板-阻止折叠面板关闭', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-collapse' */ './docs/zh-CN/collapse/block-close.md') + }, + { + path: 'collapse/custom-collapse-title', + meta: { title: '容器组件-Collapse 折叠面板-自定义面板标题', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-collapse' */ './docs/zh-CN/collapse/custom-collapse-title.md') + }, + { + path: 'collapse/collapse-events', + meta: { title: '容器组件-Collapse 折叠面板-折叠面板事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-collapse' */ './docs/zh-CN/collapse/collapse-events.md') + }, + { + path: 'collapse/nested-grid', + meta: { title: '容器组件-Collapse 折叠面板-嵌套表格', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-collapse' */ './docs/zh-CN/collapse/nested-grid.md') + }, + { + path: 'collapse/nested-form', + meta: { title: '容器组件-Collapse 折叠面板-嵌套表单', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-collapse' */ './docs/zh-CN/collapse/nested-form.md') + }, + { + path: 'button-group', + meta: { title: '表单组件-ButtonGroup 按钮组', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-button-group' */ './docs/zh-CN/button-group/basic-usage.md') + }, + { + path: 'button-group/button-group-data', + meta: { title: '表单组件-ButtonGroup 按钮组-按钮组数据', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-button-group' */ './docs/zh-CN/button-group/button-group-data.md') + }, + { + path: 'button-group/size', + meta: { title: '设置组件大小,可以设置为:medium,small,mini', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-button-group' */ './docs/zh-CN/button-group/size.md') + }, + { + path: 'button-group/dynamic-disable', + meta: { title: '表单组件-ButtonGroup 按钮组-禁用状态', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-button-group' */ './docs/zh-CN/button-group/dynamic-disable.md') + }, + { + path: 'button-group/plain-button-group', + meta: { title: '表单组件-ButtonGroup 按钮组-朴素按钮', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-button-group' */ './docs/zh-CN/button-group/plain-button-group.md') + }, + { + path: 'button-group/text-value-field', + meta: { title: '表单组件-ButtonGroup 按钮组-数据字段映射', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-button-group' */ './docs/zh-CN/button-group/text-value-field.md') + }, + { + path: 'button-group/default-slot-usage', + meta: { title: '表单组件-ButtonGroup 按钮组-默认插槽', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-button-group' */ './docs/zh-CN/button-group/default-slot-usage.md') + }, + { + path: 'form', + meta: { title: '表单组件-Form 表单', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-form' */ './docs/zh-CN/form/form.md') + }, + { + path: 'form/formitem', + meta: { title: '表单组件-Form 表单-FormItem 表单项', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-form' */ './docs/zh-CN/form/formitem.md') + }, + { + path: 'form/form-validation', + meta: { title: '表单组件-Form 表单-表单校验', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-form' */ './docs/zh-CN/form/form-validation.md') + }, + { + path: 'form/novalid-tip', + meta: { title: '表单组件-Form 表单-校验tip提示隐藏', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-form' */ './docs/zh-CN/form/novalid-tip.md') + }, + { + path: 'form/validate-type', + meta: { title: '表单组件-Form 表单-校验提示的形式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-form' */ './docs/zh-CN/form/validate-type.md') + }, + { + path: 'form/form-disabled', + meta: { title: '表单组件-Form 表单-表单禁用', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-form' */ './docs/zh-CN/form/form-disabled.md') + }, + { + path: 'form/size', + meta: { title: '表单组件-Form 表单-标签文本', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-form' */ './docs/zh-CN/form/size.md') + }, + { + path: 'form/slot-label', + meta: { title: '表单组件-Form 表单-表单尺寸', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-form' */ './docs/zh-CN/form/slot-label.md') + }, + { + path: 'form/form-validate-setting', + meta: { title: '表单组件-Form 表单-表单校验', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-form' */ './docs/zh-CN/form/form-validate-setting.md') + }, + { + path: 'form/form-clear-validate', + meta: { title: '表单组件-Form 表单-移除表单校验', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-form' */ './docs/zh-CN/form/form-clear-validate.md') + }, + { + path: 'link', + meta: { title: '表单组件-Link 文字链接', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-link' */ './docs/zh-CN/link/basic-usage.md') + }, + { + path: 'link/link-style', + meta: { title: '表单组件-Link 文字链接-主题样式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-link' */ './docs/zh-CN/link/link-style.md') + }, + { + path: 'link/dynamic-disable', + meta: { title: '表单组件-Link 文字链接-禁用状态', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-link' */ './docs/zh-CN/link/dynamic-disable.md') + }, + { + path: 'link/focus-no-underline', + meta: { title: '表单组件-Link 文字链接-聚焦时不显示下划线', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-link' */ './docs/zh-CN/link/focus-no-underline.md') + }, + { + path: 'link/custom-icon', + meta: { title: '表单组件-Link 文字链接-自定义图标', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-link' */ './docs/zh-CN/link/custom-icon.md') + }, + { + path: 'link/config-href', + meta: { title: '表单组件-Link 文字链接-链接地址', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-link' */ './docs/zh-CN/link/config-href.md') + }, + { + path: 'popover', + meta: { title: '表单组件-Popover 弹出框', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-popover' */ './docs/zh-CN/popover/basic-usage.md') + }, + { + path: 'popover/popover-content', + meta: { title: '表单组件-Popover 弹出框-添加内容', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-popover' */ './docs/zh-CN/popover/popover-content.md') + }, + { + path: 'popover/close-delay', + meta: { title: '表单组件-Popover 弹出框-延迟隐藏', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-popover' */ './docs/zh-CN/popover/close-delay.md') + }, + { + path: 'popover/dynamic-disable', + meta: { title: '表单组件-Popover 弹出框-禁用', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-popover' */ './docs/zh-CN/popover/dynamic-disable.md') + }, + { + path: 'popover/open-delay', + meta: { title: '表单组件-Popover 弹出框-延迟显示', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-popover' */ './docs/zh-CN/popover/open-delay.md') + }, + { + path: 'popover/arrow-offset', + meta: { title: '表单组件-Popover 弹出框-前头偏移', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-popover' */ './docs/zh-CN/popover/arrow-offset.md') + }, + { + path: 'popover/frame-offset', + meta: { title: '表单组件-Popover 弹出框-偏移', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-popover' */ './docs/zh-CN/popover/frame-offset.md') + }, + { + path: 'popover/popover-placement', + meta: { title: '表单组件-Popover 弹出框-显示位置', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-popover' */ './docs/zh-CN/popover/popover-placement.md') + }, + { + path: 'popover/popper-class', + meta: { title: '表单组件-Popover 弹出框-自定义样式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-popover' */ './docs/zh-CN/popover/popper-class.md') + }, + { + path: 'popover/custom-transition', + meta: { title: '表单组件-Popover 弹出框-自定义渐变动画', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-popover' */ './docs/zh-CN/popover/custom-transition.md') + }, + { + path: 'popover/trigger-mode', + meta: { title: '表单组件-Popover 弹出框-触发方式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-popover' */ './docs/zh-CN/popover/trigger-mode.md') + }, + { + path: 'popover/hidden-arrow', + meta: { title: '表单组件-Popover 弹出框-隐藏提示框箭头', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-popover' */ './docs/zh-CN/popover/hidden-arrow.md') + }, + { + path: 'popover/popover-width', + meta: { title: '表单组件-Popover 弹出框-宽度', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-popover' */ './docs/zh-CN/popover/popover-width.md') + }, + { + path: 'popover/popper-options', + meta: { title: '表单组件-Popover 弹出框-弹出框选项', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-popover' */ './docs/zh-CN/popover/popper-options.md') + }, + { + path: 'popover/trigger-reference', + meta: { title: '表单组件-Popover 弹出框-触发源', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-popover' */ './docs/zh-CN/popover/trigger-reference.md') + }, + { + path: 'popover/custom-tip-text', + meta: { title: '表单组件-Popover 弹出框-自定义提示文本', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-popover' */ './docs/zh-CN/popover/custom-tip-text.md') + }, + { + path: 'popover/popover-events', + meta: { title: '表单组件-Popover 弹出框-事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-popover' */ './docs/zh-CN/popover/popover-events.md') + }, + { + path: 'progress', + meta: { title: '数据组件-Progress 进度条', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-progress' */ './docs/zh-CN/progress/basic-usage.md') + }, + { + path: 'progress/progress-type', + meta: { title: '数据组件-Progress 进度条-类型', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-progress' */ './docs/zh-CN/progress/progress-type.md') + }, + { + path: 'progress/progress-width', + meta: { title: '数据组件-Progress 进度条-宽度', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-progress' */ './docs/zh-CN/progress/progress-width.md') + }, + { + path: 'progress/progress-status', + meta: { title: '数据组件-Progress 进度条-状态', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-progress' */ './docs/zh-CN/progress/progress-status.md') + }, + { + path: 'progress/text-inside-or-no-text', + meta: { title: '数据组件-Progress 进度条-文字内显或不显', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-progress' */ './docs/zh-CN/progress/text-inside-or-no-text.md') + }, + { + path: 'progress/custom-color', + meta: { title: '数据组件-Progress 进度条-自定义颜色', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-progress' */ './docs/zh-CN/progress/custom-color.md') + }, + { + path: 'progress/format-text', + meta: { title: '数据组件-Progress 进度条-自定义显示文字', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-progress' */ './docs/zh-CN/progress/format-text.md') + }, + { + path: 'progress/dynamic-control-changes', + meta: { title: '数据组件-Progress 进度条-动态控制进度条变化', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-progress' */ './docs/zh-CN/progress/dynamic-control-changes.md') + }, + { + path: 'tree', + meta: { title: '数据组件-Tree 树形控件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree' */ './docs/zh-CN/tree/basic-usage.md') + }, + { + path: 'tree/data-source', + meta: { title: '数据组件-Tree 树形控件-数据源', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree' */ './docs/zh-CN/tree/data-source.md') + }, + { + path: 'tree/set-tree-icon', + meta: { title: '设置收缩展开图标', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree' */ './docs/zh-CN/tree/set-tree-icon.md') + }, + { + path: 'tree/disable-node', + meta: { title: '数据组件-Tree 树形控件-禁用状态', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree' */ './docs/zh-CN/tree/disable-node.md') + }, + { + path: 'tree/custom-empty-text', + meta: { title: '数据组件-Tree 树形控件-自定义空数据文本', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree' */ './docs/zh-CN/tree/custom-empty-text.md') + }, + { + path: 'tree/slot-deffault', + meta: { title: '数据组件-Tree 树形控件-默认插槽', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree' */ './docs/zh-CN/tree/slot-deffault.md') + }, + { + path: 'tree/render-after-expand', + meta: { title: '数据组件-Tree 树形控件-展开后渲染', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree' */ './docs/zh-CN/tree/render-after-expand.md') + }, + { + path: 'tree/node-key', + meta: { title: '数据组件-Tree 树形控件-唯一标识', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree' */ './docs/zh-CN/tree/node-key.md') + }, + { + path: 'tree/check-strictly', + meta: { title: '数据组件-Tree 树形控件-父子不互相关联', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree' */ './docs/zh-CN/tree/check-strictly.md') + }, + { + path: 'tree/default-expand-all', + meta: { title: '数据组件-Tree 树形控件-默认展开所有节点', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree' */ './docs/zh-CN/tree/default-expand-all.md') + }, + { + path: 'tree/expand-on-click-node', + meta: { title: '数据组件-Tree 树形控件-点击节点展开收缩', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree' */ './docs/zh-CN/tree/expand-on-click-node.md') + }, + { + path: 'tree/check-on-click-node', + meta: { title: '数据组件-Tree 树形控件-点击节点时选中', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree' */ './docs/zh-CN/tree/check-on-click-node.md') + }, + { + path: 'tree/auto-expand-parent', + meta: { title: '数据组件-Tree 树形控件-自动展开父节点', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree' */ './docs/zh-CN/tree/auto-expand-parent.md') + }, + { + path: 'tree/default-checked-keys', + meta: { title: '数据组件-Tree 树形控件-默认勾选的节点', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree' */ './docs/zh-CN/tree/default-checked-keys.md') + }, + { + path: 'tree/default-expanded-keys', + meta: { title: '数据组件-Tree 树形控件-默认展开的节点', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree' */ './docs/zh-CN/tree/default-expanded-keys.md') + }, + { + path: 'tree/current-node-key', + meta: { title: '数据组件-Tree 树形控件-当前选中节点标志', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree' */ './docs/zh-CN/tree/current-node-key.md') + }, + { + path: 'tree/events', + meta: { title: '数据组件-Tree 树形控件-可拖拽节点', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree' */ './docs/zh-CN/tree/events.md') + } +] diff --git a/example/src/route.config.comp2.js b/example/src/route.config.comp2.js new file mode 100644 index 000000000..749d36fc2 --- /dev/null +++ b/example/src/route.config.comp2.js @@ -0,0 +1,507 @@ +export default [ + { + path: 'alert', + meta: { title: '提示组件-Alert 警告', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-alert' */ './docs/zh-CN/alert/basic-usage.md') + }, + { + path: 'alert/alert-type', + meta: { title: '提示组件-Alert 警告-类型', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-alert' */ './docs/zh-CN/alert/alert-type.md') + }, + { + path: 'alert/large-size', + meta: { title: '提示组件-Alert 警告-大尺寸', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-alert' */ './docs/zh-CN/alert/large-size.md') + }, + { + path: 'alert/custom-title', + meta: { title: '提示组件-Alert 警告-自定义标题', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-alert' */ './docs/zh-CN/alert/custom-title.md') + }, + { + path: 'alert/align-center', + meta: { title: '提示组件-Alert 警告-文字居中', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-alert' */ './docs/zh-CN/alert/align-center.md') + }, + { + path: 'alert/custom-close-text', + meta: { title: '提示组件-Alert 警告-自定义关闭按钮文本', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-alert' */ './docs/zh-CN/alert/custom-close-text.md') + }, + { + path: 'alert/custom-alert-icon', + meta: { title: '提示组件-Alert 警告-自定义警告图标', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-alert' */ './docs/zh-CN/alert/custom-alert-icon.md') + }, + { + path: 'alert/not-closable', + meta: { title: '提示组件-Alert 警告-不可关闭', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-alert' */ './docs/zh-CN/alert/not-closable.md') + }, + { + path: 'alert/custom-description', + meta: { title: '提示组件-Alert 警告-自定义提示内容', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-alert' */ './docs/zh-CN/alert/custom-description.md') + }, + { + path: 'alert/interactive-operation', + meta: { title: '提示组件-Alert 警告-自定义交互操作', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-alert' */ './docs/zh-CN/alert/interactive-operation.md') + }, + { + path: 'alert/alert-close-event', + meta: { title: '提示组件-Alert 警告-关闭事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-alert' */ './docs/zh-CN/alert/alert-close-event.md') + }, + { + path: 'alert/feedback-of-result', + meta: { title: '提示组件-Alert 警告-表单提交结果反馈', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-alert' */ './docs/zh-CN/alert/feedback-of-result.md') + }, + { + path: 'alert/show-icon', + meta: { title: '提示组件-Alert 警告-显示图标', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-alert' */ './docs/zh-CN/alert/show-icon.md') + }, + { + path: 'tree/render-content', + meta: { title: '数据组件-Tree 树形控件-自定义内容区渲染', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree' */ './docs/zh-CN/tree/render-content.md') + }, + { + path: 'tree/show-checkbox', + meta: { title: '数据组件-Tree 树形控件-节点可被选择', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree' */ './docs/zh-CN/tree/show-checkbox.md') + }, + { + path: 'tree/node-draggable', + meta: { title: '数据组件-Tree 树形控件-可拖拽节点', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree' */ './docs/zh-CN/tree/node-draggable.md') + }, + { + path: 'tree/allow-drag', + meta: { title: '数据组件-Tree 树形控件-自定义节点能否被拖拽', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree' */ './docs/zh-CN/tree/allow-drag.md') + }, + { + path: 'tree/allow-drop', + meta: { title: '数据组件-Tree 树形控件-自定义目标节点能否被放置', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree' */ './docs/zh-CN/tree/allow-drop.md') + }, + { + path: 'tree/node-props-config', + meta: { title: '数据组件-Tree 树形控件-数据节点属性配置', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree' */ './docs/zh-CN/tree/node-props-config.md') + }, + { + path: 'tree/lazy-load-node', + meta: { title: '数据组件-Tree 树形控件-懒加载子节点', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree' */ './docs/zh-CN/tree/lazy-load-node.md') + }, + { + path: 'tree/highlight-current', + meta: { title: '数据组件-Tree 树形控件-高亮当前选中节点', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree' */ './docs/zh-CN/tree/highlight-current.md') + }, + { + path: 'tree/filter-node', + meta: { title: '数据组件-Tree 树形控件-节点过滤', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree' */ './docs/zh-CN/tree/filter-node.md') + }, + { + path: 'tree/accordion-mode', + meta: { title: '数据组件-Tree 树形控件-手风琴模式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree' */ './docs/zh-CN/tree/accordion-mode.md') + }, + { + path: 'tree/indent', + meta: { title: '数据组件-Tree 树形控件-水平缩进', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree' */ './docs/zh-CN/tree/indent.md') + }, + { + path: 'tree/contextmenu', + meta: { title: '数据组件-Tree 树形控件-自定义右键菜单', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree' */ './docs/zh-CN/tree/contextmenu.md') + }, + { + path: 'tree/custom-node-icon', + meta: { title: '数据组件-Tree 树形控件-自定义展开折叠图标', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree' */ './docs/zh-CN/tree/custom-node-icon.md') + }, + { + path: 'tree/show-radio', + meta: { title: '数据组件-Tree 树形控件-单选', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-tree' */ './docs/zh-CN/tree/single-select-radio.md') + }, + { + path: 'select', + meta: { title: '表单组件-Select 选择器', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-select' */ './docs/zh-CN/select/basic-usage.md') + }, + { + path: 'select/multi-select', + meta: { title: '表单组件-Select 选择器-多选', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-select' */ './docs/zh-CN/select/multi-select.md') + }, + { + path: 'select/dynamic-disable', + meta: { title: '表单组件-Select 选择器-禁用', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-select' */ './docs/zh-CN/select/dynamic-disable.md') + }, + { + path: 'select/is-drop-inherit-width', + meta: { title: '表单组件-Select 选择器-下拉跟随输入框宽度', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-select' */ './docs/zh-CN/select/is-drop-inherit-width.md') + }, + { + path: 'select/select-size', + meta: { title: '表单组件-Select 选择器-尺寸', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-select' */ './docs/zh-CN/select/select-size.md') + }, + { + path: 'select/clear-options', + meta: { title: '表单组件-Select 选择器-选项可清除', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-select' */ './docs/zh-CN/select/clear-options.md') + }, + { + path: 'select/tag-copy', + meta: { title: '表单组件-Select 选择器-选项可清除', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-select' */ './docs/zh-CN/select/tag-copy.md') + }, + { + path: 'select/tag-copy-all', + meta: { title: '表单组件-Select 选择器-选项可清除', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-select' */ './docs/zh-CN/select/tag-copy-all.md') + }, + { + path: 'select/binding-obj', + meta: { title: '表单组件-Select 选择器-绑定值为对象', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-select' */ './docs/zh-CN/select/binding-obj.md') + }, + { + path: 'select/filterable', + meta: { title: '表单组件-Select 选择器-可搜索', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-select' */ './docs/zh-CN/select/filterable.md') + }, + { + path: 'select/allow-create', + meta: { title: '表单组件-Select 选择器-创建条目', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-select' */ './docs/zh-CN/select/allow-create.md') + }, + { + path: 'select/slot-select', + meta: { title: '表单组件-Select 选择器-插槽', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-select' */ './docs/zh-CN/select/slot-select.md') + }, + { + path: 'select/remote-filter', + meta: { title: '表单组件-Select 选择器-远程搜索', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-select' */ './docs/zh-CN/select/remote-filter.md') + }, + { + path: 'select/custom-no-result-text', + meta: { title: '表单组件-Select 选择器-自定义无匹配搜索文字', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-select' */ './docs/zh-CN/select/custom-no-result-text.md') + }, + { + path: 'select/custom-empty-data-text', + meta: { title: '表单组件-Select 选择器-自定义空数据显示文字', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-select' */ './docs/zh-CN/select/custom-empty-data-text.md') + }, + { + path: 'select/popup-style-position', + meta: { title: '表单组件-Select 选择器-弹出框样式与定位', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-select' */ './docs/zh-CN/select/popup-style-position.md') + }, + { + path: 'select/automatic-select', + meta: { title: '表单组件-Select 选择器-获取焦点即弹出下拉菜单', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-select' */ './docs/zh-CN/select/automatic-select.md') + }, + { + path: 'select/select-events', + meta: { title: '表单组件-Select 选择器-事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-select' */ './docs/zh-CN/select/select-events.md') + }, + { + path: 'select/custom-prefix', + meta: { title: '表单组件-Select 选择器-自定义头部内容', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-select' */ './docs/zh-CN/select/custom-prefix.md') + }, + // { + // path: 'select/custom-suffix', + // meta: { title: '表单组件-Select 选择器-自定义输入框右侧图标', lang: 'zh-CN', sign: 'component' }, + // component: () => import(/* webpackChunkName: 'v3-select' */ './docs/zh-CN/select/custom-suffix.md') + // }, + { + path: 'select/custom-options', + meta: { title: '表单组件-Select 选择器-自定义下拉内容', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-select' */ './docs/zh-CN/select/custom-options.md') + }, + { + path: 'select/option-group', + meta: { title: '表单组件-Select 选择器-分组', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-select' */ './docs/zh-CN/select/option-group.md') + }, + { + path: 'select/show-alloption', + meta: { title: '表单组件-Select 选择器-不展示全选按钮', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-select' */ './docs/zh-CN/select/show-alloption.md') + }, + { + path: 'select/hide-select-input-border', + meta: { title: '表单组件-Select 选择器-隐藏搜索框边框', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-select' */ './docs/zh-CN/select/hide-select-input-border.md') + }, + { + path: 'select/manual-focus-blur', + meta: { title: '表单组件-Select 选择器-手动获取或失去焦点', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-select' */ './docs/zh-CN/select/manual-focus-blur.md') + }, + { + path: 'select/show-tip', + meta: { title: '表单组件-Select 选择器-Tip 提示', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-select' */ './docs/zh-CN/select/show-tip.md') + }, + { + path: 'select/set-input-value', + meta: { title: '表单组件-Select 选择器-改变输入框的值', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-select' */ './docs/zh-CN/select/set-input-value.md') + }, + { + path: 'select/nest-grid', + meta: { title: '表单组件-Select 选择器-嵌套 Grid', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-select' */ './docs/zh-CN/select/nest-grid.md') + }, + { + path: 'select/nest-tree', + meta: { title: '表单组件-Select 选择器-嵌套 Tree', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-select' */ './docs/zh-CN/select/nest-tree.md') + }, + { + path: 'select/cache-usage', + meta: { title: '表单组件-Select 选择器-嵌套 Tree', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-select' */ './docs/zh-CN/select/cache-usage.md') + }, + { + path: 'dropdown', + meta: { title: '导航组件-Dropdown 下拉菜单', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-dropdown' */ './docs/zh-CN/dropdown/basic-usage.md') + }, + { + path: 'dropdown/split-button', + meta: { title: '导航组件-Dropdown 下拉菜单', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-dropdown' */ './docs/zh-CN/dropdown/split-button.md') + }, + { + path: 'dropdown/trigger', + meta: { title: '导航组件-Dropdown 下拉菜单', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-dropdown' */ './docs/zh-CN/dropdown/trigger.md') + }, + { + path: 'dropdown/hide-on-click', + meta: { title: '导航组件-Dropdown 下拉菜单', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-dropdown' */ './docs/zh-CN/dropdown/hide-on-click.md') + }, + { + path: 'dropdown/disabled', + meta: { title: '导航组件-Dropdown 下拉菜单', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-dropdown' */ './docs/zh-CN/dropdown/disabled.md') + }, + { + path: 'dropdown/size', + meta: { title: '导航组件-Dropdown 下拉菜单', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-dropdown' */ './docs/zh-CN/dropdown/size.md') + }, + { + path: 'dropdown/events', + meta: { title: '导航组件-Dropdown 下拉菜单', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-dropdown' */ './docs/zh-CN/dropdown/events.md') + }, + { + path: 'select/optimization', + meta: { title: '表单组件-Select 选择器-虚拟滚动', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-select' */ './docs/zh-CN/select/optimization.md') + }, + { + path: 'select/upgrade-guide', + meta: { title: '表单组件-Select 选择器-升级指导', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-select' */ './docs/zh-CN/select/upgrade-guide.md') + }, + { + path: 'file-upload', + meta: { title: '表单组件-FileUpload 文件上传', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-file-upload' */ './docs/zh-CN/file-upload/basic-usage.md') + }, + { + path: 'file-upload/size', + meta: { title: '设置组件的大小,只对使用Tiny的Button组件有效', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-file-upload' */ './docs/zh-CN/file-upload/size.md') + }, + { + path: 'file-upload/jalor-request', + meta: { title: '表单组件-FileUpload 文件上传-可上传的文件类型', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-file-upload' */ './docs/zh-CN/file-upload/jalor-request.md') + }, + { + path: 'file-upload/accept-file-type', + meta: { title: '表单组件-FileUpload 文件上传-可上传的文件类型', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-file-upload' */ './docs/zh-CN/file-upload/accept-file-type.md') + }, + { + path: 'file-upload/manual-upload', + meta: { title: '表单组件-FileUpload 文件上传-手动上传', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-file-upload' */ './docs/zh-CN/file-upload/manual-upload.md') + }, + { + path: 'file-upload/prevent-delete-file', + meta: { title: '表单组件-FileUpload 文件上传-阻止删除文件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-file-upload' */ './docs/zh-CN/file-upload/prevent-delete-file.md') + }, + { + path: 'file-upload/prevent-upload-file', + meta: { title: '表单组件-FileUpload 文件上传-阻止上传文件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-file-upload' */ './docs/zh-CN/file-upload/prevent-upload-file.md') + }, + { + path: 'file-upload/upload-request', + meta: { title: '表单组件-FileUpload 文件上传-上传请求', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-file-upload' */ './docs/zh-CN/file-upload/upload-request.md') + }, + { + path: 'file-upload/drag-upload', + meta: { title: '表单组件-FileUpload 文件上传-拖拽上传', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-file-upload' */ './docs/zh-CN/file-upload/drag-upload.md') + }, + { + path: 'file-upload/drag-select-file', + meta: { title: '表单组件-FileUpload 文件上传-拖拽选择文件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-file-upload' */ './docs/zh-CN/file-upload/drag-select-file.md') + }, + { + path: 'file-upload/upload-file-list', + meta: { title: '表单组件-FileUpload 文件上传-上传的文件列表', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-file-upload' */ './docs/zh-CN/file-upload/upload-file-list.md') + }, + { + path: 'file-upload/custom-upload-request', + meta: { title: '表单组件-FileUpload 文件上传-自定义上传请求', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-file-upload' */ './docs/zh-CN/file-upload/custom-upload-request.md') + }, + { + path: 'file-upload/upload-limit', + meta: { title: '表单组件-FileUpload 文件上传-最大上传限制', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-file-upload' */ './docs/zh-CN/file-upload/upload-limit.md') + }, + { + path: 'file-upload/picture-card', + meta: { title: '表单组件-FileUpload 文件上传-照片墙', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-file-upload' */ './docs/zh-CN/file-upload/picture-card.md') + }, + { + path: 'file-upload/file-picture-card', + meta: { title: '表单组件-FileUpload 文件上传-文件缩略图', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-file-upload' */ './docs/zh-CN/file-upload/file-picture-card.md') + }, + { + path: 'file-upload/picture-list', + meta: { title: '表单组件-FileUpload 文件上传-图片列表缩略图', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-file-upload' */ './docs/zh-CN/file-upload/picture-list.md') + }, + { + path: 'file-upload/max-file-count', + meta: { title: '表单组件-FileUpload 文件上传-最大上传文件数', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-file-upload' */ './docs/zh-CN/file-upload/max-file-count.md') + }, + { + path: 'file-upload/mini-mode', + meta: { title: '表单组件-FileUpload 文件上传-迷你模式', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-file-upload' */ './docs/zh-CN/file-upload/mini-mode.md') + }, + { + path: 'file-upload/multiple-file', + meta: { title: '表单组件-FileUpload 文件上传-文件多选', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-file-upload' */ './docs/zh-CN/file-upload/multiple-file.md') + }, + { + path: 'file-upload/custom-prefix', + meta: { title: '表单组件-FileUpload 文件上传-钩子函数', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-file-upload' */ './docs/zh-CN/file-upload/custom-prefix.md') + }, + { + path: 'file-upload/upload-events', + meta: { title: '表单组件-FileUpload 文件上传-事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-file-upload' */ './docs/zh-CN/file-upload/upload-events.md') + }, + { + path: 'file-upload/with-credentials', + meta: { title: '表单组件-FileUpload 文件上传-支持发送 cookie 凭证信息', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-file-upload' */ './docs/zh-CN/file-upload/with-credentials.md') + }, + { + path: 'file-upload/clear-files', + meta: { title: '表单组件-FileUpload 文件上传-手动清空已上传文件列表', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-file-upload' */ './docs/zh-CN/file-upload/clear-files.md') + }, + { + path: 'file-upload/abort-quest', + meta: { title: '表单组件-FileUpload 文件上传-手动取消上传请求', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-file-upload' */ './docs/zh-CN/file-upload/abort-quest.md') + }, + { + path: 'file-upload/custom-upload-tip', + meta: { title: '表单组件-FileUpload 文件上传-自定义上传提示', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-file-upload' */ './docs/zh-CN/file-upload/custom-upload-tip.md') + }, + { + path: 'file-upload/custom-trigger', + meta: { title: '表单组件-FileUpload 文件上传-自定义触发文件选项框', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-file-upload' */ './docs/zh-CN/file-upload/custom-trigger.md') + }, + { + path: 'file-upload/upload-user-head', + meta: { title: '表单组件-FileUpload 文件上传-用户头像上传', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-file-upload' */ './docs/zh-CN/file-upload/upload-user-head.md') + }, + { + path: 'file-upload/image-size', + meta: { title: '表单组件-FileUpload 文件上传-用户头像上传', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-file-upload' */ './docs/zh-CN/file-upload/image-size.md') + }, + { + path: 'slide-bar', + meta: { title: '其他组件-SlideBar 滚动块', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-slide-bar' */ './docs/zh-CN/slide-bar/basic-usage.md') + }, + { + path: 'slide-bar/wheel-blocks', + meta: { title: '其他组件-SlideBar 滚动块-每次滚动块数', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-slide-bar' */ './docs/zh-CN/slide-bar/wheel-blocks.md') + }, + { + path: 'slide-bar/custom-content', + meta: { title: '其他组件-SlideBar 滚动块-自定义滚动块内容', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-slide-bar' */ './docs/zh-CN/slide-bar/custom-content.md') + }, + { + path: 'slide-bar/custom-tag', + meta: { title: '其他组件-SlideBar 滚动块-自定义 DOM 标签', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-slide-bar' */ './docs/zh-CN/slide-bar/custom-tag.md') + }, + { + path: 'slide-bar/slide-bar-events', + meta: { title: '其他组件-SlideBar 滚动块-滚动块事件', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-slide-bar' */ './docs/zh-CN/slide-bar/slide-bar-events.md') + }, + { + path: 'floatbar/operation-floatbar-item', + meta: { title: '导航组件-Floatbar 浮动块-操作浮动块内容', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-floatbar' */ './docs/zh-CN/floatbar/operation-floatbar-item.md') + }, + { + path: 'fullscreen', + meta: { title: '全屏显示-Fullscreen 全屏显示', lang: 'zh-CN', sign: 'component' }, + component: () => import(/* webpackChunkName: 'v3-fullscreen' */ './docs/zh-CN/fullscreen/basic-usage.md') + } +] diff --git a/example/test/alert.spec.jsx b/example/test/alert.spec.jsx new file mode 100644 index 000000000..251411fa0 --- /dev/null +++ b/example/test/alert.spec.jsx @@ -0,0 +1,35 @@ +import { mount } from '@vue/test-utils' +import { describe, expect, test } from 'vitest' +import { Alert } from '@opentiny/vue' +import { iconBoat } from '@opentiny/vue-icon' + +describe('Alert ', () => { + test('render test & type & size', async () => { + const TEXT = 'Winter is coming' + const wrapper = mount(() => ) + expect(wrapper.find('.tiny-alert__close').exists()).toBe(true) + expect(wrapper.find('.tiny-alert__title').text()).toEqual(TEXT) + expect(wrapper.find('.tiny-alert').classes()).toContain('tiny-alert--large') + expect(wrapper.find('.tiny-alert').classes()).toContain('tiny-alert--success') + }) + + test('icon', async () => { + const TEXT = 'Winter is coming' + const wrapper = mount(() => ) + expect(wrapper.find('.tiny-alert__icon').exists()).toBe(true) + }) + + test('slot', async () => { + const TEXT = 'Winter is coming' + const wrapper = mount(() => TEXT + }} + description='type 为 success' + />) + expect(wrapper.find('.tiny-alert__title').text()).toEqual(TEXT) + }) + +}) diff --git a/example/test/autocomplete.spec.jsx b/example/test/autocomplete.spec.jsx new file mode 100644 index 000000000..5c32954c8 --- /dev/null +++ b/example/test/autocomplete.spec.jsx @@ -0,0 +1,73 @@ +import { mount } from '@vue/test-utils' +import { describe, expect, test, vi } from 'vitest' +import { Autocomplete } from '@opentiny/vue' +import { ref, nextTick } from 'vue' +import { randomValues } from './common/globalConfig' + +randomValues(global) + + +const loadAll = [ + { + value: 'GFD科技YX公司', + address: '福州' + }, + { + value: 'WWWW科技YX公司', + address: '深圳福田区' + }, + { + value: 'RFV有限责任公司', + address: '中山市' + } +] + +const querySearch = (queryString, cb) => { + const restaurants = loadAll + let results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants + cb(results) +} + +const createFilter = (queryString) => (restaurant) => restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0 + +describe('autocomplete', () => { + test('size', async () => { + const value = 'GFD科技' + const TEXT = '请输入内容' + const medium = 'medium' + const wrapper = mount(() => + + ) + expect(wrapper.find('.tiny-input-medium').exists()).toBe(true) + + }) + + test('events', async () => { + const value = '' + const keys = 'name' + const handleSelect = vi.fn() + const wrapper = mount(() => + + ) + await nextTick() + const target = wrapper.getComponent(Autocomplete).vm + await nextTick() + target.handleKeyEnter() + expect(handleSelect).toHaveBeenCalled() + }) + + test('slot', async () => { + const value = '' + const TEXT = '请输入内容' + const wrapper = mount(() =>
前置内容
, + append: () =>
后置内容
+ }}> + +
) + + expect(wrapper.find('.tiny-input-group__prepend').exists()).toBe(true) + expect(wrapper.find('.tiny-input-group__append').exists()).toBe(true) + }) + +}) diff --git a/example/test/badge.spec.jsx b/example/test/badge.spec.jsx new file mode 100644 index 000000000..80e235b0d --- /dev/null +++ b/example/test/badge.spec.jsx @@ -0,0 +1,33 @@ +import { mount } from '@vue/test-utils' +import { describe, expect, test } from 'vitest' +import { Badge } from '@opentiny/vue' + +describe('Badge ', () => { + test('type & value', async () => { + const NUM = 2 + const TEXT = 'danger 类型' + const wrapper = mount(() => {TEXT}) + expect(wrapper.find('.tiny-badge__content-text').text()).toEqual(String(NUM)) + expect(wrapper.find('.tiny-badge').classes()).toContain('tiny-badge--danger') + }) + + test('max', async () => { + const wrapper = mount(() => 小圆点显示) + expect(wrapper.find('.tiny-badge__content-text').text()).toEqual('2+') + }) + + test('is-dot', async () => { + const wrapper = mount(() => 小圆点显示) + expect(wrapper.find('.tiny-badge').classes()).toContain('tiny-badge--default') + }) + + test('slot', async () => { + const wrapper = mount(() =>
自定义
+ }} + >自定义内容插槽
) + expect(wrapper.find('.badge__content').text()).toEqual('自定义') + }) +}) diff --git a/example/test/button-group.spec.jsx b/example/test/button-group.spec.jsx new file mode 100644 index 000000000..d3d45a7b6 --- /dev/null +++ b/example/test/button-group.spec.jsx @@ -0,0 +1,44 @@ +import { mount } from '@vue/test-utils' +import { describe, expect, test, vi } from 'vitest' +import { ButtonGroup, Button } from '@opentiny/vue' +import { ref } from 'vue' +import { randomValues } from './common/globalConfig' + +randomValues(global) + +const groupData = [ + { text: 'Button1', value: 'Button1' }, + { text: 'Button2', value: 'Button2' }, + { text: 'Button3', value: 'Button3' } +] + +describe('button-group', () => { + test('type & icon', async () => { + const wrapper = mount(() => ) + expect(wrapper.find('button').classes()).toContain('disabled') + expect(wrapper.findAll('button').length).toBe(3) + }) + test('show-more', async () => { + const checkedVal = 'Button1' + const wrapper = mount(() => ) + expect(wrapper.find('svg').classes()).toContain('tiny-svg') + expect(wrapper.find('.tiny-group-item').classes()).toContain('show-more') + }) + + test('slot', async () => { + const wrapper = mount(() => ) + expect(wrapper.findAll('button').length).toBe(1) + }) + + test('events', async () => { + const handleEdit = vi.fn() + const checkedVal = 'Button1' + const wrapper = mount(() => ) + const buttons = wrapper.findAll('button') + await buttons[buttons.length - 1].trigger('click') + expect(handleEdit).toHaveBeenCalled() + }) + +}) diff --git a/example/test/button.spec.jsx b/example/test/button.spec.jsx new file mode 100644 index 000000000..f6b7ec8b9 --- /dev/null +++ b/example/test/button.spec.jsx @@ -0,0 +1,41 @@ +import { mount } from '@vue/test-utils' +import { describe, expect, test, vi } from 'vitest' +import { Button } from '@opentiny/vue' +import { iconBoat } from '@opentiny/vue-icon' +import { ref, nextTick } from 'vue' + +describe('Button ', () => { + test('type & icon', async () => { + const TEXT = '危险按钮' + const wrapper = mount(() => ) + expect(wrapper.find('.tiny-svg').exists()).toBe(true) + }) + + test('size & plain', async () => { + const TEXT = '危险按钮' + const SIZE = 'large' + const wrapper = mount(() => ) + expect(wrapper.find('.tiny-button').classes()).toContain('tiny-button--large') + expect(wrapper.find('.tiny-button').classes()).toContain('is-plain') + }) + + test('circle & disabled', async () => { + const disabledValue = ref(false) + const wrapper = mount(() => ) + expect(wrapper.find('.tiny-button').classes()).toContain('is-circle') + expect(wrapper.find('.is-disabled').exists()).toBe(false) + disabledValue.value = true + await nextTick() + expect(wrapper.find('.tiny-button').classes()).toContain('is-disabled') + }) + + test('events', async () => { + const handleClick = vi.fn() + const TEXT = '危险按钮' + const wrapper = mount(() => ) + const button = wrapper.find('button') + await button.trigger('click') + expect(handleClick).toBeCalled() + }) + +}) diff --git a/example/test/cascader-panel.spec.jsx b/example/test/cascader-panel.spec.jsx new file mode 100644 index 000000000..7d97fff8c --- /dev/null +++ b/example/test/cascader-panel.spec.jsx @@ -0,0 +1,122 @@ +import { mount } from '@vue/test-utils' +import { describe, expect, test, vi } from 'vitest' +import { CascaderPanel } from '@opentiny/vue' +import { ref, nextTick } from 'vue' +import { randomValues } from './common/globalConfig' + +randomValues(global) + + +const options = [ + { + value: 'zhinan', + label: '指南', + children: [ + { + value: 'anzhuang', + label: '安装', + children: [ + { + value: 'xiangmudengji', + label: '项目登记' + }, + { + value: 'huanjingzhunbei', + label: '环境准备' + }, + { + value: 'anzhuangcli', + label: '安装 CLI' + }, + { + value: 'chuangjianxiangmu', + label: '创建项目' + } + ] + }, + { + value: 'kaifa', + label: '开发', + children: [ + { + value: 'yinruzujian', + label: '引入组件' + }, + { + value: 'monishuju', + label: '模拟数据' + } + ] + } + ] + }, + { + value: 'zujian', + label: '组件', + children: [ + { + value: 'basic', + label: '框架风格', + children: [ + { + value: 'layout', + label: 'Layout 布局' + }, + { + value: 'color', + label: 'Color 色彩' + }, + { + value: 'font', + label: 'Font 字体' + }, + { + value: 'icon', + label: 'Icon 图标' + } + ] + }] + }] +let value = ['zhinan', 'anzhuang'] + +describe('cascader-panel', () => { + test('options', async () => { + const separators = '+' + const medium = 'medium' + const wrapper = mount(() => ) + expect(wrapper.findAll('.tiny-cascader-node').length).toBe(2) + + }) + + test('triggerOnFocus', async () => { + const handleChange = vi.fn() + const wrapper = mount(() => ) + + const list = wrapper.findAll('.tiny-cascader-node') + const [znNode, zjNode] = list + '.arrow-right.el-cascader-node__postfix' + await znNode.trigger('click') + expect(handleChange).toBeCalled() + }) + + test('slot', async () => { + const value = 'pppppppppp' + const TEXT = '请输入内容' + const wrapper = mount(() => <> {scopeData.data.label}自定义 + !scopeData.node.isLeaf&& ({scopeData.data.children.length}) + }} + >) + expect(wrapper.find('.only-slot').exists()).toBe(true) + }) + +}) diff --git a/example/test/cascader.spec.jsx b/example/test/cascader.spec.jsx new file mode 100644 index 000000000..dfc1907a6 --- /dev/null +++ b/example/test/cascader.spec.jsx @@ -0,0 +1,123 @@ +import { mount } from '@vue/test-utils' +import { describe, expect, test, vi } from 'vitest' +import { Cascader } from '@opentiny/vue' +import { ref, nextTick } from 'vue' +import { randomValues } from './common/globalConfig' + +randomValues(global) + + +const options = [ + { + value: 'zhinan', + label: '指南', + children: [ + { + value: 'anzhuang', + label: '安装', + children: [ + { + value: 'xiangmudengji', + label: '项目登记' + }, + { + value: 'huanjingzhunbei', + label: '环境准备' + }, + { + value: 'anzhuangcli', + label: '安装 CLI' + }, + { + value: 'chuangjianxiangmu', + label: '创建项目' + } + ] + }, + { + value: 'kaifa', + label: '开发', + children: [ + { + value: 'yinruzujian', + label: '引入组件' + }, + { + value: 'monishuju', + label: '模拟数据' + } + ] + } + ] + }, + { + value: 'zujian', + label: '组件', + children: [ + { + value: 'basic', + label: '框架风格', + children: [ + { + value: 'layout', + label: 'Layout 布局' + }, + { + value: 'color', + label: 'Color 色彩' + }, + { + value: 'font', + label: 'Font 字体' + }, + { + value: 'icon', + label: 'Icon 图标' + } + ] + }] + }] +let value = ['zhinan', 'anzhuang'] + +describe('cascader', () => { + test('size', async () => { + const separators = '+' + const medium = 'medium' + const wrapper = mount(() => ) + expect(wrapper.find('.tiny-cascader--medium').exists()).toBe(true) + + }) + test('triggerOnFocus', async () => { + const triggerOnFocus = vi.fn() + const wrapper = mount(() => ) + + await nextTick() + await wrapper.find('input').trigger('focus') + await nextTick() + expect(triggerOnFocus).toHaveBeenCalledTimes(1) + }) + + test('slot', async () => { + const value = 'pppppppppp' + const TEXT = '请输入内容' + const wrapper = mount(() =>
没有选项
+ }} + >
) + + expect(wrapper.find('.tiny-cascader__empty-text').exists()).toBe(true) + }) +}) diff --git a/example/test/checkbox.spec.jsx b/example/test/checkbox.spec.jsx new file mode 100644 index 000000000..0a235ef18 --- /dev/null +++ b/example/test/checkbox.spec.jsx @@ -0,0 +1,41 @@ +import { mount } from '@vue/test-utils' +import { describe, expect, test, vi } from 'vitest' +import { Checkbox, CheckboxGroup, CheckboxButton } from '@opentiny/vue' +import { ref } from 'vue' +import { randomValues } from './common/globalConfig' + +randomValues(global) + +let checked = '' +describe('checkbox', () => { + test('size', async () => { + const wrapper = mount(() => ) + expect(wrapper.find('.tiny-checkbox__original').attributes()['false-value']).toBe('假文本') + }) + + test('slot', async () => { + const wrapper = mount(() => 复选框1 + }} + >) + expect(wrapper.find('.only-slot').exists()).toBe(true) + }) + + test('events', async () => { + const handleChange = vi.fn() + let checkedVal = [] + const wrapper = mount(() => + + + ) + await wrapper.find('.tiny-checkbox-button').trigger('click') + expect(handleChange).toHaveBeenCalled() + }) +}) diff --git a/example/test/common/globalConfig.js b/example/test/common/globalConfig.js new file mode 100644 index 000000000..72c300456 --- /dev/null +++ b/example/test/common/globalConfig.js @@ -0,0 +1,10 @@ +const { randomBytes } = await import('node:crypto') + +export const randomValues = (global) => { + global.crypto = {} + global.crypto.getRandomValues = function getRandomValues(buf) { + const bytes = randomBytes(buf.length) + buf.set(bytes) + return buf + } +} diff --git a/example/test/date-picker.spec.jsx b/example/test/date-picker.spec.jsx new file mode 100644 index 000000000..dd2df3408 --- /dev/null +++ b/example/test/date-picker.spec.jsx @@ -0,0 +1,25 @@ +import { mount } from '@vue/test-utils' +import { describe, expect, test, vi } from 'vitest' +import { DatePicker } from '@opentiny/vue' +import { ref } from 'vue' +import { randomValues } from './common/globalConfig' + +randomValues(global) + +describe('date-picker', () => { + test('readonly', async () => { + let value = '2020/10/29' + const wrapper = mount(() => ) + expect(wrapper.find('input').attributes()).toHaveProperty('readonly') + }) + + test('events', async () => { + let value = '' + const wrapper = mount(() => ) + expect(document.querySelector('.tiny-picker-panel')).toBe(null) + await wrapper.find('input').trigger('focus') + expect(document.querySelector('.tiny-picker-panel') !== 'null').toBe(true) + }) +}) diff --git a/example/test/drop-times.spec.jsx b/example/test/drop-times.spec.jsx new file mode 100644 index 000000000..6f66fa534 --- /dev/null +++ b/example/test/drop-times.spec.jsx @@ -0,0 +1,25 @@ +import { mount } from '@vue/test-utils' +import { describe, expect, test, vi } from 'vitest' +import { DropTimes } from '@opentiny/vue' +import { nextTick, ref } from 'vue' +import { randomValues } from './common/globalConfig' + +randomValues(global) + +describe('drop-times', () => { + test('size', async () => { + let value = '' + const wrapper = mount(() => ) + expect(wrapper.find('.tiny-select--medium').exists()).toBe(true) + }) + + test('events', async () => { + const handleChange = vi.fn() + let value = '' + const wrapper = mount(() => ) + await wrapper.find('.tiny-select').trigger('click') + await nextTick() + await document.querySelector('.tiny-select-dropdown__item').click() + expect(handleChange).toHaveBeenCalled() + }) +}) diff --git a/example/test/file-upload.spec.jsx b/example/test/file-upload.spec.jsx new file mode 100644 index 000000000..c348b5875 --- /dev/null +++ b/example/test/file-upload.spec.jsx @@ -0,0 +1,54 @@ +import { mount } from '@vue/test-utils' +import { describe, expect, test, vi } from 'vitest' +import { FileUpload } from '@opentiny/vue' +import { ref } from 'vue' +import { randomValues } from './common/globalConfig' + +randomValues(global) + +describe('file-upload', () => { + test('drag', async () => { + const action = 'http://localhost:3000/api/upload' + const wrapper = mount(() => + ) + expect(wrapper.find('.tiny-upload-dragger').exists()).toBe(true) + }) + + + test('slot', async () => { + const action = 'http://localhost:3000/api/upload' + const wrapper = mount(() =>
只能上传jpg/png文件,且不超过500kb
+ }} + > +
) + expect(wrapper.find('.tiny-upload__tip').exists()).toBe(true) + }) + + test('events', async () => { + const handleDelete = vi.fn() + const fileList = [ + { + name: 'test1', + url: 'https://test-static-resource.obs.cn-north-7.ulanqab.huawei.com/tinydoc-website-vue/1.0.0.20220924181516/static/images/ld.png' + }, + { + name: 'test2', + url: 'https://test-static-resource.obs.cn-north-7.ulanqab.huawei.com/tinydoc-website-vue/1.0.0.20220924181516/static/images/ry.png' + } + ] + const action = 'http://localhost:3000/api/upload' + const wrapper = mount(() => + ) + await wrapper.find('span').trigger('click') + expect(handleDelete).toHaveBeenCalled() + }) +}) diff --git a/example/test/form.spec.jsx b/example/test/form.spec.jsx new file mode 100644 index 000000000..e6f0d9045 --- /dev/null +++ b/example/test/form.spec.jsx @@ -0,0 +1,55 @@ +import { mount } from '@vue/test-utils' +import { describe, expect, test, vi } from 'vitest' +import { Form, Input, FormItem, Button } from '@opentiny/vue' +import { nextTick, ref } from 'vue' +import { randomValues } from './common/globalConfig' + +randomValues(global) + +const createData = { + quantity: '1' +} + +describe('form', () => { + test('label-width', async () => { + const wrapper = mount(() =>
+ + + +
) + expect(wrapper.find('.tiny-form-item__content').attributes().style).toBe('margin-left: 100px;') + }) + + + test('slot', async () => { + const action = 'http://localhost:3000/api/upload' + const wrapper = mount(() =>
+ <>必填 + }}> + + +
) + expect(wrapper.find('.tiny-form-item__label').text()).toBe('必填') + }) + + test('events', async () => { + const rules = { + quantity: { required: true } + } + + const wrapper = mount(() =>
+ + + +
) + const form = wrapper.findComponent(Form).componentVM + await nextTick() + + const valid = await form + .validate() + .then(() => true) + .catch(() => false) + expect(valid).toBe(true) + }) +}) diff --git a/example/test/input.spec.jsx b/example/test/input.spec.jsx new file mode 100644 index 000000000..5d4996a09 --- /dev/null +++ b/example/test/input.spec.jsx @@ -0,0 +1,31 @@ +import { mount } from '@vue/test-utils' +import { describe, expect, test, vi } from 'vitest' +import { Input } from '@opentiny/vue' +import { nextTick, ref } from 'vue' +import { randomValues } from './common/globalConfig' + +randomValues(global) + +let value = '' + +describe('input', () => { + test('maxlength', async () => { + const wrapper = mount(() => ) + expect(wrapper.find('input').attributes().maxlength).toBe('5') + }) + + test('slot', async () => { + const wrapper = mount(() => <>Http:// + }}>) + expect(wrapper.find('.tiny-input-group__prepend').text()).toBe('Http://') + }) + + test('events', async () => { + const focus = vi.fn() + const wrapper = mount(() => ) + await wrapper.find('input').trigger('focus') + await nextTick() + expect(focus).toHaveBeenCalled() + }) +}) diff --git a/example/test/ip-address.spec.jsx b/example/test/ip-address.spec.jsx new file mode 100644 index 000000000..0162da774 --- /dev/null +++ b/example/test/ip-address.spec.jsx @@ -0,0 +1,32 @@ +import { mount } from '@vue/test-utils' +import { describe, expect, test, vi } from 'vitest' +import { IpAddress } from '@opentiny/vue' +import { nextTick, ref } from 'vue' +import { randomValues } from './common/globalConfig' + +randomValues(global) + +let value = '' + +describe('ip-address', () => { + test('readonly', async () => { + const wrapper = mount(() => ) + expect(wrapper.find('input').attributes()).toHaveProperty('readonly') + }) + + + test('slot', async () => { + const wrapper = mount(() => -- + }}>) + expect(wrapper.find('i').text()).toBe('--') + }) + + test('events', async () => { + const focus = vi.fn() + const wrapper = mount(() => ) + await wrapper.find('input').trigger('focus') + await nextTick() + expect(focus).toHaveBeenCalled() + }) +}) diff --git a/example/test/link.spec.jsx b/example/test/link.spec.jsx new file mode 100644 index 000000000..fc5a99ec5 --- /dev/null +++ b/example/test/link.spec.jsx @@ -0,0 +1,24 @@ +import { mount } from '@vue/test-utils' +import { describe, expect, test, vi } from 'vitest' +import { Link } from '@opentiny/vue' +import { nextTick, ref } from 'vue' +import { randomValues } from './common/globalConfig' + +randomValues(global) + +const iconTest = 'IconDel()' + +describe('link', () => { + test('href', async () => { + const wrapper = mount(() => ) + expect(wrapper.find('.tiny-link').attributes().href).toBe('localhost:3000/#/zh-CN/index') + }) + + test('slot', async () => { + const wrapper = mount(() => iconTest + }}>) + expect(wrapper.text()).toContain(iconTest) + }) + +}) diff --git a/example/test/numeric.spec.jsx b/example/test/numeric.spec.jsx new file mode 100644 index 000000000..d89653d1a --- /dev/null +++ b/example/test/numeric.spec.jsx @@ -0,0 +1,24 @@ +import { mount } from '@vue/test-utils' +import { describe, expect, test, vi } from 'vitest' +import { Numeric } from '@opentiny/vue' +import { nextTick, ref } from 'vue' +import { randomValues } from './common/globalConfig' + +randomValues(global) + +let value = 1 + +describe('numeric', () => { + test('size', async () => { + const wrapper = mount(() => ) + expect(wrapper.find('.tiny-input-medium').exists()).toBe(true) + }) + + test('events', async () => { + const focus = vi.fn() + const wrapper = mount(() => ) + await wrapper.find('input').trigger('focus') + await nextTick() + expect(focus).toHaveBeenCalled() + }) +}) diff --git a/example/test/pop-editor.spec.jsx b/example/test/pop-editor.spec.jsx new file mode 100644 index 000000000..55b92d080 --- /dev/null +++ b/example/test/pop-editor.spec.jsx @@ -0,0 +1,39 @@ +import { mount } from '@vue/test-utils' +import { describe, expect, test, vi } from 'vitest' +import { Popeditor } from '@opentiny/vue' +import { nextTick, ref } from 'vue' +import { randomValues } from './common/globalConfig' + +randomValues(global) + +let value = '' + +describe('pop-editor', () => { + test('readonly & close', async () => { + const handleClose = vi.fn() + const wrapper = mount(() => ) + expect(wrapper.find('.tiny-popeditor-readonly').exists()).toBe(true) + expect(wrapper.find('.tiny-dialog-box__wrapper').attributes().style).toBe('display: none;') + await (wrapper.find('input')).trigger('click') + await nextTick() + expect(document.querySelector('.tiny-dialog-box__wrapper').style).not.toHaveProperty('display', 'none') + await document.querySelector('.tiny-dialog-box__headerbtn').click() + expect(handleClose).toHaveBeenCalled() + await nextTick() + expect(document.querySelector('.tiny-dialog-box__wrapper').style).toHaveProperty('display', 'none') + }) + + test('slot', async () => { + const params = { + name: '' + } + const wrapper = mount(() => <>
公司名:
+
+ Search +
+ }}>
) + expect(document.querySelector('.tiny-button--primary') !== null).toBe(true) + }) + +}) diff --git a/example/test/pop-upload.spec.jsx b/example/test/pop-upload.spec.jsx new file mode 100644 index 000000000..6c0ad0288 --- /dev/null +++ b/example/test/pop-upload.spec.jsx @@ -0,0 +1,19 @@ +import { mount } from '@vue/test-utils' +import { describe, expect, test, vi } from 'vitest' +import { PopUpload } from '@opentiny/vue' +import { nextTick, ref } from 'vue' +import { randomValues } from './common/globalConfig' + +randomValues(global) + +describe('pop-upload', () => { + test('size', async () => { + const wrapper = mount(() => ) + expect(wrapper.find('.tiny-button--medium').exists()).toBe(true) + }) + + test('disabled', async () => { + const wrapper = mount(() => ) + expect(wrapper.find('.is-disabled').exists()).toBe(true) + }) +}) diff --git a/example/test/radio.spec.jsx b/example/test/radio.spec.jsx new file mode 100644 index 000000000..7cce6ca31 --- /dev/null +++ b/example/test/radio.spec.jsx @@ -0,0 +1,32 @@ +import { mount } from '@vue/test-utils' +import { describe, expect, test, vi } from 'vitest' +import { Radio } from '@opentiny/vue' +import { nextTick, ref } from 'vue' +import { randomValues } from './common/globalConfig' + +randomValues(global) + +let value = '' + +describe('radio', () => { + test('disabled', async () => { + const wrapper = mount(() => ) + expect(wrapper.find('.is-disabled').exists()).toBe(true) + }) + + test('slot', async () => { + const wrapper = mount(() => 选项描述 + }}>) + expect(wrapper.find('.des').text()).toBe('选项描述') + }) + + test('events', async () => { + const change = vi.fn() + const wrapper = mount(() => ) + await wrapper.find('.tiny-radio__input').trigger('click') + await nextTick() + expect(change).toHaveBeenCalled() + + }) +}) diff --git a/example/test/search.spec.jsx b/example/test/search.spec.jsx new file mode 100644 index 000000000..a91a86dac --- /dev/null +++ b/example/test/search.spec.jsx @@ -0,0 +1,55 @@ +import { mount } from '@vue/test-utils' +import { describe, expect, test, vi } from 'vitest' +import { Search } from '@opentiny/vue' +import { nextTick, ref } from 'vue' +import { randomValues } from './common/globalConfig' + +randomValues(global) + +let value = '' + +describe('search', () => { + test('searchTypes', async () => { + const searchTypes = [ + { + text: '找人', + value: 1 + }, + { + text: '找文档', + value: 2 + } + ] + const wrapper = mount(() => ) + expect(wrapper.find('.tiny-search__text').exists()).toBe(true) + }) + + + test('slot', async () => { + const searchTypes1 = [ + { + text: '插槽1', + value: 1 + }, + { + text: '插槽2', + value: 2 + } + ] + const wrapper = mount(() => {slotScope.slotScope.text} + }}>) + expect(wrapper.find('.tiny-search__selector').attributes().style).toBe('display: none;') + await wrapper.find('.tiny-search__present').trigger('click') + await nextTick() + expect(wrapper.find('.tiny-search__selector').attributes().style).not.toHaveProperty('display', 'none') + }) + + test('events', async () => { + const handleSearch = vi.fn() + const wrapper = mount(() => ) + await wrapper.find('a').trigger('click') + await nextTick() + expect(handleSearch).toHaveBeenCalled() + }) +}) diff --git a/example/test/select.spec.jsx b/example/test/select.spec.jsx new file mode 100644 index 000000000..521ae9657 --- /dev/null +++ b/example/test/select.spec.jsx @@ -0,0 +1,74 @@ +import { mount } from '@vue/test-utils' +import { describe, expect, test, vi } from 'vitest' +import { Select, Option } from '@opentiny/vue' +import { nextTick, ref } from 'vue' +import { randomValues } from './common/globalConfig' + +randomValues(global) + +const _mount = (template, data, otherObj) => + mount( + { + components: { + 'tiny-select': Select, + 'tiny-option': Option + }, + template, + data, + ...otherObj, + }, + { + attachTo: 'body', + } + ) + +describe('select', () => { + test('multiple-limit', async () => { + let wrapper = _mount( + ` + + + + + `, + () => ({ + options: [ + { + value: '选项1', + label: '黄金糕' + }, + { + value: '选项2', + label: '双皮奶' + } + ], + value: '选项2' + }) + ) + await nextTick() + await wrapper.find('input').trigger('click') + expect(document.querySelector('.is-disabled') !== null).toBe(true) + }) + + test('slot', async () => { + let value = '' + const wrapper = mount(() => ) + await wrapper.find('input').trigger('click') + expect(wrapper.find('.tips').exists()).toBe(true) + }) + + test('events', async () => { + let value = '' + const handleFocus = vi.fn() + const wrapper = mount(() => ) + await wrapper.find('input').trigger('focus') + await nextTick() + expect(handleFocus).toHaveBeenCalled() + }) +}) diff --git a/example/test/slider.spec.jsx b/example/test/slider.spec.jsx new file mode 100644 index 000000000..acb102cd0 --- /dev/null +++ b/example/test/slider.spec.jsx @@ -0,0 +1,32 @@ +import { mount } from '@vue/test-utils' +import { describe, expect, test, vi } from 'vitest' +import { Slider } from '@opentiny/vue' +import { nextTick, ref } from 'vue' +import { randomValues } from './common/globalConfig' + +randomValues(global) + +let value = 40 + +describe('slider', () => { + test('vertical', async () => { + const wrapper = mount(() => ) + expect(wrapper.find('.tiny-slider__vertical').exists()).toBe(true) + }) + + test('slot', async () => { + const wrapper = mount(() => {slotScope.slotScope}% + }}>) + expect(wrapper.find('.onlyText').text()).toBe(`${value}%`) + }) + + test('events', async () => { + const mousedown = vi.fn() + const wrapper = mount(() => ) + await wrapper.find('.tiny-slider__handle').trigger('mousedown') + await nextTick() + expect(mousedown).toHaveBeenCalled() + + }) +}) diff --git a/example/test/switch.spec.jsx b/example/test/switch.spec.jsx new file mode 100644 index 000000000..3eb13bd0e --- /dev/null +++ b/example/test/switch.spec.jsx @@ -0,0 +1,32 @@ +import { mount } from '@vue/test-utils' +import { describe, expect, test, vi } from 'vitest' +import { Switch } from '@opentiny/vue' +import { nextTick, ref } from 'vue' +import { randomValues } from './common/globalConfig' + +randomValues(global) + +let value = false + +describe('switch', () => { + test('size', async () => { + const wrapper = mount(() => ) + expect(wrapper.find('.mini').exists()).toBe(true) + }) + + test('slot', async () => { + const wrapper = mount(() => , + close: () => + }}>) + expect(wrapper.find('.no').exists()).toBe(true) + }) + + test('events', async () => { + const handleClick = vi.fn() + const wrapper = mount(() => ) + await wrapper.find('.tiny-switch').trigger('click') + await nextTick() + expect(handleClick).toHaveBeenCalled() + }) +}) diff --git a/example/test/time-picker.spec.jsx b/example/test/time-picker.spec.jsx new file mode 100644 index 000000000..395c796be --- /dev/null +++ b/example/test/time-picker.spec.jsx @@ -0,0 +1,31 @@ +import { mount } from '@vue/test-utils' +import { describe, expect, test, vi } from 'vitest' +import { TimePicker } from '@opentiny/vue' +import { nextTick, ref } from 'vue' +import { randomValues } from './common/globalConfig' +import { iconBoat } from '@opentiny/vue-icon' + +randomValues(global) + +let value = new Date(2016, 9, 10, 18, 40) + +describe('time-picker', () => { + test('readonly', async () => { + const wrapper = mount(() => ) + expect(wrapper.find('input').attributes()).toHaveProperty('readonly') + }) + + test('events', async () => { + const handleFocus = vi.fn() + const wrapper = mount(() => ) + + await wrapper.find('input').trigger('focus') + await nextTick() + expect(handleFocus).toHaveBeenCalled() + }) + + test('icon', async () => { + const wrapper = mount(() => ) + expect(wrapper.find('.tiny-svg').exists()).toBe(true) + }) +}) diff --git a/example/test/time-select.spec.jsx b/example/test/time-select.spec.jsx new file mode 100644 index 000000000..b74da8107 --- /dev/null +++ b/example/test/time-select.spec.jsx @@ -0,0 +1,35 @@ +import { mount } from '@vue/test-utils' +import { describe, expect, test, vi } from 'vitest' +import { TimeSelect } from '@opentiny/vue' +import { nextTick, ref } from 'vue' +import { randomValues } from './common/globalConfig' +import { iconBoat } from '@opentiny/vue-icon' + +randomValues(global) + +let value = '18:00' + +describe('time-select', () => { + test('placeholder', async () => { + const wrapper = mount(() => ) + expect(wrapper.find('input').attributes().placeholder).toBe('选择时间') + }) + + test('events', async () => { + const handleFocus = vi.fn() + const handleBlur = vi.fn() + const wrapper = mount(() => ) + await wrapper.find('input').trigger('focus') + await nextTick() + expect(handleFocus).toHaveBeenCalled() + await document.querySelector('.tiny-time-select__item').click() + await nextTick() + expect(handleBlur).toHaveBeenCalled() + expect(value).not.toBe('18:00') + }) + + test('icon', async () => { + const wrapper = mount(() => ) + expect(wrapper.find('.tiny-svg').exists()).toBe(true) + }) +}) diff --git a/example/vite-plugins/vite-plugin-vue-svg.js b/example/vite-plugins/vite-plugin-vue-svg.js new file mode 100644 index 000000000..b6ec5b21a --- /dev/null +++ b/example/vite-plugins/vite-plugin-vue-svg.js @@ -0,0 +1,59 @@ +const { readFileSync } = require('fs') +const SVGO = require('svgo') +const { compileTemplate } = require('@vue/compiler-sfc') + +async function compileSvgIcons(svg, id) { + let { code } = compileTemplate({ source: svg, id, transformAssetUrls: false }) + + let codeStr = code.replace('export function render', 'function render') + codeStr += '\nexport default { render };' + + return codeStr +} + +async function optimizeSvgIcons(svgIcon, content, path) { + const { data } = await svgIcon.optimize(content, { + path + }) + + return data +} + +export default (options = {}) => { + const { svgoConfig, defaultExport = 'url' } = options + const svgIcon = new SVGO(svgoConfig) + const svgRegexp = /\.svg(?:\?(component|url))?$/ + const svgCache = new Map() + + return { + name: 'vue-svg', + async transform(sourceSvg, id, isBuild) { + const svgMatch = id.match(svgRegexp) + + if (svgMatch) { + const type = svgMatch[1] + + if ((defaultExport === 'url' && typeof type === 'undefined') || type === 'url') { + return sourceSvg + } + + if ((defaultExport === 'component' && typeof type === 'undefined') || type === 'component') { + const idWithoutQuery = id.replace('.svg?component', '.svg') + let resultCache = svgCache.get(idWithoutQuery) + + if (!resultCache) { + const code = readFileSync(idWithoutQuery) + const svg = await optimizeSvgIcons(svgIcon, code, idWithoutQuery) + resultCache = await compileSvgIcons(svg, idWithoutQuery) + + if (isBuild) { + svgCache.set(idWithoutQuery, resultCache) + } + } + + return resultCache + } + } + } + } +} diff --git a/example/vite.config.js b/example/vite.config.js new file mode 100644 index 000000000..8f23b0412 --- /dev/null +++ b/example/vite.config.js @@ -0,0 +1,72 @@ +import path from 'path' +import vue from '@vitejs/plugin-vue' +import { defineConfig, loadEnv } from 'vite' +import vueJsx from '@vitejs/plugin-vue-jsx' +import markdown from 'vite-plugin-markdown-vue' +import vueSvgPlugin from './vite-plugins/vite-plugin-vue-svg' +const { getAllModules } = require('../build/module-utils') + +const pathJoin = (...args) => path.join(__dirname, ...args) +const components = getAllModules(false) +const doComponents = (alias = {}) => { + components.forEach((item) => { + alias[item.libName] = pathJoin('../', item.path) + alias[item.importName] = pathJoin('../', item.path) + if (item.type === 'component') { + alias[`@opentiny/vue-theme/${item.LowerName}/index.css`] = pathJoin(`../../tiny-vue-theme/src/${item.LowerName}/index.less`) + alias[`@opentiny/vue-theme-mobile/${item.LowerName}/index.css`] = pathJoin(`../../tiny-vue-theme-mobile/src/${item.LowerName}/index.less`) + } + }) + return alias +} +const config = { + base: './', + server: { + host: '127.0.0.1', + open: true + }, + test: { + clearMocks: true, + environment: 'jsdom', + globals: true, + transformMode: { + web: [/\.jsx$/] + } + }, + plugins: [ + markdown(), + vue({ + include: [/\.vue$/, /\.md$/] + }), + vueJsx(), + vueSvgPlugin({ + defaultExport: 'component', + svgoConfig: {} + }) + ], + resolve: { + extensions: ['.js', '.jsx', '.vue'], + alias: { + '@': pathJoin('./src'), + vue: pathJoin('./node_modules/vue/dist/vue.runtime.esm-bundler.js'), + '@opentiny/vue': pathJoin('../../tiny-vue/packages'), + '@opentiny/vue-locale/vue2': pathJoin('../../tiny-vue/packages/locale/vue3'), + '@opentiny/vue-locale': pathJoin('../../tiny-vue/packages/locale'), + '@opentiny/vue-common/adapter/vue2': pathJoin('../../tiny-vue/packages/common/adapter/vue3'), + '@opentiny/vue-common': pathJoin('../../tiny-vue/packages/common'), + '@opentiny/vue-renderless': pathJoin('../../tiny-vue-renderless/src'), + '@opentiny/vue-icon': pathJoin('../../tiny-vue/packages/icon/index.js'), + '@opentiny/tiny-icon': pathJoin('../../tiny-vue/packages/icon/index.js'), + '@opentiny/tiny-theme/base/index.css': pathJoin('../../tiny-vue-theme/src/base/index.less'), + '@opentiny/tiny-theme/theme-tool.js': pathJoin('../../tiny-vue-theme/src/theme-tool.js'), + '@opentiny/tiny-theme/theme': pathJoin('../../tiny-vue-theme/src/theme/index.js'), + '@opentiny/tiny-theme-mobile/base/index.css': pathJoin('../../tiny-vue-theme-mobile/src/base/index.less'), + ...doComponents() + } + }, + define: { + 'process.env': process.env + } +} + +export default defineConfig(() => config) diff --git a/index.html b/index.html new file mode 100644 index 000000000..06a752a3c --- /dev/null +++ b/index.html @@ -0,0 +1,13 @@ + + + + + + + Tiny Vue + + +
+ + + \ No newline at end of file diff --git a/lerna.json b/lerna.json new file mode 100644 index 000000000..ee7c4d908 --- /dev/null +++ b/lerna.json @@ -0,0 +1,4 @@ +{ + "packages": ["example", "packages/**"], + "version": "0.0.0" +} diff --git a/logo.svg b/logo.svg new file mode 100644 index 000000000..59d1b063b --- /dev/null +++ b/logo.svg @@ -0,0 +1,44 @@ + + + logo-top + + + + + + + + + + + + + + + + + + + + + + + + + + + + OpenTiny + + + + + + + + + + + + + \ No newline at end of file diff --git a/modules.json b/modules.json new file mode 100644 index 000000000..53284828a --- /dev/null +++ b/modules.json @@ -0,0 +1,1153 @@ +{ + "ActionMenu": { + "path": "packages/action-menu/index.js", + "type": "component", + "exclude": false + }, + "ActionSheet": { + "path": "packages/action-sheet/index.js", + "type": "component", + "exclude": false, + "onlyMode": "mobile" + }, + "Alert": { + "path": "packages/alert/index.js", + "type": "component", + "exclude": false + }, + "AlertMobile": { + "path": "packages/alert/src/mobile.vue", + "type": "template", + "exclude": false + }, + "AlertPc": { + "path": "packages/alert/src/pc.vue", + "type": "template", + "exclude": false + }, + "Autocomplete": { + "path": "packages/autocomplete/index.js", + "type": "component", + "exclude": false + }, + "AutocompletePc": { + "path": "packages/autocomplete/src/pc.vue", + "type": "template", + "exclude": false + }, + "Avatar": { + "path": "packages/avatar/index.js", + "type": "component", + "exclude": false, + "onlyMode": "mobile" + }, + "Badge": { + "path": "packages/badge/index.js", + "type": "component", + "exclude": false + }, + "BadgeMobile": { + "path": "packages/badge/src/mobile.vue", + "type": "template", + "exclude": false + }, + "BadgePc": { + "path": "packages/badge/src/pc.vue", + "type": "template", + "exclude": false + }, + "Breadcrumb": { + "path": "packages/breadcrumb/index.js", + "type": "component", + "exclude": false + }, + "BreadcrumbItem": { + "path": "packages/breadcrumb-item/index.js", + "type": "component", + "exclude": false + }, + "BreadcrumbItemPc": { + "path": "packages/breadcrumb-item/src/pc.vue", + "type": "template", + "exclude": false + }, + "BreadcrumbPc": { + "path": "packages/breadcrumb/src/pc.vue", + "type": "template", + "exclude": false + }, + "BulletinBoard": { + "path": "packages/bulletin-board/index.js", + "type": "component", + "exclude": false + }, + "BulletinBoardPc": { + "path": "packages/bulletin-board/src/pc.vue", + "type": "template", + "exclude": false + }, + "Button": { + "path": "packages/button/index.js", + "type": "component", + "exclude": false + }, + "ButtonGroup": { + "path": "packages/button-group/index.js", + "type": "component", + "exclude": false + }, + "ButtonGroupPc": { + "path": "packages/button-group/src/pc.vue", + "type": "template", + "exclude": false + }, + "ButtonMobile": { + "path": "packages/button/src/mobile.vue", + "type": "template", + "exclude": false + }, + "ButtonPc": { + "path": "packages/button/src/pc.vue", + "type": "template", + "exclude": false + }, + "Calendar": { + "path": "packages/calendar/index.js", + "type": "component", + "exclude": false + }, + "CalendarPc": { + "path": "packages/calendar/src/pc.vue", + "type": "template", + "exclude": false + }, + "CardTemplate": { + "path": "packages/card-template/index.js", + "type": "component", + "exclude": false + }, + "CardTemplatePc": { + "path": "packages/card-template/src/pc.vue", + "type": "template", + "exclude": false + }, + "Carousel": { + "path": "packages/carousel/index.js", + "type": "component", + "exclude": false + }, + "CarouselItem": { + "path": "packages/carousel-item/index.js", + "type": "component", + "exclude": false + }, + "CarouselItemPc": { + "path": "packages/carousel-item/src/pc.vue", + "type": "template", + "exclude": false + }, + "CarouselPc": { + "path": "packages/carousel/src/pc.vue", + "type": "template", + "exclude": false + }, + "Cascader": { + "path": "packages/cascader/index.js", + "type": "component", + "exclude": false + }, + "CascaderMenu": { + "path": "packages/cascader-menu/index.js", + "type": "component", + "exclude": false + }, + "CascaderNode": { + "path": "packages/cascader-node/index.js", + "type": "component", + "exclude": false + }, + "CascaderPanel": { + "path": "packages/cascader-panel/index.js", + "type": "component", + "exclude": false + }, + "CascaderPc": { + "path": "packages/cascader/src/pc.vue", + "type": "template", + "exclude": false + }, + "Checkbox": { + "path": "packages/checkbox/index.js", + "type": "component", + "exclude": false + }, + "CheckboxButton": { + "path": "packages/checkbox-button/index.js", + "type": "component", + "exclude": false + }, + "CheckboxButtonPc": { + "path": "packages/checkbox-button/src/pc.vue", + "type": "template", + "exclude": false + }, + "CheckboxGroup": { + "path": "packages/checkbox-group/index.js", + "type": "component", + "exclude": false + }, + "CheckboxGroupMobile": { + "path": "packages/checkbox-group/src/mobile.vue", + "type": "template", + "exclude": false + }, + "CheckboxGroupPc": { + "path": "packages/checkbox-group/src/pc.vue", + "type": "template", + "exclude": false + }, + "CheckboxMobile": { + "path": "packages/checkbox/src/mobile.vue", + "type": "template", + "exclude": false + }, + "CheckboxPc": { + "path": "packages/checkbox/src/pc.vue", + "type": "template", + "exclude": false + }, + "Col": { + "path": "packages/col/index.js", + "type": "component", + "exclude": false + }, + "ColPc": { + "path": "packages/col/src/pc.vue", + "type": "template", + "exclude": false + }, + "Collapse": { + "path": "packages/collapse/index.js", + "type": "component", + "exclude": false + }, + "CollapseItem": { + "path": "packages/collapse-item/index.js", + "type": "component", + "exclude": false + }, + "CollapseItemPc": { + "path": "packages/collapse-item/src/pc.vue", + "type": "template", + "exclude": false + }, + "CollapsePc": { + "path": "packages/collapse/src/pc.vue", + "type": "template", + "exclude": false + }, + "CollapseTransition": { + "path": "packages/collapse-transition/index.js", + "type": "component", + "exclude": false + }, + "Container": { + "path": "packages/container/index.js", + "type": "component", + "exclude": false + }, + "ContainerPc": { + "path": "packages/container/src/pc.vue", + "type": "template", + "exclude": false + }, + "CreditCard": { + "path": "packages/credit-card/index.js", + "type": "component", + "exclude": false + }, + "CreditCardForm": { + "path": "packages/credit-card-form/index.js", + "type": "component", + "exclude": false + }, + "CreditCardFormPc": { + "path": "packages/credit-card-form/src/pc.vue", + "type": "template", + "exclude": false + }, + "CreditCardPc": { + "path": "packages/credit-card/src/pc.vue", + "type": "template", + "exclude": false + }, + "Crop": { + "path": "packages/crop/index.js", + "type": "component", + "exclude": false + }, + "DatePanel": { + "path": "packages/date-panel/index.js", + "type": "component", + "exclude": false + }, + "DatePicker": { + "path": "packages/date-picker/index.js", + "type": "component", + "exclude": false, + "onlyMode": "all" + }, + "DatePickerMobile": { + "path": "packages/date-picker/src/mobile.vue", + "type": "template", + "exclude": false + }, + "DatePickerPc": { + "path": "packages/date-picker/src/pc.vue", + "type": "template", + "exclude": false + }, + "DateRange": { + "path": "packages/date-range/index.js", + "type": "component", + "exclude": false + }, + "DateTable": { + "path": "packages/date-table/index.js", + "type": "component", + "exclude": false + }, + "DetailPage": { + "path": "packages/detail-page/index.js", + "type": "component", + "exclude": false + }, + "DetailPagePc": { + "path": "packages/detail-page/src/pc.vue", + "type": "template", + "exclude": false + }, + "DialogBox": { + "path": "packages/dialog-box/index.js", + "type": "component", + "exclude": false + }, + "DialogBoxMobile": { + "path": "packages/dialog-box/src/mobile.vue", + "type": "template", + "exclude": false + }, + "DialogBoxPc": { + "path": "packages/dialog-box/src/pc.vue", + "type": "template", + "exclude": false + }, + "DropTimes": { + "path": "packages/drop-times/index.js", + "type": "component", + "exclude": false + }, + "DropTimesPc": { + "path": "packages/drop-times/src/pc.vue", + "type": "template", + "exclude": false + }, + "Dropdown": { + "path": "packages/dropdown/index.js", + "type": "component", + "exclude": false + }, + "DropdownItem": { + "path": "packages/dropdown-item/index.js", + "type": "component", + "exclude": false, + "onlyMode": "mobile" + }, + "DropdownItemMobile": { + "path": "packages/dropdown-item/src/mobile.vue", + "type": "template", + "exclude": false + }, + "DropdownItemPc": { + "path": "packages/dropdown-item/src/pc.vue", + "type": "template", + "exclude": false + }, + "DropdownMenu": { + "path": "packages/dropdown-menu/index.js", + "type": "component", + "exclude": false, + "onlyMode": "mobile" + }, + "DropdownMenuMobile": { + "path": "packages/dropdown-menu/src/mobile.vue", + "type": "template", + "exclude": false + }, + "DropdownMenuPc": { + "path": "packages/dropdown-menu/src/pc.vue", + "type": "template", + "exclude": false + }, + "Exception": { + "path": "packages/exception/index.js", + "type": "component", + "exclude": false, + "onlyMode": "mobile" + }, + "FallMenu": { + "path": "packages/fall-menu/index.js", + "type": "component", + "exclude": false + }, + "FallMenuPc": { + "path": "packages/fall-menu/src/pc.vue", + "type": "template", + "exclude": false + }, + "FileUpload": { + "path": "packages/file-upload/index.js", + "type": "component", + "exclude": false + }, + "FileUploadMobile": { + "path": "packages/file-upload/src/mobile.vue", + "type": "template", + "exclude": false + }, + "FileUploadPc": { + "path": "packages/file-upload/src/pc.vue", + "type": "template", + "exclude": false + }, + "Floatbar": { + "path": "packages/floatbar/index.js", + "type": "component", + "exclude": false + }, + "FloatbarPc": { + "path": "packages/floatbar/src/pc.vue", + "type": "template", + "exclude": false + }, + "Form": { + "path": "packages/form/index.js", + "type": "component", + "exclude": false + }, + "FormItem": { + "path": "packages/form-item/index.js", + "type": "component", + "exclude": false, + "onlyMode": "all" + }, + "FormMobile": { + "path": "packages/form/src/mobile.vue", + "type": "template", + "exclude": false + }, + "FormPc": { + "path": "packages/form/src/pc.vue", + "type": "template", + "exclude": false + }, + "Fullscreen": { + "path": "packages/fullscreen/index.js", + "type": "component", + "exclude": false, + "onlyMode": "all" + }, + "Grid": { + "path": "packages/grid/index.js", + "type": "component", + "exclude": false + }, + "GridColumn": { + "path": "packages/grid-column/index.js", + "type": "component", + "exclude": false + }, + "GridManager": { + "path": "packages/grid-manager/index.js", + "type": "component", + "exclude": false + }, + "GridToolbar": { + "path": "packages/grid-toolbar/index.js", + "type": "component", + "exclude": false + }, + "GridToolbarCustom": { + "path": "packages/grid-toolbar/src/custom.vue", + "type": "template", + "exclude": false + }, + "GridToolbarCustom-switch": { + "path": "packages/grid-toolbar/src/custom-switch.vue", + "type": "template", + "exclude": false + }, + "Image": { + "path": "packages/image/index.js", + "type": "component", + "exclude": false + }, + "ImagePc": { + "path": "packages/image/src/pc.vue", + "type": "template", + "exclude": false + }, + "ImageViewer": { + "path": "packages/image-viewer/index.js", + "type": "component", + "exclude": false + }, + "ImageViewerMobile": { + "path": "packages/image-viewer/src/mobile.vue", + "type": "template", + "exclude": false + }, + "ImageViewerPc": { + "path": "packages/image-viewer/src/pc.vue", + "type": "template", + "exclude": false + }, + "Input": { + "path": "packages/input/index.js", + "type": "component", + "exclude": false + }, + "InputMobile": { + "path": "packages/input/src/mobile.vue", + "type": "template", + "exclude": false + }, + "InputPc": { + "path": "packages/input/src/pc.vue", + "type": "template", + "exclude": false + }, + "InputTall-storage": { + "path": "packages/input/src/tall-storage.vue", + "type": "template", + "exclude": false + }, + "IpAddress": { + "path": "packages/ip-address/index.js", + "type": "component", + "exclude": false + }, + "IpAddressPc": { + "path": "packages/ip-address/src/pc.vue", + "type": "template", + "exclude": false + }, + "Layout": { + "path": "packages/layout/index.js", + "type": "component", + "exclude": false + }, + "LayoutPc": { + "path": "packages/layout/src/pc.vue", + "type": "template", + "exclude": false + }, + "Link": { + "path": "packages/link/index.js", + "type": "component", + "exclude": false + }, + "LinkMenu": { + "path": "packages/link-menu/index.js", + "type": "component", + "exclude": false + }, + "LinkMenuPc": { + "path": "packages/link-menu/src/pc.vue", + "type": "template", + "exclude": false + }, + "LinkPc": { + "path": "packages/link/src/pc.vue", + "type": "template", + "exclude": false + }, + "List": { + "path": "packages/list/index.js", + "type": "component", + "exclude": false, + "onlyMode": "mobile" + }, + "Loading": { + "path": "packages/loading/index.js", + "type": "component", + "exclude": false + }, + "Milestone": { + "path": "packages/milestone/index.js", + "type": "component", + "exclude": false + }, + "MilestonePc": { + "path": "packages/milestone/src/pc.vue", + "type": "template", + "exclude": false + }, + "MiniPicker": { + "path": "packages/mini-picker/index.js", + "type": "component", + "exclude": false, + "onlyMode": "mobile" + }, + "Modal": { + "path": "packages/modal/index.js", + "type": "component", + "exclude": false + }, + "MonthRange": { + "path": "packages/month-range/index.js", + "type": "component", + "exclude": false + }, + "MonthTable": { + "path": "packages/month-table/index.js", + "type": "component", + "exclude": false + }, + "NavBar": { + "path": "packages/nav-bar/index.js", + "type": "component", + "exclude": false, + "onlyMode": "mobile" + }, + "NavMenu": { + "path": "packages/nav-menu/index.js", + "type": "component", + "exclude": false + }, + "NavMenuPc": { + "path": "packages/nav-menu/src/pc.vue", + "type": "template", + "exclude": false + }, + "Notify": { + "path": "packages/notify/index.js", + "type": "component", + "exclude": false + }, + "Numeric": { + "path": "packages/numeric/index.js", + "type": "component", + "exclude": false + }, + "NumericMobile": { + "path": "packages/numeric/src/mobile.vue", + "type": "template", + "exclude": false + }, + "NumericPc": { + "path": "packages/numeric/src/pc.vue", + "type": "template", + "exclude": false + }, + "Option": { + "path": "packages/option/index.js", + "type": "component", + "exclude": false + }, + "OptionGroup": { + "path": "packages/option-group/index.js", + "type": "component", + "exclude": false + }, + "Pager": { + "path": "packages/pager/index.js", + "type": "component", + "exclude": false + }, + "PagerItem": { + "path": "packages/pager-item/index.js", + "type": "component", + "exclude": false, + "private": "Pager" + }, + "Panel": { + "path": "packages/panel/index.js", + "type": "component", + "exclude": true + }, + "PanelPc": { + "path": "packages/panel/src/pc.vue", + "type": "template", + "exclude": false + }, + "Picker": { + "path": "packages/picker/index.js", + "type": "component", + "exclude": false + }, + "PickerColumn": { + "path": "packages/picker-column/index.js", + "type": "component", + "exclude": false, + "onlyMode": "mobile" + }, + "PopUpload": { + "path": "packages/pop-upload/index.js", + "type": "component", + "exclude": false + }, + "PopUploadPc": { + "path": "packages/pop-upload/src/pc.vue", + "type": "template", + "exclude": false + }, + "Popeditor": { + "path": "packages/popeditor/index.js", + "type": "component", + "exclude": false + }, + "PopeditorPc": { + "path": "packages/popeditor/src/pc.vue", + "type": "template", + "exclude": false + }, + "Popover": { + "path": "packages/popover/index.js", + "type": "component", + "exclude": false + }, + "Popup": { + "path": "packages/popup/index.js", + "type": "component", + "exclude": false, + "onlyMode": "mobile" + }, + "Progress": { + "path": "packages/progress/index.js", + "type": "component", + "exclude": false + }, + "ProgressMobile": { + "path": "packages/progress/src/mobile.vue", + "type": "template", + "exclude": false + }, + "ProgressPc": { + "path": "packages/progress/src/pc.vue", + "type": "template", + "exclude": false + }, + "PullRefresh": { + "path": "packages/pull-refresh/index.js", + "type": "component", + "exclude": false, + "onlyMode": "mobile" + }, + "Radio": { + "path": "packages/radio/index.js", + "type": "component", + "exclude": false + }, + "RadioButton": { + "path": "packages/radio-button/index.js", + "type": "component", + "exclude": false + }, + "RadioButtonPc": { + "path": "packages/radio-button/src/pc.vue", + "type": "template", + "exclude": false + }, + "RadioGroup": { + "path": "packages/radio-group/index.js", + "type": "component", + "exclude": false + }, + "RadioGroupPc": { + "path": "packages/radio-group/src/pc.vue", + "type": "template", + "exclude": false + }, + "RadioMobile": { + "path": "packages/radio/src/mobile.vue", + "type": "template", + "exclude": false + }, + "RadioPc": { + "path": "packages/radio/src/pc.vue", + "type": "template", + "exclude": false + }, + "Rate": { + "path": "packages/rate/index.js", + "type": "component", + "exclude": false + }, + "RatePc": { + "path": "packages/rate/src/pc.vue", + "type": "template", + "exclude": false + }, + "Row": { + "path": "packages/row/index.js", + "type": "component", + "exclude": false + }, + "RowPc": { + "path": "packages/row/src/pc.vue", + "type": "template", + "exclude": false + }, + "ScrollText": { + "path": "packages/scroll-text/index.js", + "type": "component", + "exclude": false + }, + "ScrollTextPc": { + "path": "packages/scroll-text/src/pc.vue", + "type": "template", + "exclude": false + }, + "Scrollbar": { + "path": "packages/scrollbar/index.js", + "type": "component", + "exclude": false + }, + "ScrollbarBar": { + "path": "packages/scrollbar/src/bar.vue", + "type": "template", + "exclude": false + }, + "Search": { + "path": "packages/search/index.js", + "type": "component", + "exclude": false + }, + "SearchMobile": { + "path": "packages/search/src/mobile.vue", + "type": "template", + "exclude": false + }, + "SearchPc": { + "path": "packages/search/src/pc.vue", + "type": "template", + "exclude": false + }, + "Select": { + "path": "packages/select/index.js", + "type": "component", + "exclude": false + }, + "SelectDropdown": { + "path": "packages/select-dropdown/index.js", + "type": "component", + "exclude": false + }, + "SelectDropdownPc": { + "path": "packages/select-dropdown/src/pc.vue", + "type": "template", + "exclude": false + }, + "SelectPc": { + "path": "packages/select/src/pc.vue", + "type": "template", + "exclude": false + }, + "SlideBar": { + "path": "packages/slide-bar/index.js", + "type": "component", + "exclude": false + }, + "SlideBarPc": { + "path": "packages/slide-bar/src/pc.vue", + "type": "template", + "exclude": false + }, + "Slider": { + "path": "packages/slider/index.js", + "type": "component", + "exclude": false + }, + "SliderMobile": { + "path": "packages/slider/src/mobile.vue", + "type": "template", + "exclude": false + }, + "SliderPc": { + "path": "packages/slider/src/pc.vue", + "type": "template", + "exclude": false + }, + "Split": { + "path": "packages/split/index.js", + "type": "component", + "exclude": false + }, + "SplitPc": { + "path": "packages/split/src/pc.vue", + "type": "template", + "exclude": false + }, + "Steps": { + "path": "packages/steps/index.js", + "type": "component", + "exclude": false + }, + "StepsPc": { + "path": "packages/steps/src/pc.vue", + "type": "template", + "exclude": false + }, + "SvgIcon": { + "path": "packages/svg-icon/index.js", + "type": "component", + "exclude": false + }, + "Switch": { + "path": "packages/switch/index.js", + "type": "component", + "exclude": false + }, + "SwitchMobile": { + "path": "packages/switch/src/mobile.vue", + "type": "template", + "exclude": false + }, + "SwitchPc": { + "path": "packages/switch/src/pc.vue", + "type": "template", + "exclude": false + }, + "TabItem": { + "path": "packages/tab-item/index.js", + "type": "component", + "exclude": false, + "onlyMode": "all" + }, + "Tabbar": { + "path": "packages/tabbar/index.js", + "type": "component", + "exclude": false, + "onlyMode": "mobile" + }, + "TabbarItem": { + "path": "packages/tabbar-item/index.js", + "type": "component", + "exclude": false, + "onlyMode": "mobile" + }, + "TabbarItemMobile": { + "path": "packages/tabbar-item/src/mobile.vue", + "type": "template", + "exclude": false, + "onlyMode": "mobile" + }, + "Table": { + "path": "packages/table/index.js", + "type": "component", + "exclude": false + }, + "Tabs": { + "path": "packages/tabs/index.js", + "type": "component", + "exclude": false + }, + "TabsMobile": { + "path": "packages/tabs/src/mobile.vue", + "type": "template", + "exclude": false + }, + "TabsPc": { + "path": "packages/tabs/src/pc.vue", + "type": "template", + "exclude": false + }, + "TabsTab-navMb": { + "path": "packages/tabs/src/mb.vue", + "type": "template", + "exclude": false + }, + "TabsTab-navTab-bar": { + "path": "packages/tabs/src/tab-bar.vue", + "type": "template", + "exclude": false + }, + "Tag": { + "path": "packages/tag/index.js", + "type": "component", + "exclude": false + }, + "TagPc": { + "path": "packages/tag/src/pc.vue", + "type": "template", + "exclude": false + }, + "TextPopup": { + "path": "packages/text-popup/index.js", + "type": "component", + "exclude": false + }, + "TextPopupPc": { + "path": "packages/text-popup/src/pc.vue", + "type": "template", + "exclude": false + }, + "Time": { + "path": "packages/time/index.js", + "type": "component", + "exclude": false + }, + "TimeLine": { + "path": "packages/time-line/index.js", + "type": "component", + "exclude": false + }, + "TimeLineMobile": { + "path": "packages/time-line/src/mobile.vue", + "type": "template", + "exclude": false + }, + "TimeLinePc": { + "path": "packages/time-line/src/pc.vue", + "type": "template", + "exclude": false + }, + "TimePanel": { + "path": "packages/time-panel/index.js", + "type": "component", + "exclude": false + }, + "TimePicker": { + "path": "packages/time-picker/index.js", + "type": "component", + "exclude": false + }, + "TimeRange": { + "path": "packages/time-range/index.js", + "type": "component", + "exclude": false + }, + "TimeSelect": { + "path": "packages/time-select/index.js", + "type": "component", + "exclude": false + }, + "TimeSpinner": { + "path": "packages/time-spinner/index.js", + "type": "component", + "exclude": false + }, + "ToggleMenu": { + "path": "packages/toggle-menu/index.js", + "type": "component", + "exclude": false + }, + "ToggleMenuPc": { + "path": "packages/toggle-menu/src/pc.vue", + "type": "template", + "exclude": false + }, + "Tooltip": { + "path": "packages/tooltip/index.js", + "type": "component", + "exclude": false + }, + "TopBox": { + "path": "packages/top-box/index.js", + "type": "component", + "exclude": false + }, + "TopBoxPc": { + "path": "packages/top-box/src/pc.vue", + "type": "template", + "exclude": false + }, + "Transfer": { + "path": "packages/transfer/index.js", + "type": "component", + "exclude": false + }, + "TransferPanel": { + "path": "packages/transfer-panel/index.js", + "type": "component", + "exclude": false + }, + "TransferPc": { + "path": "packages/transfer/src/pc.vue", + "type": "template", + "exclude": false + }, + "Tree": { + "path": "packages/tree/index.js", + "type": "component", + "exclude": false + }, + "TreeMenu": { + "path": "packages/tree-menu/index.js", + "type": "component", + "exclude": false + }, + "TreePc": { + "path": "packages/tree/src/pc.vue", + "type": "template", + "exclude": false + }, + "TreeTree-node": { + "path": "packages/tree/src/tree-node.vue", + "type": "template", + "exclude": false + }, + "Upload": { + "path": "packages/upload/index.js", + "type": "component", + "exclude": false, + "onlyMode": "all" + }, + "UploadDragger": { + "path": "packages/upload-dragger/index.js", + "type": "component", + "exclude": false + }, + "UploadList": { + "path": "packages/upload-list/index.js", + "type": "component", + "exclude": false, + "onlyMode": "all" + }, + "UserContact": { + "path": "packages/user-contact/index.js", + "type": "component", + "exclude": false + }, + "UserContactPc": { + "path": "packages/user-contact/src/pc.vue", + "type": "template", + "exclude": false + }, + "UserHead": { + "path": "packages/user-head/index.js", + "type": "component", + "exclude": false + }, + "UserHeadPc": { + "path": "packages/user-head/src/pc.vue", + "type": "template", + "exclude": false + }, + "Wizard": { + "path": "packages/wizard/index.js", + "type": "component", + "exclude": false + }, + "WizardPc": { + "path": "packages/wizard/src/pc.vue", + "type": "template", + "exclude": false + }, + "YearTable": { + "path": "packages/year-table/index.js", + "type": "component", + "exclude": false + } +} diff --git a/npm-publish.js b/npm-publish.js new file mode 100644 index 000000000..ff2268b2f --- /dev/null +++ b/npm-publish.js @@ -0,0 +1,25 @@ +const { execSync } = require('child_process') +const path = require('path') +const fs = require('fs-extra') +const utils = require('./build/utils') + +const ROOTPATH = path.join(__dirname, './') + +const publish = () => { + const publishDir = path.join(ROOTPATH, 'dist') + fs.readdirSync(publishDir).forEach((item) => { + const childPath = path.join(publishDir, item) + const stat = fs.statSync(childPath) + + if (stat.isDirectory()) { + const cmd = `npm publish ./dist/${item}` + try { + execSync(cmd, { cwd: ROOTPATH }) + } catch (error) { + utils.logYellow(error) + } + } + }) +} + +publish() diff --git a/package.json b/package.json new file mode 100644 index 000000000..16343f6a1 --- /dev/null +++ b/package.json @@ -0,0 +1,133 @@ +{ + "name": "@opentiny/vue", + "version": "3.4.4", + "uiVersion": "0.1.0", + "srcVersion": "0.1.0", + "themeVersion": "3.4.4", + "description": "@opentiny/vue", + "main": "index.js", + "files": [ + "index.js", + "pc.js", + "mobile.js", + "runtime" + ], + "repository": { + "type": "git", + "url": "" + }, + "keywords": [ + "vue", + "Tiny Vue" + ], + "author": "Tiny Vue Team", + "license": "MIT", + "sideEffects": false, + "scripts": { + "dev:vue2": "npm run build:entry && vite", + "dev:vue3": "npm run build:entry && lerna run dev --scope vue-example --stream", + "postinstall": "lerna exec npm install --scope vue-example", + "clean": "rimraf dist", + "create:ui": "node build/create-ui.js", + "create:mapping": "node build/create-mapping.js", + "sync-icons": "node build/sync-icons.js", + "build:ui2": "lerna run build:ui2 --scope @opentiny/vue*", + "build:icon2": "cross-env NODE_ENV=production node build/build-icon.js", + "build:vue2": "npm run clean && npm run create:mapping && npm run build:entry && npm run build:ui2 && npm run build:icon2", + "build:ui3": "lerna run build:ui3 --scope @opentiny/vue*", + "build:icon3": "lerna run build:icon3 --scope vue-example --stream", + "build:vue3": "npm run clean && npm run create:mapping && npm run build:entry && npm run build:ui3 && npm run build:icon3", + "build:entry": "node build/build-entry.js", + "build": "npm run clean && npm run build:entry", + "build:version": "cross-env TYPE=ui node build/build-version.js", + "release3": "npm run release:ui3 && npm run release:vue3", + "release:vue3": "cross-env NPM_TAG=~3.4.4 NPM_WAREHOUSE=prod VERSION_TAG=3.4.4 node build/release.js", + "release:ui3": "cross-env NPM_TAG=~3.4.4 NPM_WAREHOUSE=prod VERSION_TAG=3.4.4 node build/release-ui.js", + "release2": "npm run release:ui2 && npm run release:vue2", + "release:vue2": "cross-env NPM_TAG=~2.0.0 NPM_WAREHOUSE=prod VERSION_TAG=2.0.0 node build/release.js", + "release:ui2": "cross-env NPM_TAG=~2.0.0 NPM_WAREHOUSE=prod VERSION_TAG=2.0.0 node build/release-ui.js", + "format": "prettier --write packages/**/*{.vue,.js} example/src/**/*{.vue,.js} build/*.js test/*.js", + "lint": "eslint packages/**/*{.vue,.js} example/src/**/*{.vue,.js} build/*.js --ignore-pattern \"packages/**/dist\" --ignore-pattern \"packages/**/node_modules\" --ignore-pattern \"packages/**/runtime\" --quiet", + "test": "lerna run test --scope vue-example --stream", + "coverage": "lerna run coverage --scope vue-example --stream", + "publishall": "node npm-publish.js", + "clean:dep": "rm -rf node_modules */node_modules && rm -rf package-lock.json example/package-lock.json", + "prepare": "husky install", + "commit": "git-cz" + }, + "devDependencies": { + "@babel/cli": "^7.5.5", + "@babel/core": "^7.18.13", + "@babel/plugin-proposal-export-default-from": "^7.7.4", + "@babel/plugin-proposal-export-namespace-from": "^7.7.4", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-jsx": "^7.2.0", + "@babel/preset-env": "^7.18.10", + "@opentiny/vue-theme": "^3.0.0", + "@rollup/plugin-alias": "^3.1.9", + "@rollup/plugin-babel": "^5.3.1", + "@rollup/plugin-commonjs": "^22.0.2", + "@rollup/plugin-node-resolve": "^13.3.0", + "@rollup/plugin-replace": "^4.0.0", + "@vitejs/plugin-vue2-jsx": "^1.0.3", + "@vue/babel-plugin-jsx": "^1.1.0", + "@vue/composition-api": "1.2.2", + "babel-eslint": "^10.1.0", + "cropperjs": "1.5.6", + "cross-env": "^7.0.3", + "eslint": "^8.25.0", + "eslint-plugin-vue": "^9.6.0", + "lerna": "^5.4.2", + "rimraf": "^3.0.0", + "rollup-plugin-postcss": "^2.0.3", + "rollup-plugin-vue": "5.0.1", + "rollup-plugin-vue-inline-svg": "~1.1.2", + "sortablejs": "^1.10.1", + "streamsaver": "^2.0.6", + "vite": "^3.0.9", + "vite-plugin-md2vue2": "^2.0.3", + "vite-plugin-vue2": "^2.0.2", + "vite-plugin-vue2-svg": "^0.3.0", + "vue": "~2.6.14", + "vue-i18n": "^8.9.0", + "vue-router": "^3.6.4", + "vue-template-compiler": "~2.6.14", + "@commitlint/cli": "^17.3.0", + "@commitlint/config-conventional": "^17.3.0", + "commitizen": "^4.2.5", + "cz-conventional-changelog": "^3.3.0", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-prettier": "^4.2.1", + "glob": "^8.0.3", + "husky": "^8.0.2", + "lint-staged": "^13.0.3", + "prettier": "^2.7.1" + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged", + "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" + } + }, + "lint-staged": { + "*.{js,ts,jsx,tsx,vue}": [ + "prettier --write", + "eslint --fix" + ] + }, + "config": { + "commitizen": { + "path": "cz-conventional-changelog" + } + }, + "browserslist": [ + "> 1%", + "last 2 versions" + ], + "engines": { + "node": ">=10.0.0" + }, + "resolutions": { + "vue-template-compiler": "~2.6.14" + } +} \ No newline at end of file diff --git a/packages/action-menu/index.js b/packages/action-menu/index.js new file mode 100644 index 000000000..7b73cbc19 --- /dev/null +++ b/packages/action-menu/index.js @@ -0,0 +1,18 @@ +import ActionMenu from './src/index.vue' +import '@opentiny/vue-theme/action-menu/index.css' + +/* istanbul ignore next */ +ActionMenu.install = function (Vue) { + Vue.component(ActionMenu.name, ActionMenu) +} + +ActionMenu.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + ActionMenu.install(window.Vue) + } +} + +export default ActionMenu diff --git a/packages/action-menu/package.json b/packages/action-menu/package.json new file mode 100644 index 000000000..11dc68f03 --- /dev/null +++ b/packages/action-menu/package.json @@ -0,0 +1,19 @@ +{ + "name": "@opentiny/vue-action-menu", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-dropdown": "~0.1.0", + "@opentiny/vue-dropdown-menu": "~0.1.0", + "@opentiny/vue-dropdown-item": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/action-menu/src/index.vue b/packages/action-menu/src/index.vue new file mode 100644 index 000000000..f4802bc6c --- /dev/null +++ b/packages/action-menu/src/index.vue @@ -0,0 +1,91 @@ + + + diff --git a/packages/action-sheet/index.js b/packages/action-sheet/index.js new file mode 100644 index 000000000..d96314c3a --- /dev/null +++ b/packages/action-sheet/index.js @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import ActionSheet from './src/index.vue' + +ActionSheet.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +ActionSheet.install = function (Vue) { + Vue.component(ActionSheet.name, ActionSheet) +} + +ActionSheet.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + ActionSheet.install(window.Vue) + } +} + +export default ActionSheet diff --git a/packages/action-sheet/package.json b/packages/action-sheet/package.json new file mode 100644 index 000000000..7237e2224 --- /dev/null +++ b/packages/action-sheet/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-action-sheet", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/action-sheet/src/index.vue b/packages/action-sheet/src/index.vue new file mode 100644 index 000000000..20046d6dd --- /dev/null +++ b/packages/action-sheet/src/index.vue @@ -0,0 +1,65 @@ + + + + diff --git a/packages/alert/index.js b/packages/alert/index.js new file mode 100644 index 000000000..00d3662aa --- /dev/null +++ b/packages/alert/index.js @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Alert from './src/index' + +/* istanbul ignore next */ +Alert.install = function (Vue) { + Vue.component(Alert.name, Alert) +} + +Alert.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Alert.install(window.Vue) + } +} + +export default Alert diff --git a/packages/alert/package.json b/packages/alert/package.json new file mode 100644 index 000000000..ebb3ddcea --- /dev/null +++ b/packages/alert/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-alert", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/alert/src/index.js b/packages/alert/src/index.js new file mode 100644 index 000000000..9c25c6297 --- /dev/null +++ b/packages/alert/src/index.js @@ -0,0 +1,78 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' +import MobileTemplate from './mobile' + +const $constants = { + ICON_MAP: { + success: 'icon-success', + error: 'icon-error', + info: 'icon-help', + warning: 'icon-warning' + }, + TITLE_MAP: { + success: 'ui.alert.success', + error: 'ui.alert.error', + info: 'ui.alert.info', + warning: 'ui.alert.warning' + } +} + +const template = (mode) => { + if (process.env.TINY_MODE === 'pc') return PCTemplate + else if (process.env.TINY_MODE === 'mobile') return MobileTemplate + else return mode === 'mobile' ? MobileTemplate : PCTemplate +} + +export default { + name: $prefix + 'Alert', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + icon: [String, Object], + type: { + type: String, + default: 'success' + }, + size: { + type: String, + default: 'normal' + }, + description: { + type: String, + default: '' + }, + title: { + type: String + }, + center: Boolean, + showIcon: { + type: Boolean, + default: true + }, + closable: { + type: Boolean, + default: true + }, + closeText: { + type: String, + default: '' + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/alert/src/mobile.vue b/packages/alert/src/mobile.vue new file mode 100644 index 000000000..8d1783e7f --- /dev/null +++ b/packages/alert/src/mobile.vue @@ -0,0 +1,44 @@ + + + + diff --git a/packages/alert/src/pc.vue b/packages/alert/src/pc.vue new file mode 100644 index 000000000..b2ae0d3ab --- /dev/null +++ b/packages/alert/src/pc.vue @@ -0,0 +1,59 @@ + + + + diff --git a/packages/autocomplete/index.js b/packages/autocomplete/index.js new file mode 100644 index 000000000..c549ff915 --- /dev/null +++ b/packages/autocomplete/index.js @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Autocomplete from './src/index' +import '@opentiny/vue-theme/autocomplete/index.css' + +Autocomplete.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +Autocomplete.install = function (Vue) { + Vue.component(Autocomplete.name, Autocomplete) +} + +Autocomplete.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Autocomplete.install(window.Vue) + } +} + +export default Autocomplete diff --git a/packages/autocomplete/package.json b/packages/autocomplete/package.json new file mode 100644 index 000000000..b8acd4b7f --- /dev/null +++ b/packages/autocomplete/package.json @@ -0,0 +1,19 @@ +{ + "name": "@opentiny/vue-autocomplete", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-input": "~0.1.0", + "@opentiny/vue-scrollbar": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0", + "@opentiny/vue-common": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/autocomplete/src/index.js b/packages/autocomplete/src/index.js new file mode 100644 index 000000000..38b1ad795 --- /dev/null +++ b/packages/autocomplete/src/index.js @@ -0,0 +1,84 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const $constants = { + WARP_CLS: '.tiny-autocomplete-suggestion__wrap', + ITEM_CLS: '.tiny-autocomplete-suggestion__list li' +} + +const template = function () { + return PCTemplate +} + +export default { + name: $prefix + 'Autocomplete', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + autofocus: Boolean, + clearable: { + type: Boolean, + default: () => false + }, + customItem: String, + debounce: { + type: Number, + default: () => 300 + }, + disabled: Boolean, + fetchSuggestions: Function, + hideLoading: Boolean, + highlightFirstItem: { + type: Boolean, + default: () => false + }, + label: String, + maxlength: Number, + minlength: Number, + modelValue: String, + name: String, + placeholder: String, + placement: { + type: String, + default: () => 'bottom-start' + }, + popperAppendToBody: { + type: Boolean, + default: () => true + }, + popperClass: String, + popperOptions: Object, + prefixIcon: [String, Object], + selectWhenUnmatched: { + type: Boolean, + default: () => false + }, + size: String, + suffixIcon: [String, Object], + triggerOnFocus: { + type: Boolean, + default: () => true + }, + valueKey: { + type: String, + default: () => 'value' + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/autocomplete/src/pc.vue b/packages/autocomplete/src/pc.vue new file mode 100644 index 000000000..cbe9eaf5d --- /dev/null +++ b/packages/autocomplete/src/pc.vue @@ -0,0 +1,122 @@ + + + + diff --git a/packages/avatar/index.js b/packages/avatar/index.js new file mode 100644 index 000000000..2290ff3f0 --- /dev/null +++ b/packages/avatar/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Avatar from './src/index.vue' +import '@opentiny/vue-theme-mobile/avatar/index.css' + +/* istanbul ignore next */ +Avatar.install = function (Vue) { + Vue.component(Avatar.name, Avatar) +} + +Avatar.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Avatar.install(window.Vue) + } +} + +export default Avatar diff --git a/packages/avatar/package.json b/packages/avatar/package.json new file mode 100644 index 000000000..f47e0cd54 --- /dev/null +++ b/packages/avatar/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-avatar", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/avatar/src/index.vue b/packages/avatar/src/index.vue new file mode 100644 index 000000000..4fe185be2 --- /dev/null +++ b/packages/avatar/src/index.vue @@ -0,0 +1,95 @@ + + diff --git a/packages/badge/index.js b/packages/badge/index.js new file mode 100644 index 000000000..eb31c9889 --- /dev/null +++ b/packages/badge/index.js @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Badge from './src/index' + +Badge.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +Badge.install = function (Vue) { + Vue.component(Badge.name, Badge) +} + +Badge.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Badge.install(window.Vue) + } +} + +export default Badge diff --git a/packages/badge/package.json b/packages/badge/package.json new file mode 100644 index 000000000..14ce10713 --- /dev/null +++ b/packages/badge/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-badge", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/badge/src/index.js b/packages/badge/src/index.js new file mode 100644 index 000000000..f6831b9e8 --- /dev/null +++ b/packages/badge/src/index.js @@ -0,0 +1,59 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' +import MobileTemplate from './mobile' + +const template = (mode) => { + if (process.env.TINY_MODE === 'pc') { + return PCTemplate + } else if (process.env.TINY_MODE === 'mobile') { + return MobileTemplate + } else { + return mode === 'mobile' ? MobileTemplate : PCTemplate + } +} + +export default { + name: $prefix + 'Badge', + props: { + ...$props, + isDot: { + type: Boolean, + default: false + }, + isFixed: { + type: Boolean, + default: true + }, + isMini: { + type: Boolean, + default: false + }, + max: Number, + value: [String, Number], + modelValue: [String, Number], + href: String, + target: String, + hidden: { + type: Boolean, + default: false + }, + type: { + type: String, + validator: (value) => ~['primary', 'success', 'warning', 'info', 'danger'].indexOf(value) + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/badge/src/mobile.vue b/packages/badge/src/mobile.vue new file mode 100644 index 000000000..da09535e8 --- /dev/null +++ b/packages/badge/src/mobile.vue @@ -0,0 +1,48 @@ + + + + diff --git a/packages/badge/src/pc.vue b/packages/badge/src/pc.vue new file mode 100644 index 000000000..a29f3752c --- /dev/null +++ b/packages/badge/src/pc.vue @@ -0,0 +1,39 @@ + + + + diff --git a/packages/breadcrumb-item/index.js b/packages/breadcrumb-item/index.js new file mode 100644 index 000000000..a9b7eac1f --- /dev/null +++ b/packages/breadcrumb-item/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import BreadcrumbItem from './src/index' +import '@opentiny/vue-theme/breadcrumb-item/index.css' + +/* istanbul ignore next */ +BreadcrumbItem.install = function (Vue) { + Vue.component(BreadcrumbItem.name, BreadcrumbItem) +} + +BreadcrumbItem.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + BreadcrumbItem.install(window.Vue) + } +} + +export default BreadcrumbItem diff --git a/packages/breadcrumb-item/package.json b/packages/breadcrumb-item/package.json new file mode 100644 index 000000000..2e01797e0 --- /dev/null +++ b/packages/breadcrumb-item/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-breadcrumb-item", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/breadcrumb-item/src/index.js b/packages/breadcrumb-item/src/index.js new file mode 100644 index 000000000..197b479cb --- /dev/null +++ b/packages/breadcrumb-item/src/index.js @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const template = () => PCTemplate + +export default { + name: $prefix + 'BreadcrumbItem', + props: { + ...$props, + to: Object, + replace: { + type: Boolean, + default: false + }, + option: { + type: Object, + default: () => ({}) + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/breadcrumb-item/src/pc.vue b/packages/breadcrumb-item/src/pc.vue new file mode 100644 index 000000000..9a4482e5f --- /dev/null +++ b/packages/breadcrumb-item/src/pc.vue @@ -0,0 +1,36 @@ + + + + diff --git a/packages/breadcrumb/index.js b/packages/breadcrumb/index.js new file mode 100644 index 000000000..763521134 --- /dev/null +++ b/packages/breadcrumb/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Breadcrumb from './src/index' +import '@opentiny/vue-theme/breadcrumb/index.css' + +/* istanbul ignore next */ +Breadcrumb.install = function (Vue) { + Vue.component(Breadcrumb.name, Breadcrumb) +} + +Breadcrumb.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Breadcrumb.install(window.Vue) + } +} + +export default Breadcrumb diff --git a/packages/breadcrumb/package.json b/packages/breadcrumb/package.json new file mode 100644 index 000000000..713dc32a4 --- /dev/null +++ b/packages/breadcrumb/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-breadcrumb", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/breadcrumb/src/index.js b/packages/breadcrumb/src/index.js new file mode 100644 index 000000000..e8c5134cd --- /dev/null +++ b/packages/breadcrumb/src/index.js @@ -0,0 +1,49 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const template = () => PCTemplate +const $constants = { + EVENT_NAME: { + breadcrumbItemSelect: 'breadcrumbItemSelect' + } +} + +export default { + name: $prefix + 'Breadcrumb', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + separator: { + type: String, + default: '>' + }, + separatorIcon: { + type: Object + }, + textField: { + type: String, + default: 'label' + }, + options: { + type: Array, + default: () => [] + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/breadcrumb/src/pc.vue b/packages/breadcrumb/src/pc.vue new file mode 100644 index 000000000..6ba61564c --- /dev/null +++ b/packages/breadcrumb/src/pc.vue @@ -0,0 +1,41 @@ + + + + diff --git a/packages/bulletin-board/index.js b/packages/bulletin-board/index.js new file mode 100644 index 000000000..b5bc7634b --- /dev/null +++ b/packages/bulletin-board/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import BulletinBoard from './src/index' +import '@opentiny/vue-theme/bulletin-board/index.css' + +/* istanbul ignore next */ +BulletinBoard.install = function (Vue) { + Vue.component(BulletinBoard.name, BulletinBoard) +} + +BulletinBoard.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + BulletinBoard.install(window.Vue) + } +} + +export default BulletinBoard diff --git a/packages/bulletin-board/package.json b/packages/bulletin-board/package.json new file mode 100644 index 000000000..f04ac815a --- /dev/null +++ b/packages/bulletin-board/package.json @@ -0,0 +1,19 @@ +{ + "name": "@opentiny/vue-bulletin-board", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-tabs": "~0.1.0", + "@opentiny/vue-tab-item": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/bulletin-board/src/index.js b/packages/bulletin-board/src/index.js new file mode 100644 index 000000000..2a1eebcce --- /dev/null +++ b/packages/bulletin-board/src/index.js @@ -0,0 +1,48 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const template = () => PCTemplate + +export default { + name: $prefix + 'BulletinBoard', + props: { + ...$props, + title: String, + icon: [Object, String], + showMore: { + type: Boolean, + default: true + }, + moreLink: { + type: Object, + default: () => {} + }, + tabTitle: { + type: Array, + required: true, + validator: (value) => Array.isArray(value) && value.length > 0 + }, + activeName: { + type: String, + default: '1' + }, + data: { + type: Array, + required: true + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/bulletin-board/src/pc.vue b/packages/bulletin-board/src/pc.vue new file mode 100644 index 000000000..8fc7114e8 --- /dev/null +++ b/packages/bulletin-board/src/pc.vue @@ -0,0 +1,70 @@ + + + + diff --git a/packages/button-group/index.js b/packages/button-group/index.js new file mode 100644 index 000000000..c3335dd7a --- /dev/null +++ b/packages/button-group/index.js @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import ButtonGroup from './src/index' +import '@opentiny/vue-theme/button-group/index.css' + +ButtonGroup.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +ButtonGroup.install = function (Vue) { + Vue.component(ButtonGroup.name, ButtonGroup) +} + +ButtonGroup.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + ButtonGroup.install(window.Vue) + } +} + +export default ButtonGroup diff --git a/packages/button-group/package.json b/packages/button-group/package.json new file mode 100644 index 000000000..d4948aac5 --- /dev/null +++ b/packages/button-group/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-button-group", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/button-group/src/index.js b/packages/button-group/src/index.js new file mode 100644 index 000000000..3af3faa89 --- /dev/null +++ b/packages/button-group/src/index.js @@ -0,0 +1,48 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const template = () => PCTemplate + +export default { + name: $prefix + 'ButtonGroup', + provide() { + return { + buttonGroup: this + } + }, + props: { + ...$props, + size: String, + data: Array, + plain: Boolean, + modelValue: [String, Number], + disabled: Boolean, + valueField: { + type: String, + default: 'value' + }, + textField: { + type: String, + default: 'text' + }, + showMore: Number, + showEdit: { + type: Boolean, + default: false + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/button-group/src/pc.vue b/packages/button-group/src/pc.vue new file mode 100644 index 000000000..c33219a49 --- /dev/null +++ b/packages/button-group/src/pc.vue @@ -0,0 +1,87 @@ + + + + diff --git a/packages/button/index.js b/packages/button/index.js new file mode 100644 index 000000000..93ac0e63b --- /dev/null +++ b/packages/button/index.js @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Button from './src/index' + +/* istanbul ignore next */ +Button.install = function (Vue) { + Vue.component(Button.name, Button) +} + +Button.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Button.install(window.Vue) + } +} + +export default Button diff --git a/packages/button/package.json b/packages/button/package.json new file mode 100644 index 000000000..eb09f13e2 --- /dev/null +++ b/packages/button/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-button", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/button/src/index.js b/packages/button/src/index.js new file mode 100644 index 000000000..340805cfe --- /dev/null +++ b/packages/button/src/index.js @@ -0,0 +1,63 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' +import MobileTemplate from './mobile' + +const template = (mode) => { + if (process.env.TINY_MODE === 'pc') return PCTemplate + else if (process.env.TINY_MODE === 'mobile') return MobileTemplate + else return mode === 'mobile' ? MobileTemplate : PCTemplate +} + +export default { + name: $prefix + 'Button', + inject: { + buttonGroup: { + default: '' + } + }, + props: { + ...$props, + type: { + type: String, + default: 'default' + }, + tabindex: { type: String, default: '1' }, + icon: { + type: [Object, String], + default: '' + }, + text: { + type: String, + default: '' + }, + resetTime: { + type: Number, + default: 1000 + }, + nativeType: { + type: String, + default: 'button' + }, + size: String, + round: Boolean, + plain: Boolean, + circle: Boolean, + loading: Boolean, + disabled: Boolean, + autofocus: Boolean + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/button/src/mobile.vue b/packages/button/src/mobile.vue new file mode 100644 index 000000000..7b1b2b45a --- /dev/null +++ b/packages/button/src/mobile.vue @@ -0,0 +1,53 @@ + + + + diff --git a/packages/button/src/pc.vue b/packages/button/src/pc.vue new file mode 100644 index 000000000..cede11b37 --- /dev/null +++ b/packages/button/src/pc.vue @@ -0,0 +1,56 @@ + + + + diff --git a/packages/calendar/index.js b/packages/calendar/index.js new file mode 100644 index 000000000..67d90b8ba --- /dev/null +++ b/packages/calendar/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Calendar from './src/index' +import '@opentiny/vue-theme/calendar/index.css' + +/* istanbul ignore next */ +Calendar.install = function (Vue) { + Vue.component(Calendar.name, Calendar) +} + +Calendar.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Calendar.install(window.Vue) + } +} + +export default Calendar diff --git a/packages/calendar/package.json b/packages/calendar/package.json new file mode 100644 index 000000000..89a3956f8 --- /dev/null +++ b/packages/calendar/package.json @@ -0,0 +1,19 @@ +{ + "name": "@opentiny/vue-calendar", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-tooltip": "~0.1.0", + "@opentiny/vue-popover": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/calendar/src/index.js b/packages/calendar/src/index.js new file mode 100644 index 000000000..eb28d4547 --- /dev/null +++ b/packages/calendar/src/index.js @@ -0,0 +1,68 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const template = () => PCTemplate + +export default { + name: $prefix + 'Calendar', + props: { + ...$props, + + /** + * @property {String} [mode='month'] - 显示模式,month|year 可选 + */ + mode: { + type: String, + default: 'month', + validator: (value) => ~['month', 'year'].indexOf(value) + }, + + /** + * @property {Number} [year=getFullYear()] - 指定年份,默认今年 + */ + year: { + type: Number, + default() { + return new Date().getFullYear() + } + }, + + /** + * @property {Number} [month=getMonth()] - 指定月份,默认当月 + */ + month: { + type: Number, + default() { + return new Date().getMonth() + 1 + } + }, + + /** + * @property {Array} events - 事件列表 + * @example + * [{ time: 1534297845236, title: '消息', content: '这是一条消息', type: 'primary' }, + * { time: 1534297845236, title: '消息', content: '还有', type: 'info' }] + * type 类型: warning、error、info、success + */ + events: Array, + + /** + * @property {Boolean} [showSelected=false] - 显示选中的日期 + */ + showSelected: Boolean + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/calendar/src/pc.vue b/packages/calendar/src/pc.vue new file mode 100644 index 000000000..2c31ee879 --- /dev/null +++ b/packages/calendar/src/pc.vue @@ -0,0 +1,267 @@ + + + + diff --git a/packages/card-template/index.js b/packages/card-template/index.js new file mode 100644 index 000000000..35815369a --- /dev/null +++ b/packages/card-template/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import CardTemplate from './src/index' +import '@opentiny/vue-theme/card-template/index.css' + +/* istanbul ignore next */ +CardTemplate.install = function (Vue) { + Vue.component(CardTemplate.name, CardTemplate) +} + +CardTemplate.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + CardTemplate.install(window.Vue) + } +} + +export default CardTemplate diff --git a/packages/card-template/package.json b/packages/card-template/package.json new file mode 100644 index 000000000..a8334c5c8 --- /dev/null +++ b/packages/card-template/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-card-template", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/card-template/src/index.js b/packages/card-template/src/index.js new file mode 100644 index 000000000..f409ea999 --- /dev/null +++ b/packages/card-template/src/index.js @@ -0,0 +1,40 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const $constants = { + MOREICON: 'icon-more' +} + +const template = () => PCTemplate + +export default { + name: $prefix + 'CardTemplate', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + tools: Array, + header: String, + bodyStyle: Object, + headerLine: { + type: Boolean, + default: true + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/card-template/src/pc.vue b/packages/card-template/src/pc.vue new file mode 100644 index 000000000..f9e33336e --- /dev/null +++ b/packages/card-template/src/pc.vue @@ -0,0 +1,70 @@ + + + + diff --git a/packages/carousel-item/index.js b/packages/carousel-item/index.js new file mode 100644 index 000000000..efefdb3bc --- /dev/null +++ b/packages/carousel-item/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import CarouselItem from './src/index' +import '@opentiny/vue-theme/carousel-item/index.css' + +/* istanbul ignore next */ +CarouselItem.install = function (Vue) { + Vue.component(CarouselItem.name, CarouselItem) +} + +CarouselItem.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + CarouselItem.install(window.Vue) + } +} + +export default CarouselItem diff --git a/packages/carousel-item/package.json b/packages/carousel-item/package.json new file mode 100644 index 000000000..6e61303f8 --- /dev/null +++ b/packages/carousel-item/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-carousel-item", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/carousel-item/src/index.js b/packages/carousel-item/src/index.js new file mode 100644 index 000000000..f2dfa0ae7 --- /dev/null +++ b/packages/carousel-item/src/index.js @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const $constants = { + TYPE_CARD: 'card', + TYPE_VERTICAL: 'vertical', + CARD_SCALE: 0.83 +} + +const template = () => PCTemplate + +export default { + name: $prefix + 'CarouselItem', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + name: String, + title: String, + label: { + type: [String, Number], + default: '' + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/carousel-item/src/pc.vue b/packages/carousel-item/src/pc.vue new file mode 100644 index 000000000..1f5510efc --- /dev/null +++ b/packages/carousel-item/src/pc.vue @@ -0,0 +1,46 @@ + + + + diff --git a/packages/carousel/index.js b/packages/carousel/index.js new file mode 100644 index 000000000..2f609cfc2 --- /dev/null +++ b/packages/carousel/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Carousel from './src/index' +import '@opentiny/vue-theme/carousel/index.css' + +/* istanbul ignore next */ +Carousel.install = function (Vue) { + Vue.component(Carousel.name, Carousel) +} + +Carousel.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Carousel.install(window.Vue) + } +} + +export default Carousel diff --git a/packages/carousel/package.json b/packages/carousel/package.json new file mode 100644 index 000000000..3b963df48 --- /dev/null +++ b/packages/carousel/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-carousel", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/carousel/src/index.js b/packages/carousel/src/index.js new file mode 100644 index 000000000..bd4eb88e1 --- /dev/null +++ b/packages/carousel/src/index.js @@ -0,0 +1,70 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $setup, $prefix } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const $constants = { + CHILD_NAME: $prefix + 'CarouselItem' +} + +export default { + name: $prefix + 'Carousel', + componentName: 'Carousel', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + initialIndex: { + type: Number, + default: 0 + }, + height: String, + trigger: { + type: String, + default: 'hover' + }, + autoplay: { + type: Boolean, + default: false + }, + interval: { + type: Number, + default: 3000 + }, + loop: { + type: Boolean, + default: true + }, + indicatorPosition: String, + arrow: { + type: String, + default: 'hover' + }, + type: { + type: String, + validator: (value) => !value || ~['card', 'vertical'].indexOf(value) + }, + showTitle: { + type: Boolean, + default: false + } + }, + setup(props, context) { + return $setup({ + props, + context, + template: () => PCTemplate + }) + } +} diff --git a/packages/carousel/src/pc.vue b/packages/carousel/src/pc.vue new file mode 100644 index 000000000..a13369696 --- /dev/null +++ b/packages/carousel/src/pc.vue @@ -0,0 +1,83 @@ + + + + diff --git a/packages/cascader-menu/index.js b/packages/cascader-menu/index.js new file mode 100644 index 000000000..f7311d8df --- /dev/null +++ b/packages/cascader-menu/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import CascaderMenu from './src/index' +import '@opentiny/vue-theme/cascader-menu/index.css' + +/* istanbul ignore next */ +CascaderMenu.install = function (Vue) { + Vue.component(CascaderMenu.name, CascaderMenu) +} + +CascaderMenu.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + CascaderMenu.install(window.Vue) + } +} + +export default CascaderMenu diff --git a/packages/cascader-menu/package.json b/packages/cascader-menu/package.json new file mode 100644 index 000000000..330c7bf02 --- /dev/null +++ b/packages/cascader-menu/package.json @@ -0,0 +1,19 @@ +{ + "name": "@opentiny/vue-cascader-menu", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-locale": "~0.1.0", + "@opentiny/vue-scrollbar": "~0.1.0", + "@opentiny/vue-cascader-node": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/cascader-menu/src/index.jsx b/packages/cascader-menu/src/index.jsx new file mode 100644 index 000000000..4dd4f83a9 --- /dev/null +++ b/packages/cascader-menu/src/index.jsx @@ -0,0 +1,99 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { renderless, api } from '@opentiny/vue-renderless/cascader-menu/vue' +import { $prefix, h, setup } from '@opentiny/vue-common' +import { t } from '@opentiny/vue-locale' +import Scrollbar from '@opentiny/vue-scrollbar' +import CascaderNode from '@opentiny/vue-cascader-node' + +const renderNodeListFunc = (_vm) => () => { + const events = { on: {} } + const menuId = _vm.state.menuId + const isHoverMenu = _vm.panel.state.isHoverMenu + + if (isHoverMenu) { + events.on.expand = _vm.handleExpand + } + + const mapHandler = (node, index) => { + const uid = node.uid + const hasChildren = node.hasChildren + + return ( + + ) + } + + const nodes = _vm.nodes.map(mapHandler) + + return [...nodes, isHoverMenu ? : null] +} + +export default { + name: $prefix + 'CascaderMenu', + components: { + TinyScrollbar: Scrollbar, + CascaderNode + }, + props: { + nodes: { + type: Array, + required: true + }, + index: Number + }, + inject: ['panel'], + setup(props, context) { + return setup({ props, context, renderless, api, mono: true }) + }, + render() { + const renderEmptyText = () =>
{t('ui.cascader.noData')}
+ + const renderNodeList = renderNodeListFunc(this) + + const { state } = this + const events = { nativeOn: {} } + + if (this.panel.state.isHoverMenu) { + events.nativeOn.mousemove = this.handleMouseMove + } + + return h( + 'tiny-scrollbar', + { + attrs: { + role: 'menu', + id: state.menuId + }, + ref: 'cascaderMenu', + class: 'tiny-cascader-menu', + props: { + tag: 'ul', + 'wrap-class': 'tiny-cascader-menu__wrap', + 'view-class': { + 'tiny-cascader-menu__list': true, + 'is-empty': state.isEmpty + } + }, + ...events + }, + [state.isEmpty ? renderEmptyText(h) : renderNodeList(h)] + ) + } +} diff --git a/packages/cascader-node/index.js b/packages/cascader-node/index.js new file mode 100644 index 000000000..a0275a5a8 --- /dev/null +++ b/packages/cascader-node/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import CascaderNode from './src/index.vue' +import '@opentiny/vue-theme/cascader-node/index.css' + +/* istanbul ignore next */ +CascaderNode.install = function (Vue) { + Vue.component(CascaderNode.name, CascaderNode) +} + +CascaderNode.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + CascaderNode.install(window.Vue) + } +} + +export default CascaderNode diff --git a/packages/cascader-node/package.json b/packages/cascader-node/package.json new file mode 100644 index 000000000..545348b92 --- /dev/null +++ b/packages/cascader-node/package.json @@ -0,0 +1,18 @@ +{ + "name": "@opentiny/vue-cascader-node", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-checkbox": "~0.1.0", + "@opentiny/vue-radio": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/cascader-node/src/index.vue b/packages/cascader-node/src/index.vue new file mode 100644 index 000000000..7fab9fc87 --- /dev/null +++ b/packages/cascader-node/src/index.vue @@ -0,0 +1,159 @@ + + diff --git a/packages/cascader-panel/index.js b/packages/cascader-panel/index.js new file mode 100644 index 000000000..9739f2971 --- /dev/null +++ b/packages/cascader-panel/index.js @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import CascaderPanel from './src/index.vue' +import '@opentiny/vue-theme/cascader-panel/index.css' + +CascaderPanel.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +CascaderPanel.install = function (Vue) { + Vue.component(CascaderPanel.name, CascaderPanel) +} + +CascaderPanel.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + CascaderPanel.install(window.Vue) + } +} + +export default CascaderPanel diff --git a/packages/cascader-panel/package.json b/packages/cascader-panel/package.json new file mode 100644 index 000000000..bb37edaee --- /dev/null +++ b/packages/cascader-panel/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-cascader-panel", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-cascader-menu": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/cascader-panel/src/index.vue b/packages/cascader-panel/src/index.vue new file mode 100644 index 000000000..af0b65aa5 --- /dev/null +++ b/packages/cascader-panel/src/index.vue @@ -0,0 +1,49 @@ + + + + diff --git a/packages/cascader/index.js b/packages/cascader/index.js new file mode 100644 index 000000000..56f4833a2 --- /dev/null +++ b/packages/cascader/index.js @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Cascader from './src/index' +import '@opentiny/vue-theme/cascader/index.css' + +Cascader.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +Cascader.install = function (Vue) { + Vue.component(Cascader.name, Cascader) +} + +Cascader.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Cascader.install(window.Vue) + } +} + +export default Cascader diff --git a/packages/cascader/package.json b/packages/cascader/package.json new file mode 100644 index 000000000..0d070133d --- /dev/null +++ b/packages/cascader/package.json @@ -0,0 +1,21 @@ +{ + "name": "@opentiny/vue-cascader", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0", + "@opentiny/vue-input": "~0.1.0", + "@opentiny/vue-tag": "~0.1.0", + "@opentiny/vue-scrollbar": "~0.1.0", + "@opentiny/vue-cascader-panel": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/cascader/src/index.js b/packages/cascader/src/index.js new file mode 100644 index 000000000..7a7beb646 --- /dev/null +++ b/packages/cascader/src/index.js @@ -0,0 +1,72 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const $constants = { + placeholder: 'ui.cascader.placeholder', + COMPONENT_NAME: { FormItem: 'FormItem' }, + EVENT_NAME: { FormBlur: 'form.blur' } +} + +const template = () => PCTemplate + +export default { + name: $prefix + 'Cascader', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + autoSize: Boolean, + beforeFilter: { + type: Function, + default: () => () => { + // do nothing + } + }, + clearable: Boolean, + collapseTags: Boolean, + debounce: { + type: Number, + default: 300 + }, + disabled: Boolean, + filterMethod: Function, + filterable: Boolean, + modelValue: {}, + options: Array, + placeholder: { + type: String, + default: '' + }, + popperAppendToBody: { + type: Boolean, + default: true + }, + popperClass: String, + props: Object, + separator: { + type: String, + default: '/' + }, + showAllLevels: { + type: Boolean, + default: true + }, + size: String + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/cascader/src/pc.vue b/packages/cascader/src/pc.vue new file mode 100644 index 000000000..7e9ea53df --- /dev/null +++ b/packages/cascader/src/pc.vue @@ -0,0 +1,183 @@ + + + + diff --git a/packages/checkbox-button/index.js b/packages/checkbox-button/index.js new file mode 100644 index 000000000..740699a45 --- /dev/null +++ b/packages/checkbox-button/index.js @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import CheckboxButton from './src/index' +import '@opentiny/vue-theme/checkbox-button/index.css' + +CheckboxButton.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +CheckboxButton.install = function (Vue) { + Vue.component(CheckboxButton.name, CheckboxButton) +} + +CheckboxButton.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + CheckboxButton.install(window.Vue) + } +} + +export default CheckboxButton diff --git a/packages/checkbox-button/package.json b/packages/checkbox-button/package.json new file mode 100644 index 000000000..e268daa46 --- /dev/null +++ b/packages/checkbox-button/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-checkbox-button", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/checkbox-button/src/index.js b/packages/checkbox-button/src/index.js new file mode 100644 index 000000000..46cb3e1fd --- /dev/null +++ b/packages/checkbox-button/src/index.js @@ -0,0 +1,45 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const $constants = { + CHECKBOX_GROUP: 'CheckboxGroup' +} + +const template = () => PCTemplate + +export default { + name: $prefix + 'CheckboxButton', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + modelValue: {}, + label: {}, + disabled: Boolean, + checked: Boolean, + name: String, + trueLabel: [String, Number], + falseLabel: [String, Number], + text: String, + events: { + type: Object, + default: () => ({}) + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/checkbox-button/src/pc.vue b/packages/checkbox-button/src/pc.vue new file mode 100644 index 000000000..6e7f5b774 --- /dev/null +++ b/packages/checkbox-button/src/pc.vue @@ -0,0 +1,68 @@ + + + + diff --git a/packages/checkbox-group/index.js b/packages/checkbox-group/index.js new file mode 100644 index 000000000..b34112081 --- /dev/null +++ b/packages/checkbox-group/index.js @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import CheckboxGroup from './src/index' + +CheckboxGroup.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +CheckboxGroup.install = function (Vue) { + Vue.component(CheckboxGroup.name, CheckboxGroup) +} + +CheckboxGroup.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + CheckboxGroup.install(window.Vue) + } +} + +export default CheckboxGroup diff --git a/packages/checkbox-group/package.json b/packages/checkbox-group/package.json new file mode 100644 index 000000000..ded76ec55 --- /dev/null +++ b/packages/checkbox-group/package.json @@ -0,0 +1,18 @@ +{ + "name": "@opentiny/vue-checkbox-group", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-checkbox": "~0.1.0", + "@opentiny/vue-checkbox-button": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/checkbox-group/src/index.js b/packages/checkbox-group/src/index.js new file mode 100644 index 000000000..2d6ecc6a7 --- /dev/null +++ b/packages/checkbox-group/src/index.js @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' +import MobileTemplate from './mobile' + +const $constants = { + FORM_ITEM: 'FormItem', + FORM_CHANGE: 'form.change' +} + +const template = (mode) => { + if (process.env.TINY_MODE === 'pc') return PCTemplate + else if (process.env.TINY_MODE === 'mobile') return MobileTemplate + else return mode === 'mobile' ? MobileTemplate : PCTemplate +} + +export default { + name: $prefix + 'CheckboxGroup', + componentName: 'CheckboxGroup', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + modelValue: {}, + disabled: Boolean, + min: Number, + max: Number, + size: String, + fill: String, + textColor: String, + vertical: Boolean, + options: { + type: Array, + default: () => [] + }, + type: { + type: String, + default: 'checkbox' + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/checkbox-group/src/mobile.vue b/packages/checkbox-group/src/mobile.vue new file mode 100644 index 000000000..69499a7c2 --- /dev/null +++ b/packages/checkbox-group/src/mobile.vue @@ -0,0 +1,38 @@ + + + + diff --git a/packages/checkbox-group/src/pc.vue b/packages/checkbox-group/src/pc.vue new file mode 100644 index 000000000..f729f8b50 --- /dev/null +++ b/packages/checkbox-group/src/pc.vue @@ -0,0 +1,42 @@ + + + + diff --git a/packages/checkbox/index.js b/packages/checkbox/index.js new file mode 100644 index 000000000..577b780e1 --- /dev/null +++ b/packages/checkbox/index.js @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Checkbox from './src/index' + +Checkbox.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +Checkbox.install = function (Vue) { + Vue.component(Checkbox.name, Checkbox) +} + +Checkbox.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Checkbox.install(window.Vue) + } +} + +export default Checkbox diff --git a/packages/checkbox/package.json b/packages/checkbox/package.json new file mode 100644 index 000000000..70d55c57a --- /dev/null +++ b/packages/checkbox/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-checkbox", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/checkbox/src/index.js b/packages/checkbox/src/index.js new file mode 100644 index 000000000..3d6016f83 --- /dev/null +++ b/packages/checkbox/src/index.js @@ -0,0 +1,70 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' +import MobileTemplate from './mobile' + +const $constants = { + FORM_ITEM: 'FormItem', + FORM_CHANGE: 'form.change', + CHECKBOX: $prefix + 'Checkbox', + CHECKBOX_GROUP: 'CheckboxGroup' +} + +const template = (mode) => { + if (process.env.TINY_MODE === 'pc') return PCTemplate + else if (process.env.TINY_MODE === 'mobile') return MobileTemplate + else return mode === 'mobile' ? MobileTemplate : PCTemplate +} + +export default { + name: $prefix + 'Checkbox', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + modelValue: {}, + label: {}, + indeterminate: Boolean, + disabled: Boolean, + checked: Boolean, + name: String, + trueLabel: [String, Number], + falseLabel: [String, Number], + + /* + * 当indeterminate为真时,为controls提供相关连的checkbox的id,表明元素间的控制关系 + */ + id: String, + + /* + * 当indeterminate为真时,为controls提供相关连的checkbox的id,表明元素间的控制关系 + */ + controls: String, + border: Boolean, + size: String, + text: String, + validateEvent: { + type: Boolean, + default: true + }, + events: { + type: Object, + default: () => ({}) + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/checkbox/src/mobile.vue b/packages/checkbox/src/mobile.vue new file mode 100644 index 000000000..06df5ced7 --- /dev/null +++ b/packages/checkbox/src/mobile.vue @@ -0,0 +1,76 @@ + + + + diff --git a/packages/checkbox/src/pc.vue b/packages/checkbox/src/pc.vue new file mode 100644 index 000000000..9c63a4e51 --- /dev/null +++ b/packages/checkbox/src/pc.vue @@ -0,0 +1,112 @@ + + + + diff --git a/packages/col/index.js b/packages/col/index.js new file mode 100644 index 000000000..86f86df8c --- /dev/null +++ b/packages/col/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Col from './src/index' +import '@opentiny/vue-theme/col/index.css' + +/* istanbul ignore next */ +Col.install = function (Vue) { + Vue.component(Col.name, Col) +} + +Col.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Col.install(window.Vue) + } +} + +export default Col diff --git a/packages/col/package.json b/packages/col/package.json new file mode 100644 index 000000000..f87400603 --- /dev/null +++ b/packages/col/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-col", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/col/src/index.js b/packages/col/src/index.js new file mode 100644 index 000000000..3acf0ca74 --- /dev/null +++ b/packages/col/src/index.js @@ -0,0 +1,102 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const template = () => PCTemplate + +export default { + name: $prefix + 'Col', + props: { + ...$props, + + /** + * @property {number} [span=12] - 栅格占据的列数(一行以12栅格划分) + */ + span: { + type: Number, + default: 12, + validator: (value) => Math.floor(value) === value && value > 0 && value <= 12 + }, + + /** + * @property {number} [offset=0] - 栅格左侧的间隔格数 + */ + offset: { + type: Number, + default: 0, + validator: (value) => value >= 0 + }, + + /** + * @property {no} [no=0] - 排序编号 + */ + no: { + type: Number, + default: 0 + }, + + /** + * @property {number} [move=0] - 栅格向左向右移动格数 + */ + move: { + type: Number, + default: 0 + }, + + /** + * @property {(number|object)} xs - <768px 响应式栅格数或者栅格属性对象 + */ + xs: { + type: [Number, Object] + }, + + /** + * @property {(number|object)} sm - ≥768px 响应式栅格数或者栅格属性对象 + */ + sm: { + type: [Number, Object] + }, + + /** + * @property {(number|object)} md - ≥992px 响应式栅格数或者栅格属性对象 + */ + md: { + type: [Number, Object] + }, + + /** + * @property {(number|object)} lg - ≥1200px 响应式栅格数或者栅格属性对象 + */ + lg: { + type: [Number, Object] + }, + + /** + * @property {(number|object)} xl - ≥1920px 响应式栅格数或者栅格属性对象 + */ + xl: { + type: [Number, Object] + }, + + /** + * @property {string} [tag=div] - 自定义元素标签 + */ + tag: { + type: String, + default: 'div' + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/col/src/pc.vue b/packages/col/src/pc.vue new file mode 100644 index 000000000..21273f3bc --- /dev/null +++ b/packages/col/src/pc.vue @@ -0,0 +1,28 @@ + + + + diff --git a/packages/collapse-item/index.js b/packages/collapse-item/index.js new file mode 100644 index 000000000..a633d5848 --- /dev/null +++ b/packages/collapse-item/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import CollapseItem from './src/index' +import '@opentiny/vue-theme/collapse-item/index.css' + +/* istanbul ignore next */ +CollapseItem.install = function (Vue) { + Vue.component(CollapseItem.name, CollapseItem) +} + +CollapseItem.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + CollapseItem.install(window.Vue) + } +} + +export default CollapseItem diff --git a/packages/collapse-item/package.json b/packages/collapse-item/package.json new file mode 100644 index 000000000..3f52ef631 --- /dev/null +++ b/packages/collapse-item/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-collapse-item", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/collapse-item/src/index.js b/packages/collapse-item/src/index.js new file mode 100644 index 000000000..4e09f4ea8 --- /dev/null +++ b/packages/collapse-item/src/index.js @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const $constants = { + INTERVAL: 50 +} + +const template = () => PCTemplate + +export default { + name: $prefix + 'CollapseItem', + componentName: 'CollapseItem', + inject: ['collapse'], + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + title: String, + name: { + type: [String, Number], + default() { + return this._uid + } + }, + disabled: Boolean + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/collapse-item/src/pc.vue b/packages/collapse-item/src/pc.vue new file mode 100644 index 000000000..1864b2a12 --- /dev/null +++ b/packages/collapse-item/src/pc.vue @@ -0,0 +1,73 @@ + + + + diff --git a/packages/collapse-transition/index.js b/packages/collapse-transition/index.js new file mode 100644 index 000000000..fd0ed4e9c --- /dev/null +++ b/packages/collapse-transition/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import CollapseTransition from './src/index.vue' +import '@opentiny/vue-theme/collapse/index.css' + +/* istanbul ignore next */ +CollapseTransition.install = function (Vue) { + Vue.component(CollapseTransition.name, CollapseTransition) +} + +CollapseTransition.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + CollapseTransition.install(window.Vue) + } +} + +export default CollapseTransition diff --git a/packages/collapse-transition/package.json b/packages/collapse-transition/package.json new file mode 100644 index 000000000..ce0caf3c9 --- /dev/null +++ b/packages/collapse-transition/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-collapse-transition", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/collapse-transition/src/index.vue b/packages/collapse-transition/src/index.vue new file mode 100644 index 000000000..406793039 --- /dev/null +++ b/packages/collapse-transition/src/index.vue @@ -0,0 +1,96 @@ + + + + diff --git a/packages/collapse/index.js b/packages/collapse/index.js new file mode 100644 index 000000000..be957703b --- /dev/null +++ b/packages/collapse/index.js @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Collapse from './src/index' +import '@opentiny/vue-theme/collapse/index.css' + +Collapse.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +Collapse.install = function (Vue) { + Vue.component(Collapse.name, Collapse) +} + +Collapse.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Collapse.install(window.Vue) + } +} + +export default Collapse diff --git a/packages/collapse/package.json b/packages/collapse/package.json new file mode 100644 index 000000000..b73562260 --- /dev/null +++ b/packages/collapse/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-collapse", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/collapse/src/index.js b/packages/collapse/src/index.js new file mode 100644 index 000000000..f01bdbc98 --- /dev/null +++ b/packages/collapse/src/index.js @@ -0,0 +1,52 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const $constants = { + COMPONENT_NAME: { + Collapse: 'Collapse' + }, + EVENT_NAME: { + CollapseItemClick: 'collapse-item.click' + } +} + +const template = () => PCTemplate + +export default { + name: $prefix + 'Collapse', + componentName: 'Collapse', + provide() { + return { + collapse: this + } + }, + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + accordion: Boolean, + beforeClose: Function, + modelValue: { + type: [Array, String, Number], + default() { + return [] + } + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/collapse/src/pc.vue b/packages/collapse/src/pc.vue new file mode 100644 index 000000000..915f34ba4 --- /dev/null +++ b/packages/collapse/src/pc.vue @@ -0,0 +1,28 @@ + + + + diff --git a/packages/common/adapter/index.js b/packages/common/adapter/index.js new file mode 100644 index 000000000..c2371d405 --- /dev/null +++ b/packages/common/adapter/index.js @@ -0,0 +1,35 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import * as all from 'vue' +import * as vue2 from '@opentiny/vue-common/adapter/vue2' +import * as vue3 from '@opentiny/vue-common/adapter/vue3' + +const vue = Object.keys(all).length > 1 ? vue3 : vue2 + +export default vue.default + +export const { + defineAsyncComponent, + markRaw, + renderComponent, + rootConfig, + appContext, + appProperties, + tools, + directive, + h, + createComponent, + parseVnode, + bindFilter, + useRouter, + emitter +} = vue diff --git a/packages/common/adapter/utils.js b/packages/common/adapter/utils.js new file mode 100644 index 000000000..d04a5a56c --- /dev/null +++ b/packages/common/adapter/utils.js @@ -0,0 +1,73 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +export const emitter = () => { + let listeners = {} + + const on = (event, callback, once) => { + if (event && typeof event === 'string' && typeof callback === 'function') { + const callbacks = listeners[event] || [] + + listeners[event] = callbacks + callbacks.push(callback) + callback.once = once + } + } + + const emitter = { + emit(eventName) { + const callbacks = listeners[eventName] + + if (callbacks) { + callbacks.forEach((callback) => callback.apply(null, [].slice.call(arguments, 1))) + + listeners[eventName] = callbacks.filter((callback) => !callback.once) + } + }, + on, + once(event, callback) { + on(event, callback, true) + }, + off(event, callback) { + if (event && typeof event === 'string') { + const callbacks = listeners[event] + + if (typeof callback === 'function') { + listeners[event] = callbacks.filter((cb) => cb !== callback) + } else { + delete listeners[event] + } + } else { + listeners = {} + } + } + } + + return emitter +} + +export const bindFilter = (props, attrs = {}) => { + const properties = {} + + for (let name in props) { + if (name.indexOf('_') !== 0) { + properties[name] = props[name] + } + } + + for (let name in attrs) { + if (Object.prototype.hasOwnProperty.call(attrs, name)) { + properties[name] = attrs[name] + } + } + + return properties +} diff --git a/packages/common/adapter/vue2.js b/packages/common/adapter/vue2.js new file mode 100644 index 000000000..1ff2a9cd9 --- /dev/null +++ b/packages/common/adapter/vue2.js @@ -0,0 +1,298 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Vue from 'vue' +import * as hooks from '@vue/composition-api' +import { emitter, bindFilter } from './utils' + +export { emitter, bindFilter } + +Vue.use(hooks.default) + +export const defineAsyncComponent = (promise) => promise + +export const markRaw = (ref) => ref + +export const renderComponent = + ({ view, component, props, context: { attrs, listeners: on, slots }, extend = {} }) => + () => + hooks.h((view && view.value) || component, { props, attrs, [extend.isSvg ? 'nativeOn' : 'on']: on, scopedSlots: { ...slots }, ...extend }) + +export const rootConfig = () => hooks.getCurrentInstance().proxy.$root + +export const appContext = () => Vue + +export const appProperties = () => Vue.prototype + +export const useRouter = (instance = hooks.getCurrentInstance().proxy) => ({ + route: instance.$route, + router: instance.$router +}) + +const defineProperties = (vm, instance, filter) => { + for (let name in instance) { + if (!(typeof filter === 'function' && filter(name))) { + Object.defineProperty(vm, name, { + configurable: true, + enumerable: true, + get: () => instance[name], + set: (value) => { + instance[name] = value + } + }) + } + } + + return vm +} + +const filter = (name) => name.indexOf('$') === 0 || name.indexOf('_') === 0 || name === 'constructor' + +const generateChildren = ($children, createVm) => { + const children = [] + children.refs = {} + + $children.forEach((child) => { + const vm = createVm({}, child) + + children.push(vm) + child.$vnode.data.ref && (children.refs[child.$vnode.data.ref] = vm) + }) + + return children +} + +const createVm = (vm, instance, context) => { + context || defineProperties(vm, instance, filter) + + Object.defineProperties(vm, { + $attrs: { get: () => instance.$attrs }, + $children: { get: () => generateChildren(instance.$children, createVm) }, + $constants: { get: () => instance._constants }, + $emit: { get: () => instance.$emit.bind(instance) }, + $el: { get: () => instance.$el }, + $listeners: { get: () => instance.$listeners }, + $mode: { get: () => instance.tiny_mode }, + $nextTick: { get: () => hooks.nextTick }, + $off: { get: () => instance.$off.bind(instance) }, + $on: { get: () => instance.$on.bind(instance) }, + $once: { get: () => instance.$once.bind(instance) }, + $options: { get: () => ({ componentName: instance.$options.componentName }) }, + $parent: { get: () => instance.$parent && createVm({}, instance.$parent) }, + $refs: { get: () => instance.$refs }, + $renderless: { get: () => instance.tiny_renderless }, + $scopedSlots: { get: () => instance.$scopedSlots }, + $set: { get: () => instance.$set }, + $slots: { get: () => instance.$scopedSlots }, + $template: { get: () => instance.tiny_template } + }) + + return vm +} + +const emitEvent = (vm) => { + const broadcast = (vm, componentName, eventName, params) => { + vm.$children.forEach((child) => { + const name = child.$options.componentName + + if (name === componentName) { + child.$emit(eventName, params) + } else { + broadcast(child, componentName, eventName, params) + } + }) + } + + return { + dispatch(componentName, eventName, params) { + let parent = vm.$parent || vm.$root + let name = parent.$options.componentName + + while (parent && (!name || name !== componentName)) { + parent = parent.$parent + + parent && (name = parent.$options.componentName) + } + + if (parent) { + parent.$emit.apply(parent, [eventName].concat(params)) + } + }, + broadcast(componentName, eventName, params) { + broadcast(vm, componentName, eventName, params) + } + } +} + +const parent = (vm) => (handler) => { + let parent = vm.$parent + let level = 0 + + const parentObject = (parent) => ({ + level, + vm: createVm({}, parent), + el: parent.$el, + options: parent.$options + }) + + if (typeof handler !== 'function') { + return parent ? parentObject(parent) : {} + } + + level++ + + while (parent) { + if (handler(parentObject(parent))) { + break + } + + parent = parent.$parent + level++ + } +} + +const children = (vm) => (handler) => { + if (typeof handler !== 'function') { + return generateChildren(vm.$children) + } + + let layer = 1 + + const broadcast = ($children) => { + const level = layer++ + + if ( + $children.some((child) => + handler({ + level, + vm: createVm({}, child), + el: child.$el, + options: child.$options, + isLevel1: level === 1 + }) + ) + ) { + return + } + + $children.forEach((child) => broadcast(child.$children)) + } + + broadcast(vm.$children) +} + +const getMode = (instance, parentVm, root) => instance._props.tiny_mode || (parentVm || {}).$mode || (root.tiny_mode ? root.tiny_mode.value : 'pc') + +export const tools = (context) => { + const instance = hooks.getCurrentInstance().proxy + const root = instance.$root + const { route, router } = useRouter(instance) + const i18n = root.$i18n + const { dispatch, broadcast } = emitEvent(instance) + const parentHandler = parent(instance) + const childrenHandler = children(instance) + const vm = createVm({}, instance, context) + const parentVm = instance.$parent ? createVm({}, instance.$parent) : null + const setParentAttribute = ({ name, value }) => { + instance.$parent[name] = value + } + const defineInstanceProperties = (props) => { + Object.defineProperties(vm, props) + Object.defineProperties(instance, props) + } + const defineParentInstanceProperties = (props) => { + parentVm && Object.defineProperties(parentVm, props) + } + hooks.onBeforeMount(() => defineProperties(vm, instance, filter)) + return { + vm, + emit: context.emit, + emitter, + route, + router, + dispatch, + broadcast, + parentHandler, + childrenHandler, + refs: context.refs, + i18n, + slots: context.slots, + scopedSlots: context.slots, + attrs: context.attrs, + parent: parentVm, + nextTick: hooks.nextTick, + constants: instance._constants, + mode: getMode(instance, parentVm, root), + service: instance.$service, + getService: () => instance.$getService(vm), + setParentAttribute, + defineInstanceProperties, + defineParentInstanceProperties + } +} + +const mapping = (content, before, after) => { + if (typeof content[before] !== 'undefined') { + const fn = content[before] + + content[after] = (el, binding, vnode) => { + binding.instance = vnode.context + fn(el, binding, vnode) + } + + delete content[before] + } +} + +export const directive = (directives) => { + for (let name in directives) { + if (Object.prototype.hasOwnProperty.call(directives, name)) { + const content = directives[name] + + mapping(content, 'beforeMount', 'bind') + mapping(content, 'updated', 'update') + mapping(content, 'unmounted', 'unbind') + } + } + + return directives +} + +const bindVnodeData = ({ props, data, name, attr = name }) => { + Object.defineProperty(props, attr, { + get: () => data[name], + set: (value) => { + data[name] = value + } + }) +} + +export const parseVnode = (vnode) => { + const props = {} + const data = (vnode.componentOptions && vnode.componentOptions.propsData) || {} + + for (let name in data) { + if (Object.prototype.hasOwnProperty.call(data, name)) { + bindVnodeData({ props, data, name }) + } + } + + vnode.props = props + vnode.type = { name: vnode.componentOptions && vnode.componentOptions.tag } + + return vnode +} + +export const h = hooks.h + +export const createComponent = ({ component, propsData, el }) => new (Vue.extend(component))({ propsData, el }).$mount() + +export default hooks diff --git a/packages/common/adapter/vue3.js b/packages/common/adapter/vue3.js new file mode 100644 index 000000000..79d131f6c --- /dev/null +++ b/packages/common/adapter/vue3.js @@ -0,0 +1,465 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import * as hooks from 'vue' +import { capitalize, hyphenate, camelize } from '@opentiny/vue-renderless/common/string' +import { emitter, bindFilter } from './utils' + +export { emitter, bindFilter } + +export const defineAsyncComponent = hooks.defineAsyncComponent + +export const markRaw = hooks.markRaw + +const setInstanceEmitter = (instance) => { + const $emitter = emitter() + + Object.defineProperty(instance, '$emitter', { get: () => $emitter }) +} + +const regEventPrefix = /^on[A-Z]/ + +const generateListeners = (attrs) => { + const $attrs = {} + const $listeners = {} + + for (let name in attrs) { + if (Object.prototype.hasOwnProperty.call(attrs, name)) { + const event = attrs[name] + + if (regEventPrefix.test(name) && typeof event === 'function') { + $listeners[hyphenate(name.substr(2))] = event + } else { + $attrs[name] = event + } + } + } + + return { $attrs, $listeners } +} + +const defineProperties = (vm, instance, property, filter) => { + for (let name in instance[property]) { + if (!(typeof filter === 'function' && filter(name))) { + Object.defineProperty(vm, name, { + configurable: true, + enumerable: true, + get: () => instance[property][name], + set: (value) => { + instance[property][name] = value + } + }) + } + } + + return vm +} + +const filter = (name) => name.indexOf('_') === 0 + +const defineInstanceVm = (vm, instance) => { + defineProperties(vm, instance, 'setupState') + defineProperties(vm, instance, 'props', filter) + defineProperties(vm, instance, 'ctx', filter) + + return vm +} + +const generateChildren = (subTree, createVm) => { + const children = [] + children.refs = {} + + if (subTree) { + const arr = subTree.dynamicChildren || subTree.children + + if (Array.isArray(arr)) { + arr.forEach((child) => { + if (child.component) { + const vm = createVm({}, child.component) + + children.push(vm) + child.props.ref && (children.refs[child.props.ref] = vm) + } + }) + } else if (subTree.component) { + children.push(createVm({}, subTree.component)) + } + } + + return children +} + +const getRealParent = (vm) => { + if (vm && vm.parent) { + return vm.parent.type.name === 'AsyncComponentWrapper' && vm.parent.parent ? vm.parent.parent : vm.parent + } +} + +const createVm = (vm, instance, context) => { + const { $attrs, $listeners } = generateListeners(instance.attrs) + let $emitter = instance.$emitter + + if (!$emitter) { + setInstanceEmitter(instance) + $emitter = instance.$emitter + } + + const emit = (...args) => { + instance.emit.apply(instance, args) + $emitter.emit.apply(vm, args) + } + + const $set = (target, propertyName, value) => (target[propertyName] = value) + + context || defineInstanceVm(vm, instance) + + Object.defineProperties(vm, { + $attrs: { get: () => $attrs }, + $children: { get: () => generateChildren(instance.subTree, createVm) }, + $constants: { get: () => instance.props._constants }, + $emit: { get: () => emit }, + $el: { get: () => instance.vnode.el }, + $listeners: { get: () => $listeners }, + $mode: { get: () => instance.props.tiny_mode }, + $nextTick: { get: () => hooks.nextTick }, + $off: { get: () => $emitter.off }, + $on: { get: () => $emitter.on }, + $once: { get: () => $emitter.once }, + $options: { get: () => ({ componentName: instance.type.componentName }) }, + $parent: { get: () => instance.parent && createVm({}, getRealParent(instance)) }, + $refs: { get: () => instance.refs }, + $renderless: { get: () => instance.props.tiny_renderless }, + $scopedSlots: { get: () => instance.slots }, + $set: { get: () => $set }, + $slots: { get: () => instance.slots }, + $template: { get: () => instance.props.tiny_template } + }) + + return vm +} + +const onBeforeMount = (instance, refs) => { + for (let name in instance.refs) { + if (Object.prototype.hasOwnProperty.call(instance.refs, name)) { + refs[name] = instance.refs[name] + } + } +} + +export const renderComponent = + ({ view, component, props, context: { attrs, slots }, extend = {} }) => + () => + hooks.h((view && view.value) || component, { ...props, ...attrs, ...extend }, slots) + +export const rootConfig = (context) => { + const instance = hooks.getCurrentInstance() + context && setInstanceEmitter(instance) + return instance.appContext.config.globalProperties +} + +export const appContext = () => + hooks.getCurrentInstance().appContext.app || { + component: () => { + // do nothing + } + } + +export const appProperties = () => hooks.getCurrentInstance().appContext.config.globalProperties + +export const useRouter = (instance = hooks.getCurrentInstance()) => { + const router = instance.appContext.config.globalProperties.$router + const route = router && router.currentRoute.value + + return { route, router } +} + +const emitEvent = (vm) => { + const broadcast = (vm, componentName, eventName, params) => { + const children = (vm.subTree && vm.subTree.children) || vm.children + + Array.isArray(children) && + children.forEach((child) => { + const name = child.type && child.type.componentName + const component = child.component + + if (name === componentName) { + component.emit(eventName, params) + component.$emitter && component.$emitter.emit(eventName, params) + } else { + broadcast(child, componentName, eventName, params) + } + }) + } + + return { + dispatch(componentName, eventName, params) { + let parent = vm.parent || vm.root + let name = parent.type && parent.type.componentName + + while (parent && (!name || name !== componentName)) { + parent = parent.parent + parent && (name = parent.type && parent.type.componentName) + } + + if (parent) { + parent.emit.apply(parent, [eventName].concat(params)) + parent.$emitter && parent.$emitter.emit(eventName, params) + } + }, + broadcast(componentName, eventName, params) { + broadcast(vm, componentName, eventName, params) + } + } +} + +const parent = (vm) => (handler) => { + let parent = getRealParent(vm) + let level = 0 + + const parentObject = (parent) => ({ + level, + vm: createVm({}, parent), + el: parent.vnode.el, + options: parent.type + }) + + if (typeof handler !== 'function') { + return parent ? parentObject(parent) : {} + } + + level++ + + while (parent) { + if (handler(parentObject(parent))) { + break + } + parent = getRealParent(parent) + level++ + } +} + +const children = (vm) => (handler) => { + if (typeof handler !== 'function') { + return generateChildren(vm.subTree) + } + + let layer = 1 + const broadcast = (subTree) => { + if (!subTree) { + return + } + const children = subTree.children || subTree.dynamicChildren + const level = layer++ + + if (Array.isArray(children)) { + if ( + children.some( + (child) => + child.component && + handler({ + level, + vm: createVm({}, child.component), + el: child.el, + options: child.type, + isLevel1: true + }) + ) + ) { + return + } + children.forEach((child) => broadcast(child)) + } + } + + broadcast(vm.subTree) +} + +const getMode = (instance, parentVm, root) => instance.props.tiny_mode || (parentVm || {}).$mode || (root.tiny_mode ? root.tiny_mode.value : 'pc') + +const getParentVm = (grandParent, instance) => (grandParent ? createVm({}, grandParent) : instance.parent ? createVm({}, instance.parent) : null) + +const setParentAttribute = + (grandParent, instance) => + ({ name, value }) => { + const ctx = grandParent ? grandParent.ctx : instance.parent.ctx + ctx[name] = value + } + +const defineInstanceProperties = (vm, instance) => (props) => { + Object.defineProperties(vm, props) + Object.defineProperties(instance.ctx, props) +} + +const defineParentInstanceProperties = (parentVm) => (props) => { + parentVm && Object.defineProperties(parentVm, props) +} + +export const tools = (context) => { + const instance = hooks.getCurrentInstance() + const root = instance.appContext.config.globalProperties + const { route, router } = useRouter(instance) + const i18n = instance.proxy.$root.$i18n + const { dispatch, broadcast } = emitEvent(instance) + const parentHandler = parent(instance) + const childrenHandler = children(instance) + const vm = createVm({}, instance, context) + const emit = context.emit + const refs = {} + const grandParent = !instance.props.tiny_template && getRealParent(instance) + const parentVm = getParentVm(grandParent, instance) + + hooks.onBeforeMount(() => defineInstanceVm(vm, instance)) + hooks.onMounted(() => onBeforeMount(instance, refs)) + + return { + vm, + emit, + emitter, + route, + router, + dispatch, + broadcast, + parentHandler, + childrenHandler, + refs, + i18n, + slots: instance.slots, + scopedSlots: instance.slots, + attrs: context.attrs, + parent: parentVm, + nextTick: hooks.nextTick, + constants: instance.props._constants, + mode: getMode(instance, parentVm, root), + service: root.$service, + getService: () => root.$getService(vm), + setParentAttribute: setParentAttribute(grandParent, instance), + defineInstanceProperties: defineInstanceProperties(vm, instance), + defineParentInstanceProperties: defineParentInstanceProperties(parentVm) + } +} + +const mapping = (content, before, after) => { + if (typeof content[before] !== 'undefined') { + const fn = content[before] + + content[after] = (el, binding, vnode) => { + vnode.context = binding.instance + fn(el, binding, vnode) + } + + delete content[before] + } +} + +export const directive = (directives) => { + for (let name in directives) { + if (Object.prototype.hasOwnProperty.call(directives, name)) { + const content = directives[name] + + mapping(content, 'bind', 'beforeMount') + mapping(content, 'update', 'updated') + mapping(content, 'unbind', 'unmounted') + } + } + + return directives +} + +export const parseVnode = (vnode) => vnode + +const parseProps = (propsData) => { + const props = {} + + for (let name in propsData) { + if (name === 'class' || name === 'style') { + props[name] = propsData[name] + } else if (name === 'on' || name === 'nativeOn') { + const events = propsData[name] + + for (let eventName in events) { + if (Object.prototype.hasOwnProperty.call(events, eventName)) { + props['on' + capitalize(camelize(eventName))] = events[eventName] + } + } + } else if (name === 'attrs' || name === 'props' || name === 'domProps') { + const attrs = propsData[name] + + for (let key in attrs) { + if (Object.prototype.hasOwnProperty.call(attrs, key)) { + props[key] = attrs[key] + } + } + } else { + props[name] = propsData[name] + } + } + + return props +} + +const customResolveComponent = (component) => { + let type = component + let customElement = false + + if (typeof component === 'string') { + const el = document.createElement(component) + const svgTagNames = ['SVG', 'CIRCLE', 'PATH'] + if ((el instanceof HTMLUnknownElement && svgTagNames.indexOf(el.nodeName) === -1) || component.indexOf('-') !== -1) { + component = component.toLowerCase() + customElement = true + + if (component === 'transition') { + type = hooks.Transition + } else if (component === 'transition-group') { + type = hooks.TransitionGroup + } else { + type = hooks.resolveComponent(component) + } + } else { + type = component + } + } + + return { type, component, customElement } +} + +export const h = (component, propsData, childData) => { + let props = {} + let children = childData + let ret = customResolveComponent(component) + let customElement = ret.customElement + let type = ret.type + + component = ret.component + + if (propsData && typeof propsData === 'object' && !Array.isArray(propsData)) { + props = parseProps(propsData) + propsData.scopedSlots && (children = propsData.scopedSlots) + } else if (typeof propsData === 'string' || Array.isArray(propsData)) { + childData = propsData + } + + if (typeof childData === 'string' || Array.isArray(childData)) { + children = typeof component !== 'string' || customElement ? () => childData : childData + } + + return hooks.h(type, props, children) +} + +export const createComponent = ({ component, propsData, el }) => { + const vnode = hooks.createVNode(component, propsData) + + hooks.render(vnode, el) + + return createVm({}, vnode.component) +} + +export default hooks diff --git a/packages/common/index.js b/packages/common/index.js new file mode 100644 index 000000000..700891423 --- /dev/null +++ b/packages/common/index.js @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import hooks from '@opentiny/vue-common/adapter' +import { appContext, appProperties, bindFilter, createComponent } from '@opentiny/vue-common/adapter' +import { defineAsyncComponent, directive, emitter, h, markRaw } from '@opentiny/vue-common/adapter' +import { parseVnode, renderComponent, rootConfig, tools, useRouter } from '@opentiny/vue-common/adapter' +import { t } from '@opentiny/vue-locale' +import '@opentiny/vue-theme/base/index.css' + +export const $prefix = 'Tiny' + +const tinyMap = { + tinyMode: 'tiny_mode', + tinyModeRoot: 'tiny_mode_root', + tinyTemplate: 'tiny_template', + tinyRenderless: 'tiny_renderless' +} + +export const $props = { + [tinyMap.tinyMode]: String, + [tinyMap.tinyModeRoot]: Boolean, + [tinyMap.tinyTemplate]: [Function, Object], + [tinyMap.tinyRenderless]: Function +} + +export const props = ['tiny_mode', 'tiny_mode_root', 'tiny_template', 'tiny_renderless', '_constants'] + +const resolveMode = (props, context) => { + let isRightMode = (mode) => ~['pc', 'mobile'].indexOf(mode) + let config = rootConfig(context) + let tinyModeProp = typeof props.tiny_mode === 'string' ? props.tiny_mode : null + let tinyModeInject = hooks.inject('TinyMode', null) + let tinyModeGlobal = config.tiny_mode && config.tiny_mode.value + + !isRightMode(tinyModeProp) && (tinyModeProp = null) + !isRightMode(tinyModeInject) && (tinyModeInject = null) + !isRightMode(tinyModeGlobal) && (tinyModeGlobal = null) + + let tinyMode = tinyModeProp || tinyModeInject || tinyModeGlobal || 'pc' + + if (props.tiny_mode_root) { + hooks.provide('TinyMode', tinyMode) + } + + return tinyMode +} + +export let setupComponent = {} + +export const initComponent = () => { + for (let name in setupComponent) { + if (Object.prototype.hasOwnProperty.call(setupComponent, name)) { + const component = setupComponent[name] + + if (typeof component.install === 'function') { + component.install(appContext()) + } + + if (typeof component.init === 'function') { + component.init(appProperties()) + } + } + } + + setupComponent = {} +} + +export const $setup = ({ props, context, template }) => { + const view = hooks.computed(() => { + if (typeof props.tiny_template !== 'undefined') { + return props.tiny_template + } + + const component = template(resolveMode(props, context)) + + return typeof component === 'function' ? defineAsyncComponent(component) : component + }) + + initComponent() + + return renderComponent({ view, props, context }) +} + +export const filterAttrs = (attrs, filters, include) => { + const props = {} + + for (let name in attrs) { + if (Object.prototype.hasOwnProperty.call(attrs, name)) { + const find = filters.some((r) => new RegExp(r).test(name)) + + if ((include && find) || (!include && !find)) { + props[name] = attrs[name] + } + } + } + + return props +} + +export const setup = ({ props, context, renderless, api, extendOptions = {}, mono = false }) => { + const render = typeof props.tiny_renderless === 'function' ? props.tiny_renderless : renderless + const utils = { $prefix, t, ...tools(context) } + const sdk = render(props, hooks, utils, extendOptions) + + const attrs = { + t, + vm: utils.vm, + f: bindFilter, + a: filterAttrs, + d: utils.defineInstanceProperties, + dp: utils.defineParentInstanceProperties + } + + /** + * 修复 render 函数下 this.slots 不会动态更新的问题(vue3 环境没有问题) + * 解决方法:在 instance 下注入 slots、scopedSlots + * 注意:renderless 下尽量使用 vm.$refs、vm.$slots + */ + attrs.d({ + slots: { get: () => utils.vm.$slots }, + scopedSlots: { get: () => utils.vm.$scopedSlots } + }) + + attrs.dp({ + slots: { get: () => utils.parent.$slots }, + scopedSlots: { get: () => utils.parent.$scopedSlots } + }) + + initComponent() + + Array.isArray(api) && + api.forEach((name) => { + const value = sdk[name] + + if (typeof value !== 'undefined') { + attrs[name] = value + mono || utils.setParentAttribute({ name, value }) + } + }) + + return attrs +} + +export const svg = + ({ name = 'Icon', component }) => + () => + markRaw({ + name: $prefix + name, + setup: (props, context) => { + const { fill, width, height } = context.attrs || {} + + const extend = { + style: { fill, width, height }, + class: { 'tiny-svg': true } + } + + extend.isSvg = true + // 解决本地运行会报大量警告的问题 + if (process.env.BUILD_TARGET) { + extend.nativeOn = context.listeners + } + + return renderComponent({ + component, + props, + context, + extend + }) + } + }) + +export const $install = (component) => { + component.install = function (Vue) { + Vue.component(component.name, component) + } +} + +export const version = process.env.COMPONENT_VERSION + +export { h, hooks, directive, parseVnode, useRouter, emitter, createComponent, defineAsyncComponent } + +export default { + h, + directive, + parseVnode, + useRouter, + emitter, + createComponent, + defineAsyncComponent, + filterAttrs, + initComponent, + setupComponent, + svg, + $prefix, + $props, + props, + $setup, + setup, + hooks +} diff --git a/packages/common/package.json b/packages/common/package.json new file mode 100644 index 000000000..df782f219 --- /dev/null +++ b/packages/common/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-common", + "version": "0.1.0", + "description": "", + "main": "index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-locale": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/container/index.js b/packages/container/index.js new file mode 100644 index 000000000..1b17e025c --- /dev/null +++ b/packages/container/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Container from './src/index' +import '@opentiny/vue-theme/container/index.css' + +/* istanbul ignore next */ +Container.install = function (Vue) { + Vue.component(Container.name, Container) +} + +Container.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Container.install(window.Vue) + } +} + +export default Container diff --git a/packages/container/package.json b/packages/container/package.json new file mode 100644 index 000000000..4d445e5bd --- /dev/null +++ b/packages/container/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-container", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/container/src/index.js b/packages/container/src/index.js new file mode 100644 index 000000000..e2491db6c --- /dev/null +++ b/packages/container/src/index.js @@ -0,0 +1,54 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const $constants = { + DEFAULT: 'default', + SIMPLE: 'simple', + LEGEND: 'legend', + CLASSIC: 'classic', + FASHION: 'fashion' +} + +const template = () => PCTemplate + +export default { + name: $prefix + 'Container', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + pattern: { + type: String, + default: 'default', + validator: (value) => !!$constants[value.toUpperCase()] + }, + headerHeight: { + type: [Number, String], + default: 60 + }, + asideWidth: { + type: [Number, String], + default: 200 + }, + footerHeight: { + type: [Number, String], + default: 60 + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/container/src/pc.vue b/packages/container/src/pc.vue new file mode 100644 index 000000000..afc1ae201 --- /dev/null +++ b/packages/container/src/pc.vue @@ -0,0 +1,39 @@ + + + + diff --git a/packages/credit-card-form/index.js b/packages/credit-card-form/index.js new file mode 100644 index 000000000..fd59de127 --- /dev/null +++ b/packages/credit-card-form/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import CreditCardForm from './src/index' +import '@opentiny/vue-theme/credit-card-form/index.css' + +/* istanbul ignore next */ +CreditCardForm.install = function (Vue) { + Vue.component(CreditCardForm.name, CreditCardForm) +} + +CreditCardForm.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + CreditCardForm.install(window.Vue) + } +} + +export default CreditCardForm diff --git a/packages/credit-card-form/package.json b/packages/credit-card-form/package.json new file mode 100644 index 000000000..6ff156e61 --- /dev/null +++ b/packages/credit-card-form/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-credit-card-form", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-credit-card": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/credit-card-form/src/index.js b/packages/credit-card-form/src/index.js new file mode 100644 index 000000000..d6418cdd1 --- /dev/null +++ b/packages/credit-card-form/src/index.js @@ -0,0 +1,30 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const template = () => PCTemplate + +export default { + name: $prefix + 'CreditCardForm', + props: { + ...$props, + backgroundImage: [String, Object], + formData: { + type: Object, + default: () => ({ cardYear: '', cardNumber: '', cardName: '', cardMonth: '', cardCvv: '' }) + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/credit-card-form/src/pc.vue b/packages/credit-card-form/src/pc.vue new file mode 100644 index 000000000..33a579e0f --- /dev/null +++ b/packages/credit-card-form/src/pc.vue @@ -0,0 +1,123 @@ + + + + diff --git a/packages/credit-card/index.js b/packages/credit-card/index.js new file mode 100644 index 000000000..5a32a4c92 --- /dev/null +++ b/packages/credit-card/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import CreditCard from './src/index' +import '@opentiny/vue-theme/credit-card/index.css' + +/* istanbul ignore next */ +CreditCard.install = function (Vue) { + Vue.component(CreditCard.name, CreditCard) +} + +CreditCard.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + CreditCard.install(window.Vue) + } +} + +export default CreditCard diff --git a/packages/credit-card/package.json b/packages/credit-card/package.json new file mode 100644 index 000000000..b56199c75 --- /dev/null +++ b/packages/credit-card/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-credit-card", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/credit-card/src/index.js b/packages/credit-card/src/index.js new file mode 100644 index 000000000..1fb64fafe --- /dev/null +++ b/packages/credit-card/src/index.js @@ -0,0 +1,35 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const template = () => PCTemplate + +export default { + name: $prefix + 'CreditCard', + props: { + ...$props, + backgroundImage: [String, Object], + isCardNumberMasked: Boolean, + fields: { + type: Object, + default: () => ({}) + }, + labels: { + type: Object, + default: () => ({ cardCvv: '', cardMonth: '', cardName: '', cardNumber: '', cardYear: '' }) + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/credit-card/src/pc.vue b/packages/credit-card/src/pc.vue new file mode 100644 index 000000000..e550347c2 --- /dev/null +++ b/packages/credit-card/src/pc.vue @@ -0,0 +1,128 @@ + + + + diff --git a/packages/crop/index.js b/packages/crop/index.js new file mode 100644 index 000000000..446df9ba4 --- /dev/null +++ b/packages/crop/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Crop from './src/index.vue' +import '@opentiny/vue-theme/crop/index.css' + +/* istanbul ignore next */ +Crop.install = function (Vue) { + Vue.component(Crop.name, Crop) +} + +Crop.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Crop.install(window.Vue) + } +} + +export default Crop diff --git a/packages/crop/package.json b/packages/crop/package.json new file mode 100644 index 000000000..42670e9b3 --- /dev/null +++ b/packages/crop/package.json @@ -0,0 +1,18 @@ +{ + "name": "@opentiny/vue-crop", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0", + "cropperjs": "1.5.7" + }, + "license": "MIT" +} diff --git a/packages/crop/src/index.vue b/packages/crop/src/index.vue new file mode 100644 index 000000000..2b1ce11e8 --- /dev/null +++ b/packages/crop/src/index.vue @@ -0,0 +1,193 @@ + + + + diff --git a/packages/date-panel/index.js b/packages/date-panel/index.js new file mode 100644 index 000000000..030964026 --- /dev/null +++ b/packages/date-panel/index.js @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import DatePanel from './src/index.vue' + +/* istanbul ignore next */ +DatePanel.install = function (Vue) { + Vue.component(DatePanel.name, DatePanel) +} + +DatePanel.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + DatePanel.install(window.Vue) + } +} + +export default DatePanel diff --git a/packages/date-panel/package.json b/packages/date-panel/package.json new file mode 100644 index 000000000..ae1ee3ff1 --- /dev/null +++ b/packages/date-panel/package.json @@ -0,0 +1,23 @@ +{ + "name": "@opentiny/vue-date-panel", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-input": "~0.1.0", + "@opentiny/vue-button": "~0.1.0", + "@opentiny/vue-locale": "~0.1.0", + "@opentiny/vue-time": "~0.1.0", + "@opentiny/vue-date-table": "~0.1.0", + "@opentiny/vue-year-table": "~0.1.0", + "@opentiny/vue-month-table": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/date-panel/src/index.vue b/packages/date-panel/src/index.vue new file mode 100644 index 000000000..edfb3e90b --- /dev/null +++ b/packages/date-panel/src/index.vue @@ -0,0 +1,243 @@ + + + + diff --git a/packages/date-picker/index.js b/packages/date-picker/index.js new file mode 100644 index 000000000..d065e4ebc --- /dev/null +++ b/packages/date-picker/index.js @@ -0,0 +1,31 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import DatePicker from './src/index.js' + +DatePicker.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +DatePicker.install = function (Vue) { + Vue.component(DatePicker.name, DatePicker) +} + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + DatePicker.install(window.Vue) + } +} + +export default DatePicker diff --git a/packages/date-picker/package.json b/packages/date-picker/package.json new file mode 100644 index 000000000..b268c9971 --- /dev/null +++ b/packages/date-picker/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-date-picker", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-picker": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/date-picker/src/index.js b/packages/date-picker/src/index.js new file mode 100644 index 000000000..c2d8feb70 --- /dev/null +++ b/packages/date-picker/src/index.js @@ -0,0 +1,149 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $setup, $prefix } from '@opentiny/vue-common' +import { iconOperationfaild } from '@opentiny/vue-icon' +import PCTemplate from './pc' +import MobileTemplate from './mobile' + +const currentYear = new Date().getFullYear() + +const template = (mode) => { + if (process.env.TINY_MODE === 'pc') return PCTemplate + else if (process.env.TINY_MODE === 'mobile') return MobileTemplate + else return mode === 'mobile' ? MobileTemplate : PCTemplate +} + +const $constants = { + MonthDay: 32, + Minutes: 59, + Hours: 23, + TotalMonth: 12, + Max: 'max', + Min: 'min', + Hour: 'hour', + Minute: 'minute', + CapYear: 'Year', + CapMonth: 'Month', + CapDate: 'Date', + CapHour: 'Hour', + CapMinute: 'Minute', + YearMonth: 'year-month', + DateTime: 'datetime', + Date: 'date', + HookMounted: 'hook-mounted', + Hidden: 'hidden', + Year: 'year', + Day: 'day' +} + +const validator = (value) => { + const result = + value === null || + value === undefined || + typeof value === 'string' || + value instanceof String || + (Array.isArray(value) && value.length === 2 && value.every((item) => typeof item === 'string' || item instanceof String)) + + return result +} + +export default { + name: $prefix + 'DatePicker', + props: { + ...$props, + type: { + type: String, + default: 'date' + }, + _constants: { + type: Object, + default: () => $constants + }, + timeArrowControl: Boolean, + size: String, + format: String, + valueFormat: String, + readonly: Boolean, + placeholder: String, + startPlaceholder: String, + endPlaceholder: String, + prefixIcon: Object, + clearIcon: { + type: Object, + default() { + return iconOperationfaild() + } + }, + name: { + default: '', + validator + }, + disabled: Boolean, + clearable: { + type: Boolean, + default: true + }, + id: { + default: '', + validator + }, + popperClass: String, + editable: { + type: Boolean, + default: true + }, + align: { + type: String, + default: 'left' + }, + modelValue: {}, + defaultValue: {}, + defaultTime: {}, + rangeSeparator: { + type: [Object, String], + default: '-' + }, + pickerOptions: {}, + unlinkPanels: Boolean, + validateEvent: { + type: Boolean, + default: true + }, + isRange: Boolean, + arrowControl: Boolean, + timezoneData: {}, + showTimezone: { + type: Boolean, + default: false + }, + defaultTimezone: {}, + visible: Boolean, + minDate: { + type: Date, + default: () => new Date(currentYear - 10, 0, 1), + validator: (val) => Object.prototype.toString.call(val) === '[object Date]' && !isNaN(val.getTime()) + }, + maxDate: { + type: Date, + default: () => new Date(currentYear + 10, 11, 31), + validator: (val) => Object.prototype.toString.call(val) === '[object Date]' && !isNaN(val.getTime()) + }, + formatter: { + type: Function, + default: (type, value) => value + }, + componentName: { type: String, default: 'DatePicker' } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/date-picker/src/mobile.vue b/packages/date-picker/src/mobile.vue new file mode 100644 index 000000000..2260a2ee2 --- /dev/null +++ b/packages/date-picker/src/mobile.vue @@ -0,0 +1,46 @@ + + + + diff --git a/packages/date-picker/src/pc.vue b/packages/date-picker/src/pc.vue new file mode 100644 index 000000000..ec555cbc8 --- /dev/null +++ b/packages/date-picker/src/pc.vue @@ -0,0 +1,33 @@ + + diff --git a/packages/date-range/index.js b/packages/date-range/index.js new file mode 100644 index 000000000..96c46ceff --- /dev/null +++ b/packages/date-range/index.js @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import DateRange from './src/index.vue' + +/* istanbul ignore next */ +DateRange.install = function (Vue) { + Vue.component(DateRange.name, DateRange) +} + +DateRange.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + DateRange.install(window.Vue) + } +} + +export default DateRange diff --git a/packages/date-range/package.json b/packages/date-range/package.json new file mode 100644 index 000000000..7743e1798 --- /dev/null +++ b/packages/date-range/package.json @@ -0,0 +1,21 @@ +{ + "name": "@opentiny/vue-date-range", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-input": "~0.1.0", + "@opentiny/vue-button": "~0.1.0", + "@opentiny/vue-locale": "~0.1.0", + "@opentiny/vue-time": "~0.1.0", + "@opentiny/vue-date-table": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/date-range/src/index.vue b/packages/date-range/src/index.vue new file mode 100644 index 000000000..05445a9b3 --- /dev/null +++ b/packages/date-range/src/index.vue @@ -0,0 +1,247 @@ + + + + diff --git a/packages/date-table/index.js b/packages/date-table/index.js new file mode 100644 index 000000000..0ecd01975 --- /dev/null +++ b/packages/date-table/index.js @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import DateTable from './src/index.vue' + +/* istanbul ignore next */ +DateTable.install = function (Vue) { + Vue.component(DateTable.name, DateTable) +} + +DateTable.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + DateTable.install(window.Vue) + } +} + +export default DateTable diff --git a/packages/date-table/package.json b/packages/date-table/package.json new file mode 100644 index 000000000..9fefc2867 --- /dev/null +++ b/packages/date-table/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-date-table", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/date-table/src/index.vue b/packages/date-table/src/index.vue new file mode 100644 index 000000000..6830e2ad0 --- /dev/null +++ b/packages/date-table/src/index.vue @@ -0,0 +1,85 @@ + + + + diff --git a/packages/detail-page/index.js b/packages/detail-page/index.js new file mode 100644 index 000000000..e54d25453 --- /dev/null +++ b/packages/detail-page/index.js @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import DetailPage from './src/index' +import '@opentiny/vue-theme/detail-page/index.css' + +DetailPage.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +DetailPage.install = function (Vue) { + Vue.component(DetailPage.name, DetailPage) +} + +DetailPage.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + DetailPage.install(window.Vue) + } +} + +export default DetailPage diff --git a/packages/detail-page/package.json b/packages/detail-page/package.json new file mode 100644 index 000000000..d09ee8a3d --- /dev/null +++ b/packages/detail-page/package.json @@ -0,0 +1,20 @@ +{ + "name": "@opentiny/vue-detail-page", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-checkbox": "~0.1.0", + "@opentiny/vue-button": "~0.1.0", + "@opentiny/vue-modal": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/detail-page/src/index.js b/packages/detail-page/src/index.js new file mode 100644 index 000000000..7f11bcddd --- /dev/null +++ b/packages/detail-page/src/index.js @@ -0,0 +1,72 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const $constants = { + LOCAL_TIPS: 'ui.detailpage.localTips', + LOCAL_TITLE: 'ui.detailpage.localTitle', + VALUE_TITLE: 'ui.detailpage.valueTitle', + LABEL_TITLE: 'ui.detailpage.labelTitle', + DIALOG_TITLE: 'ui.detailpage.dialogTitle', + SAVE_BUTTON_TEXT: 'ui.detailpage.saveButtonText', + CANCEL_BUTTTON_TEXT: 'ui.detailpage.cancelButtonText' +} + +const template = () => PCTemplate + +export default { + name: $prefix + 'DetailPage', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + modelValue: Array, + title: { + type: String, + default: '' + }, + textSplit: { + type: String, + default: '---' + }, + dialogTitle: { + type: String, + default: '' + }, + labelTitle: { + type: String, + default: '' + }, + tips: { + type: String, + default: '' + }, + valueTitle: { + type: String, + default: '' + }, + saveButton: { + type: String, + default: '' + }, + cancelButton: { + type: String, + default: '' + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/detail-page/src/pc.vue b/packages/detail-page/src/pc.vue new file mode 100644 index 000000000..544b97144 --- /dev/null +++ b/packages/detail-page/src/pc.vue @@ -0,0 +1,76 @@ + + + + diff --git a/packages/dialog-box/index.js b/packages/dialog-box/index.js new file mode 100644 index 000000000..097e5a445 --- /dev/null +++ b/packages/dialog-box/index.js @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import DialogBox from './src/index' + +/* istanbul ignore next */ +DialogBox.install = function (Vue) { + Vue.component(DialogBox.name, DialogBox) +} + +DialogBox.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + DialogBox.install(window.Vue) + } +} + +export default DialogBox diff --git a/packages/dialog-box/package.json b/packages/dialog-box/package.json new file mode 100644 index 000000000..f94e34a7e --- /dev/null +++ b/packages/dialog-box/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-dialog-box", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/dialog-box/src/index.js b/packages/dialog-box/src/index.js new file mode 100644 index 000000000..987d15fd7 --- /dev/null +++ b/packages/dialog-box/src/index.js @@ -0,0 +1,127 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' +import MobileTemplate from './mobile' + +const $constants = { + DIALOG_SLIDER_RIGHT: 'dialog-slideRight', + DIALOG_FADE: 'dialog-fade', + SELECT_DROPDOWN: $prefix + 'SelectDropdown', + DROPDOWN_MENU: $prefix + 'DropdownMenu', + DIALOG_BOX_CLASS: 'div.tiny-dialog-box', + PC_SCROLL_LOCK_CLASS: 'tiny-dialog-box__scroll-lock', + MOBILE_SCROLL_LOCK_CLASS: 'tiny-mobile-dialog-box__scroll-lock', + Mode: 'pc', + scrollLockClass(mode) { + return mode === this.Mode ? this.PC_SCROLL_LOCK_CLASS : this.MOBILE_SCROLL_LOCK_CLASS + } +} + +const template = (mode) => { + if (process.env.TINY_MODE === 'pc') return PCTemplate + else if (process.env.TINY_MODE === 'mobile') return MobileTemplate + else return mode === 'mobile' ? MobileTemplate : PCTemplate +} + +export default { + name: $prefix + 'DialogBox', + model: { + prop: 'visible', + event: 'update:visible' + }, + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + appendToBody: { + type: Boolean, + default: () => false + }, + beforeClose: Function, + center: { + type: Boolean, + default: () => false + }, + closeOnClickModal: { + type: Boolean, + default: () => true + }, + closeOnPressEscape: { + type: Boolean, + default: () => true + }, + destroyOnClose: Boolean, + dialogClass: { + type: String, + default: () => '' + }, + draggable: { + type: Boolean, + default: () => false + }, + fullscreen: { + type: Boolean, + default: () => false + }, + isFormReset: { + type: Boolean, + default: () => true + }, + lockScroll: { + type: Boolean, + default: () => true + }, + modal: { + type: Boolean, + default: () => true + }, + modalAppendToBody: { + type: Boolean, + default: () => true + }, + resize: { + type: Boolean, + default: () => false + }, + rightSlide: { + type: Boolean, + default: () => false + }, + showClose: { + type: Boolean, + default: () => true + }, + showHeader: { + type: Boolean, + default: () => true + }, + title: { + type: String, + default: () => '' + }, + top: String, + visible: { + type: Boolean, + default: () => false + }, + width: { + type: String, + default: () => '500px' + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/dialog-box/src/mobile.vue b/packages/dialog-box/src/mobile.vue new file mode 100644 index 000000000..dac64d012 --- /dev/null +++ b/packages/dialog-box/src/mobile.vue @@ -0,0 +1,55 @@ + + + + diff --git a/packages/dialog-box/src/pc.vue b/packages/dialog-box/src/pc.vue new file mode 100644 index 000000000..5b35d01d6 --- /dev/null +++ b/packages/dialog-box/src/pc.vue @@ -0,0 +1,100 @@ + + + + diff --git a/packages/drop-times/index.js b/packages/drop-times/index.js new file mode 100644 index 000000000..41cf3b494 --- /dev/null +++ b/packages/drop-times/index.js @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import DropTimes from './src/index' +import '@opentiny/vue-theme/drop-times/index.css' + +DropTimes.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +DropTimes.install = function (Vue) { + Vue.component(DropTimes.name, DropTimes) +} + +DropTimes.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + DropTimes.install(window.Vue) + } +} + +export default DropTimes diff --git a/packages/drop-times/package.json b/packages/drop-times/package.json new file mode 100644 index 000000000..e4355fa75 --- /dev/null +++ b/packages/drop-times/package.json @@ -0,0 +1,18 @@ +{ + "name": "@opentiny/vue-drop-times", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-select": "~0.1.0", + "@opentiny/vue-option": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/drop-times/src/index.js b/packages/drop-times/src/index.js new file mode 100644 index 000000000..d5c8122f9 --- /dev/null +++ b/packages/drop-times/src/index.js @@ -0,0 +1,52 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const template = () => PCTemplate + +export default { + name: $prefix + 'DropTimes', + props: { + ...$props, + modelValue: {}, + placeholder: { + type: String, + default: '' + }, + tabindex: { + type: String, + default: '1' + }, + size: String, + popperClass: String, + popperAppendToBody: { + type: Boolean, + default: true + }, + start: { + type: Number, + default: 0 + }, + end: { + type: Number, + default: 24 * 60 + }, + step: { + type: Number, + default: 15 + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/drop-times/src/pc.vue b/packages/drop-times/src/pc.vue new file mode 100644 index 000000000..2879a8261 --- /dev/null +++ b/packages/drop-times/src/pc.vue @@ -0,0 +1,46 @@ + + + + diff --git a/packages/dropdown-item/index.js b/packages/dropdown-item/index.js new file mode 100644 index 000000000..4826e304c --- /dev/null +++ b/packages/dropdown-item/index.js @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import DropdownItem from './src/index' + +DropdownItem.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +DropdownItem.install = function (Vue) { + Vue.component(DropdownItem.name, DropdownItem) +} + +DropdownItem.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + DropdownItem.install(window.Vue) + } +} + +export default DropdownItem diff --git a/packages/dropdown-item/package.json b/packages/dropdown-item/package.json new file mode 100644 index 000000000..57093e3eb --- /dev/null +++ b/packages/dropdown-item/package.json @@ -0,0 +1,19 @@ +{ + "name": "@opentiny/vue-dropdown-item", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-popup": "~0.1.0", + "@opentiny/vue-button": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/dropdown-item/src/index.js b/packages/dropdown-item/src/index.js new file mode 100644 index 000000000..0f73a07e6 --- /dev/null +++ b/packages/dropdown-item/src/index.js @@ -0,0 +1,61 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' +import MobileTemplate from './mobile' + +const template = (mode) => { + if (process.env.TINY_MODE === 'pc') return PCTemplate + else if (process.env.TINY_MODE === 'mobile') return MobileTemplate + else return mode === 'mobile' ? MobileTemplate : PCTemplate +} + +export default { + name: $prefix + 'DropdownItem', + componentName: 'TinyDropdownItem', + props: { + ...$props, + icon: [String, Object], + disabled: Boolean, + divided: Boolean, + command: {}, + title: String, + titleClass: String, + options: { + type: Array, + default: () => [] + }, + type: { + type: String, + default: 'selection' + }, + label: { + type: String, + default: '' + }, + itemData: { + type: Object, + default: () => ({}) + }, + appendToBody: { + type: Boolean, + default: true + }, + textField: { + type: String, + default: 'label' + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/dropdown-item/src/index.vue b/packages/dropdown-item/src/index.vue new file mode 100644 index 000000000..a5094a0c6 --- /dev/null +++ b/packages/dropdown-item/src/index.vue @@ -0,0 +1,129 @@ + + + + diff --git a/packages/dropdown-item/src/mobile.vue b/packages/dropdown-item/src/mobile.vue new file mode 100644 index 000000000..aac8f8c83 --- /dev/null +++ b/packages/dropdown-item/src/mobile.vue @@ -0,0 +1,114 @@ + + + + diff --git a/packages/dropdown-item/src/pc.vue b/packages/dropdown-item/src/pc.vue new file mode 100644 index 000000000..21a551885 --- /dev/null +++ b/packages/dropdown-item/src/pc.vue @@ -0,0 +1,69 @@ + + + + + diff --git a/packages/dropdown-menu/index.js b/packages/dropdown-menu/index.js new file mode 100644 index 000000000..12e7e5f0d --- /dev/null +++ b/packages/dropdown-menu/index.js @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import DropdownMenu from './src/index' + +/* istanbul ignore next */ +DropdownMenu.install = function (Vue) { + Vue.component(DropdownMenu.name, DropdownMenu) +} + +DropdownMenu.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + DropdownMenu.install(window.Vue) + } +} + +export default DropdownMenu diff --git a/packages/dropdown-menu/package.json b/packages/dropdown-menu/package.json new file mode 100644 index 000000000..34988ace9 --- /dev/null +++ b/packages/dropdown-menu/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-dropdown-menu", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/dropdown-menu/src/index.js b/packages/dropdown-menu/src/index.js new file mode 100644 index 000000000..3489ed5e3 --- /dev/null +++ b/packages/dropdown-menu/src/index.js @@ -0,0 +1,78 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' +import MobileTemplate from './mobile' + +const template = (mode) => { + if (process.env.TINY_MODE === 'pc') return PCTemplate + else if (process.env.TINY_MODE === 'mobile') return MobileTemplate + else return mode === 'mobile' ? MobileTemplate : PCTemplate +} + +export default { + name: $prefix + 'DropdownMenu', + componentName: $prefix + 'DropdownMenu', + props: { + ...$props, + visibleArrow: { + type: Boolean, + default: false + }, + arrowOffset: { + type: Number, + default: 0 + }, + placement: { + type: String, + default: 'bottom-end' + }, + popperClass: String, + popperAppendToBody: { + type: Boolean, + default: true + }, + activeColor: String, + closeOnClickOutside: { + type: Boolean, + default: true + }, + closeOnClickOverlay: { + type: Boolean, + default: true + }, + direction: { + type: String, + default: 'down' + }, + duration: { + type: [Number, String], + default: 0.2 + }, + overlay: { + type: Boolean, + default: true + }, + zIndex: [Number, String], + options: { + type: Array, + default: () => [] + }, + textField: { + type: String, + default: 'label' + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/dropdown-menu/src/index.vue b/packages/dropdown-menu/src/index.vue new file mode 100644 index 000000000..ea9520290 --- /dev/null +++ b/packages/dropdown-menu/src/index.vue @@ -0,0 +1,102 @@ + + + + diff --git a/packages/dropdown-menu/src/mobile.vue b/packages/dropdown-menu/src/mobile.vue new file mode 100644 index 000000000..4deccf514 --- /dev/null +++ b/packages/dropdown-menu/src/mobile.vue @@ -0,0 +1,79 @@ + + + + diff --git a/packages/dropdown-menu/src/pc.vue b/packages/dropdown-menu/src/pc.vue new file mode 100644 index 000000000..35ef39c94 --- /dev/null +++ b/packages/dropdown-menu/src/pc.vue @@ -0,0 +1,52 @@ + + + + + diff --git a/packages/dropdown/index.js b/packages/dropdown/index.js new file mode 100644 index 000000000..5e77a7a9a --- /dev/null +++ b/packages/dropdown/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Dropdown from './src/index.vue' +import '@opentiny/vue-theme/dropdown/index.css' + +/* istanbul ignore next */ +Dropdown.install = function (Vue) { + Vue.component(Dropdown.name, Dropdown) +} + +Dropdown.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Dropdown.install(window.Vue) + } +} + +export default Dropdown diff --git a/packages/dropdown/package.json b/packages/dropdown/package.json new file mode 100644 index 000000000..11dfe1343 --- /dev/null +++ b/packages/dropdown/package.json @@ -0,0 +1,20 @@ +{ + "name": "@opentiny/vue-dropdown", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-theme": "~0.1.0", + "@opentiny/vue-button": "~0.1.0", + "@opentiny/vue-button-group": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/dropdown/src/index.vue b/packages/dropdown/src/index.vue new file mode 100644 index 000000000..c2ef26f43 --- /dev/null +++ b/packages/dropdown/src/index.vue @@ -0,0 +1,138 @@ + + diff --git a/packages/exception/index.js b/packages/exception/index.js new file mode 100644 index 000000000..a0d7187a9 --- /dev/null +++ b/packages/exception/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Exception from './src/index.vue' +import '@opentiny/vue-theme-mobile/exception/index.css' + +/* istanbul ignore next */ +Exception.install = function (Vue) { + Vue.component(Exception.name, Exception) +} + +Exception.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Exception.install(window.Vue) + } +} + +export default Exception diff --git a/packages/exception/package.json b/packages/exception/package.json new file mode 100644 index 000000000..a7120d051 --- /dev/null +++ b/packages/exception/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-exception", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-button": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/exception/src/index.vue b/packages/exception/src/index.vue new file mode 100644 index 000000000..48503a695 --- /dev/null +++ b/packages/exception/src/index.vue @@ -0,0 +1,58 @@ + + + + diff --git a/packages/fall-menu/index.js b/packages/fall-menu/index.js new file mode 100644 index 000000000..0d4af9986 --- /dev/null +++ b/packages/fall-menu/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import FallMenu from './src/index' +import '@opentiny/vue-theme/fall-menu/index.css' + +/* istanbul ignore next */ +FallMenu.install = function (Vue) { + Vue.component(FallMenu.name, FallMenu) +} + +FallMenu.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + FallMenu.install(window.Vue) + } +} + +export default FallMenu diff --git a/packages/fall-menu/package.json b/packages/fall-menu/package.json new file mode 100644 index 000000000..829efe619 --- /dev/null +++ b/packages/fall-menu/package.json @@ -0,0 +1,19 @@ +{ + "name": "@opentiny/vue-fall-menu", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-row": "~0.1.0", + "@opentiny/vue-col": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/fall-menu/src/index.js b/packages/fall-menu/src/index.js new file mode 100644 index 000000000..fc1701623 --- /dev/null +++ b/packages/fall-menu/src/index.js @@ -0,0 +1,26 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $prefix, $props, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const template = () => PCTemplate + +export default { + name: $prefix + 'FallMenu', + props: { + ...$props, + data: { type: Array, default: () => [] } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/fall-menu/src/pc.vue b/packages/fall-menu/src/pc.vue new file mode 100644 index 000000000..4f1762237 --- /dev/null +++ b/packages/fall-menu/src/pc.vue @@ -0,0 +1,99 @@ + + + + diff --git a/packages/file-upload/index.js b/packages/file-upload/index.js new file mode 100644 index 000000000..4627ec581 --- /dev/null +++ b/packages/file-upload/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import FileUpload from './src/index' +import '@opentiny/vue-theme/file-upload/index.css' + +/* istanbul ignore next */ +FileUpload.install = function (Vue) { + Vue.component(FileUpload.name, FileUpload) +} + +FileUpload.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + FileUpload.install(window.Vue) + } +} + +export default FileUpload diff --git a/packages/file-upload/package.json b/packages/file-upload/package.json new file mode 100644 index 000000000..72ea26827 --- /dev/null +++ b/packages/file-upload/package.json @@ -0,0 +1,19 @@ +{ + "name": "@opentiny/vue-file-upload", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-progress": "~0.1.0", + "@opentiny/vue-upload-list": "~0.1.0", + "@opentiny/vue-upload": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/file-upload/src/index.js b/packages/file-upload/src/index.js new file mode 100644 index 000000000..910ef08e0 --- /dev/null +++ b/packages/file-upload/src/index.js @@ -0,0 +1,203 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' +import MobileTemplate from './mobile' +import streamSaver from 'streamsaver' + +const $constants = { + UPLOAD_INNER: 'upload-inner', + FILE_STATUS: { + READY: 'ready', + SUCESS: 'success', + UPLOADING: 'uploading', + FAIL: 'fail', + DOWNLOADING: 'downloading' + }, + LIST_TYPE: { + TEXT: 'text', + PICTURE_CARD: 'picture-card', + PICTURE: 'picture', + THUMB: 'thumb' + }, + EDM: { + CHUNKINIT: 'chunkInit', + FILESIZE: 'fileSize', + CHUNKS: 'chunks', + FILENAME: 'fileName', + ISCHECKCODE: 'isCheckCode', + CHECKCODE: 'checkCode', + MULTIPART: 'multipartFile', + DOCID: 'docId', + CHUNK: 'chunk', + SINGLEUPLOAD: 'uploadFile', + LOWERNAME: 'filename', + FOLDERKEY: 'ui.fileUpload.folder', + FORMAT: 'docFormat=wm&', + WATER: 'usageScenes=water&wmType=wm&', + SOURCE: 'usageScenes=source&', + URLCONTS: '&type=doc&pageNum=1&docVersion=', + EDMTOKEN: 'EDM-Authorization', + TRACEID: 'x-trace-id', + TEXT: 'edm-text', + JSLIB: './jslib/', + I18NKEY: 'ui.fileUpload.token', + LARGEFILEKEY: 'ui.fileUpload.largefile', + EXCEED: 'ui.fileUpload.exceed', + SIZE: 'ui.fileUpload.fileSize', + SIZE_2G: 2 * 1024 * 1024, // 单位(KB) + SIZE_20M: 20 * 1024, + SIZE_8M: 8 * 1024, + FILEEMPTY: 'ui.fileUpload.empty', + KIASCANTIP: 'ui.fileUpload.kiaScanTip', + FILENAMEEXCEEDS: 'ui.fileUpload.fileNameExceeds', + THEFILENAME: 'ui.fileUpload.fileName' + } +} + +const template = (mode) => { + if (process.env.AUI_MODE === 'pc') return PCTemplate + else if (process.env.AUI_MODE === 'mobile') return MobileTemplate + else return mode === 'mobile' ? MobileTemplate : PCTemplate +} + +export default { + name: $prefix + 'FileUpload', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + accept: String, + action: String, + autoUpload: { + type: Boolean, + default: () => true + }, + beforeRemove: Function, + beforeUpload: Function, + data: Object, + disabled: Boolean, + display: { + type: Boolean, + default: () => true + }, + drag: Boolean, + dragger: Boolean, + edm: { + type: Object, + default: () => ({}) + }, + fileIconList: { + type: Array, + default: () => [] + }, + fileList: { + type: Array, + default: () => [] + }, + fileSize: { + type: [Number, Array], + validator(value) { + return Array.isArray(value) ? value[0] < value[1] : typeof value === 'number' + } + }, + fileTitle: { + type: String, + default: () => '附件' + }, + headerShow: { + type: Boolean, + default: () => true + }, + headers: { + type: Object, + default: () => ({}) + }, + httpRequest: Function, + limit: Number, + listType: { + type: String, + default: () => 'text', + validator: (value) => !!$constants.LIST_TYPE[value.toUpperCase().replace('-', '_')] + }, + mergeService: { + type: Boolean, + default: () => false + }, + multiple: Boolean, + name: { + type: String, + default: () => 'file' + }, + openDownloadFile: { + type: Boolean, + default: () => false + }, + showFileList: { + type: Boolean, + default: () => true + }, + size: String, + successStatistics: { + type: Boolean, + default: () => true + }, + thumbOption: { + type: Object, + default: () => ({ + popperClass: '', + width: 270, + showDownload: false, + downloadFile: Function, + showDel: false, + icon: 'icon-attachment', + showTooltip: false + }) + }, + type: { + type: String, + default: () => 'select' + }, + uploadIcon: { + type: Boolean, + default: () => true + }, + withCredentials: { + type: Boolean, + default: () => true + }, + isFolderTitle: { + type: Boolean, + default: false + }, + plugin: { + type: [Object, Function], + default: () => streamSaver + }, + listOption: { + type: Object, + default: () => ({ + showUpdate: true, + showDel: true + }) + }, + maxNameLength: { + type: Number, + default: 20 + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/file-upload/src/mobile.vue b/packages/file-upload/src/mobile.vue new file mode 100644 index 000000000..687a29b35 --- /dev/null +++ b/packages/file-upload/src/mobile.vue @@ -0,0 +1,178 @@ + + diff --git a/packages/file-upload/src/pc.vue b/packages/file-upload/src/pc.vue new file mode 100644 index 000000000..ec2208368 --- /dev/null +++ b/packages/file-upload/src/pc.vue @@ -0,0 +1,264 @@ + + diff --git a/packages/floatbar/index.js b/packages/floatbar/index.js new file mode 100644 index 000000000..b8964d7a1 --- /dev/null +++ b/packages/floatbar/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Floatbar from './src/index.js' +import '@opentiny/vue-theme/floatbar/index.css' + +/* istanbul ignore next */ +Floatbar.install = function (Vue) { + Vue.component(Floatbar.name, Floatbar) +} + +Floatbar.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Floatbar.install(window.Vue) + } +} + +export default Floatbar diff --git a/packages/floatbar/package.json b/packages/floatbar/package.json new file mode 100644 index 000000000..14dd9ac07 --- /dev/null +++ b/packages/floatbar/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-floatbar", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/floatbar/src/index.js b/packages/floatbar/src/index.js new file mode 100644 index 000000000..76efeea5b --- /dev/null +++ b/packages/floatbar/src/index.js @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $prefix, $props, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const template = () => PCTemplate + +export default { + name: $prefix + 'Floatbar', + props: { + ...$props + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/floatbar/src/pc.vue b/packages/floatbar/src/pc.vue new file mode 100644 index 000000000..c92e50ebd --- /dev/null +++ b/packages/floatbar/src/pc.vue @@ -0,0 +1,35 @@ + + + + diff --git a/packages/form-item/index.js b/packages/form-item/index.js new file mode 100644 index 000000000..8cd362cb3 --- /dev/null +++ b/packages/form-item/index.js @@ -0,0 +1,26 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import FormItem from './src/index.vue' + +/* istanbul ignore next */ +FormItem.install = function (Vue) { + Vue.component(FormItem.name, FormItem) +} + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + FormItem.install(window.Vue) + } +} + +export default FormItem diff --git a/packages/form-item/package.json b/packages/form-item/package.json new file mode 100644 index 000000000..e0cf5fb66 --- /dev/null +++ b/packages/form-item/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-form-item", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-tooltip": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/form-item/src/index.vue b/packages/form-item/src/index.vue new file mode 100644 index 000000000..9c992d5ea --- /dev/null +++ b/packages/form-item/src/index.vue @@ -0,0 +1,269 @@ + + diff --git a/packages/form-item/src/label-wrap.js b/packages/form-item/src/label-wrap.js new file mode 100644 index 000000000..cb9b986b8 --- /dev/null +++ b/packages/form-item/src/label-wrap.js @@ -0,0 +1,95 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { setup, h } from '@opentiny/vue-common' + +export default { + props: { + isAutoWidth: Boolean, + updateAll: Boolean, + isMobile: Boolean + }, + inject: ['form', 'formItem'], + render() { + const slotsDefault = this.slots.default && this.slots.default() + const classPrefix = this.isMobile ? 'tiny-mobile-' : 'tiny-' + + if (!slotsDefault) return null + + if (this.isAutoWidth) { + const autoLabelWidth = this.form.autoLabelWidth + const style = {} + + if (autoLabelWidth && autoLabelWidth !== 'auto') { + const marginLeft = parseInt(autoLabelWidth, 10) - this.computedWidth + if (marginLeft) { + style.marginLeft = marginLeft + 'px' + } + } + + return h( + 'div', + { + class: `${classPrefix}form-item_label-wrap`, + style + }, + slotsDefault + ) + } else { + return slotsDefault[0] + } + }, + methods: { + getLabelWidth() { + const computedStylWidth = (elem) => window.getComputedStyle(elem).width + const ceilFloat = (f) => Math.ceil(parseFloat(f)) + + return !this.$el || !this.$el.firstElementChild ? 0 : ceilFloat(computedStylWidth(this.$el.firstElementChild)) + }, + updateLabelWidth(action = 'update') { + if (!this.$slots.default || !this.isAutoWidth || !this.$el.firstElementChild) { + return + } + + const setComputedWidth = () => (this.computedWidth = this.getLabelWidth()) + const deregisterFormLabelWidth = () => this.form.deregisterLabelWidth(this.computedWidth) + + if (action === 'update') { + setComputedWidth() + } else if (action === 'remove') { + deregisterFormLabelWidth() + } + } + }, + watch: { + computedWidth(val, oldVal) { + if (this.updateAll) { + this.form.registerLabelWidth(val, oldVal) + this.formItem.updateComputedLabelWidth(val) + } + } + }, + setup(props, context) { + const renderless = (props, { onMounted, onUpdated, onBeforeUnmount }, { vm }) => { + onMounted(() => vm.updateLabelWidth('update')) + onUpdated(() => vm.updateLabelWidth('update')) + onBeforeUnmount(() => vm.updateLabelWidth('remove')) + + return { + computedWidth: 0 + } + } + + const api = ['computedWidth'] + + return setup({ props, context, renderless, api }) + } +} diff --git a/packages/form/index.js b/packages/form/index.js new file mode 100644 index 000000000..f986b4610 --- /dev/null +++ b/packages/form/index.js @@ -0,0 +1,26 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Form from './src/index' + +/* istanbul ignore next */ +Form.install = function (Vue) { + Vue.component(Form.name, Form) +} + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Form.install(window.Vue) + } +} + +export default Form diff --git a/packages/form/package.json b/packages/form/package.json new file mode 100644 index 000000000..88959a25f --- /dev/null +++ b/packages/form/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-form", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/form/src/index.js b/packages/form/src/index.js new file mode 100644 index 000000000..3ea5baa4c --- /dev/null +++ b/packages/form/src/index.js @@ -0,0 +1,98 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' +import MobileTemplate from './mobile' + +const template = (mode) => { + if (process.env.TINY_MODE === 'pc') return PCTemplate + else if (process.env.TINY_MODE === 'mobile') return MobileTemplate + else return mode === 'mobile' ? MobileTemplate : PCTemplate +} + +export default { + name: $prefix + 'Form', + componentName: 'Form', + props: { + ...$props, + model: Object, + rules: Object, + inlineMessage: Boolean, + statusIcon: Boolean, + showMessage: { + type: Boolean, + default: true + }, + validatePosition: { + type: String, + default: 'right' + }, + size: String, + disabled: Boolean, + validateOnRuleChange: { + type: Boolean, + default: true + }, + hideRequiredAsterisk: { + type: Boolean, + default: false + }, + labelPosition: { + type: String, + default: 'right', + validator: (value) => ~['left', 'top', 'right'].indexOf(value) + }, + labelWidth: { + type: String, + default: '80px' + }, + labelAlign: { + type: Boolean, + default: false + }, + contentOffset: Number, + labelSuffix: { + type: String, + default: '' + }, + inline: { + type: Boolean, + default: false + }, + responsiveLayout: { + type: Boolean, + default: false + }, + validateType: { + type: String, + default: 'tip', + validator(value) { + return ~['tip', 'text'].indexOf(value) + } + }, + manual: { + type: Boolean, + default: false + }, + appendToBody: { + type: Boolean, + default: undefined + }, + popperOptions: { + type: Object, + default: () => ({}) + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/form/src/mobile.vue b/packages/form/src/mobile.vue new file mode 100644 index 000000000..9ab6909cc --- /dev/null +++ b/packages/form/src/mobile.vue @@ -0,0 +1,54 @@ + + + + diff --git a/packages/form/src/pc.vue b/packages/form/src/pc.vue new file mode 100644 index 000000000..007ebc9a8 --- /dev/null +++ b/packages/form/src/pc.vue @@ -0,0 +1,60 @@ + + + + diff --git a/packages/fullscreen/index.js b/packages/fullscreen/index.js new file mode 100644 index 000000000..aeed0575f --- /dev/null +++ b/packages/fullscreen/index.js @@ -0,0 +1,38 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Fullscreen from './src/index.vue' +import FullscreenApi from '@opentiny/vue-renderless/common/deps/fullscreen/apis' +import '@opentiny/vue-theme/fullscreen/index.css' + +const apis = ['exit', 'enter', 'element', 'getState', 'isEnabled', 'isFullscreen', 'options', 'request', 'support', 'toggle'] + +apis.forEach((api) => { + if (FullscreenApi[api] && !Fullscreen[api]) { + Fullscreen[api] = FullscreenApi[api] + } +}) + +/* istanbul ignore next */ +Fullscreen.install = function (Vue) { + Vue.component(Fullscreen.name, Fullscreen) +} + +Fullscreen.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Fullscreen.install(window.Vue) + } +} + +export default Fullscreen diff --git a/packages/fullscreen/package.json b/packages/fullscreen/package.json new file mode 100644 index 000000000..39b8827eb --- /dev/null +++ b/packages/fullscreen/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-fullscreen", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/fullscreen/src/index.vue b/packages/fullscreen/src/index.vue new file mode 100644 index 000000000..493e861aa --- /dev/null +++ b/packages/fullscreen/src/index.vue @@ -0,0 +1,62 @@ + + + + diff --git a/packages/grid-column/index.js b/packages/grid-column/index.js new file mode 100644 index 000000000..51408dce4 --- /dev/null +++ b/packages/grid-column/index.js @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import GridColumn from './src/index' + +GridColumn.install = function (Vue) { + Vue.component(GridColumn.name, GridColumn) +} + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + GridColumn.install(window.Vue) + } +} + +export default GridColumn diff --git a/packages/grid-column/package.json b/packages/grid-column/package.json new file mode 100644 index 000000000..860ae88f0 --- /dev/null +++ b/packages/grid-column/package.json @@ -0,0 +1,15 @@ +{ + "name": "@opentiny/vue-grid-column", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-grid": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/grid-column/src/index.js b/packages/grid-column/src/index.js new file mode 100644 index 000000000..b1aa64b53 --- /dev/null +++ b/packages/grid-column/src/index.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { GridColumn } from '@opentiny/vue-grid' + +export default GridColumn diff --git a/packages/grid-manager/index.js b/packages/grid-manager/index.js new file mode 100644 index 000000000..1f766a469 --- /dev/null +++ b/packages/grid-manager/index.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import GridManager from './src/index' + +export default GridManager diff --git a/packages/grid-manager/package.json b/packages/grid-manager/package.json new file mode 100644 index 000000000..8f550c5e7 --- /dev/null +++ b/packages/grid-manager/package.json @@ -0,0 +1,15 @@ +{ + "name": "@opentiny/vue-grid-manager", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-grid": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/grid-manager/src/antd.js b/packages/grid-manager/src/antd.js new file mode 100644 index 000000000..77ca3499a --- /dev/null +++ b/packages/grid-manager/src/antd.js @@ -0,0 +1,35 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { GridAdapter } from '@opentiny/vue-grid' + +export default function () { + function handleClearEvent(params, event) { + if (!params) { + return + } + + const getTarget = params.$table.getEventTargetNode + const bodyEl = document.body + + if ( + getTarget(event, bodyEl, 'ant-select-dropdown').flag || + getTarget(event, bodyEl, 'ant-cascader-menus').flag || + getTarget(event, bodyEl, 'ant-calendar-picker-container').flag || + getTarget(event, bodyEl, 'ant-time-picker-panel').flag + ) { + return false + } + } + + GridAdapter.interceptor.add('event.clear_actived', handleClearEvent) + GridAdapter.interceptor.add('event.clear_filter', handleClearEvent) +} diff --git a/packages/grid-manager/src/element-ui.js b/packages/grid-manager/src/element-ui.js new file mode 100644 index 000000000..2aed137dc --- /dev/null +++ b/packages/grid-manager/src/element-ui.js @@ -0,0 +1,36 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { GridAdapter } from '@opentiny/vue-grid' + +export default function () { + function handleClearEvent(params, event) { + if (!params) { + return + } + + const getTarget = params.$table.getEventTargetNode + const bodyEl = document.body + + if ( + getTarget(event, bodyEl, 'el-autocomplete-suggestion').flag || + getTarget(event, bodyEl, 'el-select-dropdown').flag || + getTarget(event, bodyEl, 'el-cascader__dropdown').flag || + getTarget(event, bodyEl, 'el-cascader-menus').flag || + getTarget(event, bodyEl, 'el-picker-panel').flag + ) { + return false + } + } + + GridAdapter.interceptor.add('event.clear_actived', handleClearEvent) + GridAdapter.interceptor.add('event.clear_filter', handleClearEvent) +} diff --git a/packages/grid-manager/src/index.js b/packages/grid-manager/src/index.js new file mode 100644 index 000000000..345ee5d11 --- /dev/null +++ b/packages/grid-manager/src/index.js @@ -0,0 +1,22 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { GridAdapter } from '@opentiny/vue-grid' +import useAntd from './antd' +import useiView from './iview' +import useElementUI from './element-ui' + +export default { + useAntd, + useiView, + useElementUI, + Interceptor: GridAdapter +} diff --git a/packages/grid-manager/src/iview.js b/packages/grid-manager/src/iview.js new file mode 100644 index 000000000..493839f4b --- /dev/null +++ b/packages/grid-manager/src/iview.js @@ -0,0 +1,30 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { GridAdapter } from '@opentiny/vue-grid' + +export default function () { + function handleClearEvent(params, event) { + if (!params) { + return + } + + const getTarget = params.$table.getEventTargetNode + const bodyEl = document.body + + if (getTarget(event, bodyEl, 'ivu-select-dropdown').flag) { + return false + } + } + + GridAdapter.interceptor.add('event.clear_actived', handleClearEvent) + GridAdapter.interceptor.add('event.clear_filter', handleClearEvent) +} diff --git a/packages/grid-toolbar/index.js b/packages/grid-toolbar/index.js new file mode 100644 index 000000000..1c53fd7b0 --- /dev/null +++ b/packages/grid-toolbar/index.js @@ -0,0 +1,27 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import GridToolbar from './src/index' + +GridToolbar.install = function (Vue) { + Vue.component(GridToolbar.name, GridToolbar) +} + +GridToolbar.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + GridToolbar.install(window.Vue) + } +} + +export default GridToolbar diff --git a/packages/grid-toolbar/package.json b/packages/grid-toolbar/package.json new file mode 100644 index 000000000..8a15d4245 --- /dev/null +++ b/packages/grid-toolbar/package.json @@ -0,0 +1,21 @@ +{ + "name": "@opentiny/vue-grid-toolbar", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-button": "~0.1.0", + "@opentiny/vue-locale": "~0.1.0", + "@opentiny/vue-modal": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0", + "@opentiny/vue-grid": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/grid-toolbar/src/custom-select.vue b/packages/grid-toolbar/src/custom-select.vue new file mode 100644 index 000000000..9988a64ba --- /dev/null +++ b/packages/grid-toolbar/src/custom-select.vue @@ -0,0 +1,98 @@ + + + + diff --git a/packages/grid-toolbar/src/custom-switch.vue b/packages/grid-toolbar/src/custom-switch.vue new file mode 100644 index 000000000..5f0c39846 --- /dev/null +++ b/packages/grid-toolbar/src/custom-switch.vue @@ -0,0 +1,522 @@ + + + + diff --git a/packages/grid-toolbar/src/custom.vue b/packages/grid-toolbar/src/custom.vue new file mode 100644 index 000000000..9e2a1740c --- /dev/null +++ b/packages/grid-toolbar/src/custom.vue @@ -0,0 +1,529 @@ + + + + diff --git a/packages/grid-toolbar/src/index.js b/packages/grid-toolbar/src/index.js new file mode 100644 index 000000000..b24cc5430 --- /dev/null +++ b/packages/grid-toolbar/src/index.js @@ -0,0 +1,764 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import { isNumber } from '@opentiny/vue-renderless/common/type' +import { iconMinscreen, iconFullscreen } from '@opentiny/vue-icon' +import { h, hooks, $prefix } from '@opentiny/vue-common' +import { toStringJSON, isEmpty, isPlainObject, toJSONString, find } from '@opentiny/vue-renderless/grid/static/' +import { getFuncText, emitEvent, getEventTargetNode, GlobalEvent, getListeners } from '@opentiny/vue-renderless/grid/utils' +import GridCustom from './custom.vue' +import GridCustomSelect from './custom-select.vue' +import { GridButton, GridConfig, GridAdapter, GridTools } from '@opentiny/vue-grid' + +const classMap = { + isActive: 'is__active' +} + +function createMacroTask({ _vm }) { + setTimeout(() => { + if (_vm.settingStore.activeBtn || _vm.settingStore.activeWrapper) return + _vm.closeSetting() + }, 300) +} + +function renderToolsWrapper({ _vm, $tools, $grid, table }) { + return h('div', { class: 'tiny-grid-tools__wrapper' }, $tools.call(_vm, { $grid, $table: table }, h)) +} + +function renderFullScreenWrapper({ _vm }) { + return h('div', { class: 'tiny-grid-fullscreen__wrapper' }, [ + h( + 'div', + { + class: 'tiny-grid-fullscreen__btn', + on: { click: _vm.fullscreenEvent } + }, + [ + h(_vm.isFull ? GridConfig.icon.minscreen : GridConfig.icon.fullscreen, { + class: 'tiny-svg-size' + }) + ] + ) + ]) +} + +function renderRefreshWrapper({ _vm }) { + return h('div', { class: 'tiny-grid-refresh__wrapper' }, [ + h('div', { class: 'tiny-grid-refresh__btn', on: { click: _vm.refreshEvent } }, [ + h(GridConfig.icon.refresh, { + class: ['tiny-svg-size', { roll: _vm.isRefresh }] + }) + ]) + ]) +} + +function renderCustomWrapper({ _vm, settingStore, settingsBtnOns, tableFullColumn, setting, initSettings }) { + return h( + 'div', + { + class: ['tiny-grid-custom__wrapper', { [classMap.isActive]: settingStore.customVisible }], + ref: 'customWrapper' + }, + [ + h('div', { class: 'tiny-grid-custom__setting-btn', on: settingsBtnOns }, [ + setting?.simple + ? h('tiny-grid-custom-select', { + on: { + saveSettings: _vm.handleSaveSettings + }, + props: { + data: tableFullColumn, + setting, + value: settingStore.customVisible + } + }) + : h(GridConfig.icon.custom, { class: 'tiny-svg-size' }) + ]), + h('div', { class: 'tiny-grid-custom__option-wrapper' }, [ + h('tiny-grid-custom', { + on: { + showModal: (modalVisible) => (settingStore.customVisible = modalVisible), + saveSettings: _vm.handleSaveSettings, + resetSettings: (settings) => _vm.$emit('reset-setting', settings), + cancelSettings: () => _vm.$emit('cancel-setting') + }, + props: { + data: tableFullColumn, + value: settingStore.customVisible, + other: setting.other, + keys: setting.keys, + sortable: setting.sortable, + filter: setting.filter, + onBeforeMove: setting.onBeforeMove, + rowClassName: setting.rowClassName, + refresh: setting.refresh, + numberSorting: setting.numberSorting, + multipleHistory: setting.multipleHistory, + initSettings + }, + ref: 'custom' + }) + ]) + ] + ) +} + +function getScopedSlots({ item, _vm }) { + let scopedSlots = null + let childHandler = (child) => { + let res = [null] + + if (child.visible !== false) { + res = h( + GridButton, + { + on: { + click: (event) => _vm.btnEvent(event, child) + }, + props: { + disabled: child.disabled + } + }, + getFuncText(child.name) + ) + } + + return res + } + + if (item.dropdowns && item.dropdowns.length) { + scopedSlots = { + default: () => getFuncText(item.name), + dropdowns: () => item.dropdowns.map(childHandler) + } + } + + return scopedSlots +} + +function renderButtonWrapper({ _vm, $buttons, $grid, table, buttons }) { + let childrenArg + + if ($buttons) { + childrenArg = $buttons.call(_vm, { $grid, $table: table }, h) + } else { + childrenArg = buttons.map((item) => { + let res = [null] + + if (item.visible !== false) { + let scopedSlots = getScopedSlots({ item, _vm }) + + res = h( + GridButton, + { + on: { + click: (event) => _vm.btnEvent(event, item) + }, + props: { + disabled: item.disabled + }, + scopedSlots + }, + getFuncText(item.name) + ) + } + + return res + }) + } + + return h('div', { class: 'tiny-grid-button__wrapper' }, childrenArg) +} + +export default { + name: $prefix + 'GridToolbar', + components: { + TinyGridCustom: GridCustom, + TinyGridCustomSelect: GridCustomSelect, + IconFullscreen: iconFullscreen(), + IconMinscreen: iconMinscreen() + }, + props: { + id: String, + loading: false, + resizable: { + type: [Boolean, Object], + default: () => GridConfig.toolbar.resizable + }, + refresh: { + type: [Boolean, Object], + default: () => GridConfig.toolbar.refresh + }, + setting: { + type: [Boolean, Object], + default: () => GridConfig.toolbar.setting + }, + fullScreen: { type: Boolean, default: false }, + buttons: { type: Array, default: () => GridConfig.toolbar.buttons }, + size: String, + data: Array, + customs: Array, + beforeOpenFullScreen: Function, + beforeCloseFullScreen: Function + }, + inject: { + $grid: { + default: null + } + }, + data() { + return { + table: null, + isRefresh: false, + tableFullColumn: [], + initSettings: { + pageSizes: [], + pageSize: 10, + sortType: 'page', + showIndex: false, + multipleHistory: { + tableMaxHeight: '', + showTitle: true, + title: '', + showSave: true, + saveDisabled: false, + saveText: '', + labelText: '', + selectPlaceholder: '', + selectDisabled: false, + showApply: true, + applyDisabled: false, + applyTitle: '', + applyIcon: null, + showEdit: true, + editDisabled: false, + editTitle: '', + editIcon: null, + showDel: true, + delDisabled: false, + delTitle: '', + delIcon: null, + storageKey: 'TINY_TABLE_MULTI_HISTORY_SETTING', + remoteMethod: null, + userKey: '', // userId or userAccount + remoteSelectedMethod: null + } + }, + settingStore: { + visible: false, + customVisible: false + }, + isFull: false + } + }, + computed: { + vSize() { + return this.size || this.$parent.size || this.$parent.vSize + }, + refreshOpts() { + return { ...GridConfig.toolbar.refresh, ...this.refresh } + }, + resizableOpts() { + return { + storageKey: 'TINY_TABLE_CUSTOM_COLUMN_WIDTH', + ...GridConfig.toolbar.resizable, + ...this.resizable + } + }, + settingOpts() { + return { + storageKey: 'TINY_TABLE_CUSTOM_SETTING', + ...GridConfig.toolbar.setting, + ...this.setting + } + } + }, + created() { + let { settingOpts, id, customs, $grid } = this + + this.initSettings.pageSizes = ($grid.pagerConfig && $grid.pagerConfig.pageSizes) || [10, 15, 20, 30, 50, 100] + this.initSettings.pageSize = ($grid.pagerConfig && $grid.pagerConfig.pageSize) || 10 + this.initSettings.sortType = (this.setting && this.setting.sortType) || 'page' + this.initSettings.showIndex = this.setting && this.setting.showIndex + + if (settingOpts.storage === 'local') { + this.initSettings = Object.assign(this.initSettings, this.getStorageMap(settingOpts.storageKey)[id] || {}) + } + + if (customs) { + this.tableFullColumn = customs + } + + if (settingOpts.storage && !id) { + return GridTools.error('ui.grid.error.toolbarId') + } + + setTimeout(() => { + this.loadStorage() + }) + + GlobalEvent.on(this, 'mousedown', this.handleGlobalMousedownEvent) + GlobalEvent.on(this, 'blur', this.handleGlobalBlurEvent) + this.$grid.toolBarVm = this + }, + setup(props, { slots, attrs, listeners }) { + hooks.onBeforeUnmount(() => { + GlobalEvent.off(this, 'mousedown') + GlobalEvent.off(this, 'blur') + }) + + const tableListeners = getListeners(attrs, listeners) + + return { slots, tableListeners } + }, + render() { + let { $grid, slots: $slots, table, loading, settingStore, refresh, fullScreen } = this + let { setting, initSettings, buttons = [], vSize, tableFullColumn } = this + let { buttons: $buttons, tools: $tools } = $slots + let settingsBtnOns = {} + + setting && (settingsBtnOns.click = this.handleClickCustomEvent) + + const map = { + isLoading: 'is__loading' + } + + let propsArg = { + class: ['tiny-grid-toolbar', { [`size__${vSize}`]: vSize, [map.isLoading]: loading }] + } + + let args = { + _vm: this, + settingStore, + settingsBtnOns, + tableFullColumn, + setting, + initSettings + } + + let childrenArg = [ + renderButtonWrapper({ _vm: this, $buttons, $grid, table, buttons }), + setting ? renderCustomWrapper(args) : null, + refresh ? renderRefreshWrapper({ _vm: this }) : null, + fullScreen ? renderFullScreenWrapper({ _vm: this }) : null, + $tools ? renderToolsWrapper({ _vm: this, $tools, $grid, table }) : $slots.default && $slots.default() + ] + + return h('div', propsArg, childrenArg) + }, + methods: { + updateConf() { + let data = this.data + let $children = this.$parent.$children + + let findHandler = (childComp, childIndex) => + childComp && + childComp.refreshColumn && + childIndex > $children.indexOf(this) && + (data ? childComp.data === data : childComp.$vnode.componentOptions.tag === 'tiny-grid-table') + + this.table = find($children, findHandler) + }, + closeSetting() { + let setting = this.setting + let settingStore = this.settingStore + + if (settingStore.visible) { + settingStore.visible = false + } + + if (settingStore.visible && setting && !settingStore.immediate) { + this.updateSetting() + } + }, + openSetting() { + this.settingStore.visible = true + }, + orderSetting() { + let { id, settingOpts } = this + let allData = [] + + const custumSetting = JSON.parse(localStorage.getItem(settingOpts.storageKey)) + + if (custumSetting) { + const customName = custumSetting[id] + + allData = (customName && customName.columns) || [] + } + + let orderArg = allData + .map((value) => ({ + fileds: value.property, + property: value.property, + order: value.order, + prop: value.property + })) + .filter((item) => item.order !== null) + + return orderArg + }, + loadColWidth() { + const { id, resizableOpts } = this + + if (resizableOpts.storage) { + const width = this.getStorageMap(resizableOpts.storageKey)[id] || {} + + if (width) { + const widthSet = {} + + for (let key in width) { + if (Object.prototype.hasOwnProperty.call(width, key)) { + widthSet[key] = { resizeWidth: width[key] } + } + } + + return widthSet + } + } + }, + loadStorage() { + let { $grid, id, resizable, setting, settingOpts } = this + + if (!$grid) { + return + } + + if (resizable || setting) { + let customSettings = [] + + if ($grid) { + $grid.connect({ toolbar: this }) + } else { + throw new Error('[tiny-grid-toolbar] Not found tiny-grid.') + } + + // 加载 'fixed', 'visible', 'order' 列的个性化配置 + if (settingOpts.storage === 'local') { + const settingsStorage = this.getStorageMap(settingOpts.storageKey)[id] + + customSettings = (settingsStorage && settingsStorage.columns) || [] + + if (settingsStorage && settingsStorage.pageSize) { + const pageSize = settingsStorage.pageSize + + this.$grid.pagerConfig && this.$grid.pagerConfig.pageSize !== pageSize && this.$grid.pageSizeChange(pageSize, $grid.autoLoad === false) + } + } + + this.updateCustoms(customSettings.length ? customSettings : this.tableFullColumn) + } + }, + // NEXT 未用到 + updateColumn(fullColumn) { + this.tableFullColumn = fullColumn + }, + updateCustoms(customs) { + let { $grid, table, setting } = this + let comp = $grid || table + const sort = setting && !!setting.sortable + + if (comp) { + const colWidth = this.loadColWidth() + + comp.reloadCustoms(customs, sort, colWidth).then((fullColumn) => { + this.tableFullColumn = fullColumn + }) + } + }, + getStorageMap(key) { + let version = GridConfig.version + let rest = toStringJSON(localStorage.getItem(key)) + + return rest && rest._v === version ? rest : { _v: version } + }, + // 保存 'fixed', 'visible', 'order' 列的个性化配置 + saveCustomSettings(columnConfigs) { + let { id, settingOpts } = this + + // 个性化配置本地存储 + if (settingOpts.storage === 'local') { + let settingsStorageMap = this.getStorageMap(settingOpts.storageKey) + let settingsStorage = settingsStorageMap[id] || {} + + settingsStorage.columns = columnConfigs + settingsStorageMap[id] = settingsStorage + localStorage.setItem(settingOpts.storageKey, toJSONString(settingsStorageMap)) + } + + return this.$nextTick() + }, + // 保存分页、排序类型数据数据 + savePagerSettings(settingConfigs) { + let { id, settingOpts } = this + + if (settingOpts.storage) { + let settingsStorageMap = this.getStorageMap(settingOpts.storageKey) + let settingsStorage = settingsStorageMap[id] + + if (settingsStorage) { + Object.assign(settingsStorage, settingConfigs) + } else { + settingsStorage = settingConfigs + } + + settingsStorageMap[id] = settingsStorage + localStorage.setItem(settingOpts.storageKey, toJSONString(settingsStorageMap)) + } + + return this.$nextTick() + }, + // 只保存隐藏列配置 + saveColumnHide() { + let { id, tableFullColumn, settingOpts } = this + + if (settingOpts.storage) { + let columnHideStorageMap = this.getStorageMap(settingOpts.storageKey) + let colHides = tableFullColumn.filter((column) => column.property && !column.visible) + + columnHideStorageMap[id] = colHides.length ? colHides.map((column) => column.property).join(',') : undefined + this.$refs.custom && this.$refs.custom.saveSettings() + } + + return this.$nextTick() + }, + saveColumnWidth(isReset) { + let { id, resizableOpts, tableFullColumn } = this + let { storage, storageKey } = resizableOpts + let columnWidthStorageMap + + if (storage) { + columnWidthStorageMap = this.getStorageMap(storageKey) + } + + let columnWidthStorage + + if (storage && !isReset) { + columnWidthStorage = columnWidthStorageMap[id] + columnWidthStorage = isPlainObject(columnWidthStorage) ? columnWidthStorage : {} + + tableFullColumn.forEach(({ property, resizeWidth, renderWidth }) => { + if (property && resizeWidth) { + columnWidthStorage[property] = renderWidth + } + }) + } + + if (storage) { + columnWidthStorageMap[id] = isEmpty(columnWidthStorage) ? undefined : columnWidthStorage + localStorage.setItem(storageKey, toJSONString(columnWidthStorageMap)) + } + + return this.$nextTick() + }, + resetResizable() { + this.updateResizable(this) + }, + updateResizable(isReset) { + let tableComp = this.$grid || this.table + + this.saveColumnWidth(isReset) + tableComp.analyColumnWidth() + + return tableComp.recalculate(true) + }, + updateSetting() { + const tableComp = this.$grid || this.table + + tableComp.refreshColumn() + this.tableFullColumn = this.tableFullColumn.slice(0) + + return this.$nextTick(() => this.$refs.custom && this.$refs.custom.saveSettings()) + }, + applySettings({ columns, pageSize }) { + const sort = this.setting && !!this.setting.sortable + + if (this.$grid) { + if (columns && columns.length) { + const colWidth = this.loadColWidth() + this.$grid.reloadCustoms(columns, sort, colWidth).then(() => { + // 处理表格数据,否则列排序不生效 + this.$grid.handleTableData(true).then(() => { + // 重新计算内部元素的位置 + this.$grid.recalculate(true) + }) + }) + } + + if (isNumber(pageSize) && this.$grid.pagerConfig && this.$grid.pagerConfig.pageSize !== pageSize) { + this.$grid.pageSizeChange(pageSize) + } + } + }, + handleSaveSettings(settingConfigs) { + let { settingStore, setting, settingOpts } = this + let customRef = this.$refs.custom + + settingStore.customVisible = false + + const { columns, pageSize, sortType } = settingConfigs + + this.applySettings({ columns, pageSize }) + // 如果开启本地缓存则保存数据到 localstorage + if (setting && settingOpts.storage === 'local') { + // 保存时如果没有设置 id 就使用 null 清除掉本地存储中保存的 id + const pagerSettings = { pageSize, sortType, id: null } + + if (setting.multipleHistory && customRef.multipleHistoryId) { + pagerSettings.id = customRef.multipleHistoryId + customRef.multipleHistoryId = null + } + + this.saveCustomSettings(columns) + this.savePagerSettings(pagerSettings) + } else if (setting && settingOpts.storage === 'remote') { + // 个性化配置远程服务存储 + if (settingOpts.remote) { + this.$emit('remote-setting', settingConfigs) + + if (setting.multipleHistory) { + this.$emit( + 'multiple-history-option', + toJSONString({ + [settingOpts.storageKey]: { + [this.id]: { + ...settingConfigs, + id: customRef.multipleHistoryId || null + } + } + }) + ) + + customRef.multipleHistoryId = null + } + } + } + + this.$emit('save-setting', settingConfigs) + }, + handleGlobalMousedownEvent(event) { + if (!getEventTargetNode(event, this.$refs.customWrapper).flag) { + this.closeSetting() + } + }, + handleGlobalBlurEvent() { + this.closeSetting() + }, + // NEXT 未用到 + handleClickSettingEvent() { + let { settingStore } = this + + settingStore.visible = !settingStore.visible + }, + handleClickCustomEvent() { + let { settingStore } = this + this.$refs.custom.settings.pageSize = + (this.$grid.pagerConfig && this.$grid.pagerConfig.pageSize) || (this.settingOpts.storage === 'local' && this.$refs.custom.settings.pageSize) || 10 + + settingStore.customVisible = !settingStore.customVisible + }, + // NEXT 未用到 + handleMouseenterSettingEvent() { + this.settingStore.activeBtn = true + this.openSetting() + }, + // NEXT 未用到 + handleMouseleaveSettingEvent() { + this.settingStore.activeBtn = false + createMacroTask({ _vm: this }) + }, + // NEXT 未用到 + handleWrapperMouseenterEvent() { + this.settingStore.activeWrapper = true + this.openSetting() + }, + // NEXT 未用到 + handleWrapperMouseleaveEvent() { + this.settingStore.activeWrapper = false + createMacroTask({ _vm: this }) + }, + refreshEvent() { + let { $grid, isRefresh, refreshOpts } = this + let catchHandler = (e) => e + let nextHandler = () => (this.isRefresh = false) + + if (isRefresh) return + + this.isRefresh = true + + if (refreshOpts.query) { + refreshOpts.query().catch(catchHandler).then(nextHandler) + return + } + + if ($grid && $grid.fetchData) { + $grid.commitProxy('reload').catch(catchHandler).then(nextHandler) + return + } + + if ($grid) { + $grid.refreshData().then(nextHandler) + } + }, + btnEvent(event, item) { + let { $grid, table, tableListeners } = this + let { code } = item + + if (code) { + if ($grid && !tableListeners['button-click']) { + $grid.triggerToolbarBtnEvent(item, event) + } else { + let btnMethod = GridAdapter.buttons.get(code) + let params = { code, button: item, $grid, $table: table } + + if (btnMethod) { + btnMethod.call(this, params, event) + } + + emitEvent(this, 'button-click', [params, event]) + } + } + }, + fullscreenEvent() { + let beforeOpenFullScreen, + beforeCloseFullScreen, + interceptFullScreen, + show = !this.isFull + + if (this.fullScreen) { + beforeOpenFullScreen = this.beforeOpenFullScreen + beforeCloseFullScreen = this.beforeCloseFullScreen + interceptFullScreen = + (show && typeof beforeOpenFullScreen === 'function' && !beforeOpenFullScreen()) || + (!show && typeof beforeCloseFullScreen === 'function' && !beforeCloseFullScreen()) + + if (interceptFullScreen) return + } + + if (this.$grid) { + this.isFull = !this.isFull + this.$grid.commitProxy('fullscreen', this.isFull) + } + } + } +} diff --git a/packages/grid-toolbar/src/multiple-history.js b/packages/grid-toolbar/src/multiple-history.js new file mode 100644 index 000000000..00c795d7c --- /dev/null +++ b/packages/grid-toolbar/src/multiple-history.js @@ -0,0 +1,87 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { toStringJSON, toJSONString } from '@opentiny/vue-renderless/grid/static/' +import { format } from '@opentiny/vue-renderless/common/date' +import { extend } from '@opentiny/vue-renderless/common/object' + +export function getStorage(storageKey, storageType, remoteMethod) { + return new Promise((resolve, reject) => { + if (storageType === 'local') { + const valueString = localStorage.getItem(storageKey) + const valueObj = toStringJSON(valueString) + + resolve(valueObj) + } else if (storageType === 'remote') { + remoteMethod() + .then((remoteString) => { + let remoteObj = toStringJSON(remoteString) + + remoteObj = (remoteObj && remoteObj[storageKey]) || null + + resolve(remoteObj) + }) + .catch(reject) + } + }) +} + +export function setStorage(storageKey, valueObj, storageType, vm, eventName) { + if (storageType === 'local') { + const valueString = toJSONString(valueObj) + + localStorage.setItem(storageKey, valueString) + } else if (storageType === 'remote') { + const remoteString = toJSONString({ [storageKey]: valueObj }) + + vm.$emit(eventName, remoteString) + } +} + +export function generateId() { + const now = new Date() + const suf = /GMT[-+]\d+/.exec(now.toString())[0].replace(/\+/, 'E').replace(/-/, 'W').replace(/0/g, '') + const name = format(now, 'yyyy-MM-dd hh:mm:ss.SSS') + + return { id: now.getTime() + suf, name } +} + +export function createCustom(setting, userKey) { + const { id, name } = generateId() + + return { id, name, userKey, setting: { custom: setting } } +} + +export function mergeArray(toArr, fromArr) { + const result = [] + + for (let i = 0; i < fromArr.length; i++) { + const fromItem = { + order: null, + fixed: null, + visible: true, + sortable: false, + ...fromArr[i] + } + let toItem + + for (let j = 0; j < toArr.length; j++) { + if (fromItem.property === toArr[j].property) { + toItem = { ...toArr[j] } + break + } + } + + result.push(extend(true, {}, toItem || {}, fromItem)) + } + + return result +} diff --git a/packages/grid/index.js b/packages/grid/index.js new file mode 100644 index 000000000..41cb513be --- /dev/null +++ b/packages/grid/index.js @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { t } from '@opentiny/vue-locale' +import '@opentiny/vue-theme/grid/index.css' +import GridAdapter from './src/adapter' +import Table from './src/table' +import GridColumn from './src/column' +import Grid from './src' +import Menu from './src/menu' +import Edit from './src/edit' +import Export from './src/export' +import Keyboard from './src/keyboard' +import Validator from './src/validator' +import Resize from './src/resize' +import Filter from './src/filter' +import GridConfig from './src/config' +import GridRadio from './src/radio' +import GridButton from './src/button' +import * as GridTools from './src/tools' + +const components = [Menu, Edit, Export, Keyboard, Validator, Resize, Filter] + +function install() { + GridAdapter.setup({ i18n: t }) + + GridAdapter.t = t + + components.map((component) => component.install(Table)) +} + +install() + +Grid.version = process.env.COMPONENT_VERSION + +Grid.install = function (Vue) { + Vue.component(Grid.name, Grid) +} + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Grid.install(window.Vue) + } +} + +export default Grid + +export { GridColumn, GridConfig, GridAdapter, GridRadio, GridButton, GridTools } diff --git a/packages/grid/package.json b/packages/grid/package.json new file mode 100644 index 000000000..0a1d7ced2 --- /dev/null +++ b/packages/grid/package.json @@ -0,0 +1,20 @@ +{ + "name": "@opentiny/vue-grid", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-locale": "~0.1.0", + "@opentiny/vue-modal": "~0.1.0", + "@opentiny/vue-pager": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0", + "@opentiny/vue-tooltip": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/grid/src/adapter/index.js b/packages/grid/src/adapter/index.js new file mode 100644 index 000000000..da6453b56 --- /dev/null +++ b/packages/grid/src/adapter/index.js @@ -0,0 +1,64 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { Interceptor, StoreMap } from '@opentiny/vue-renderless/grid/core' +import Setup from './src/setup' +import Renderer from './src/renderer' + +const installedPlugins = [] + +const Buttons = StoreMap +const Menus = StoreMap + +export const Grid = { + use(Plugin, options) { + if (Plugin && Plugin.install) { + if (installedPlugins.indexOf(Plugin) === -1) { + Plugin.install(this, options) + installedPlugins.push(Plugin) + } + } + + return this + }, + setup: Setup, + interceptor: Interceptor, + renderer: Renderer, + buttons: Buttons, + menus: Menus, + _tooltip: true +} + +export { Menus, Buttons, Interceptor, Renderer } + +const handleClearEvent = (params, event) => { + if (params && params.$table) { + const getTarget = params.$table.getEventTargetNode + const bodyEl = document.body + + if ( + getTarget(event, bodyEl, 'tiny-autocomplete-suggestion').flag || + getTarget(event, bodyEl, 'tiny-select-dropdown').flag || + getTarget(event, bodyEl, 'tiny-cascader__dropdown').flag || + getTarget(event, bodyEl, 'tiny-cascader-menus').flag || + getTarget(event, bodyEl, 'tiny-picker-panel').flag || + getTarget(event, bodyEl, 'tiny-popper').flag || + getTarget(event, bodyEl, 'tiny-dialog-box').flag + ) { + return false + } + } +} + +Grid.interceptor.add('event.clear_actived', handleClearEvent) +Grid.interceptor.add('event.clear_filter', handleClearEvent) + +export default Grid diff --git a/packages/grid/src/adapter/src/renderer.js b/packages/grid/src/adapter/src/renderer.js new file mode 100644 index 000000000..d8233d005 --- /dev/null +++ b/packages/grid/src/adapter/src/renderer.js @@ -0,0 +1,321 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import { set, assign, objectMap, get, each, isObject, isFunction } from '@opentiny/vue-renderless/grid/static/' +import { getCellValue, setCellValue } from '@opentiny/vue-renderless/grid/utils' +import { hooks } from '@opentiny/vue-common' +import { getTableCellKey } from '../../table/src/strategy' + +function getAttrs({ name, attrs }, params) { + let props = attrs + + if (typeof attrs === 'function') { + props = attrs(params) + } + + if (name === 'input') { + props = { type: 'text', ...props } + } + + return props +} + +const isSyncCell = (renderOpts, params, context) => renderOpts.type === 'visible' || context.$type === 'cell' + +function autoRefresh(renderOpts, params) { + let { refresh = false } = renderOpts + let { $table, row } = params + let { editConfig = {} } = $table + + return $table.isTemporaryRow(row) || !editConfig.showStatus || (typeof refresh === 'boolean' && refresh) || (typeof refresh === 'function' && refresh(params)) +} + +function getEvents(renderOpts, params, context) { + let { component = {}, events = {} } = renderOpts + let native = typeof component === 'string' + let editorModel = component.model || {} + let type = component === 'select' ? 'change' : native ? 'input' : editorModel.event || 'update:modelValue' + let { input, change, ...other } = events + let { $table, column, row } = params + let { model } = column + + let on = { + [type](event) { + let cellValue = native ? event.target.value : event + + if (!renderOpts.isValidAlways && isSyncCell(renderOpts, params, context)) { + setCellValue(row, column, cellValue) + } else { + native || set(row, column.property, cellValue) + model.update = true + model.value = cellValue + $table.updateStatus(params, cellValue, renderOpts) + } + + if (native) { + input && input.apply(null, [params].concat.apply(params, arguments)) + change && change.apply(null, [params].concat.apply(params, arguments)) + } + + if (autoRefresh(renderOpts, params, context)) { + $table.editStore.editorAutoRefreshKey++ + } + } + } + + let evts = native ? other : events + let mapHandler = (cb) => + function () { + cb.apply(null, [params].concat.apply(params, arguments)) + } + + assign(on, objectMap(evts, mapHandler)) + + return on +} + +function renderOptions(h, options, renderOpts, params, context) { + let { optionProps = {} } = renderOpts + let labelProp = optionProps.label || 'label' + let valueProp = optionProps.value || 'value' + let { column, row } = params + let { formatConfig } = column.own + let cellValue = isSyncCell(renderOpts, params, context) ? getCellValue(row, column) : column.model.value + + if (!options && formatConfig && formatConfig.data) { + options = formatConfig.data + } + + return options.map((item, index) => { + let attrs = { + domProps: { value: item[valueProp], selected: item.value === cellValue }, + key: index + } + return h('option', attrs, item[labelProp]) + }) +} + +function renderOptgroups(h, options, params, context) { + let { optionGroups, optionGroupProps = {} } = options + let groupLabel = optionGroupProps.label || 'label' + let groupOptions = optionGroupProps.options || 'options' + + return optionGroups.map((group, key) => { + let attrs = { domProps: { label: group[groupLabel] }, key } + let children = renderOptions(h, group[groupOptions], options, params, context) + + return h('optgroup', attrs, children) + }) +} + +function handleConfirmFilter(context, column, checked, item) { + let key = column.filterMultiple ? 'changeMultipleOption' : 'changeRadioOption' + let method = context[key] + + method({}, checked, item) +} + +function getFilterEvents(item, renderOpts, params, context) { + let { events, name } = renderOpts + let { column } = params + let type = name === 'select' ? 'change' : 'input' + let on = { + [type](event) { + item.data = event.target.value + handleConfirmFilter(context, column, !!item.data, item) + } + } + + if (events) { + let mapHandler = (cb) => + function () { + cb.apply(null, [params].concat.apply(params, arguments)) + } + + assign(on, objectMap(events, mapHandler)) + } + + return on +} + +function defaultFilterRender(h, renderOpts, params, context) { + let { name } = renderOpts + let { column } = params + let attrs = getAttrs(renderOpts, params) + + return column.filters.map((item) => { + let props = { + class: `tiny-grid-default-${name}`, + attrs, + domProps: { value: item.data }, + on: getFilterEvents(item, renderOpts, params, context) + } + + return h(name, props) + }) +} + +function defaultFilterMethod({ option, row, column }) { + let cellValue = get(row, column.property) + let data = option.data + return cellValue == data +} + +function renderSelectEdit(h, renderOpts, params, context) { + let props = { + class: 'tiny-grid-default-select', + on: getEvents(renderOpts, params, context) + } + let children = renderOpts.optionGroups ? renderOptgroups(h, renderOpts, params, context) : renderOptions(h, renderOpts.options, renderOpts, params, context) + + return [h('select', props, children)] +} + +/** + * 内置渲染器。支持原生的 input、textarea、select。 + */ +function defaultEditRender(h, renderOpts, params, context) { + let { $table, column, row } = params + let { formatValue = ({ cellValue }) => cellValue, own } = column + let formatOpt = own.formatConfig || {} + let { children, component = {} } = renderOpts + let attrs = getAttrs(renderOpts, params, formatOpt) + let value = isSyncCell(renderOpts, params, context) ? getCellValue(row, column) : column.model.value + let cellValue = formatValue({ cellValue: value, ...params }) + let isTag = ~['input', 'textarea', 'select'].indexOf(component) + let editorModel = component.model || {} + let modelProps = typeof component === 'string' ? 'value' : editorModel.prop || 'modelValue' + + let options = { + class: isTag ? `tiny-grid-default-${component}` : '', + attrs: { + formatOpt, + options: formatOpt.data, + ...attrs, + [modelProps]: cellValue + }, + on: getEvents(renderOpts, params, context), + key: getTableCellKey({ $table, column, row }) + } + + if (autoRefresh(renderOpts, params, context)) { + options.attrs.editorAutoRefreshKey = $table.editStore.editorAutoRefreshKey + } + + let slot = children ? children({ props: options, ...params }, h) : null + let cell = [h(hooks.toRaw(component), options, slot)] + + return isTag ? cell : [h('div', { class: 'tiny-grid-editor' }, cell)] +} + +let buildRenderMap = () => { + let renderMapInput = [ + ['autofocus', 'input'], + ['renderEdit', defaultEditRender], + ['renderDefault', defaultEditRender], + ['renderFilter', defaultFilterRender], + ['filterMethod', defaultFilterMethod] + ] + let mapHandler = (mapArr) => { + let obj = {} + mapArr.forEach((item) => (obj[item[0]] = item[1])) + return obj + } + let renderMap = {} + + renderMap.input = mapHandler(renderMapInput) + + renderMapInput[0][1] = 'textarea' + renderMap.textarea = mapHandler(renderMapInput) + + renderMapInput.splice(0, 1) + renderMapInput[0][1] = renderMapInput[1][1] = renderSelectEdit + renderMapInput[2][1] = function (h, renderOpts, params, context) { + let { attrs } = renderOpts + let { column } = params + + return column.filters.map((item) => { + let props = { + attrs, + class: 'tiny-grid-default-select', + on: getFilterEvents(item, renderOpts, params, context) + } + let children = renderOpts.optionGroups ? renderOptgroups(h, renderOpts, params) : renderOptions(h, renderOpts.options, renderOpts, params) + + return h('select', props, children) + }) + } + renderMap.select = mapHandler(renderMapInput) + + return renderMap +} + +const renderMap = buildRenderMap() + +let buildRenderer = () => { + let Renderer = {} + + Renderer.mixin = function (map) { + each(map, (options, name) => Renderer.add(name, options)) + return Renderer + } + + // 支持动态组件:function (resolve, reject) { setTimeout(function () { resolve(xxx) }, 1) } + Renderer.get = function (name) { + return isObject(name) || isFunction(name) ? renderMap.input : renderMap[name] || null + } + + Renderer.add = function (name, options) { + let renders + let flag = name && options + + if (!flag) { + return Renderer + } + + renders = renderMap[name] + + if (renders) { + Object.assign(renders, options) + } else { + renderMap[name] = options + } + + return Renderer + } + + Renderer.delete = function (name) { + delete renderMap[name] + return Renderer + } + + return Renderer +} + +/** + * 全局渲染器 + */ +export const Renderer = buildRenderer() + +export default Renderer diff --git a/packages/grid/src/adapter/src/setup.js b/packages/grid/src/adapter/src/setup.js new file mode 100644 index 000000000..48f196a7d --- /dev/null +++ b/packages/grid/src/adapter/src/setup.js @@ -0,0 +1,43 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import { extend } from '@opentiny/vue-renderless/common/object' +import GlobalConfig from '../../config' + +// 全局参数设置 +const setup = (options = {}) => { + let { icon, menu } = GlobalConfig + + if (options.menu) { + menu = extend(true, {}, menu, options.menu) + } + + if (options.icon) { + icon = extend(true, {}, icon, options.icon) + } + + extend(true, GlobalConfig, options, { icon, menu }) +} + +export default setup diff --git a/packages/grid/src/body/index.js b/packages/grid/src/body/index.js new file mode 100644 index 000000000..4d8c119b8 --- /dev/null +++ b/packages/grid/src/body/index.js @@ -0,0 +1,31 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import Body from './src/body' + +Body.install = function (Vue) { + Vue.component(Body.name, Body) +} + +export default Body diff --git a/packages/grid/src/body/src/body.jsx b/packages/grid/src/body/src/body.jsx new file mode 100644 index 000000000..f695ef930 --- /dev/null +++ b/packages/grid/src/body/src/body.jsx @@ -0,0 +1,925 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import { isFunction, find } from '@opentiny/vue-renderless/grid/static/' +import { isNull } from '@opentiny/vue-renderless/common/type' +import { updateCellTitle, emitEvent, getClass, getFuncText, getRowid, formatText } from '@opentiny/vue-renderless/grid/utils' +import { getCellLabel } from '../../tools' +import GlobalConfig from '../../config' +import { iconChevronRight, iconChevronDown } from '@opentiny/vue-icon' +import { h, hooks, $prefix } from '@opentiny/vue-common' +import { getTreeChildrenKey, getTreeShowKey, getTableCellKey } from '../../table/src/strategy' + +// 滚动、拖动过程中不需要触发 +const isOperateMouse = ($table) => $table._isResize || ($table.lastScrollTime && Date.now() < $table.lastScrollTime + $table.optimizeOpts.delayHover) + +// 解决静态扫描驼峰变量问题 +const classMap = { + colEdit: 'col__edit', + colIndex: 'col__index', + colRadio: 'col__radio', + colSelection: 'col__selection', + colEllipsis: 'col__ellipsis', + editVisible: 'edit__visible', + fixedHidden: 'fixed__hidden', + colDirty: 'col__dirty', + colActived: 'col__actived', + rowNew: 'row__new', + rowSelected: 'row__selected', + rowActived: 'row__actived', + isScrollload: 'is__scrollload' +} + +const renderBorder = (h, type) => { + let vnTop = h('span', { + class: 'tiny-grid-border-top', + ref: `${type}Top` + }) + let vnRight = h('span', { + class: 'tiny-grid-border-right', + ref: `${type}Right` + }) + let vnBottom = h('span', { + class: 'tiny-grid-border-bottom', + ref: `${type}Bottom` + }) + let vnLeft = h('span', { + class: 'tiny-grid-border-left', + ref: `${type}Left` + }) + + return h( + 'div', + { + class: `tiny-grid-${type}ed-borders`, + ref: `${type}Borders` + }, + [vnTop, vnRight, vnBottom, vnLeft] + ) +} + +function buildColumnProps(args) { + let { attrs, cellAlign, cellClassName, className, column, columnActived, columnIndex, columnKey, editor } = args + let { fixedHiddenColumn, hasEllipsis, isDirty, params, tdOns, validError, validated } = args + return { + class: [ + 'tiny-grid-body__column', + column.id, + { + [`col__${cellAlign}`]: cellAlign, + [classMap.colEdit]: editor, + [classMap.colIndex]: column.type === 'index', + [classMap.colRadio]: column.type === 'radio', + [classMap.colSelection]: column.type === 'selection', + [classMap.colEllipsis]: hasEllipsis, + [classMap.editVisible]: editor && editor.type === 'visible', + [classMap.fixedHidden]: fixedHiddenColumn, + [classMap.colDirty]: isDirty, + [classMap.colActived]: columnActived, + 'col__valid-error': validError && validated, + 'col__valid-success': columnActived ? !validError && !validated : isDirty && !validated + }, + getClass(className, params), + getClass(cellClassName, params) + ], + key: columnKey ? column.id : columnIndex, + attrs, + on: tdOns + } +} + +function buildColumnChildren(args) { + let { h, hasDefaultTip, params, row, validError } = args + let { allColumnOverflow, column, fixedHiddenColumn } = args + let { showEllipsis, showTip, showTitle, showTooltip, validStore } = args + let res = [] + if (!allColumnOverflow || !fixedHiddenColumn) { + let res1 = null + if (hasDefaultTip) { + res1 = [null] + if (validError) { + res1 = h( + 'div', + { + class: 'tiny-grid-cell__valid', + style: validStore.rule && validStore.rule.width ? { width: `${validStore.rule.width}px` } : null + }, + [h('span', { class: 'tiny-grid-cell__valid-msg' }, validStore.content)] + ) + } + } + res = [ + h( + 'div', + { + class: [ + 'tiny-grid-cell', + { + 'tiny-grid-cell__title': showTitle, + 'tiny-grid-cell__tooltip': showTooltip || showTip, + 'tiny-grid-cell__ellipsis': showEllipsis + } + ], + attrs: { title: showTitle ? getCellLabel(row, column, params) : null }, + key: getTableCellKey(params) + }, + column.renderCell(h, params) + ), + res1 + ] + } + return res +} + +function modifyCellAlign({ cellAlign, column }) { + if (~['radio', 'selection', 'index'].indexOf(column.type)) { + cellAlign = cellAlign ? cellAlign : 'center' + } + + return cellAlign +} + +function modifyShowEllipsis({ hasEllipsis, scrollXLoad, scrollYLoad, showEllipsis }) { + if ((scrollXLoad || scrollYLoad) && !hasEllipsis) { + showEllipsis = true + } + + return showEllipsis +} + +function addListenerMouseenter({ $table, evntParams, showTip, showTitle, showTooltip, tableListeners, tdOns }) { + if (showTip || showTitle || showTooltip || tableListeners['cell-mouseenter']) { + tdOns.mouseenter = (event) => { + if (isOperateMouse($table)) { + return + } + + evntParams.cell = event.currentTarget + + if (showTitle) { + updateCellTitle(event) + } else if (showTip || showTooltip) { + // 如果配置了显示 tooltip + $table.triggerTooltipEvent(event, evntParams) + } + + emitEvent($table, 'cell-mouseenter', [evntParams, event]) + } + } +} + +function addListenerMouseleave({ $table, evntParams, showTip, showTooltip, tableListeners, tdOns }) { + if (showTip || showTooltip || tableListeners['cell-mouseleave']) { + tdOns.mouseleave = (event) => { + if (isOperateMouse($table)) { + return + } + + if (showTip || showTooltip) { + $table.clostTooltip() + } + + evntParams.cell = event.currentTarget + + emitEvent($table, 'cell-mouseleave', [evntParams, event]) + } + } +} + +function addListenerMousedown({ $table, evntParams, mouseConfig, tdOns }) { + if (mouseConfig.checked || mouseConfig.selected) { + tdOns.mousedown = (event) => { + evntParams.cell = event.currentTarget + $table.triggerCellMousedownEvent(event, evntParams) + } + } +} + +function addListenerClick(args) { + let { $table, column, editConfig, editor, evntParams, expandConfig, highlightCurrentRow } = args + let { mouseConfig, radioConfig, selectConfig, tableListeners, tdOns, treeConfig } = args + let satisfy = (equal, trigger) => trigger === 'row' || (equal(column) && trigger === 'cell') + + if ( + highlightCurrentRow || + tableListeners['cell-click'] || + mouseConfig.checked || + (editor && editConfig) || + satisfy(() => true, expandConfig.trigger) || + satisfy(({ type }) => type === 'radio', radioConfig.trigger) || + satisfy(({ type }) => type === 'selection', selectConfig.trigger) || + satisfy(({ treeNode }) => treeNode, treeConfig.trigger) + ) { + tdOns.click = (event) => { + evntParams.cell = event.currentTarget + $table.triggerCellClickEvent(event, evntParams) + } + } +} + +function getRowSpanMethod(rowSpan) { + return ({ row, $rowIndex, column, data }) => { + let fields = [] + + if (rowSpan) { + rowSpan.forEach((item) => { + column.visible && fields.push(item.field) + }) + } + + let cellVal = row[column.property] + + if (cellVal && ~fields.indexOf(column.property)) { + let prevSiblingRow = data[$rowIndex - 1] + let nextSiblingRow = data[$rowIndex + 1] + + if (prevSiblingRow && prevSiblingRow[column.property] === cellVal) { + return { rowspan: 0, colspan: 0 } + } else { + let rowspanCount = 1 + + while (nextSiblingRow && nextSiblingRow[column.property] === cellVal) { + nextSiblingRow = data[++rowspanCount + $rowIndex] + } + + if (rowspanCount > 1) { + return { rowspan: rowspanCount, colspan: 1 } + } + } + } + } +} + +function addListenerDblclick({ $table, evntParams, tableListeners, tdOns, triggerDblclick }) { + if (triggerDblclick || tableListeners['cell-dblclick']) { + tdOns.dblclick = (event) => { + evntParams.cell = event.currentTarget + $table.triggerCellDBLClickEvent(event, evntParams) + } + } +} + +function doSpan({ attrs, params, rowSpan, spanMethod }) { + const rowSpanMethod = getRowSpanMethod(rowSpan) + + if (spanMethod || rowSpan) { + let { rowspan = 1, colspan = 1 } = (spanMethod ? spanMethod(params) : rowSpanMethod(params)) || {} + + if (!rowspan || !colspan) { + return false + } + + attrs.rowspan = rowspan + attrs.colspan = colspan + } + + return true +} + +function isCellDirty({ $table, column, editConfig, fixedHiddenColumn, isDirty, row }) { + if (!fixedHiddenColumn && editConfig && editConfig.showStatus) { + isDirty = $table.hasRowChange(row, column.property) + } + + return isDirty +} + +const setColumnEvents = (args1) => { + let { $columnIndex, $rowIndex, $table, column, columnIndex } = args1 + let { fixedType, row, rowIndex, rowLevel, seq } = args1 + let { editConfig, expandConfig = {} } = $table + let { radioConfig = {}, showOverflow: allColumnOverflow } = $table + let { highlightCurrentRow, mouseConfig = {}, overflowX } = $table + let { scrollXLoad, scrollYLoad, selectConfig = {} } = $table + let { tableListeners, treeConfig = {} } = $table + let tdOns = {} + let fixedHiddenColumn = fixedType ? column.fixed !== fixedType : column.fixed && overflowX + let { editor, showOverflow, showTip } = column + let cellOverflow = isNull(showOverflow) ? allColumnOverflow : showOverflow + let showTitle = cellOverflow === 'title' + let showTooltip = cellOverflow === true || cellOverflow === 'tooltip' + let showEllipsis = cellOverflow === 'ellipsis' + let hasEllipsis = showTitle || showTooltip || showEllipsis + let triggerDblclick = editor && editConfig && editConfig.trigger === 'dblclick' + + let commonParams = { $columnIndex, $rowIndex, $table, column, columnIndex, fixed: fixedType } + Object.assign(commonParams, { isHidden: fixedHiddenColumn, level: rowLevel, row, rowIndex, seq }) + + let evntParams = { showTip, ...commonParams } + // 滚动的渲染不支持动态行高 + showEllipsis = modifyShowEllipsis({ hasEllipsis, scrollXLoad, scrollYLoad, showEllipsis }) + // hover 进入事件 + addListenerMouseenter({ $table, evntParams, showTip, showTitle, showTooltip, tableListeners, tdOns }) + // hover 退出事件 + addListenerMouseleave({ $table, evntParams, showTip, showTooltip, tableListeners, tdOns }) + // 按下事件处理 + addListenerMousedown({ $table, evntParams, mouseConfig, tdOns }) + + let args = { $table, column, editConfig, editor, evntParams, expandConfig, highlightCurrentRow } + Object.assign(args, { mouseConfig, radioConfig, selectConfig, tableListeners, tdOns, treeConfig }) + // 点击事件处理 + addListenerClick(args) + // 双击事件处理 + addListenerDblclick({ $table, evntParams, tableListeners, tdOns, triggerDblclick }) + + return { commonParams, args, cellOverflow, showTitle, showTooltip, showEllipsis, hasEllipsis, tdOns, fixedHiddenColumn } +} + +/** + * 渲染列 + */ +function renderColumn(args1) { + let { $seq, $table, column, columnIndex } = args1 + let { h, row } = args1 + let { align: allAlign, cellClassName, columnKey, editConfig } = $table + let { editRules, editStore, rowId, rowSpan } = $table + let { showOverflow: allColumnOverflow, height } = $table + let { tableData, validOpts, validStore, validatedMap, spanMethod } = $table + let { isDirty, attrs = { 'data-colid': column.id } } = {} + let { message } = validOpts + let { actived } = editStore + let validated = validatedMap[`${column.id}-${row[rowId]}`] + let validError = validStore.row === row && validStore.column === column + let hasDefaultTip = editRules && (message === 'default' ? height || tableData.length > 1 : message === 'inline') + let { align, className, editor, showTip } = column + let cellAlign = align || allAlign + let columnActived = editConfig && editor && actived.row === row && (actived.column === column || editConfig.mode === 'row') + + let { commonParams, args, showTitle, showTooltip, showEllipsis, tdOns = {}, hasEllipsis, fixedHiddenColumn } = setColumnEvents(args1) + let params = { $seq, data: tableData, ...commonParams } + // 索引列、选择列如果不配置对齐方式则默认为居中对齐 + cellAlign = modifyCellAlign({ cellAlign, column }) + + // 合并行或列 + if (!doSpan({ attrs, params, rowSpan, spanMethod })) { + return + } + // 如果显示状态 + isDirty = isCellDirty({ $table, column, editConfig, fixedHiddenColumn, isDirty, row }) + args = { attrs, cellAlign, cellClassName, className, column, columnActived, columnIndex, columnKey, editor } + Object.assign(args, { fixedHiddenColumn, hasEllipsis, isDirty, params, tdOns, validError, validated }) + + let colProps = buildColumnProps(args) + args = { allColumnOverflow, column, fixedHiddenColumn, h, hasDefaultTip, params, row } + Object.assign(args, { showEllipsis, showTip, showTitle, showTooltip, validError, validStore }) + let colChildren = buildColumnChildren(args) + + return h('td', colProps, colChildren) +} + +function renderRowGroupTds(args) { + let { closeable, currentIcon, field, group, render } = args + let { row, tableColumn, targetColumn, tds, title } = args + for (let index in tableColumn) { + if (Object.prototype.hasOwnProperty.call(tableColumn, index)) { + const column = tableColumn[index] + if (~['index', 'selection'].indexOf(column.type)) { + tds.push() + } else { + const value = row[field] + const header = title || (targetColumn && formatText(getFuncText(targetColumn.title), 1)) || value + let groupTitleVNode + + if (render) { + groupTitleVNode = render(h, { + value, + header, + children: group.children, + expand: !group.fold + }) + } else { + groupTitleVNode = [{header}, `:${value}`, {group.children.length}] + } + tds.push( + +
{[closeable ? currentIcon : null].concat(groupTitleVNode)}
+ + ) + break + } + } + } +} + +function addRowListenerMouseenter({ $table, highlightHoverRow, row, rowIndex, trOn }) { + if (!highlightHoverRow) { + return + } + + trOn.mouseenter = (event) => { + if (isOperateMouse($table)) { + return + } + $table.triggerHoverEvent(event, { row, rowIndex }) + } +} + +function renderRowGroupData({ groupData, groupFolds, row, rowGroup, rowid, rows, tableColumn }) { + if (!groupData[rowid]) { + return + } + + const { title, field, closeable = true, render, className } = rowGroup + const { group = groupData[rowid], tds = [], ChevronRight = iconChevronRight(), ChevronDown = iconChevronDown() } = {} + const targetColumn = find(tableColumn, (col) => col.property === field) + const currentIcon = group.fold ? : + + renderRowGroupTds({ closeable, currentIcon, field, group, render, row, tableColumn, targetColumn, tds, title }) + + rows.push( + { + group.hover = false + }} + onMouseover={() => { + group.hover = true + }} + onClick={() => { + if (closeable) { + group.fold = !group.fold + group.children.forEach((row) => { + let index = groupFolds.indexOf(row) + + if (index > -1) { + groupFolds.splice(index, 1) + } else { + groupFolds.push(row) + } + }) + } + }} + > + {tds} + + ) +} + +function renderRow(args) { + let { $rowIndex, $seq, $table, _vm, editStore } = args + let { fixedType, groupFolds, h, row, rowActived } = args + let { rowClassName, rowIndex, rowKey, rowLevel, rowid, rows } = args + let { selection, seq, tableColumn, trOn, treeConfig } = args + let { scrollYLoad } = $table + let treeShowKey = getTreeShowKey({ scrollYLoad, treeConfig }) + + if (treeShowKey && !row[treeShowKey]) { + return + } + + rows.push( + h( + 'tr', + { + class: [ + 'tiny-grid-body__row', + { + [`row__level-${rowLevel}`]: treeConfig, + [classMap.rowNew]: editStore.insertList.indexOf(row) > -1, + [classMap.rowSelected]: selection.indexOf(row) > -1, + 'tiny-hide': groupFolds.indexOf(row) > -1, + [classMap.rowActived]: rowActived + }, + rowClassName ? (isFunction(rowClassName) ? rowClassName({ $table, $seq, seq, fixedType, rowLevel, row, rowIndex, $rowIndex }) : rowClassName) : '' + ], + attrs: { + 'data-rowid': rowid + }, + key: rowKey || treeConfig ? rowid : $rowIndex, + on: trOn + }, + tableColumn.map((column, $columnIndex) => { + let columnIndex = $table.getColumnIndex(column) + let args1 = { $columnIndex, $rowIndex, $seq, $table, _vm, column, columnIndex } + + Object.assign(args1, { fixedType, h, row, rowIndex, rowLevel, seq }) + + return renderColumn(args1) + }) + ) + ) +} + +function renderRowAfter({ $table, h, row, rowIndex, rows, tableData }) { + typeof $table.renderRowAfter === 'function' && $table.renderRowAfter({ rows, row, data: tableData, rowIndex, renderColumn }, h) +} + +function renderRowExpanded(args) { + let { $table, expandMethod, expandeds, fixedType, h, row, rowIndex } = args + let { rowLevel, rowid, rows, seq, tableColumn, trOn, treeConfig } = args + + if (expandeds.length && expandeds.indexOf(row) > -1 && (typeof expandMethod === 'function' ? expandMethod(row) : true)) { + let column = find(tableColumn, (column) => column.type === 'expand') + let columnIndex = $table.getColumnIndex(column) + let cellStyle + + if (treeConfig) { + cellStyle = { paddingLeft: `${rowLevel * (treeConfig.indent || 16) + 30}px` } + } + + if (column) { + const renderData = { $table, seq, row, rowIndex, column, columnIndex, fixed: fixedType, level: rowLevel } + rows.push( + h( + 'tr', + { + class: 'tiny-grid-body__expanded-row', + key: `expand_${rowid}`, + on: trOn + }, + [ + h( + 'td', + { + class: 'tiny-grid-body__expanded-column', + attrs: { colspan: tableColumn.length } + }, + [ + h( + 'div', + { + class: ['tiny-grid-body__expanded-cell', { [classMap.fixedHidden]: fixedType }], + style: cellStyle + }, + [column.renderData(h, renderData)] + ) + ] + ) + ] + ) + ) + } + } +} + +function renderRowTree(args, renderRows) { + let { $seq, $table, _vm, fixedType, h, row, rowLevel } = args + let { rows, seq, seqCount, tableColumn, treeConfig, treeExpandeds } = args + let { scrollYLoad } = $table + + if (!treeConfig || !treeExpandeds.length) { + return + } + + let childrenKey = getTreeChildrenKey({ scrollYLoad, treeConfig }) + let rowChildren = row[childrenKey] + + if (!rowChildren || !rowChildren.length || !~treeExpandeds.indexOf(row)) { + return + } + + let args1 = { h, _vm, $table, $seq: $seq ? `${$seq}.${seq}` : `${seq}` } + + Object.assign(args1, { + rowLevel: rowLevel + 1, + fixedType, + tableData: rowChildren, + tableColumn, + seqCount + }) + + rows.push.apply(rows, renderRows(args1)) +} + +function renderRows({ h, _vm, $table, $seq, rowLevel, fixedType, tableData, tableColumn, seqCount }) { + let { rowKey, highlightHoverRow, rowClassName, treeConfig, treeExpandeds, groupFolds } = $table + let { groupData, scrollYLoad, scrollYStore, editConfig, editStore } = $table + let { expandConfig = {}, expandeds, selection, rowGroup } = $table + let rows = [] + let expandMethod = expandConfig.activeMethod + let startIndex = scrollYStore.startIndex + let isOrdered = treeConfig ? !!treeConfig.ordered : false + + seqCount = seqCount || { value: 0 } + + tableData.forEach((row, $rowIndex) => { + let trOn = {} + let rowIndex = $rowIndex + let { actived } = editStore + let rowActived = editConfig && actived.row === row + + seqCount.value = seqCount.value + 1 + let seq = isOrdered ? seqCount.value : rowIndex + 1 + if (scrollYLoad) { + seq += startIndex + } + // 确保任何情况下 rowIndex 都精准指向真实 data 索引 + rowIndex = $table.getRowIndex(row) + + // 事件绑定 + addRowListenerMouseenter({ $table, highlightHoverRow, row, rowIndex, trOn }) + let rowid = getRowid($table, row) + renderRowGroupData({ groupData, groupFolds, row, rowGroup, rowid, rows, tableColumn }) + let args = { $rowIndex, $seq, $table, _vm, editStore, fixedType, groupFolds, h, row, rowActived } + Object.assign(args, { rowClassName, rowIndex, rowKey, rowLevel, rowid, rows, selection, seq }) + Object.assign(args, { tableColumn, trOn, treeConfig }) + + renderRow(args) + renderRowAfter({ $table, h, row, rowIndex, rows, tableData }) + args = { $table, expandMethod, expandeds, fixedType, h, row, rowIndex, rowLevel } + Object.assign(args, { rowid, rows, seq, tableColumn, trOn, treeConfig }) + // 如果行被展开了 + renderRowExpanded(args) + args = { $seq, $table, _vm, fixedType, h, row, rowLevel, rows } + Object.assign(args, { seq, seqCount, tableColumn, treeConfig, treeExpandeds }) + // 如果是树形表格 + renderRowTree(args, renderRows) + }) + + return rows +} + +/** + * 同步滚动条 + * scroll 方式:可以使固定列与内容保持一致的滚动效果,处理相对麻烦 + * mousewheel 方式:对于同步滚动效果就略差了,左右滚动,内容跟随即可 + */ +let handlerScrollTimeout + +function syncBodyScroll(scrollTop, elemDist1, elemDist2) { + if (elemDist1) { + elemDist1.onscroll = null + elemDist1.scrollTop = scrollTop + } + + if (elemDist2) { + elemDist2.onscroll = null + elemDist2.scrollTop = scrollTop + } + + clearTimeout(handlerScrollTimeout) + + handlerScrollTimeout = setTimeout(() => { + elemDist1 && (elemDist1.onscroll = elemDist1._onscroll) + elemDist2 && (elemDist2.onscroll = elemDist2._onscroll) + elemDist1 && (elemDist1.scrollTop = scrollTop) + elemDist2 && (elemDist2.scrollTop = scrollTop) + }, 100) +} + +function renderDefEmpty(h) { + return [ + h('p', { + class: 'tiny-grid__empty-img' + }), + h( + 'span', + { + class: 'tiny-grid__empty-text' + }, + GlobalConfig.i18n('ui.grid.emptyText') + ) + ] +} + +function syncScrollTop(args) { + let { $table, bodyElem, fixedType, footerElem, headerElem } = args + let { isX, isY, leftElem, rightElem, scrollTop } = args + let ruleChains = [ + { + match: () => leftElem && fixedType === 'left', + action: () => { + scrollTop = leftElem.scrollTop + syncBodyScroll(scrollTop, bodyElem, rightElem) + } + }, + { + match: () => rightElem && fixedType === 'right', + action: () => { + scrollTop = rightElem.scrollTop + syncBodyScroll(scrollTop, bodyElem, leftElem) + } + }, + { + match: () => true, + action: () => { + if (isX && headerElem) { + headerElem.scrollLeft = bodyElem.scrollLeft + } + if (isX && footerElem) { + footerElem.scrollLeft = bodyElem.scrollLeft + } + + let fixedElem = leftElem || rightElem + + if (fixedElem) { + $table.checkScrolling() + } + + if (fixedElem && isY) { + syncBodyScroll(scrollTop, leftElem, rightElem) + } + } + } + ] + + for (let i = 0; i < ruleChains.length; i++) { + if (ruleChains[i].match()) { + ruleChains[i].action() + break + } + } + + return scrollTop +} + +function doScrollLoad({ $table, _vm, bodyElem, event, headerElem, isX, isY, scrollLeft, scrollXLoad, scrollYLoad }) { + let isScrollX = scrollXLoad && isX + + if (isScrollX) { + $table.triggerScrollXEvent(event) + } + + if (isScrollX && headerElem && scrollLeft + bodyElem.clientWidth >= bodyElem.scrollWidth) { + // 修复拖动滚动条时可能存在不同步问题 + _vm.$nextTick(() => { + if (bodyElem.scrollLeft !== headerElem.scrollLeft) { + headerElem.scrollLeft = bodyElem.scrollLeft + } + }) + } + + if (scrollYLoad && isY) { + $table.triggerScrollYEvent(event) + } +} + +function renderEmptyBlock({ $slots, $table, _vm, fixedType, isCenterCls, renderEmpty, tableData }) { + let res = null + + if (!fixedType) { + res = h( + 'div', + { + class: `tiny-grid__empty-block${tableData.length ? '' : ' is__visible'} ${isCenterCls}`, + ref: 'emptyBlock' + }, + $slots.empty ? $slots.empty.call(_vm, { $table }, h) : renderEmpty ? [renderEmpty(h, $table)] : renderDefEmpty(h) + ) + } + + return res +} + +function renderBorders({ fixedType, keyboardConfig, mouseConfig }) { + let res = null + + if (!fixedType && (mouseConfig.checked || keyboardConfig.isCut)) { + res = h('div', { class: 'tiny-grid__borders' }, [ + mouseConfig.checked ? renderBorder(h, 'check') : null, + keyboardConfig.isCut ? renderBorder(h, 'copy') : null + ]) + } + + return res +} + +function renderTable({ $table, _vm, clearHoverRow, fixedType, tableColumn, tableData, tableLayout }) { + return h( + 'table', + { + class: 'tiny-grid__body', + style: { tableLayout }, + attrs: { cellspacing: 0, cellpadding: 0, border: 0 }, + ref: 'table' + }, + [ + // 列宽 + h( + 'colgroup', + { ref: 'colgroup' }, + tableColumn.map((column, columnIndex) => h('col', { attrs: { name: column.id }, key: columnIndex })) + ), + // 内容 + h('tbody', { ref: 'tbody', on: { mouseleave: clearHoverRow } }, renderRows({ h, _vm, $table, $seq: '', rowLevel: 0, fixedType, tableData, tableColumn })) + ] + ) +} + +function renderYSpace({ scrollLoad }) { + return h('div', { class: 'tiny-grid-body__y-space visual', ref: 'ySpace' }, [scrollLoad ? h('div', { class: 'tiny-grid-body__y-scrollbar' }) : [null]]) +} + +function renderXSpace({ fixedType }) { + return fixedType ? [null] : h('div', { class: 'tiny-grid-body__x-space', ref: 'xSpace' }) +} + +export default { + name: `${$prefix}GridBody`, + props: { + collectColumn: Array, + fixedColumn: Array, + fixedType: String, + isGroup: Boolean, + size: String, + tableColumn: Array, + tableData: Array, + visibleColumn: Array + }, + mounted() { + let { $el, $parent: $table, $refs, fixedType } = this + let { elemStore } = $table + let keyPrefix = `${fixedType || 'main'}-body-` + + elemStore[`${keyPrefix}wrapper`] = $el + elemStore[`${keyPrefix}table`] = $refs.table + elemStore[`${keyPrefix}colgroup`] = $refs.colgroup + elemStore[`${keyPrefix}list`] = $refs.tbody + elemStore[`${keyPrefix}xSpace`] = $refs.xSpace + elemStore[`${keyPrefix}ySpace`] = $refs.ySpace + elemStore[`${keyPrefix}emptyBlock`] = $refs.emptyBlock + + this.$el.onscroll = this.scrollEvent + this.$el._onscroll = this.scrollEvent + }, + setup(props, { slots }) { + hooks.onBeforeUnmount(() => { + const table = hooks.getCurrentInstance().proxy + + table.$el._onscroll = null + table.$el.onscroll = null + }) + + return { slots } + }, + render() { + let { $parent: $table, fixedColumn, fixedType } = this + let { $grid, clearHoverRow, isCenterEmpty, keyboardConfig = {}, mouseConfig = {}, renderEmpty } = $table + let { scrollLoad, scrollXLoad, showOverflow: allColumnOverflow, tableColumn, tableData, tableLayout } = $table + let $slots = $grid.slots + let isCenterCls = isCenterEmpty ? 'is__center' : '' + // 如果是固定列与设置了超出隐藏 + if (fixedType && (allColumnOverflow || scrollXLoad)) { + tableColumn = fixedColumn + } + return h( + 'div', + { + ref: 'body', + class: ['tiny-grid__body-wrapper', fixedType ? `fixed-${fixedType}__wrapper` : 'body__wrapper', { [classMap.isScrollload]: scrollLoad }] + }, + [ + renderXSpace({ fixedType }), + renderYSpace({ scrollLoad }), + renderTable({ $table, _vm: this, clearHoverRow, fixedType, tableColumn, tableData, tableLayout }), + // 选中边框线 + renderBorders({ fixedType, keyboardConfig, mouseConfig }), + // 空数据 + renderEmptyBlock({ $slots, $table, _vm: this, fixedType, isCenterCls, renderEmpty, tableData }) + ] + ) + }, + methods: { + // 滚动处理,如果存在列固定右侧,同步更新滚动状态 + scrollEvent(event) { + let { $parent: $table, fixedType } = this + let { $refs, highlightHoverRow, lastScrollLeft, lastScrollTop, scrollXLoad, scrollYLoad } = $table + let { leftBody, rightBody, tableBody, tableFooter, tableHeader } = $refs + let headerElem = tableHeader ? tableHeader.$el : null + let bodyElem = tableBody.$el + let footerElem = tableFooter ? tableFooter.$el : null + let scrollLeft = bodyElem.scrollLeft + let leftElem = leftBody ? leftBody.$el : null + let rightElem = rightBody ? rightBody.$el : null + let scrollTop = bodyElem.scrollTop + let isY = scrollTop !== lastScrollTop + let isX = scrollLeft !== lastScrollLeft + + $table.lastScrollTime = Date.now() + $table.lastScrollLeft = scrollLeft + $table.lastScrollTop = scrollTop + $table.scrollDirection = isX ? 'X' : 'Y' + + if (highlightHoverRow) { + $table.clearHoverRow() + } + + let args = { $table, bodyElem, fixedType, footerElem, headerElem } + Object.assign(args, { isX, isY, leftElem, rightElem, scrollTop }) + scrollTop = syncScrollTop(args) + doScrollLoad({ $table, _vm: this, bodyElem, event, headerElem, isX, isY, scrollLeft, scrollXLoad, scrollYLoad }) + emitEvent($table, 'scroll', [{ type: 'body', fixed: fixedType, scrollTop, scrollLeft, isX, isY, $table }, event]) + } + } +} diff --git a/packages/grid/src/button/index.js b/packages/grid/src/button/index.js new file mode 100644 index 000000000..e13ac1346 --- /dev/null +++ b/packages/grid/src/button/index.js @@ -0,0 +1,17 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $install } from '@opentiny/vue-common' +import Button from './src/button' + +$install(Button) + +export default Button diff --git a/packages/grid/src/button/src/button.js b/packages/grid/src/button/src/button.js new file mode 100644 index 000000000..ec0ca073b --- /dev/null +++ b/packages/grid/src/button/src/button.js @@ -0,0 +1,195 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import { objectMap } from '@opentiny/vue-renderless/grid/static/' +import { addClass, removeClass } from '@opentiny/vue-renderless/common/deps/dom' +import { emitEvent, getEventTargetNode, getListeners } from '@opentiny/vue-renderless/grid/utils' +import GlobalConfig from '../../config' +import { h, $prefix } from '@opentiny/vue-common' + +function renderNoSlotDropdowns({ $slots, _vm, buttonBase, loading, tableListeners }) { + let loadingVNode = [] + + if (loading) { + loadingVNode = [ + h('i', { + class: ['tiny-grid-button__loading-icon', GlobalConfig.icon.btnLoading] + }) + ] + } + + return h( + 'button', + { + ...buttonBase, + on: objectMap(tableListeners, (cb, type) => (event) => _vm.$emit(type, event)) + }, + loadingVNode.concat($slots.default.call(_vm)) + ) +} + +function renderHasSlotDropdowns({ $slots, _vm, buttonBase, tableListeners, vSize }) { + return h( + 'div', + { + class: ['tiny-grid-button__dropdown', { [`size__${vSize}`]: vSize }] + }, + [ + h( + 'button', + { + ...buttonBase, + on: { + mouseenter: _vm.mouseenterEvent, + mouseleave: _vm.mouseleaveEvent, + ...objectMap(tableListeners, (cb, type) => (event) => _vm.$emit(type, event)) + } + }, + [ + h('span', $slots.default.call(_vm)), + h('i', { + class: `tiny-grid-button__dropdown-arrow ${GlobalConfig.icon.dropdownBottom}` + }) + ] + ), + h( + 'div', + { + class: 'tiny-grid-button__dropdown-wrapper', + on: { + click: _vm.clickDropdownEvent, + mouseenter: _vm.mouseenterEvent, + mouseleave: _vm.mouseleaveEvent + } + }, + $slots.dropdowns.call(_vm) + ) + ] + ) +} + +function getButtonBase({ disabled, isText, loading, name, type, vSize }) { + const map = { + isDisabled: 'is__disabled', + isLoading: 'is__loading' + } + return { + class: [ + 'tiny-grid-button', + `type__${isText ? type : 'button'}`, + { + [`size__${vSize}`]: vSize, + [`theme__${type}`]: type && !isText, + [map.isDisabled]: disabled || loading, + [map.isLoading]: loading + } + ], + attrs: { + name, + type: 'button', + disabled: disabled || loading + } + } +} + +export default { + name: `${$prefix}GridButton`, + inheritAttrs: false, + props: { + type: String, + size: String, + name: [String, Number], + disabled: Boolean, + loading: Boolean + }, + computed: { + vSize() { + return this.size || this.$parent.size || this.$parent.vSize + } + }, + render() { + let { disabled, loading, name, slots: $slots, tableListeners, type, vSize } = this + let isText = type === 'text' + let buttonBase = getButtonBase({ + disabled, + isText, + loading, + name, + type, + vSize + }) + + return $slots.dropdowns + ? renderHasSlotDropdowns({ + $slots, + _vm: this, + buttonBase, + tableListeners, + vSize + }) + : renderNoSlotDropdowns({ + $slots, + _vm: this, + buttonBase, + loading, + tableListeners + }) + }, + methods: { + clickDropdownEvent(event) { + let dropdownElem = event.currentTarget + let wrapperElem = dropdownElem.parentNode + let { flag, targetElem } = getEventTargetNode(event, dropdownElem, 'tiny-grid-button') + + if (flag) { + wrapperElem.dataset.active = 'N' + removeClass(wrapperElem, 'is__active') + emitEvent(this, 'dropdown-click', [{ name: targetElem.getAttribute('name') }, event]) + } + }, + mouseenterEvent(event) { + let dropdownElem = event.currentTarget + let wrapperElem = dropdownElem.parentNode + + wrapperElem.dataset.active = 'Y' + addClass(wrapperElem, 'is__active') + }, + mouseleaveEvent(event) { + let dropdownElem = event.currentTarget + let wrapperElem = dropdownElem.parentNode + + wrapperElem.dataset.active = 'N' + setTimeout(() => { + if (wrapperElem.dataset.active !== 'Y') { + removeClass(wrapperElem, 'is__active') + } + }, 300) + } + }, + setup(props, { slots, attrs, listeners }) { + const tableListeners = getListeners(attrs, listeners) + + return { slots, tableListeners } + } +} diff --git a/packages/grid/src/cell/index.js b/packages/grid/src/cell/index.js new file mode 100644 index 000000000..cc96ffee8 --- /dev/null +++ b/packages/grid/src/cell/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import CellDefault, { Cell as CellNamed } from './src/cell' + +export const Cell = CellNamed +export default CellDefault diff --git a/packages/grid/src/cell/src/cell.js b/packages/grid/src/cell/src/cell.js new file mode 100644 index 000000000..19a33326d --- /dev/null +++ b/packages/grid/src/cell/src/cell.js @@ -0,0 +1,835 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import { get } from '@opentiny/vue-renderless/grid/static/' +import { random } from '@opentiny/vue-renderless/common/string' +import { getColumnConfig, getFuncText, formatText } from '@opentiny/vue-renderless/grid/utils' +import { Renderer } from '../../adapter' +import { getCellLabel } from '../../tools' +import GLOBAL_CONFIG from '../../config' +import { hooks } from '@opentiny/vue-common' +import { iconCheckedSur, iconHalfselect } from '@opentiny/vue-icon' +import { getTableCellKey } from '../../table/src/strategy' + +const insertedField = GLOBAL_CONFIG.constant.insertedField + +const classMap = { + isDisabled: 'is__disabled', + isIndeterminate: 'is__indeterminate' +} + +const getCellRender = (isTreeNode, treeCellRender, treeRender, context) => context[isTreeNode ? treeCellRender : treeRender] + +function processRenderer({ h, params, renderer, value }) { + let result = { flag: false, vnodes: null } + + if (renderer) { + if (typeof renderer === 'function') { + result.flag = true + result.vnodes = [renderer(h, params)] + } + + if (renderer.component) { + const { component, attrs } = renderer + + result.flag = true + result.vnodes = [ + h(hooks.toRaw(component), { + key: getTableCellKey(params), + class: 'grid-cell', + attrs: { + value, + modelValue: value, + ...(typeof attrs === 'function' ? attrs(params) : attrs) + } + }) + ] + } + } + + return result +} + +function processAsyncColumn({ $table, column, format, h, params, row }) { + let result = { flag: false, vnodes: null } + + const { fetch, loadingText } = format.async || {} + + if ($table.isAsyncColumn && row[insertedField] !== true && typeof fetch === 'function') { + let cellText = row[$table.getAsyncColumnName(column.property)] + const loadingRender = loadingText || 'loading ...' + + if (typeof cellText === 'undefined') { + cellText = typeof loadingRender === 'function' ? loadingRender(h, params) : loadingRender + } + + if (typeof cellText === 'undefined' || typeof column.formatText === 'undefined') { + result.flag = true + result.vnodes = [cellText] + } + } + + return result +} + +function getColumnRuleTypeIndex({ _vm, isTreeNode, renMaps, type }) { + return { + match: () => type === 'index', + action: () => { + renMaps.renderHeader = _vm.renderIndexHeader + renMaps.renderCell = getCellRender(isTreeNode, 'renderTreeIndexCell', 'renderIndexCell', _vm) + } + } +} + +function getColumnRuleTypeRadio({ _vm, isTreeNode, renMaps, type }) { + return { + match: () => type === 'radio', + action: () => { + renMaps.renderHeader = _vm.renderRadioHeader + renMaps.renderCell = getCellRender(isTreeNode, 'renderTreeRadioCell', 'renderRadioCell', _vm) + } + } +} + +function getColumnRuleTypeSelection({ _vm, isTreeNode, renMaps, selectConfig, type }) { + return { + match: () => type === 'selection', + action: () => { + renMaps.renderHeader = _vm.renderSelectionHeader + renMaps.renderCell = getCellRender(isTreeNode, 'renderTreeSelectionCell', 'renderSelectionCell', _vm) + + if (selectConfig && selectConfig.checkField) { + renMaps.renderCell = getCellRender(isTreeNode, 'renderTreeSelectionCellByProp', 'renderSelectionCellByProp', _vm) + } + } + } +} + +function getColumnRuleTypeExpand({ _vm, renMaps, type }) { + return { + match: () => type === 'expand', + action: () => { + renMaps.renderCell = _vm.renderExpandCell + renMaps.renderData = _vm.renderExpandData + } + } +} + +function getColumnRuleTypeOther({ $table, _vm, colProps, editor, filter, isTreeNode, renMaps, type }) { + return { + match: () => !~['index', 'radio', 'selection', 'expand'].indexOf(type), + action: () => { + let { sortable, remoteSort } = colProps + const isSortable = $table.sortable && (type ? false : sortable) + const isSortColumn = isSortable || remoteSort + + if (editor) { + renMaps.renderHeader = _vm.renderEditHeader + renMaps.renderCell = getCellRender(isTreeNode, 'renderTreeRadioCell', 'renderRowEdit', _vm) + + if ($table.editConfig && $table.editConfig.mode === 'cell') { + renMaps.renderCell = getCellRender(isTreeNode, 'renderTreeCellEdit', 'renderCellEdit', _vm) + } + } else if (filter) { + renMaps.renderHeader = _vm.renderFilterHeader + + if (isSortColumn) { + renMaps.renderHeader = _vm.renderSortAndFilterHeader + } + } else if (isSortColumn) { + renMaps.renderHeader = _vm.renderSortHeader + } + } + } +} + +const isCheckStrictly = (selectConfig) => + (selectConfig && selectConfig.checkStrictly && !selectConfig.showHeader) || (selectConfig && !selectConfig.checkStrictly && selectConfig.showHeader === false) + +const getSelectVnodes = ({ h, vSize, headerCheckDisabled, isIndeterminate, options, isAllSelected, headerTitle }) => + h( + 'label', + { + class: [ + 'tiny-grid-checkbox tiny-select-header', + { + [`size__${vSize}`]: vSize, + [classMap.isDisabled]: headerCheckDisabled, + [classMap.isIndeterminate]: isIndeterminate + } + ], + key: random() + }, + [ + h('input', options), + h('span', { class: 'tiny-grid-checkbox__icon' }, [ + isAllSelected + ? h(iconCheckedSur(), { + class: ['tiny-svg-size', 'icon-checked-sur'] + }) + : '', + isIndeterminate + ? h(iconHalfselect(), { + class: ['tiny-svg-size', 'icon-half-select'] + }) + : '' + ]), + headerTitle ? h('span', { class: 'tiny-grid-checkbox__label' }, getFuncText(headerTitle)) : null + ] + ) + +const getSelectCellVnodes = ({ indeterminate, h, isDisabled, vSize, labelField, options, row }) => + h( + 'label', + { + class: [ + 'tiny-grid-checkbox tiny-select-cell', + { + [`size__${vSize}`]: vSize, + [classMap.isIndeterminate]: indeterminate, + [classMap.isDisabled]: isDisabled + } + ], + key: random() + }, + [ + h('input', options), + h('span', { class: 'tiny-grid-checkbox__icon' }, [ + h(iconCheckedSur(), { class: ['tiny-svg-size', 'icon-checked-sur'] }), + indeterminate + ? h(iconHalfselect(), { + class: ['tiny-svg-size', 'icon-half-select'] + }) + : '' + ]), + labelField ? h('span', { class: 'tiny-grid-checkbox__label' }, get(row, labelField)) : null + ] + ) + +const getSelectCellByProsVnodes = ({ h, vSize, indeterminate, isDisabled, options, labelField, row }) => + h( + 'label', + { + key: random(), + class: [ + 'tiny-grid-checkbox', + { + [`size__${vSize}`]: vSize, + [classMap.isIndeterminate]: indeterminate, + [classMap.isDisabled]: isDisabled + } + ] + }, + [ + h('input', options), + h('span', { class: 'tiny-grid-checkbox__icon' }, [ + !indeterminate + ? '' + : h(iconHalfselect(), { + class: ['tiny-svg-size', 'icon-half-select'] + }), + h(iconCheckedSur(), { class: ['tiny-svg-size', 'icon-checked-sur'] }) + ]), + !labelField ? null : h('span', { class: 'tiny-grid-checkbox__label' }, get(row, labelField)) + ] + ) + +export const Cell = { + createColumn($table, colProps) { + let { type, filter, editor, treeNode } = colProps + let { selectConfig, treeConfig } = $table + let isTreeNode = treeConfig && treeNode + let renMaps = { + renderHeader: this.renderHeader, + renderCell: getCellRender(isTreeNode, 'renderTreeCell', 'renderCell', this) + } + let _vm = this + + let ruleChains = [ + getColumnRuleTypeIndex({ _vm, isTreeNode, renMaps, type }), + getColumnRuleTypeRadio({ _vm, isTreeNode, renMaps, type }), + getColumnRuleTypeSelection({ + _vm, + isTreeNode, + renMaps, + selectConfig, + type + }), + getColumnRuleTypeExpand({ _vm, renMaps, type }), + getColumnRuleTypeOther({ + $table, + _vm, + colProps, + editor, + filter, + isTreeNode, + renMaps, + type + }) + ] + + for (let j = 0; j < ruleChains.length; j++) { + if (ruleChains[j].match()) { + ruleChains[j].action() + break + } + } + + return getColumnConfig(colProps, renMaps, GLOBAL_CONFIG) + }, + // 单元格 + renderHeader(h, params) { + let { column } = params + let { slots, own, title } = column + + if (slots && slots.header) { + return slots.header(params, h) + } + + if (typeof title === 'function') { + return [title(h, params)] + } + + // 在 v3.0 中废弃 label + return [formatText(getFuncText(own.title || own.label), 1)] + }, + renderCell(h, params) { + let { $table, row, column } = params + let { slots, renderer } = column + const format = column.format || {} + + if (slots && slots.default) { + return slots.default(params, h) + } + + const value = get(row, column.property) + + let result = processRenderer({ h, params, renderer, value }) + + if (result.flag) { + return result.vnodes + } + + result = processAsyncColumn({ $table, column, format, h, params, row }) + + if (result.flag) { + return result.vnodes + } + + const cellValue = getCellLabel(row, column, params) + + if (typeof cellValue === 'function') { + return [cellValue(h, params)] + } + + return [formatText(cellValue, 1)] + }, + renderTreeCell(h, params) { + return Cell.renderTreeIcon(h, params).concat(Cell.renderCell.call(this, h, params)) + }, + // 树节点 + renderTreeIcon(h, params) { + let { $table, level, row } = params + let { treeConfig, treeExpandeds } = $table + let { children, indent, renderIcon, trigger } = treeConfig + let isActive = ~treeExpandeds.indexOf(row) + let rowChildren = row[children] + let listeners = { + click: (event) => $table.triggerTreeExpandEvent(event, params) + } + let icon = GLOBAL_CONFIG.icon + + if (trigger && trigger !== 'default') { + listeners = {} + } + + let iconVNode = [] + + if (rowChildren && rowChildren.length) { + iconVNode = [renderIcon ? renderIcon(h, { active: isActive, ...params }) : h('i', { class: `tiny-grid-tree__node-btn ${icon.tree}` })] + } + const map = { + isActive: 'is__active' + } + return [ + h('span', { + class: 'tiny-grid-tree__indent', + style: { + width: `${level * (indent || 16)}px` + } + }), + h( + 'span', + { + class: ['tiny-grid-tree-wrapper', { [map.isActive]: isActive }], + on: listeners + }, + iconVNode + ) + ] + }, + // 索引 + renderIndexHeader(h, params) { + let column = params.column + let slots = column.slots + let own = column.own + + if (slots && slots.header) { + return slots.header(params, h) + } + + let value = getFuncText(own.title || own.label || '') + + return [formatText(value, 1)] + }, + renderTreeIndexCell(h, params) { + return Cell.renderTreeIcon(h, params).concat(Cell.renderIndexCell(h, params)) + }, + renderIndexCell(h, params) { + let { $seq, level, seq } = params + let { startIndex, treeConfig = {} } = params.$table + let { indexMethod, slots } = params.column + let isOrdered = !!treeConfig.ordered + let indexValue = level && !isOrdered ? `${$seq}.${seq}` : startIndex + seq + + if (slots && slots.default) { + return slots.default(params, h) + } + + return [formatText(indexMethod ? indexMethod(params) : indexValue, 1)] + }, + // 单选 + renderRadioHeader(h, params) { + let { own, slots } = params.column + + if (slots && slots.header) { + return slots.header(params, h) + } + + let value = getFuncText(own.title || own.label) + + return [formatText(value, 1)] + }, + renderRadioCell(h, params) { + let { + $table, + column: { slots }, + isHidden, + row + } = params + let { radioConfig = {}, selectRow, vSize } = $table + let { labelField, checkMethod } = radioConfig + let disabled = !!checkMethod + let options = {} + if (slots && slots.default) { + return slots.default(params, h) + } + options.attrs = { + name: `tiny-grid-radio__${$table.id}`, + type: 'radio' + } + if (!isHidden && checkMethod) { + options.attrs.disabled = disabled = !checkMethod(params) + } + if (!isHidden) { + options.domProps = { checked: row === selectRow } + options.on = { + change(event) { + $table.triggerRadioRowEvent(event, params) + } + } + } + const map = { + isDisabled: 'is__disabled' + } + return [ + h( + 'label', + { + class: ['tiny-grid-radio', { [`size__${vSize}`]: vSize, [map.isDisabled]: disabled }] + }, + [ + h('input', options), + h('span', { class: 'tiny-grid-radio__icon' }), + labelField ? h('span', { class: 'tiny-grid-radio__label' }, get(row, labelField)) : null + ] + ) + ] + }, + renderTreeRadioCell(h, params) { + return Cell.renderTreeIcon(h, params).concat(Cell.renderRadioCell(h, params)) + }, + renderSelectionHeader(h, params) { + let { $table, column, isHidden } = params + let { slots, own } = column + let { headerCheckDisabled, isAllSelected, isIndeterminate, selectConfig, vSize } = $table + let headerTitle = own.title || own.label + let options = { attrs: { type: 'checkbox' } } + if (slots && slots.header) { + return slots.header(params, h) + } + if (isCheckStrictly(selectConfig)) { + return [] + } + if (!isHidden) { + options.domProps = { + disabled: headerCheckDisabled, + checked: isAllSelected && !headerCheckDisabled + } + options.on = { + change(event) { + $table.triggerCheckAllEvent(event, event.target.checked) + $table.showSelectToolbar() + } + } + } + let vnode = getSelectVnodes({ + h, + vSize, + headerCheckDisabled, + isIndeterminate, + options, + isAllSelected, + headerTitle + }) + return [vnode] + }, + renderSelectionCell(h, params) { + let { $table, column, isHidden, row } = params + let { slots } = column + let { selectConfig = {}, treeConfig, treeIndeterminates, vSize } = $table + let { labelField, checkMethod } = selectConfig + let { indeterminate = false, isDisabled = !!checkMethod } = {} + let options = { attrs: { type: 'checkbox' } } + if (slots && slots.default) { + return slots.default(params, h) + } + if (!isHidden) { + checkMethod && (options.attrs.disabled = isDisabled = !checkMethod(params)) + treeConfig && (indeterminate = ~treeIndeterminates.indexOf(row)) + options.domProps = { checked: ~$table.selection.indexOf(row) } + options.on = { + change(event) { + $table.triggerCheckRowEvent(event, params, event.target.checked) + $table.showSelectToolbar() + } + } + } + let vnode = getSelectCellVnodes({ + h, + vSize, + indeterminate, + isDisabled, + options, + labelField, + row + }) + return [vnode] + }, + renderTreeSelectionCell(h, params) { + return Cell.renderTreeIcon(h, params).concat(Cell.renderSelectionCell(h, params)) + }, + renderSelectionCellByProp(h, params) { + let { $table, column, isHidden, row } = params + let { slots } = column + let { selectConfig = {}, treeConfig, treeIndeterminates, vSize } = $table + let { checkField: property, checkMethod, labelField } = selectConfig + let { indeterminate = false, isDisabled = !!checkMethod } = {} + let options = { attrs: { type: 'checkbox' } } + + if (slots && slots.default) { + return slots.default(params, h) + } + + if (!isHidden) { + checkMethod && (options.attrs.disabled = isDisabled = !checkMethod(params)) + treeConfig && (indeterminate = ~treeIndeterminates.indexOf(row)) + options.domProps = { checked: get(row, property) } + options.on = { + change(event) { + $table.triggerCheckRowEvent(event, params, event.target.checked) + } + } + } + + let vnode = getSelectCellByProsVnodes({ h, indeterminate, isDisabled, vSize, labelField, options, row }) + + return [vnode] + }, + renderTreeSelectionCellByProp(h, params) { + return Cell.renderTreeIcon(h, params).concat(Cell.renderSelectionCellByProp(h, params)) + }, + // 展开行 + renderExpandCell(h, params) { + let { $table, isHidden, row } = params + let { expandConfig = {} } = $table + let expandMethod = expandConfig.activeMethod + let hideExpand = typeof expandMethod === 'function' ? expandMethod(row) : true + let expandActive = false + + if (!isHidden) { + expandActive = $table.expandeds.indexOf(params.row) > -1 + } + + const map = { + expandActive: 'expand__active' + } + + return [ + h( + 'span', + { + class: [ + 'tiny-grid__expanded', + { + [map.expandActive]: expandActive + } + ], + on: { + click(event) { + if (!hideExpand) { + return + } + $table.triggerRowExpandEvent(event, params) + } + } + }, + [hideExpand && h('i', { class: 'tiny-grid__expand-icon' })] + ) + ] + }, + renderExpandData(h, params) { + let { slots } = params.column + + if (slots && slots.default) { + return slots.default(params, h) + } + + return [] + }, + // 排序和筛选 + renderSortAndFilterHeader(h, params) { + const suffixCls = Cell.getSuffixCls(params) + + return Cell.renderHeader(h, params).concat(Cell.renderFilterIcon(h, params, suffixCls[0])).concat(Cell.renderSortIcon(h, params, suffixCls[1])) + }, + // 排序 + renderSortHeader(h, params) { + const suffixCls = Cell.getSuffixCls(params) + + return Cell.renderHeader(h, params).concat(Cell.renderSortIcon(h, params, suffixCls[1])) + }, + renderSortIcon(h, params) { + let { icon } = GLOBAL_CONFIG + let { $table, column } = params + let isColGroup = column.children && column.children.length + + // prettier-ignore + return [ + h( + 'span', + { class: 'tiny-grid-sort-wrapper' }, + isColGroup + ? [] + : [ + column.order === 'asc'? + h(icon.sortDesc, { + class: [ + 'tiny-svg-size tiny-grid-sort__asc-btn', + { + 'sort__active': column.order === 'asc' + } + ], + on: { click(event) { $table.triggerSortEvent(event, column, 'desc') } } + }):'', + column.order === 'desc'? + h(icon.sortAsc, { + class: [ + 'tiny-svg-size tiny-grid-sort__desc-btn', + { + 'sort__active': column.order === 'desc' + } + ], + on: { click(event) { $table.triggerSortEvent(event, column, '') } } + }):'', + column.order?'' + : h(icon.sortDefault, { + class: [ + 'tiny-svg-size tiny-grid-sort__desc-btn' + ], + on: { click(event) { $table.triggerSortEvent(event, column, 'asc') } } + }) + ] + ) + ] + }, + // 筛选 + renderFilterHeader(h, params) { + const suffixCls = Cell.getSuffixCls(params) + + return Cell.renderHeader(h, params).concat(Cell.renderFilterIcon(h, params, suffixCls[1])) + }, + renderFilterIcon(h, params, cls = '') { + let { $table, column } = params + let { filterStore } = $table + let icon = GLOBAL_CONFIG.icon + const map = { + isActive: 'is__active', + hasFilter: 'has__Filter' + } + return [ + h( + 'span', + { + class: [ + 'tiny-grid-filter-wrapper ' + cls, + { + [map.isActive]: filterStore.visible && filterStore.column === column + } + ] + }, + [ + h(icon.filter, { + class: [ + 'tiny-svg-size tiny-grid-filter__btn ' + column.id, + { + [map.hasFilter]: column.filter && column.filter.hasFilter + } + ], + on: { + click(event) { + $table.triggerFilterEvent(event, params.column, params) + } + } + }) + ] + ) + ] + }, + // 可编辑 + renderEditHeader(h, params) { + let { $table, column } = params + let { editConfig, editRules } = $table + let { filter, remoteSort, sortable, type } = column + let icon = GLOBAL_CONFIG.icon + let isRequired + + sortable = $table.sortable && !type && sortable + + let suffixCls = Cell.getSuffixCls(params) + let isRenderSortIcon = sortable || remoteSort + let columnRules + + if (editRules) { + columnRules = get(editRules, params.column.property) + } + + if (editRules && columnRules && !Array.isArray(columnRules)) { + columnRules = [columnRules] + } + + if (editRules && columnRules) { + isRequired = columnRules.some((rule) => rule.required) + } + + let vNodes = [ + isRequired ? h('i', { class: `tiny-icon ${icon.required}` }) : null, + editConfig && !editConfig.showIcon && !column.showIcon ? null : h(icon.edit, { class: 'tiny-grid-edit-icon tiny-svg-size' }) + ] + + vNodes = vNodes.concat(Cell.renderHeader(h, params)) + vNodes = vNodes.concat(filter ? Cell.renderFilterIcon(h, params, isRenderSortIcon ? suffixCls[0] : suffixCls[1]) : []) + vNodes = vNodes.concat(isRenderSortIcon ? Cell.renderSortIcon(h, params, suffixCls[1]) : []) + + return vNodes + }, + renderTreeRowEdit(h, params) { + return Cell.renderTreeIcon(h, params).concat(Cell.renderRowEdit(h, params)) + }, + // 行格编辑模式 + renderRowEdit(h, params) { + let { actived } = params.$table.editStore + + return Cell.runRenderer(h, params, this, actived && actived.row === params.row) + }, + renderTreeCellEdit(h, params) { + return Cell.renderTreeIcon(h, params).concat(Cell.renderCellEdit(h, params)) + }, + // 单元格编辑模式 + renderCellEdit(h, params) { + let { actived } = params.$table.editStore + + return Cell.runRenderer(h, params, this, actived && actived.row === params.row && actived.column === params.column) + }, + runRenderer(h, params, _vm, isEdit) { + let { $table, column, row } = params + let { formatText, own, slots } = column + let editor = own.editor + let compConf = Renderer.get(editor.component) + let showEdit = editor.type === 'visible' || isEdit + + if (showEdit && slots && slots.edit) { + return slots.edit(params, h) + } + + if (showEdit && typeof editor === 'function') { + return [editor(h, params)] + } + + if (showEdit && compConf && compConf.renderEdit) { + return compConf.renderEdit.call($table, h, editor, params, { + $type: 'edit', + $excel: $table.$parent, + $table, + $column: column + }) + } + + if (showEdit) { + return [] + } + + if (slots && slots.default) { + return slots.default(params, h) + } + + if (formatText) { + const cellValue = getCellLabel(row, column, params) + + if (typeof cellValue === 'function') { + return [cellValue(h)] + } + + return [cellValue] + } + + return Cell.renderCell.call(_vm, h, params) + }, + getSuffixCls(params) { + return params.$table.headerSuffixIconAbsolute ? ['suffix-icon-1', 'suffix-icon-0'] : ['', ''] + } +} + +export default Cell diff --git a/packages/grid/src/column/index.js b/packages/grid/src/column/index.js new file mode 100644 index 000000000..78d407e53 --- /dev/null +++ b/packages/grid/src/column/index.js @@ -0,0 +1,18 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Column from './src/column' + +Column.install = function (Vue) { + Vue.component(Column.name, Column) +} + +export default Column diff --git a/packages/grid/src/column/src/column.js b/packages/grid/src/column/src/column.js new file mode 100644 index 000000000..424fd6041 --- /dev/null +++ b/packages/grid/src/column/src/column.js @@ -0,0 +1,185 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import { assemColumn, destroyColumn } from '@opentiny/vue-renderless/grid/utils' +import { findTree } from '@opentiny/vue-renderless/grid/static/' +import Cell from '../../cell' +import { h, hooks, $prefix } from '@opentiny/vue-common' + +const SLOT_VM_CACHE = new WeakMap() + +export default { + name: $prefix + 'GridColumn', + componentName: 'GridColumn', + props: { + // 列对其方式 + align: String, + // 给单元格附加 className + className: [String, Function], + // 单元格编辑渲染配置项 + editor: [Object, Function], + // 列属性 + field: String, + filter: {}, + // 自定义筛选方法 + filterMethod: Function, + // 筛选是否允许多选 + filterMultiple: { type: Boolean, default: true }, + // 筛选模板配置项 + filterRender: Object, + // 配置筛选条件数组 + filters: Array, + // 将列固定在左侧或者右侧 + fixed: String, + // 表尾列的对齐方式 + footerAlign: String, + // 给表尾单元格附加 className + footerClassName: [String, Function], + // 格式化配置 + formatConfig: { + type: Object, + default: () => ({ data: [] }) + }, + // 格式化显示内容 + formatText: [Function, String], + // 格式化单元格编辑器组件的传入值 + formatValue: Function, + group: { + type: Boolean, + default: false + }, + // 表头对齐方式 + headerAlign: String, + // 给表头单元格附加 className + headerClassName: [String, Function], + // 自定义索引方法 + indexMethod: Function, + // 在 v3.0 中废弃 label + label: String, + // 列最小宽度,把剩余宽度按比例分配 + minWidth: [Number, String], + // 额外的参数 + params: Object, + // 在 v3.0 中废弃 prop + prop: String, + // 是否服务端排序 + remoteSort: { type: Boolean, default: null }, + // 单元格渲染配置项 + renderer: [Object, Function], + // 是否必填,如不设置,则会根据校验规则自动生成 + required: { + type: Boolean, + default: false + }, + // 是否允许拖动列宽调整大小 + resizable: { type: Boolean, default: null }, + // 表单的验证功能 + rules: Object, + // 当表头内容过长时显示为省略号 + showHeaderOverflow: { type: [Boolean, String], default: null }, + // 显示列头提示 + showHeaderTip: { type: Boolean, default: null }, + // 是否显示列头编辑图标 + showIcon: { + type: Boolean, + default: true + }, + // 当内容过长时显示为省略号 + showOverflow: { type: [Boolean, String], default: null }, + // 显示列内容提示 + showTip: { type: Boolean, default: null }, + // 自定义排序的属性 + sortBy: [String, Array], + // 自定义排序方法 + sortMethod: Function, + // 是否允许排序 + sortable: { + type: Boolean, + default: false + }, + // 列标题 + title: [String, Function], + // 指定为树节点 + treeNode: Boolean, + // 渲染类型 index,radio,selection,expand + type: String, + // 列宽度 + width: [Number, String] + }, + provide() { + return { $column: this } + }, + setup(props, { slots }) { + const { reactive, onBeforeUnmount, inject, getCurrentInstance, watch, nextTick, markRaw } = hooks + const currentInstance = getCurrentInstance() + const instance = currentInstance.proxy + const $grid = inject('$grid') + const $table = inject('$table') + const $column = inject('$column', null) + + const state = reactive({ + columnConfig: Cell.createColumn($table, props), + slots, + cacheKey: markRaw({ uid: currentInstance.uid }), + // 如果是静态数据源,就拿第一行数据 + firstRow: !$grid.fetchOption && $grid.data && $grid.data.length ? $grid.data[0] : {} + }) + + watch( + () => props.formatConfig, + () => { + state.columnConfig = instance.createColumn($table, props) + } + ) + + nextTick(() => assemColumn($table, $column, instance)) + + onBeforeUnmount(() => { + destroyColumn($table, instance) + SLOT_VM_CACHE.delete(state.cacheKey) + }) + + return state + }, + render() { + const { slots, cacheKey, firstRow, columnConfig } = this + let slotVm + + if (SLOT_VM_CACHE.has(cacheKey)) { + slotVm = SLOT_VM_CACHE.get(cacheKey) + } else { + slotVm = slots.default && slots.default({ row: firstRow, column: columnConfig }) + SLOT_VM_CACHE.set(cacheKey, slotVm) + } + + const hasSubColumn = findTree(slotVm, ({ componentOptions, type }) => { + const componentName = (type && type.name) || (componentOptions && componentOptions.Ctor.extendOptions.name) + + return componentName === 'TinyGridColumn' + }) + + return h('div', hasSubColumn && slotVm) + }, + methods: Cell +} diff --git a/packages/grid/src/config.js b/packages/grid/src/config.js new file mode 100644 index 000000000..b61e9bd39 --- /dev/null +++ b/packages/grid/src/config.js @@ -0,0 +1,127 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import { + iconEdit, + iconSetting, + iconConmentRefresh, + iconUnfilter, + iconMinscreen, + iconAscending, + iconFullscreen, + iconDescending, + iconSortDefault +} from '@opentiny/vue-icon' + +const GlobalConfig = { + validConfig: { + message: 'tooltip' + }, + // 默认开启点击头部单元格触发排序 + sortConfig: {}, + // 默认不开启隔行换色和行高亮,不暴露此配置 + stripe: false, + highlightHoverRow: true, + resizable: true, + fit: true, + showHeader: true, + defaultTreeIndent: 16, + defaultTreeSpacing: 30, + rowId: '_RID', // 行数据的唯一主键字段名 + version: 0, // 版本号,对于某些带数据缓存的功能有用到,上升版本号可以用于重置数据 + optimization: { + animat: true, + delayHover: 250, + scrollX: { + gt: 100 + }, + scrollY: { + gt: 500 + } + }, + icon: { + sortAsc: iconAscending(), + sortDesc: iconDescending(), + sortDefault: iconSortDefault(), + required: 'tiny-grid-required-icon', + filter: iconUnfilter(), + edit: iconEdit(), + tree: 'tiny-grid-icon__caret-right', + refresh: iconConmentRefresh(), + minscreen: iconMinscreen(), + fullscreen: iconFullscreen(), + custom: iconSetting(), + jumpPrev: 'tiny-grid-icon__d-arrow-left', + jumpNext: 'tiny-grid-icon__d-arrow-right', + prevPage: 'tiny-grid-icon__arrow-left', + nextPage: 'tiny-grid-icon__arrow-right', + zoomIn: 'tiny-grid-icon__zoomin', + zoomOut: 'tiny-grid-icon__zoomout', + modalClose: 'tiny-grid-icon__close', + modalInfo: 'tiny-grid-icon__info', + modalSuccess: 'tiny-grid-icon__success', + modalWarning: 'tiny-grid-icon__warning', + modalError: 'tiny-grid-icon__error', + modalQuestion: 'tiny-grid-icon__question', + modalLoading: 'tiny-grid-icon__refresh roll', + caretBottom: 'tiny-grid-icon__caret-bottom', + dropdownBottom: 'tiny-grid-icon__arrow-bottom', + btnLoading: 'tiny-grid-icon__refresh roll' + }, + grid: {}, + menu: {}, + tooltip: { + trigger: 'hover', + theme: 'dark' + }, + pager: {}, + toolbar: { + resizable: { + storage: false + }, + buttons: [] + }, + modal: { + zIndex: 2000, + minWidth: 340, + minHeight: 200, + lockView: true, + mask: true, + duration: 3000, + marginSize: 10, + animat: true + }, + i18n: (key) => key, + constant: { + insertedField: '_$inserted', + deletedField: '_$deleted', + asyncPrefix: '_$async_' + }, + TINY_TABLE_CUSTOM_COLUMN_WIDTH: 'TINY_TABLE_CUSTOM_COLUMN_WIDTH', + TINY_TABLE_CUSTOM_SETTING: 'TINY_TABLE_CUSTOM_SETTING' +} + +export default GlobalConfig + +export const prefix = 'tiny-grid' diff --git a/packages/grid/src/edit/index.js b/packages/grid/src/edit/index.js new file mode 100644 index 000000000..0a60eed65 --- /dev/null +++ b/packages/grid/src/edit/index.js @@ -0,0 +1,20 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Methods from './src/methods' +import TINYGrid from '../adapter' + +export default { + install(Table) { + TINYGrid._edit = 1 + Object.assign(Table.methods, Methods) + } +} diff --git a/packages/grid/src/edit/src/methods.js b/packages/grid/src/edit/src/methods.js new file mode 100644 index 000000000..5f4cebecf --- /dev/null +++ b/packages/grid/src/edit/src/methods.js @@ -0,0 +1,552 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import debounce from '@opentiny/vue-renderless/common/deps/debounce' +import { hooks } from '@opentiny/vue-common' +import { addClass } from '@opentiny/vue-renderless/common/deps/dom' +import browser from '@opentiny/vue-renderless/common/browser' +import { isArray, destructuring, set, get, remove, filterTree, find, clone } from '@opentiny/vue-renderless/grid/static/' +import { getCell, getCellValue, setCellValue, emitEvent, getRowid } from '@opentiny/vue-renderless/grid/utils' +import { Renderer } from '../../adapter' +import { error, warn } from '../../tools' +import GlobalConfig from '../../config' +import { handleActivedCheckCell, handleActivedCanActive, handleActivedDoActive, handleActivedClearActive, handleActivedTryActive } from './utils/handleActived' + +function operArrs({ _vm, editStore, newRecords, newRecordsCopy, nowData, row, tableFullData, tableSourceData }) { + if (row === -1) { + Array.prototype.push.apply(nowData, newRecords) + Array.prototype.push.apply(tableFullData, newRecords) + Array.prototype.push.apply(tableSourceData, newRecordsCopy) + } + + if (row && row !== -1) { + let targetIndex = nowData.indexOf(row) + + if (targetIndex === -1) { + throw new Error(error('ui.grid.error.unableInsert')) + } + + let insertIndex = tableFullData.indexOf(row) + + Array.prototype.splice.apply(nowData, [targetIndex, 0].concat(newRecords)) + Array.prototype.splice.apply(tableFullData, [insertIndex, 0].concat(newRecords)) + Array.prototype.splice.apply(tableSourceData, [insertIndex, 0].concat(newRecordsCopy)) + } + + if (!row) { + Array.prototype.unshift.apply(nowData, newRecords) + Array.prototype.unshift.apply(tableFullData, newRecords) + Array.prototype.unshift.apply(tableSourceData, newRecordsCopy) + } + + Array.prototype.unshift.apply(editStore.insertList, newRecords) + Array.prototype.push.apply(_vm.temporaryRows, newRecordsCopy) +} + +function removeFromTableSourceData({ _vm, rows, tableSourceData }) { + for (let i = 0; i < rows.length; i++) { + for (let j = tableSourceData.length - 1; j >= 0; j--) { + if (getRowid(_vm, rows[i]) === getRowid(_vm, tableSourceData[j])) { + tableSourceData.splice(j, 1) + + break + } + } + } +} + +const _setActiveCell = function (row, field) { + let next1 = () => { + if (!row || !field) { + return this.$nextTick() + } + + let column = find(this.visibleColumn, (column) => column.property === field) + + if (!column || !column.editor) { + return this.$nextTick() + } + + let next2 = (cell) => { + if (!cell) { + return + } + + let rowIndex = this.getRowIndex(row) + let columnIndex = this.getColumnIndex(column) + + this.handleActived({ row, rowIndex, column, columnIndex, cell, $table: this }) + this.lastCallTime = Date.now() + } + + getCell(this, { row, column }).then(next2) + + return this.$nextTick() + } + + return this.scrollToRow(row, true).then(next1) +} + +export default { + _insert(data) { + return this.insertAt(data) + }, + // 根据位置从指定行添加数据 + _insertAt(records, row) { + let { afterFullData, editStore, isAsyncColumn, scrollYLoad, tableFullData, tableSourceData = [], treeConfig } = this + if (treeConfig) { + throw new Error(error('ui.grid.error.treeInsert')) + } + // 增加新增标识 + if (isAsyncColumn) { + const columnSet = this.getColumns() + columnSet.forEach((column) => { + if (column.format && column.format.async && column.format.async.fetch) { + records[GlobalConfig.constant.insertedField] = true + } + }) + } + if (!isArray(records)) { + records = [records] + } + let nowData = afterFullData + let newRecords = records.map((record) => hooks.reactive(this.defineField({ ...record }))) + let newRecordsCopy = clone(newRecords, true) + operArrs({ _vm: this, editStore, newRecords, newRecordsCopy, nowData, row, tableFullData, tableSourceData }) + this.modifyCache() + this.handleTableData(true) + this.checkSelectionStatus() + if (scrollYLoad) { + this.updateScrollYSpace() + } + let res = { + row: newRecords.length ? newRecords[newRecords.length - 1] : null, + rows: newRecords + } + return this.$nextTick().then(() => { + this.recalculate() + return res + }) + }, + + /** + * 删除指定行数据 + * 如果传 row 则删除一行 + * 如果传 rows 则删除多行 + */ + _remove(rows) { + let { afterFullData: nowData, scrollYLoad, selectConfig = {}, selection, tableFullData, treeConfig, tableSourceData = [] } = this + let { insertList, removeList } = this.editStore + let { checkField } = selectConfig + let { rest = [], rowsOld = rows } = {} + let inArr = (row, rows) => ~rows.indexOf(row) + if (treeConfig) { + throw new Error(error('ui.grid.error.treeRemove')) + } + if (!rowsOld) { + rows = tableFullData + } + if (rowsOld && !isArray(rowsOld)) { + rows = [rowsOld] + } + for (let i = 0; i < rows.length; i++) { + let row = rows[i] + if (!this.hasRowInsert(row)) { + removeList.push(row) + } + } + // 如果绑定了多选属性,则更新状态 + if (!checkField) { + remove(selection, (row) => inArr(row, rows)) + } + if (tableFullData === rows) { + rows = tableFullData.slice(0) + nowData.length = 0 + tableFullData.length = 0 + } else { + rest = remove(tableFullData, (row) => inArr(row, rows)) + remove(nowData, (row) => inArr(row, rows)) + } + // 从新增中移除已删除的数据 + remove(insertList, (row) => inArr(row, rows)) + // 从tableSourceData中删除数据 + removeFromTableSourceData({ _vm: this, rows, tableSourceData }) + // 修改缓存 + this.modifyCache() + this.handleTableData(true) + this.checkSelectionStatus() + if (scrollYLoad) { + this.updateScrollYSpace() + } + let res = { row: rows && rows.length ? rows[rows.length - 1] : null, rows: rest } + return this.$nextTick().then(() => { + this.recalculate() + return res + }) + }, + + /** + * 删除选中数据 + */ + _removeSelecteds() { + let selectRecords = this.getSelectRecords(true) + let callback = (params) => { + this.clearSelection() + return params + } + + return this.remove(selectRecords).then(callback) + }, + _revert(...args) { + warn('ui.grid.error.delRevert') + return this.revertData.apply(this, args) + }, + + /** + * 对数据进行还原 + * 如果不传任何参数,则还原整个表格; + * 如果传row则还原一行; + * 如果传rows则还原多行; + * 如果还额外传了field则还原指定单元格。 + */ + _revertData(rows, field) { + let { tableSourceData, tableSynchData } = this + + if (arguments.length && rows && !isArray(rows)) { + rows = [rows] + } + + if (!arguments.length) { + rows = tableSynchData || [] + } + + for (let i = 0; i < rows.length; i++) { + let row = rows[i] + let rowIndex = this.getRowIndex(row) + let oRow = tableSourceData[rowIndex] + + if (oRow && row) { + if (field) { + set(row, field, get(oRow, field)) + } else { + destructuring(row, oRow) + } + } + } + + if (arguments.length) { + return this.$nextTick() + } + + return this.reloadData(tableSynchData) + }, + + /** + * 获取表格操作数据集 + */ + _getRecordset() { + let res = {} + + res.insertRecords = this.getInsertRecords() + res.removeRecords = this.getRemoveRecords() + res.updateRecords = this.getUpdateRecords() + + return res + }, + + /** + * 获取删除数据列表 + */ + _getRemoveRecords() { + return this.editStore.removeList + }, + + /** + * 获取新增数据列表 + */ + _getInsertRecords() { + return this.editStore.insertList + }, + + /** + * 获取更新数据列表 + * 只精准匹配row的更改。如果是树表格,子节点更改状态不会影响父节点的更新状态 + */ + _getUpdateRecords() { + let { tableFullData, treeConfig } = this + let handler = (row) => !this.isTemporaryRow(row) && this.hasRowChange(row) + let updateRecords = treeConfig ? filterTree(tableFullData, handler, treeConfig) : tableFullData.filter(handler) + + return updateRecords + }, + + /** + * 处理激活编辑 + */ + handleActived(params, event) { + let { editConfig, editStore, tableColumn } = this + let { cell, column, row } = params + let { editor } = column + let { actived } = editStore + let isActiveCell = handleActivedCheckCell({ actived, column, editConfig, row }) + + if (editor && cell && isActiveCell) { + // 判断是否禁用编辑 + let type = 'edit-disabled' + let canActive = handleActivedCanActive({ editConfig, params }) + let args = { _vm: this, actived, canActive, cell, column, editConfig } + + Object.assign(args, { event, params, row, tableColumn, type }) + + type = handleActivedDoActive(args) + + handleActivedClearActive({ _vm: this, canActive, event }) + emitEvent(this, type, [params, event]) + } + + handleActivedTryActive({ _vm: this, actived, cell, column, editor, event, isActiveCell, params, row }) + + return this.$nextTick() + }, + _getColumnModel(row, column) { + let { model, editor } = column + + if (editor) { + model.value = getCellValue(row, column) + model.update = false + } + }, + _setColumnModel(row, column) { + let { model, editor } = column + + if (editor && model.update) { + setCellValue(row, column, model.value) + model.update = false + model.value = null + } + }, + _getActiveRow() { + let { $el, editStore, tableData } = this + let { actived } = editStore + let { args, row } = actived + let length = $el.querySelectorAll('.tiny-grid-body__column.col__actived').length + + return args && ~tableData.indexOf(row) && length ? { ...args } : null + }, + + /** + * 清除已激活的编辑 + */ + _clearActived(event) { + let { editConfig = {}, editStore, tableColumn } = this + let { actived } = editStore + let { args, column, row } = actived + let isActived = row || column + + if (isActived && editConfig.mode === 'row') { + tableColumn.forEach((column) => this._setColumnModel(row, column)) + } + + if (isActived && editConfig.mode !== 'row') { + this._setColumnModel(row, column) + } + + if (isActived) { + this.updateFooter() + emitEvent(this, 'edit-closed', [args, event]) + } + + actived.args = null + actived.column = null + actived.row = null + + return this.clearValidate().then(this.recalculate) + }, + _hasActiveRow(row) { + return this.editStore.actived.row === row + }, + + /** + * 处理聚焦 + */ + handleFocus(params) { + let { cell, column } = params + let { editor } = column + + if (!editor) { + return + } + + let inputElem + let compRender = Renderer.get(editor.component) + let { autofocus, autoselect, focusDelay } = editor + + let handler = () => { + // 假如用户设定了聚焦的类名 class + if (autofocus) { + inputElem = cell.querySelector(autofocus) + } + // 表格渲染器针对逻辑的处理 + let isAutofocus = compRender && compRender.autofocus + if (isAutofocus && !inputElem) { + inputElem = cell.querySelector(isAutofocus) + } + + if (!inputElem) { + return + } + + let type = inputElem.type + + inputElem.type = 'text' + inputElem.selectionEnd = inputElem.value.length + inputElem.selectionStart = inputElem.selectionEnd + inputElem.type = type + inputElem[autoselect ? 'select' : 'focus']() + + if (browser.name !== 'ie') { + return + } + + let textRange = inputElem.createTextRange() + + textRange.collapse(false) + textRange.select() + } + // 异步组件需要延时 + setTimeout(handler, focusDelay || 50) + }, + + /** + * 激活单元格编辑 + */ + _setActiveCell, + + /** + * 激活行编辑 + */ + _setActiveRow(row) { + let editColumn = find(this.visibleColumn, (column) => column.editor) + return this.setActiveCell(row, editColumn.property) + }, + + /** + * 只对trigger为dblclick有效,选中单元格 + */ + _setSelectCell(row, field) { + let { editConfig, tableData, visibleColumn } = this + + if (!row || !field || editConfig.trigger === 'manual') { + return this.$nextTick() + } + + let column = find(visibleColumn, (column) => column.property === field) + let rowIndex = tableData.indexOf(row) + + if (!~rowIndex || !column) { + return this.$nextTick() + } + + let next = (cell) => { + let columnIndex = visibleColumn.indexOf(column) + let params = { row, rowIndex, column, columnIndex, cell } + + this.handleSelected(params, {}) + } + + getCell(this, { row, rowIndex, column }).then(next) + + return this.$nextTick() + }, + updateSelectedCls(clear) { + let { editStore, elemStore, mouseConfig = {} } = this + let { column, row } = editStore.selected + + clear && this.clearSelected(true) + + if (!mouseConfig.selected || !row || !column) { + return + } + + let listElem = elemStore[`${column.fixed}-body-list`] || elemStore['main-body-list'] + let rowid = getRowid(this, row) + let trElem = listElem.querySelector(`[data-rowid="${rowid}"]`) + + if (!trElem) { + return + } + + addClass(trElem.querySelector(`.${column.id}`), 'col__selected') + }, + + /** + * 处理选中源 + */ + handleSelected(params, event) { + let { editConfig, editStore, elemStore, mouseConfig = {} } = this + let { actived, selected } = editStore + let { cell, column, row } = params || {} + let selectMethod = () => { + if ((selected.row === row && selected.column === column) || (actived.row === row && (editConfig.mode !== 'cell' || actived.column === column))) { + return this.$nextTick() + } + + if (this.keyboardConfig || this.mouseConfig) { + this.clearChecked(event) + this.clearIndexChecked() + this.clearHeaderChecked() + this.clearSelected(event) + } + + this.clearActived(event) + + selected.args = params + selected.row = row + selected.column = column + + this.updateSelectedCls() + + if (!mouseConfig.checked) { + return this.$nextTick() + } + // 如果配置了批量选中功能,则为批量选中状态 + let headerElem = elemStore['main-header-list'] + + this.handleChecked([[cell]]) + + if (!headerElem) { + return this.$nextTick() + } + + this.handleHeaderChecked([[headerElem.querySelector(`.${column && column.id}`)]]) + this.handleIndexChecked([[cell && cell.parentNode && cell.parentNode.querySelector('.col__index')]]) + + return this.$nextTick() + } + + selectMethod = debounce(20, selectMethod) + + return selectMethod() + } +} diff --git a/packages/grid/src/edit/src/utils/handleActived.js b/packages/grid/src/edit/src/utils/handleActived.js new file mode 100644 index 000000000..cedd5ec44 --- /dev/null +++ b/packages/grid/src/edit/src/utils/handleActived.js @@ -0,0 +1,95 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import { setCellValue } from '@opentiny/vue-renderless/grid/utils' + +export function handleActivedCheckCell({ actived, column, editConfig, row }) { + return actived.row !== row || (editConfig.mode === 'cell' ? actived.column !== column : false) +} + +export function handleActivedCanActive({ editConfig, params }) { + return !editConfig.activeMethod || editConfig.activeMethod(params) +} + +export function handleActivedDoActive({ _vm, actived, canActive, cell, column, editConfig, event, params, row, tableColumn, type }) { + if (canActive) { + if (_vm.keyboardConfig || _vm.mouseConfig) { + _vm.clearCopyed(event) + _vm.clearChecked() + _vm.clearSelected(event) + } + + _vm.clostTooltip() + _vm.clearActived(event) + + type = 'edit-actived' + column.renderHeight = cell.offsetHeight + + actived.args = params + actived.row = row + actived.column = column + + if (editConfig.mode === 'row') { + tableColumn.forEach((column) => _vm._getColumnModel(row, column)) + } else { + _vm._getColumnModel(row, column) + } + + _vm.$nextTick(() => { + _vm.handleFocus(params, event) + }) + } + + return type +} + +export function handleActivedClearActive({ _vm, canActive, event }) { + if (!canActive) { + _vm.clearActived(event) + } +} + +export function handleActivedTryActive({ _vm, actived, cell, column, editor, event, isActiveCell, params, row }) { + if (editor && cell && !isActiveCell) { + let { column: oldColumn } = actived + + if (oldColumn !== column) { + let { model: oldModel } = oldColumn + + if (oldModel.update) { + setCellValue(row, oldColumn, oldModel.value) + } + + _vm.clearValidate() + } + + column.renderHeight = cell.offsetHeight + actived.args = params + actived.column = column + + setTimeout(() => { + _vm.handleFocus(params, event) + }) + } +} diff --git a/packages/grid/src/export/index.js b/packages/grid/src/export/index.js new file mode 100644 index 000000000..21a302cca --- /dev/null +++ b/packages/grid/src/export/index.js @@ -0,0 +1,20 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Methods from '@opentiny/vue-renderless/grid/plugins/export' +import TINYGrid from '../adapter' + +export default { + install(Table) { + TINYGrid._export = 1 + Object.assign(Table.methods, Methods) + } +} diff --git a/packages/grid/src/filter/index.js b/packages/grid/src/filter/index.js new file mode 100644 index 000000000..71d6e43af --- /dev/null +++ b/packages/grid/src/filter/index.js @@ -0,0 +1,21 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import TINYGrid from '../adapter' +import Panel from './src/panel' +import Methods from './src/methods' + +Panel.install = function (Table) { + TINYGrid._filter = 1 + Object.assign(Table.methods, Methods) +} + +export default Panel diff --git a/packages/grid/src/filter/src/methods.js b/packages/grid/src/filter/src/methods.js new file mode 100644 index 000000000..e2d7f9980 --- /dev/null +++ b/packages/grid/src/filter/src/methods.js @@ -0,0 +1,275 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import { isArray, isBoolean } from '@opentiny/vue-renderless/grid/static/' +import { getFilters, emitEvent } from '@opentiny/vue-renderless/grid/utils' +import { getDataset } from '@opentiny/vue-renderless/common/dataset' +import { hooks } from '@opentiny/vue-common' + +function getClassName(elem) { + if (elem && elem.nodeType) { + if (elem instanceof SVGElement) { + return elem.className.baseVal + } + + if (elem instanceof HTMLElement) { + return elem.className + } + } + + return '' +} + +function closest(elem, parentClassName) { + if (elem && elem.nodeType) { + let clsReg = new RegExp(`\\b${parentClassName}\\b`) + let matches + + do { + matches = getClassName(elem).match(clsReg) + + if (matches) { + return elem + } + + if (elem === document.body) { + break + } + } while ((elem = elem.parentNode)) + } + + return null +} + +const columnfilters = (visibleColumn) => { + const filters = {} + + visibleColumn.forEach((column) => { + let { property, filter } = column + + if (filter) { + const { + condition: { type, input, relation, value, empty } + } = filter + + if (type === 'input') { + filters[property] = { type, value: { text: input, relation } } + } else if (type === 'enum') { + filters[property] = { type, value } + } else if (type === 'empty') { + filters[property] = { type, value: empty } + } else if (type === 'custom') { + filters[property] = { type } + } else if (type === 'extend') { + filters[property] = { type, value } + } else if (type === 'extend1') { + filters[property] = { type, value } + } else if (type === 'extend2') { + filters[property] = { type, value } + } + + filter.hasFilter = value.length || input || input === 0 || empty !== null || type === 'custom' + } + }) + + return filters +} + +export default { + filter(field, callback) { + let column = this.getColumnByField(field) + let filters = column.filter.options + + if (callback) { + let rest = callback(filters) + + if (isArray(rest)) { + column.filters = getFilters(rest) + } + } + + return Promise.resolve(filters) + }, + getOptions({ property, filter }) { + const { values, value = 'value', label = 'label', dataset } = filter + + if (typeof values === 'function') { + return values({ property, filter }) + } else if (dataset) { + return getDataset({ dataset, service: this.$service }) + } else { + const newOptions = (values || []).map((item) => ({ + label: item[label], + value: item[value], + checked: !!item.checked + })) + + if (!values) { + const optionMap = {} + const tableData = this.getTableData() + + tableData.fullData.forEach((row) => { + const key = row[property] + + // 去重 + if (!optionMap[key]) { + newOptions.push({ value: key, label: key, checked: false }) + } + + optionMap[key] = true + }) + } + + return Promise.resolve(newOptions) + } + }, + + /** + * 点击筛选事件 + */ + triggerFilterEvent(event, column, params) { + let { filterStore } = this + let { filter } = column + let inputFilterRelation + + if (filterStore.id !== column.id && filterStore.visible) { + this.closeFilter() + } + + if (filter && typeof filter.inputFilter === 'object' && filter.inputFilter.relation) { + if (filter.condition.relation === 'equals' && filter.inputFilter.relation && !column.isInitTriggerFlag) { + inputFilterRelation = filter.inputFilter.relation + column.isInitTriggerFlag = true + } + + filter.condition.relation = inputFilterRelation || filter.condition.relation + } + + if (filterStore.column === column && filterStore.visible) { + filterStore.visible = false + } else { + let targetElem = event.target + let targetElemParentTr = closest(targetElem, 'tiny-grid-header__row') + + this.getOptions(column).then((options) => { + Object.assign(filterStore, { + args: params, + enumable: filter.enumable, + inputFilter: filter.inputFilter, + onResetInputFilter: filter.onResetInputFilter, + advancedFilter: filter.advancedFilter, + extends: filter.extends, + defaultFilter: isBoolean(filter.defaultFilter) ? filter.defaultFilter : true, + options: options.map(({ value, label }) => ({ value, label, checked: ~filter.condition.value.indexOf(value) })), + condition: { ...filter.condition }, + multi: isBoolean(filter.multi) ? filter.multi : true, + column, + visible: true, + targetElem: hooks.markRaw(targetElem), + targetElemParentTr: hooks.markRaw(targetElemParentTr), + id: column.id + }) + }) + } + }, + // 确认筛选 + confirmFilterEvent() { + let { visibleColumn, filterStore, scrollXLoad, scrollYLoad, remoteFilter, lastScrollLeft } = this + + filterStore.visible = false + + // 如果是服务端筛选,则跳过本地筛选处理 + if (!remoteFilter) { + this.handleTableData(true).then(this.refreshStyle) + } + + // 服务端请求参数 + const filters = columnfilters(visibleColumn) + + if (this.$grid.pagerConfig) { + this.$grid.pagerConfig.currentPage = 1 + } + + emitEvent(this, 'filter-change', [{ filters, $table: this }]) + this.updateFooter() + + // 表头过滤动作应保持水平滚动条位置不变 + let restoreScrollLeft = () => this.scrollTo(lastScrollLeft) + + if (scrollXLoad || scrollYLoad) { + scrollXLoad && this.clearScroll() // 滚动后过滤会错拉 + + if (scrollYLoad) { + this.updateScrollYSpace() + } + } + + this.closeFilter() + this.clearSelection() + this.$nextTick().then(this.recalculate).then(restoreScrollLeft) + }, + clearFilter(field) { + let column = arguments.length ? this.getColumnByField(field) : null + let filterStore = this.filterStore + const filterData = this.$grid?.filterData || {} + let handleClear = (column) => { + let { filter } = column + + if (filter) { + filter.condition = { + input: '', + relation: 'equals', + empty: null, + value: [] + } + filter.hasFilter = false + filter.custom = null + // 删除fetchData请求参数中的筛选参数 + delete filterData[column.property] + } + } + + if (column) { + handleClear(column) + } else { + this.visibleColumn.forEach(handleClear) + } + + if (!column || column !== filterStore.column) { + Object.assign(filterStore, { + style: null, + options: [], + column: null, + multi: false, + visible: false + }) + } + + field === true && emitEvent(this, 'filter-change', [{ filters: {}, $table: this }]) // 从reload执行过来的不发送事件 + + this.clearSelection() + + return this.updateData() + } +} diff --git a/packages/grid/src/filter/src/panel.jsx b/packages/grid/src/filter/src/panel.jsx new file mode 100644 index 000000000..cc9b7c092 --- /dev/null +++ b/packages/grid/src/filter/src/panel.jsx @@ -0,0 +1,653 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ + +import Radio from '../../radio' +import Button from '../../button' +import PopperJS from '@opentiny/vue-renderless/common/deps/popper' +import PopupManager from '@opentiny/vue-renderless/common/deps/popup-manager' +import { extend } from '@opentiny/vue-renderless/common/object' +import { t } from '@opentiny/vue-locale' +import { hooks, h, $prefix } from '@opentiny/vue-common' +import { iconCheck, iconCheckedSur, iconDefinedFiltration, iconLeftWard, iconDeltaDown } from '@opentiny/vue-icon' +import debounce from '@opentiny/vue-renderless/common/deps/debounce' + +function renderAdvancePanelAdvList({ _vm }) { + return _vm.showAdvList && _vm.showAdvItems ? ( +
    + {['等于', '不等于', '包含', '不包含', '开头是', '结尾是'].map((item) => ( +
  • {item}
  • + ))} +
+ ) : null +} + +function renderAdvancePanelButtons({ _vm }) { + return ( +
  • + + +
  • + ) +} + +function renderAdvancePanelRadios() { + return ( +
      +
    • + + And + + + Or + +
    • +
    + ) +} + +function renderAdvancePanelAdvHeader({ _vm, ArrowLeft }) { + return ( +
    { + _vm.showAdvance = false + _vm.showAdvItems = false + _vm.updatePanel() + }} + > + 自定义筛选方式 +
    + ) +} + +function renderAdvancePanelAdvRow({ _vm, DeltaDown }) { + return ( +
    + + + +
    + ) +} + +function renderInputArgs({ _vm, inputFilter }) { + let isAddbyProgram = false + + if (typeof inputFilter.relations_addby !== 'undefined') { + isAddbyProgram = inputFilter.relations_addby === 'program' + } + + let inputRelations + + if (isAddbyProgram) { + inputRelations = inputFilter.relations_backup + } else { + inputRelations = inputFilter.relations + } + + if (!inputRelations) { + inputRelations = [ + { label: _vm.i18n('ui.grid.filter.prefix'), value: 'startwith' }, + { label: _vm.i18n('ui.grid.filter.equal'), value: 'equals' }, + { label: _vm.i18n('ui.grid.filter.include'), value: 'contains' } + ] + } + + return { isAddbyProgram, inputRelations } +} + +function renderInputProps({ InputComponent, condition, event, inputFilter, isNativeInput, prop }) { + let inputProps = { + style: 'width:100%', + on: { + [event]: (value) => { + condition.input = value && value.target ? value.target.value : value + } + }, + ref: 'filterInputComponent' + } + + if (isNativeInput) { + inputProps = Object.assign(inputProps, { + domProps: { + [prop]: condition.input + }, + attrs: { + ...inputFilter.attrs + } + }) + } else { + InputComponent = hooks.toRaw(InputComponent) + inputProps = Object.assign(inputProps, { + props: { + ...inputFilter.attrs, + [prop]: condition.input + } + }) + } + + return { inputProps, InputComponent } +} + +function renderEnumableEmpty({ _vm }) { + return [
  • {_vm.i18n('ui.grid.emptyText')}
  • ] +} + +function renderEnumableOptions({ iconRender, _vm, filterStore }) { + return filterStore.options.map((item, index) => ( +
  • { + if (!filterStore.multi) { + // 单选 + filterStore.options.forEach((option) => { + option.checked = option === item + }) + _vm.filterEnum() + } else { + // 多选 + item.checked = !item.checked + } + }} + > + {filterStore.multi ? iconRender(item.checked, index) : null} + {item.label} +
  • + )) +} + +export default { + name: $prefix + 'GridFilter', + props: { + filterStore: Object, + optimizeOpts: Object + }, + inject: { + $grid: { + default: null + } + }, + watch: { + id() { + this.updatePanel() + }, + visible() { + this.showAdvance = false + this.updatePanel() + } + }, + data() { + return { + popperJS: null, + showAdvance: false, + showAdvItems: false, + listPopper: null + } + }, + render() { + const { filterStore, $grid, optimizeOpts } = this + let { args, column, options } = filterStore + + const quickFilter = [this.renderInput(), this.renderEnumable(), this.renderDefault(), this.renderExtends(), this.renderBase()] + + const map = { + filterActive: 'filter__active' + } + + return ( +
    + {filterStore.visible ? ( +
    + {column.slots && column.slots.filter + ? column.slots.filter({ + $grid, + values: options, + args, + context: this + }) + : quickFilter} +
    + ) : null} +
    + ) + }, + computed: { + condition() { + return this.filterStore.condition + }, + visible() { + return this.filterStore.visible + }, + id() { + return this.filterStore.id + }, + i18n() { + return t || this.$t + } + }, + methods: { + updatePanel: debounce(20, function() { + this.correctRelations() + + const inputFilter = this.filterStore.inputFilter + + if (inputFilter) { + const { relations } = inputFilter + + if (inputFilter !== true && !relations.filter((r) => r.value === this.condition.relation).length) { + this.resetInput() + } + } + + this.popperJS && this.popperJS.destroy() && (this.popperJS = null) + this.$nextTick(() => { + const { targetElemParentTr, id } = this.filterStore + const reference = targetElemParentTr && targetElemParentTr.querySelector(`svg.tiny-grid-filter__btn.${id}`) + const popper = this.$el + + popper.style.zIndex = PopupManager.nextZIndex() + + this.visible && + (this.popperJS = new PopperJS(reference, popper, { + placement: 'bottom-end' + }).update()) + }) + }), + renderBase() { + return ( + + ) + }, + renderDefault() { + const { condition, filterStore } = this + + if (!filterStore.defaultFilter) { + return null + } + + return ( + + ) + }, + renderExtends() { + const { filterStore } = this + + if (!filterStore.extends) { + return null + } + + return ( +
      + {filterStore.extends.map((item) => ( +
    • { + this.filterExtends(item) + }} + > + {item.label} +
    • + ))} +
    + ) + }, + renderAdvance() { + const DefinedFiltration = iconDefinedFiltration() + const { filterStore } = this + + if (!filterStore.advancedFilter) { + return null + } + + return ( + + ) + }, + renderAdvancePanel() { + const ArrowLeft = iconLeftWard() + const DeltaDown = iconDeltaDown() + + if (!this.showAdvance) { + return null + } + + let _vm = this + + const AdvRow = renderAdvancePanelAdvRow({ _vm, DeltaDown }) + + return ( +
    + {renderAdvancePanelAdvHeader({ _vm, ArrowLeft })} + + {renderAdvancePanelRadios()} + + {renderAdvancePanelButtons({ _vm })} + {renderAdvancePanelAdvList({ _vm })} +
    + ) + }, + renderInput() { + this.correctRelations() + const { condition, filterStore } = this + const { inputFilter } = filterStore + + if (!inputFilter) return null + + let { isAddbyProgram, inputRelations } = renderInputArgs({ _vm: this, inputFilter }) + let InputComponent = inputFilter.component || 'input' + const isNativeInput = InputComponent === 'input' + const model = InputComponent.model || {} + const prop = isNativeInput ? 'value' : model.prop || 'modelValue' + const event = isNativeInput ? 'input' : model.event || 'update:modelValue' + let ret = renderInputProps({ InputComponent, condition, event, inputFilter, isNativeInput, prop }) + let inputProps = ret.inputProps + InputComponent = ret.InputComponent + + return ( +
      + {isAddbyProgram ? null : ( +
    • + {inputRelations.map(({ label, value, method }) => ( + { + condition.relation = value + condition.method = + method || + function() { + return true + } + }} + > + {label} + + ))} +
    • + )} +
    • {h(InputComponent, inputProps)}
    • +
    • + + + +
    • +
    + ) + }, + renderEnumable() { + const { filterStore } = this + + if (!filterStore.enumable) return null + + const CheckedSur = iconCheckedSur() + const Check = iconCheck() + + const iconRender = function(checked, index) { + const props = { + class: 'tiny-svg-size', + tabindex: index + } + return checked ? : + } + + return ( +
    +
      + {!filterStore.options.length ? renderEnumableEmpty({ _vm: this }) : renderEnumableOptions({ iconRender, _vm: this, filterStore })} +
    + {filterStore.multi ? ( +
    + + +
    + ) : null} +
    + ) + }, + showAdvList(e) { + this.showAdvItems = true + this.listPopper && this.listPopper.destroy() && (this.listPopper = null) + + this.$nextTick(() => { + const reference = e.target + const popper = this.$refs.advlist + + popper.style.zIndex = PopupManager.nextZIndex() + this.listPopper = new PopperJS(reference, popper, { + placement: 'bottom-start' + }).update() + }) + }, + hideAdvList() { + this.listPopper && this.listPopper.destroy() && (this.listPopper = null) + this.showAdvItems = false + }, + renderSlot(h) { + let { $parent: $table, filterStore } = this + let { args, column } = filterStore + let { slots } = column + + if (slots && slots.filter) { + return slots.filter.call($table, { $table, context: this, ...args }, h) + } + }, + // 全部筛选事件 + filterCheckAllEvent(event, value) { + let filterStore = this.filterStore + + filterStore.options.forEach((item) => { + item.checked = value + }) + + filterStore.isAllSelected = value + filterStore.isIndeterminate = false + }, + // 筛选发生改变 check 是否检查默认值的有效性,当自定义relations时,需要检查 + resetInput() { + this.correctRelations() + + const { inputFilter, onResetInputFilter } = this.filterStore + + if (inputFilter) { + const { relations, relation } = this.filterStore.inputFilter + + this.condition.input = '' + + if (typeof onResetInputFilter === 'function') { + onResetInputFilter(this.$refs.filterInputComponent) + } + + let defaultrelation = 'equals' + let relationValues + let relationValue + + if (Array.isArray(relations) && relations.length) { + this.condition.method = relations[0].method + defaultrelation = relations[0].value || 'equals' + + for (let i = 0; i < relations.length; i++) { + if (relations[i].value === 'equals') { + defaultrelation = 'equals' + break + } + } + + relationValues = relations.map((r) => r.value) + + if (relation && ~relationValues.indexOf(relation)) { + relationValue = relation + } + } + + this.condition.relation = relationValue || defaultrelation + } + }, + // 确认筛选 + confirmFilter(type) { + let { + filterStore: { column } + } = this + + this.condition.type = type + column.filter.condition = extend(true, {}, this.condition) + this.$parent.confirmFilterEvent() + }, + // 对外的暴露自定义提交方法 + commitFilter() { + let { + filterStore: { column } + } = this + + column.filter.condition.type = 'custom' + this.$parent.confirmFilterEvent() + }, + // 重置当前列筛选 + resetFilter() { + this.condition.value = null + this.condition.input = '' + this.condition.empty = null + this.condition.value = [] + this.condition.type = null + this.resetInput() + this.confirmFilter() + }, + // 清除所有列筛选 + clearFilter() { + this.$parent.clearFilter(true) + }, + filterNull(empty) { + this.condition.value = [] + this.condition.input = '' + this.condition.empty = empty + this.confirmFilter('empty') + }, + filterExtends(item) { + this.condition.value = item.value || item.label + this.condition.method = item.method + this.confirmFilter('extend') + }, + filterInput() { + this.condition.value = [] + this.condition.empty = null + this.confirmFilter('input') + }, + filterEnum() { + this.condition.input = '' + this.condition.empty = null + this.condition.value = this.filterStore.options.filter((item) => item.checked).map((check) => check.value) + this.confirmFilter('enum') + }, + close() { + let { filterStore } = this + + filterStore.visible = false + }, + correctRelations() { + if (this.filterStore && typeof this.filterStore.inputFilter === 'object') { + const relations = this.filterStore.inputFilter.relations + const relation = this.filterStore.inputFilter.relation || 'equals' + + if (!relations || (Array.isArray(relations) && relations.length === 0)) { + this.filterStore.inputFilter.relations = [{ label: relation, value: relation }] + this.filterStore.inputFilter.relations_addby = 'program' + this.filterStore.inputFilter.relations_backup = relations + } + } + } + }, + setup() { + const instance = hooks.getCurrentInstance().proxy + + hooks.onBeforeUnmount(() => { + instance.popperJS && instance.popperJS.destroy() && (instance.popperJS = null) + }) + } +} diff --git a/packages/grid/src/footer/index.js b/packages/grid/src/footer/index.js new file mode 100644 index 000000000..4f71716b4 --- /dev/null +++ b/packages/grid/src/footer/index.js @@ -0,0 +1,32 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ + +import Footer from './src/footer' + +Footer.install = function (Vue) { + Vue.component(Footer.name, Footer) +} + +export default Footer diff --git a/packages/grid/src/footer/src/footer.js b/packages/grid/src/footer/src/footer.js new file mode 100644 index 000000000..0acf8b276 --- /dev/null +++ b/packages/grid/src/footer/src/footer.js @@ -0,0 +1,283 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ + +import { isFunction } from '@opentiny/vue-renderless/grid/static/' +import { getClass, emitEvent, formatText, updateCellTitle } from '@opentiny/vue-renderless/grid/utils' +import { isNull } from '@opentiny/vue-renderless/common/type' +import { h, $prefix } from '@opentiny/vue-common' + +const classMap = { + fixedHidden: 'fixed__hidden', + colEllipsis: 'col__ellipsis', + filterActive: 'filter__active', + cellSummary: 'cell__summary' +} + +function doFooterSpan({ attrs, footerData, footerSpanMethod, params }) { + if (footerSpanMethod) { + let { rowspan = 1, colspan = 1 } = footerSpanMethod({ data: footerData, ...params }) || {} + + if (!rowspan || !colspan) { + return null + } + + attrs.rowspan = rowspan + attrs.colspan = colspan + } +} + +function addListenerDblclick({ $table, params, tableListeners, tfOns }) { + if (tableListeners['footer-cell-dblclick']) { + tfOns.dblclick = (event) => { + emitEvent($table, 'footer-cell-dblclick', [{ cell: event.currentTarget, ...params }, event]) + } + } +} + +function addListenerClick({ $table, params, tableListeners, tfOns }) { + if (tableListeners['footer-cell-click']) { + tfOns.click = (event) => { + emitEvent($table, 'footer-cell-click', [{ cell: event.currentTarget, ...params }, event]) + } + } +} + +function addListenerMouseout({ $table, showTooltip, tfOns }) { + if (showTooltip) { + tfOns.mouseout = () => { + $table.clostTooltip() + } + } +} + +function addListenerMouseover({ $table, params, showTitle, showTooltip, tfOns }) { + if (showTitle || showTooltip) { + tfOns.mouseover = (event) => { + if (showTitle) { + updateCellTitle(event) + } else if (showTooltip) { + $table.triggerFooterTooltipEvent(event, params) + } + } + } +} + +function renderColgroup(tableColumn) { + return h( + 'colgroup', + { ref: 'colgroup' }, + tableColumn.map((column, columnIndex) => h('col', { attrs: { name: column.id }, key: columnIndex })).concat([h('col', { attrs: { name: 'col_gutter' } })]) + ) +} + +const renderfoots = (opt) => { + const { $table, allAlign, allColumnOverflow, allFooterAlign, buildParamFunc, columnKey, fixedType } = opt + const { footerCellClassName, footerData, footerRowClassName, footerSpanMethod, overflowX, tableColumn, tableListeners } = opt + return (list, $rowIndex) => + h( + 'tr', + { + class: [ + 'tiny-grid-footer__row', + footerRowClassName ? (isFunction(footerRowClassName) ? footerRowClassName({ $table, $rowIndex, fixed: fixedType }) : footerRowClassName) : '' + ] + }, + tableColumn + .map((column, $columnIndex) => { + const arg1 = { $columnIndex, $rowIndex, $table, allAlign, allColumnOverflow, allFooterAlign } + const arg2 = { column, fixedType, footerData, footerSpanMethod, overflowX, tableListeners } + const { attrs, columnIndex, fixedHiddenColumn, footAlign, footerClassName, hasEllipsis, params, tfOns } = buildParamFunc(Object.assign(arg1, arg2)) + return h( + 'td', + { + class: [ + 'tiny-grid-footer__column', + column.id, + { + [`col__${footAlign}`]: footAlign, + [classMap.fixedHidden]: fixedHiddenColumn, + [classMap.colEllipsis]: hasEllipsis, + [classMap.filterActive]: column.filter && column.filter.hasFilter + }, + getClass(footerClassName, params), + getClass(footerCellClassName, params) + ], + attrs, + on: tfOns, + key: columnKey ? column.id : columnIndex + }, + [ + h( + 'div', + { + class: ['tiny-grid-cell', { [classMap.cellSummary]: $table.summaryConfig }] + }, + formatText(list[$table.tableColumn.indexOf(column)], 1) + ) + ] + ) + }) + .concat([h('td', { class: 'col__gutter' })]) + ) +} + +function renderTfoot(opt) { + return h('tfoot', { ref: 'tfoot' }, opt.footerData.map(renderfoots(opt))) +} + +export default { + name: `${$prefix}GridFooter`, + props: { + fixedColumn: Array, + fixedType: String, + footerData: Array, + size: String, + tableColumn: Array, + visibleColumn: Array + }, + mounted() { + let { $el, $parent: $table, $refs, fixedType } = this + let { elemStore } = $table + let keyPrefix = `${fixedType || 'main'}-footer-` + + elemStore[`${keyPrefix}wrapper`] = $el + elemStore[`${keyPrefix}table`] = $refs.table + elemStore[`${keyPrefix}colgroup`] = $refs.colgroup + elemStore[`${keyPrefix}list`] = $refs.tfoot + elemStore[`${keyPrefix}x-space`] = $refs.xSpace + }, + render() { + let { $parent: $table, buildParamFunc, fixedColumn, fixedType, footerData, tableColumn } = this + let { align: allAlign, columnKey, footerAlign: allFooterAlign, footerCellClassName, footerRowClassName, footerSpanMethod } = $table + let { overflowX, scrollXLoad, showOverflow: allColumnOverflow, tableLayout, tableListeners } = $table + + // 如果是使用优化模式 + if (fixedType && allColumnOverflow) { + tableColumn = fixedColumn + } + if (fixedType && !allColumnOverflow && scrollXLoad) { + tableColumn = fixedColumn + } + + let tableAttrs = { cellspacing: 0, cellpadding: 0, border: 0 } + let colgroupVNode = renderColgroup(tableColumn) + let arg1 = { $table, allAlign, allColumnOverflow, allFooterAlign, buildParamFunc, columnKey, fixedType } + let arg2 = { footerCellClassName, footerData, footerRowClassName, footerSpanMethod, overflowX, tableColumn, tableListeners } + let tfootVNode = renderTfoot(Object.assign(arg1, arg2)) + + return h( + 'div', + { + class: ['tiny-grid__footer-wrapper', fixedType ? `fixed-${fixedType}__wrapper` : 'body__wrapper'], + on: { scroll: this.scrollEvent } + }, + [ + fixedType ? [null] : h('div', { class: 'tiny-grid-body__x-space', ref: 'xSpace' }), + h( + 'table', + { + class: 'tiny-grid__footer', + style: { tableLayout }, + attrs: tableAttrs, + ref: 'table' + }, + [ + // 列宽 + colgroupVNode, + // 底部 + tfootVNode + ] + ) + ] + ) + }, + methods: { + scrollEvent(event) { + // 滚动处理: 如果存在列固定左侧,同步更新滚动状态;如果存在列固定右侧,同步更新滚动状态。 + let { $parent: $table, fixedType } = this + let { $refs, lastScrollLeft, scrollXLoad } = $table + let { tableBody, tableFooter, tableHeader } = $refs + let headerElem = tableHeader ? tableHeader.$el : null + let bodyElem = tableBody ? tableBody.$el : null + let footerElem = tableFooter ? tableFooter.$el : null + let scrollLeft = footerElem.scrollLeft + let isX = scrollLeft !== lastScrollLeft + let setElemScrollLeft = (elem, scrollLeft) => { + if (elem) { + elem.scrollLeft = scrollLeft + } + } + let eventParams = [{ $table, fixed: fixedType, isX, isY: false, scrollLeft, scrollTop: bodyElem.scrollTop, type: 'footer' }, event] + + $table.lastScrollTime = Date.now() + $table.lastScrollLeft = scrollLeft + + setElemScrollLeft(headerElem, scrollLeft) + setElemScrollLeft(bodyElem, scrollLeft) + + if (scrollXLoad && isX) { + $table.triggerScrollXEvent(event) + } + + emitEvent($table, 'scroll', eventParams) + }, + buildParamFunc(opt) { + let { $columnIndex, $rowIndex, $table, allAlign, allColumnOverflow, allFooterAlign } = opt + let { column, fixedType, footerData, footerSpanMethod, overflowX, tableListeners } = opt + let { showOverflow, footerAlign, align, footerClassName } = column + let isColGroup = column.children && column.children.length + let fixedHiddenColumn = fixedType ? column.fixed !== fixedType && !isColGroup : column.fixed && overflowX + let cellOverflowValue = isNull(showOverflow) ? allColumnOverflow : showOverflow + let footAlign = footerAlign || align || allFooterAlign || allAlign + let isShowEllipsis = cellOverflowValue === 'ellipsis' + let isShowTitle = cellOverflowValue === 'title' + let showTooltip = cellOverflowValue === true || cellOverflowValue === 'tooltip' + let hasEllipsis = isShowTitle || showTooltip || isShowEllipsis + let attrs = { 'data-colid': column.id } + let tfOns = {} + let columnIndex = $table.getColumnIndex(column) + let params = { + $table, + $rowIndex, + column, + columnIndex, + $columnIndex, + fixed: fixedType + } + + addListenerMouseover({ $table, params, showTitle: isShowTitle, showTooltip, tfOns }) + + addListenerMouseout({ $table, showTooltip, tfOns }) + + addListenerClick({ $table, params, tableListeners, tfOns }) + + addListenerDblclick({ $table, params, tableListeners, tfOns }) + // 处理行或者列的合并 + doFooterSpan({ attrs, footerData, footerSpanMethod, params }) + + return { attrs, columnIndex, fixedHiddenColumn, footAlign, footerClassName, hasEllipsis, params, tfOns } + } + } +} diff --git a/packages/grid/src/grid/grid.js b/packages/grid/src/grid/grid.js new file mode 100644 index 000000000..a20fa5321 --- /dev/null +++ b/packages/grid/src/grid/grid.js @@ -0,0 +1,667 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ + +import { getObj } from '@opentiny/vue-renderless/common/object' +import { isBoolean, slice } from '@opentiny/vue-renderless/grid/static/' +import { removeClass, addClass } from '@opentiny/vue-renderless/common/deps/dom' +import { getDataset } from '@opentiny/vue-renderless/common/dataset' +import { getListeners, emitEvent } from '@opentiny/vue-renderless/grid/utils' +import { extend } from '@opentiny/vue-renderless/common/object' +import { h, hooks, emitter, $prefix } from '@opentiny/vue-common' +import Modal from '@opentiny/vue-modal' +import Pager from '@opentiny/vue-pager' +import { Buttons } from '../adapter' +import { error } from '../tools' +import Table from '../table' +import GlobalConfig from '../config' +import methods, { setBodyRecords, invokeSaveDataApi, doRemoveOrShowMsg } from './methods' + +const propKeys = Object.keys(Table.props) + +function getRenderedToolbar({ $slots, _vm, loading, tableLoading, toolbar }) { + return (_vm.renderedToolbar = (() => { + let res = null + + if ($slots.toolbar) { + res = $slots.toolbar() + } else if (toolbar) { + res = h(hooks.toRaw(toolbar.component), { + ref: 'toolbar', + props: { loading: loading || tableLoading, ...toolbar } + }) + } + + return res + })()) +} + +function renderPager({ $slots, _vm, loading, pager, pagerConfig, tableLoading, vSize }) { + let res = null + if ($slots.pager) { + res = $slots.pager() + } else if (pager) { + pager.component = pager.component || Pager + res = h(hooks.toRaw(pager.component), { + props: { + size: vSize, + loading: loading || tableLoading, + isBeforePageChange: _vm.isBeforePageChange || _vm.showSaveMsg, + accurateJumper: _vm.autoLoad, + ...pagerConfig + }, + on: { + 'size-change': _vm.pageSizeChange, + 'current-change': _vm.pageCurrentChange, + 'before-page-change': _vm.beforePageChangeHandler + }, + ref: 'pager' + }) + } + + return res +} + +const createRender = (opt) => { + const { h, _vm, vSize, props, selectToolbar, $slots, tableOns, renderedToolbar, loading, pagerConfig, pager, tableLoading } = opt + return h( + 'div', + { + class: [ + 'tiny-grid__wrapper', + { + [`size__${vSize}`]: vSize, + 'tiny-grid__animat': props.optimization.animat + } + ] + }, + [ + selectToolbar ? null : renderedToolbar, + h('tiny-grid-table', { props, on: tableOns, ref: 'tinyTable' }, $slots.default && $slots.default()), + renderPager({ + $slots, + _vm, + loading, + pager, + pagerConfig, + tableLoading, + vSize + }) + ] + ) +} + +export default { + name: `${$prefix}Grid`, + components: { + TinyGridTable: Table + }, + provide() { + return { $grid: this } + }, + props: { + columns: Array, + proxyConfig: Object, + fetchData: Object, + saveData: Object, + deleteData: Object, + toolbar: Object, + pager: Object, + dataset: Object, + autoLoad: { + type: Boolean, + default: true + }, + seqSerial: { + type: Boolean, + default: false + }, + events: Object, + ...Table.props, + isBeforePageChange: Boolean, + showSaveMsg: { + type: Boolean, + default: false + }, + isMultipleHistory: Boolean, + selectToolbar: [Boolean, Object] + }, + data() { + return { + emitter: emitter(), + fetchOption: null, + filterData: [], + listeners: {}, + pagerConfig: null, + pendingRecords: [], + seqIndex: this.startIndex, + sortData: {}, + tableCustoms: [], + tableData: [], + tableLoading: false, + tablePage: { + total: 0, + pageSize: 10, + currentPage: 1 + }, + toolBarVm: null + } + }, + computed: { + isMsg() { + return this.proxyOpts.message !== false + }, + tableProps() { + let rest = {} + propKeys.forEach((key) => (rest[key] = this[key])) + return rest + }, + proxyOpts() { + return extend(true, {}, GlobalConfig.grid.proxyConfig, this.proxyConfig) + }, + vSize() { + return this.size || (this.$parent && this.$parent.size) || (this.$parent && this.$parent.vSize) + } + }, + watch: { + columns(cols) { + this.loadColumn(cols) + }, + startIndex(value) { + this.seqIndex = value + }, + tableCustoms() { + this.toolbar && this.$refs.toolbar && this.$refs.toolbar.loadStorage() + } + }, + created() { + this.fetchOption = this.initFetchOption() + this.pagerConfig = this.initPagerConfig() + + let { customs, events } = this + + if (customs) { + this.tableCustoms = customs + } + + if (events) { + const listeners = {} + + for (let event in events) { + if (Object.prototype.hasOwnProperty.call(events, event)) { + let evkey = event.replace(/\B([A-Z])/g, '-$1').toLowerCase() + + listeners[evkey] = events[event] + + if (~['pageChange', 'sortChange', 'filterChange', 'toolbarButtonClick'].indexOf(event)) { + this.emitter.on(evkey, events[event]) + } + } + } + + this.listeners = listeners + } + }, + mounted() { + let { columns, fetchOption, autoLoad, pagerSlot } = this + + // pager插槽中内置pager组件事件处理 + if (pagerSlot) { + const { + componentOptions: { listeners = {} }, + componentInstance + } = pagerSlot + + if (!listeners['size-change']) { + componentInstance.$on('size-change', this.pageSizeChange) + } + + if (!listeners['current-change']) { + componentInstance.$on('current-change', this.pageCurrentChange) + } + } + + if (columns && columns.length) { + this.loadColumn(this.columns) + } + + if (fetchOption && autoLoad !== false) { + this.commitProxy('query', this.toolBarVm && this.toolBarVm.orderSetting()) + } + + if (this.isMultipleHistory) { + this.initMultipleHistory() + } + }, + setup(props, { slots, listeners, attrs }) { + const tableListeners = getListeners(attrs, listeners) + + return { slots, tableListeners } + }, + render() { + let { editConfig, fetchOption, listeners, loading, optimization, pager, pagerConfig, remoteFilter, remoteSort, selectToolbar } = this + let { seqIndex, slots: $slots, tableCustoms, tableData, tableListeners, tableLoading, tableProps, toolbar, vSize } = this + let optimizOpt = { ...GlobalConfig.optimization, ...optimization } + let props = { ...tableProps, optimization: optimizOpt, startIndex: seqIndex } + let tableOns = { ...listeners, ...tableListeners } + let { handleRowClassName: rowClassName, sortChangeEvent, filterChangeEvent } = this + + fetchOption && Object.assign(props, { loading: loading || tableLoading, data: tableData, rowClassName }) + fetchOption && remoteSort && (tableOns['sort-change'] = sortChangeEvent) + fetchOption && remoteFilter && (tableOns['filter-change'] = filterChangeEvent) + + toolbar && !(toolbar.setting && toolbar.setting.storage) && (props.customs = tableCustoms) + toolbar && (tableOns['update:customs'] = (value) => (this.tableCustoms = value)) + + let editConfigOpt = { trigger: 'click', mode: 'cell', showStatus: true, ...editConfig } + + editConfig && (props.editConfig = Object.assign(editConfigOpt, { activeMethod: this.handleActiveMethod })) + + let renderedToolbar = getRenderedToolbar({ $slots, _vm: this, loading, tableLoading, toolbar }) + + return createRender({ h, _vm: this, vSize, props, selectToolbar, renderedToolbar, tableOns, $slots, loading, pager, pagerConfig, tableLoading }) + }, + methods: { + ...methods, + initPagerConfig() { + let { $slots, fetchOption, scrollLoad = {} } = this + let pagerProps = {} + + if (fetchOption) { + let pagerSlot = $slots.pager && $slots.pager[0] + + if (pagerSlot) { + let { componentOptions, children } = pagerSlot + + if (componentOptions && !children) { + this.pagerSlot = pagerSlot + pagerProps = componentOptions.propsData + } + } else if (this.pager) { + pagerProps = this.pager.attrs + } + + if (this.pager || $slots.pager || this.scrollLoad) { + return Object.assign(this.tablePage, { pageSize: scrollLoad.pageSize }, pagerProps) + } + + return fetchOption.args && fetchOption.args.page + } + }, + initFetchOption() { + let { fetchData = {}, dataset = {} } = this + + if (fetchData.api || dataset.source || dataset.value || dataset.api) { + let { loading, fields, api } = fetchData || dataset.source || dataset.api || {} + + return { api, dataset, fields, loading } + } + }, + getParentHeight() { + let { $el, $refs } = this + + return $el.parentNode.clientHeight - ($refs.toolbar ? $refs.toolbar.$el.clientHeight : 0) - ($refs.pager?.$el ? $refs.pager.$el.clientHeight : 0) + }, + handleRowClassName(params) { + let rowClassName = this.rowClassName + let clss = [] + + if (this.pendingRecords.some((item) => item === params.row)) { + clss.push('row__pending') + } + + return clss.concat(rowClassName ? rowClassName(params) : []) + }, + handleActiveMethod(params) { + return !~this.pendingRecords.indexOf(params.row) && (!this.editConfig.activeMethod || this.editConfig.activeMethod(params)) + }, + handleFetch(code, sortArg) { + let { pager, sortData, filterData, pagerConfig, fetchOption, fetchData, dataset } = this + this.clearRadioRow() + this.resetScrollTop() + if (!fetchOption) { + error('ui.grid.error.notQuery') + return this.$nextTick() + } + let { args, loading } = fetchData || dataset.source || dataset.api || {} + let { field, order, prop, property } = sortData + let sortByData = { field, order, prop, property } + let params = { + $grid: this, + sort: sortData, + sortBy: sortByData, + filters: filterData, + ...args + } + let search + this.tableLoading = loading + if (pagerConfig) { + params.page = pagerConfig + } + if (code === 'reload') { + if (pager || args.page) { + pagerConfig.currentPage = 1 + } + this.sortData = params.sort = {} + this.filterData = params.filters = [] + this.pendingRecords = [] + this.clearAll() + } + if (sortArg && sortArg.length > 0) { + params.sortBy = sortArg + } + if (fetchData && fetchData.api) { + search = fetchData.api.apply(this, [params]) + } else { + search = getDataset({ dataset, service: this.$service }, params) + } + return search.then(this.loadFetchData).catch((error) => { + this.tableLoading = false + throw error + }) + }, + loadFetchData(rest) { + if (!rest) { + this.tableData = [] + this.tableLoading = false + return + } + + let { + fetchOption: { fields = {} }, + pagerConfig, + pagerSlot + } = this + + if (pagerConfig && !Array.isArray(rest)) { + let total = getObj(rest, fields.total || 'page.total') || rest?.result?.length || 0 + let data = getObj(rest, fields.result || fields.data || 'result') || [] + + this.tableData = data + pagerConfig.total = total + // 内置pager + let setTotal = pagerSlot && pagerSlot.componentInstance.setTotal + + setTotal && setTotal(total) + } else { + this.tableData = (fields.list ? getObj(rest, fields.list) : rest) || [] + } + + if ((this.seqSerial || this.scrollLoad) && pagerConfig) { + this.seqIndex = (pagerConfig.currentPage - 1) * pagerConfig.pageSize + } + + this.tableLoading = false + }, + handleSave(code, args) { + let { saveData, isMsg } = this + + if (!saveData) { + error('ui.grid.error.notSave') + return + } + + let body = extend(true, { pendingRecords: this.pendingRecords }, this.getRecordset()) + let { insertRecords, removeRecords, updateRecords, pendingRecords } = body + let validRows = insertRecords.concat(updateRecords) + let getCallback = (resolve) => (valid) => { + if (!valid) { + resolve(valid) + return + } + + let canInvoke = invokeSaveDataApi({ _vm: this, args, body, code, removeRecords, resolve, saveData, updateRecords, valid }) + + doRemoveOrShowMsg({ _vm: this, canInvoke, code, isMsg, pendingRecords, resolve, valid }) + } + + // 排除掉新增且标记为删除的数据,排除已标记为删除的数据 + setBodyRecords({ body, insertRecords, pendingRecords }) + + // 只校验新增和修改的数据 + return new Promise((resolve) => { + this.validate(validRows, getCallback(resolve)) + }) + }, + handleDelete(code, args) { + let { deleteData, isMsg } = this + + if (!deleteData) { + error('ui.grid.error.notDelete') + return + } + + let selecteds = this.getSelectRecords(true) + let afterRemove = () => { + let removeds = this.getRemoveRecords() + + if (!removeds.length && isMsg && !selecteds.length) { + Modal.message({ + id: code, + message: GlobalConfig.i18n('ui.grid.selectOneRecord'), + status: 'warning' + }) + } + + if (removeds.length) { + let apiArgs = [{ $grid: this, changeRecords: { removeRecords: removeds } }, ...args] + let stopLoading = () => { + this.tableLoading = false + } + + this.tableLoading = true + + return deleteData.api + .apply(this, apiArgs) + .then(stopLoading) + .catch(stopLoading) + .then(() => this.commitProxy('reload')) + } + } + + this.remove(selecteds).then(afterRemove) + }, + handleFullScreen([show]) { + const cls = 'tiny-fullscreen-full' + + show ? addClass(this.$el, cls) : removeClass(this.$el, cls) + + this.recalculate(true) + + emitEvent(this, 'fullscreen', show) + this.emitter.emit('fullscreen', show) + }, + commitProxy(code) { + let btnMethod = Buttons.get(code) + let args = slice(arguments, 1) + + if (code === 'insert') { + this.insert() + } else if (code === 'insert_actived') { + this.insert().then(({ row }) => this.setActiveRow(row)) + } else if (code === 'mark_cancel') { + this.triggerPendingEvent(code) + } else if (code === 'delete_selection') { + this.handleDeleteRow(code, 'ui.grid.deleteSelectRecord', () => this.commitProxy.apply(this, ['delete'].concat(args))) + } else if (code === 'remove_selection') { + this.handleDeleteRow(code, 'ui.grid.removeSelectRecord', () => this.removeSelecteds()) + } else if (code === 'export') { + this.exportCsv() + } else if (code === 'reset_custom') { + this.resetAll() + } else if (~['reload', 'query'].indexOf(code)) { + this.handleFetch(code, args) + } else if (code === 'delete') { + this.handleDelete(code, args) + } else if (code === 'save') { + this.handleSave() + } else if (code === 'fullscreen') { + this.handleFullScreen(args) + } else if (btnMethod) { + btnMethod.call(this, { code, $grid: this }, ...args) + } + + return this.$nextTick() + }, + handleDeleteRow(code, i18nKey, callback) { + let selecteds = this.getSelectRecords() + + if (this.isMsg && selecteds.length) { + Modal.confirm(GlobalConfig.i18n(i18nKey)).then((type) => { + type === 'confirm' && callback() + }) + } + + if (this.isMsg && !selecteds.length) { + Modal.message({ + id: code, + message: GlobalConfig.i18n('ui.grid.selectOneRecord'), + status: 'warning' + }) + } + + if (!this.isMsg && selecteds.length) { + callback() + } + }, + getPendingRecords() { + return this.pendingRecords + }, + triggerToolbarBtnEvent(button, event) { + let { events = {}, tableListeners } = this + let { code } = button + + if (!events.toolbarButtonClick && !tableListeners['toolbar-button-click']) { + this.commitProxy(code, event) + } + + emitEvent(this, 'toolbar-button-click', [{ code, button, $grid: this }, event]) + + this.emitter.emit('toolbar-button-click', { code, button, $grid: this }, event) + }, + triggerPendingEvent(code) { + let { isMsg, pendingRecords: pendings } = this + let selectColumn = this.getColumns().filter((col) => ~['selection', 'radio'].indexOf(col.type)) + let isSelection = selectColumn.length && selectColumn[0].type === 'selection' + let isRadio = selectColumn.length && selectColumn[0].type === 'radio' + let selecteds = isSelection ? this.getSelectRecords(true) : isRadio ? [this.getRadioRow()] : [] + + if (!selecteds.length && isMsg) { + Modal.message({ + id: code, + message: GlobalConfig.i18n('ui.grid.selectOneRecord'), + status: 'warning' + }) + } + + if (selecteds.length) { + let { plus = [], minus = [], tmp } = {} + + selecteds.forEach((data) => { + let selectedPending = pendings.some((item) => data === item) + + tmp = selectedPending ? minus : plus + tmp.push(data) + }) + + tmp = minus.length ? pendings.filter((item) => !~minus.indexOf(item)) : pendings + this.pendingRecords = tmp.concat(plus) + + isSelection && this.clearSelection() + isRadio && this.clearRadioRow() + } + }, + pageChangeEvent(params) { + let eventParams = extend(false, { $grid: this }, params) + + emitEvent(this, 'page-change', eventParams) + this.emitter.emit('page-change', eventParams) + this.commitProxy('query', this.toolBarVm && this.toolBarVm.orderSetting()) + }, + // size为页大小,load为false则触发change事件与查询,在个性化初始化时根据autoload控制是否加载数据 + pageSizeChange(size, load) { + this.tablePage.pageSize = size + this.tablePage.currentPage = 1 + load || this.pageChangeEvent(this.tablePage) + }, + pageCurrentChange(current) { + this.tablePage.currentPage = current + this.pageChangeEvent(this.tablePage) + }, + beforePageChangeHandler(params) { + if (!this.showSaveMsg) { + let eventParams = extend(false, { $grid: this }, params) + + emitEvent(this, 'before-page-change', eventParams) + this.emitter.emit('before-page-change', eventParams) + + return + } + + let { callback, rollback } = params + let { insertRecords, removeRecords, updateRecords } = this.getRecordset() + + if (insertRecords.length || removeRecords.length || updateRecords.length) { + let next = (res) => { + if (res === 'confirm') { + rollback && rollback() + emitEvent(this, 'cancel-page-change', this) + this.emitter.emit('cancel-page-change', this) + } else { + callback && callback() + } + } + + Modal.confirm(GlobalConfig.i18n('ui.grid.isSaveMsg')).then(next) + } else { + callback && callback() + } + }, + sortChangeEvent(params) { + let remoteSort = this.remoteSort + let column = params.column + let eventParams = extend(false, { $grid: this }, params) + // 如果是服务端排序 + if (isBoolean(column.remoteSort) ? column.remoteSort : remoteSort) { + this.sortData = params + this.tablePage.currentPage = 1 + this.commitProxy('query') + } + + emitEvent(this, 'sort-change', eventParams) + this.emitter.emit('sort-change', eventParams) + }, + filterChangeEvent(params) { + let eventParams = extend(false, { $grid: this }, params) + // 如果是服务端过滤 + if (this.remoteFilter) { + this.filterData = params.filters + this.commitProxy('query') + } + + emitEvent(this, 'filter-change', eventParams) + this.emitter.emit('filter-change', eventParams) + } + } +} diff --git a/packages/grid/src/grid/methods.js b/packages/grid/src/grid/methods.js new file mode 100644 index 000000000..bb613b244 --- /dev/null +++ b/packages/grid/src/grid/methods.js @@ -0,0 +1,88 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Modal from '@opentiny/vue-modal' +import GlobalConfig from '../config' +import Table from '../table' + +export function setBodyRecords({ body, insertRecords, pendingRecords }) { + if (insertRecords.length) { + body.pendingRecords = pendingRecords.filter((row) => insertRecords.indexOf(row) === -1) + } + + if (pendingRecords.length) { + body.insertRecords = insertRecords.filter((row) => pendingRecords.indexOf(row) === -1) + } +} + +function canInvokeSaveDataApi(body, removeRecords, updateRecords) { + return body.insertRecords.length || removeRecords.length || updateRecords.length || body.pendingRecords.length +} + +export function doRemoveOrShowMsg({ _vm, canInvoke, code, isMsg, pendingRecords, resolve, valid }) { + if (valid && !canInvoke) { + if (isMsg) { + // 直接移除未保存且标记为删除的数据 + if (pendingRecords.length) { + _vm.remove(pendingRecords) + } else { + Modal.message({ + id: code, + message: GlobalConfig.i18n('ui.grid.dataUnchanged'), + status: 'info' + }) + } + } + + resolve() + } +} + +export function invokeSaveDataApi({ _vm, args, body, code, removeRecords, resolve, saveData, updateRecords, valid }) { + let canInvoke = false + + if (valid && (canInvoke = canInvokeSaveDataApi(body, removeRecords, updateRecords))) { + _vm.tableLoading = true + + resolve( + saveData.api + .apply(_vm, [{ $grid: _vm, changeRecords: body }].concat(args)) + .then(() => { + Modal.message({ + id: code, + message: GlobalConfig.i18n('ui.grid.saveSuccess'), + status: 'success' + }) + _vm.tableLoading = false + }) + .catch(() => { + _vm.tableLoading = false + }) + .then(() => _vm.commitProxy('reload')) + ) + } + + return canInvoke +} + +const getWrapFunc = (name) => + function () { + return this.$refs.tinyTable[name].apply(this.$refs.tinyTable[name], arguments) + } + +const methods = {} +const methodNames = Object.keys(Table.methods).concat(['exportCsv', 'clearFilter', 'exportExcel']) + +methodNames.forEach((name) => { + methods[name] = getWrapFunc(name) +}) + +export default methods diff --git a/packages/grid/src/header/index.js b/packages/grid/src/header/index.js new file mode 100644 index 000000000..b58f84103 --- /dev/null +++ b/packages/grid/src/header/index.js @@ -0,0 +1,32 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ + +import Header from './src/header' + +Header.install = function (Vue) { + Vue.component(Header.name, Header) +} + +export default Header diff --git a/packages/grid/src/header/src/header.js b/packages/grid/src/header/src/header.js new file mode 100644 index 000000000..33fa00c1b --- /dev/null +++ b/packages/grid/src/header/src/header.js @@ -0,0 +1,517 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ + +import { isObject, isNull } from '@opentiny/vue-renderless/common/type' +import { convertToRows } from '@opentiny/vue-renderless/grid/plugins/header' +import { removeClass, addClass, hasClass } from '@opentiny/vue-renderless/common/deps/dom' +import { isBoolean, isFunction } from '@opentiny/vue-renderless/grid/static/' +import { updateCellTitle, getOffsetPos, emitEvent, getClass } from '@opentiny/vue-renderless/grid/utils' +import { h, $prefix } from '@opentiny/vue-common' +import { random } from '@opentiny/vue-renderless/common/string' + +function addListenerMousedown({ $table, mouseConfig, params, thOns }) { + if (mouseConfig.checked) { + thOns.mousedown = (event) => + $table.triggerHeaderCellMousedownEvent(event, { + cell: event.currentTarget, + ...params + }) + } +} + +function addListenerDblclick({ $table, params, tableListeners, thOns }) { + if (tableListeners['header-cell-dblclick']) { + thOns.dblclick = (event) => emitEvent($table, 'header-cell-dblclick', [{ cell: event.currentTarget, ...params }, event]) + } +} + +function addListenerClick({ $table, highlightCurrentColumn, mouseConfig, params, sortOpts, tableListeners, thOns }) { + if (highlightCurrentColumn || tableListeners['header-cell-click'] || mouseConfig.checked || sortOpts.trigger === 'cell') { + thOns.click = (event) => + $table.triggerHeaderCellClickEvent(event, { + cell: event.currentTarget, + ...params + }) + } +} + +function addListenerMouseout({ $table, showHeaderTip, showTooltip, thOns }) { + if (showTooltip || showHeaderTip) { + thOns.mouseout = () => { + if ($table._isResize) { + return + } + + $table.clostTooltip() + } + } +} + +function addListenerMouseover({ $table, params, showHeaderTip, showTitle, showTooltip, thOns }) { + if (showTitle || showTooltip || showHeaderTip) { + thOns.mouseover = (event) => { + if ($table._isResize) { + return + } + + if (showTitle) { + updateCellTitle(event) + } else if (showTooltip || showHeaderTip) { + $table.triggerHeaderTooltipEvent(event, { showHeaderTip, ...params }) + } + } + } +} + +function modifyHeadAlign({ column, headAlign }) { + if (~['radio', 'selection', 'index'].indexOf(column.type)) { + headAlign = headAlign ? headAlign : 'center' + } + + return headAlign +} + +function computeDragLeft(args) { + let { cell, dragMinLeft, dragPosLeft, fixedOffsetWidth, isLeftFixed, isRightFixed } = args + let { left, leftContainer, minInterval, rightContainer, tableBodyElem } = args + + if (isLeftFixed) { + // 左固定列(不允许超过右侧固定列、不允许超过右边距) + left = Math.min(left, (rightContainer ? rightContainer.offsetLeft : tableBodyElem.clientWidth) - fixedOffsetWidth - minInterval) + } else if (isRightFixed) { + // 右侧固定列(不允许超过左侧固定列、不允许超过左边距) + dragMinLeft = (leftContainer ? leftContainer.clientWidth : 0) + fixedOffsetWidth + minInterval + left = Math.min(left, dragPosLeft + cell.clientWidth - minInterval) + } + + let dragLeft = Math.max(left, dragMinLeft) + + return { left, dragMinLeft, dragLeft } +} + +function computeDragPosLeft({ dragPosLeft, fixedOffsetWidth, isRightFixed, rightContainer }) { + if (isRightFixed && rightContainer) { + dragPosLeft = rightContainer.offsetLeft + fixedOffsetWidth + } + + return dragPosLeft +} +function renderTableColgroup(tableColumn) { + return h( + 'colgroup', + { + ref: 'colgroup' + }, + tableColumn.map((column, columnIndex) => h('col', { attrs: { name: column.id }, key: columnIndex })).concat([h('col', { attrs: { name: 'col_gutter' } })]) + ) +} + +function renderRepair() { + return h('div', { class: 'tiny-grid__repair', ref: 'repair' }) +} + +function renderXSpace({ fixedType }) { + return fixedType ? [null] : h('div', { class: 'tiny-grid-body__x-space', ref: 'xSpace' }) +} + +const classMap = { + colFixed: 'col__fixed', + colIndex: 'col__index', + colRadio: 'col__radio', + colSelection: 'col__selection', + colGroup: 'col__group', + colEllipsis: 'col__ellipsis', + fixedHidden: 'fixed__hidden', + isSortable: 'is__sortable', + isEditable: 'is__editable', + isFilter: 'is__filter', + filterActive: 'filter__active' +} + +function getThPropsArg(args) { + let { column, columnIndex, columnKey, fixedHiddenColumn, hasEllipsis, headAlign } = args + let { headerCellClassName, headerClassName, isColGroup, isDragHeaderSorting, params, thOns } = args + return { + class: [ + 'tiny-grid-header__column', + column.id, + { + [`col__${headAlign}`]: headAlign, + [classMap.colFixed]: column.fixed, + [classMap.colIndex]: column.type === 'index', + [classMap.colRadio]: column.type === 'radio', + [classMap.colSelection]: column.type === 'selection', + [classMap.colGroup]: isColGroup, + [classMap.colEllipsis]: hasEllipsis, + [classMap.fixedHidden]: fixedHiddenColumn, + [classMap.isSortable]: ['index', 'radio', 'selection'].indexOf(column.type) === -1 && column.sortable, + [classMap.isEditable]: column.editor, + [classMap.isFilter]: isObject(column.filter), + [classMap.filterActive]: column.filter && column.filter.hasFilter + }, + getClass(headerClassName, params), + getClass(headerCellClassName, params) + ], + attrs: { + 'data-colid': column.id, + colspan: column.colSpan, + rowspan: column.rowSpan + }, + on: thOns, + key: isDragHeaderSorting ? random() : columnKey || isColGroup ? column.id : columnIndex + } +} + +function renderThPartition({ border, column, isColGroup, resizable }) { + let res = null + + const classMap = { + isLine: 'is__line' + } + + if (!isColGroup && !(isBoolean(column.resizable) ? column.resizable : resizable) && column.type !== 'index') { + res = h('div', { + class: ['tiny-grid-thead-partition', { [classMap.isLine]: !border }] + }) + } + + return res +} + +function renderThCell(args) { + let { column, fixedHiddenColumn, headerSuffixIconAbsolute, params } = args + let { showEllipsis, showHeaderTip, showTitle, showTooltip } = args + + return h( + 'div', + { + class: [ + 'tiny-grid-cell', + { + 'tiny-grid-cell__title': showTitle, + 'tiny-grid-cell__tooltip': showTooltip || showHeaderTip, + 'tiny-grid-cell__ellipsis': showEllipsis, + 'tiny-grid-cell__header-suffix': headerSuffixIconAbsolute + } + ] + }, + column.renderHeader(h, { isHidden: fixedHiddenColumn, ...params }) + ) +} +function renderThResize({ _vm, border, column, fixedHiddenColumn, isColGroup, params, resizable }) { + let res = null + + const classMap = { + isLine: 'is__line' + } + + if ( + !fixedHiddenColumn && + !isColGroup && + !~['index', 'radio', 'selection'].indexOf(column.type) && + (isBoolean(column.resizable) ? column.resizable : resizable) + ) { + res = h('div', { + class: ['tiny-grid-resizable', { [classMap.isLine]: !border }], + on: { + mousedown: (event) => _vm.resizeMousedown(event, { isHidden: fixedHiddenColumn, ...params }) + } + }) + } + + return res +} + +function getThHandler(args) { + let { $rowIndex, $table, _vm, allAlign, allColumnHeaderOverflow, allHeaderAlign, border, columnKey, fixedType, headerCellClassName } = args + let { headerSuffixIconAbsolute, highlightCurrentColumn, isDragHeaderSorting, mouseConfig, overflowX, resizable, sortOpts, tableListeners } = args + + return (column, $columnIndex) => { + let { showHeaderOverflow, showHeaderTip, headerAlign, align, headerClassName } = column + let isColGroup = column.children && column.children.length + let fixedHiddenColumn = fixedType ? column.fixed !== fixedType && !isColGroup : column.fixed && overflowX + let headOverflow = isNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow + let showEllipsis = headOverflow === 'ellipsis' + let showTitle = headOverflow === 'title' + let headAlign = headerAlign || align || allHeaderAlign || allAlign + let showTooltip = headOverflow === true || headOverflow === 'tooltip' + let thOns = {} + let hasEllipsis = showTitle || showTooltip || showEllipsis + + // 索引列、选择列如果不配置对齐方式则默认为居中对齐 + headAlign = modifyHeadAlign({ column, headAlign }) + // 确保表格索引的准确性 + let columnIndex = $table.getColumnIndex(column) + let params = { $table, $rowIndex, column } + Object.assign(params, { columnIndex, $columnIndex, fixed: fixedType }) + addListenerMouseover({ $table, params, showHeaderTip, showTitle, showTooltip, thOns }) + addListenerMouseout({ $table, showHeaderTip, showTooltip, thOns }) + + let args1 = { $table, highlightCurrentColumn, mouseConfig, params } + Object.assign(args1, { sortOpts, tableListeners, thOns }) + addListenerClick(args1) + addListenerDblclick({ $table, params, tableListeners, thOns }) + + // 按下事件处理 + addListenerMousedown({ $table, mouseConfig, params, thOns }) + args1 = { column, columnIndex, columnKey, fixedHiddenColumn, hasEllipsis, headAlign } + Object.assign(args1, { headerCellClassName, headerClassName, isColGroup, isDragHeaderSorting, params, thOns }) + let args2 = { column, fixedHiddenColumn, headerSuffixIconAbsolute, params } + Object.assign(args2, { showEllipsis, showHeaderTip, showTitle, showTooltip }) + + return h('th', getThPropsArg(args1), [ + renderThPartition({ border, column, isColGroup, resizable }), + renderThCell(args2), + // 列宽拖动 + renderThResize({ _vm, border, column, fixedHiddenColumn, isColGroup, params, resizable }) + ]) + } +} + +function renderTableThead(args) { + let { $table, _vm, allAlign, allColumnHeaderOverflow } = args + let { allHeaderAlign, border, columnKey, fixedType } = args + let { headerCellClassName, headerColumn, headerRowClassName, headerSuffixIconAbsolute } = args + let { highlightCurrentColumn, isDragHeaderSorting, mouseConfig } = args + let { overflowX, resizable, sortOpts, tableListeners } = args + + return h( + 'thead', + { + ref: 'thead' + }, + headerColumn.map((cols, $rowIndex) => { + let args1 = { $rowIndex, $table, _vm, allAlign, allColumnHeaderOverflow, allHeaderAlign, border, columnKey } + + Object.assign(args1, { fixedType, headerCellClassName, headerSuffixIconAbsolute, highlightCurrentColumn }) + Object.assign(args1, { isDragHeaderSorting, mouseConfig, overflowX, resizable, sortOpts, tableListeners }) + + return h( + 'tr', + { + class: [ + 'tiny-grid-header__row', + headerRowClassName ? (isFunction(headerRowClassName) ? headerRowClassName({ $table, $rowIndex, fixed: fixedType }) : headerRowClassName) : '' + ] + }, + cols.map(getThHandler(args1)).concat([h('th', { class: 'col__gutter' })]) + ) + }) + ) +} +function computeFixedOffsetWidth({ fixedOffsetWidth, isLeftFixed, cell }) { + let siblingProp = isLeftFixed ? 'nextElementSibling' : 'previousElementSibling' + let tempCellElem = cell[siblingProp] + + while (tempCellElem) { + if (hasClass(tempCellElem, 'fixed__hidden')) { + break + } else if (!hasClass(tempCellElem, 'col__group')) { + fixedOffsetWidth += tempCellElem.offsetWidth + } + + tempCellElem = tempCellElem[siblingProp] + } + + return fixedOffsetWidth +} + +function updateResizableToolbar($table) { + if ($table.$toolbar) { + $table.$toolbar.updateResizable() + } +} + +function modifyTableColumn({ fixedColumn, fixedType, scrollXLoad, tableColumn }) { + if (scrollXLoad && fixedType) { + tableColumn = fixedColumn + } + + return tableColumn +} + +function renderTable(args) { + let { $table, _vm, allAlign, allColumnHeaderOverflow, allHeaderAlign, border, columnKey, fixedType } = args + let { headerCellClassName, headerColumn, headerRowClassName, headerSuffixIconAbsolute } = args + let { highlightCurrentColumn, isDragHeaderSorting, mouseConfig, overflowX, resizable, sortOpts } = args + let { tableColumn, tableLayout, tableListeners } = args + let args1 = { $table, _vm, allAlign, allColumnHeaderOverflow, allHeaderAlign, border, columnKey, fixedType } + + Object.assign(args1, { headerCellClassName, headerColumn, headerRowClassName, headerSuffixIconAbsolute }) + Object.assign(args1, { highlightCurrentColumn, isDragHeaderSorting, mouseConfig }) + Object.assign(args1, { overflowX, resizable, sortOpts, tableListeners }) + + return h( + 'table', + { + class: 'tiny-grid__header', + style: { tableLayout }, + attrs: { cellspacing: 0, cellpadding: 0, border: 0 }, + ref: 'table' + }, + [ + // 列宽 + renderTableColgroup(tableColumn), + // 头部 + renderTableThead(args1) + ] + ) +} + +const documentOnmouseup = function ({ oldMousemove, oldMouseup, column, isRightFixed, dragPosLeft, dragLeft, resizeBarElem, $table, params }) { + document.onmousemove = oldMousemove + document.onmouseup = oldMouseup + + let resizeWidth = column.renderWidth + (isRightFixed ? dragPosLeft - dragLeft : dragLeft - dragPosLeft) + resizeWidth = typeof resizeWidth === 'number' ? resizeWidth : parseInt(resizeWidth, 10) || 40 + column.resizeWidth = resizeWidth < 40 ? 40 : resizeWidth + + resizeBarElem.style.display = 'none' + removeClass($table.$el, 'tiny-grid-cell__resize') + Object.assign($table, { _isResize: false, _lastResizeTime: Date.now() }) + + $table.analyColumnWidth() + $table.recalculate(true) + updateResizableToolbar($table) + emitEvent($table, 'resizable-change', [params]) +} + +export default { + name: `${$prefix}GridHeader`, + props: { + collectColumn: Array, + fixedColumn: Array, + fixedType: String, + size: String, + isGroup: Boolean, + tableColumn: Array, + tableData: Array, + visibleColumn: Array + }, + watch: { + tableColumn() { + this.uploadColumn() + } + }, + data() { + return { + headerColumn: [] + } + }, + mounted() { + let { $el, $parent: $table, $refs, fixedType } = this + let elemStore = $table.elemStore + let keyPrefix = `${fixedType || 'main'}-header-` + + elemStore[`${keyPrefix}wrapper`] = $el + elemStore[`${keyPrefix}table`] = $refs.table + elemStore[`${keyPrefix}colgroup`] = $refs.colgroup + elemStore[`${keyPrefix}list`] = $refs.thead + elemStore[`${keyPrefix}x-space`] = $refs.xSpace + elemStore[`${keyPrefix}repair`] = $refs.repair + }, + created() { + this.uploadColumn() + }, + render() { + let { $parent: $table, fixedColumn, fixedType, headerColumn, tableColumn } = this + let { align: allAlign, border, columnKey, headerAlign: allHeaderAlign } = $table + let { headerCellClassName, headerRowClassName, headerSuffixIconAbsolute } = $table + let { highlightCurrentColumn, isDragHeaderSorting, mouseConfig = {}, overflowX } = $table + let { resizable, scrollXLoad, showHeaderOverflow: allColumnHeaderOverflow } = $table + let { sortOpts, tableLayout, tableListeners } = $table + // 横向滚动渲染 + tableColumn = modifyTableColumn({ fixedColumn, fixedType, scrollXLoad, tableColumn }) + + let args = { $table, _vm: this, allAlign, allColumnHeaderOverflow, allHeaderAlign, border, columnKey, fixedType } + + Object.assign(args, { headerCellClassName, headerColumn, headerRowClassName, headerSuffixIconAbsolute }) + Object.assign(args, { highlightCurrentColumn, isDragHeaderSorting, mouseConfig, overflowX, resizable, sortOpts }) + Object.assign(args, { tableColumn, tableLayout, tableListeners }) + + return h( + 'div', + { + class: ['tiny-grid__header-wrapper', fixedType ? `fixed-${fixedType}__wrapper` : 'body__wrapper'] + }, + [ + renderXSpace({ fixedType }), + renderTable(args), + // 其他 + renderRepair() + ] + ) + }, + methods: { + uploadColumn() { + this.headerColumn = this.isGroup ? convertToRows(this.collectColumn) : [this.$parent.scrollXLoad && this.fixedType ? this.fixedColumn : this.tableColumn] + }, + resizeMousedown(event, params) { + let { $el, $parent: $table, fixedType } = this + let { clientX: dragClientX, target: dragBtnElem } = event + let { column } = params + let { dragLeft = 0, minInterval = 36, fixedOffsetWidth = 0 } = {} + let { leftContainer, resizeBar: resizeBarElem, rightContainer, tableBody } = $table.$refs + let { cell = dragBtnElem.parentNode, dragBtnWidth = dragBtnElem.clientWidth } = {} + let { pos = getOffsetPos(dragBtnElem, $el), tableBodyElem = tableBody.$el } = {} + let dragMinLeft = pos.left - cell.clientWidth + dragBtnWidth + minInterval + let dragPosLeft = pos.left + Math.floor(dragBtnWidth / 2) + let { isRightFixed = fixedType === 'right', isLeftFixed = fixedType === 'left' } = {} + let { oldMousemove = document.onmousemove, oldMouseup = document.onmouseup } = {} + + if (isLeftFixed || isRightFixed) { + fixedOffsetWidth = computeFixedOffsetWidth({ fixedOffsetWidth, isLeftFixed, cell }) + dragPosLeft = computeDragPosLeft({ dragPosLeft, fixedOffsetWidth, isRightFixed, rightContainer }) + } + + // 处理拖动事件 + let handleMousemoveEvent = function (event) { + event.stopPropagation() + event.preventDefault() + + let { offsetX = event.clientX - dragClientX, left = offsetX + dragPosLeft } = {} + let scrollLeft = fixedType ? 0 : tableBodyElem.scrollLeft + let args = { cell, dragMinLeft, dragPosLeft, fixedOffsetWidth, isLeftFixed, isRightFixed } + Object.assign(args, { left, leftContainer, minInterval, rightContainer, tableBodyElem }) + + let ret = computeDragLeft(args) + left = ret.left + dragMinLeft = ret.dragMinLeft + dragLeft = ret.dragLeft + resizeBarElem.style.left = `${dragLeft - scrollLeft}px` + } + + resizeBarElem.style.display = 'block' + addClass($table.$el, 'tiny-grid-cell__resize') + $table._isResize = true + + document.onmousemove = handleMousemoveEvent + document.onmouseup = () => { + documentOnmouseup({ oldMousemove, oldMouseup, column, isRightFixed, dragPosLeft, dragLeft, resizeBarElem, $table, params }) + } + handleMousemoveEvent(event) + } + } +} diff --git a/packages/grid/src/index.js b/packages/grid/src/index.js new file mode 100644 index 000000000..28c3ded8e --- /dev/null +++ b/packages/grid/src/index.js @@ -0,0 +1,18 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Grid from './grid/grid' + +Grid.install = function (Vue) { + Vue.component(Grid.name, Grid) +} + +export default Grid diff --git a/packages/grid/src/keyboard/index.js b/packages/grid/src/keyboard/index.js new file mode 100644 index 000000000..0e70d4373 --- /dev/null +++ b/packages/grid/src/keyboard/index.js @@ -0,0 +1,20 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Methods from './src/methods' +import TINYGrid from '../adapter' + +export default { + install(Table) { + TINYGrid._keyboard = 1 + Object.assign(Table.methods, Methods) + } +} diff --git a/packages/grid/src/keyboard/src/methods.js b/packages/grid/src/keyboard/src/methods.js new file mode 100644 index 000000000..ca6b09b6b --- /dev/null +++ b/packages/grid/src/keyboard/src/methods.js @@ -0,0 +1,564 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import { addClass, removeClass } from '@opentiny/vue-renderless/common/deps/dom' +import { arrayEach, arrayIndexOf, findTree, find } from '@opentiny/vue-renderless/grid/static/' +import { getCellValue, setCellValue, getCell, getRowNodes, getCellNodeIndex } from '@opentiny/vue-renderless/grid/utils' +import { extend } from '@opentiny/vue-renderless/common/object' +import { findLeft, findRight, processTarget } from './utils/moveTabSelected' +import { + onCellMousedownSelectEditable, + onCellMousedownSelect, + onCellMousedownIndexColumn, + onCellMousedownNotIndexColumn, + handleCellMousedownEvent +} from './utils/triggerCellMousedownEvent' +import { handleHeaderCellMousedownEvent } from './utils/triggerHeaderCellMousedownEvent' + +export default { + // Tab键移动处理 + moveTabSelected(args, isLeft, event, edit) { + let { editConfig, hasIndexColumn, tableData, visibleColumn } = this + let params = { ...args } + let columnIndex = visibleColumn.indexOf(params.column) + let rowIndex = tableData.indexOf(params.row) + let { targetColumn, targetColumnIndex, targetRow, targetRowIndex } = {} + + event.preventDefault() + + let checkColumn = (column) => !hasIndexColumn(column) && (edit ? column.editor : true) + + let args1 = { columnIndex, checkColumn, isLeft, tableData, rowIndex, targetColumn } + + Object.assign(args1, { targetRowIndex, targetColumnIndex, targetRow, visibleColumn }) + // 向左查找 + let ret = findLeft(args1) + + targetColumn = ret.targetColumn + targetColumnIndex = ret.targetColumnIndex + targetRow = ret.targetRow + targetRowIndex = ret.targetRowIndex + + args1 = { checkColumn, columnIndex, isLeft, rowIndex, tableData, targetColumn } + + Object.assign(args1, { targetColumnIndex, targetRow, targetRowIndex, visibleColumn }) + // 向右查找 + ret = findRight(args1) + + targetColumn = ret.targetColumn + targetColumnIndex = ret.targetColumnIndex + targetRow = ret.targetRow + targetRowIndex = ret.targetRowIndex + + args1 = { _vm: this, args, edit, editConfig, event, isLeft, params, rowIndex } + + Object.assign(args1, { targetColumn, targetColumnIndex, targetRow, targetRowIndex }) + + processTarget(args1) + }, + // 当前行方向键移动处理 + moveCurrentRow(isUpArrow, isDwArrow, event) { + let { afterFullData, currentRow, treeConfig } = this + let targetRow + + event.preventDefault() + + if (treeConfig) { + let { index: curIndex, items: neighbors } = findTree(afterFullData, (row) => row === currentRow, treeConfig) + + if (isUpArrow && curIndex > 0) { + targetRow = neighbors[curIndex - 1] + } else if (isDwArrow && curIndex < neighbors.length - 1) { + targetRow = neighbors[curIndex + 1] + } + } else { + let curIndex = afterFullData.indexOf(currentRow) + + if (isUpArrow && curIndex > 0) { + targetRow = afterFullData[curIndex - 1] + } else if (isDwArrow && curIndex < afterFullData.length - 1) { + targetRow = afterFullData[curIndex + 1] + } + } + + if (targetRow) { + this.scrollToRow(targetRow).then(() => this.triggerCurrentRowEvent(event, { $table: this, row: targetRow })) + } + }, + // 可编辑方向键移动处理 + moveSelected({ args, isLeftArrow, isUpArrow, isRightArrow, isDownArrow, event }) { + let { hasIndexColumn, tableColumn: visibleColumn, tableFullData: tableData } = this + let params = { ...args } + let column = params.column + let columnIndex = visibleColumn.indexOf(column) + + event.preventDefault() + + if (isUpArrow && params.rowIndex) { + params.row = tableData[--params.rowIndex] + } else if (isDownArrow && params.rowIndex < tableData.length - 1) { + params.row = tableData[++params.rowIndex] + } else if (isLeftArrow && columnIndex) { + for (let pos = columnIndex - 1; pos >= 0; pos--) { + if (!hasIndexColumn(visibleColumn[pos])) { + columnIndex = pos + params.column = visibleColumn[pos] + break + } + } + } else if (isRightArrow) { + for (let pos = columnIndex + 1; pos < visibleColumn.length; pos++) { + if (!hasIndexColumn(visibleColumn[pos])) { + params.columnIndex = pos + params.column = visibleColumn[pos] + break + } + } + } + + getCell(this, params).then((resCell) => { + params.cell = resCell + + this.handleSelected(params, event) + this.scrollToRow(params.row, params.column, false, { + isLeftArrow, + isRightArrow, + from: column + }) + }) + }, + // 表头按下事件 + triggerHeaderCellMousedownEvent(event, params) { + let { $el, elemStore, mouseConfig = {}, tableData } = this + let headerList = elemStore['main-header-list'].children + let bodyList = elemStore['main-body-list'].children + let cell = params.cell + let column = params.column + let isIndex = column.type === 'index' + let startCell = bodyList[0].querySelector(`.${column.id}`) + let button = event.button + let isLeftBtn = button === 0 + + if (!isLeftBtn || !mouseConfig.checked) { + return + } + + if (isIndex) { + this.handleAllChecked(event) + this.closeMenu() + return + } + + event.preventDefault() + event.stopPropagation() + this.clearSelected(event) + this.clearHeaderChecked() + this.clearIndexChecked() + handleHeaderCellMousedownEvent({ $el, _vm: this, bodyList, cell, headerList, startCell }) + this.handleHeaderChecked([[cell]]) + + if (!bodyList.length) { + this.closeMenu() + return + } + + let firstTr = bodyList[0] + let lastTr = bodyList[bodyList.length - 1] + let firstCell = firstTr.querySelector('.col__index') + let lastCell = lastTr.querySelector(`.${column.id}`) + + params.rowIndex = 0 + params.row = tableData[0] + getCell(this, params).then((cellRes) => { + params.cell = cellRes + this.handleSelected(params, event) + let rowNodes = getRowNodes(bodyList, getCellNodeIndex(firstCell), getCellNodeIndex(lastTr.querySelector('.col__index'))) + this.handleIndexChecked(rowNodes) + this.handleChecked(getRowNodes(bodyList, getCellNodeIndex(startCell), getCellNodeIndex(lastCell))) + }) + this.closeMenu() + }, + // 单元格按下事件 + triggerCellMousedownEvent(event, params) { + let { $el, editConfig, editStore, elemStore, mouseConfig = {}, visibleColumn } = this + let { actived, checked } = editStore + let { button } = event + let { cell, column, row } = params + let isLeftBtn = button === 0 + let args + + if (editConfig && (actived.row !== row || !(editConfig.mode === 'cell' && actived.column === column)) && isLeftBtn && mouseConfig.checked) { + event.preventDefault() + event.stopPropagation() + + this.clearHeaderChecked() + this.clearIndexChecked() + + let isIndex = column.type === 'index' + let startCellNode = getCellNodeIndex(cell) + let headerList = elemStore['main-header-list'].children + let bodyList = elemStore['main-body-list'].children + let cellFirstElementChild = cell.parentNode.firstElementChild + let cellLastElementChild = cell.parentNode.lastElementChild + let colIndex = [...cell.parentNode.children].indexOf(cell) + let headStart = headerList[0].children[colIndex] + args = { $el, _vm: this, bodyList, cell, cellFirstElementChild } + + Object.assign(args, { cellLastElementChild, headStart, headerList, isIndex, startCellNode }) + handleCellMousedownEvent(args) + args = { _vm: this, bodyList, cell, cellLastElementChild } + Object.assign(args, { event, headerList, isIndex, params, visibleColumn }) + onCellMousedownIndexColumn(args) + onCellMousedownNotIndexColumn({ _vm: this, cell, column, event, headerList, isIndex, params }) + + this.closeFilter() + this.closeMenu() + } + + args = { _vm: this, actived, cell, checked, column, editConfig } + Object.assign(args, { event, isLeftBtn, mouseConfig, params, row }) + onCellMousedownSelectEditable(args) + onCellMousedownSelect({ _vm: this, editConfig, event, mouseConfig, params }) + }, + // 清除所选中源状态 + _clearSelected(keep) { + let { + editStore: { selected }, + elemStore + } = this + let nameList = ['left', 'main', 'right'] + + if (!keep) { + selected.row = null + selected.column = null + } + + nameList.forEach((name) => { + let bodyElem = elemStore[`${name}-body-list`] + let headerElem = elemStore[`${name}-header-list`] + + if (bodyElem) { + let elem = bodyElem.querySelector('.col__selected') + removeClass(elem, 'col__selected') + } + + if (headerElem) { + arrayEach(headerElem.querySelectorAll('.col__title-selected'), (elem) => removeClass(elem, 'col__title-selected')) + } + }) + + return this.$nextTick() + }, + // 清除所有选中状态 + _clearChecked() { + let { $refs, editStore, mouseConfig } = this + let checked = editStore.checked + + if (!mouseConfig || !mouseConfig.checked) { + return this.$nextTick() + } + + editStore.checked = extend(true, {}, checked, { + columns: [], + rows: [], + tColumns: [], + tRows: [] + }) + + let tableBody = $refs.tableBody + + tableBody.$refs.checkBorders.style.display = 'none' + + arrayEach(tableBody.$el.querySelectorAll('.col__checked'), (elem) => removeClass(elem, 'col__checked')) + + return this.$nextTick() + }, + _getMouseCheckeds() { + let { rowNodes = [] } = this.editStore.checked + let { rows = [], columns = [] } = {} + let res = { + rows, + columns, + rowNodes + } + + if (rowNodes && rowNodes.length) { + res.rows = rowNodes.map((arr) => this.getRowNode(arr[0].parentNode).item) + res.columns = rowNodes[0].map((col) => this.getColumnNode(col).item) + } + + return res + }, + _getMouseSelecteds() { + let { args, column } = this.editStore.selected + + if (!args || !column) { + return null + } + + return extend(true, {}, args) + }, + // 处理所有选中 + handleChecked(rowNodes) { + let { cHeight, cWidth, offsetLeft, offsetTop } = {} + + cWidth = -2 + cHeight = -2 + offsetTop = 0 + offsetLeft = 0 + + this.clearChecked() + + arrayEach(rowNodes, (rowNode, rowIndex) => { + arrayEach(rowNode, (colNode, colIndex) => { + let firstRow = rowIndex === 0 + let firstCol = colIndex === 0 + + if (firstRow) { + if (firstCol) { + offsetTop = colNode.offsetTop + offsetLeft = colNode.offsetLeft + } + + cWidth += colNode.offsetWidth + } + + if (firstCol) { + cHeight += colNode.offsetHeight + } + + addClass(colNode, 'col__checked') + }) + }) + + let { checkBorders, checkBottom, checkLeft, checkRight, checkTop } = this.$refs.tableBody.$refs + checkBorders.style.display = 'block' + let modifyDomStyle = (dom, styleOptions) => Object.assign(dom.style, styleOptions) + + modifyDomStyle(checkTop, { top: `${offsetTop}px`, left: `${offsetLeft}px`, width: `${cWidth}px` }) + modifyDomStyle(checkRight, { top: `${offsetTop}px`, left: `${offsetLeft + cWidth}px`, height: `${cHeight}px` }) + modifyDomStyle(checkBottom, { top: `${offsetTop + cHeight}px`, left: `${offsetLeft}px`, width: `${cWidth}px` }) + modifyDomStyle(checkLeft, { top: `${offsetTop}px`, left: `${offsetLeft}px`, height: `${cHeight}px` }) + + this.editStore.checked.rowNodes = rowNodes + }, + handleAllChecked(event) { + let { elemStore, mouseConfig = {}, tableData, visibleColumn } = this + + if (!mouseConfig.checked) { + return + } + + event.preventDefault() + + let column = find(visibleColumn, (col) => col.type === 'index') || visibleColumn[0] + let selectorColumnId = `.${column.id}` + let headerListElem = elemStore['main-header-list'] + let headerList = headerListElem.children + let cell = headerListElem.querySelector(selectorColumnId) + let bodyList = elemStore['main-body-list'].children + let firstTrElem = bodyList[0] + let firstCell = firstTrElem.querySelector(selectorColumnId) + let lastTrElem = bodyList[bodyList.length - 1] + let params = { $table: this, rowIndex: 0, row: tableData[0] } + + params.column = find(visibleColumn, (col) => col.property) + params.columnIndex = this.getColumnIndex(params.column) + + getCell(this, params).then((resCell) => { + params.cell = resCell + + this.handleSelected(params, event) + + this.handleHeaderChecked(getRowNodes(headerList, getCellNodeIndex(cell.nextElementSibling), getCellNodeIndex(cell.parentNode.lastElementChild))) + this.handleIndexChecked(getRowNodes(bodyList, getCellNodeIndex(firstCell), getCellNodeIndex(lastTrElem.querySelector(selectorColumnId)))) + this.handleChecked(getRowNodes(bodyList, getCellNodeIndex(firstCell.nextElementSibling), getCellNodeIndex(lastTrElem.lastElementChild))) + }) + }, + handleIndexChecked(rowNodes) { + this.clearIndexChecked() + + arrayEach(rowNodes, (rowNode) => { + arrayEach(rowNode, (colNode) => { + addClass(colNode, 'col__index-checked') + }) + }) + + this.editStore.indexs.rowNodes = rowNodes + }, + _clearIndexChecked() { + let indexCheckeds = this.elemStore['main-body-list'].querySelectorAll('.col__index-checked') + let eachHandler = (colNode) => removeClass(colNode, 'col__index-checked') + + arrayEach(indexCheckeds, eachHandler) + + return this.$nextTick() + }, + handleHeaderChecked(rowNodes) { + this.clearHeaderChecked() + + arrayEach(rowNodes, (rowNode) => { + arrayEach(rowNode, (colNode) => { + addClass(colNode, 'col__title-checked') + }) + }) + + this.editStore.titles.rowNodes = rowNodes + }, + _clearHeaderChecked() { + let headerElem = this.elemStore['main-header-list'] + + if (headerElem) { + let eachHandler = (colNode) => removeClass(colNode, 'col__title-checked') + + arrayEach(headerElem.querySelectorAll('.col__title-checked'), eachHandler) + } + + return this.$nextTick() + }, + // 清空已复制的内容 + _clearCopyed() { + let { + $refs, + editStore: { copyed: editStoreCopyed }, + keyboardConfig + } = this + + if (!keyboardConfig || !keyboardConfig.isCut) { + return this.$nextTick() + } + + let tableBody = $refs.tableBody + let { copyBorders } = tableBody.$refs + let colCopyeds = tableBody.$el.querySelectorAll('.col__copyed') + let eachHandler = (colCopyed) => removeClass(colCopyed, 'col__copyed') + + editStoreCopyed.cut = false + editStoreCopyed.rows = [] + editStoreCopyed.columns = [] + + copyBorders.style.display = 'none' + arrayEach(colCopyeds, eachHandler) + + return this.$nextTick() + }, + // 处理复制 + handleCopyed(cut) { + let { editStore, tableColumn, tableData } = this + let copyed = editStore.copyed + let rowNodes = editStore.checked.rowNodes + let { cHeight, cWidth, offsetLeft, offsetTop, rows = [], columns = [] } = {} + cWidth = -3 + cHeight = -3 + offsetTop = 0 + offsetLeft = 0 + this.clearCopyed() + + if (rowNodes.length) { + let firstRows = rowNodes[0] + let firstCell = firstRows[0] + let firstRowsLength = firstRows.length + let { rowIndex, columnIndex } = getCellNodeIndex(firstCell) + columns = tableColumn.slice(columnIndex, columnIndex + firstRowsLength) + rows = tableData.slice(rowIndex, rowIndex + rowNodes.length) + } + + arrayEach(rowNodes, (rowNode, rowIndex) => { + arrayEach(rowNode, (colNode, colIndex) => { + let isTop = rowIndex === 0 + let isLeft = colIndex === 0 + if (isTop) { + if (isLeft) { + offsetTop = colNode.offsetTop + offsetLeft = colNode.offsetLeft + } + cWidth += colNode.offsetWidth + } + if (isLeft) { + cHeight += colNode.offsetHeight + } + addClass(colNode, 'col__copyed') + }) + }) + + let { copyBorders, copyTop, copyRight, copyBottom, copyLeft } = this.$refs.tableBody.$refs + let modifyDomStyle = (dom, styleOptions) => Object.assign(dom.style, styleOptions) + copyBorders.style.display = 'block' + modifyDomStyle(copyTop, { top: `${offsetTop}px`, left: `${offsetLeft}px`, width: `${cWidth}px` }) + modifyDomStyle(copyRight, { top: `${offsetTop}px`, left: `${offsetLeft + cWidth}px`, height: `${cHeight}px` }) + modifyDomStyle(copyBottom, { top: `${offsetTop + cHeight}px`, left: `${offsetLeft}px`, width: `${cWidth}px` }) + modifyDomStyle(copyLeft, { top: `${offsetTop}px`, left: `${offsetLeft}px`, height: `${cHeight}px` }) + copyed.cut = cut + copyed.columns = columns + copyed.rows = rows + copyed.rowNodes = rowNodes + }, + // 处理粘贴 + handlePaste() { + let { + editStore: { + copyed: { columns, cut, rows }, + selected + }, + elemStore, + tableData, + visibleColumn + } = this + + if (!rows.length || !columns.length || !selected.row || !selected.column) { + return + } + + let { columnIndex, rowIndex } = selected.args + + arrayEach(rows, (row, rIndex) => { + let targetRow = tableData[rowIndex + rIndex] + + if (targetRow) { + arrayEach(columns, (column, cIndex) => { + let targetColumn = visibleColumn[columnIndex + cIndex] + + targetColumn && setCellValue(targetRow, targetColumn, getCellValue(row, column)) + cut && setCellValue(row, column, null) + }) + } + }) + + cut && this.clearCopyed() + + let cell = selected.args.cell + let trElem = cell.parentNode + let colIndex = arrayIndexOf(trElem.children, cell) + let bodyList = elemStore['main-body-list'].children + let rIndex = arrayIndexOf(bodyList, trElem) + let targetTrElem = bodyList[rIndex + rows.length - 1] + let targetCell = targetTrElem.children[colIndex + columns.length - 1] + + let targetCellNode = getCellNodeIndex(targetCell) + let cellNode = getCellNodeIndex(cell) + let rowNodes = getRowNodes(bodyList, cellNode, targetCellNode) + + this.handleChecked(rowNodes) + } +} diff --git a/packages/grid/src/keyboard/src/utils/moveTabSelected.js b/packages/grid/src/keyboard/src/utils/moveTabSelected.js new file mode 100644 index 000000000..088d3fe89 --- /dev/null +++ b/packages/grid/src/keyboard/src/utils/moveTabSelected.js @@ -0,0 +1,129 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import { getCell } from '@opentiny/vue-renderless/grid/utils' + +export function findLeft(params) { + let { checkColumn, columnIndex, isLeft, rowIndex, tableData } = params + let { targetColumn, targetColumnIndex, targetRow, targetRowIndex, visibleColumn } = params + + if (!isLeft) { + return { targetColumn, targetColumnIndex, targetRow, targetRowIndex } + } + + for (let index = columnIndex - 1; index >= 0; index--) { + if (checkColumn(visibleColumn[index])) { + targetColumnIndex = index + targetColumn = visibleColumn[index] + break + } + } + + if (targetColumn || rowIndex <= 0) { + return { targetColumn, targetColumnIndex, targetRow, targetRowIndex } + } + + targetRowIndex = rowIndex - 1 + targetRow = tableData[targetRowIndex] + + for (let index = visibleColumn.length - 1; index >= 0; index--) { + if (checkColumn(visibleColumn[index])) { + targetColumnIndex = index + targetColumn = visibleColumn[index] + break + } + } + + return { targetColumn, targetColumnIndex, targetRow, targetRowIndex } +} + +export function findRight(params) { + let { checkColumn, columnIndex, isLeft, rowIndex, tableData } = params + let { targetColumn, targetColumnIndex, targetRow, targetRowIndex, visibleColumn } = params + + if (isLeft) { + return { targetColumn, targetColumnIndex, targetRow, targetRowIndex } + } + + for (let index = columnIndex + 1; index < visibleColumn.length; index++) { + if (checkColumn(visibleColumn[index])) { + targetColumnIndex = index + targetColumn = visibleColumn[index] + break + } + } + + if (targetColumn || rowIndex >= tableData.length - 1) { + return { targetColumn, targetColumnIndex, targetRow, targetRowIndex } + } + + targetRowIndex = rowIndex + 1 + targetRow = tableData[targetRowIndex] + + for (let index = 0; index < visibleColumn.length; index++) { + if (checkColumn(visibleColumn[index])) { + targetColumnIndex = index + targetColumn = visibleColumn[index] + break + } + } + + return { targetColumn, targetColumnIndex, targetRow, targetRowIndex } +} + +export function processTarget(args1) { + let { _vm, args, edit, editConfig, event, isLeft, params, rowIndex } = args1 + let { targetColumn, targetColumnIndex, targetRow, targetRowIndex } = args1 + + if (targetColumn) { + if (targetRow) { + params.rowIndex = targetRowIndex + params.row = targetRow + } else { + params.rowIndex = rowIndex + } + + params.columnIndex = targetColumnIndex + params.column = targetColumn + + getCell(_vm, params).then((resCell) => { + params.cell = resCell + + if (editConfig) { + if (editConfig.trigger === 'click' || editConfig.trigger === 'dblclick') { + if (editConfig.mode === 'row' || edit) { + _vm.handleActived(params, event) + } else { + _vm.handleSelected(params, event) + _vm.scrollToRow(params.row, params.column, false, { + isLeftArrow: isLeft, + isRightArrow: !isLeft, + from: args.column + }) + } + } + } + }) + } +} diff --git a/packages/grid/src/keyboard/src/utils/triggerCellMousedownEvent.js b/packages/grid/src/keyboard/src/utils/triggerCellMousedownEvent.js new file mode 100644 index 000000000..ad3e7b7c3 --- /dev/null +++ b/packages/grid/src/keyboard/src/utils/triggerCellMousedownEvent.js @@ -0,0 +1,135 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import throttle from '@opentiny/vue-renderless/common/deps/throttle' +import { hasClass } from '@opentiny/vue-renderless/common/deps/dom' +import { getRowNodes, getCellNodeIndex, getEventTargetNode } from '@opentiny/vue-renderless/grid/utils' + +export function onCellMousedownGridEl(args) { + let { _vm, bodyList, cell, cellFirstElementChild, cellLastElementChild, flag, headStart, headerList, isIndex, startCellNode, targetElem } = args + if (flag) { + if (isIndex) { + let firstCell = targetElem.parentNode.firstElementChild + _vm.handleChecked(getRowNodes(bodyList, getCellNodeIndex(firstCell.nextElementSibling), getCellNodeIndex(cellLastElementChild))) + _vm.handleIndexChecked(getRowNodes(bodyList, getCellNodeIndex(firstCell), getCellNodeIndex(cell))) + } else if (!hasClass(targetElem, 'col__index')) { + let firstCell = targetElem.parentNode.firstElementChild + let colIndex = [].indexOf.call(targetElem.parentNode.children, targetElem) + let head = headerList[0].children[colIndex] + _vm.handleHeaderChecked(getRowNodes(headerList, getCellNodeIndex(head), getCellNodeIndex(headStart))) + _vm.handleIndexChecked(getRowNodes(bodyList, getCellNodeIndex(firstCell), getCellNodeIndex(cellFirstElementChild))) + _vm.handleChecked(getRowNodes(bodyList, startCellNode, getCellNodeIndex(targetElem))) + } + } +} + +export function handleCellMousedownEvent(args1) { + let { $el, _vm, bodyList, cell, cellFirstElementChild } = args1 + let { cellLastElementChild, headStart, headerList, isIndex, startCellNode } = args1 + + let oldMousemove = document.onmousemove + let oldMouseup = document.onmouseup + + let updateEvent = (event) => { + event.preventDefault() + + let { flag, targetElem } = getEventTargetNode(event, $el, 'tiny-grid-body__column') + let args = { + _vm, + bodyList, + cell, + cellFirstElementChild, + cellLastElementChild, + flag + } + + Object.assign(args, { + headStart, + headerList, + isIndex, + startCellNode, + targetElem + }) + + onCellMousedownGridEl(args) + } + + let updateEventThrot = throttle(80, false, updateEvent, true) + + document.onmousemove = updateEventThrot + document.onmouseup = function () { + document.onmousemove = oldMousemove + document.onmouseup = oldMouseup + } +} + +export function onCellMousedownSelectEditable(args) { + let { _vm, actived, cell, checked, column, editConfig } = args + let { event, isLeftBtn, mouseConfig, params, row } = args + // 除了双击其他都没有选中状态, 如果不在所有选中的范围之内则重新选中 + if ( + editConfig && + (actived.row !== row || !(editConfig.mode === 'cell' && actived.column === column)) && + !(isLeftBtn && mouseConfig.checked) && + mouseConfig.selected && + editConfig.trigger === 'dblclick' && + (!checked.rowNodes || !checked.rowNodes.some((list) => ~list.indexOf(cell))) + ) { + _vm.handleSelected(params, event) + } +} + +export function onCellMousedownSelect({ _vm, editConfig, event, mouseConfig, params }) { + if (!editConfig && mouseConfig.selected) { + _vm.handleSelected(params, event) + } +} + +export function onCellMousedownIndexColumn(args) { + let { _vm, bodyList, cell, cellLastElementChild, event } = args + let { headerList, isIndex, params, visibleColumn } = args + + if (isIndex) { + let firstCell = cell.parentNode.firstElementChild + + params.columnIndex++ + params.column = visibleColumn[params.columnIndex] + params.cell = cell.nextElementSibling + + _vm.handleSelected(params, event) + _vm.handleChecked(getRowNodes(bodyList, getCellNodeIndex(firstCell.nextElementSibling), getCellNodeIndex(cellLastElementChild))) + _vm.handleHeaderChecked([headerList[0].querySelectorAll('.tiny-grid-header__column:not(.col__index)')]) + _vm.handleIndexChecked(getRowNodes(bodyList, getCellNodeIndex(firstCell), getCellNodeIndex(cell))) + } +} + +export function onCellMousedownNotIndexColumn({ _vm, cell, column, event, headerList, isIndex, params }) { + if (!isIndex) { + let firstCell = cell.parentNode.firstElementChild + + _vm.handleSelected(params, event) + _vm.handleHeaderChecked([[headerList[0].querySelector(`.${column.id}`)]]) + _vm.handleIndexChecked([[firstCell]]) + } +} diff --git a/packages/grid/src/keyboard/src/utils/triggerHeaderCellMousedownEvent.js b/packages/grid/src/keyboard/src/utils/triggerHeaderCellMousedownEvent.js new file mode 100644 index 000000000..fd8681467 --- /dev/null +++ b/packages/grid/src/keyboard/src/utils/triggerHeaderCellMousedownEvent.js @@ -0,0 +1,62 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import { addClass, removeClass, hasClass } from '@opentiny/vue-renderless/common/deps/dom' +import throttle from '@opentiny/vue-renderless/common/deps/throttle' +import { getRowNodes, getCellNodeIndex, getEventTargetNode } from '@opentiny/vue-renderless/grid/utils' + +export function handleHeaderCellMousedownEvent({ $el, _vm, bodyList, cell, headerList, startCell }) { + let oldMousemove = document.onmousemove + let oldMouseup = document.onmouseup + let updateEvent = (event) => { + event.preventDefault() + let { flag, targetElem } = getEventTargetNode(event, $el, 'tiny-grid-header__column') + if (!flag) { + let tmp = getEventTargetNode(event, $el, 'tiny-grid-body__column') + + flag = tmp.flag + targetElem = tmp.targetElem + } + if (flag && !hasClass(targetElem, 'col__index')) { + let colIndex = [...targetElem.parentNode.children].indexOf(targetElem) + let lastCell = bodyList[bodyList.length - 1].children[colIndex] + let headCell = headerList[0].children[colIndex] + + _vm.handleHeaderChecked(getRowNodes(headerList, getCellNodeIndex(headCell), getCellNodeIndex(cell))) + _vm.handleChecked(getRowNodes(bodyList, getCellNodeIndex(startCell), getCellNodeIndex(lastCell))) + } + } + + let updateEventThrot = throttle(80, false, updateEvent, true) + + addClass($el, 'tiny-grid-cell__checked') + + document.onmousemove = updateEventThrot + document.onmouseup = function () { + removeClass($el, 'tiny-grid-cell__checked') + + document.onmousemove = oldMousemove + document.onmouseup = oldMouseup + } +} diff --git a/packages/grid/src/loading/index.js b/packages/grid/src/loading/index.js new file mode 100644 index 000000000..8e0be293f --- /dev/null +++ b/packages/grid/src/loading/index.js @@ -0,0 +1,17 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $install } from '@opentiny/vue-common' +import Loading from './src/loading' + +$install(Loading) + +export default Loading diff --git a/packages/grid/src/loading/src/loading.js b/packages/grid/src/loading/src/loading.js new file mode 100644 index 000000000..08cf32df1 --- /dev/null +++ b/packages/grid/src/loading/src/loading.js @@ -0,0 +1,44 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { h, $prefix } from '@opentiny/vue-common' +import { iconLoading } from '@opentiny/vue-icon' + +export default { + name: $prefix + 'GridLoading', + props: { + visible: Boolean + }, + render() { + return h( + 'div', + { + class: 'tiny-grid-loading tiny-loading', + style: { + display: this.visible ? 'block' : 'none' + } + }, + [ + h( + 'div', + { + class: 'tiny-grid-loading__wrap tiny-loading__spinner' + }, + [ + h(iconLoading(), { + class: 'circular' + }) + ] + ) + ] + ) + } +} diff --git a/packages/grid/src/menu/index.js b/packages/grid/src/menu/index.js new file mode 100644 index 000000000..204064ad8 --- /dev/null +++ b/packages/grid/src/menu/index.js @@ -0,0 +1,21 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import TINYGrid from '../adapter' +import Panel from './src/panel' +import Methods from './src/methods' + +Panel.install = function (Table) { + TINYGrid._menu = 1 + Object.assign(Table.methods, Methods) +} + +export default Panel diff --git a/packages/grid/src/menu/src/children.js b/packages/grid/src/menu/src/children.js new file mode 100644 index 000000000..f555dfeea --- /dev/null +++ b/packages/grid/src/menu/src/children.js @@ -0,0 +1,113 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import { getFuncText, getDomNode } from '@opentiny/vue-renderless/grid/utils' +import { h, $prefix } from '@opentiny/vue-common' + +export default { + name: $prefix + 'GridContextMenuChild', + props: { + item: Object, + gIndex: Number, + index: Number, + show: Boolean, + ctxMenuStore: Object, + tableInstance: Object + }, + render() { + const { tableInstance, item, gIndex, index, show, ctxMenuStore } = this + const { toKebab, getEventTargetNode } = tableInstance + + return h( + 'ul', + { + style: { left: '-9999999px' }, + class: ['tiny-grid-menu__clild-wrapper', { show }] + }, + item.children.map((child, cIndex) => + // prettier-ignore + child.visible === false + ? [null] + : h( + 'li', + { + class: { 'link__disabled': child.disabled, 'link__active': child === ctxMenuStore.selectChild }, + key: `${gIndex}_${index}_${cIndex}` + }, + [ + h( + 'a', + { + class: `tiny-grid-menu__link ${toKebab(item.code)}`, + on: { + click(event) { + tableInstance.ctxMenuLinkEvent(event, child) + }, + mouseover(event) { + tableInstance.ctxMenuMouseoverEvent(event, item, child) + }, + mouseout(event) { + if(!getEventTargetNode(event, document.body, toKebab(item.code)).flag) { + tableInstance.ctxMenuMouseoutEvent(event, item, child) + } + } + } + }, + [ + child.prefixIcon ? h(child.prefixIcon, { class: 'tiny-grid-menu__link-prefix' }) : [null], + h('span', { class: 'tiny-grid-menu__link-content' }, getFuncText(child.name)) + ] + ) + ] + ) + ) + ) + }, + watch: { + show(value) { + if (value) { + this.$el.style.top = '0px' + this.$nextTick(() => { + const { tableInstance, $el } = this + const { width, height, bottom } = $el.getBoundingClientRect() + const { visibleHeight, visibleWidth } = getDomNode() + const ctxElem = tableInstance.$refs.ctxWrapper.$el + const target = tableInstance.ctxMenuStore.target + const { width: ctxWidth, right: ctxRight } = ctxElem.getBoundingClientRect() + + if (width + ctxRight > visibleWidth - 6) { + $el.style.left = -6 - width + 'px' + } else { + $el.style.left = ctxWidth + 'px' + } + + if (bottom > visibleHeight) { + let offset = (target && target.clientHeight) || 0 + $el.style.top = offset - height + 'px' + } + }) + } + } + } +} diff --git a/packages/grid/src/menu/src/methods.js b/packages/grid/src/menu/src/methods.js new file mode 100644 index 000000000..9e3bef8a1 --- /dev/null +++ b/packages/grid/src/menu/src/methods.js @@ -0,0 +1,240 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import { findIndexOf } from '@opentiny/vue-renderless/grid/static/' +import { hasChildrenList, getDomNode, emitEvent } from '@opentiny/vue-renderless/grid/utils' +import { Menus } from '../../adapter' + +let getSelectItem = (subList) => { + for (let i = 0; i < subList.length; i++) { + let menu = subList[i] + + if (menu.visible !== false) { + return menu + } + } +} + +export default { + // 关闭快捷菜单 + _closeMenu() { + Object.assign(this.ctxMenuStore, { + visible: false, + selected: null, + selectChild: null, + showChild: false + }) + + return this.$nextTick() + }, + // 处理菜单的移动 + moveCtxMenu({ event, keyCode, ctxMenuStore, property, operKey, operRest, menuList }) { + let selectIndex = findIndexOf(menuList, (item) => ctxMenuStore[property] === item) + let selectItem + + let ruleChains = [ + { + match: () => keyCode === operKey, + action: () => { + if (!operRest || !hasChildrenList(ctxMenuStore.selected)) { + ctxMenuStore.showChild = false + ctxMenuStore.selectChild = null + } else { + ctxMenuStore.showChild = true + } + } + }, + { + match: () => keyCode === 38, + action: () => { + let subList = menuList.slice(0, selectIndex) + subList = subList.reverse() + selectItem = getSelectItem(subList) + ctxMenuStore[property] = selectItem || menuList[menuList.length - 1] + } + }, + { + match: () => keyCode === 40, + action: () => { + let subList = menuList.slice(selectIndex + 1) + selectItem = getSelectItem(subList) + ctxMenuStore[property] = selectItem || menuList[0] + } + }, + { + match: () => ctxMenuStore[property] && (keyCode === 13 || keyCode === 32), + action: () => { + this.ctxMenuLinkEvent(event, ctxMenuStore[property]) + } + } + ] + + for (let i = 0; i < ruleChains.length; i++) { + let ruleChain = ruleChains[i] + if (ruleChain.match()) { + ruleChain.action() + break + } + } + }, + // 快捷菜单事件处理 + handleGlobalContextmenuEvent(event) { + let { ctxMenuOpts, ctxMenuStore, isCtxMenu } = this + let layoutList = ['header', 'body', 'footer'] + + if (!isCtxMenu) { + this.closeMenu() + this.closeFilter() + return + } + if (ctxMenuStore.visible && this.$refs.ctxWrapper && this.getEventTargetNode(event, this.$refs.ctxWrapper.$el).flag) { + event.preventDefault() + return + } + + for (let i = 0; i < layoutList.length; i++) { + let layout = layoutList[i] + let eventTargetNode = this.getEventTargetNode(event, this.$el, `tiny-grid-${layout}__column`) + let eventParams = { $table: this, columns: this.visibleColumn.slice(0), type: layout } + + if (eventTargetNode.flag) { + let cell = eventTargetNode.targetElem + let column = this.getColumnNode(cell).item + let typePrefix = `${layout}-` + Object.assign(eventParams, { cell, column, columnIndex: this.getColumnIndex(column) }) + + if (layout === 'body') { + let row = this.getRowNode(cell.parentNode).item + typePrefix = '' + Object.assign(eventParams, { row, rowIndex: this.getRowIndex(row) }) + } + + this.openContextMenu(event, layout, eventParams) + emitEvent(this, `${typePrefix}cell-context-menu`, [eventParams, event]) + return + } + + eventTargetNode = this.getEventTargetNode(event, this.$el, `tiny-grid__${layout}-wrapper`) + + if (eventTargetNode.flag) { + if (ctxMenuOpts.trigger === 'cell') { + event.preventDefault() + } else { + this.openContextMenu(event, layout, eventParams) + } + return + } + } + this.closeMenu() + this.closeFilter() + }, + // 显示快捷菜单 + openContextMenu(event, type, params) { + let { ctxMenuOpts, ctxMenuStore } = this + let { visibleMethod } = ctxMenuOpts + let config = ctxMenuOpts[type] + if (!config) { + this.closeFilter() + return + } + let { disabled, options } = config + if (disabled) { + event.preventDefault() + this.closeFilter() + return + } + if (!options || !options.length) { + this.closeFilter() + return + } + params.options = options + let end = () => { + if (visibleMethod && !visibleMethod(params, event)) { + this.closeMenu() + return + } + event.preventDefault() + let { scrollLeft, scrollTop, visibleHeight, visibleWidth } = getDomNode() + let { clientX, clientY } = event + let left = clientX + scrollLeft + let top = clientY + scrollTop + const style = { left: `${left}px`, top: `${top}px` } + Object.assign(ctxMenuStore, { args: params, list: options, selected: null, selectChild: null, showChild: false, style, visible: true }) + let next = () => { + let ctxElem = this.$refs.ctxWrapper.$el + let { clientWidth, clientHeight } = ctxElem + let offsetLeft = clientX + clientWidth - visibleWidth + let offsetTop = clientY + clientHeight - visibleHeight + offsetLeft > -10 && (ctxMenuStore.style.left = `${left - clientWidth}px`) + offsetTop > -10 && (ctxMenuStore.style.top = `${top - clientHeight}px`) + } + this.$nextTick(next) + } + this.preventEvent(event, 'event.show_menu', params, null, end) + this.closeFilter() + }, + ctxMenuMouseoverEvent(event, item, child) { + let { ctxMenuStore } = this + + event.preventDefault() + event.stopPropagation() + + Object.assign(ctxMenuStore, { + selectChild: child, + selected: item, + target: event.target + }) + + !child && (ctxMenuStore.showChild = hasChildrenList(item)) + }, + ctxMenuMouseoutEvent(event, item) { + let { ctxMenuStore } = this + + !item.children && (ctxMenuStore.selected = null) + + Object.assign(ctxMenuStore, { + selectChild: null, + showChild: null, + target: null + }) + }, + // 快捷菜单点击事件 + ctxMenuLinkEvent(event, menu) { + if (menu.disabled || (menu.children && menu.children.length)) { + return + } + + let { ctxMenuStore } = this + let ctxMenuMethod = Menus.get(menu.code) + let params = { $table: this, menu, ...ctxMenuStore.args } + + ctxMenuMethod && ctxMenuMethod.call(this, params, event) + + emitEvent(this, 'context-menu-click', [params, event]) + this.closeMenu() + }, + toKebab(code) { + return typeof code === 'string' ? code.replace(/\B([A-Z])/g, '-$1').toLowerCase() : 'menu-code' + } +} diff --git a/packages/grid/src/menu/src/panel.js b/packages/grid/src/menu/src/panel.js new file mode 100644 index 000000000..16d866618 --- /dev/null +++ b/packages/grid/src/menu/src/panel.js @@ -0,0 +1,137 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import { getFuncText } from '@opentiny/vue-renderless/grid/utils' +import { h, $prefix } from '@opentiny/vue-common' +import Children from './children' + +const onMenuItem = ({ tableInstance, item, getEventTargetNode, toKebab }) => ({ + click(event) { + tableInstance.ctxMenuLinkEvent(event, item) + }, + mouseover(event) { + tableInstance.ctxMenuMouseoverEvent(event, item) + }, + mouseout(event) { + if (!getEventTargetNode(event, document.body, toKebab(item.code)).flag) { + tableInstance.ctxMenuMouseoutEvent(event, item) + } + } +}) + +function createMenuItem(args) { + let { ctxMenuStore, gIndex, getEventTargetNode, hasChild } = args + let { index, item, show, tableInstance, toKebab } = args + let res = [null] + + const classMap = { + linkDisabled: 'link__disabled', + linkActive: 'link__active' + } + + if (item.visible !== false) { + res = h( + 'li', + { + class: { + [classMap.linkDisabled]: item.disabled, + [classMap.linkActive]: item === ctxMenuStore.selected + }, + key: `${gIndex}_${index}` + }, + [ + h( + 'a', + { + class: `tiny-grid-menu__link ${toKebab(item.code)}`, + on: onMenuItem({ tableInstance, item, getEventTargetNode, toKebab }) + }, + [ + item.prefixIcon ? h(item.prefixIcon, { class: 'tiny-grid-menu__link-prefix' }) : [null], + h('span', { class: 'tiny-grid-menu__link-content' }, getFuncText(item.name)), + h('i', { + class: ['tiny-grid-menu__link-suffix', hasChild ? item.suffixIcon || 'suffix__haschild' : item.suffixIcon] + }) + ] + ), + hasChild ? h(Children, { props: { item, gIndex, index, show, tableInstance, ctxMenuStore } }) : [null] + ] + ) + } + + return res +} + +function getMenuItemCreator({ ctxMenuStore, getEventTargetNode, tableInstance, toKebab }) { + return (options, gIndex) => + h( + 'ul', + { + class: 'tiny-grid-menu__option-wrapper', + key: gIndex + }, + options.map((item, index) => { + const hasChild = item.children && item.children.length + const show = item === ctxMenuStore.selected && ctxMenuStore.showChild + let args = { ctxMenuStore, gIndex, getEventTargetNode, hasChild } + + Object.assign(args, { index, item, show, tableInstance, toKebab }) + + return createMenuItem(args) + }) + ) +} + +export default { + name: `${$prefix}GridContextMenu`, + props: { + ctxMenuStore: Object + }, + render() { + let { ctxMenuStore, $parent: tableInstance } = this + let { toKebab, getEventTargetNode } = tableInstance + + return h( + 'div', + { + class: [ + 'tiny-grid', + 'tiny-grid-menu__wrapper', + { + show: ctxMenuStore.visible + } + ], + style: ctxMenuStore.style + }, + ctxMenuStore.list.map( + getMenuItemCreator({ + ctxMenuStore, + getEventTargetNode, + tableInstance, + toKebab + }) + ) + ) + } +} diff --git a/packages/grid/src/radio/index.js b/packages/grid/src/radio/index.js new file mode 100644 index 000000000..8d1ccb9aa --- /dev/null +++ b/packages/grid/src/radio/index.js @@ -0,0 +1,22 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $install } from '@opentiny/vue-common' +import Radio from './src/radio' + +Radio.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +$install(Radio) + +export default Radio diff --git a/packages/grid/src/radio/src/radio.js b/packages/grid/src/radio/src/radio.js new file mode 100644 index 000000000..c81ab3f87 --- /dev/null +++ b/packages/grid/src/radio/src/radio.js @@ -0,0 +1,84 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import { h, $prefix } from '@opentiny/vue-common' + +export default { + name: $prefix + 'GridRadio', + props: { + modelValue: [String, Number], + label: [String, Number], + disabled: Boolean, + name: String, + size: String + }, + computed: { + vSize() { + return this.size || this.$parent.size || this.$parent.vSize + } + }, + setup(props, { slots }) { + return { slots } + }, + render() { + let { disabled, vSize, modelValue, label, name } = this + let $slots = this.slots + const disableClass = 'disabled' + + return h( + 'label', + { + class: [ + 'tiny-grid-radio', + { + [`size__${vSize}`]: vSize, + [`is__${disableClass}`]: disabled + } + ] + }, + [ + h('input', { + attrs: { + type: 'radio', + name, + disabled + }, + domProps: { + checked: modelValue === label + }, + on: { + change: (event) => { + if (!disabled) { + this.$emit('update:modelValue', label) + this.$emit('change', label, event) + } + } + } + }), + h('span', { class: 'tiny-grid-radio__icon' }), + $slots.default ? h('span', { class: 'tiny-grid-radio__label' }, $slots.default()) : null + ] + ) + } +} diff --git a/packages/grid/src/resize/index.js b/packages/grid/src/resize/index.js new file mode 100644 index 000000000..be85f69e3 --- /dev/null +++ b/packages/grid/src/resize/index.js @@ -0,0 +1,20 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import TINYGrid from '../adapter' +import Methods from './src/methods' + +export default { + install(Table) { + TINYGrid._resize = 1 + Object.assign(Table.methods, Methods) + } +} diff --git a/packages/grid/src/resize/src/methods.js b/packages/grid/src/resize/src/methods.js new file mode 100644 index 000000000..67488f0b0 --- /dev/null +++ b/packages/grid/src/resize/src/methods.js @@ -0,0 +1,42 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import Resize from '@opentiny/vue-renderless/grid/plugins/resize' +import GlobalConfig from '../../config' + +export default { + bindResize() { + const resizeObserver = new Resize(this.recalculate, GlobalConfig.resizeInterval) + + resizeObserver.observe(this.getParentElem()) + this.$resize = resizeObserver + }, + unbindResize() { + const $resize = this.$resize + + if ($resize) { + $resize.disconnect() + } + } +} diff --git a/packages/grid/src/table/index.js b/packages/grid/src/table/index.js new file mode 100644 index 000000000..41bf1c9ff --- /dev/null +++ b/packages/grid/src/table/index.js @@ -0,0 +1,21 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Table from './src/table' +import TINYGrid from '../adapter' + +Table.install = function (Vue) { + TINYGrid.Vue = Vue + TINYGrid.Table = Table + Vue.component(Table.name, Table) +} + +export default Table diff --git a/packages/grid/src/table/src/events.js b/packages/grid/src/table/src/events.js new file mode 100644 index 000000000..4a7331f38 --- /dev/null +++ b/packages/grid/src/table/src/events.js @@ -0,0 +1,261 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import { + handleGlobalMousedownOnFilterWrapper, + handleGlobalMousedownOnCtxMenu, + handleGlobalBlurOutside, + handleGlobalIsClear, + handleGlobalClearActived +} from './utils/handleGlobalMousedownEvent' +import { findTree } from '@opentiny/vue-renderless/grid/static/' +import { setCellValue, hasChildrenList } from '@opentiny/vue-renderless/grid/utils' +import { checkOtherKey } from './utils/handleOtherKeyDown' +import { onGlobalKeydown } from './utils/handleGlobalKeydownEvent' + +// 全局按下事件处理 +export function handleGlobalMousedownEvent(event) { + let { $el, ctxMenuStore, editConfig = {}, filterStore } = this + let { filterWrapper, validTip } = this.$refs + let { actived } = this.editStore + // 过滤面板 + handleGlobalMousedownOnFilterWrapper({ $el, _vm: this, event, filterStore, filterWrapper }) + // 如果已激活了编辑状态 + if (actived.row && !(editConfig.autoClear === false)) { + if (handleGlobalBlurOutside({ _vm: this, actived, event })) { + return + } + if (validTip && this.getEventTargetNode(event, validTip.$el).flag) { + // 如果是激活状态,且点击了校验提示框 + } else if (!this.lastCallTime || this.lastCallTime + 50 < Date.now()) { + // 如果手动调用了激活单元格,避免触发源被移除后导致重复关闭 + this.preventEvent(event, 'event.clear_actived', actived.args, () => { + let isClear + let isReadonlyCol = !this.getEventTargetNode(event, $el, 'col__edit').flag + isClear = handleGlobalIsClear({ $el, _vm: this, actived, editConfig, event, isClear, isReadonlyCol }) + handleGlobalClearActived({ $el, _vm: this, event, isClear }) + }) + } + } + // 如果配置了快捷菜单且,点击了其他地方则关闭 + handleGlobalMousedownOnCtxMenu({ _vm: this, ctxMenuStore, event }) +} + +// 窗口失焦事件处理 +export function handleGlobalBlurEvent() { + this.closeFilter() + this.closeMenu() +} + +// 全局滚动事件 +export function handleGlobalMousewheelEvent(event) { + this.updateScrollLoadBar(event) + this.clostTooltip() + this.closeMenu() +} + +export function handleEscKeyDown({ event, actived, mouseConfig }) { + this.closeMenu() + this.closeFilter() + // 如果是激活编辑状态,则取消编辑 + if (actived.row) { + this.clearActived(event) + // 如果配置了选中功能,则为选中状态 + if (mouseConfig.selected) { + this.$nextTick(() => this.handleSelected(actived.args, event)) + } + } +} + +export function handleEnterKeyDown({ event, selected, actived }) { + const { highlightCurrentRow, currentRow, treeConfig } = this + let isLeftArrow = event.keyCode === 37 + let isUpArrow = event.keyCode === 38 + let isRightArrow = event.keyCode === 39 + // 如果是激活状态,退则出到下一行 + if (selected.row || actived.row) { + this.moveSelected({ args: selected.row ? selected.args : actived.args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow: true, event }) + } else if (treeConfig && highlightCurrentRow && currentRow) { + // 如果是树形表格当前行回车移动到子节点 + let childrens = currentRow[treeConfig.children] + if (childrens && childrens.length) { + event.preventDefault() + let targetRow = childrens[0] + this.setTreeExpansion(currentRow, true) + .then(() => this.scrollToRow(targetRow)) + .then(() => this.triggerCurrentRowEvent(event, { $table: this, row: targetRow })) + } + } +} + +export function handleCtxMenu({ event }) { + const { ctxMenuStore } = this + event.preventDefault() + if (ctxMenuStore.showChild && hasChildrenList(ctxMenuStore.selected)) { + this.moveCtxMenu({ + event, + keyCode: event.keyCode, + ctxMenuStore, + property: 'selectChild', + operKey: 37, + operRest: false, + menuList: ctxMenuStore.selected.children + }) + } else { + this.moveCtxMenu({ event, keyCode: event.keyCode, ctxMenuStore, property: 'selected', operKey: 39, operRest: true, menuList: this.ctxMenuList }) + } +} + +export function handleArrowKeyDown({ event, selected }) { + const { highlightCurrentRow, currentRow } = this + let isLeftArrow = event.keyCode === 37 + let isUpArrow = event.keyCode === 38 + let isRightArrow = event.keyCode === 39 + let isDownArrow = event.keyCode === 40 + if (selected.row && selected.column) { + this.moveSelected({ args: selected.args, isLeftArrow, isUpArrow, isRightArrow, isDownArrow, event }) + } else if ((isUpArrow || isDownArrow) && highlightCurrentRow && currentRow) { + // 当前行按键上下移动 + this.moveCurrentRow(isUpArrow, isDownArrow, event) + } +} + +export function handleDelKeyDown({ event, selected }) { + const { keyboardConfig = {}, treeConfig, highlightCurrentRow, currentRow } = this + const isBack = event.keyCode === 8 + if (keyboardConfig.isDel && (selected.row || selected.column)) { + setCellValue(selected.row, selected.column, null) + if (isBack) { + this.handleActived(selected.args, event) + } + } else if (isBack && keyboardConfig.isArrow && treeConfig && highlightCurrentRow && currentRow) { + // 如果树形表格回退键关闭当前行返回父节点 + let { parent: parentRow } = findTree(this.afterFullData, (item) => item === currentRow, treeConfig) + if (parentRow) { + event.preventDefault() + this.setTreeExpansion(parentRow, false) + .then(() => this.scrollToRow(parentRow)) + .then(() => this.triggerCurrentRowEvent(event, { $table: this, row: parentRow })) + } + } +} + +export function handleSpaceKeyDown({ event, selected }) { + event.preventDefault() + if (selected.column.type === 'selection') { + this.handleToggleCheckRowEvent(selected.args, event) + } else { + this.triggerRadioRowEvent(event, selected.args) + } +} + +export function handleTabKeyDown({ event, selected, actived }) { + const isShiftKey = event.shiftKey + const useTab = this.editConfig.useTab + // 如果按下了 Tab 键切换 + if (selected.row || selected.column) { + this.moveTabSelected(selected.args, isShiftKey, event, useTab) + } else if (actived.row || actived.column) { + this.moveTabSelected(actived.args, isShiftKey, event, useTab) + } +} + +export function handleCopyKeyDown({ event }) { + if (event.keyCode === 65) { + this.handleAllChecked(event) + } else if (event.keyCode === 88 || event.keyCode === 67) { + this.handleCopyed(event.keyCode === 88, event) + } else { + this.handlePaste(event) + } +} + +export function handleF2KeyDown({ event, selected }) { + if (selected.row && selected.column) { + event.preventDefault() + this.handleActived(selected.args, event) + } +} + +export function handleOtherKeyDown({ event, selected }) { + const { keyboardConfig = {} } = this + const keyCode = event.keyCode + const isOtherKey = checkOtherKey(keyCode) + if ( + isOtherKey && + selected.column && + selected.row && + selected.column.editor && + (!keyboardConfig.editMethod || !(keyboardConfig.editMethod(selected.args, event) === false)) + ) { + // 如果是按下非功能键之外允许直接编辑 + setCellValue(selected.row, selected.column, null) + this.handleActived(selected.args, event) + } +} + +// 全局键盘事件 +export function handleGlobalKeydownEvent(event) { + this.preventEvent(event, 'event.keydown', { $table: this }, () => { + onGlobalKeydown(event, this) + }) +} + +export function handleGlobalResizeEvent() { + this.recalculate() +} + +// 触发表头 tooltip 事件 +export function triggerHeaderTooltipEvent(event, params) { + let { tooltipStore } = this + let { column, showHeaderTip } = params + if (tooltipStore.column !== column || !tooltipStore.visible) { + // 在 v3.0 中废弃 label + this.handleTooltip(event, column, null, showHeaderTip, true) + } +} + +// 触发表尾 tooltip 事件 +export function triggerFooterTooltipEvent(event, params) { + let { column } = params + let tooltipStore = this.tooltipStore + if (tooltipStore.column !== column || !tooltipStore.visible) { + this.handleTooltip(event, column) + } +} + +// 触发 tooltip 事件 +export function triggerTooltipEvent(event, params) { + let { editConfig, editStore, tooltipStore } = this + let { actived } = editStore + let { row, column, showTip } = params + if (editConfig) { + if ((editConfig.mode === 'row' && actived.row === row && column.editor) || (actived.row === row && actived.column === column)) { + return + } + } + if (tooltipStore.column !== column || tooltipStore.row !== row || !tooltipStore.visible) { + this.handleTooltip(event, column, row, showTip) + } +} diff --git a/packages/grid/src/table/src/funcs.js b/packages/grid/src/table/src/funcs.js new file mode 100644 index 000000000..d0801a58b --- /dev/null +++ b/packages/grid/src/table/src/funcs.js @@ -0,0 +1,164 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Modal from '@opentiny/vue-modal' +import GlobalConfig from '../../config' +import { warn } from '../../tools' +import { isArray, get } from '@opentiny/vue-renderless/grid/static/' +import { preprocessDataObjectFormat, preventDupRender, handleResolveColumnComplete } from './utils/handleResolveColumn' + +// Module methods +export const funcs = [ + 'closeMenu', + 'getMouseSelecteds', + 'getMouseCheckeds', + 'clearCopyed', + 'clearChecked', + 'clearHeaderChecked', + 'clearIndexChecked', + 'clearSelected', + 'insert', + 'insertAt', + 'remove', + 'removeSelecteds', + 'revert', + 'revertData', + 'getRecordset', + 'getInsertRecords', + 'getRemoveRecords', + 'getUpdateRecords', + 'clearActived', + 'getActiveRow', + 'hasActiveRow', + 'setActiveRow', + 'setActiveCell', + 'setSelectCell', + 'clearValidate', + 'fullValidate', + 'validate', + 'exportCsv', + 'exportExcel' +] + +// 分组表头的属性 +export const headerProps = { + children: 'children' +} + +export const getSortColumns = (columns) => { + const left = [] + const right = [] + const center = [] + + columns.forEach((col) => { + const fixed = col.fixed + + if (fixed === 'left') { + left.push(col) + } else if (fixed === 'right') { + right.push(col) + } else { + center.push(col) + } + }) + + return left.concat(center).concat(right) +} + +export const onEndEvent = ({ event, _this }) => { + const { item, newIndex, oldIndex } = event + let { fullColumn, tableColumn } = _this.getTableColumn() + const sortVisibleCols = getSortColumns(tableColumn) + let targetThElem = item + let wrapperElem = targetThElem.parentNode + let newColumn = sortVisibleCols[newIndex] + + if (newColumn.fixed) { + // 错误的移动 + if (newIndex > oldIndex) { + for (let i = newIndex; i >= oldIndex; i--) { + wrapperElem.insertBefore(targetThElem, wrapperElem.children[i]) + } + } else { + for (let i = newIndex; i <= oldIndex; i++) { + wrapperElem.insertBefore(targetThElem, wrapperElem.children[i]) + } + + wrapperElem.insertBefore(wrapperElem.children[oldIndex], targetThElem) + } + + return Modal.message({ + message: GlobalConfig.i18n('ui.grid.error.dargFixed'), + status: 'error' + }) + } + // 转换真实索引 + let oldColumnIndex = _this.getColumnIndex(sortVisibleCols[oldIndex]) + let newColumnIndex = _this.getColumnIndex(sortVisibleCols[newIndex]) + // 移动到目标列 + let currCol = fullColumn.splice(oldColumnIndex, 1)[0] + + fullColumn.splice(newColumnIndex, 0, currCol) + _this.loadColumn(fullColumn) + _this.$emit('column-drop-end', event, _this) + + _this.isDragHeaderSorting && _this.$grid.toolBarVm && _this.$grid.toolBarVm.updateSetting() +} + +export const handleAllColumnPromises = (opt, ctx) => { + let { startIndex, fetchColumns, tableData, asyncRenderMap, isScrollLoad } = opt + return (data) => { + if (data.length) { + // 【data属性设置表格数据且开启可视区】防止 渲染导致滚动条跳动(跳到初始位置) + ctx._isUpdateData = true + data.forEach((item, i) => { + let columnValues = [] + let columnValuesMap = {} + let k = startIndex // 查找起始位置 + let renderCount = 0 + let columnCount = 0 + const columnData = [] + const { format = {}, property } = fetchColumns[i] + const { splitConfig = {}, fields = {}, complete } = format.async || {} + + columnValues = isArray(item) ? item : get(item, fields.data || 'values') + columnCount = columnValues.length + // 预处理数据对象格式 + preprocessDataObjectFormat({ columnCount, columnValues, columnValuesMap, fields }) + for (let len = tableData.length; k < len; k++) { + const row = tableData[k] + const cellTexts = [] + const uniqueKey = ctx.getAsyncColumnUniqueKey(property, row) + const cellValuesCount = asyncRenderMap[uniqueKey] + const asyncColumnName = ctx.getAsyncColumnName(property) + const isRender = !!row[asyncColumnName] + let args = { asyncColumnName, cellTexts, cellValuesCount, columnData } + Object.assign(args, { columnValuesMap, isRender, property, renderCount, row, splitConfig }) + // 防止重复渲染 + renderCount = preventDupRender(args) + // 针对可视区滚动优化 + if (isScrollLoad && renderCount >= columnCount) { + break + } + } + format.data = columnData + // 用户自定义缓存机制的接口 + handleResolveColumnComplete({ _vm: ctx, columnData, complete }) + }) + ctx.tableData = ctx.tableData.slice(0) + ctx.$nextTick(() => { + ctx._isUpdateData = false + }) + } else { + warn('Unknown error:the query data is empty.') + } + } +} diff --git a/packages/grid/src/table/src/methods.js b/packages/grid/src/table/src/methods.js new file mode 100644 index 000000000..bebf57753 --- /dev/null +++ b/packages/grid/src/table/src/methods.js @@ -0,0 +1,2135 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import { getColumnList } from '@opentiny/vue-renderless/grid/utils' +import { toDecimal } from '@opentiny/vue-renderless/common/string' +import { getStyle } from '@opentiny/vue-renderless/common/deps/dom' +import { addClass, removeClass } from '@opentiny/vue-renderless/common/deps/dom' +import debounce from '@opentiny/vue-renderless/common/deps/debounce' +// prettier-ignore +import { isNumber, filterTree, remove, isArray, isBoolean, findTree, set, get, has, eachTree, arrayEach, sortBy, isUndefined, toNumber, isEqual, mapTree, clone, destructuring, clear, sum, find, toStringJSON, toArray } from '@opentiny/vue-renderless/grid/static/' +import browser from '@opentiny/vue-renderless/common/browser' +// prettier-ignore +import { isPx, isScale, colToVisible, getCell, getEventTargetNode, rowToVisible, setCellValue, getRowid, emitEvent } from '@opentiny/vue-renderless/grid/utils' +import Cell from '../../cell' +import { error, warn } from '../../tools' +import TINYGrid, { Interceptor } from '../../adapter' +import GlobalConfig from '../../config' +import { handleLayout } from './utils/updateStyle' +import { createTooltipRange, processContentMethod } from './utils/handleTooltip' +import { hasCheckField, hasNoCheckField } from './utils/handleSelectRow' +// prettier-ignore +import { isTargetRadioOrCheckbox, onClickExpandColumn, onClickTreeNodeColumn, onHighlightCurrentRow, onClickRadioColumn, onClickSelectColumn, onClickCellSelect } from './utils/triggerCellClickEvent' +import { onGroupHeader, reassignNotFixed, reassignFixedRight, reassignFixedLeft, showGroupFixedError, onScrollXLoad } from './utils/refreshColumn' +// prettier-ignore +import { handleFilterConditionCustom, handleFilterConditionExtend, handleFilterRelations, handleFilterCheckStr, handleFilterCheck } from './utils/handleLocalFilter' +import { hasCheckFieldNoStrictly, hasNoCheckFieldNoStrictly, setSelectionNoStrictly } from './utils/setAllSelection' +import { mapFetchColumnPromise } from './utils/handleResolveColumn' +import { computeScrollYLoad, computeScrollXLoad } from './utils/computeScrollLoad' +import { createHandlerOnEnd } from './utils/rowDrop' +import { calcTableWidth } from './utils/autoCellWidth' +import { funcs, headerProps, onEndEvent, handleAllColumnPromises } from './funcs' +import { + triggerHeaderTooltipEvent, + triggerFooterTooltipEvent, + triggerTooltipEvent, + handleGlobalMousedownEvent, + handleGlobalBlurEvent, + handleGlobalMousewheelEvent, + handleArrowKeyDown, + handleCopyKeyDown, + handleCtxMenu, + handleDelKeyDown, + handleEnterKeyDown, + handleEscKeyDown, + handleF2KeyDown, + handleOtherKeyDown, + handleSpaceKeyDown, + handleTabKeyDown, + handleGlobalKeydownEvent, + handleGlobalResizeEvent +} from './events' + +import { getRowUniqueId, getTableRowKey, getTotalRows, setTreeScrollYCache, sliceFullData, sliceVisibleColumn } from './strategy' + +let run = (names, $table) => names.forEach((name) => $table[name].apply($table)) +let isWebkit = browser['-webkit'] && browser.name !== 'edge' +let debounceScrollDirDuration = browser.name === 'ie' ? 40 : 20 +let debounceScrollLoadDuration = 200 +let AsyncCollectTimeout = 100 +let focusSingle = null + +const Methods = { + // 处理列拖拽 + columnDrop() { + this.$nextTick(() => { + const { plugin, onBeforeMove, filter } = this.dropConfig + this.columnSortable = plugin.create(this.$el.querySelector('.body__wrapper>.tiny-grid__header .tiny-grid-header__row'), { + handle: '.tiny-grid-header__column:not(.col__fixed)', + filter, + onEnd: (event) => { + onEndEvent({ event, _this: this }) + }, + onStart: (event) => { + this.$emit('column-drop-start', event, this) + }, + onMove: (event) => { + const cancel = typeof onBeforeMove === 'function' ? onBeforeMove('column', null, event, this) : true + this.$emit('column-drop-move', event, this) + return cancel === undefined || cancel + } + }) + }) + }, + // 处理行拖拽 + rowDrop() { + this.$nextTick(() => { + const { plugin, onBeforeMove, filter, refresh = true, trigger } = this.dropConfig + this.rowSortable = plugin.create(this.$el.querySelector('.body__wrapper>.tiny-grid__body tbody'), { + handle: trigger || '.tiny-grid-body__row', + filter, + onEnd: createHandlerOnEnd({ _vm: this, refresh }), + onStart: (event) => { + this.$emit('row-drop-start', event, this) + }, + onMove: (event) => { + let targetTrElem = event.dragged + let selfRow = this.getRowNode(targetTrElem).item + const cancel = typeof onBeforeMove === 'function' ? onBeforeMove('row', selfRow, event, this) : true + this.$emit('row-drop-move', event, this) + return cancel === undefined || cancel + } + }) + }) + }, + getParentElem() { + let $el = this.$grid ? this.$grid.$el : this.$el + return $el.parentNode + }, + getParentHeight() { + return this.$grid ? this.$grid.getParentHeight() : this.getParentElem().clientHeight + }, + clearAll(silent) { + run(['clearScroll', 'clearSort', 'clearCurrentRow', 'clearCurrentColumn'], this) + run(['clearSelection', 'clearRowExpand', 'clearTreeExpand'], this) + if (TINYGrid._filter) { + this.clearFilter(silent) + } + if (this.keyboardConfig || this.mouseConfig) { + run(['clearIndexChecked', 'clearHeaderChecked', 'clearChecked', 'clearSelected', 'clearCopyed'], this) + } + return this.clearActived() + }, + refreshData() { + let next = () => { + this.tableData = [] + return this.loadTableData(this.tableFullData) + } + return this.$nextTick().then(next) + }, + refreshStyle() { + let { $el, rowSpan, spanMethod } = this + // 存在合并时才刷新样式 + if ($el && (rowSpan || spanMethod)) { + let transform = $el.style.transform + let restore = () => + setTimeout(() => { + $el.style.transform = transform + }) + $el.style.transform = 'scale(0.99999)' + return this.$nextTick().then(restore) + } + return this.$nextTick() + }, + updateData() { + return this.handleTableData(true) + .then(() => this.updateFooter()) + .then(() => this.recalculate()) + }, + handleTableData(force) { + let { scrollYLoad, scrollYStore, treeConfig, treeExpandeds, parentRowMap } = this + let { renderSize, startIndex } = scrollYStore + let afterFullData = force ? this.updateAfterFullData() : this.afterFullData + + this.tableData = sliceFullData({ afterFullData, renderSize, scrollYLoad, startIndex, treeConfig, treeExpandeds, parentRowMap }) + run(['updateScrollStatus', 'buildGroupData'], this) + return this.$nextTick() + }, + loadTableData(datas, notRefresh) { + let { $refs, editStore, height, maxHeight } = this + let { lastScrollLeft, lastScrollTop } = this + let { scrollY } = this.optimizeOpts + let tableFullData = isArray(datas) ? datas.slice(0) : [] + let scrollYLoad = scrollY && scrollY.gt > 0 && scrollY.gt <= tableFullData.length + + Object.assign(editStore, { insertList: [], removeList: [] }) + // 全量数据 + Object.assign(this, { tableFullData }) + // 缓存数据 + this.updateCache(true) + // 原始数据 + Object.assign(this, { + tableSynchData: datas, + tableSourceData: clone(tableFullData, true), + scrollYLoad + }) + if (scrollYLoad && !(height || maxHeight)) { + error('ui.grid.error.scrollYHeight') + } + this.clearScroll() + this.handleTableData(true) + run(['reserveCheckSelection', 'checkSelectionStatus'], this) + let first = () => !notRefresh && this.recalculate() + let second = () => { + if (lastScrollLeft || lastScrollTop) { + return this.scrollTo(lastScrollLeft, lastScrollTop) + } else { + let headerElem = $refs.tableHeader ? $refs.tableHeader.$el : null + headerElem && (headerElem.scrollLeft = 0) + } + } + return this.$nextTick().then(first).then(second) + }, + reloadData(datas) { + return this.clearAll() + .then(() => this.loadTableData(datas)) + .then(() => this.handleDefault()) + }, + loadData(datas) { + return new Promise((resolve) => { + this.loadTableData(datas) + resolve() + }).then(this.recalculate) + }, + reloadRow(row, record, field) { + let { tableData, tableSourceData } = this + let rowIndex = this.getRowIndex(row) + let originRow = tableSourceData[rowIndex] + let hasSrc = originRow && row + let hasSrcNoField = hasSrc && !field + if (hasSrc && field) { + set(originRow, field, get(record || row, field)) + } + if (hasSrcNoField && record) { + tableSourceData[rowIndex] = record + clear(row, undefined) + Object.assign(row, this.defineField({ ...record })) + this.updateCache(true) + } + if (hasSrcNoField && !record) { + destructuring(originRow, clone(row, true)) + } + this.tableData = tableData.slice(0) + return this.$nextTick() + }, + reloadColumn(columns) { + return this.clearAll().then(() => this.loadColumn(columns)) + }, + loadColumn(columns) { + return new Promise((resolve) => { + this.collectColumn = mapTree(columns, (column) => Cell.createColumn(this, column), headerProps) + resolve() + }).then(() => this.$nextTick()) + }, + // 更新数据的 Map + updateCache(source) { + let { fullAllDataRowIdData, fullAllDataRowMap, fullDataRowIdData, fullDataRowMap, tableFullData, treeConfig } = this + let rowKey = getTableRowKey(this) + let buildRowCache = (row, index) => { + let rowId = getRowid(this, row) + if (!rowId) { + rowId = getRowUniqueId() + set(row, rowKey, rowId) + } + let rowCache = { row, rowid: rowId, index } + if (source) { + fullDataRowIdData[rowId] = rowCache + fullDataRowMap.set(row, rowCache) + } + fullAllDataRowIdData[rowId] = rowCache + fullAllDataRowMap.set(row, rowCache) + } + + let clearCache = () => { + fullAllDataRowIdData = {} + this.fullAllDataRowIdData = fullAllDataRowIdData + fullAllDataRowMap.clear() + if (source) { + fullDataRowIdData = {} + this.fullDataRowIdData = fullDataRowIdData + fullDataRowMap.clear() + } + } + clearCache() + if (treeConfig) { + eachTree(tableFullData, buildRowCache, treeConfig) + } else { + tableFullData.forEach(buildRowCache) + } + }, + // 在新增或删除数据时,更新数据缓存 + modifyCache() { + let { treeConfig, tableFullData, fullDataRowIdData, fullDataRowMap, fullAllDataRowMap, fullAllDataRowIdData } = this + let handleCache = (row, index) => { + let rowid = getRowid(this, row) + let rest = { row, rowid, index } + fullDataRowIdData[rowid] = rest + fullDataRowMap.set(row, rest) + fullAllDataRowIdData[rowid] = rest + fullAllDataRowMap.set(row, rest) + } + + if (treeConfig) { + eachTree(tableFullData, handleCache, treeConfig) + } else { + tableFullData.forEach(handleCache) + } + }, + // 更新列的 Map + cacheColumnMap() { + let { fullColumnMap, tableFullColumn: fullColumn } = this + let fullColumnIdData = {} + this.fullColumnIdData = fullColumnIdData + Map.prototype.clear.apply(fullColumnMap) + fullColumn.forEach((column, index) => { + let colCache = { colid: column.id, column, index } + fullColumnIdData[column.id] = colCache + fullColumnMap.set(column, colCache) + }) + }, + getRowNode(tr) { + if (!tr) { + return null + } + + let { fullAllDataRowIdData, tableFullData, treeConfig } = this + let dataRowid = tr.getAttribute('data-rowid') + if (treeConfig) { + let matches = findTree(tableFullData, (row) => getRowid(this, row) === dataRowid, treeConfig) + if (matches) { + return matches + } + } else { + if (fullAllDataRowIdData[dataRowid]) { + let rowCache = fullAllDataRowIdData[dataRowid] + return { + item: rowCache.row, + index: rowCache.index, + items: tableFullData + } + } + } + return null + }, + getColumnNode(cell) { + if (!cell) { + return null + } + let { isGroup, fullColumnIdData, tableFullColumn } = this + let dataColid = cell.getAttribute('data-colid') + if (isGroup) { + let matches = findTree(tableFullColumn, (column) => column.id === dataColid, headerProps) + if (matches) { + return matches + } + } else { + let colCache = fullColumnIdData[dataColid] + return { + index: colCache.index, + item: colCache.column, + items: tableFullColumn + } + } + return null + }, + getRowIndex(row) { + let { fullDataRowMap } = this + return fullDataRowMap.has(row) ? fullDataRowMap.get(row).index : -1 + }, + getColumnIndex(column) { + let { fullColumnMap } = this + return fullColumnMap.has(column) ? fullColumnMap.get(column).index : -1 + }, + hasIndexColumn(column) { + return column && column.type === 'index' + }, + defineField(row, copy) { + if (!row || typeof row !== 'object') { + return row + } + if (copy) { + row = clone(row, true) + } + let { visibleColumn } = this + let rowKey = getTableRowKey(this) + + visibleColumn.forEach(({ property, editor }) => { + let propNotExist = property && !has(row, property) + let propDefaultValue = editor && !isUndefined(editor.defaultValue) ? editor.defaultValue : null + if (propNotExist) { + set(row, property, propDefaultValue) + } + }) + // 如果行数据的唯一主键不存在,则生成 + if (!get(row, rowKey)) { + set(row, rowKey, getRowUniqueId()) + } + return row + }, + isTemporaryRow(row) { + let rowid = getRowid(this, row) + return find(this.temporaryRows, (r) => rowid === getRowid(this, r)) + }, + createData(records, copy) { + let isArr = isArray(records) + if (!isArr) { + records = [records] + } + let tmp = records.map((record) => this.defineField(record, copy)) + return new Promise((resolve) => { + resolve(isArr ? tmp : tmp[0]) + }) + }, + createRow(records) { + return this.createData(records, true) + }, + + /* + * 清空单元格内容: + * 如果不传参数,则清空整个表格内容; + * 如果传row,则清空一行内容; + * 如果传rows,则清空多行内容; + * 如果还额外传了field,则清空指定单元格内容; + */ + clearData(rows, field) { + rows = !arguments.length ? this.tableFullData : rows && !isArray(rows) ? [rows] : rows + rows.forEach((row) => { + if (field) { + set(row, field, null) + } else { + this.visibleColumn.forEach((column) => { + column.property && setCellValue(row, column, null) + }) + } + }) + return this.$nextTick() + }, + hasRowInsert(row) { + return ~this.editStore.insertList.indexOf(row) + }, + hasRowChange(row, field) { + let { fullDataRowIdData, tableSourceData, treeConfig, visibleColumn } = this + let argsLength = arguments.length + let rowId = getRowid(this, row) + let originRow + // 新增的数据不需要检测 + if (this.isTemporaryRow(row)) { + return false + } + if (treeConfig) { + let children = treeConfig.children + let matches = findTree(tableSourceData, (item) => rowId === getRowid(this, item), treeConfig) + row = { ...row, [children]: null } + if (matches) { + originRow = { ...matches.item, [children]: null } + } + } else { + let originRowIndex = fullDataRowIdData[rowId].index + originRow = tableSourceData[originRowIndex] + } + if (originRow) { + if (argsLength > 1) { + return !isEqual(get(originRow, field), get(row, field)) + } + + for (let i = 0; i < visibleColumn.length; i++) { + let { property } = visibleColumn[i] + if (property && !isEqual(get(originRow, property), get(row, property))) { + return true + } + } + } + return false + }, + // 获取表格所有列 + getColumns(columnIndex) { + let { visibleColumn: columns } = this + let argsLength = arguments.length + return argsLength ? columns[columnIndex] : columns.slice(0) + }, + getColumnById(colid) { + let { fullColumnIdData } = this + let colCache = fullColumnIdData[colid] + return colCache ? colCache.column : null + }, + getColumnByField(field) { + let { visibleColumn: columns } = this + return typeof field === 'string' && field ? find(columns, (column) => column.property === field) : null + }, + // 获取当前表格的列(完整的全量表头列、处理条件之后的全量表头列、当前渲染中的表头列) + getTableColumn() { + let { collectColumn, tableColumn, tableFullColumn, visibleColumn } = this + return { + fullColumn: tableFullColumn.slice(0), + visibleColumn: visibleColumn.slice(0), + tableColumn: tableColumn.slice(0), + collectColumn: collectColumn.slice(0) + } + }, + // 在v3.0中废弃getRecords + getRecords() { + warn('ui.grid.error.delGetRecords') + return this.getData.apply(this, arguments) + }, + // 获取表格所有数据 + getData(rowIndex) { + let tableSynchData = this.data || this.tableSynchData + if (!arguments.length) { + return tableSynchData.slice(0) + } + if (typeof rowIndex === 'number' && rowIndex > -1) { + return tableSynchData[rowIndex] + } + return undefined + }, + // 在v3.0中废弃getAllRecords + getAllRecords() { + warn('ui.grid.error.delGetAllRecords') + return this.getRecordset() + }, + // 获取选中数据。notCopy为true不返回数据副本,表格内部要继续处理其返回值时设置为true + getSelectRecords(notCopy) { + let { selectConfig = {}, selection } = this + let { tableFullData, treeConfig } = this + let { checkField } = selectConfig + let { rowList = [] } = {} + if (checkField && treeConfig) { + rowList = filterTree(tableFullData, (row) => get(row, checkField), treeConfig) + } + if (checkField && !treeConfig) { + rowList = tableFullData.filter((row) => get(row, checkField)) + } + if (!checkField && treeConfig) { + rowList = filterTree(tableFullData, (row) => ~selection.indexOf(row), treeConfig) + } + if (!checkField && !treeConfig) { + rowList = tableFullData.filter((row) => ~selection.indexOf(row)) + } + return notCopy ? rowList : clone(rowList, true) + }, + handleLocalFilter(row, column) { + let { property } = column + let { + filter: { condition, method, inputFilter } + } = column + let ret = handleFilterConditionCustom({ column, condition, method, property, row }) + if (ret.flag) { + return ret.result + } + ret = handleFilterConditionExtend({ column, condition, property, row }) + if (ret.flag) { + return ret.result + } + let { empty, input, relation, value } = condition + let { method: relationMethod } = condition + let relations = handleFilterRelations({ inputFilter }) + let checkStr = handleFilterCheckStr({ column, relationMethod, relations, row }) + let check = handleFilterCheck({ checkStr, empty, input, property, relation, row, valueList: value }) + return check() + }, + // 对数据进行筛选和排序,获取处理后数据。服务端筛选和排序,在接口调用时已传入参数 + updateAfterFullData() { + let { remoteFilter, remoteSort, tableFullData, visibleColumn } = this + let tableData = tableFullData + let sortColumn = find(visibleColumn, (column) => column.order) + let filterColumn = visibleColumn.filter(({ filter }) => !!filter) + let doTableSort = () => { + let { order, property } = sortColumn + let params = { $table: this, column: sortColumn, data: tableData, order, property } + tableData = this.sortMethod(params) || tableData + } + let doColumnSort = () => { + let sorted = sortColumn.sortMethod + ? tableData.sort(sortColumn.sortMethod) + : sortBy(tableData, sortColumn.sortBy ? sortColumn.sortBy : sortColumn.property) + tableData = sortColumn.order === 'desc' ? sorted.reverse() : sorted + } + + tableData = tableData.filter((row) => filterColumn.every((column) => (remoteFilter ? true : this.handleLocalFilter(row, column)))) + + if (sortColumn && sortColumn.order) { + let isRemote = isBoolean(sortColumn.remoteSort) ? sortColumn.remoteSort : remoteSort + !isRemote && this.sortMethod && doTableSort() + !isRemote && !this.sortMethod && doColumnSort() + } + this.afterFullData = tableData + setTreeScrollYCache(this) + return tableData + }, + buildGroupData() { + let { rowGroup, tableData } = this + Object.assign(this, { groupData: {}, groupFolds: [] }) + if (!rowGroup) { + return + } + let { groups = {}, current = '' } = {} + for (let rowIndex in tableData) { + if (Object.prototype.hasOwnProperty.call(tableData, rowIndex)) { + let row = tableData[rowIndex] + let rowid = getRowid(this, row) + let { field } = rowGroup + let prevRow = tableData[rowIndex - 1] + + if (!prevRow || prevRow[field] !== row[field]) { + current = rowid + groups[rowid] = { fold: false, children: [row] } + } else { + groups[current].children.push(row) + } + } + } + this.groupData = groups + }, + getRowById(rowid) { + let { fullDataRowIdData } = this + let rowCache = fullDataRowIdData[rowid] + return rowCache ? rowCache.row : null + }, + // 获取处理后的表格数据 + getTableData() { + let { afterFullData, footerData, tableData, tableFullData } = this + return { + visibleData: afterFullData.slice(0), + footerData: footerData.slice(0), + tableData: tableData.slice(0), + fullData: tableFullData.slice(0) + } + }, + handleDefault() { + // 异步列(请求与直接设置props>data) + this.handleAsyncColumn(this.tableData) + this.selectConfig && this.handleSelectionDefChecked() + this.radioConfig && this.handleRadioDefChecked() + this.expandConfig && this.handleDefaultRowExpand() + this.treeConfig && this.handleDefaultTreeExpand() + this.updateFooter() + this.$nextTick(() => setTimeout(this.recalculate)) + }, + // 动态列处理 + mergeCustomColumn(customColumns, sort, colWidth) { + let { isGroup, tableFullColumn: fullColumn } = this + let mergeWidth = (col) => colWidth && Object.assign(col, colWidth[col.property]) + let getCustomCol = (col) => findTree(customColumns, (item) => col.property && item.property === col.property) + let hasCustomsOrColWidth = customColumns.length || colWidth + let isGroupOrNonSort = isGroup || !sort + let matches + + this.isUpdateCustoms = true + // 不排序时直接合并属性 + if (hasCustomsOrColWidth && isGroupOrNonSort) { + fullColumn.forEach((column) => { + mergeWidth(column) + matches = getCustomCol(column) + matches && Object.assign(column, matches.item) + }) + } + // 排序处理非嵌套列的情况 + if (hasCustomsOrColWidth && !isGroupOrNonSort) { + let { collectColumn = [], customMap = {}, orderColumn = [] } = {} + mapTree(customColumns, (customCol) => { + let targetCol = find(fullColumn, (item) => customCol.property && item.property === customCol.property) + if (targetCol) { + Object.assign(targetCol, customCol) + customMap[customCol.property] = targetCol + orderColumn.push(targetCol) + } + }) + fullColumn.forEach((col) => { + let newColumn = customMap[col.property] ? orderColumn.shift() : col + if (newColumn) { + mergeWidth(newColumn) + collectColumn.push(newColumn) + } + }) + this.collectColumn = collectColumn + } + this.$emit('update:customs', fullColumn) + }, + resetAll() { + run(['resetCustoms', 'resetResizable'], this) + }, + hideColumn(tableColumn) { + // 返回隐藏的列 + return this.handleVisibleColumn(tableColumn, false) + }, + showColumn(tableColumn) { + // 返回显示的列 + return this.handleVisibleColumn(tableColumn, true) + }, + resetCustoms() { + // 重置个性化设置 + return this.handleVisibleColumn() + }, + handleVisibleColumn(tableColumn, visible) { + let { tableFullColumn } = this + let columns = arguments.length ? [tableColumn] : tableFullColumn + columns.forEach((column) => { + column.visible = arguments.length ? visible : true + }) + this.$toolbar && this.$toolbar.updateSetting() + return this.$nextTick() + }, + // 初始化加载动态列:customColumns 列信息,sort 是否按顺序加载 + reloadCustoms(customColumns, sort, colWidth) { + let first = () => { + this.mergeCustomColumn(customColumns, sort, colWidth) + } + let second = () => { + this.handleTableData(true) + } + let third = () => this.refreshColumn().then(() => this.tableFullColumn) + return this.$nextTick().then(first).then(second).then(third) + }, + watchColumn(value) { + let { $toolbar, customs, treeConfig } = this + let fullColumn = getColumnList(value) + this.tableFullColumn = fullColumn + this.cacheColumnMap() + customs && this.mergeCustomColumn(customs) + this.refreshColumn() + this.handleTableData(true) + $toolbar && $toolbar.updateColumn(fullColumn) + // 在v3.0中废弃prop、label + if (fullColumn.length) { + let cIndex = Math.floor((fullColumn.length - 1) / 2) + fullColumn[cIndex].prop && warn('ui.grid.error.delProp') + fullColumn[cIndex].label && warn('ui.grid.error.delLabel') + } + if (treeConfig && fullColumn.some((column) => column.fixed) && fullColumn.some((column) => column.type === 'expand')) { + warn('ui.grid.error.treeFixedExpand') + } + }, + + /* + * 刷新列信息 + * 将固定的列左边、右边分别靠边 + * 如果使用了分组表头,固定列必须在左侧或者右侧 + */ + refreshColumn() { + let [leftList, centerList, rightList] = [[], [], []] + let [letIndex, leftStartIndex, rightEndIndex, isColspan] = [0, null, null, undefined] + let { columnStore, isGroup } = this + let { scrollXStore, tableFullColumn } = this + let { scrollX } = this.optimizeOpts + // 如果是分组表头,如果子列全部被隐藏,则根列也隐藏 + onGroupHeader({ _vm: this, isGroup, headerProps }) + // 重新分配列 + tableFullColumn + .filter((column) => column.visible) + .forEach((column, columnIndex) => { + let ret = reassignFixedLeft({ column, columnIndex, isColspan, leftList, leftStartIndex, letIndex }) + leftStartIndex = ret.leftStartIndex + letIndex = ret.letIndex + isColspan = ret.isColspan + ret = reassignFixedRight({ column, columnIndex, isColspan, rightEndIndex, rightList }) + isColspan = ret.isColspan + rightEndIndex = ret.rightEndIndex + reassignNotFixed({ centerList, column }) + }) + let visibleColumn = leftList.concat(centerList).concat(rightList) + let scrollXLoad = scrollX && scrollX.gt && scrollX.gt < tableFullColumn.length + let tableColumn = visibleColumn + Object.assign(columnStore, { leftList, centerList, rightList }) + showGroupFixedError({ isColspan, isGroup, leftStartIndex, rightEndIndex, visibleColumn }) + tableColumn = onScrollXLoad({ _vm: this, scrollX, scrollXLoad, scrollXStore, tableColumn, visibleColumn }) + this.scrollXLoad = scrollXLoad + this.tableColumn = tableColumn + this.visibleColumn = visibleColumn + return this.$nextTick().then(() => { + this.updateFooter() + this.recalculate(true) + }) + }, + // 指定列宽的列进行拆分 + analyColumnWidth() { + let { columnMinWidth, columnStore, columnWidth, tableFullColumn } = this + let [autoList, pxList, pxMinList, resizeList, scaleList, scaleMinList] = [[], [], [], [], [], []] + let ruleChains = [ + { + match: (col) => col.resizeWidth, + action: (col) => resizeList.push(col) + }, + { match: (col) => isPx(col.width), action: (col) => pxList.push(col) }, + { + match: (col) => isScale(col.width), + action: (col) => scaleList.push(col) + }, + { + match: (col) => isPx(col.minWidth), + action: (col) => pxMinList.push(col) + }, + { + match: (col) => isScale(col.minWidth), + action: (col) => scaleMinList.push(col) + }, + { match: () => true, action: (col) => autoList.push(col) } + ] + for (let i = 0; i < tableFullColumn.length; i++) { + let column = tableFullColumn[i] + columnWidth && !column.width && (column.width = columnWidth) + columnMinWidth && !column.minWidth && (column.minWidth = columnMinWidth) + if (column.visible) { + for (let j = 0; j < ruleChains.length; j++) { + let ruleChain = ruleChains[j] + if (ruleChain.match(column)) { + ruleChain.action(column) + break + } + } + } + } + Object.assign(columnStore, { autoList, pxList, pxMinList, resizeList, scaleList, scaleMinList }) + }, + + /** + * 计算单元格列宽,动态分配可用剩余空间 + * 支持(width=?、width=?px、width=?%、min-width=?、min-width=?px、min-width=?%) + */ + recalculate(refull) { + let { tableBody, tableFooter, tableHeader } = this.$refs + let getElem = (ref) => (ref ? ref.$el : null) + let headerElem = getElem(tableHeader) + let bodyElem = getElem(tableBody) + let footerElem = getElem(tableFooter) + if (!bodyElem) { + return this.computeScrollLoad() + } + this.autoCellWidth(headerElem, bodyElem, footerElem) + if (refull !== true) { + return this.computeScrollLoad() + } + // 初始化时需要在列计算之后再执行优化运算,达到最优显示效果 + return this.computeScrollLoad().then(() => { + this.autoCellWidth(headerElem, bodyElem, footerElem) + this.computeScrollLoad() + }) + }, + // 列宽计算 + autoCellWidth(headerEl, bodyEl, footerEl) { + // 列宽最少限制 40px + let { minCellWidth = 40, bodyW, remainWidth } = {} + let { fit, columnStore } = this + let tableHeight = bodyEl.offsetHeight + let overflowY = bodyEl.scrollHeight > bodyEl.clientHeight + bodyW = bodyEl.clientWidth + remainWidth = bodyW + let tableWidth = calcTableWidth({ bodyWidth: bodyW, columnStore, fit, minCellWidth, remainWidth }) + let scrollbarWidth = overflowY ? bodyEl.offsetWidth - bodyW : 0 + let parentHeight = this.getParentHeight() + + Object.assign(this, { overflowY, parentHeight, scrollbarWidth, tableHeight, tableWidth }) + if (headerEl) { + this.headerHeight = headerEl.offsetHeight + } + if (footerEl) { + let footerHeight = footerEl.offsetHeight + this.scrollbarHeight = Math.max(footerHeight - footerEl.clientHeight, 0) + this.overflowX = tableWidth > footerEl.clientWidth + this.footerHeight = footerHeight + } else { + this.scrollbarHeight = Math.max(tableHeight - bodyEl.clientHeight, 0) + this.overflowX = tableWidth > bodyW + } + if (this.overflowX) { + this.checkScrolling() + } + }, + resetResizable() { + let { $toolbar, visibleColumn } = this + visibleColumn.forEach((col) => (col.resizeWidth = 0)) + $toolbar && $toolbar.resetResizable() + this.analyColumnWidth() + return this.recalculate(true) + }, + // 同步左右固定列的top值,修复在拖动列宽时出现横向滚动条导至固定列错位问题 + syncFixedTop() { + const { tableBody, leftBody, rightBody } = this.$refs + if (tableBody) { + const top = tableBody.$el.scrollTop + leftBody && (leftBody.$el.scrollTop = top) + rightBody && (rightBody.$el.scrollTop = top) + } + }, + updateStyle() { + let { $refs, columnStore, currentRow, height, maxHeight, minHeight, parentHeight, tableColumn } = this + let containerList = ['main', 'left', 'right'] + let layoutList = ['header', 'body', 'footer'] + let { customHeight, scaleToPx } = {} + + if (height === 'auto') { + customHeight = parentHeight + } else { + scaleToPx = Math.floor((parseInt(height) / 100) * parentHeight) + customHeight = isScale(height) ? scaleToPx : toNumber(height) + } + + containerList.forEach((name, index) => { + let fixedType = index > 0 ? name : '' + let fixedColumn = columnStore[`${fixedType}List`] + let fixedWrapperElem = $refs[`${fixedType}Container`] + layoutList.forEach((layout) => { + const args1 = { _vm: this, columnStore, customHeight, fixedColumn, fixedType } + const args2 = { fixedWrapperElem, layout, maxHeight, minHeight, name, parentHeight, tableColumn } + let ret = handleLayout(Object.assign(args1, args2)) + tableColumn = ret.tableColumn + maxHeight = ret.maxHeight + minHeight = ret.minHeight + }) + }) + currentRow && this.setCurrentRow(currentRow) + this.syncFixedTop() + return this.$nextTick() + }, + // 处理固定列的显示状态 + checkScrolling() { + let { leftContainer, rightContainer, tableBody } = this.$refs + let bodyElem = tableBody ? tableBody.$el : null + if (!bodyElem) { + return + } + let { clientWidth, scrollLeft, scrollWidth } = bodyElem + let showLeft = scrollLeft > 0 + let showRight = clientWidth < scrollWidth - scrollLeft + if (leftContainer) { + showLeft ? addClass(leftContainer, 'scrolling__middle') : removeClass(leftContainer, 'scrolling__middle') + } + if (rightContainer) { + showRight ? addClass(rightContainer, 'scrolling__middle') : removeClass(rightContainer, 'scrolling__middle') + } + }, + preventEvent(event, type, args, next, end) { + let eventList = Interceptor.get(type) + if (!eventList.some((listener) => listener(args, event, this) === false)) { + next && next() + } + end && end() + }, + blurOutside({ row, args, column }, event) { + if (column && row) { + const { editor } = column + if (typeof editor.blurOutside === 'function') { + return !!editor.blurOutside({ cell: args.cell, event }) + } + const blurClassConfig = editor.blurClass || this.editConfig.blurClass + if (blurClassConfig) { + let blurClass = [] + if (typeof blurClassConfig === 'string') { + blurClass.push(blurClassConfig) + } else if (isArray(blurClassConfig)) { + blurClass = blurClassConfig.slice(0) + } + return (args.cell && args.cell.contains(event.target)) || blurClass.some((cls) => !this.getEventTargetNode(event, document.body, cls).flag) + } + } + }, + handleGlobalMousedownEvent, + handleGlobalBlurEvent, + handleGlobalMousewheelEvent, + handleEscKeyDown, + handleEnterKeyDown, + handleCtxMenu, + handleArrowKeyDown, + handleDelKeyDown, + handleSpaceKeyDown, + handleTabKeyDown, + handleCopyKeyDown, + handleF2KeyDown, + handleOtherKeyDown, + handleGlobalKeydownEvent, + handleGlobalResizeEvent, + triggerHeaderTooltipEvent, + triggerFooterTooltipEvent, + triggerTooltipEvent, + // 显示 tooltip 依赖的 popper 组件 + activateTooltip: debounce(300, (tooltip, isValid) => { + let sign = isValid !== undefined ? isValid : focusSingle + if (sign) { + tooltip.state.popperElm && (tooltip.state.popperElm.style.display = 'none') + tooltip.doDestroy() + tooltip.show() + setTimeout(tooltip.updatePopper) + } + }), + // 显示 tooltip 依赖的 popper 组件 + activateTooltipValid: debounce(50, (tooltip) => { + tooltip.handleShowPopper() + setTimeout(() => tooltip.updatePopper()) + }), + // 显示 tooltip + handleTooltip(event, column, row, showTip, isHeader) { + let cell = event.currentTarget.querySelector('.tiny-grid-cell') + let tooltip = this.$refs.tooltip + let wrapperElem = cell + let content = cell.innerText.trim() || cell.textContent.trim() + let contentMethod = (this.tooltipConfig || {}).contentMethod + let range = createTooltipRange({ _vm: this, cell, column, isHeader }) + const rangeWidth = range.getBoundingClientRect().width - (browser.name === 'ie' ? 5 : 0) + const padding = (parseInt(getStyle(cell, 'paddingLeft'), 10) || 0) + (parseInt(getStyle(cell, 'paddingRight'), 10) || 0) + const isOverflow = rangeWidth + padding > cell.offsetWidth || wrapperElem.scrollWidth > wrapperElem.clientWidth + if (content && (showTip || isOverflow)) { + Object.assign(this.tooltipStore, { row, column, visible: true }) + if (tooltip) { + processContentMethod({ _vm: this, column, content, contentMethod, event, isHeader, row, showTip }) + tooltip.state.referenceElm = cell + tooltip.state.popperElm && (tooltip.state.popperElm.style.display = 'none') + focusSingle = true + this.activateTooltip(tooltip) + } + } + return this.$nextTick() + }, + // 提供关闭tips提示的方法 + clostTooltip() { + let tooltip = this.$refs.tooltip + Object.assign(this.tooltipStore, { + content: null, + row: null, + visible: false, + column: null + }) + focusSingle = false + if (tooltip && typeof tooltip.setExpectedState === 'function') { + tooltip.setExpectedState(false) + this.debounceClose(tooltip) + } + return this.$nextTick() + }, + // 添加代码让用户代码可以划入popper + debounceClose: debounce(50, (tooltip) => { + tooltip.handleClosePopper() + }), + // 处理默认勾选 + handleSelectionDefChecked() { + let fullDataRowIdData = this.fullDataRowIdData + let { checkAll, checkRowKeys } = this.selectConfig || {} + if (checkAll) { + this.setAllSelection(true) + return + } + if (checkRowKeys) { + let defCheckedRowids = checkRowKeys.map((key) => encodeURIComponent(key)) + let defCheckedRows = [] + defCheckedRowids.forEach((rowid) => { + let rowCache = fullDataRowIdData[rowid] + if (rowCache) { + defCheckedRows.push(rowCache.row) + } + }) + this.setSelection(defCheckedRows, true) + } + }, + setSelection(rows, value) { + if (rows) { + if (!isArray(rows)) { + rows = [rows] + } + rows.forEach((row) => this.handleSelectRow({ row }, !!value)) + } + return this.$nextTick() + }, + // 多选,行选中事件。value:选中true、不选false、不确定-1 + handleSelectRow({ row }, value) { + hasCheckField({ row }, value, this) + hasNoCheckField({ row }, value, this) + this.checkSelectionStatus() + }, + handleToggleCheckRowEvent(params, event) { + let selection = this.selection + let { checkField } = this.selectConfig || {} + let { row } = params + let value = checkField ? !get(row, checkField) : !~selection.indexOf(row) + if (event) { + this.triggerCheckRowEvent(event, params, value) + } else { + this.handleSelectRow(params, value) + } + }, + triggerCheckRowEvent(event, params, value) { + let { selectConfig = {} } = this + let { checkMethod } = selectConfig + if (!checkMethod || checkMethod(params)) { + this.handleSelectRow(params, value) + emitEvent(this, 'select-change', [ + { + selection: this.getSelectRecords(), + checked: value, + $table: this, + ...params + }, + event + ]) + } + }, + // 多选,切换某一行的选中状态 + toggleRowSelection(row) { + this.handleToggleCheckRowEvent({ row }) + return this.$nextTick() + }, + setAllSelection(value) { + let { afterFullData, selectConfig = {}, treeConfig, selection } = this + let { checkField: property, reserve, checkStrictly, checkMethod } = selectConfig + hasCheckFieldNoStrictly({ afterFullData, checkMethod, checkStrictly, property, selection, treeConfig, value }) + let selectRows = hasNoCheckFieldNoStrictly({ afterFullData, checkMethod, checkStrictly, property, selection, treeConfig, value }) + setSelectionNoStrictly({ _vm: this, checkStrictly, reserve, selectRows, selection, value }) + this.treeIndeterminates = [] + this.checkSelectionStatus() + }, + checkSelectionStatus() { + let { afterFullData, selection, treeIndeterminates } = this + let { checkField, checkStrictly, checkMethod } = this.selectConfig || {} + let { everyHandler, someHandler } = {} + if (checkStrictly) { + return + } + // 包含新增的数据 + if (checkField) { + everyHandler = checkMethod ? (row, rowIndex) => !checkMethod({ row, rowIndex }) || get(row, checkField) : (row) => get(row, checkField) + someHandler = (row) => get(row, checkField) || ~treeIndeterminates.indexOf(row) + this.isAllSelected = false + afterFullData.length && (this.isAllSelected = afterFullData.every(everyHandler)) + this.isIndeterminate = !this.isAllSelected && afterFullData.some(someHandler) + } else { + everyHandler = (row, rowIndex) => !checkMethod({ row, rowIndex }) + this.headerCheckDisabled = checkMethod && afterFullData.length && afterFullData.every(everyHandler) + everyHandler = checkMethod ? (row, rowIndex) => !checkMethod({ row, rowIndex }) || ~selection.indexOf(row) : (row) => ~selection.indexOf(row) + someHandler = (row) => ~treeIndeterminates.indexOf(row) || ~selection.indexOf(row) + this.isAllSelected = false + afterFullData.length && (this.isAllSelected = afterFullData.every(everyHandler)) + this.isIndeterminate = !this.isAllSelected && afterFullData.some(someHandler) + } + }, + // 保留选中状态 + reserveCheckSelection() { + let { fullDataRowIdData, selection } = this + let { reserve } = this.selectConfig || {} + let rowkey = getTableRowKey(this) + if (reserve && selection.length) { + this.selection = selection.map((row) => { + let rowCache = fullDataRowIdData[`${get(row, rowkey)}`] + return rowCache ? rowCache.row : row + }) + } + }, + // 多选,选中所有事件 + triggerCheckAllEvent(event, value) { + this.setAllSelection(value) + let eventParams = { + selection: this.getSelectRecords(), + checked: value, + $table: this + } + emitEvent(this, 'select-all', [eventParams, event]) + }, + // 多选,切换所有行的选中状态 + toggleAllSelection() { + this.triggerCheckAllEvent(null, !this.isAllSelected) + return this.$nextTick() + }, + clearSelection() { + let { tableFullData, treeConfig } = this + let { checkField } = this.selectConfig || {} + if (checkField) { + treeConfig ? eachTree(tableFullData, (item) => set(item, checkField, false), treeConfig) : tableFullData.forEach((item) => set(item, checkField, false)) + } + Object.assign(this, { + isAllSelected: false, + isIndeterminate: false, + selection: [], + treeIndeterminates: [] + }) + + return this.$nextTick() + }, + // 处理单选框默认勾选 + handleRadioDefChecked() { + let { fullDataRowIdData } = this + let { checkRowKey } = this.radioConfig || {} + let rowid = checkRowKey && encodeURIComponent(checkRowKey) + let rowCache = fullDataRowIdData[rowid] + if (rowid && rowCache) { + this.setRadioRow(rowCache.row) + } + }, + // 单选,行选中事件 + triggerRadioRowEvent(event, params) { + let { selectRow } = this + let { checkMethod } = this.radioConfig || {} + if (checkMethod && !checkMethod(params)) { + return + } + this.setRadioRow(params.row) + this.setCurrentRow(params.row) + if (selectRow !== params.row) { + emitEvent(this, 'radio-change', [params, event]) + } + }, + triggerCurrentRowEvent(event, params) { + let { currentRow } = this + this.setCurrentRow(params.row) + if (currentRow !== params.row) { + emitEvent(this, 'current-change', [params, event]) + } + }, + // 高亮行,设置某一行为高亮状态,如果调不加参数,则会取消目前高亮行的选中状态 + setCurrentRow(row) { + run(['clearCurrentRow', 'clearCurrentColumn'], this) + this.currentRow = row + if (this.highlightCurrentRow) { + let rowElems = this.$el.querySelectorAll(`[data-rowid="${getRowid(this, row)}"]`) + arrayEach(rowElems, (elem) => addClass(elem, 'row__current')) + } + return this.$nextTick() + }, + setRadioRow(row) { + row !== this.selectRow && this.clearRadioRow() + this.selectRow = row + return this.$nextTick() + }, + clearCurrentRow() { + Object.assign(this, { currentRow: null, hoverRow: null }) + let rowElems = this.$el.querySelectorAll('.row__current') + arrayEach(rowElems, (elem) => removeClass(elem, 'row__current')) + return this.$nextTick() + }, + clearRadioRow() { + let { selectRow: radioRow } = this + radioRow && (this.selectRow = null) + return this.$nextTick() + }, + getCurrentRow() { + let { currentRow } = this + return currentRow + }, + getRadioRow() { + let { selectRow: radioRow } = this + return radioRow + }, + // 行hover事件 + triggerHoverEvent(event, { row }) { + this.setHoverRow(row) + }, + setHoverRow(row) { + let rowid = getRowid(this, row) + let rowElems = this.$el.querySelectorAll(`[data-rowid="${rowid}"]`) + this.clearHoverRow() + arrayEach(rowElems, (elem) => addClass(elem, 'row__hover')) + this.hoverRow = row + }, + clearHoverRow() { + let rowElems = this.$el.querySelectorAll('.tiny-grid-body__row.row__hover') + arrayEach(rowElems, (elem) => removeClass(elem, 'row__hover')) + this.hoverRow = null + }, + triggerHeaderCellClickEvent(event, params) { + let { _lastResizeTime: lastTime, highlightCurrentColumn } = this + let { cell, column } = params + let isResizable = lastTime && lastTime > Date.now() - 300 + let isSort = this.getEventTargetNode(event, cell, 'tiny-grid-sort-wrapper').flag + let isFilter = this.getEventTargetNode(event, cell, 'tiny-grid-filter-wrapper').flag + let eventParams = { + triggerResizable: isResizable, + triggerSort: isSort, + triggerFilter: isFilter, + ...params + } + emitEvent(this, 'header-cell-click', [eventParams, event]) + if (highlightCurrentColumn) { + return this.setCurrentColumn(column, true) + } + return this.$nextTick() + }, + setCurrentColumn(column) { + run(['clearCurrentRow', 'clearCurrentColumn'], this) + this.currentColumn = column + let colElems = this.$el.querySelectorAll(`.${column.id}`) + arrayEach(colElems, (elem) => addClass(elem, 'col__current')) + return this.$nextTick() + }, + clearCurrentColumn() { + this.currentColumn = null + let colElems = this.$el.querySelectorAll('.col__current') + arrayEach(colElems, (elem) => removeClass(elem, 'col__current')) + return this.$nextTick() + }, + // 当单元格发生改变时,如果存在规则,则校验 + handleChangeCell(event, params) { + this.triggerValidate('blur') + .catch((e) => e) + .then(() => { + this.handleActived(params, event) + .then(() => this.triggerValidate('change')) + .catch((e) => e) + }) + }, + // 列点击事件:如果是单击模式,则激活为编辑状态;如果是双击模式,则单击后选中状态 + triggerCellClickEvent(event, params) { + let { $el, highlightCurrentRow, editStore } = this + let { radioConfig = {}, selectConfig = {}, expandConfig = {} } = this + let { treeConfig = {}, editConfig, mouseConfig = {} } = this + let { actived } = editStore + let { row, column, cell } = params + // 解决 checkbox 重复触发两次问题 + if (isTargetRadioOrCheckbox(event, column, 'radio') || isTargetRadioOrCheckbox(event, column, 'selection', 'checkbox')) { + return + } + // 如果是展开行 + onClickExpandColumn({ $el, _vm: this, column, event, expandConfig, params }) + // 如果是树形表格 + onClickTreeNodeColumn({ _vm: this, column, event, params, treeConfig }) + + if ( + (!column.treeNode || !this.getEventTargetNode(event, $el, 'tiny-grid-tree-wrapper').flag) && + (column.type !== 'expand' || !this.getEventTargetNode(event, $el, 'tiny-grid__expanded').flag) + ) { + // 如果是高亮行 + onHighlightCurrentRow({ $el, _vm: this, event, highlightCurrentRow, params, radioConfig }) + // 如果是单选 + onClickRadioColumn({ $el, _vm: this, column, event, params, radioConfig }) + // 如果是多选 + onClickSelectColumn({ _vm: this, column, event, params, selectConfig }) + // 如果设置了单元格选中功能,则不会使用点击事件去处理(只能支持双击模式) + onClickCellSelect({ _vm: this, actived, cell, column, editConfig, event, mouseConfig, params, row }) + } + + emitEvent(this, 'cell-click', [params, event]) + }, + // 列双击点击事件:如果是双击模式,则激活为编辑状态 + triggerCellDBLClickEvent(event, params) { + let { editStore, editConfig } = this + let { actived } = editStore + let isActiveNewCell = !actived.args || event.currentTarget !== actived.args.cell + let isDblclickNewCell = editConfig && editConfig.trigger === 'dblclick' && isActiveNewCell + if (isDblclickNewCell && editConfig.mode === 'row') { + this.triggerValidate('blur') + .catch((e) => e) + .then(() => { + this.handleActived(params, event) + .then(() => this.triggerValidate('change')) + .catch((e) => e) + }) + } + if (isDblclickNewCell && editConfig.mode === 'cell') { + this.handleActived(params, event) + .then(() => this.triggerValidate('change')) + .catch((e) => e) + } + + emitEvent(this, 'cell-dblclick', [params, event]) + }, + // 点击排序事件 + triggerSortEvent(event, column, order) { + let property = column.property + let isColumnSortable = column.type ? false : column.sortable || column.remoteSort + if (this.sortable && isColumnSortable) { + let evntParams = { $table: this, column, order, property } + + evntParams.prop = property + evntParams.field = evntParams.prop + + if (order === column.order) { + evntParams.order = null + this.clearSort(column.property) + } else { + this.sort(property, order) + } + emitEvent(this, 'sort-change', [evntParams, event]) + } + }, + sort(field, order) { + let { remoteSort, tableFullColumn, visibleColumn } = this + let column = find(visibleColumn, (item) => item.property === field) + let isRemote = isBoolean(column.remoteSort) ? column.remoteSort : remoteSort + let isColumnSortable = column.type ? false : column.sortable || column.remoteSort + + if (this.sortable && isColumnSortable) { + if (column.order !== order) { + tableFullColumn.forEach((column) => (column.order = null)) + column.order = order + // 如果是服务端排序,则跳过本地排序处理 + !isRemote && this.handleTableData(true).then(this.refreshStyle) + } + return this.$nextTick().then(this.updateStyle) + } + return this.$nextTick() + }, + clearSort() { + this.tableFullColumn.forEach((column) => (column.order = null)) + this.$grid && (this.$grid.sortData = {}) + return this.handleTableData(true).then(this.refreshStyle) + }, + // 关闭筛选 + closeFilter() { + let { filterStore } = this + Object.assign(filterStore, { + visible: false, + targetElem: null, + targetElemParentTr: null + }) + return this.$nextTick() + }, + toggleGroupExpansion(row) { + this.groupExpandeds.push(row) + }, + // 展开行事件 + triggerRowExpandEvent(event, { row }) { + let rest = this.toggleRowExpansion(row) + let eventParams = { $table: this, row, rowIndex: this.getRowIndex(row) } + emitEvent(this, 'toggle-expand-change', [eventParams, event]) + return rest + }, + // 切换展开行 + toggleRowExpansion(row) { + return this.setRowExpansion(row) + }, + // 处理默认展开行 + handleDefaultRowExpand() { + let { fullDataRowIdData, tableFullData } = this + let { expandAll, expandRowKeys } = this.expandConfig || {} + if (expandAll) { + this.expandeds = tableFullData.slice(0) + return + } + if (expandRowKeys) { + let defExpandeds = [] + expandRowKeys.forEach((rowid) => { + let rowCache = fullDataRowIdData[rowid] + rowCache && defExpandeds.push(rowCache.row) + }) + this.expandeds = defExpandeds + } + }, + setAllRowExpansion(expanded) { + this.expandeds = !expanded ? [] : this.tableFullData.slice(0) + return this.$nextTick().then(this.recalculate) + }, + // 设置展开行,二个参数设置这一行展开与否;支持单行;支持多行 + setRowExpansion(rows, expanded) { + let { expandeds } = this + let { accordion } = this.expandConfig || {} + // 是否是切换模式 + let isToggle = arguments.length === 1 + if (!rows) { + return this.$nextTick().then(this.recalculate) + } + if (!isArray(rows)) { + rows = [rows] + } + // 只能同时展开一个 + if (accordion) { + expandeds.length = 0 + rows = rows.slice(rows.length - 1, rows.length) + } + + rows.forEach((row) => { + let index = expandeds.indexOf(row) + // 切换模式下此行已展开,或者非切换模式下合起已展开的行,就合起此行 + if ((isToggle && ~index) || (!isToggle && !expanded && ~index)) { + expandeds.splice(index, 1) + // 直接返回,因为合起了不会又要展开 + return + } + // 切换模式下此行未展开,或者非切换模式下展开已合起的行,就展开此行 + if ((isToggle && !~index) || (!isToggle && expanded && !~index)) { + expandeds.push(row) + } + }) + return this.$nextTick().then(this.recalculate) + }, + hasRowExpand(row) { + return ~this.expandeds.indexOf(row) + }, + clearRowExpand() { + let hasExpand = this.expandeds.length + this.expandeds = [] + return this.$nextTick().then(() => (hasExpand ? this.recalculate() : 0)) + }, + // 展开树节点事件 + triggerTreeExpandEvent(event, { row }) { + let { currentColumn, currentRow } = this + let rest = this.toggleTreeExpansion(row) + let eventParams = { $table: this, row, rowIndex: this.getRowIndex(row) } + emitEvent(this, 'toggle-tree-change', [eventParams, event]) + this.$nextTick(() => { + currentRow ? this.setCurrentRow(currentRow) : currentColumn ? this.setCurrentColumn(currentColumn) : '' + }) + return rest + }, + // 切换/展开树节点 + toggleTreeExpansion(row) { + return this.setTreeExpansion(row) + }, + // 处理默认展开树节点 + handleDefaultTreeExpand() { + let { tableFullData, treeConfig } = this + if (!treeConfig) { + return + } + let { children, expandAll, expandRowKeys: rowids } = treeConfig + let treeExpandeds = [] + let rowkey = getTableRowKey(this) + let isNonEmptyArr = (arr) => isArray(arr) && arr.length + // 展开所有行 + let doExpandAll = () => { + filterTree(tableFullData, (row) => isNonEmptyArr(row[children]) && treeExpandeds.push(row), treeConfig) + this.treeExpandeds = treeExpandeds + } + // 展开指定行 + let doExpandRows = () => { + rowids.forEach((rowid) => { + let matchObj = findTree(tableFullData, (item) => rowid === get(item, rowkey), treeConfig) + + matchObj && isNonEmptyArr(matchObj.item[children]) && treeExpandeds.push(matchObj.item) + }) + this.treeExpandeds = treeExpandeds + } + expandAll ? doExpandAll() : rowids ? doExpandRows() : '' + setTreeScrollYCache(this) + }, + setAllTreeExpansion(expanded) { + let { tableFullData, treeConfig } = this + let children = treeConfig.children + let treeExpandeds = [] + if (expanded) { + let rowHandler = (row) => { + if (row[children] && row[children].length) { + treeExpandeds.push(row) + } + } + eachTree(tableFullData, rowHandler, treeConfig) + } + this.treeExpandeds = treeExpandeds + + setTreeScrollYCache(this) + + return this.$nextTick().then(this.recalculate) + }, + // 设置展开树形节点,二个参数设置这一行展开与否:支持单行,支持多行 + setTreeExpansion(rows, expanded) { + let { treeConfig, treeExpandeds, tableFullData } = this + let { accordion, children } = treeConfig + let isToggle = arguments.length === 1 + if (!rows) { + return this.$nextTick().then(this.recalculate) + } + if (!isArray(rows)) { + rows = [rows] + } + if (accordion) { + rows = rows.slice(rows.length - 1, rows.length) + } + rows.forEach((row) => { + if (row[children] && row[children].length) { + let index = treeExpandeds.indexOf(row) + if (accordion) { + // 同一级只能展开一个 + let matchObj = findTree(tableFullData, (item) => item === row, treeConfig) + remove(treeExpandeds, (item) => ~matchObj.items.indexOf(item)) + } + if (~index && (isToggle || !expanded)) { + treeExpandeds.splice(index, 1) + return + } + if (!~index && (isToggle || expanded)) { + treeExpandeds.push(row) + } + } + }) + + setTreeScrollYCache(this) + + return this.$nextTick().then(this.recalculate) + }, + hasTreeExpand(row) { + return ~this.treeExpandeds.indexOf(row) + }, + clearTreeExpand() { + const hasExpand = this.treeExpandeds.length + this.treeExpandeds = [] + setTreeScrollYCache(this) + return this.$nextTick().then(() => (hasExpand ? this.recalculate() : 0)) + }, + // 获取虚拟滚动状态 + getVirtualScroller() { + let { scrollXLoad, scrollYLoad } = this + let { scrollLeft, scrollTop } = this.$refs.tableBody.$el + return { + scrollX: scrollXLoad, + scrollY: scrollYLoad, + scrollLeft, + scrollTop + } + }, + // 横向 X 可视渲染事件处理 + triggerScrollXEvent(event) { + let { adaptive } = this.scrollXStore + // webkit 浏览器使用最佳的渲染方式 + if (!isWebkit || !adaptive) { + this.debounceScrollX(event) + } else { + this.loadScrollXData(event) + } + }, + debounceScrollX: debounce(debounceScrollDirDuration, function (event) { + this.loadScrollXData(event) + }), + loadScrollXData() { + let { scrollXStore, visibleColumn } = this + let { offsetSize, renderSize, startIndex, visibleIndex, visibleSize } = scrollXStore + let { scrollLeft } = this.$refs.tableBody.$el + let { preload = false, toVisibleIndex = 0, width = 0 } = {} + for (let i = 0; i < visibleColumn.length; i++) { + width += visibleColumn[i].renderWidth + if (scrollLeft < width) { + toVisibleIndex = i + break + } + } + if (visibleIndex === toVisibleIndex) { + this.clostTooltip() + return + } + let marginSize = Math.min(Math.floor((renderSize - visibleSize) / 2), visibleSize) + if (visibleIndex > toVisibleIndex) { + // 向左 + preload = startIndex >= toVisibleIndex - offsetSize + if (preload) { + scrollXStore.startIndex = Math.max(0, toVisibleIndex - Math.max(marginSize, renderSize - visibleSize)) + this.updateScrollXData() + } + } else { + // 向右 + preload = startIndex + renderSize <= toVisibleIndex + visibleSize + offsetSize + if (preload) { + scrollXStore.startIndex = Math.max(0, Math.min(visibleColumn.length - renderSize, toVisibleIndex - marginSize)) + this.updateScrollXData() + } + } + scrollXStore.visibleIndex = toVisibleIndex + this.clostTooltip() + }, + // 纵向 Y 可视渲染事件处理 + triggerScrollYEvent(event) { + // webkit 浏览器使用最佳的渲染方式 + if (!isWebkit || !this.scrollYStore.adaptive) { + this.debounceScrollY(event) + } else { + this.loadScrollYData(event) + } + }, + debounceScrollY: debounce(debounceScrollDirDuration, function (event) { + this.loadScrollYData(event) + }), + debounceScrollLoad: debounce(debounceScrollLoadDuration, function (event) { + const { scrollHeight, bodyHeight } = this.scrollLoadStore + const { currentPage, pageSize } = this.$grid.tablePage + const max = scrollHeight - bodyHeight + let scrollTop = event.target.scrollTop + if (scrollTop > max) { + scrollTop = max + } + const { rowHeight } = this.scrollYStore + let visibleIndex = Math.ceil(scrollTop / rowHeight) + let page = Math.ceil(visibleIndex / pageSize) + 1 + + if (currentPage !== page) { + this.$grid.pageCurrentChange(page) + } + }), + // 纵向 Y 可视渲染处理 + loadScrollYData(event) { + let { scrollYStore } = this + let { startIndex, renderSize, offsetSize, visibleIndex, visibleSize, rowHeight } = scrollYStore + let { scrollTop } = event.target + let toVisibleIndex = Math.ceil(scrollTop / rowHeight) + let preload = false + if (visibleIndex === toVisibleIndex) { + return + } + let marginSize = Math.min(Math.floor((renderSize - visibleSize) / 2), visibleSize) + if (toVisibleIndex < visibleIndex) { + // 向上 + preload = startIndex >= toVisibleIndex - offsetSize + if (preload) { + scrollYStore.startIndex = Math.max(0, toVisibleIndex - Math.max(marginSize, renderSize - visibleSize)) + this.updateScrollYData() + } + } else { + // 向下 + preload = startIndex + renderSize <= toVisibleIndex + visibleSize + offsetSize + if (preload) { + let totalRows = getTotalRows(this) + scrollYStore.startIndex = Math.max(0, Math.min(totalRows - renderSize, toVisibleIndex - marginSize)) + this.updateScrollYData() + } + } + scrollYStore.visibleIndex = toVisibleIndex + this.$nextTick(() => { + this.updateSelectedCls(true) + }) + }, + getRowHeight() { + const { $refs, vSize } = this + const { scrollY } = this.optimizeOpts + let { tableBody, tableHeader } = $refs + let rHeight = scrollY.rHeight + if (!rHeight) { + let firstTrElem = (tableBody && tableBody.$el.querySelector('tbody>tr')) || (tableHeader && tableHeader.$el.querySelector('thead>tr')) || null + if (firstTrElem) { + rHeight = firstTrElem.clientHeight + } + } + // 默认的行高,默认行高需要跟 css 样式一致 + if (!rHeight) { + let vSizeList = ['medium', 'small', 'mini'] + let defSizeList = [44, 40, 36] + let i = vSizeList.indexOf(vSize) + rHeight = ~i ? defSizeList[i] : 48 + } + return rHeight + }, + // 计算可视渲染相关数据 + computeScrollLoad() { + return this.$nextTick().then(() => { + let { $refs, optimizeOpts, visibleColumn } = this + let { scrollLoad, scrollXLoad, scrollXStore, scrollYLoad, scrollYStore } = this + let { scrollX, scrollY } = optimizeOpts + let { tableBody } = $refs + let bodyElem = tableBody ? tableBody.$el : null + if (bodyElem) { + // 计算 X 逻辑 + computeScrollXLoad({ _vm: this, scrollX, scrollXLoad, scrollXStore, tableBodyElem: bodyElem, visibleColumn }) + // 计算 Y 逻辑 + computeScrollYLoad({ _vm: this, scrollLoad, scrollY, scrollYLoad, scrollYStore, tableBodyElem: bodyElem }) + } + this.$nextTick(this.updateStyle) + }) + }, + updateScrollXData() { + let { scrollXLoad, scrollXStore, tableColumn, treeConfig, visibleColumn, visibleColumnChanged } = this + let { lastStartIndex = -1, renderSize, startIndex } = scrollXStore + let args = { lastStartIndex, renderSize, scrollXLoad, startIndex, tableColumn } + + Object.assign(args, { treeConfig, visibleColumn, visibleColumnChanged }) + + let ret = sliceVisibleColumn(args) + + scrollXStore.lastStartIndex = ret.lastStartIndex + + this.tableColumn = ret.tableColumn + this.visibleColumnChanged = ret.visibleColumnChanged + + if (ret.sliced) { + this.updateScrollXSpace() + this.updateScrollStatus() + } + }, + // 更新横向 X 可视渲染上下剩余空间大小 + updateScrollXSpace() { + let { $refs, elemStore, scrollXLoad, scrollXStore, scrollbarWidth, tableWidth, visibleColumn } = this + let { tableBody, tableFooter, tableHeader } = $refs + let { startIndex } = scrollXStore + let { bodyElem, footerElem, headerElem, leftSpaceWidth, marginLeft } = {} + headerElem = tableHeader ? tableHeader.$el.querySelector('.tiny-grid__header') : null + bodyElem = tableBody.$el.querySelector('.tiny-grid__body') + footerElem = tableFooter ? tableFooter.$el.querySelector('.tiny-grid__footer') : null + leftSpaceWidth = visibleColumn.slice(0, startIndex).reduce((previous, column) => previous + column.renderWidth, 0) + marginLeft = scrollXLoad ? `${leftSpaceWidth}px` : '' + headerElem && (headerElem.style.marginLeft = marginLeft) + bodyElem.style.marginLeft = marginLeft + footerElem && (footerElem.style.marginLeft = marginLeft) + let containerNames = ['main'] + let layouts = ['header', 'body', 'footer'] + containerNames.forEach((name) => { + layouts.forEach((layout) => { + let xSpaceElem = elemStore[`${name}-${layout}-xSpace`] + let extra = layout === 'header' ? scrollbarWidth : 0 + if (xSpaceElem) { + xSpaceElem.style.width = scrollXLoad ? `${tableWidth + extra}px` : '' + } + }) + }) + this.$nextTick(this.updateStyle) + }, + updateScrollYData() { + run(['handleTableData', 'updateScrollYSpace'], this) + }, + // 更新纵向 Y 可视渲染上下剩余空间大小 + updateScrollYSpace() { + let { $grid, elemStore, scrollLoad, scrollLoadStore, scrollYLoad } = this + let { rowHeight, startIndex } = this.scrollYStore + let bodyHeight = getTotalRows(this) + let isVScrollOrLoad = scrollYLoad || scrollLoad + let { marginTop, ySpaceHeight } = {} + let containerNames = ['main', 'left', 'right'] + let layouts = ['header', 'body', 'footer'] + + marginTop = isVScrollOrLoad && scrollYLoad ? `${Math.max(startIndex * rowHeight, 0)}px` : '' + ySpaceHeight = isVScrollOrLoad ? `${bodyHeight * rowHeight}px` : '' + + containerNames.forEach((name) => { + let tableElem = elemStore[`${name}-body-table`] + tableElem && (tableElem.style.marginTop = marginTop) + layouts.forEach((layout) => { + let ySpaceElem = elemStore[`${name}-${layout}-ySpace`] + ySpaceElem && (ySpaceElem.style.height = ySpaceHeight) + if (ySpaceElem && scrollLoad && $grid) { + let scrollHeight = $grid.pagerConfig.total * rowHeight + Object.assign(scrollLoadStore, { bodyHeight, scrollHeight }) + ySpaceElem.firstChild.style.height = `${scrollHeight}px` + ySpaceElem.onscroll = this.debounceScrollLoad + } + }) + }) + this.$nextTick(this.updateStyle) + }, + updateScrollLoadBar(event) { + let { $el, elemStore, scrollLoad, scrollLoadStore } = this + if (scrollLoad && $el.contains(event.target)) { + let wheelDelta = event.wheelDelta ? event.wheelDelta : -event.detail * 40 + let scrollElm = elemStore['right-body-ySpace'] || elemStore['main-body-ySpace'] + let { scrollHeight, bodyHeight } = scrollLoadStore + let max = scrollHeight - bodyHeight + let top = scrollElm.scrollTop - wheelDelta + top = max < top ? max : top + top = top < 0 ? 0 : top + scrollElm.scrollTop = top + } + }, + scrollTo(scrollLeft, scrollTop) { + let { $refs } = this + let { tableBody, tableFooter, rightBody } = $refs + let bodyElem = tableBody.$el + let footerElem = tableFooter ? tableFooter.$el : null + let rightBodyElem = rightBody ? rightBody.$el : null + if (isNumber(scrollLeft)) { + if (footerElem) { + footerElem.scrollLeft = scrollLeft + } else { + bodyElem.scrollLeft = scrollLeft + } + } + if (isNumber(scrollTop)) { + rightBodyElem && (rightBodyElem.scrollTop = scrollTop) + bodyElem.scrollTop = scrollTop + } + return this.$nextTick() + }, + scrollToRow(row, column, isDelay, move) { + let hasRowCache = this.fullAllDataRowMap.has(row) + let isDelayArg = isDelay || isBoolean(column) + row && hasRowCache && rowToVisible(this, row) + return this.scrollToColumn(column, isDelayArg, move) + }, + scrollToTreeRow(row) { + let { tableFullData, treeConfig, treeOpts } = this + if (!treeConfig) { + return this.$nextTick() + } + let matchObj = findTree(tableFullData, (item) => item === row, treeOpts) + if (!matchObj) { + return this.$nextTick() + } + let nodes = matchObj.nodes + nodes.forEach((row, index) => { + if (index === nodes.length - 1 || this.hasTreeExpand(row)) { + return + } + this.setTreeExpansion(row, true) + }) + return this.$nextTick() + }, + scrollToColumn(column, isDelay, move) { + let hasColCache = this.fullColumnMap.has(column) + column && hasColCache && colToVisible(this, column, move) + return isDelay && this.scrollYLoad ? new Promise((resolve) => setTimeout(() => resolve(this.$nextTick()), 50)) : this.$nextTick() + }, + resetScrollTop() { + this.lastScrollTop = 0 + }, + clearScroll() { + let { $refs, scrollXStore, scrollYStore } = this + Object.assign(this, { lastScrollLeft: 0 }) + Object.assign(scrollXStore, { startIndex: 0, visibleIndex: 0 }) + Object.assign(scrollYStore, { startIndex: 0, visibleIndex: 0 }) + this.$nextTick(() => { + let { tableBody, tableHeader, tableFooter } = $refs + let { tableBodyElem, tableHeaderElem, tableFooterElem } = {} + tableBodyElem = tableBody ? tableBody.$el : null + tableHeaderElem = tableHeader ? tableHeader.$el : null + tableFooterElem = tableFooter ? tableFooter.$el : null + tableBodyElem && Object.assign(tableBodyElem, { scrollLeft: 0, scrollTop: 0 }) + tableFooterElem && Object.assign(tableFooterElem, { scrollLeft: 0 }) + tableHeaderElem && Object.assign(tableHeaderElem, { scrollLeft: 0 }) + }) + return this.$nextTick() + }, + // 更新表尾合计 + updateFooter() { + let { afterFullData, footerMethod, showFooter, summaryConfig, tableColumn } = this + if (footerMethod && showFooter) { + let data = footerMethod({ columns: tableColumn, data: afterFullData }) + if (data.length && data.some((value) => !isArray(value))) { + data = [data] + } + this.footerData = tableColumn.length ? data : [] + } + if (summaryConfig) { + let { fields, fraction, text, truncate } = summaryConfig + let summary = tableColumn.map((column, columnIndex) => { + if (columnIndex === 0) { + return text || '' + } + if (~fields.indexOf(column.property)) { + return toDecimal(sum(this.afterFullData, column.property), fraction, truncate) + } + return null + }) + this.footerData = [summary] + } + return this.$nextTick() + }, + // 更新列状态:如果组件值v-model发生change,调用该函数更新列的编辑状态。如果单元格配置了校验规则,则进行校验 + updateStatus(scope, cellValue, renderOpts) { + let customValue = !isUndefined(cellValue) + return this.$nextTick().then(() => { + let { $refs, editRules, tableData, validStore } = this + let { tableBody } = $refs + if (!scope || !tableBody || !editRules) { + return + } + + if (renderOpts && renderOpts.isValidAlways) { + validStore.visible = true + } + + let { column, row } = scope + let type = 'change' + if (!this.hasCellRules(type, row, column)) { + return + } + let rowIndex = tableData.indexOf(row) + getCell(this, { row, rowIndex, column }).then((cell) => { + if (!cell) { + return + } + return this.validCellRules(type, row, column, cellValue) + .then(() => { + customValue && validStore.visible && setCellValue(row, column, cellValue) + this.clearValidate() + }) + .catch(({ rule }) => { + customValue && setCellValue(row, column, cellValue) + this.showValidTooltip({ rule, row, column, cell }) + }) + }) + }) + }, + // X/Y 方向滚动 + updateScrollStatus: debounce(AsyncCollectTimeout, function () { + const { scrollXLoad, scrollYLoad, isAsyncColumn } = this + if (isAsyncColumn && (scrollXLoad || scrollYLoad)) { + const { tableData, scrollXStore, scrollYStore, tableFullData, scrollDirection = 'N' } = this + const isInit = (scrollXLoad && scrollXStore.visibleIndex === 0) || (scrollYLoad && scrollYStore.visibleIndex === 0) + // 第一次初始化及横、纵向滚动时(用户直接设置 data 属性时将由 handleAsyncColumn 初始化异步列) + if (isInit || scrollDirection !== 'N') { + this.handleResolveColumn(tableFullData, this.collectAsyncColumn(tableData)) + } + } + }), + // 获取异步列唯一ID + getAsyncColumnUniqueKey(property, row) { + return `${property}_${row[this.rowId]}` + }, + // 获取异步列名称 + getAsyncColumnName(property) { + return GlobalConfig.constant.asyncPrefix + property + }, + // 收集异步列 + collectAsyncColumn(tableData) { + const fetchColumns = [] + const { rowId, asyncRenderMap, tableColumn } = this + if (!rowId) { + warn('The (grid-props:rowId) is required for the asynchronous column.') + return fetchColumns + } + tableColumn.forEach((col) => { + const { async } = col.format || {} + const { fetch, splitConfig = {} } = async || {} + if (typeof fetch === 'function') { + const columnValues = [] + tableData.forEach((row) => { + let cellValue = row[col.property] + if (typeof cellValue !== 'string' || (typeof cellValue === 'string' && !cellValue)) { + cellValue = ' ' + } + let cellValuesCount = 1 + let cellValues = [cellValue] + const uniqueKey = this.getAsyncColumnUniqueKey(col.property, row) + // 默认不开启 + if (splitConfig.enabled === true) { + cellValues = cellValue.split(splitConfig.valueSplit || ',') + cellValuesCount = cellValues.length + } + if (!asyncRenderMap[uniqueKey]) { + // 以行主键、列名作为缓存的 Key 防止重复加载(缓存单元格显示值的个数) + asyncRenderMap[uniqueKey] = cellValuesCount + // 单元格多值支持 + cellValues.forEach((value) => columnValues.push(value)) + } + }) + if (columnValues.length) { + fetchColumns.push({ ...col, columnValues }) + } + } + }) + return fetchColumns + }, + // fetchData 执行 + handleAsyncColumn(tableData) { + if (this.isAsyncColumn && tableData.length) { + // 每次请求都需要清空加载缓存 + this.asyncRenderMap = {} + this.handleResolveColumn(tableData, this.collectAsyncColumn(tableData)) + } + }, + // 查询异步列 + handleResolveColumn(tableData, fetchColumns) { + const { tableColumn, scrollYStore, asyncRenderMap, scrollXLoad, scrollYLoad } = this + const { startIndex } = scrollYStore + const isScrollLoad = scrollXLoad || scrollYLoad + if (fetchColumns.length === 0) { + return + } + const promises = mapFetchColumnPromise({ _vm: this, fetchColumns, tableColumn }) + Promise.all(promises).then(handleAllColumnPromises({ startIndex, fetchColumns, tableData, asyncRenderMap, isScrollLoad }, this)) + }, + // Publish methods 与工具栏对接 + connect({ toolbar }) { + this.$toolbar = toolbar + }, + // 检查触发源是否属于目标节点 + getEventTargetNode, + initMultipleHistory() { + const { isMultipleHistory, toolBarVm } = this.$grid + const { + settingOpts: { storageKey }, + id: toolbarId + } = toolBarVm + let remoteSelectedMethod, remoteSelectedPromise + + if ( + isMultipleHistory && + toolBarVm && + toolBarVm.setting && + toolBarVm.setting.multipleHistory && + (remoteSelectedMethod = toolBarVm.setting.multipleHistory.remoteSelectedMethod) + ) { + if (typeof remoteSelectedMethod === 'function') { + remoteSelectedPromise = remoteSelectedMethod() + + if (typeof remoteSelectedPromise.then === 'function') { + remoteSelectedPromise.then((storeStr) => { + let storeObj = toStringJSON(storeStr) + storeObj = (storeObj && storeObj[storageKey]) || null + storeObj = (storeObj || {})[toolbarId] || {} + const { columns, pageSize } = storeObj + toolBarVm.applySettings({ columns, pageSize }) + }) + } + } + } + }, + // 显示多选工具栏 + showSelectToolbar() { + let { + $grid: { selectToolbar, showHeader }, + selectToolbarStore + } = this + if (selectToolbar && showHeader) { + selectToolbarStore.visible = false + let selectColumn = find(this.visibleColumn, (item) => item.type === 'selection') + let selected = this.getSelectRecords() + let position = typeof selectToolbar === 'object' ? selectToolbar.position : '' + if (selectColumn && selected && selected.length) { + let selectTh = this.$el.querySelector('th.tiny-grid-header__column.col__selection:not(.fixed__hidden)') + let headerWrapper = this.$el.querySelector('.tiny-grid>.tiny-grid__header-wrapper') + let tr = selectTh.parentNode + let thArr = toArray(tr.childNodes) + let range = document.createRange() + let rangeBoundingRect + let headerBoundingRect = headerWrapper.getBoundingClientRect() + let layout = { width: 0, height: 0, left: 0, top: 0, zIndex: 1 } + let adjust = 1 + if (selectColumn.fixed === 'right') { + range.setStart(tr, thArr.indexOf(selectTh)) + range.setEnd(tr, thArr.length) + rangeBoundingRect = range.getBoundingClientRect() + layout.left = `${adjust}px` + } else { + range.setStart(tr, 0) + range.setEnd(tr, thArr.indexOf(selectTh) + 1) + rangeBoundingRect = range.getBoundingClientRect() + layout.left = `${rangeBoundingRect.width + adjust}px` + } + layout.width = `${headerBoundingRect.width - rangeBoundingRect.width - 2 * adjust}px` + if (!selectColumn.fixed && position === 'left') { + range = document.createRange() + range.setStart(tr, 0) + range.setEnd(tr, thArr.indexOf(selectTh)) + rangeBoundingRect = range.getBoundingClientRect() + layout.left = `${adjust}px` + layout.width = `${rangeBoundingRect.width - 2 * adjust}px` + } + layout.top = `${headerBoundingRect.height - rangeBoundingRect.height + adjust}px` + layout.height = `${rangeBoundingRect.height - 2 * adjust}px` + return this.$nextTick().then(() => { + selectToolbarStore.layout = layout + selectToolbarStore.visible = true + }) + } + } + return this.$nextTick() + }, + // 切换多选工具栏的显示 + toggleSelectToolbarVisible() { + this.selectToolbarStore.visible = !this.selectToolbarStore.visible + return this.$nextTick() + } +} +funcs.forEach((name) => { + Methods[name] = function () { + return this[`_${name}`] ? this[`_${name}`].apply(this, arguments) : null + } +}) +export default Methods diff --git a/packages/grid/src/table/src/strategy.js b/packages/grid/src/table/src/strategy.js new file mode 100644 index 000000000..eb006306d --- /dev/null +++ b/packages/grid/src/table/src/strategy.js @@ -0,0 +1,272 @@ +import { getRowkey } from '@opentiny/vue-renderless/grid/utils' + +const TEMPORARY_CHILDREN = '_$children_' +const TEMPORARY_SHOW = '_$show_' + +let rowUniqueId = 0 + +const getRowUniqueId = () => `row_${++rowUniqueId}` + +const ROWKEY_MAP = new WeakMap() + +const setTableRowKey = ($table) => { + if (!ROWKEY_MAP.has($table)) { + ROWKEY_MAP.set($table, getRowkey($table)) + } + + return ROWKEY_MAP.get($table) +} + +const getTableRowKey = ($table) => { + if (!ROWKEY_MAP.has($table)) { + setTableRowKey($table) + } + + return ROWKEY_MAP.get($table) +} + +const isParentExpand = (item, hasTreeExpand, parentRowMap) => { + const parentNode = parentRowMap.get(item) + + if (!parentNode) { + return true + } + + if (!hasTreeExpand(parentNode)) { + return false + } + return isParentExpand(parentNode, hasTreeExpand, parentRowMap) +} + +const setTotalRows = (_vm) => { + const { afterFullData, scrollYLoad, treeConfig, treeExpandeds, hasTreeExpand, parentRowMap } = _vm + let totalRows = afterFullData.length + + if (scrollYLoad && treeConfig) { + const { children } = treeConfig + // 如果展开节点的父节点或者祖宗节点只要有一个处于关闭状态,则需要过滤此项,否则在虚拟滚动情况下,渲染条数会计算错误 + const newTreeExpandeds = treeExpandeds.filter((item) => isParentExpand(item, hasTreeExpand, parentRowMap)) + + Array.isArray(newTreeExpandeds) && newTreeExpandeds.forEach((expandRow) => Array.isArray(expandRow[children]) && (totalRows += expandRow[children].length)) + } + + TOTALROWS_MAP.set(_vm, totalRows) +} + +const getTableCellKey = ({ $table, column, row }) => { + if (!ROWKEY_MAP.has($table)) { + setTableRowKey($table) + } + + return `${row[ROWKEY_MAP.get($table)]}-${column.id}` +} + +const TOTALROWS_MAP = new WeakMap() + +const setTreeScrollYCache = (_vm) => { + setTotalRows(_vm) +} + +const getChart = (_vm) => { + const { afterFullData, scrollYLoad, treeConfig, treeExpandeds, parentRowMap } = _vm + + if (!scrollYLoad || !treeConfig) return + + const { children, temporaryChildren = TEMPORARY_CHILDREN, temporaryShow = TEMPORARY_SHOW } = treeConfig + const isValidArr = (arr) => Array.isArray(arr) && arr.length + const isExpand = (row) => ~treeExpandeds.indexOf(row) + const chart = [] + + const fnRow = (row, level) => { + const chartItem = Array.from({ length: level + 1 }) + + row[temporaryShow] = false + row[temporaryChildren] = [] + + chartItem.splice(level, 1, row) + chart.push(chartItem) + + if (isExpand(row) && isValidArr(row[children])) { + row[children].forEach((child) => { + fnRow(child, level + 1) + // 为当前行和其父级行数据建立映射关系,树表支持拖拽后需要及时更新映射关系 + parentRowMap.set(child, row) + }) + } + } + + if (isValidArr(afterFullData)) { + afterFullData.forEach((row) => fnRow(row, 0)) + } + + return chart +} + +const sliceTreeData = ({ afterFullData, renderSize, scrollYLoad, startIndex, treeConfig, treeExpandeds, parentRowMap }) => { + const { temporaryChildren = TEMPORARY_CHILDREN, temporaryShow = TEMPORARY_SHOW } = treeConfig + const chart = getChart({ afterFullData, scrollYLoad, treeConfig, treeExpandeds, parentRowMap }) + const subChart = chart.slice(startIndex, startIndex + renderSize) + const subTree = [] + const fnSubTree = (subChart, chart, startIndex, subTree) => { + subChart.forEach((chartItem, i) => { + let row = chartItem[chartItem.length - 1] + + row[temporaryShow] = true + + if (chartItem.length === 1) { + subTree.push(row) + } else { + let maxLen = chartItem.length + let parent + let j = startIndex + i - 1 + let chartItemJ + + const fnParent = () => { + for (; j >= 0; j--) { + chartItemJ = chart[j] + + if (chartItemJ.length < maxLen) { + maxLen = chartItemJ.length + parent = chartItemJ[chartItemJ.length - 1] + + if (parent[temporaryChildren]) { + !~parent[temporaryChildren].indexOf(row) && parent[temporaryChildren].push(row) + } else { + parent[temporaryChildren] = [row] + } + + row = parent + } + + if (chartItemJ.length === 1) { + return row + } + } + } + + fnParent() + + if (!~subTree.indexOf(parent)) { + subTree.push(parent) + } + } + }) + } + + fnSubTree(subChart, chart, startIndex, subTree) + + return subTree +} + +const sliceFullData = ({ afterFullData, renderSize, scrollYLoad, startIndex, treeConfig, treeExpandeds, parentRowMap }) => { + let result + + if (scrollYLoad) { + if (treeConfig) { + result = sliceTreeData({ afterFullData, renderSize, scrollYLoad, startIndex, treeConfig, treeExpandeds, parentRowMap }) + } else { + result = afterFullData.slice(startIndex, startIndex + renderSize) + } + } else { + result = afterFullData.slice(0) + } + + return result +} + +const getTotalRows = (_vm) => { + const { afterFullData, scrollYLoad, treeConfig } = _vm + let totalRows = afterFullData.length + + if (scrollYLoad && treeConfig) { + if (!TOTALROWS_MAP.get(_vm)) { + setTotalRows(_vm) + } + + totalRows = TOTALROWS_MAP.get(_vm) + } + + return totalRows +} + +const getTreeChildrenKey = ({ scrollYLoad, treeConfig }) => { + if (!treeConfig) { + return + } + + let { children: childrenKey, temporaryChildren = TEMPORARY_CHILDREN } = treeConfig + + if (scrollYLoad) { + childrenKey = temporaryChildren + } + + return childrenKey +} + +const getTreeShowKey = ({ scrollYLoad, treeConfig }) => { + if (!treeConfig) { + return + } + + let treeShowKey = '' + const { temporaryShow = TEMPORARY_SHOW } = treeConfig + + if (scrollYLoad) { + treeShowKey = temporaryShow + } + + return treeShowKey +} + +const sliceVisibleColumn = (args) => { + const { lastStartIndex, renderSize, scrollXLoad, startIndex, tableColumn } = args + const { treeConfig, visibleColumn, visibleColumnChanged } = args + + let tableColumn2 = tableColumn + let lastStartIndex2 = lastStartIndex + let visibleColumnChanged2 = visibleColumnChanged + let sliced = false + + if (scrollXLoad && treeConfig) { + if (visibleColumnChanged || !~lastStartIndex || lastStartIndex !== startIndex) { + tableColumn2 = visibleColumn.slice(startIndex, startIndex + renderSize) + lastStartIndex2 = startIndex + visibleColumnChanged2 = false + sliced = true + } + } else { + tableColumn2 = visibleColumn.slice(startIndex, startIndex + renderSize) + sliced = true + } + + return { + tableColumn: tableColumn2, + lastStartIndex: lastStartIndex2, + visibleColumnChanged: visibleColumnChanged2, + sliced + } +} + +const clearOnTableUnmount = ($table) => { + if (ROWKEY_MAP.has($table)) { + ROWKEY_MAP.delete($table) + } + + if (TOTALROWS_MAP.has($table)) { + TOTALROWS_MAP.delete($table) + } +} + +export { + clearOnTableUnmount, + getRowUniqueId, + getTableCellKey, + getTableRowKey, + getTotalRows, + getTreeChildrenKey, + getTreeShowKey, + setTreeScrollYCache, + setTableRowKey, + sliceFullData, + sliceVisibleColumn +} diff --git a/packages/grid/src/table/src/table.js b/packages/grid/src/table/src/table.js new file mode 100644 index 000000000..826fec2d3 --- /dev/null +++ b/packages/grid/src/table/src/table.js @@ -0,0 +1,914 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import { h, hooks, $prefix } from '@opentiny/vue-common' +import Tooltip from '@opentiny/vue-tooltip' +import { extend } from '@opentiny/vue-renderless/common/object' +import { isEmptyObject, isObject, isNull } from '@opentiny/vue-renderless/common/type' +import { uniqueId, template, toNumber, isBoolean } from '@opentiny/vue-renderless/grid/static/' +import { getRowkey, GlobalEvent, hasChildrenList, getListeners } from '@opentiny/vue-renderless/grid/utils' +import TINYGrid from '../../adapter' +import GridHeader from '../../header' +import GridFooter from '../../footer' +import GridBody from '../../body' +import GridFilter from '../../filter' +import GridMenu from '../../menu' +import GridLoading from '../../loading' +import methods from './methods' +import GlobalConfig from '../../config' +import { error } from '../../tools' +import { clearOnTableUnmount } from './strategy' + +function verifyConfig(_vm) { + if (!getRowkey(_vm)) { + error('ui.grid.error.rowIdEmpty') + } + + if (!TINYGrid._edit && _vm.editConfig) { + throw new Error(template(error('ui.grid.error.reqModule'), { name: 'Edit' })) + } + + if (!TINYGrid._valid && _vm.editRules) { + throw new Error(template(error('ui.grid.error.reqModule'), { name: 'Validator' })) + } + + if (!TINYGrid._keyboard && (_vm.keyboardConfig || _vm.mouseConfig)) { + throw new Error(template(error('ui.grid.error.reqModule'), { name: 'Keyboard' })) + } + + if (!TINYGrid._resize && _vm.autoResize) { + throw new Error(template(error('ui.grid.error.reqModule'), { name: 'Resize' })) + } +} + +function mergeScrollDirStore(scrollDir, scrollDirStore) { + if (scrollDir) { + Object.assign(scrollDirStore, { + startIndex: 0, + visibleIndex: 0, + adaptive: isBoolean(scrollDir.adaptive) ? scrollDir.adaptive : true, + renderSize: toNumber(scrollDir.rSize), + offsetSize: toNumber(scrollDir.oSize) + }) + } +} + +function loadStatic(data, _vm) { + // 此段代码与 watch(data) 功能重复,只在配置了 data 属性后生效 + if (data && data.length > 0) { + _vm.loadTableData(data, true).then(() => { + _vm.handleDefault() + _vm.updateStyle() + }) + } +} + +function mergeTreeConfig(_vm) { + if (_vm.treeConfig) { + const { ordered } = _vm.treeConfig + + if (isNull(ordered)) { + _vm.treeConfig.ordered = true + } + } +} + +function initDrop(_vm) { + const dropConfig = _vm.dropConfig + + if (dropConfig) { + const { plugin, column = true, row = true } = dropConfig + + if (plugin) { + column && _vm.columnDrop() + row && _vm.rowDrop() + } + } +} + +const renderEmptyPartFn = (opt) => { + const { _vm, tableData, $slots, renderEmpty } = opt + return () => { + let emptyPartVnode = null + + if (_vm.isCenterEmpty && !tableData.length) { + let emptyVnodes + + if ($slots.empty) { + emptyVnodes = $slots.empty.call(_vm, h) + } else if (renderEmpty) { + emptyVnodes = [renderEmpty(h, _vm)] + } else { + emptyVnodes = [h('p', { class: 'tiny-grid__empty-img' }), h('span', { class: 'tiny-grid__empty-text' }, GlobalConfig.i18n('ui.grid.emptyText'))] + } + + emptyPartVnode = h('div', { class: 'empty-center-block' }, emptyVnodes) + } + + return emptyPartVnode + } +} + +const renderFooterFn = (opt) => { + const { showFooter, footerData, footerMethod, tableColumn, visibleColumn, vSize } = opt + return () => { + let tableFooterVnode = [null] + + if (showFooter) { + tableFooterVnode = h(GridFooter, { + props: { footerData, footerMethod, tableColumn, visibleColumn, size: vSize }, + ref: 'tableFooter' + }) + } + + return tableFooterVnode + } +} + +/** + * 渲染浮固定列 + */ +function renderFixed(h, $table, fixedType) { + let { collectColumn, columnStore, footerData, isGroup, showFooter, showHeader, tableColumn, tableData, vSize, visibleColumn } = $table + let fixedColumn = columnStore[`${fixedType}List`] + + const props = { fixedType, tableData, tableColumn, visibleColumn, collectColumn, size: vSize, fixedColumn, isGroup } + + // prettier-ignore + return h( + 'div', + { + class: `tiny-grid__fixed-${ fixedType }-wrapper`, + ref: `${fixedType }Container` + }, + [ + showHeader ? h(GridHeader, { props, ref: `${fixedType}Header` }) : null, + h(GridBody, { props, ref: `${fixedType}Body` }), + showFooter + ? h(GridFooter, { + props: { fixedType, footerData, tableColumn, visibleColumn, size: vSize, fixedColumn }, + ref: `${fixedType}Footer` + }) + : null + ] + ) +} + +const renderResizeBarFn = (opt) => { + const { isResizable, overflowX, scrollbarHeight } = opt + return () => { + let resizeBarVnode = [null] + + if (isResizable) { + resizeBarVnode = h('div', { + class: 'tiny-grid__resizable-bar', + style: overflowX ? { 'padding-bottom': `${scrollbarHeight}px` } : null, + ref: 'resizeBar', + key: 'tinyGridResizeBar' + }) + } + + return resizeBarVnode + } +} + +const renderPluginWrapperFn = (opt) => { + const { hasFilter, optimizeOpts, filterStore, isCtxMenu, ctxMenuStore, hasTip, tooltipContentOpts } = opt + const { editRules, validOpts, height, tableData, vaildTipOpts, id, _vm } = opt + return () => { + let filterVnode = [null] + let ctxMenuVnode = [null] + let tooltipVnode = [null] + let errorTooltipVnode = [null] + + if (hasFilter) { + filterVnode = h(GridFilter, { + props: { optimizeOpts, filterStore }, + ref: 'filterWrapper' + }) + } + + if (isCtxMenu) { + ctxMenuVnode = h(GridMenu, { props: { ctxMenuStore }, ref: 'ctxWrapper' }) + } + if (hasTip) { + tooltipVnode = h(Tooltip, { ref: 'tooltip', props: tooltipContentOpts }) + } + + if (hasTip && editRules && (validOpts.message === 'default' ? !height : validOpts.message === 'tooltip')) { + errorTooltipVnode = h(Tooltip, { + class: 'tiny-grid__valid-error', + props: validOpts.message === 'tooltip' || tableData.length === 1 ? vaildTipOpts : null, + ref: 'validTip' + }) + } + + return h( + 'div', + { + class: `tiny-grid${id}-wrapper ${_vm.$attrs.staticClass || ''}`, + ref: 'tableWrapper' + }, + [ + // 筛选 + filterVnode, + // 快捷菜单 + ctxMenuVnode, + // Ellipsis tooltip + tooltipVnode, + // valid error tooltip + errorTooltipVnode + ] + ) + } +} + +const renderSelectToolbarFn = (opt) => { + const { selectToolbar, selectToolbarStore, renderedToolbar } = opt + return () => { + let selectToolbarVnode = [null] + + if (selectToolbar) { + selectToolbarVnode = h( + 'div', + { + ref: 'selectToolbar', + class: 'tiny-grid__select-toolbar', + style: [ + selectToolbarStore.layout, + { + visibility: selectToolbarStore.visible ? 'visible' : 'hidden' + } + ] + }, + renderedToolbar ? renderedToolbar : [null] + ) + } + + return selectToolbarVnode + } +} + +function getRenderer(opt) { + const { $slots, _vm, leftList, optimizeOpts, overflowX, props, rightList, showFooter, showHeader, tableColumn, tableData, vSize, visibleColumn } = opt + const { $grid, ctxMenuStore, editRules, filterStore, footerData, footerMethod, hasFilter, hasTip, height, id } = _vm + const { isCtxMenu, isResizable, renderEmpty, scrollbarHeight, selectToolbarStore, tooltipContentOpts, vaildTipOpts, validOpts } = _vm + const { selectToolbar, renderedToolbar } = $grid + + const renderHeader = () => (showHeader ? h(GridHeader, { ref: 'tableHeader', props }) : [null]) + const renderEmptyPart = renderEmptyPartFn({ _vm, tableData, $slots, renderEmpty }) + const renderFooter = renderFooterFn({ showFooter, footerData, footerMethod, tableColumn, visibleColumn, vSize }) + + const renderFixedLeft = () => (leftList && leftList.length && overflowX ? renderFixed(h, _vm, 'left') : [null]) + const renderFixedRight = () => (rightList && rightList.length && overflowX ? renderFixed(h, _vm, 'right') : [null]) + + const renderResizeBar = renderResizeBarFn({ isResizable, overflowX, scrollbarHeight }) + + const arg1 = { hasFilter, optimizeOpts, filterStore, isCtxMenu, ctxMenuStore, hasTip, tooltipContentOpts } + const arg2 = { editRules, validOpts, height, tableData, vaildTipOpts, id, _vm } + const renderPluginWrapper = renderPluginWrapperFn(Object.assign(arg1, arg2)) + + const renderSelectToolbar = renderSelectToolbarFn({ selectToolbar, selectToolbarStore, renderedToolbar }) + + return { + renderHeader, + renderEmptyPart, + renderFooter, + renderFixedLeft, + renderFixedRight, + renderResizeBar, + renderPluginWrapper, + renderSelectToolbar + } +} + +function getTableAttrs(args) { + let { vSize, editConfig, showHeader, showFooter, overflowY, overflowX, leftList, rightList, showOverflow } = args + let { showHeaderOverflow, highlightCell, optimizeOpts, stripe, border, isGroup, mouseConfig } = args + let { loading, highlightHoverRow, highlightHoverColumn } = args + + const map = { + showHeader: 'show__head', + showFooter: 'show__foot', + overflowY: 'scroll__y', + overflowX: 'scroll__x', + fixedLeft: 'fixed__left', + fixedRight: 'fixed__right', + loading: 'is__loading', + highlightHoverRow: 'row__highlight', + highlightHoverColumn: 'column__highlight' + } + + return { + class: { + 'tiny-grid': 1, + [`size__${vSize}`]: vSize, + 'tiny-grid-editable': editConfig, + [map.showHeader]: showHeader, + [map.showFooter]: showFooter, + [map.overflowY]: overflowY, + [map.overflowX]: overflowX, + [map.fixedLeft]: leftList.length, + [map.fixedRight]: rightList.length, + 'all-overflow': showOverflow, + 'all-head-overflow': showHeaderOverflow, + 'tiny-grid-cell__highlight': highlightCell, + 'tiny-grid__animat': optimizeOpts.animat, + 'tiny-grid__stripe': stripe, + 'tiny-grid__border': border || isGroup, + 'tiny-grid__checked': mouseConfig.checked, + 'mark-insert': editConfig && editConfig.markInsert, + 'edit__no-border': editConfig && editConfig.showBorder === false, + [map.loading]: loading, + [map.highlightHoverRow]: highlightHoverRow, + [map.highlightHoverColumn]: highlightHoverColumn + } + } +} + +const gridData = { + // 存储异步加载过的行\列数据 + asyncRenderMap: {}, + // 列分组配置 + collectColumn: [], + // 存放列相关的信息 + columnStore: { + autoList: [], + centerList: [], + leftList: [], + pxList: [], + pxMinList: [], + resizeList: [], + rightList: [], + scaleList: [], + scaleMinList: [] + }, + // 存放快捷菜单的信息 + ctxMenuStore: { + list: [], + selectChild: null, + selected: null, + showChild: false, + style: null, + visible: false + }, + // 当前行 + currentRow: null, + // 存放可编辑相关信息 + editStore: { + editorAutoRefreshKey: 0, + // 激活 + actived: { column: null, row: null }, + // 所有选中 + checked: { columns: [], rows: [], tColumns: [], tRows: [] }, + // 已复制源 + copyed: { columns: [], cut: false, rows: [] }, + indexs: { columns: [] }, + insertList: [], + removeList: [], + // 选中源 + selected: { column: null, row: null }, + titles: { columns: [] } + }, + // 已展开的行 + expandeds: [], + // 当前选中的筛选列 + filterStore: { + column: null, + condition: { input: '', relation: 'equals' }, + id: '', + multi: false, + options: [], + visible: false + }, + // 表尾合计数据 + footerData: [], + groupData: {}, + groupFolds: [], + // 所有列已禁用 + headerCheckDisabled: false, + id: uniqueId(), + // 是否全选 + isAllSelected: false, + // 多选属性,有选中且非全选状态 + isIndeterminate: false, + // 是否存在横向滚动条 + overflowX: false, + // 是否存在纵向滚动条 + overflowY: true, + // 存储滚动加载,上次滚动的位置 + scrollLoadStore: { bodyHeight: 0, scrollHeight: 0 }, + // 是否启用了横向 X 可视渲染方式加载 + scrollXLoad: false, + // 是否启用了纵向 Y 可视渲染方式加载 + scrollYLoad: false, + // 横向滚动条的高度 + scrollbarHeight: 0, + // 纵向滚动条的宽度 + scrollbarWidth: 0, + // 单选属性,选中行 + selectRow: null, + // 存放多选工具栏相关信息 + selectToolbarStore: { + layout: { height: 0, left: 0, top: 0, width: 0, zIndex: 1 }, + visible: false + }, + // 多选属性,已选中的列 + selection: [], + // 渲染的列 + tableColumn: [], + // 渲染中的数据 + tableData: [], + // 完整所有列 + tableFullColumn: [], + // tooltip提示内容 + tooltipContent: '', + // tooltip提示内容是否处理换行字符 + tooltipContentPre: false, + // 已展开树节点 + treeExpandeds: [], + // 树节点不确定状态的列表 + treeIndeterminates: [], + // 存放数据校验相关信息 + validStore: { + column: null, + content: '', + isArrow: false, + row: null, + rule: null, + visible: false + }, + // 校验tip提示内容 + validTipContent: '', + // 在编辑模式下 单元格在失去焦点验证的状态 + validatedMap: {}, + // 显示的列 + visibleColumn: [] +} +const getTableData = () => { + const tableData = { + // 条件处理后数据 + afterFullData: [], + elemStore: {}, + // 表尾高度 + footerHeight: 0, + // 缓存数据集 + fullAllDataRowIdData: {}, + fullAllDataRowMap: new Map(), + fullColumnIdData: {}, + fullColumnMap: new Map(), + fullDataRowIdData: {}, + fullDataRowMap: new Map(), + // 缓存树形表格行数据以及其父级行数据的映射关系 + parentRowMap: new Map(), + // 临时插入数据集 + temporaryRows: [], + // 表头高度 + headerHeight: 0, + // 最后滚动位置 + lastScrollLeft: 0, + lastScrollTop: 0, + // 表格父容器的高度 + parentHeight: 0, + scrollDirection: 'N', // N,X,Y (滚动方向) + // 存放横向 X 虚拟滚动相关的信息 + scrollXStore: {}, + // 存放纵向 Y 虚拟滚动相关信息 + scrollYStore: {}, + // 完整数据 + tableFullData: [], + // 表格高度 + tableHeight: 0, + // 表格宽度 + tableWidth: 0, + // 存放 tooltip 相关信息 + tooltipStore: {} + } + return tableData +} + +export default { + name: `${$prefix}GridTable`, + props: { + // 所有的列对其方式 + align: { type: String, default: () => GlobalConfig.align }, + // 是否自动监听父容器变化去更新响应式表格宽高 + autoResize: Boolean, + // 是否带有纵向边框 + border: { type: Boolean, default: () => GlobalConfig.border }, + // 给单元格附加 className + cellClassName: [String, Function], + // 主键配置 + columnKey: Boolean, + // 所有列最小宽度,把剩余宽度按比例分配 + columnMinWidth: [Number, String], + // 所有列宽度 + columnWidth: [Number, String], + // 快捷菜单配置项 + contextMenu: Object, + // 初始化绑定动态列 + customs: Array, + // 数据 + data: [Array, Object], + // 行拖拽和列拖拽的配置 + dropConfig: Object, + // 编辑配置项 + editConfig: [Object, Boolean], + // 校验规则配置项 + editRules: Object, + // 展开行配置项 + expandConfig: Object, + // 列的宽度是否自撑开 + fit: { type: Boolean, default: () => GlobalConfig.fit }, + // 所有的表尾列的对齐方式 + footerAlign: { type: String, default: () => GlobalConfig.footerAlign }, + // 给表尾的单元格附加 className + footerCellClassName: [String, Function], + // 表尾合计的计算方法 + footerMethod: Function, + // 给表尾的行附加 className + footerRowClassName: [String, Function], + // 表尾合并行或列 + footerSpanMethod: Function, + // 所有的表头列的对齐方式 + headerAlign: { type: String, default: () => GlobalConfig.headerAlign }, + // 给表头的单元格附加 className + headerCellClassName: [String, Function], + // 给表头的行附加 className + headerRowClassName: [String, Function], + // 表头后置图标是否绝对定位 + headerSuffixIconAbsolute: Boolean, + // 表格的高度 + height: [Number, String], + // 激活单元格编辑时是否高亮显示 + highlightCell: Boolean, + // 是否要高亮当前选中列 + highlightCurrentColumn: { + type: Boolean, + default: () => GlobalConfig.highlightCurrentColumn + }, + // 是否要高亮当前选中行 + highlightCurrentRow: { + type: Boolean, + default: () => GlobalConfig.highlightCurrentRow + }, + // 鼠标移到列是否要高亮显示 + highlightHoverColumn: { + type: Boolean, + default: () => GlobalConfig.highlightHoverColumn + }, + // 鼠标移到行是否要高亮显示 + highlightHoverRow: { + type: Boolean, + default: () => GlobalConfig.highlightHoverRow + }, + // 是否开启异步列功能 + isAsyncColumn: Boolean, + isCenterEmpty: Boolean, + // 是否拖拽表头调整列顺序 + isDragHeaderSorting: Boolean, + // 按键配置项 + keyboardConfig: Object, + // 表格是否加载中 + loading: Boolean, + loadingComponent: Object, + // 表格的最大高度 + maxHeight: [Number, String], + // 表格的最小高度 + minHeight: [Number, String], + // 鼠标配置项 + mouseConfig: Object, + // 优化配置项 + optimization: Object, + // 额外的参数 + params: Object, + // 单选配置 + radioConfig: Object, + // 是否所有服务端筛选 + remoteFilter: Boolean, + // 是否所有服务端排序 + remoteSort: Boolean, + // 空数据渲染 + renderEmpty: Function, + renderRowAfter: Function, + // 所有列是否允许拖动列宽调整大小 + resizable: { type: Boolean, default: () => GlobalConfig.resizable }, + // 给行附加 className + rowClassName: [String, Function], + // 行分组配置 + rowGroup: Object, + rowId: { type: String, default: () => GlobalConfig.rowId }, + rowKey: Boolean, + // 行合并 + rowSpan: Array, + // 滚动加载 + scrollLoad: Object, + // 多选配置项 + selectConfig: Object, + // 是否显示表尾合计 + showFooter: Boolean, + // 是否显示表头 + showHeader: { type: Boolean, default: () => GlobalConfig.showHeader }, + // 设置表头所有内容过长时显示为省略号 + showHeaderOverflow: { + type: [Boolean, String], + default: () => GlobalConfig.showHeaderOverflow + }, + // 设置所有内容过长时显示为省略号 + showOverflow: { + type: [Boolean, String], + default: () => GlobalConfig.showOverflow + }, + // 表格的尺寸 + size: { type: String, default: () => GlobalConfig.size }, + // 排序配置项 + sortConfig: Object, + // 自定义所有列的排序方法 + sortMethod: Function, + // 全局开关控制所有的列是否可以排列 + sortable: { type: Boolean, default: true }, + // 合并行或列 + spanMethod: Function, + // 只对 type=index 时有效,自定义序号的起始值 + startIndex: { type: Number, default: 0 }, + // 是否带有斑马纹 + stripe: { type: Boolean, default: () => GlobalConfig.stripe }, + // 默认统计配置 + summaryConfig: Object, + // 是否自动根据状态属性去更新响应式表格宽高 + syncResize: Boolean, + tableLayout: String, + // tooltip 配置项 + tooltipConfig: { type: Object, default: () => ({}) }, + // 树形结构配置项 + treeConfig: Object, + // 校验配置项 + validConfig: Object + }, + provide() { + return { + $table: this, + // 嵌套表格屏蔽父表格列 + $column: null + } + }, + inject: { + $grid: { + default: null + } + }, + data() { + return extend(true, {}, gridData) + }, + computed: { + bodyCtxMenu() { + return this.ctxMenuOpts.body && this.ctxMenuOpts.body.options ? this.ctxMenuOpts.body.options : [] + }, + ctxMenuList() { + let rest = [] + this.ctxMenuStore.list.forEach((list) => list.forEach((item) => rest.push(item))) + return rest + }, + ctxMenuOpts() { + return extend(true, {}, GlobalConfig.menu, this.contextMenu) + }, + hasFilter() { + return this.tableColumn.some((column) => isObject(column.filter) && !isEmptyObject(column.filter)) + }, + hasTip() { + return TINYGrid._tooltip + }, + headerCtxMenu() { + return this.ctxMenuOpts.header && this.ctxMenuOpts.header.options ? this.ctxMenuOpts.header.options : [] + }, + isCtxMenu() { + return this.headerCtxMenu.length || this.bodyCtxMenu.length + }, + // 是否使用了分组表头 + isGroup() { + return this.collectColumn.some((column) => hasChildrenList(column)) + }, + isResizable() { + return this.resizable || this.tableFullColumn.some((column) => column.resizable) + }, + optimizeOpts() { + return extend(true, {}, GlobalConfig.optimization, this.optimization) + }, + sortOpts() { + return extend(true, {}, GlobalConfig.sortConfig, this.sortConfig) + }, + tooltipContentOpts() { + return extend( + true, + { + content: this.tooltipContent, + pre: this.tooltipContentPre, + renderContent: this.tooltipConfig.renderContent, + placement: 'right', + type: this.tooltipConfig.effect ? undefined : 'normal' + }, + this.tooltipConfig + ) + }, + vSize() { + return this.size || (this.$parent && this.$parent.size) || (this.$parent && this.$parent.vSize) + }, + vaildTipOpts() { + return extend( + true, + { + isArrow: false, + placement: 'top', + type: 'error', + content: this.validTipContent + }, + this.tooltipConfig + ) + }, + validOpts() { + return extend(true, { message: 'tooltip' }, GlobalConfig.validConfig, this.validConfig) + } + }, + watch: { + collectColumn(value) { + this.watchColumn(value) + }, + customs(value) { + !this.isUpdateCustoms && this.mergeCustomColumn(value) + this.isUpdateCustoms = false + }, + data(value) { + if (Array.isArray(value)) { + !this._isUpdateData && this.loadTableData(value, true).then(this.handleDefault) + this._isUpdateData = false + } + }, + 'data.length': { + handler() { + // 此处考虑性能问题不能深度监听data属性,再结合表格内部显示数据都是来自data的浅拷贝,所以只需要监听data的长度即可 + if (Array.isArray(this.data)) { + !this._isUpdateData && this.loadTableData(this.data, true).then(this.handleDefault) + this._isUpdateData = false + } + } + }, + height() { + this.$nextTick(this.recalculate) + }, + syncResize(value) { + value && this.$nextTick(this.recalculate) + }, + tableColumn() { + this.analyColumnWidth() + } + }, + created() { + let { scrollXStore, scrollYStore, optimizeOpts, data } = Object.assign(this, getTableData()) + let { scrollX, scrollY } = optimizeOpts + + verifyConfig(this) + mergeScrollDirStore(scrollX, scrollXStore) + mergeScrollDirStore(scrollY, scrollYStore) + loadStatic(data, this) + mergeTreeConfig(this) + + // 处理拖拽的逻辑 + initDrop(this) + + GlobalEvent.on(this, 'mousedown', this.handleGlobalMousedownEvent) + GlobalEvent.on(this, 'blur', this.handleGlobalBlurEvent) + GlobalEvent.on(this, 'mousewheel', this.handleGlobalMousewheelEvent) + GlobalEvent.on(this, 'keydown', this.handleGlobalKeydownEvent) + GlobalEvent.on(this, 'resize', this.handleGlobalResizeEvent) + GlobalEvent.on(this, 'contextmenu', this.handleGlobalContextmenuEvent) + }, + mounted() { + this.$nextTick().then(() => { + if (this.autoResize && TINYGrid._resize) { + this.bindResize() + } + + document.body.appendChild(this.$refs.tableWrapper) + }) + }, + activated() { + let { lastScrollLeft, lastScrollTop } = this + + if (lastScrollLeft || lastScrollTop) { + this.clearScroll() + .then(this.recalculate) + .then(() => this.scrollTo(lastScrollLeft, lastScrollTop)) + } + }, + setup(props, { slots, attrs, listeners }) { + hooks.onBeforeUnmount(() => { + const table = hooks.getCurrentInstance().proxy + const { elemStore, $refs } = table + const containerList = ['main', 'left', 'right'] + const tableWrapper = $refs.tableWrapper + + if (tableWrapper && tableWrapper.parentNode) { + tableWrapper.parentNode.removeChild(tableWrapper) + } + + if (TINYGrid._resize) { + table.unbindResize() + } + + table.closeFilter() + table.closeMenu() + + // 清除 拖动相关的引用 + table.columnSortable && table.columnSortable.destroy() + table.rowSortable && table.rowSortable.destroy() + + containerList.forEach((layout) => { + const ySpaceElem = elemStore[`${layout}-body-ySpace`] + + if (ySpaceElem) { + ySpaceElem.onscroll = null + } + }) + + GlobalEvent.off(table, 'mousedown') + GlobalEvent.off(table, 'blur') + GlobalEvent.off(table, 'mousewheel') + GlobalEvent.off(table, 'keydown') + GlobalEvent.off(table, 'resize') + GlobalEvent.off(table, 'contextmenu') + clearOnTableUnmount(table) + }) + + const tableListeners = getListeners(attrs, listeners) + + return { slots, tableListeners } + }, + render() { + let { border, collectColumn, columnStore, editConfig, highlightCell, highlightHoverColumn } = this + let { highlightHoverRow, isGroup, loading, loadingComponent, mouseConfig = {}, optimizeOpts } = this + let { overflowX, overflowY, showFooter, showHeader, showHeaderOverflow, showOverflow } = this + let { stripe, tableColumn, tableData, vSize, visibleColumn } = this + let { leftList, rightList } = columnStore + let $slots = this.slots + const props = { tableData, tableColumn, visibleColumn, collectColumn, size: vSize, isGroup } + let args = { $slots, _vm: this, leftList, optimizeOpts, overflowX, props, rightList } + + Object.assign(args, { showFooter, showHeader, tableColumn, tableData, vSize, visibleColumn }) + const renders = getRenderer(args) + const { renderHeader, renderEmptyPart, renderFooter, renderFixedLeft } = renders + const { renderFixedRight, renderResizeBar, renderPluginWrapper, renderSelectToolbar } = renders + + args = { vSize, editConfig, showHeader, showFooter, overflowY, overflowX, leftList, rightList, showOverflow } + Object.assign(args, { showHeaderOverflow, highlightCell, optimizeOpts, stripe, border, isGroup, mouseConfig }) + Object.assign(args, { loading, highlightHoverRow, highlightHoverColumn }) + + return h('div', getTableAttrs(args), [ + // 隐藏列 + h('div', { class: 'tiny-grid-hidden-column', ref: 'hideColumn' }, $slots.default && $slots.default()), + // 主头部 + renderHeader(), + // 居中显示空数据 + renderEmptyPart(), + // 主内容 + h(GridBody, { ref: 'tableBody', props }), + // 底部汇总 + renderFooter(), + // 左侧固定列 + renderFixedLeft(), + // 右侧固定列 + renderFixedRight(), + // 边框线 + h('div', { class: 'tiny-grid__border-line', key: 'tinyGridBorderLine' }), + // 列宽线 + renderResizeBar(), + // 加载中 + h(loadingComponent || GridLoading, { props: { visible: loading } }), + // 筛选、快捷菜单、Tip提示、校验提示 + renderPluginWrapper(), + // 多选工具栏 + renderSelectToolbar() + ]) + }, + methods +} diff --git a/packages/grid/src/table/src/utils/autoCellWidth.js b/packages/grid/src/table/src/utils/autoCellWidth.js new file mode 100644 index 000000000..6d9ccdbcb --- /dev/null +++ b/packages/grid/src/table/src/utils/autoCellWidth.js @@ -0,0 +1,113 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ + +// 自适应 +const adaptive = ({ autoArr, meanWidth, minCellWidth, tableWidth, fit, bodyWidth }) => { + autoArr.forEach((column, index) => { + let width = Math.max(meanWidth, minCellWidth) + + column.renderWidth = width + tableWidth += width + + if (fit && index === autoArr.length - 1) { + // 如果所有列足够放的情况下,修补列之间的误差 + let odiffer = bodyWidth - tableWidth + + if (odiffer > 0) { + column.renderWidth += odiffer + tableWidth = bodyWidth + } + } + }) + + return tableWidth +} + +const initTableWidth = ({ remainWidth, columnStore }) => { + let tableWidth = 0 + let { resizeList: resizeArr, pxMinList: pxMinArr, pxList: pxArr } = columnStore + let { scaleList: scaleArr, scaleMinList: scaleMinArr } = columnStore + + // 最小宽 + pxMinArr.forEach((column) => { + let minWidth = parseInt(column.minWidth) + + tableWidth += minWidth + column.renderWidth = minWidth + }) + // 最小百分比 + let meanWidth = remainWidth / 100 + + scaleMinArr.forEach((column) => { + let scaleWidth = Math.floor(parseInt(column.minWidth) * meanWidth) + + tableWidth += scaleWidth + column.renderWidth = scaleWidth + }) + // 固定百分比 + scaleArr.forEach((column) => { + let scaleWidth = Math.floor(parseInt(column.width) * meanWidth) + + tableWidth += scaleWidth + column.renderWidth = scaleWidth + }) + // 固定宽 + pxArr.forEach((column) => { + let width = parseInt(column.width) + + tableWidth += width + column.renderWidth = width + }) + // 调整了列宽 + resizeArr.forEach((column) => { + let width = parseInt(column.resizeWidth) + + tableWidth += width + column.renderWidth = width + }) + + return { tableWidth, meanWidth } +} + +export const calcTableWidth = ({ bodyWidth, columnStore, fit, minCellWidth, remainWidth }) => { + let { tableWidth, meanWidth } = initTableWidth({ remainWidth, columnStore }) + let { pxMinList: pxMinArr, scaleMinList: scaleMinArr, autoList: autoArr } = columnStore + + remainWidth -= tableWidth + meanWidth = remainWidth > 0 ? Math.floor(remainWidth / (scaleMinArr.length + pxMinArr.length + autoArr.length)) : 0 + + if (fit) { + if (remainWidth > 0) { + scaleMinArr.concat(pxMinArr).forEach((column) => { + tableWidth += meanWidth + column.renderWidth += meanWidth + }) + } + } else { + meanWidth = minCellWidth + } + + return adaptive({ autoArr, meanWidth, minCellWidth, tableWidth, fit, bodyWidth }) +} diff --git a/packages/grid/src/table/src/utils/computeScrollLoad.js b/packages/grid/src/table/src/utils/computeScrollLoad.js new file mode 100644 index 000000000..81939bbe3 --- /dev/null +++ b/packages/grid/src/table/src/utils/computeScrollLoad.js @@ -0,0 +1,75 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import { toNumber } from '@opentiny/vue-renderless/grid/static/' +import browser from '@opentiny/vue-renderless/common/browser' + +let isWebkit = browser['-webkit'] && browser.name !== 'edge' + +export function computeScrollYLoad({ _vm, scrollLoad, scrollY, scrollYLoad, scrollYStore, tableBodyElem }) { + if (scrollYLoad || scrollLoad) { + scrollYStore.rowHeight = _vm.getRowHeight() + } + + if (scrollYLoad) { + let visibleYSize = toNumber(scrollY.vSize || Math.ceil(tableBodyElem.clientHeight / scrollYStore.rowHeight)) + + scrollYStore.visibleSize = visibleYSize + + // 自动优化 + if (!scrollY.oSize) { + scrollYStore.offsetSize = visibleYSize + } + + if (!scrollY.rSize) { + scrollYStore.renderSize = visibleYSize + (isWebkit ? 2 : visibleYSize) + } + + _vm.updateScrollYData() + } else { + _vm.updateScrollYSpace() + } +} + +export function computeScrollXLoad({ _vm, scrollX, scrollXLoad, scrollXStore, tableBodyElem, visibleColumn }) { + if (scrollXLoad) { + let firstColumn = visibleColumn[0] + let cWidth = firstColumn ? firstColumn.renderWidth : 40 + let visibleXSize = toNumber(scrollX.vSize || Math.ceil(tableBodyElem.clientWidth / cWidth)) + + scrollXStore.visibleSize = visibleXSize + // 自动优化 + if (!scrollX.oSize) { + scrollXStore.offsetSize = visibleXSize + } + + if (!scrollX.rSize) { + scrollXStore.renderSize = visibleXSize + 2 + } + + _vm.updateScrollXData() + } else { + _vm.updateScrollXSpace() + } +} diff --git a/packages/grid/src/table/src/utils/handleGlobalKeydownEvent.js b/packages/grid/src/table/src/utils/handleGlobalKeydownEvent.js new file mode 100644 index 000000000..9273e917a --- /dev/null +++ b/packages/grid/src/table/src/utils/handleGlobalKeydownEvent.js @@ -0,0 +1,155 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +function rule1({ isKeyEsc, _vm, event, actived, mouseConfig }) { + return { + match: () => isKeyEsc, + action: () => _vm.handleEscKeyDown({ event, actived, mouseConfig }) + } +} + +function rule2({ isKeySpacebar, keyboardConfig, selected, _vm, event }) { + return { + match: () => + isKeySpacebar && + (keyboardConfig.isArrow || keyboardConfig.isTab) && + selected.row && + selected.column && + (selected.column.type === 'selection' || selected.column.type === 'radio'), + action: () => _vm.handleSpaceKeyDown({ event, keyboardConfig }) + } +} + +function rule3(args) { + const { isKeyEnter, keyboardConfig, selected, actived } = args + const { treeConfig, highlightCurrentRow, currentRow, _vm, event } = args + + return { + match: () => + isKeyEnter && (keyboardConfig.isArrow || keyboardConfig.isTab) && (selected.row || actived.row || (treeConfig && highlightCurrentRow && currentRow)), + action: () => _vm.handleEnterKeyDown({ event, selected, actived }) + } +} + +function rule4({ isOperCtxMenu, _vm, event }) { + return { + match: () => isOperCtxMenu, + action: () => _vm.handleCtxMenu({ event }) + } +} + +function rule5({ isKeyF2, _vm, event, selected }) { + return { + match: () => isKeyF2, + action: () => _vm.handleF2KeyDown({ event, selected }) + } +} + +function rule6({ isOperArrowKeys, keyboardConfig, _vm, event, selected }) { + return { + match: () => isOperArrowKeys && keyboardConfig.isArrow, + action: () => _vm.handleArrowKeyDown({ event, selected }) + } +} + +function rule7({ isKeyTab, keyboardConfig, _vm, event, selected, actived }) { + return { + match: () => isKeyTab && keyboardConfig.isTab, + action: () => _vm.handleTabKeyDown({ event, selected, actived }) + } +} + +function rule8(args) { + const { isKeyDel, treeConfig, highlightCurrentRow, currentRow } = args + const { isKeyBack, keyboardConfig, _vm, event, selected } = args + + return { + match: () => isKeyDel || (treeConfig && highlightCurrentRow && currentRow ? isKeyBack && keyboardConfig.isArrow : isKeyBack), + action: () => _vm.handleDelKeyDown({ event, selected }) + } +} + +function rule9({ keyboardConfig, isKeyWithCtrl, isKeyA, isKeyX, isKeyC, isKeyV, _vm, event }) { + return { + match: () => keyboardConfig.isCut && isKeyWithCtrl && (isKeyA || isKeyX || isKeyC || isKeyV), + action: () => _vm.handleCopyKeyDown({ event }) + } +} + +function rule10({ keyboardConfig, isKeyWithCtrl, _vm, event, selected }) { + return { + match: () => keyboardConfig.isEdit && !isKeyWithCtrl, + action: () => _vm.handleOtherKeyDown({ event, selected }) + } +} +export function onGlobalKeydown(event, _vm) { + let { isCtxMenu, ctxMenuStore, mouseConfig = {}, keyboardConfig = {} } = _vm + let { treeConfig, highlightCurrentRow, currentRow } = _vm + let { selected, actived } = _vm.editStore + let eventKeyCode = event.keyCode + let isKeyWithCtrl = event.ctrlKey + let isKeyF2 = eventKeyCode === 113 + let isKeyX = eventKeyCode === 88 + let isKeyV = eventKeyCode === 86 + let isKeyC = eventKeyCode === 67 + let isKeyA = eventKeyCode === 65 + let isKeyDel = eventKeyCode === 46 + let isKeyDwArrow = eventKeyCode === 40 + let isKeyRightArrow = eventKeyCode === 39 + let isKeyUpArrow = eventKeyCode === 38 + let isKeyLeftArrow = eventKeyCode === 37 + let isKeySpacebar = eventKeyCode === 32 + let isKeyEsc = eventKeyCode === 27 + let isKeyEnter = eventKeyCode === 13 + let isKeyTab = eventKeyCode === 9 + let isKeyBack = eventKeyCode === 8 + let isOperArrowKeys = isKeyLeftArrow || isKeyUpArrow || isKeyRightArrow || isKeyDwArrow + let isOperCtxMenu = isCtxMenu && ctxMenuStore.visible && (isKeyEnter || isKeySpacebar || isOperArrowKeys) + let rules = [ + rule1({ isKeyEsc, _vm, event, actived, mouseConfig }), + // 空格键支持选中复选列 + rule2({ isKeySpacebar, keyboardConfig, selected, _vm, event }), + // 如果是激活状态,退则出到下一行 + rule3({ isKeyEnter, keyboardConfig, selected, actived, treeConfig, highlightCurrentRow, currentRow, _vm, event }), + // 如果配置了右键菜单; 支持方向键操作、回车 + rule4({ isOperCtxMenu, _vm, event }), + // 如果按下了 F2 键 + rule5({ isKeyF2, _vm, event, selected }), + // 如果按下了方向键 + rule6({ isOperArrowKeys, keyboardConfig, _vm, event, selected }), + // 如果按下了 Tab 键切换 + rule7({ isKeyTab, keyboardConfig, _vm, event, selected, actived }), + // 如果是删除键 + rule8({ isKeyDel, treeConfig, highlightCurrentRow, currentRow, isKeyBack, keyboardConfig, _vm, event, selected }), + rule9({ keyboardConfig, isKeyWithCtrl, isKeyA, isKeyX, isKeyC, isKeyV, _vm, event }), + // 如果是按下非功能键之外允许直接编辑 + rule10({ keyboardConfig, isKeyWithCtrl, _vm, event, selected }) + ] + + for (let i = 0; i < rules.length; i++) { + if (rules[i].match()) { + return rules[i].action() + } + } +} diff --git a/packages/grid/src/table/src/utils/handleGlobalMousedownEvent.js b/packages/grid/src/table/src/utils/handleGlobalMousedownEvent.js new file mode 100644 index 000000000..322c7aeef --- /dev/null +++ b/packages/grid/src/table/src/utils/handleGlobalMousedownEvent.js @@ -0,0 +1,87 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +export function handleGlobalMousedownOnFilterWrapper({ $el, _vm, event, filterStore, filterWrapper }) { + if (filterWrapper) { + if (_vm.getEventTargetNode(event, $el, 'tiny-grid-filter-wrapper').flag) { + // 如果点击了筛选按钮 + } else if (_vm.getEventTargetNode(event, filterWrapper.$el).flag) { + // 如果点击筛选容器 + } else if (_vm.getEventTargetNode(event, document.body, 'tiny-popper').flag) { + // 如果点击筛选容器下拉弹出的弹窗 + } else { + _vm.closeFilter() + _vm.preventEvent(event, 'event.clear_filter', filterStore.args, _vm.closeFilter) + } + } +} + +export function handleGlobalMousedownOnCtxMenu({ _vm, ctxMenuStore, event }) { + if (ctxMenuStore.visible && _vm.$refs.ctxWrapper && !_vm.getEventTargetNode(event, _vm.$refs.ctxWrapper.$el).flag) { + _vm.closeMenu() + } +} + +export function handleGlobalBlurOutside({ _vm, actived, event }) { + // false->退出编辑clearActived; undefined->逻辑不变化; true->保留编辑状态,直接return + let custblur = _vm.blurOutside(actived, event) + + if (typeof custblur === 'boolean') { + custblur || setTimeout(() => _vm.clearActived(event)) + return true + } + + return false +} + +export function handleGlobalIsClear({ $el, _vm, actived, editConfig, event, isClear, isReadonlyCol }) { + if (editConfig.mode === 'row') { + let rowNode = _vm.getEventTargetNode(event, $el, 'tiny-grid-body__row') + let isOtherRow = rowNode.flag ? rowNode.targetElem !== actived.args.cell.parentNode : 0 + + if (editConfig.trigger === 'manual') { + // manual 触发,如果点击了不同行 + isClear = !_vm.getEventTargetNode(event, $el, 'row__actived').flag && isOtherRow + } else { + // click,dblclick 触发,如果点击了不同行的非编辑列 + isClear = isOtherRow && isReadonlyCol + } + } else { + // cell 方式,如果是非编辑列 + isClear = isReadonlyCol + } + + return isClear +} + +export function handleGlobalClearActived({ $el, _vm, event, isClear }) { + if ( + isClear || + // 如果点击了当前表格之外 + !_vm.getEventTargetNode(event, $el).flag || + (_vm.$refs.tableHeader && _vm.$refs.tableHeader.$el.contains(event.target)) + ) { + setTimeout(() => _vm.clearActived(event)) + } +} diff --git a/packages/grid/src/table/src/utils/handleLocalFilter.js b/packages/grid/src/table/src/utils/handleLocalFilter.js new file mode 100644 index 000000000..368f36516 --- /dev/null +++ b/packages/grid/src/table/src/utils/handleLocalFilter.js @@ -0,0 +1,166 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import { get } from '@opentiny/vue-renderless/grid/static/' + +export function handleFilterConditionCustom({ column, condition, method, property, row }) { + let ret = { flag: false, result: null } + + if (method && condition.type === 'custom') { + ret.result = method({ property, row, column }) + ret.flag = true + } + + return ret +} + +export function handleFilterConditionExtend({ column, condition, property, row }) { + let ret = { flag: false, result: null } + + if (condition.type === 'extend') { + let extendMethod = condition.method + + if (typeof extendMethod !== 'function') { + extendMethod = () => true + } + + ret.result = extendMethod({ value: get(row, property), row, column }) + ret.flag = true + } + + return ret +} + +function findRelationMethod(relation, relations) { + if (Array.isArray(relations)) { + let method + + for (let i = 0; i < relations.length; i++) { + if (relations[i] && relations[i].value === relation) { + method = relations[i].method + break + } + } + + return method + } +} + +export function handleFilterRelations({ inputFilter }) { + let relations = [] + + if (typeof inputFilter === 'object' && Array.isArray(inputFilter.relations)) { + relations = inputFilter.relations + } + + return relations +} + +function modifyValueCheckStr(value) { + if (!value && typeof value !== 'number') { + value = '' + } + return value +} + +function handleDefaultCheckStr({ column, input, relation, relationMethod, relations, result, row, value }) { + if (typeof relationMethod !== 'function') { + relationMethod = findRelationMethod(relation, relations) + } + + if (typeof relationMethod === 'function') { + result = relationMethod({ value, input, row, column }) + } + + return { relationMethod, result } +} + +/* + * 等于 equals + * 不等于unequal + * 大于greaterThan 小于lessThan + * 大于等于equalToGreaterThan + * 小于等于equalToLessThan + * 包含contains 不包含exclude + * 开头是startwith 结尾是endwith + */ +export function handleFilterCheckStr({ column, relationMethod, relations, row }) { + return (value, input, relation) => { + let result = false + value = modifyValueCheckStr(value) + switch (relation) { + case 'equals': + result = value == input + break + case 'unequal': + result = value != input + break + case 'greaterThan': + result = value > input + break + case 'lessThan': + result = value < input + break + case 'equalToGreaterThan': + result = value >= input + break + case 'equalToLessThan': + result = value <= input + break + case 'contains': + result = value.toString().indexOf(input) !== -1 + break + case 'startwith': + result = value.toString().indexOf(input) === 0 + break + case 'endwith': + result = value.toString().match(new RegExp(`${input}$`)) + break + default: { + let ret = handleDefaultCheckStr({ column, input, relation, relationMethod, relations, result, row, value }) + relationMethod = ret.relationMethod + result = ret.result + } + } + return result + } +} + +export function handleFilterCheck({ checkStr, empty, input, property, relation, row, valueList }) { + return () => { + const value = get(row, property) + + if (empty === true) { + return !value + } + if (empty === false) { + return !!value + } + + const checkInput = (!input && input !== 0) || checkStr(value, input, relation) // inputFilter + const checkEnum = !valueList.length || valueList.indexOf(value) > -1 // emunFilter 只有在多选时valueList才有值 + + return checkInput && checkEnum + } +} diff --git a/packages/grid/src/table/src/utils/handleOtherKeyDown.js b/packages/grid/src/table/src/utils/handleOtherKeyDown.js new file mode 100644 index 000000000..15608e6f1 --- /dev/null +++ b/packages/grid/src/table/src/utils/handleOtherKeyDown.js @@ -0,0 +1,34 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +export function checkOtherKey(keyCode) { + return ( + (keyCode >= 48 && keyCode <= 57) || + (keyCode >= 65 && keyCode <= 90) || + (keyCode >= 96 && keyCode <= 111) || + (keyCode >= 186 && keyCode <= 192) || + (keyCode >= 219 && keyCode <= 222) || + keyCode === 32 + ) +} diff --git a/packages/grid/src/table/src/utils/handleResolveColumn.js b/packages/grid/src/table/src/utils/handleResolveColumn.js new file mode 100644 index 000000000..60ff84742 --- /dev/null +++ b/packages/grid/src/table/src/utils/handleResolveColumn.js @@ -0,0 +1,95 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import { get } from '@opentiny/vue-renderless/grid/static/' + +export function mapFetchColumnPromise({ _vm, fetchColumns, tableColumn }) { + return fetchColumns.map(({ format, columnValues }) => format.async.fetch({ columns: tableColumn, columnValues, $table: _vm })) +} + +export function preprocessDataObjectFormat({ columnCount, columnValues, columnValuesMap, fields }) { + if (columnCount) { + columnValues.forEach((col) => { + if (typeof col === 'object') { + const label = get(col, fields.text || 'label') + const value = get(col, fields.value || 'value') + + col.label = label + columnValuesMap[value] = col + } + }) + } +} + +export function preventDupRender({ + asyncColumnName, + cellTexts, + cellValuesCount, + columnData, + columnValuesMap, + isRender, + property, + renderCount, + row, + splitConfig +}) { + let cellEachIndex = 0 + + if (!isRender && cellValuesCount) { + let cellLabel + let cellValues = [row[property]] + + // 默认不开启 + if (splitConfig.enabled === true) { + cellValues = (row[property] || '').split(splitConfig.valueSplit || ',') + } + + // 拼接单元格内容 + while (cellEachIndex < cellValuesCount) { + const activeValue = cellValues[cellEachIndex] + const currentRow = columnValuesMap[activeValue] + + cellLabel = typeof currentRow === 'object' ? currentRow.label : currentRow + cellTexts.push(cellLabel) + columnData.push({ + label: cellLabel, + value: cellValues[cellEachIndex], + row: currentRow + }) + + cellEachIndex++ + renderCount++ + } + + row[asyncColumnName] = cellTexts.join(splitConfig.textSplit || ',') + } + + return renderCount +} + +export function handleResolveColumnComplete({ _vm, columnData, complete }) { + if (typeof complete === 'function') { + complete({ columnData, $table: _vm }) + } +} diff --git a/packages/grid/src/table/src/utils/handleSelectRow.js b/packages/grid/src/table/src/utils/handleSelectRow.js new file mode 100644 index 000000000..ec59b0490 --- /dev/null +++ b/packages/grid/src/table/src/utils/handleSelectRow.js @@ -0,0 +1,244 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import { eachTree, find, findTree, get, remove, set } from '@opentiny/vue-renderless/grid/static/' + +function onHalfSelectionProperty({ checkStrictly, property, row, treeConfig, treeIndeterminates, value }) { + if (property && treeConfig && !checkStrictly && value === -1) { + treeIndeterminates.push(row) + set(row, property, false) + } +} + +function onFullSelectionProperty({ checkMethod, checkStrictly, property, row, treeConfig, treeIndeterminates, value }) { + if (property && treeConfig && !checkStrictly && value !== -1) { + // 更新子节点状态 + eachTree( + [row], + (item, $rowIndex) => { + if (row === item || !checkMethod || checkMethod({ row: item, $rowIndex })) { + set(item, property, value) + } + }, + treeConfig + ) + remove(treeIndeterminates, (item) => item === row) + } +} + +function getVItemsOnParentSlctProp({ checkMethod, matchObj }) { + let tinyItems + + if (checkMethod) { + tinyItems = matchObj.items.filter((item, $rowIndex) => checkMethod({ row: item, $rowIndex })) + } else { + tinyItems = matchObj.items + } + + return tinyItems +} + +function getParentStatusOnParentSlctProp({ indeterminatesItem, matchObj, property, vItems, value }) { + let parentStatus + + if (indeterminatesItem) { + parentStatus = -1 + } else { + let selectItemArr = matchObj.items.filter((item) => get(item, property)) + let isEqual = selectItemArr.filter((item) => ~vItems.indexOf(item)).length === vItems.length + + parentStatus = isEqual ? true : selectItemArr.length || value === -1 ? -1 : false + } + + return parentStatus +} + +function onHalfSelection({ checkStrictly, property, row, selection, treeConfig, treeIndeterminates, value }) { + if (!property && treeConfig && !checkStrictly && value === -1) { + treeIndeterminates.push(row) + remove(selection, (item) => item === row) + } +} + +function getVItemsOnParentSelection({ checkMethod, matchObj }) { + let vItems + + if (checkMethod) { + vItems = matchObj.items.filter((item, $rowIndex) => checkMethod({ row: item, $rowIndex })) + } else { + vItems = matchObj.items + } + + return vItems +} + +function onFullSelection({ checkMethod, checkStrictly, property, row, selection, treeConfig, treeIndeterminates, value }) { + if (!property && treeConfig && !checkStrictly && value !== -1) { + // 更新子节点状态 + eachTree( + [row], + (item, $rowIndex) => { + if (row === item || !checkMethod || checkMethod({ row: item, $rowIndex })) { + if (value) { + selection.push(item) + } else { + remove(selection, (select) => select === item) + } + } + }, + treeConfig + ) + + remove(treeIndeterminates, (item) => item === row) + } +} + +function getParentStatusOnParentSelection({ indeterminatesItem, matchObj, selection, vItems, value }) { + let parentStatus + + if (indeterminatesItem) { + parentStatus = -1 + } else { + let selectItems = matchObj.items.filter((item) => selection.indexOf(item) > -1) + let isEqualItem = selectItems.filter((item) => vItems.indexOf(item) > -1).length === vItems.length + + parentStatus = isEqualItem ? true : selectItems.length || value === -1 ? -1 : false + } + + return parentStatus +} + +export function hasCheckField({ row }, value, _vm) { + let { tableFullData, selectConfig = {}, treeConfig, treeIndeterminates } = _vm + let { checkField: property, checkStrictly, checkMethod } = selectConfig + + onHalfSelectionProperty({ + checkStrictly, + property, + row, + treeConfig, + treeIndeterminates, + value + }) + + onFullSelectionProperty({ + checkMethod, + checkStrictly, + property, + row, + treeConfig, + treeIndeterminates, + value + }) + + if (property && treeConfig && !checkStrictly) { + // 如果存在父节点,更新父节点状态 + let matchObj = findTree(tableFullData, (item) => item === row, treeConfig) + + if (matchObj && matchObj.parent) { + let vItems = getVItemsOnParentSlctProp({ checkMethod, matchObj }) + let indeterminatesItem = find(matchObj.items, (item) => treeIndeterminates.indexOf(item) > -1) + let parentStatus = getParentStatusOnParentSlctProp({ + indeterminatesItem, + matchObj, + property, + vItems, + value + }) + + return _vm.handleSelectRow({ row: matchObj.parent }, parentStatus) + } + } + + if (property && !(treeConfig && !checkStrictly)) { + set(row, property, value) + } +} + +function onSelectTreeCheckStrictly({ row }, value, _vm) { + let { selection, tableFullData, selectConfig = {}, treeConfig, treeIndeterminates } = _vm + let { checkField: property, checkStrictly, checkMethod } = selectConfig + // 树表行半选 + onHalfSelection({ + checkStrictly, + property, + row, + selection, + treeConfig, + treeIndeterminates, + value + }) + // 树表行完全选中 + onFullSelection({ + checkMethod, + checkStrictly, + property, + row, + selection, + treeConfig, + treeIndeterminates, + value + }) + + if (!property && treeConfig && !checkStrictly) { + // 如果存在父节点,更新父节点状态 + let matchObj = findTree(tableFullData, (item) => item === row, treeConfig) + + if (matchObj && matchObj.parent) { + let vItems = getVItemsOnParentSelection({ checkMethod, matchObj }) + let indeterminatesItem = find(matchObj.items, (item) => treeIndeterminates.indexOf(item) > -1) + let parentStatus = getParentStatusOnParentSelection({ + indeterminatesItem, + matchObj, + selection, + vItems, + value + }) + + return _vm.handleSelectRow({ row: matchObj.parent }, parentStatus) + } + } +} + +function onSelectOther({ row }, value, _vm) { + let { selection, selectConfig = {}, treeConfig } = _vm + let { checkField: property, checkStrictly } = selectConfig + + if (!property && !(treeConfig && !checkStrictly)) { + if (value) { + if (selection.indexOf(row) === -1) { + selection.push(row) + } + } else { + remove(selection, (item) => item === row) + } + } +} + +export function hasNoCheckField({ row }, value, _vm) { + // 树表且父子关联 + onSelectTreeCheckStrictly({ row }, value, _vm) + // 其它情况 + onSelectOther({ row }, value, _vm) +} diff --git a/packages/grid/src/table/src/utils/handleTooltip.js b/packages/grid/src/table/src/utils/handleTooltip.js new file mode 100644 index 000000000..e818f67c8 --- /dev/null +++ b/packages/grid/src/table/src/utils/handleTooltip.js @@ -0,0 +1,70 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +export function createTooltipRange({ _vm, cell, column, isHeader }) { + let range = document.createRange() + let rangeEnd + + range.setStart(cell, 0) + + if (_vm.headerSuffixIconAbsolute) { + if (column.sortable && column.filter && isHeader) { + rangeEnd = cell.childNodes.length - 2 + } else if ((column.sortable || column.filter) && isHeader) { + rangeEnd = cell.childNodes.length - 1 + } else { + rangeEnd = cell.childNodes.length + } + } else { + rangeEnd = column.sortable && isHeader ? cell.childNodes.length - 1 : cell.childNodes.length + } + + range.setEnd(cell, rangeEnd) + + return range +} + +/* + * 预期 contentMethod 可以返回空串、null、undefined 和非空字符串 + * 1、返回空串,则不显示 tooltip 提示 + * 2、返回非空字符串,则处理字符串中的换行字符 + * 3、返回 null 或 undefined,则按之前默认逻辑处理 + */ +export function processContentMethod({ _vm, column, content, contentMethod, event, isHeader, row, showTip }) { + let tooltipContent + + if (contentMethod) { + tooltipContent = contentMethod({ event, column, row, showTip, isHeader, content }) + + if (tooltipContent === '') return + } + + if (tooltipContent) { + _vm.tooltipContent = tooltipContent + _vm.tooltipContentPre = true + } else { + _vm.tooltipContent = content + _vm.tooltipContentPre = false + } +} diff --git a/packages/grid/src/table/src/utils/refreshColumn.js b/packages/grid/src/table/src/utils/refreshColumn.js new file mode 100644 index 000000000..e0eb52c52 --- /dev/null +++ b/packages/grid/src/table/src/utils/refreshColumn.js @@ -0,0 +1,111 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import { findTree, eachTree, toNumber } from '@opentiny/vue-renderless/grid/static/' +import { error, warn } from '../../../tools' + +export function onGroupHeader({ _vm, isGroup, headerProps }) { + if (isGroup) { + eachTree( + _vm.collectColumn, + (column) => { + if (column.children && column.children.length) { + column.visible = !!findTree(column.children, (subColumn) => (subColumn.children && subColumn.children.length ? 0 : subColumn.visible), headerProps) + } + }, + headerProps + ) + } +} + +export function reassignNotFixed({ centerList, column }) { + if (!column.fixed) { + centerList.push(column) + } +} + +export function reassignFixedRight({ column, columnIndex, isColspan, rightEndIndex, rightList }) { + if (column.fixed === 'right') { + if (!isColspan) { + if (rightEndIndex === null) { + rightEndIndex = columnIndex + } + + if (columnIndex - rightEndIndex !== 0) { + isColspan = true + } else { + rightEndIndex++ + } + } + + rightList.push(column) + } + + return { isColspan, rightEndIndex } +} + +export function reassignFixedLeft({ column, columnIndex, isColspan, leftList, leftStartIndex, letIndex }) { + if (column.fixed === 'left') { + if (leftStartIndex === null) { + leftStartIndex = letIndex + } + + if (!isColspan) { + if (columnIndex - letIndex !== 0) { + isColspan = true + } else { + letIndex++ + } + } + + leftList.push(column) + } + + return { leftStartIndex, letIndex, isColspan } +} + +export function showGroupFixedError({ isColspan, isGroup, leftStartIndex, rightEndIndex, visibleColumn }) { + if (isGroup && (isColspan || leftStartIndex || (rightEndIndex !== null && rightEndIndex !== visibleColumn.length))) { + error('ui.grid.error.groupFixed') + } +} + +export function onScrollXLoad({ _vm, scrollX, scrollXLoad, scrollXStore, tableColumn, visibleColumn }) { + if (scrollXLoad) { + if (_vm.resizable || visibleColumn.some((column) => column.resizable)) { + warn('ui.grid.error.notResizable') + } + + Object.assign(scrollXStore, { + startIndex: 0, + visibleIndex: 0, + renderSize: toNumber(scrollX.rSize), + offsetSize: toNumber(scrollX.oSize) + }) + + tableColumn = visibleColumn.slice(scrollXStore.startIndex, scrollXStore.startIndex + scrollXStore.renderSize) + } + + return tableColumn +} diff --git a/packages/grid/src/table/src/utils/rowDrop.js b/packages/grid/src/table/src/utils/rowDrop.js new file mode 100644 index 000000000..02d93e462 --- /dev/null +++ b/packages/grid/src/table/src/utils/rowDrop.js @@ -0,0 +1,102 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import { findTree } from '@opentiny/vue-renderless/grid/static/' +import Modal from '@opentiny/vue-modal' +import GlobalConfig from '../../../config' + +function handleIfScrollYLoadTruthy({ isScrollYLoad, _vm, selfRow, prevTrElem, targetTrElem }) { + if (!isScrollYLoad) { + return + } + + // 虚拟滚动拖拽处理 + const actIndex = _vm.tableFullData.indexOf(selfRow) + + _vm.tableFullData.splice(actIndex, 1) + + if (prevTrElem) { + const prevRow = _vm.getRowNode(prevTrElem).item + const parentIdx = _vm.tableFullData.indexOf(prevRow) + const sleftIdx = _vm.tableFullData.indexOf(selfRow) + + _vm.tableFullData.splice(parentIdx + (sleftIdx < parentIdx ? 1 : 0), 0, selfRow) + } else { + _vm.tableFullData.unshift(selfRow) + } + + targetTrElem.remove() +} + +function createHandlerOnEnd({ _vm, refresh }) { + return (event) => { + let options = { children: 'children' } + let targetTrElem = event.item + let { parentNode: wrapperElem, previousElementSibling: prevTrElem } = targetTrElem + let tableTreeData = _vm.data || _vm.tableData + let selfRow = _vm.getRowNode(targetTrElem).item + let selfNode = findTree(tableTreeData, (row) => row === selfRow, options) + let isScrollYLoad = _vm.scrollYLoad + + if (!isScrollYLoad) { + if (prevTrElem) { + // 移动到节点 + let prevRow = _vm.getRowNode(prevTrElem).item + let prevNode = findTree(tableTreeData, (row) => row === prevRow, options) + if (findTree(selfRow[options.children], (row) => prevRow === row, options)) { + // 错误的移动 + let oldTrElem = wrapperElem.children[event.oldIndex] + wrapperElem.insertBefore(targetTrElem, oldTrElem) + + return Modal.message({ + message: GlobalConfig.i18n('ui.grid.error.dargSelf'), + status: 'error' + }) + } + + let currRow = selfNode.items.splice(selfNode.index, 1)[0] + if (_vm.hasTreeExpand(prevRow)) { + // 移动到当前的子节点 + prevRow[options.children].splice(0, 0, currRow) + } else { + // 移动到相邻节点 + prevNode.items.splice(prevNode.index + (selfNode.index < prevNode.index ? 0 : 1), 0, currRow) + prevNode.items = [].concat(prevNode.items) + } + } else { + // 移动到第一行 + let currRow = selfNode.items.splice(selfNode.index, 1)[0] + tableTreeData.unshift(currRow) + _vm.tableFullData = [].concat(tableTreeData) + } + } + + handleIfScrollYLoadTruthy({ isScrollYLoad, _vm, selfRow, prevTrElem, targetTrElem }) + // 如果变动了树层级,需要刷新数据 + _vm.$emit('row-drop-end', event, _vm, _vm.scrollYLoad ? tableTreeData : _vm.tableFullData) + refresh && _vm.data && _vm.refreshData() + } +} + +export { createHandlerOnEnd } diff --git a/packages/grid/src/table/src/utils/setAllSelection.js b/packages/grid/src/table/src/utils/setAllSelection.js new file mode 100644 index 000000000..17f93c658 --- /dev/null +++ b/packages/grid/src/table/src/utils/setAllSelection.js @@ -0,0 +1,125 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import { set, eachTree } from '@opentiny/vue-renderless/grid/static/' + +function pushSelectRow({ afterFullData, checkMethod, checkStrictly, property, selectRows, selection, treeConfig, value }) { + if (!checkStrictly && !property && treeConfig && value) { + eachTree( + afterFullData, + (row, $rowIndex) => { + if (!checkMethod || checkMethod({ row, $rowIndex })) { + selectRows.push(row) + } + }, + treeConfig + ) + } + + if (!checkStrictly && !property && treeConfig && !value && checkMethod) { + eachTree( + afterFullData, + (row, $rowIndex) => { + if (checkMethod({ row, $rowIndex }) ? 0 : selection.indexOf(row) > -1) { + selectRows.push(row) + } + }, + treeConfig + ) + } +} + +export function hasCheckFieldNoStrictly({ afterFullData, checkMethod, checkStrictly, property, selection, treeConfig, value }) { + if (!checkStrictly && property) { + let indexKey = `${treeConfig ? '$' : ''}rowIndex` + + let setValFn = (row, rowIndex) => { + if (!checkMethod || checkMethod({ row, [indexKey]: rowIndex })) { + set(row, property, value) + } + } + + let clearValFn = (row, rowIndex) => { + if (!checkMethod || (checkMethod({ row, [indexKey]: rowIndex }) ? 0 : selection.indexOf(row) > -1)) { + set(row, property, value) + } + } + + if (treeConfig) { + eachTree(afterFullData, value ? setValFn : clearValFn, treeConfig) + } else { + afterFullData.forEach(value ? setValFn : clearValFn) + } + } +} + +function filterSelectRow({ afterFullData, checkMethod, checkStrictly, property, selectRows, selection, treeConfig, value }) { + if (!checkStrictly && !property && !treeConfig && value && checkMethod) { + selectRows = afterFullData.filter((row, rowIndex) => selection.indexOf(row) > -1 || checkMethod({ row, rowIndex })) + } + + if (!checkStrictly && !property && !treeConfig && value && !checkMethod) { + selectRows = afterFullData.slice(0) + } + + if (!checkStrictly && !property && !treeConfig && !value && checkMethod) { + selectRows = afterFullData.filter((row, rowIndex) => (checkMethod({ row, rowIndex }) ? 0 : selection.indexOf(row) > -1)) + } + + return selectRows +} + +export function hasNoCheckFieldNoStrictly({ afterFullData, checkMethod, checkStrictly, property, selection, treeConfig, value }) { + let selectRows = [] + + pushSelectRow({ + afterFullData, + checkMethod, + checkStrictly, + property, + selectRows, + selection, + treeConfig, + value + }) + + selectRows = filterSelectRow({ + afterFullData, + checkMethod, + checkStrictly, + property, + selectRows, + selection, + treeConfig, + value + }) + + return selectRows +} + +export function setSelectionNoStrictly({ _vm, checkStrictly, reserve, selectRows, selection, value }) { + if (!checkStrictly) { + _vm.selection = value && reserve ? selection.concat(selectRows.filter((row) => selection.indexOf(row) === -1)) : selectRows + } +} diff --git a/packages/grid/src/table/src/utils/triggerCellClickEvent.js b/packages/grid/src/table/src/utils/triggerCellClickEvent.js new file mode 100644 index 000000000..0c366f4c8 --- /dev/null +++ b/packages/grid/src/table/src/utils/triggerCellClickEvent.js @@ -0,0 +1,93 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +export function isTargetRadioOrCheckbox(event, column, colType, targetType) { + const target = event.target + + return target && column.type === colType && target.tagName.toLowerCase() === 'input' && target.type === (targetType || colType) +} + +export function onClickExpandColumn({ $el, _vm, column, event, expandConfig, params }) { + if ( + (expandConfig.trigger === 'row' || (column.type === 'expand' && expandConfig.trigger === 'cell')) && + !_vm.getEventTargetNode(event, $el, 'tiny-grid__expanded').flag + ) { + _vm.triggerRowExpandEvent(event, params) + } +} + +export function onClickTreeNodeColumn({ _vm, column, event, params, treeConfig }) { + if (treeConfig.trigger === 'row' || (column.treeNode && treeConfig.trigger === 'cell')) { + _vm.triggerTreeExpandEvent(event, params) + } +} + +export function onHighlightCurrentRow({ $el, _vm, event, highlightCurrentRow, params, radioConfig }) { + if (highlightCurrentRow) { + if ( + radioConfig.trigger === 'row' || + (!_vm.getEventTargetNode(event, $el, 'tiny-grid-checkbox').flag && !_vm.getEventTargetNode(event, $el, 'tiny-grid-radio').flag) + ) { + _vm.triggerCurrentRowEvent(event, params) + } + } +} + +export function onClickRadioColumn({ $el, _vm, column, event, params, radioConfig }) { + if ( + (radioConfig.trigger === 'row' || (column.type === 'radio' && radioConfig.trigger === 'cell')) && + !_vm.getEventTargetNode(event, $el, 'tiny-grid-radio').flag + ) { + _vm.triggerRadioRowEvent(event, params) + } +} + +export function onClickSelectColumn({ _vm, column, event, params, selectConfig }) { + if ( + (selectConfig.trigger === 'row' || (column.type === 'selection' && selectConfig.trigger === 'cell')) && + !_vm.getEventTargetNode(event, params.cell, 'tiny-grid-checkbox').flag + ) { + _vm.handleToggleCheckRowEvent(params, event) + } +} + +export function onClickCellSelect({ _vm, actived, cell, column, editConfig, event, mouseConfig, params, row }) { + if (!mouseConfig.checked && editConfig) { + if (editConfig.trigger === 'manual') { + if (actived.args && actived.row === row && column !== actived.column) { + _vm.handleChangeCell(event, params) + } + } else if (!actived.args || cell !== actived.args.cell) { + if (editConfig.trigger === 'click') { + _vm.handleChangeCell(event, params) + } else if (editConfig.trigger === 'dblclick') { + if (editConfig.mode === 'row' && actived.row === params.row) { + _vm.handleChangeCell(event, params) + } else { + _vm.handleSelected(params, event) + } + } + } + } +} diff --git a/packages/grid/src/table/src/utils/updateStyle.js b/packages/grid/src/table/src/utils/updateStyle.js new file mode 100644 index 000000000..223fd6fe5 --- /dev/null +++ b/packages/grid/src/table/src/utils/updateStyle.js @@ -0,0 +1,330 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import { arrayEach, toNumber } from '@opentiny/vue-renderless/grid/static/' +import { isScale } from '@opentiny/vue-renderless/grid/utils' +import browser from '@opentiny/vue-renderless/common/browser' + +function setTableElemWidth({ scrollbarWidth, tWidth, tableElem }) { + if (tableElem && tWidth === null) { + tableElem.style.width = tWidth + } + + if (tableElem && tWidth !== null) { + tableElem.style.width = `${tWidth + scrollbarWidth}px` + } +} + +function getTableWidth({ allColumnOverflow, fixedColumn, fixedType, scrollXLoad, tWidth, tableColumn }) { + let isFixedAllColumnOverflow = fixedType && allColumnOverflow + + if (isFixedAllColumnOverflow) { + tableColumn = fixedColumn + tWidth = tableColumn.reduce((previous, column) => previous + column.renderWidth, 0) + } + + if (!isFixedAllColumnOverflow && scrollXLoad && fixedType) { + tableColumn = fixedColumn + } + + if (!isFixedAllColumnOverflow && scrollXLoad) { + tWidth = tableColumn.reduce((previous, column) => previous + column.renderWidth, 0) + } + + return { tableColumn, tWidth } +} + +function layoutFooter({ + customHeight, + fixedColumn, + fixedType, + allColumnOverflow, + footerHeight, + headerHeight, + scrollXLoad, + scrollbarWidth, + tableElem, + scrollbarHeight, + tableColumn, + tableHeight, + tableWidth, + wrapperElem, + fixedWrapperElem +}) { + // 如果是使用优化模式 + let tWidth = tableWidth + // 如果是固定列与设置了超出隐藏 + let ret = getTableWidth({ allColumnOverflow, fixedColumn, fixedType, scrollXLoad, tWidth, tableColumn }) + + tableColumn = ret.tableColumn + tWidth = ret.tWidth + // 如果是固定列 + if (wrapperElem && fixedWrapperElem) { + wrapperElem.style.top = `${customHeight ? customHeight - footerHeight : tableHeight + headerHeight}px` + } + + if (wrapperElem) { + wrapperElem.style.marginTop = `${-scrollbarHeight - 1}px` + } + + setTableElemWidth({ scrollbarWidth, tWidth, tableElem }) + + return tableColumn +} + +function layoutColgroup({ elemStore, fullColumnIdData, layout, name, scrollbarWidth }) { + let colgroupElem = elemStore[`${name}-${layout}-colgroup`] + + let colElemHandler = (colElem) => { + let colid = colElem.getAttribute('name') + + if (colid === 'col_gutter') { + colElem.width = `${scrollbarWidth || ''}` + } + + if (fullColumnIdData[colid]) { + let column = fullColumnIdData[colid].column + colElem.width = `${column.renderWidth || ''}` + } + } + + if (colgroupElem) { + arrayEach(colgroupElem.children, colElemHandler) + } +} + +function layoutHeader({ elemStore, fixedColumn, fixedType, layout, name, scrollXLoad, scrollbarWidth, tableColumn, tableElem, tableWidth }) { + let tWidth = tableWidth + let repairElem = elemStore[`${name}-${layout}-repair`] + + if (scrollXLoad && fixedType) { + tableColumn = fixedColumn + } + + if (scrollXLoad) { + tWidth = tableColumn.reduce((previous, column) => previous + column.renderWidth, 0) + } + + setTableElemWidth({ scrollbarWidth, tWidth, tableElem }) + + if (repairElem) { + repairElem.style.width = `${tableWidth}px` + } + + return tableColumn +} + +function layoutTable({ fixedType, overflowY, scrollbarWidth, tWidth, tableElem }) { + if (tableElem) { + tableElem.style.width = tWidth ? `${tWidth}px` : tWidth + + // 兼容性处理 + if (overflowY && fixedType && (browser['-moz'] || browser.name === 'safari')) { + tableElem.style.paddingRight = `${scrollbarWidth}px` + } + } +} + +function layoutBodyWrapper({ + fixedType, + footerHeight, + customHeight, + headerHeight, + maxHeight, + minHeight, + overflowX, + parentHeight, + showFooter, + wrapperElem, + scrollbarWidth, + scrollbarHeight +}) { + if (wrapperElem) { + if (customHeight > 0) { + const barWidth = showFooter ? (overflowX ? scrollbarWidth : 0) : scrollbarHeight + const contentHeight = customHeight - headerHeight - footerHeight + + wrapperElem.style.height = `${fixedType ? contentHeight - barWidth : contentHeight}px` + } + + if (maxHeight) { + maxHeight = isScale(maxHeight) ? Math.floor((parseInt(maxHeight) / 100) * parentHeight) : toNumber(maxHeight) + + const barHeight = showFooter ? 0 : scrollbarHeight + const contentHeight = maxHeight - headerHeight + + wrapperElem.style.maxHeight = `${fixedType ? contentHeight - barHeight : contentHeight}px` + } + + if (minHeight) { + minHeight = isScale(minHeight) ? Math.floor((parseInt(minHeight) / 100) * parentHeight) : toNumber(minHeight) + + if (maxHeight) { + const outerHeight = headerHeight + scrollbarWidth + + if (maxHeight - minHeight < outerHeight) { + minHeight = maxHeight - outerHeight + } + } + + wrapperElem.style.minHeight = `${minHeight}px` + } + } + + return { maxHeight, minHeight } +} + +function layoutEmptyBlock({ emptyBlockElem, tWidth }) { + if (emptyBlockElem) { + emptyBlockElem.style.width = tWidth ? `${tWidth}px` : tWidth || '' + } +} + +function layoutBodyFixedWrapper({ + customHeight, + columnStore, + fixedWrapperElem, + footerHeight, + fixedType, + scrollbarWidth, + headerHeight, + tableHeight, + scrollbarHeight, + showFooter, + wrapperElem +}) { + if (fixedWrapperElem) { + let isRightFixed = fixedType === 'right' + let fixedColumn = columnStore[`${fixedType}List`] + + if (wrapperElem) { + wrapperElem.style.top = `${headerHeight}px` + } + + const contentHeight = customHeight > 0 ? customHeight - headerHeight - footerHeight : tableHeight + const barHeight = scrollbarHeight * (showFooter ? 2 : 1) + + fixedWrapperElem.style.height = `${contentHeight + headerHeight + footerHeight - barHeight}px` + fixedWrapperElem.style.width = `${fixedColumn.reduce((previous, column) => previous + column.renderWidth, isRightFixed ? scrollbarWidth : 0)}px` + } +} + +function layoutBody(options) { + let { allColumnOverflow, columnStore, customHeight, elemStore, fixedColumn, fixedType, fixedWrapperElem, footerHeight, headerHeight, layout, name } = options + let { maxHeight, minHeight, overflowX, overflowY, parentHeight, scrollXLoad, scrollbarHeight } = options + let { scrollbarWidth, showFooter, tableColumn, tableElem, tableHeight, tableWidth, wrapperElem } = options + let emptyBlockElem = elemStore[`${name}-${layout}-emptyBlock`] + + let ret = layoutBodyWrapper({ + customHeight, + fixedType, + footerHeight, + headerHeight, + maxHeight, + minHeight, + overflowX, + parentHeight, + scrollbarHeight, + scrollbarWidth, + showFooter, + wrapperElem + }) + + maxHeight = ret.maxHeight + minHeight = ret.minHeight + + // 如果是固定列 + layoutBodyFixedWrapper({ + columnStore, + customHeight, + fixedType, + fixedWrapperElem, + footerHeight, + headerHeight, + scrollbarHeight, + scrollbarWidth, + showFooter, + tableHeight, + wrapperElem + }) + let tWidth = tableWidth + + // 如果是固定列与设置了超出隐藏 + ret = getTableWidth({ allColumnOverflow, fixedColumn, fixedType, scrollXLoad, tWidth, tableColumn }) + tableColumn = ret.tableColumn + tWidth = ret.tWidth + layoutTable({ fixedType, overflowY, scrollbarWidth, tWidth, tableElem }) + layoutEmptyBlock({ emptyBlockElem, tWidth }) + return { maxHeight, minHeight, tableColumn } +} + +export function handleLayout(params) { + let { _vm, columnStore, customHeight, fixedColumn, fixedType, fixedWrapperElem, layout, maxHeight, minHeight, name, parentHeight, tableColumn } = params + let { border, elemStore, footerHeight, fullColumnIdData, headerHeight, showFooter } = _vm + let { isGroup, overflowX, overflowY, scrollXLoad, scrollbarHeight, scrollbarWidth } = _vm + let { showHeaderOverflow: allColumnHeaderOverflow, showOverflow: allColumnOverflow, tableHeight, tableWidth } = _vm + + let wrapperElem = elemStore[`${name}-${layout}-wrapper`] + let tableElem = elemStore[`${name}-${layout}-table`] + + /* + * 表头体样式处理 + * 横向滚动渲染 + */ + if (layout === 'header') { + tableColumn = layoutHeader({ elemStore, fixedColumn, fixedType, layout, name, scrollXLoad, scrollbarWidth, tableColumn, tableElem, tableWidth }) + } else if (layout === 'body') { + let ret = layoutBody({ + ...{ allColumnOverflow, columnStore, customHeight, elemStore, fixedColumn, fixedType, fixedWrapperElem }, + ...{ footerHeight, headerHeight, layout, maxHeight, minHeight, name, overflowX, overflowY }, + ...{ parentHeight, scrollXLoad, scrollbarHeight, scrollbarWidth, showFooter, tableColumn, tableElem, tableHeight, tableWidth, wrapperElem } + }) + + maxHeight = ret.maxHeight + minHeight = ret.minHeight + tableColumn = ret.tableColumn + } else if (layout === 'footer') { + tableColumn = layoutFooter({ + allColumnOverflow, + customHeight, + fixedColumn, + fixedType, + fixedWrapperElem, + footerHeight, + headerHeight, + scrollXLoad, + scrollbarHeight, + scrollbarWidth, + tableColumn, + tableElem, + tableHeight, + tableWidth, + wrapperElem + }) + } + + layoutColgroup({ allColumnHeaderOverflow, allColumnOverflow, border, elemStore, fullColumnIdData, isGroup, layout, name, scrollbarWidth }) + + return { tableColumn, maxHeight, minHeight } +} diff --git a/packages/grid/src/tools/formatter.js b/packages/grid/src/tools/formatter.js new file mode 100644 index 000000000..2949234e5 --- /dev/null +++ b/packages/grid/src/tools/formatter.js @@ -0,0 +1,229 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +/* + * integer:显示成整数。 + * number:显示成小数。 + * money:显示成钱数。 + * rate:显示成百分比的数据。 + * filesize:显示成文件大小的数据。 + * boole:显示成对号或者叉号的图标。 + * date:显示成年月日。 + * dateTime:显示成年月日时分。 + * longDateTime:显示成年月日时分秒。 + * time:显示成时分。 + * longTime:显示成时分秒。 + * yearMonth:显示成年月。 + * ellipsis:显示成省略的内容,鼠标移到该单元格上,显示完整内容的提示信息。需要同时配置 format 的 len 属性 + */ + +import { tryToCurrency, truncate, tryToInt, tryToDecimal, toFileSize, toRate, toBoolValue } from '@opentiny/vue-renderless/common/string' +import { find } from '@opentiny/vue-renderless/grid/static/' +import { isNumber, isDate, isNull } from '@opentiny/vue-renderless/common/type' +import { toDateStr, getDateWithNewTimezone, toDate, format } from '@opentiny/vue-renderless/common/date' +import { iconClose, iconYes } from '@opentiny/vue-icon' + +const DateFormat = { + FULLDATETIME: 'yyyy-MM-dd hh:mm:ss.SSS', + LONGDATETIME: 'yyyy-MM-dd hh:mm:ss', + DATETIME: 'yyyy-MM-dd hh:mm', + DATE: 'yyyy-MM-dd', + FULLTIME: 'hh:mm:ss.SSS', + LONGTIME: 'hh:mm:ss', + TIME: 'hh:mm', + YEARMONTH: 'yyyy-MM' +} + +const dateFormat = function (value, formatString) { + const userFormat = { dateFormat: formatString, ...this.own.formatConfig } + + if (userFormat.isutc8) { + if (!value) { + return value + } + + const currentTimezone = 0 - new Date().getTimezoneOffset() / 60 + const newDate = getDateWithNewTimezone(isDate(value) ? value : new Date(toDate(value)), currentTimezone, userFormat.timezone || 8) + + return format(newDate, userFormat.dateFormat) + } + + return toDateStr(value, userFormat.dateFormat, userFormat.timezone) +} + +export default { + money(value) { + const prefix = '$' + const format = { + fraction: 2, + flag: `${prefix}{0}`, + ...this.own.formatConfig + } + + return tryToCurrency(value, format.fraction, format.flag, '') + }, + enum(value) { + const format = { label: 'label', value: 'value', ...this.own.formatConfig } + const data = Array.isArray(format.data) && find(format.data, (item) => item[format.value] === value) + + return data ? data[format.label] : '' + }, + select(cellValue) { + let { options, optionGroups, optionProps = {}, optionGroupProps = {} } = this.editor + const format = this.own.formatConfig + + if (isNull(cellValue) || cellValue === '') { + return '' + } + + let selectItem + let labelProp = optionProps.label || 'label' + let valueProp = optionProps.value || 'value' + + if (optionGroups) { + let groupOptions = optionGroupProps.options || 'options' + + for (let index = 0; index < optionGroups.length; index++) { + selectItem = find(optionGroups[index][groupOptions], (item) => item[valueProp] === cellValue) + + if (selectItem) { + break + } + } + + return selectItem ? selectItem[labelProp] : null + } else { + if (!options && format && format.async && format.data) { + options = format.data + } + + selectItem = find(options, (item) => item[valueProp] === cellValue) + + return selectItem ? selectItem[labelProp] : null + } + }, + number(value) { + const format = { fraction: 2, ...this.own.formatConfig } + + return tryToDecimal(value, format.fraction, false, '') + }, + integer(value) { + return tryToInt(value, '') + }, + filesize(value) { + const format = { ...this.own.formatConfig } + + return toFileSize(value, format.unit, format.currUnit) + }, + date(value) { + return dateFormat.call(this, value, DateFormat.DATE) + }, + dateTime(value) { + return dateFormat.call(this, value, DateFormat.DATETIME) + }, + longDateTime(value) { + return dateFormat.call(this, value, DateFormat.LONGDATETIME) + }, + time(value) { + return dateFormat.call(this, value, DateFormat.TIME) + }, + longTime(value) { + return dateFormat.call(this, value, DateFormat.LONGTIME) + }, + yearMonth(value) { + return dateFormat.call(this, value, DateFormat.YEARMONTH) + }, + ellipsis(value) { + const format = { ...this.own.formatConfig } + + return (h) => h('div', { class: 'data-ellipsis' }, [h('span', { domProps: { title: value } }, truncate(value, format.len))]) + }, + rate(value) { + const format = { + fraction: 2, + total: 1, + section: [30, 60, 90], + ...this.own.formatConfig + } + const { rateMethod } = format + let rate + + if (typeof rateMethod === 'function') { + rate = rateMethod.call(this, value, format) + } else { + rate = toRate(value, format.total, format.fraction) + } + + let section = format.section + let css = '' + + if (section) { + let rateValue = parseInt(rate, 10) + + if (!isNumber(rateValue)) { + return rate + } + if (rateValue === 100) { + css = ' tiny-grid__chart-completed' + } else { + const cssMap = { + 0: ' tiny-grid__chart-danger', + 1: ' tiny-grid__chart-warning', + 2: ' tiny-grid__chart-normal' + } + Array.isArray(section) || (section = section.split(',')) + + for (let i = 0; i < section.length; i++) { + if (rateValue < section[i]) { + css = cssMap[i] + break + } + } + } + } + + return (h) => + h('div', { class: 'tiny-grid__data-rate' }, [ + h('div', { + class: `tiny-grid__rate-chart${css}`, + style: { width: rate } + }), + h('span', { class: 'tiny-grid__rate-text' }, rate) + ]) + }, + boole(value) { + const defaultFormat = { + trueValue: true, + falseValue: false, + htmlView: true, + noFork: false + } + const format = Object.assign(defaultFormat, this.own.formatConfig) + const cellValue = !isNull(format.trueValue) ? value == format.trueValue : toBoolValue(value) + + if (!format.htmlView) { + return cellValue + } + + if (format.noFork && !value) { + return '' + } + + const icon = !cellValue ? iconClose() : iconYes() + + return (h) => + h('div', { class: 'tiny-grid__data-boole' }, [ + h(icon, { + class: ['tiny-svg-size', !cellValue ? 'icon-close' : 'icon-yes'] + }) + ]) + } +} diff --git a/packages/grid/src/tools/index.js b/packages/grid/src/tools/index.js new file mode 100644 index 000000000..49c5d5dfe --- /dev/null +++ b/packages/grid/src/tools/index.js @@ -0,0 +1,134 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import { isString } from '@opentiny/vue-renderless/grid/static/' +import { getCellValue } from '@opentiny/vue-renderless/grid/utils' +import { log } from '@opentiny/vue-renderless/common' +import Formatter from './formatter' +import GlobalConfig from '../config' + +function getRenderType({ editor, formatConfig, formatText }) { + let renderType = formatText || formatConfig.type + + if (!renderType && editor && editor.component === 'select') { + renderType = 'select' + } + + return renderType +} + +function getFormatData({ $table, cacheFormat, row }) { + let rest, formatData + + if (cacheFormat) { + rest = $table.fullAllDataRowMap.get(row) + formatData = rest.formatData + + if (!formatData) { + formatData = $table.fullAllDataRowMap.get(row).formatData = {} + } + } + + return { rest, formatData } +} + +function hasCacheValue({ async, cellValue, colid, formatData, rest }) { + return rest && formatData[colid] && formatData[colid].value === cellValue && (!async || formatData[colid].label) +} + +function notHasCacheVal({ cellLabel, cellValue, column, formatText, hasCacheVal, params, renderType, row }) { + if (!hasCacheVal) { + const cellText = row[GlobalConfig.constant.insertedField + column.property] + let formatParams = { cellValue } + + if (cellText) { + formatParams.cellLabel = cellText + } + + cellLabel = isString(renderType) ? Formatter[renderType].call(column, cellValue) : formatText(Object.assign(formatParams, params)) + } + + return cellLabel +} + +function setFormatData({ cellLabel, cellValue, colid, formatData }) { + if (formatData) { + formatData[colid] = { value: cellValue, label: cellLabel } + } +} + +export const getCellLabel = (row, column, params) => { + let { formatText, editor } = column + let { formatConfig = {} } = column.own + let cellValue = getCellValue(row, column) + let cellLabel = cellValue + let renderType = getRenderType({ editor, formatConfig, formatText }) + + if (params && renderType) { + let { $table } = params + let colid = column.id + const { formatConfig = {} } = column.own + const async = formatConfig.async === true + let cacheFormat = $table && $table.fullAllDataRowMap.has(row) + let { rest, formatData } = getFormatData({ $table, cacheFormat, row }) + // cache的值 与当前值相等 不是异步列或是异步列但有值时直接返回cache + let hasCacheVal = hasCacheValue({ + async, + cellValue, + colid, + formatData, + rest + }) + + if (hasCacheVal) { + return formatData[colid].label + } + + cellLabel = notHasCacheVal({ + cellLabel, + cellValue, + column, + formatText, + hasCacheVal, + params, + renderType, + row + }) + setFormatData({ cellLabel, cellValue, colid, formatData }) + } + + return cellLabel +} + +const outLog = (type) => (message) => { + let msg = `[tiny-grid] ${GlobalConfig.i18n(message) || message}` + + log(msg, type) + + return msg +} + +export const warn = outLog('warn') + +export const error = outLog('error') diff --git a/packages/grid/src/validator/index.js b/packages/grid/src/validator/index.js new file mode 100644 index 000000000..1aab860be --- /dev/null +++ b/packages/grid/src/validator/index.js @@ -0,0 +1,33 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import Methods from './src/methods' +import TINYGrid from '../adapter' + +export default { + install(Table) { + TINYGrid._valid = 1 + Object.assign(Table.methods, Methods) + } +} diff --git a/packages/grid/src/validator/src/methods.js b/packages/grid/src/validator/src/methods.js new file mode 100644 index 000000000..1d1758abe --- /dev/null +++ b/packages/grid/src/validator/src/methods.js @@ -0,0 +1,339 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import { t } from '@opentiny/vue-locale' +import Validator from '@opentiny/vue-renderless/common/validate' +import { getFuncText, emitEvent, getCell } from '@opentiny/vue-renderless/grid/utils' +import { get, isFunction, isObject, isUndefined, find } from '@opentiny/vue-renderless/grid/static/' +import { adjustParams, hasNoEditRules, realValid } from './utils/beginValidate' +import { extend } from '@opentiny/vue-renderless/common/object' + +const isArr = Array.isArray + +class Rule { + constructor(rule) { + Object.assign(this, { + $options: rule, + max: rule.min, + maxWidth: rule.maxWidth, + min: rule.min, + pattern: rule.pattern, + required: rule.required, + trigger: rule.trigger, + type: rule.type, + validator: rule.validator + }) + } + get message() { + return getFuncText(this.$options.message) + } +} + +const onRejected = (opt, _this) => { + const { isAll, validRest, cb, afterFullData, treeConfig } = opt + return (params) => { + let args = isAll ? validRest : { [params.column.property]: params } + + let funcFinish = (args, reject, resolve) => () => { + opt.status = false + cb && cb(opt.status, args) + cb ? resolve() : reject(args) + } + + let funcPosAndFinish = (params, finish) => () => { + getCell(_this, params).then((activeCell) => { + params.cell = activeCell + _this.handleValidError(params) + finish() + }) + } + + let getLocatRow = (params) => { + let row = params.row + let rowIndex = afterFullData.indexOf(row) + return rowIndex > 0 ? afterFullData[rowIndex - 1] : row + } + + return new Promise((resolve, reject) => { + let finish = funcFinish(args, reject, resolve) + let posAndFinish = funcPosAndFinish(params, finish) + let locatRow = getLocatRow(params) + let isAutoPosFalse = _this.validOpts.autoPos === false + + isAutoPosFalse && finish() + !isAutoPosFalse && treeConfig && _this.scrollToTreeRow(locatRow).then(posAndFinish) + !isAutoPosFalse && !treeConfig && _this.scrollToRow(locatRow, true).then(posAndFinish) + }) + } +} + +export default { + // 对表格数据进行校验 + _validate(rows, cb) { + return this.beginValidate(rows, cb) + }, + // 与validate一致行为,区别就是会校验所有并返回所有不通过的列 + _fullValidate(rows, cb) { + return this.beginValidate(rows, cb, true) + }, + // 聚焦到校验通过的单元格并弹出校验错误提示 + handleValidError(params) { + let event = { type: 'valid-error', trigger: 'call' } + let next = () => this.showValidTooltip(params) + + this.handleActived(params, event).then(next) + }, + validatePromise(row, column, columnIndex, isAll, validRest) { + function onrejected({ _vm, reject, resolve }) { + return ({ rule, rules }) => { + let rest = { $table: _vm, column, columnIndex, row, rule, rules } + + rest.rowIndex = _vm.getRowIndex(row) + + if (!isAll) { + return reject(rest) + } + + validRest[column.property] = validRest[column.property] || [] + validRest[column.property].push(rest) + + return resolve() + } + } + + return new Promise((resolve, reject) => { + this.validCellRules('all', row, column) + .then(resolve) + .catch(onrejected({ _vm: this, reject, resolve })) + }) + }, + + /** + * 对表格数据进行校验 + * 如果传 row 指定行记录,则只验证传入的行 + * 如果传 rows 为多行记录,则只验证传入的行 + * 如果只传 callback 否则默认验证整个表格数据 + * 返回 Promise 对象,或者使用回调方式 + */ + + beginValidate(rows, cb, isAll) { + let { afterFullData, editRules, hasTreeExpand, treeConfig, treeOpts } = this + let { status = true, vaildDatas = afterFullData, validRest = {} } = {} + let ret = adjustParams(rows, cb, vaildDatas) + cb = ret.cb + vaildDatas = ret.vaildDatas + const opt = { isAll, validRest, cb, afterFullData, treeConfig, status } + + this.lastCallTime = Date.now() + this.clearValidate() + + if (!editRules) { + hasNoEditRules(cb, opt.status) + return Promise.resolve() + } + + let validParams = { _vm: this, editRules, isAll, validRest, treeConfig, hasTreeExpand, vaildDatas, treeOpts } + let rowValids = realValid(validParams) + + let onFulfilled = () => { + let ruleKeys = Object.keys(validRest) + + if (ruleKeys.length) { + return Promise.reject(validRest[ruleKeys[0]][0]) + } + + cb && cb(opt.status) + } + Promise.all(rowValids).then(onFulfilled).catch(onRejected(opt, this)) + return Promise.resolve() + }, + hasCellRules(type, row, { property }) { + if (!property || !this.editRules) { + return false + } + + let rules = get(this.editRules, property) + let handler = (rule) => type === 'all' || !rule.trigger || type === rule.trigger + + rules = !isArr(rules) && (isObject(rules) || isFunction(rules)) ? [rules] : rules + + return rules && find(rules, handler) + }, + + /** + * 校验数据: + * 按表格行顺序、列顺序依次校验(同步或异步); + * 根据校验规则的索引顺序依次校验,如果是异步则会等待校验完成才会继续校验下一列; + * 如果校验失败,则触发回调或者Promise,结果返回一个Boolean值; + * 如果是传回调方式这返回一个Boolean值和校验不通过列的错误消息; + * + * rule 配置: + * required为Boolean表示是否必填; + * max为Number表示最大长度; + * min为Number表示最小长度; + * validator为Function(rule, value, callback, {rules, row, column, rowIndex, columnIndex})进行自定义校验; + * trigger为blur|change表示触发方式(默认为空就行,除非特殊场景); + */ + validCellRules(type, row, column, defVal) { + let { editRules, rowId } = this + let { property } = column + let { descriptor = {}, model = {} } = {} + + if (property && editRules) { + let rules = get(editRules, property) + let cellValue = isUndefined(defVal) ? get(row, property) : defVal + if (isArr(rules)) { + rules.forEach((rule, index) => { + model[property + index] = cellValue + descriptor[property + index] = rule + }) + } else { + model[property] = cellValue + descriptor[property] = rules + } + } + + // 深度克隆,防止污染 editRules + let _descriptor = extend(true, {}, descriptor) + let validator = new Validator(_descriptor, t) + let executor = (resolve, reject) => { + let validArgs = { + firstFields: true, + first: true, + custom: { row, column } + } + let onrejected1 = ({ fields }) => { + let cellErrors = Object.keys(fields).map((prop) => { + let rules = _descriptor[prop] + _descriptor[prop] = !rules.message ? Object.assign(rules, { message: fields[prop][0].message }) : rules + return new Rule(_descriptor[prop]) + }) + + reject({ rules: cellErrors, rule: cellErrors[0] }) + } + validator.validate(model, validArgs).then(resolve).catch(onrejected1) + } + let onfulfilled = () => { + this.validatedMap[`${column.id}-${row[rowId]}`] = false + return Promise.resolve() + } + let onrejected = (errors) => { + this.validatedMap[`${column.id}-${row[rowId]}`] = true + return Promise.reject(errors) + } + + return new Promise(executor).then(onfulfilled).catch(onrejected) + }, + _clearValidate() { + let src = { + column: null, + content: '', + row: null, + rule: null, + visible: false + } + + Object.assign(this.validStore, src) + this.clostValidTooltip(undefined) + + return this.$nextTick() + }, + // 触发校验 + triggerValidate(type) { + let { editConfig, editRules, editStore, validStore } = this + let actived = editStore.actived + + if (!actived.row || !editRules) { + return Promise.resolve() + } + + let { cell, column, row } = actived.args + + if (!this.hasCellRules(type, row, column)) { + return Promise.resolve() + } + + let onfulfilled = () => { + editConfig.mode === 'row' && validStore.visible && validStore.row === row && validStore.column === column && this.clearValidate() + } + let onrejected = ({ rule }) => { + // 如果校验不通过与触发方式一致,则聚焦提示错误,否则跳过并不作任何处理 + if (rule.trigger && type !== rule.trigger) { + return Promise.resolve() + } + + let rest = { cell, column, row, rule } + this.showValidTooltip(rest) + + return Promise.reject(rest) + } + + return this.validCellRules(type, row, column).then(onfulfilled).catch(onrejected) + }, + // 弹出校验错误提示 + showValidTooltip(params) { + let { $refs, height, tableData, validOpts } = this + let { cell, column, row, rule } = params + let content = rule.message + let validTip = $refs.validTip + let msgCfg = validOpts.message + let showMsg = msgCfg === 'tooltip' || (msgCfg === 'default' && !height && tableData.length < 2) + + this.$nextTick(() => { + // 这里不能进行深拷贝,会对表格校验的判断造成影响,也不需要进行深拷贝 + Object.assign(this.validStore, { + row, + column, + rule, + content, + visible: true + }) + + if (validTip && showMsg) { + this.clostValidTooltip() + this.validTipContent = content + + validTip.state.referenceElm = cell + validTip.$refs.popper && (validTip.$refs.popper.style.display = 'none') + validTip.doDestroy() + validTip.setExpectedState(true) + + this.activateTooltipValid(validTip) + } + + emitEvent(this, 'valid-error', [params]) + }) + }, + // 关闭 validTip + clostValidTooltip() { + let validTip = this.$refs.validTip + + if (validTip) { + validTip.setExpectedState(false) + validTip.handleClosePopper() + } + + return this.$nextTick() + } +} diff --git a/packages/grid/src/validator/src/utils/beginValidate.js b/packages/grid/src/validator/src/utils/beginValidate.js new file mode 100644 index 000000000..bf71a44ee --- /dev/null +++ b/packages/grid/src/validator/src/utils/beginValidate.js @@ -0,0 +1,108 @@ +/** + * MIT License + * + * Copyright (c) 2019 Xu Liangzhan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +import { isArray, isFunction, has, eachTree } from '@opentiny/vue-renderless/grid/static/' + +export function adjustParams(rows, cb, vaildDatas) { + if (rows) { + if (isFunction(rows)) { + cb = rows + } else { + vaildDatas = isArray(rows) ? rows : [rows] + } + } + + return { cb, vaildDatas } +} + +// prettier-ignore +export function columnHandler({ _vm, colVailds, editRules, isAll, row, validRest }) { + function handler(column, columnIndex) { + if (has(editRules, column.property)) { + const p = new Promise((resolve, reject) => { + _vm.validCellRules('all', row, column).then(resolve).catch(({ rule, rules }) => { + const rowIndex = _vm.getRowIndex(row) + let rest = { rule, rules, rowIndex, row, columnIndex, column, $table: _vm } + + if (isAll) { + if (!validRest[column.property]) { + validRest[column.property] = [] + } + + validRest[column.property].push(rest) + + return resolve() + } + + return reject(rest) + }) + }) + + colVailds.push(p) + } + } + + return handler +} + +export function hasNoEditRules(cb, status) { + if (cb) { + cb(status) + } +} + +function validTree({ treeConfig, handleVaild, hasTreeExpand, vaildDatas, treeOpts }) { + if (treeConfig.validHidden === false) { + const recurValid = (row) => { + const children = row[treeConfig.children || 'children'] + handleVaild(row) + if (hasTreeExpand(row) && children && children.length) { + children.forEach(recurValid) + } + } + vaildDatas.forEach(recurValid) + } else { + eachTree(vaildDatas, handleVaild, treeOpts) + } +} + +export function realValid({ _vm, editRules, isAll, validRest, treeConfig, hasTreeExpand, vaildDatas, treeOpts }) { + let rowValids = [] + let columns = _vm.getColumns() + + let handleVaild = (row) => { + let colVailds = [] + + columns.forEach(columnHandler({ _vm, colVailds, editRules, isAll, row, validRest })) + rowValids.push(Promise.all(colVailds)) + } + + if (treeConfig) { + validTree({ treeConfig, handleVaild, hasTreeExpand, vaildDatas, treeOpts }) + } else { + vaildDatas.forEach(handleVaild) + } + + return rowValids +} diff --git a/packages/icon/add/index.js b/packages/icon/add/index.js new file mode 100644 index 000000000..d95a94564 --- /dev/null +++ b/packages/icon/add/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Add from '@opentiny/vue-theme/svgs/add.svg' + +export default svg({ name: 'IconAdd', component: Add }) diff --git a/packages/icon/administrator/index.js b/packages/icon/administrator/index.js new file mode 100644 index 000000000..3b2aa4959 --- /dev/null +++ b/packages/icon/administrator/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Administrator from '@opentiny/vue-theme/svgs/administrator.svg' + +export default svg({ name: 'IconAdministrator', component: Administrator }) diff --git a/packages/icon/align-baseline/index.js b/packages/icon/align-baseline/index.js new file mode 100644 index 000000000..4226c057b --- /dev/null +++ b/packages/icon/align-baseline/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import AlignBaseline from '@opentiny/vue-theme/svgs/align-baseline.svg' + +export default svg({ name: 'IconAlignBaseline', component: AlignBaseline }) diff --git a/packages/icon/align-center/index.js b/packages/icon/align-center/index.js new file mode 100644 index 000000000..7dfdce300 --- /dev/null +++ b/packages/icon/align-center/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import AlignCenter from '@opentiny/vue-theme/svgs/align-center.svg' + +export default svg({ name: 'IconAlignCenter', component: AlignCenter }) diff --git a/packages/icon/align-flex-center/index.js b/packages/icon/align-flex-center/index.js new file mode 100644 index 000000000..8ff178708 --- /dev/null +++ b/packages/icon/align-flex-center/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import AlignFlexCenter from '@opentiny/vue-theme/svgs/align-flex-center.svg' + +export default svg({ name: 'IconAlignFlexCenter', component: AlignFlexCenter }) diff --git a/packages/icon/align-flex-end/index.js b/packages/icon/align-flex-end/index.js new file mode 100644 index 000000000..5df549502 --- /dev/null +++ b/packages/icon/align-flex-end/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import AlignFlexEnd from '@opentiny/vue-theme/svgs/align-flex-end.svg' + +export default svg({ name: 'IconAlignFlexEnd', component: AlignFlexEnd }) diff --git a/packages/icon/align-flex-start/index.js b/packages/icon/align-flex-start/index.js new file mode 100644 index 000000000..2a2320d40 --- /dev/null +++ b/packages/icon/align-flex-start/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import AlignFlexStart from '@opentiny/vue-theme/svgs/align-flex-start.svg' + +export default svg({ name: 'IconAlignFlexStart', component: AlignFlexStart }) diff --git a/packages/icon/align-justify/index.js b/packages/icon/align-justify/index.js new file mode 100644 index 000000000..bce6745fa --- /dev/null +++ b/packages/icon/align-justify/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import AlignJustify from '@opentiny/vue-theme/svgs/align-justify.svg' + +export default svg({ name: 'IconAlignJustify', component: AlignJustify }) diff --git a/packages/icon/align-left/index.js b/packages/icon/align-left/index.js new file mode 100644 index 000000000..12c379abe --- /dev/null +++ b/packages/icon/align-left/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import AlignLeft from '@opentiny/vue-theme/svgs/align-left.svg' + +export default svg({ name: 'IconAlignLeft', component: AlignLeft }) diff --git a/packages/icon/align-right/index.js b/packages/icon/align-right/index.js new file mode 100644 index 000000000..89262bb7c --- /dev/null +++ b/packages/icon/align-right/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import AlignRight from '@opentiny/vue-theme/svgs/align-right.svg' + +export default svg({ name: 'IconAlignRight', component: AlignRight }) diff --git a/packages/icon/align-stretch/index.js b/packages/icon/align-stretch/index.js new file mode 100644 index 000000000..0b00d367a --- /dev/null +++ b/packages/icon/align-stretch/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import AlignStretch from '@opentiny/vue-theme/svgs/align-stretch.svg' + +export default svg({ name: 'IconAlignStretch', component: AlignStretch }) diff --git a/packages/icon/angularjs/index.js b/packages/icon/angularjs/index.js new file mode 100644 index 000000000..f664de46c --- /dev/null +++ b/packages/icon/angularjs/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Angularjs from '@opentiny/vue-theme/svgs/angularjs.svg' + +export default svg({ name: 'IconAngularjs', component: Angularjs }) diff --git a/packages/icon/app/index.js b/packages/icon/app/index.js new file mode 100644 index 000000000..496773698 --- /dev/null +++ b/packages/icon/app/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import App from '@opentiny/vue-theme/svgs/app.svg' + +export default svg({ name: 'IconApp', component: App }) diff --git a/packages/icon/application/index.js b/packages/icon/application/index.js new file mode 100644 index 000000000..cdb07da8c --- /dev/null +++ b/packages/icon/application/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Application from '@opentiny/vue-theme/svgs/application.svg' + +export default svg({ name: 'IconApplication', component: Application }) diff --git a/packages/icon/area-chart/index.js b/packages/icon/area-chart/index.js new file mode 100644 index 000000000..29a862a04 --- /dev/null +++ b/packages/icon/area-chart/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import AreaChart from '@opentiny/vue-theme/svgs/area-chart.svg' + +export default svg({ name: 'IconAreaChart', component: AreaChart }) diff --git a/packages/icon/arrow-down/index.js b/packages/icon/arrow-down/index.js new file mode 100644 index 000000000..af4ceff4f --- /dev/null +++ b/packages/icon/arrow-down/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import ArrowDown from '@opentiny/vue-theme/svgs/arrow-down.svg' + +export default svg({ name: 'IconArrowDown', component: ArrowDown }) diff --git a/packages/icon/arrow-left/index.js b/packages/icon/arrow-left/index.js new file mode 100644 index 000000000..7ade4b3c9 --- /dev/null +++ b/packages/icon/arrow-left/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import ArrowLeft from '@opentiny/vue-theme/svgs/arrow-left.svg' + +export default svg({ name: 'IconArrowLeft', component: ArrowLeft }) diff --git a/packages/icon/arrow-right/index.js b/packages/icon/arrow-right/index.js new file mode 100644 index 000000000..41abab0f1 --- /dev/null +++ b/packages/icon/arrow-right/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import ArrowRight from '@opentiny/vue-theme/svgs/arrow-right.svg' + +export default svg({ name: 'IconArrowRight', component: ArrowRight }) diff --git a/packages/icon/arrow-up/index.js b/packages/icon/arrow-up/index.js new file mode 100644 index 000000000..646997669 --- /dev/null +++ b/packages/icon/arrow-up/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import ArrowUp from '@opentiny/vue-theme/svgs/arrow-up.svg' + +export default svg({ name: 'IconArrowUp', component: ArrowUp }) diff --git a/packages/icon/ascending/index.js b/packages/icon/ascending/index.js new file mode 100644 index 000000000..d9dc1371a --- /dev/null +++ b/packages/icon/ascending/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Ascending from '@opentiny/vue-theme/svgs/ascending.svg' + +export default svg({ name: 'IconAscending', component: Ascending }) diff --git a/packages/icon/association/index.js b/packages/icon/association/index.js new file mode 100644 index 000000000..fe53d2b9f --- /dev/null +++ b/packages/icon/association/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Association from '@opentiny/vue-theme/svgs/association.svg' + +export default svg({ name: 'IconAssociation', component: Association }) diff --git a/packages/icon/attachment/index.js b/packages/icon/attachment/index.js new file mode 100644 index 000000000..e0b5426b9 --- /dev/null +++ b/packages/icon/attachment/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Attachment from '@opentiny/vue-theme/svgs/attachment.svg' + +export default svg({ name: 'IconAttachment', component: Attachment }) diff --git a/packages/icon/bar-chart/index.js b/packages/icon/bar-chart/index.js new file mode 100644 index 000000000..7021ac3bc --- /dev/null +++ b/packages/icon/bar-chart/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import BarChart from '@opentiny/vue-theme/svgs/bar-chart.svg' + +export default svg({ name: 'IconBarChart', component: BarChart }) diff --git a/packages/icon/befilter/index.js b/packages/icon/befilter/index.js new file mode 100644 index 000000000..423e402ec --- /dev/null +++ b/packages/icon/befilter/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Befilter from '@opentiny/vue-theme/svgs/befilter.svg' + +export default svg({ name: 'IconBefilter', component: Befilter }) diff --git a/packages/icon/boat/index.js b/packages/icon/boat/index.js new file mode 100644 index 000000000..43f8bb34c --- /dev/null +++ b/packages/icon/boat/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Boat from '@opentiny/vue-theme/svgs/boat.svg' + +export default svg({ name: 'IconBoat', component: Boat }) diff --git a/packages/icon/box-solid/index.js b/packages/icon/box-solid/index.js new file mode 100644 index 000000000..0a437cf74 --- /dev/null +++ b/packages/icon/box-solid/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import BoxSolid from '@opentiny/vue-theme/svgs/box-solid.svg' + +export default svg({ name: 'IconBoxSolid', component: BoxSolid }) diff --git a/packages/icon/busy/index.js b/packages/icon/busy/index.js new file mode 100644 index 000000000..e13b749e5 --- /dev/null +++ b/packages/icon/busy/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Busy from '@opentiny/vue-theme/svgs/busy.svg' + +export default svg({ name: 'IconBusy', component: Busy }) diff --git a/packages/icon/calculator/index.js b/packages/icon/calculator/index.js new file mode 100644 index 000000000..5be09f941 --- /dev/null +++ b/packages/icon/calculator/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Calculator from '@opentiny/vue-theme/svgs/calculator.svg' + +export default svg({ name: 'IconCalculator', component: Calculator }) diff --git a/packages/icon/calendar/index.js b/packages/icon/calendar/index.js new file mode 100644 index 000000000..c935b2da1 --- /dev/null +++ b/packages/icon/calendar/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Calendar from '@opentiny/vue-theme/svgs/calendar.svg' + +export default svg({ name: 'IconCalendar', component: Calendar }) diff --git a/packages/icon/check-out/index.js b/packages/icon/check-out/index.js new file mode 100644 index 000000000..31f667e48 --- /dev/null +++ b/packages/icon/check-out/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import CheckOut from '@opentiny/vue-theme/svgs/check-out.svg' + +export default svg({ name: 'IconCheckOut', component: CheckOut }) diff --git a/packages/icon/check/index.js b/packages/icon/check/index.js new file mode 100644 index 000000000..24c87cfe3 --- /dev/null +++ b/packages/icon/check/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Check from '@opentiny/vue-theme/svgs/check.svg' + +export default svg({ name: 'IconCheck', component: Check }) diff --git a/packages/icon/checked-linear/index.js b/packages/icon/checked-linear/index.js new file mode 100644 index 000000000..7daee3858 --- /dev/null +++ b/packages/icon/checked-linear/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import CheckedLinear from '@opentiny/vue-theme/svgs/checked-linear.svg' + +export default svg({ name: 'IconCheckedLinear', component: CheckedLinear }) diff --git a/packages/icon/checked-sur/index.js b/packages/icon/checked-sur/index.js new file mode 100644 index 000000000..3d5475cab --- /dev/null +++ b/packages/icon/checked-sur/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import CheckedSur from '@opentiny/vue-theme/svgs/checked-sur.svg' + +export default svg({ name: 'IconCheckedSur', component: CheckedSur }) diff --git a/packages/icon/checked-true/index.js b/packages/icon/checked-true/index.js new file mode 100644 index 000000000..6071beebc --- /dev/null +++ b/packages/icon/checked-true/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import CheckedTrue from '@opentiny/vue-theme/svgs/checked-true.svg' + +export default svg({ name: 'IconCheckedTrue', component: CheckedTrue }) diff --git a/packages/icon/chevron-down/index.js b/packages/icon/chevron-down/index.js new file mode 100644 index 000000000..ad2f67dfd --- /dev/null +++ b/packages/icon/chevron-down/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import ChevronDown from '@opentiny/vue-theme/svgs/chevron-down.svg' + +export default svg({ name: 'IconChevronDown', component: ChevronDown }) diff --git a/packages/icon/chevron-left/index.js b/packages/icon/chevron-left/index.js new file mode 100644 index 000000000..676865a42 --- /dev/null +++ b/packages/icon/chevron-left/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import ChevronLeft from '@opentiny/vue-theme/svgs/chevron-left.svg' + +export default svg({ name: 'IconChevronLeft', component: ChevronLeft }) diff --git a/packages/icon/chevron-right/index.js b/packages/icon/chevron-right/index.js new file mode 100644 index 000000000..6a82e8e85 --- /dev/null +++ b/packages/icon/chevron-right/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import ChevronRight from '@opentiny/vue-theme/svgs/chevron-right.svg' + +export default svg({ name: 'IconChevronRight', component: ChevronRight }) diff --git a/packages/icon/chevron-up/index.js b/packages/icon/chevron-up/index.js new file mode 100644 index 000000000..07cef14df --- /dev/null +++ b/packages/icon/chevron-up/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import ChevronUp from '@opentiny/vue-theme/svgs/chevron-up.svg' + +export default svg({ name: 'IconChevronUp', component: ChevronUp }) diff --git a/packages/icon/clear-filter/index.js b/packages/icon/clear-filter/index.js new file mode 100644 index 000000000..072db22eb --- /dev/null +++ b/packages/icon/clear-filter/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import ClearFilter from '@opentiny/vue-theme/svgs/clear-filter.svg' + +export default svg({ name: 'IconClearFilter', component: ClearFilter }) diff --git a/packages/icon/clock-work/index.js b/packages/icon/clock-work/index.js new file mode 100644 index 000000000..56a89d875 --- /dev/null +++ b/packages/icon/clock-work/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import ClockWork from '@opentiny/vue-theme/svgs/clock-work.svg' + +export default svg({ name: 'IconClockWork', component: ClockWork }) diff --git a/packages/icon/close-circle/index.js b/packages/icon/close-circle/index.js new file mode 100644 index 000000000..0f1bfddca --- /dev/null +++ b/packages/icon/close-circle/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import CloseCircle from '@opentiny/vue-theme/svgs/close-circle.svg' + +export default svg({ name: 'IconCloseCircle', component: CloseCircle }) diff --git a/packages/icon/close-square/index.js b/packages/icon/close-square/index.js new file mode 100644 index 000000000..2d68af645 --- /dev/null +++ b/packages/icon/close-square/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import CloseSquare from '@opentiny/vue-theme/svgs/close-square.svg' + +export default svg({ name: 'IconCloseSquare', component: CloseSquare }) diff --git a/packages/icon/close/index.js b/packages/icon/close/index.js new file mode 100644 index 000000000..ee8bbf731 --- /dev/null +++ b/packages/icon/close/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Close from '@opentiny/vue-theme/svgs/close.svg' + +export default svg({ name: 'IconClose', component: Close }) diff --git a/packages/icon/cloud-download/index.js b/packages/icon/cloud-download/index.js new file mode 100644 index 000000000..accaddd7b --- /dev/null +++ b/packages/icon/cloud-download/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import CloudDownload from '@opentiny/vue-theme/svgs/cloud-download.svg' + +export default svg({ name: 'IconCloudDownload', component: CloudDownload }) diff --git a/packages/icon/cloud-upload/index.js b/packages/icon/cloud-upload/index.js new file mode 100644 index 000000000..92256d601 --- /dev/null +++ b/packages/icon/cloud-upload/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import CloudUpload from '@opentiny/vue-theme/svgs/cloud-upload.svg' + +export default svg({ name: 'IconCloudUpload', component: CloudUpload }) diff --git a/packages/icon/code/index.js b/packages/icon/code/index.js new file mode 100644 index 000000000..722f99e1f --- /dev/null +++ b/packages/icon/code/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Code from '@opentiny/vue-theme/svgs/code.svg' + +export default svg({ name: 'IconCode', component: Code }) diff --git a/packages/icon/coin/index.js b/packages/icon/coin/index.js new file mode 100644 index 000000000..3a60f42e0 --- /dev/null +++ b/packages/icon/coin/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Coin from '@opentiny/vue-theme/svgs/coin.svg' + +export default svg({ name: 'IconCoin', component: Coin }) diff --git a/packages/icon/col-reverse/index.js b/packages/icon/col-reverse/index.js new file mode 100644 index 000000000..bfd96640a --- /dev/null +++ b/packages/icon/col-reverse/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import ColReverse from '@opentiny/vue-theme/svgs/col-reverse.svg' + +export default svg({ name: 'IconColReverse', component: ColReverse }) diff --git a/packages/icon/commission/index.js b/packages/icon/commission/index.js new file mode 100644 index 000000000..24fd95be5 --- /dev/null +++ b/packages/icon/commission/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Commission from '@opentiny/vue-theme/svgs/commission.svg' + +export default svg({ name: 'IconCommission', component: Commission }) diff --git a/packages/icon/conment-refresh/index.js b/packages/icon/conment-refresh/index.js new file mode 100644 index 000000000..713e0b028 --- /dev/null +++ b/packages/icon/conment-refresh/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import ConmentRefresh from '@opentiny/vue-theme/svgs/conment-refresh.svg' + +export default svg({ name: 'IconConmentRefresh', component: ConmentRefresh }) diff --git a/packages/icon/copy-solid/index.js b/packages/icon/copy-solid/index.js new file mode 100644 index 000000000..9fd2dd37b --- /dev/null +++ b/packages/icon/copy-solid/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import CopySolid from '@opentiny/vue-theme/svgs/copy-solid.svg' + +export default svg({ name: 'IconCopySolid', component: CopySolid }) diff --git a/packages/icon/copy/index.js b/packages/icon/copy/index.js new file mode 100644 index 000000000..199aae36d --- /dev/null +++ b/packages/icon/copy/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Copy from '@opentiny/vue-theme/svgs/copy.svg' + +export default svg({ name: 'IconCopy', component: Copy }) diff --git a/packages/icon/course/index.js b/packages/icon/course/index.js new file mode 100644 index 000000000..1b4996330 --- /dev/null +++ b/packages/icon/course/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Course from '@opentiny/vue-theme/svgs/course.svg' + +export default svg({ name: 'IconCourse', component: Course }) diff --git a/packages/icon/crop/index.js b/packages/icon/crop/index.js new file mode 100644 index 000000000..3320ae25f --- /dev/null +++ b/packages/icon/crop/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Crop from '@opentiny/vue-theme/svgs/crop.svg' + +export default svg({ name: 'IconCrop', component: Crop }) diff --git a/packages/icon/cue-l/index.js b/packages/icon/cue-l/index.js new file mode 100644 index 000000000..9797a761d --- /dev/null +++ b/packages/icon/cue-l/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import CueL from '@opentiny/vue-theme/svgs/cue-l.svg' + +export default svg({ name: 'IconCueL', component: CueL }) diff --git a/packages/icon/custom/index.js b/packages/icon/custom/index.js new file mode 100644 index 000000000..4fd146fac --- /dev/null +++ b/packages/icon/custom/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Custom from '@opentiny/vue-theme/svgs/custom.svg' + +export default svg({ name: 'IconCustom', component: Custom }) diff --git a/packages/icon/customer-service/index.js b/packages/icon/customer-service/index.js new file mode 100644 index 000000000..de282265f --- /dev/null +++ b/packages/icon/customer-service/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import CustomerService from '@opentiny/vue-theme/svgs/customer-service.svg' + +export default svg({ name: 'IconCustomerService', component: CustomerService }) diff --git a/packages/icon/data-source/index.js b/packages/icon/data-source/index.js new file mode 100644 index 000000000..e36a94d03 --- /dev/null +++ b/packages/icon/data-source/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import DataSource from '@opentiny/vue-theme/svgs/data-source.svg' + +export default svg({ name: 'IconDataSource', component: DataSource }) diff --git a/packages/icon/default/index.js b/packages/icon/default/index.js new file mode 100644 index 000000000..286f46f2a --- /dev/null +++ b/packages/icon/default/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Default from '@opentiny/vue-theme/svgs/default.svg' + +export default svg({ name: 'IconDefault', component: Default }) diff --git a/packages/icon/defined-filtration/index.js b/packages/icon/defined-filtration/index.js new file mode 100644 index 000000000..2086da0cc --- /dev/null +++ b/packages/icon/defined-filtration/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import DefinedFiltration from '@opentiny/vue-theme/svgs/defined-filtration.svg' + +export default svg({ name: 'IconDefinedFiltration', component: DefinedFiltration }) diff --git a/packages/icon/del/index.js b/packages/icon/del/index.js new file mode 100644 index 000000000..231d429f0 --- /dev/null +++ b/packages/icon/del/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Del from '@opentiny/vue-theme/svgs/del.svg' + +export default svg({ name: 'IconDel', component: Del }) diff --git a/packages/icon/delete-page/index.js b/packages/icon/delete-page/index.js new file mode 100644 index 000000000..5fbc42dc2 --- /dev/null +++ b/packages/icon/delete-page/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import DeletePage from '@opentiny/vue-theme/svgs/delete-page.svg' + +export default svg({ name: 'IconDeletePage', component: DeletePage }) diff --git a/packages/icon/deleted/index.js b/packages/icon/deleted/index.js new file mode 100644 index 000000000..e09a0fd1f --- /dev/null +++ b/packages/icon/deleted/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Deleted from '@opentiny/vue-theme/svgs/deleted.svg' + +export default svg({ name: 'IconDeleted', component: Deleted }) diff --git a/packages/icon/delta-down-o/index.js b/packages/icon/delta-down-o/index.js new file mode 100644 index 000000000..44285f54f --- /dev/null +++ b/packages/icon/delta-down-o/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import DeltaDownO from '@opentiny/vue-theme/svgs/delta-down-o.svg' + +export default svg({ name: 'IconDeltaDownO', component: DeltaDownO }) diff --git a/packages/icon/delta-down/index.js b/packages/icon/delta-down/index.js new file mode 100644 index 000000000..e081a38fe --- /dev/null +++ b/packages/icon/delta-down/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import DeltaDown from '@opentiny/vue-theme/svgs/delta-down.svg' + +export default svg({ name: 'IconDeltaDown', component: DeltaDown }) diff --git a/packages/icon/delta-left-o/index.js b/packages/icon/delta-left-o/index.js new file mode 100644 index 000000000..8df34a78a --- /dev/null +++ b/packages/icon/delta-left-o/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import DeltaLeftO from '@opentiny/vue-theme/svgs/delta-left-o.svg' + +export default svg({ name: 'IconDeltaLeftO', component: DeltaLeftO }) diff --git a/packages/icon/delta-left/index.js b/packages/icon/delta-left/index.js new file mode 100644 index 000000000..6295f00f8 --- /dev/null +++ b/packages/icon/delta-left/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import DeltaLeft from '@opentiny/vue-theme/svgs/delta-left.svg' + +export default svg({ name: 'IconDeltaLeft', component: DeltaLeft }) diff --git a/packages/icon/delta-right-o/index.js b/packages/icon/delta-right-o/index.js new file mode 100644 index 000000000..a8e07db95 --- /dev/null +++ b/packages/icon/delta-right-o/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import DeltaRightO from '@opentiny/vue-theme/svgs/delta-right-o.svg' + +export default svg({ name: 'IconDeltaRightO', component: DeltaRightO }) diff --git a/packages/icon/delta-right/index.js b/packages/icon/delta-right/index.js new file mode 100644 index 000000000..c0bda6f7a --- /dev/null +++ b/packages/icon/delta-right/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import DeltaRight from '@opentiny/vue-theme/svgs/delta-right.svg' + +export default svg({ name: 'IconDeltaRight', component: DeltaRight }) diff --git a/packages/icon/delta-up-o/index.js b/packages/icon/delta-up-o/index.js new file mode 100644 index 000000000..cc22c39a8 --- /dev/null +++ b/packages/icon/delta-up-o/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import DeltaUpO from '@opentiny/vue-theme/svgs/delta-up-o.svg' + +export default svg({ name: 'IconDeltaUpO', component: DeltaUpO }) diff --git a/packages/icon/delta-up/index.js b/packages/icon/delta-up/index.js new file mode 100644 index 000000000..92071b8b9 --- /dev/null +++ b/packages/icon/delta-up/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import DeltaUp from '@opentiny/vue-theme/svgs/delta-up.svg' + +export default svg({ name: 'IconDeltaUp', component: DeltaUp }) diff --git a/packages/icon/derive/index.js b/packages/icon/derive/index.js new file mode 100644 index 000000000..e464c602f --- /dev/null +++ b/packages/icon/derive/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Derive from '@opentiny/vue-theme/svgs/derive.svg' + +export default svg({ name: 'IconDerive', component: Derive }) diff --git a/packages/icon/descending/index.js b/packages/icon/descending/index.js new file mode 100644 index 000000000..df6339b6c --- /dev/null +++ b/packages/icon/descending/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Descending from '@opentiny/vue-theme/svgs/descending.svg' + +export default svg({ name: 'IconDescending', component: Descending }) diff --git a/packages/icon/desktop-view/index.js b/packages/icon/desktop-view/index.js new file mode 100644 index 000000000..8bada3e7a --- /dev/null +++ b/packages/icon/desktop-view/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import DesktopView from '@opentiny/vue-theme/svgs/desktop-view.svg' + +export default svg({ name: 'IconDesktopView', component: DesktopView }) diff --git a/packages/icon/dialog/index.js b/packages/icon/dialog/index.js new file mode 100644 index 000000000..47ad3eeae --- /dev/null +++ b/packages/icon/dialog/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Dialog from '@opentiny/vue-theme/svgs/dialog.svg' + +export default svg({ name: 'IconDialog', component: Dialog }) diff --git a/packages/icon/dialog2/index.js b/packages/icon/dialog2/index.js new file mode 100644 index 000000000..0539d0524 --- /dev/null +++ b/packages/icon/dialog2/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Dialog2 from '@opentiny/vue-theme/svgs/dialog2.svg' + +export default svg({ name: 'IconDialog2', component: Dialog2 }) diff --git a/packages/icon/direction-col/index.js b/packages/icon/direction-col/index.js new file mode 100644 index 000000000..7b7a25f29 --- /dev/null +++ b/packages/icon/direction-col/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import DirectionCol from '@opentiny/vue-theme/svgs/direction-col.svg' + +export default svg({ name: 'IconDirectionCol', component: DirectionCol }) diff --git a/packages/icon/direction-row/index.js b/packages/icon/direction-row/index.js new file mode 100644 index 000000000..033bb399b --- /dev/null +++ b/packages/icon/direction-row/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import DirectionRow from '@opentiny/vue-theme/svgs/direction-row.svg' + +export default svg({ name: 'IconDirectionRow', component: DirectionRow }) diff --git a/packages/icon/dot-chart/index.js b/packages/icon/dot-chart/index.js new file mode 100644 index 000000000..9fe8e0be8 --- /dev/null +++ b/packages/icon/dot-chart/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import DotChart from '@opentiny/vue-theme/svgs/dot-chart.svg' + +export default svg({ name: 'IconDotChart', component: DotChart }) diff --git a/packages/icon/dot-download/index.js b/packages/icon/dot-download/index.js new file mode 100644 index 000000000..ba4fcd1fb --- /dev/null +++ b/packages/icon/dot-download/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import DotDownload from '@opentiny/vue-theme/svgs/dot-download.svg' + +export default svg({ name: 'iconDotDownload', component: DotDownload }) \ No newline at end of file diff --git a/packages/icon/dot-ipv4/index.js b/packages/icon/dot-ipv4/index.js new file mode 100644 index 000000000..9e4cbe291 --- /dev/null +++ b/packages/icon/dot-ipv4/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import DotIpv4 from '@opentiny/vue-theme/svgs/dot-ipv4.svg' + +export default svg({ name: 'IconDotIpv4', component: DotIpv4 }) diff --git a/packages/icon/double-left/index.js b/packages/icon/double-left/index.js new file mode 100644 index 000000000..22436dc28 --- /dev/null +++ b/packages/icon/double-left/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import DoubleLeft from '@opentiny/vue-theme/svgs/double-left.svg' + +export default svg({ name: 'IconDoubleLeft', component: DoubleLeft }) diff --git a/packages/icon/double-right/index.js b/packages/icon/double-right/index.js new file mode 100644 index 000000000..20b1a8e24 --- /dev/null +++ b/packages/icon/double-right/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import DoubleRight from '@opentiny/vue-theme/svgs/double-right.svg' + +export default svg({ name: 'IconDoubleRight', component: DoubleRight }) diff --git a/packages/icon/down-o/index.js b/packages/icon/down-o/index.js new file mode 100644 index 000000000..9a3d9f43d --- /dev/null +++ b/packages/icon/down-o/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import DownO from '@opentiny/vue-theme/svgs/down-o.svg' + +export default svg({ name: 'IconDownO', component: DownO }) diff --git a/packages/icon/down/index.js b/packages/icon/down/index.js new file mode 100644 index 000000000..2b62bda1f --- /dev/null +++ b/packages/icon/down/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Down from '@opentiny/vue-theme/svgs/down.svg' + +export default svg({ name: 'IconDown', component: Down }) diff --git a/packages/icon/download-cloud/index.js b/packages/icon/download-cloud/index.js new file mode 100644 index 000000000..58b9f2348 --- /dev/null +++ b/packages/icon/download-cloud/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import DownloadCloud from '@opentiny/vue-theme/svgs/download-cloud.svg' + +export default svg({ name: 'IconDownloadCloud', component: DownloadCloud }) diff --git a/packages/icon/download-link/index.js b/packages/icon/download-link/index.js new file mode 100644 index 000000000..632c9a071 --- /dev/null +++ b/packages/icon/download-link/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import DownloadLink from '@opentiny/vue-theme/svgs/download-link.svg' + +export default svg({ name: 'IconDownloadLink', component: DownloadLink }) diff --git a/packages/icon/download/index.js b/packages/icon/download/index.js new file mode 100644 index 000000000..b7cff1994 --- /dev/null +++ b/packages/icon/download/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Download from '@opentiny/vue-theme/svgs/download.svg' + +export default svg({ name: 'IconDownload', component: Download }) diff --git a/packages/icon/draft/index.js b/packages/icon/draft/index.js new file mode 100644 index 000000000..da86681a4 --- /dev/null +++ b/packages/icon/draft/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Draft from '@opentiny/vue-theme/svgs/draft.svg' + +export default svg({ name: 'IconDraft', component: Draft }) diff --git a/packages/icon/edit/index.js b/packages/icon/edit/index.js new file mode 100644 index 000000000..731b28b09 --- /dev/null +++ b/packages/icon/edit/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Edit from '@opentiny/vue-theme/svgs/edit.svg' + +export default svg({ name: 'IconEdit', component: Edit }) diff --git a/packages/icon/editor-align-center/index.js b/packages/icon/editor-align-center/index.js new file mode 100644 index 000000000..1ea5c9c9f --- /dev/null +++ b/packages/icon/editor-align-center/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import EditorAlignCenter from '@opentiny/vue-theme/svgs/editor-align-center.svg' + +export default svg({ name: 'EditorAlignCenter', component: EditorAlignCenter }) diff --git a/packages/icon/editor-align-left/index.js b/packages/icon/editor-align-left/index.js new file mode 100644 index 000000000..c2399e3f6 --- /dev/null +++ b/packages/icon/editor-align-left/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import EditorAlignLeft from '@opentiny/vue-theme/svgs/editor-align-left.svg' + +export default svg({ name: 'EditorAlignLeft', component: EditorAlignLeft }) diff --git a/packages/icon/editor-align-right/index.js b/packages/icon/editor-align-right/index.js new file mode 100644 index 000000000..bf5e63f23 --- /dev/null +++ b/packages/icon/editor-align-right/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import EditorAlignRight from '@opentiny/vue-theme/svgs/editor-align-right.svg' + +export default svg({ name: 'EditorAlignRight', component: EditorAlignRight }) diff --git a/packages/icon/editor-background/index.js b/packages/icon/editor-background/index.js new file mode 100644 index 000000000..ad7fc18b3 --- /dev/null +++ b/packages/icon/editor-background/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import EditorBackground from '@opentiny/vue-theme/svgs/editor-background.svg' + +export default svg({ name: 'EditorBackground', component: EditorBackground }) diff --git a/packages/icon/editor-bold/index.js b/packages/icon/editor-bold/index.js new file mode 100644 index 000000000..661f3ed9a --- /dev/null +++ b/packages/icon/editor-bold/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import EditorBold from '@opentiny/vue-theme/svgs/editor-bold.svg' + +export default svg({ name: 'EditorBold', component: EditorBold }) diff --git a/packages/icon/editor-code/index.js b/packages/icon/editor-code/index.js new file mode 100644 index 000000000..08d3ece73 --- /dev/null +++ b/packages/icon/editor-code/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import EditorCode from '@opentiny/vue-theme/svgs/editor-code.svg' + +export default svg({ name: 'EditorCode', component: EditorCode }) diff --git a/packages/icon/editor-deleteline/index.js b/packages/icon/editor-deleteline/index.js new file mode 100644 index 000000000..4a016503b --- /dev/null +++ b/packages/icon/editor-deleteline/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import EditorDeleteline from '@opentiny/vue-theme/svgs/editor-deleteline.svg' + +export default svg({ name: 'EditorDeleteline', component: EditorDeleteline }) diff --git a/packages/icon/editor-eraser/index.js b/packages/icon/editor-eraser/index.js new file mode 100644 index 000000000..5df94685d --- /dev/null +++ b/packages/icon/editor-eraser/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import EditorEraser from '@opentiny/vue-theme/svgs/editor-eraser.svg' + +export default svg({ name: 'EditorEraser', component: EditorEraser }) diff --git a/packages/icon/editor-italic/index.js b/packages/icon/editor-italic/index.js new file mode 100644 index 000000000..992f1e774 --- /dev/null +++ b/packages/icon/editor-italic/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import EditorItalic from '@opentiny/vue-theme/svgs/editor-italic.svg' + +export default svg({ name: 'EditorItalic', component: EditorItalic }) diff --git a/packages/icon/editor-left-border/index.js b/packages/icon/editor-left-border/index.js new file mode 100644 index 000000000..41c8d79a3 --- /dev/null +++ b/packages/icon/editor-left-border/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import EditorLeftBorder from '@opentiny/vue-theme/svgs/editor-left-border.svg' + +export default svg({ name: 'EditorLeftBorder', component: EditorLeftBorder }) diff --git a/packages/icon/editor-list-dot/index.js b/packages/icon/editor-list-dot/index.js new file mode 100644 index 000000000..0a77b1988 --- /dev/null +++ b/packages/icon/editor-list-dot/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import EditorListDot from '@opentiny/vue-theme/svgs/editor-list-dot.svg' + +export default svg({ name: 'EditorListDot', component: EditorListDot }) diff --git a/packages/icon/editor-list-num/index.js b/packages/icon/editor-list-num/index.js new file mode 100644 index 000000000..452592a17 --- /dev/null +++ b/packages/icon/editor-list-num/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import EditorListNum from '@opentiny/vue-theme/svgs/editor-list-num.svg' + +export default svg({ name: 'EditorListNum', component: EditorListNum }) diff --git a/packages/icon/editor-list/index.js b/packages/icon/editor-list/index.js new file mode 100644 index 000000000..65fd706d5 --- /dev/null +++ b/packages/icon/editor-list/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import EditorList from '@opentiny/vue-theme/svgs/editor-list.svg' + +export default svg({ name: 'EditorList', component: EditorList }) diff --git a/packages/icon/editor-menu-left/index.js b/packages/icon/editor-menu-left/index.js new file mode 100644 index 000000000..630e5836b --- /dev/null +++ b/packages/icon/editor-menu-left/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import EditorMenuLeft from '@opentiny/vue-theme/svgs/editor-menu-left.svg' + +export default svg({ name: 'EditorMenuLeft', component: EditorMenuLeft }) diff --git a/packages/icon/editor-menu-right/index.js b/packages/icon/editor-menu-right/index.js new file mode 100644 index 000000000..759b3b89c --- /dev/null +++ b/packages/icon/editor-menu-right/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import EditorMenuRight from '@opentiny/vue-theme/svgs/editor-menu-right.svg' + +export default svg({ name: 'EditorMenuRight', component: EditorMenuRight }) diff --git a/packages/icon/editor-quote/index.js b/packages/icon/editor-quote/index.js new file mode 100644 index 000000000..794957dd1 --- /dev/null +++ b/packages/icon/editor-quote/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import EditorQuote from '@opentiny/vue-theme/svgs/editor-quote.svg' + +export default svg({ name: 'EditorQuote', component: EditorQuote }) diff --git a/packages/icon/editor-redo/index.js b/packages/icon/editor-redo/index.js new file mode 100644 index 000000000..2056ca03d --- /dev/null +++ b/packages/icon/editor-redo/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import EditorRedo from '@opentiny/vue-theme/svgs/editor-redo.svg' + +export default svg({ name: 'EditorRedo', component: EditorRedo }) diff --git a/packages/icon/editor-right-border/index.js b/packages/icon/editor-right-border/index.js new file mode 100644 index 000000000..251843882 --- /dev/null +++ b/packages/icon/editor-right-border/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import EditorRightBorder from '@opentiny/vue-theme/svgs/editor-right-border.svg' + +export default svg({ name: 'EditorRightBorder', component: EditorRightBorder }) diff --git a/packages/icon/editor-sub/index.js b/packages/icon/editor-sub/index.js new file mode 100644 index 000000000..6f180cf1f --- /dev/null +++ b/packages/icon/editor-sub/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import EditorSub from '@opentiny/vue-theme/svgs/editor-sub.svg' + +export default svg({ name: 'EditorSub', component: EditorSub }) diff --git a/packages/icon/editor-subtitle/index.js b/packages/icon/editor-subtitle/index.js new file mode 100644 index 000000000..43e19a020 --- /dev/null +++ b/packages/icon/editor-subtitle/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import EditorSubtitle from '@opentiny/vue-theme/svgs/editor-subtitle.svg' + +export default svg({ name: 'EditorSubtitle', component: EditorSubtitle }) diff --git a/packages/icon/editor-super/index.js b/packages/icon/editor-super/index.js new file mode 100644 index 000000000..523a52f67 --- /dev/null +++ b/packages/icon/editor-super/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import EditorSuper from '@opentiny/vue-theme/svgs/editor-super.svg' + +export default svg({ name: 'EditorSuper', component: EditorSuper }) diff --git a/packages/icon/editor-tab/index.js b/packages/icon/editor-tab/index.js new file mode 100644 index 000000000..09dc10c7b --- /dev/null +++ b/packages/icon/editor-tab/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import EditorTab from '@opentiny/vue-theme/svgs/editor-tab.svg' + +export default svg({ name: 'IconEditorTab', component: EditorTab }) diff --git a/packages/icon/editor-table/index.js b/packages/icon/editor-table/index.js new file mode 100644 index 000000000..6ea4ff602 --- /dev/null +++ b/packages/icon/editor-table/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import EditorTable from '@opentiny/vue-theme/svgs/editor-table.svg' + +export default svg({ name: 'EditorTable', component: EditorTable }) diff --git a/packages/icon/editor-textcolor/index.js b/packages/icon/editor-textcolor/index.js new file mode 100644 index 000000000..ea3f83929 --- /dev/null +++ b/packages/icon/editor-textcolor/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import EditorTextcolor from '@opentiny/vue-theme/svgs/editor-textcolor.svg' + +export default svg({ name: 'EditorTextcolor', component: EditorTextcolor }) diff --git a/packages/icon/editor-title/index.js b/packages/icon/editor-title/index.js new file mode 100644 index 000000000..6074b2837 --- /dev/null +++ b/packages/icon/editor-title/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import EditorTitle from '@opentiny/vue-theme/svgs/editor-title.svg' + +export default svg({ name: 'EditorTitle', component: EditorTitle }) diff --git a/packages/icon/editor-underline/index.js b/packages/icon/editor-underline/index.js new file mode 100644 index 000000000..14e7c5261 --- /dev/null +++ b/packages/icon/editor-underline/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import EditorUnderline from '@opentiny/vue-theme/svgs/editor-underline.svg' + +export default svg({ name: 'EditorUnderline', component: EditorUnderline }) diff --git a/packages/icon/editor-undo/index.js b/packages/icon/editor-undo/index.js new file mode 100644 index 000000000..2db434610 --- /dev/null +++ b/packages/icon/editor-undo/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import EditorUndo from '@opentiny/vue-theme/svgs/editor-undo.svg' + +export default svg({ name: 'EditorUndo', component: EditorUndo }) diff --git a/packages/icon/editor-video/index.js b/packages/icon/editor-video/index.js new file mode 100644 index 000000000..21e07596f --- /dev/null +++ b/packages/icon/editor-video/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import EditorVideo from '@opentiny/vue-theme/svgs/editor-video.svg' + +export default svg({ name: 'EditorVideo', component: EditorVideo }) diff --git a/packages/icon/ellipsis/index.js b/packages/icon/ellipsis/index.js new file mode 100644 index 000000000..8e1792442 --- /dev/null +++ b/packages/icon/ellipsis/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Ellipsis from '@opentiny/vue-theme/svgs/ellipsis.svg' + +export default svg({ name: 'IconEllipsis', component: Ellipsis }) diff --git a/packages/icon/email-add/index.js b/packages/icon/email-add/index.js new file mode 100644 index 000000000..c823ca140 --- /dev/null +++ b/packages/icon/email-add/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import EmailAdd from '@opentiny/vue-theme/svgs/email-add.svg' + +export default svg({ name: 'IconEmailAdd', component: EmailAdd }) diff --git a/packages/icon/email-circle/index.js b/packages/icon/email-circle/index.js new file mode 100644 index 000000000..0bdc869c8 --- /dev/null +++ b/packages/icon/email-circle/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import EmailCircle from '@opentiny/vue-theme/svgs/email-circle.svg' + +export default svg({ name: 'IconEmailCircle', component: EmailCircle }) diff --git a/packages/icon/end/index.js b/packages/icon/end/index.js new file mode 100644 index 000000000..831c1ba56 --- /dev/null +++ b/packages/icon/end/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import End from '@opentiny/vue-theme/svgs/end.svg' + +export default svg({ name: 'IconEnd', component: End }) diff --git a/packages/icon/error/index.js b/packages/icon/error/index.js new file mode 100644 index 000000000..e0620bba0 --- /dev/null +++ b/packages/icon/error/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Error from '@opentiny/vue-theme/svgs/error.svg' + +export default svg({ name: 'IconError', component: Error }) diff --git a/packages/icon/espace-auto/index.js b/packages/icon/espace-auto/index.js new file mode 100644 index 000000000..ad53abcb9 --- /dev/null +++ b/packages/icon/espace-auto/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import EspaceAuto from '@opentiny/vue-theme/svgs/espace-auto.svg' + +export default svg({ name: 'IconEspaceAuto', component: EspaceAuto }) diff --git a/packages/icon/espace/index.js b/packages/icon/espace/index.js new file mode 100644 index 000000000..d6b38b269 --- /dev/null +++ b/packages/icon/espace/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Espace from '@opentiny/vue-theme/svgs/espace.svg' + +export default svg({ name: 'IconEspace', component: Espace }) diff --git a/packages/icon/excel/index.js b/packages/icon/excel/index.js new file mode 100644 index 000000000..a25ab64bb --- /dev/null +++ b/packages/icon/excel/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Excel from '@opentiny/vue-theme/svgs/excel.svg' + +export default svg({ name: 'IconExcel', component: Excel }) diff --git a/packages/icon/exception/index.js b/packages/icon/exception/index.js new file mode 100644 index 000000000..67cd4d4ec --- /dev/null +++ b/packages/icon/exception/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Exception from '@opentiny/vue-theme/svgs/exception.svg' + +export default svg({ name: 'IconException', component: Exception }) diff --git a/packages/icon/exclamation/index.js b/packages/icon/exclamation/index.js new file mode 100644 index 000000000..d761ebd8b --- /dev/null +++ b/packages/icon/exclamation/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Exclamation from '@opentiny/vue-theme/svgs/exclamation.svg' + +export default svg({ name: 'IconExclamation', component: Exclamation }) diff --git a/packages/icon/export/index.js b/packages/icon/export/index.js new file mode 100644 index 000000000..90fe730ec --- /dev/null +++ b/packages/icon/export/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Export from '@opentiny/vue-theme/svgs/export.svg' + +export default svg({ name: 'IconExport', component: Export }) diff --git a/packages/icon/express-search/index.js b/packages/icon/express-search/index.js new file mode 100644 index 000000000..c1306221c --- /dev/null +++ b/packages/icon/express-search/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import ExpressSearch from '@opentiny/vue-theme/svgs/express-search.svg' + +export default svg({ name: 'IconExpressSearch', component: ExpressSearch }) diff --git a/packages/icon/eyeclose/index.js b/packages/icon/eyeclose/index.js new file mode 100644 index 000000000..dd8af8843 --- /dev/null +++ b/packages/icon/eyeclose/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Eyeclose from '@opentiny/vue-theme/svgs/eyeclose.svg' + +export default svg({ name: 'IconEyeclose', component: Eyeclose }) diff --git a/packages/icon/eyeopen/index.js b/packages/icon/eyeopen/index.js new file mode 100644 index 000000000..da880ab87 --- /dev/null +++ b/packages/icon/eyeopen/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Eyeopen from '@opentiny/vue-theme/svgs/eyeopen.svg' + +export default svg({ name: 'IconEyeopen', component: Eyeopen }) diff --git a/packages/icon/file-cloudupload/index.js b/packages/icon/file-cloudupload/index.js new file mode 100644 index 000000000..a9dd67744 --- /dev/null +++ b/packages/icon/file-cloudupload/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import FileCloudupload from '@opentiny/vue-theme/svgs/file-cloudupload.svg' + +export default svg({ name: 'IconFileCloudupload', component: FileCloudupload }) diff --git a/packages/icon/file-excel/index.js b/packages/icon/file-excel/index.js new file mode 100644 index 000000000..504371342 --- /dev/null +++ b/packages/icon/file-excel/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import FileExcel from '@opentiny/vue-theme/svgs/file-excel.svg' + +export default svg({ name: 'IconFileExcel', component: FileExcel }) diff --git a/packages/icon/file/index.js b/packages/icon/file/index.js new file mode 100644 index 000000000..3be3bcb7c --- /dev/null +++ b/packages/icon/file/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import File from '@opentiny/vue-theme/svgs/file.svg' + +export default svg({ name: 'IconFile', component: File }) diff --git a/packages/icon/files-circle/index.js b/packages/icon/files-circle/index.js new file mode 100644 index 000000000..0e01e9a4f --- /dev/null +++ b/packages/icon/files-circle/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import FilesCircle from '@opentiny/vue-theme/svgs/files-circle.svg' + +export default svg({ name: 'IconFilesCircle', component: FilesCircle }) diff --git a/packages/icon/files/index.js b/packages/icon/files/index.js new file mode 100644 index 000000000..13b7bd583 --- /dev/null +++ b/packages/icon/files/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Files from '@opentiny/vue-theme/svgs/files.svg' + +export default svg({ name: 'IconFiles', component: Files }) diff --git a/packages/icon/filetext/index.js b/packages/icon/filetext/index.js new file mode 100644 index 000000000..c17ce057f --- /dev/null +++ b/packages/icon/filetext/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Filetext from '@opentiny/vue-theme/svgs/filetext.svg' + +export default svg({ name: 'IconFiletext', component: Filetext }) diff --git a/packages/icon/fileupload/index.js b/packages/icon/fileupload/index.js new file mode 100644 index 000000000..719afcb8c --- /dev/null +++ b/packages/icon/fileupload/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Fileupload from '@opentiny/vue-theme/svgs/fileupload.svg' + +export default svg({ name: 'IconFileupload', component: Fileupload }) diff --git a/packages/icon/filtered/index.js b/packages/icon/filtered/index.js new file mode 100644 index 000000000..96307d020 --- /dev/null +++ b/packages/icon/filtered/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Filtered from '@opentiny/vue-theme/svgs/filtered.svg' + +export default svg({ name: 'IconFiltered', component: Filtered }) diff --git a/packages/icon/flag/index.js b/packages/icon/flag/index.js new file mode 100644 index 000000000..26770d505 --- /dev/null +++ b/packages/icon/flag/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Flag from '@opentiny/vue-theme/svgs/flag.svg' + +export default svg({ name: 'IconFlag', component: Flag }) diff --git a/packages/icon/folder-closed/index.js b/packages/icon/folder-closed/index.js new file mode 100644 index 000000000..9e673d749 --- /dev/null +++ b/packages/icon/folder-closed/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import FolderClosed from '@opentiny/vue-theme/svgs/folder-closed.svg' + +export default svg({ name: 'IconFolderClosed', component: FolderClosed }) diff --git a/packages/icon/folder-opened/index.js b/packages/icon/folder-opened/index.js new file mode 100644 index 000000000..7015d861c --- /dev/null +++ b/packages/icon/folder-opened/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import FolderOpened from '@opentiny/vue-theme/svgs/folder-opened.svg' + +export default svg({ name: 'IconFolderOpened', component: FolderOpened }) diff --git a/packages/icon/font-color/index.js b/packages/icon/font-color/index.js new file mode 100644 index 000000000..0f66d6f43 --- /dev/null +++ b/packages/icon/font-color/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import FontColor from '@opentiny/vue-theme/svgs/font-color.svg' + +export default svg({ name: 'IconFontColor', component: FontColor }) diff --git a/packages/icon/font-family/index.js b/packages/icon/font-family/index.js new file mode 100644 index 000000000..260c463a5 --- /dev/null +++ b/packages/icon/font-family/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import FontFamily from '@opentiny/vue-theme/svgs/font-family.svg' + +export default svg({ name: 'IconFontFamily', component: FontFamily }) diff --git a/packages/icon/font-size/index.js b/packages/icon/font-size/index.js new file mode 100644 index 000000000..d2452d4f5 --- /dev/null +++ b/packages/icon/font-size/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import FontSize from '@opentiny/vue-theme/svgs/font-size.svg' + +export default svg({ name: 'IconFontSize', component: FontSize }) diff --git a/packages/icon/font-style/index.js b/packages/icon/font-style/index.js new file mode 100644 index 000000000..a54b7b78f --- /dev/null +++ b/packages/icon/font-style/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import FontStyle from '@opentiny/vue-theme/svgs/font-style.svg' + +export default svg({ name: 'IconFontStyle', component: FontStyle }) diff --git a/packages/icon/font-weight/index.js b/packages/icon/font-weight/index.js new file mode 100644 index 000000000..c054b130d --- /dev/null +++ b/packages/icon/font-weight/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import FontWeight from '@opentiny/vue-theme/svgs/font-weight.svg' + +export default svg({ name: 'IconFontWeight', component: FontWeight }) diff --git a/packages/icon/freeze-left/index.js b/packages/icon/freeze-left/index.js new file mode 100644 index 000000000..7fa1b1d5f --- /dev/null +++ b/packages/icon/freeze-left/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import FreezeLeft from '@opentiny/vue-theme/svgs/freeze-left.svg' + +export default svg({ name: 'IconFreezeLeft', component: FreezeLeft }) diff --git a/packages/icon/freeze-right/index.js b/packages/icon/freeze-right/index.js new file mode 100644 index 000000000..bdf9d3995 --- /dev/null +++ b/packages/icon/freeze-right/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import FreezeRight from '@opentiny/vue-theme/svgs/freeze-right.svg' + +export default svg({ name: 'IconFreezeRight', component: FreezeRight }) diff --git a/packages/icon/frown-o/index.js b/packages/icon/frown-o/index.js new file mode 100644 index 000000000..e8335f31b --- /dev/null +++ b/packages/icon/frown-o/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import FrownO from '@opentiny/vue-theme/svgs/frown-o.svg' + +export default svg({ name: 'IconFrownO', component: FrownO }) diff --git a/packages/icon/frown/index.js b/packages/icon/frown/index.js new file mode 100644 index 000000000..327d6ed91 --- /dev/null +++ b/packages/icon/frown/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Frown from '@opentiny/vue-theme/svgs/frown.svg' + +export default svg({ name: 'IconFrown', component: Frown }) diff --git a/packages/icon/fullscreen-left/index.js b/packages/icon/fullscreen-left/index.js new file mode 100644 index 000000000..4b78da06a --- /dev/null +++ b/packages/icon/fullscreen-left/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import FullscreenLeft from '@opentiny/vue-theme/svgs/fullscreen-left.svg' + +export default svg({ name: 'IconFullscreenLeft', component: FullscreenLeft }) diff --git a/packages/icon/fullscreen/index.js b/packages/icon/fullscreen/index.js new file mode 100644 index 000000000..cb7dcefac --- /dev/null +++ b/packages/icon/fullscreen/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Fullscreen from '@opentiny/vue-theme/svgs/fullscreen.svg' + +export default svg({ name: 'IconFullscreen', component: Fullscreen }) diff --git a/packages/icon/grade/index.js b/packages/icon/grade/index.js new file mode 100644 index 000000000..e39c95a6c --- /dev/null +++ b/packages/icon/grade/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Grade from '@opentiny/vue-theme/svgs/grade.svg' + +export default svg({ name: 'IconGrade', component: Grade }) diff --git a/packages/icon/group-transfer/index.js b/packages/icon/group-transfer/index.js new file mode 100644 index 000000000..9f4b667a0 --- /dev/null +++ b/packages/icon/group-transfer/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import GroupTransfer from '@opentiny/vue-theme/svgs/group-transfer.svg' + +export default svg({ name: 'IconGroupTransfer', component: GroupTransfer }) diff --git a/packages/icon/group/index.js b/packages/icon/group/index.js new file mode 100644 index 000000000..420ef75d3 --- /dev/null +++ b/packages/icon/group/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Group from '@opentiny/vue-theme/svgs/group.svg' + +export default svg({ name: 'IconGroup', component: Group }) diff --git a/packages/icon/halfchecked/index.js b/packages/icon/halfchecked/index.js new file mode 100644 index 000000000..37950b4b9 --- /dev/null +++ b/packages/icon/halfchecked/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Halfchecked from '@opentiny/vue-theme/svgs/halfchecked.svg' + +export default svg({ name: 'IconHalfchecked', component: Halfchecked }) diff --git a/packages/icon/halfselect/index.js b/packages/icon/halfselect/index.js new file mode 100644 index 000000000..14bc99fbd --- /dev/null +++ b/packages/icon/halfselect/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Halfselect from '@opentiny/vue-theme/svgs/halfselect.svg' + +export default svg({ name: 'IconHalfselect', component: Halfselect }) diff --git a/packages/icon/heartempty/index.js b/packages/icon/heartempty/index.js new file mode 100644 index 000000000..fbcba5f4b --- /dev/null +++ b/packages/icon/heartempty/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Heartempty from '@opentiny/vue-theme/svgs/heartempty.svg' + +export default svg({ name: 'IconHeartempty', component: Heartempty }) diff --git a/packages/icon/help-circle/index.js b/packages/icon/help-circle/index.js new file mode 100644 index 000000000..f3a14fd2c --- /dev/null +++ b/packages/icon/help-circle/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import HelpCircle from '@opentiny/vue-theme/svgs/help-circle.svg' + +export default svg({ name: 'IconHelpCircle', component: HelpCircle }) diff --git a/packages/icon/help-query/index.js b/packages/icon/help-query/index.js new file mode 100644 index 000000000..a066c590e --- /dev/null +++ b/packages/icon/help-query/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import HelpQuery from '@opentiny/vue-theme/svgs/help-query.svg' + +export default svg({ name: 'IconHelpQuery', component: HelpQuery }) diff --git a/packages/icon/help-solid/index.js b/packages/icon/help-solid/index.js new file mode 100644 index 000000000..828923326 --- /dev/null +++ b/packages/icon/help-solid/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import HelpSolid from '@opentiny/vue-theme/svgs/help-solid.svg' + +export default svg({ name: 'IconHelpSolid', component: HelpSolid }) diff --git a/packages/icon/help/index.js b/packages/icon/help/index.js new file mode 100644 index 000000000..542bf89b5 --- /dev/null +++ b/packages/icon/help/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Help from '@opentiny/vue-theme/svgs/help.svg' + +export default svg({ name: 'IconHelp', component: Help }) diff --git a/packages/icon/helpful/index.js b/packages/icon/helpful/index.js new file mode 100644 index 000000000..75be12c40 --- /dev/null +++ b/packages/icon/helpful/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Helpful from '@opentiny/vue-theme/svgs/helpful.svg' + +export default svg({ name: 'IconHelpful', component: Helpful }) diff --git a/packages/icon/hide-left/index.js b/packages/icon/hide-left/index.js new file mode 100644 index 000000000..af07fb060 --- /dev/null +++ b/packages/icon/hide-left/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import HideLeft from '@opentiny/vue-theme/svgs/hide-left.svg' + +export default svg({ name: 'IconHideLeft', component: HideLeft }) diff --git a/packages/icon/hide-right/index.js b/packages/icon/hide-right/index.js new file mode 100644 index 000000000..1d1d5cf20 --- /dev/null +++ b/packages/icon/hide-right/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import HideRight from '@opentiny/vue-theme/svgs/hide-right.svg' + +export default svg({ name: 'IconHideRight', component: HideRight }) diff --git a/packages/icon/hide-topleft/index.js b/packages/icon/hide-topleft/index.js new file mode 100644 index 000000000..66538d33b --- /dev/null +++ b/packages/icon/hide-topleft/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import HideTopleft from '@opentiny/vue-theme/svgs/hide-topleft.svg' + +export default svg({ name: 'IconHideTopleft', component: HideTopleft }) diff --git a/packages/icon/import/index.js b/packages/icon/import/index.js new file mode 100644 index 000000000..f4c1c61cb --- /dev/null +++ b/packages/icon/import/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Import from '@opentiny/vue-theme/svgs/import.svg' + +export default svg({ name: 'IconImport', component: Import }) diff --git a/packages/icon/index.js b/packages/icon/index.js new file mode 100644 index 000000000..57ac76473 --- /dev/null +++ b/packages/icon/index.js @@ -0,0 +1,945 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import IconAdd from './add' +import IconAdministrator from './administrator' +import IconAlignBaseline from './align-baseline' +import IconAlignCenter from './align-center' +import IconAlignFlexCenter from './align-flex-center' +import IconAlignFlexEnd from './align-flex-end' +import IconAlignFlexStart from './align-flex-start' +import IconAlignJustify from './align-justify' +import IconAlignLeft from './align-left' +import IconAlignRight from './align-right' +import IconAlignStretch from './align-stretch' +import IconAngularjs from './angularjs' +import IconApp from './app' +import IconApplication from './application' +import IconAreaChart from './area-chart' +import IconArrowDown from './arrow-down' +import IconArrowLeft from './arrow-left' +import IconArrowRight from './arrow-right' +import IconArrowUp from './arrow-up' +import IconAscending from './ascending' +import IconAssociation from './association' +import IconAttachment from './attachment' +import IconBarChart from './bar-chart' +import IconBefilter from './befilter' +import IconBoat from './boat' +import IconBoxSolid from './box-solid' +import IconBusy from './busy' +import IconCalculator from './calculator' +import IconCalendar from './calendar' +import IconCheckOut from './check-out' +import IconCheck from './check' +import IconCheckedLinear from './checked-linear' +import IconCheckedSur from './checked-sur' +import IconCheckedTrue from './checked-true' +import IconChevronDown from './chevron-down' +import IconChevronLeft from './chevron-left' +import IconChevronRight from './chevron-right' +import IconChevronUp from './chevron-up' +import IconClearFilter from './clear-filter' +import IconClockWork from './clock-work' +import IconCloseCircle from './close-circle' +import IconCloseSquare from './close-square' +import IconClose from './close' +import IconCloudDownload from './cloud-download' +import IconCloudUpload from './cloud-upload' +import IconCode from './code' +import IconCoin from './coin' +import IconColReverse from './col-reverse' +import IconCommission from './commission' +import IconConmentRefresh from './conment-refresh' +import IconCopySolid from './copy-solid' +import IconCopy from './copy' +import IconCourse from './course' +import IconCueL from './cue-l' +import IconCustom from './custom' +import IconCustomerService from './customer-service' +import IconCrop from './crop' +import IconDataSource from './data-source' +import IconDefault from './default' +import IconDefinedFiltration from './defined-filtration' +import IconDel from './del' +import IconDeletePage from './delete-page' +import IconDeleted from './deleted' +import IconDeltaDownO from './delta-down-o' +import IconDeltaDown from './delta-down' +import IconDeltaLeftO from './delta-left-o' +import IconDeltaLeft from './delta-left' +import IconDeltaRightO from './delta-right-o' +import IconDeltaRight from './delta-right' +import IconDeltaUpO from './delta-up-o' +import IconDeltaUp from './delta-up' +import IconDerive from './derive' +import IconDescending from './descending' +import IconDesktopView from './desktop-view' +import IconDialog from './dialog' +import IconDialog2 from './dialog2' +import IconDirectionCol from './direction-col' +import IconDirectionRow from './direction-row' +import IconDotChart from './dot-chart' +import IconDotDownload from './dot-download' +import IconDotIpv4 from './dot-ipv4' +import IconDoubleLeft from './double-left' +import IconDoubleRight from './double-right' +import IconDownO from './down-o' +import IconDown from './down' +import IconDownloadCloud from './download-cloud' +import IconDownloadLink from './download-link' +import IconDownload from './download' +import IconDraft from './draft' +import IconEdit from './edit' +import IconEditorTab from './editor-tab' +import IconEllipsis from './ellipsis' +import IconEmailAdd from './email-add' +import IconEmailCircle from './email-circle' +import IconEnd from './end' +import IconError from './error' +import IconEspaceAuto from './espace-auto' +import IconEspace from './espace' +import IconExcel from './excel' +import IconException from './exception' +import IconExclamation from './exclamation' +import IconExport from './export' +import IconExpressSearch from './express-search' +import IconEyeclose from './eyeclose' +import IconEyeopen from './eyeopen' + +import IconEditorAlignCenter from './editor-align-center' +import IconEditorAlignLeft from './editor-align-left' +import IconEditorAlignRight from './editor-align-right' +import IconEditorBackground from './editor-background' +import IconEditorBold from './editor-bold' +import IconEditorCode from './editor-code' +import IconEditorDeleteline from './editor-deleteline' +import IconEditorEraser from './editor-eraser' +import IconEditorItalic from './editor-italic' +import IconEditorLeftBorder from './editor-left-border' +import IconEditorList from './editor-list' +import IconEditorListDot from './editor-list-dot' +import IconEditorListNum from './editor-list-num' +import IconEditorMenuLeft from './editor-menu-left' +import IconEditorMenuRight from './editor-menu-right' +import IconEditorQuote from './editor-quote' +import IconEditorRedo from './editor-redo' +import IconEditorRightBorder from './editor-right-border' +import IconEditorSub from './editor-sub' +import IconEditorSubtitle from './editor-subtitle' +import IconEditorSuper from './editor-super' +import IconEditorTable from './editor-table' +import IconEditorTextcolor from './editor-textcolor' +import IconEditorTitle from './editor-title' +import IconEditorUnderline from './editor-underline' +import IconEditorUndo from './editor-undo' +import IconEditorVideo from './editor-video' +import IconFileCloudupload from './file-cloudupload' +import IconFileExcel from './file-excel' +import IconFile from './file' +import IconFilesCircle from './files-circle' +import IconFiles from './files' +import IconFiletext from './filetext' +import IconFileupload from './fileupload' +import IconFiltered from './filtered' +import IconFlag from './flag' +import IconFolderClosed from './folder-closed' +import IconFolderOpened from './folder-opened' +import IconFontColor from './font-color' +import IconFontFamily from './font-family' +import IconFontSize from './font-size' +import IconFontStyle from './font-style' +import IconFontWeight from './font-weight' +import IconFreezeLeft from './freeze-left' +import IconFreezeRight from './freeze-right' +import IconFrownO from './frown-o' +import IconFrown from './frown' +import IconFullscreen from './fullscreen' +import IconFullscreenLeft from './fullscreen-left' +import IconGrade from './grade' +import IconGroupTransfer from './group-transfer' +import IconGroup from './group' +import IconHalfchecked from './halfchecked' +import IconHalfselect from './halfselect' +import IconHeartempty from './heartempty' +import IconHelpCircle from './help-circle' +import IconHelpQuery from './help-query' +import IconHelpSolid from './help-solid' +import IconHelp from './help' +import IconHelpful from './helpful' +import IconHideLeft from './hide-left' +import IconHideRight from './hide-right' +import IconHideTopleft from './hide-topleft' +import IconImport from './import' +import IconInfoCircle from './info-circle' +import IconInfoSolid from './info-solid' +import IconInfo from './info' +import IconInformation from './information' +import IconJs from './js' +import IconJusitfyCenter from './jusitfy-center' +import IconJusitfyFlexEnd from './jusitfy-flex-end' +import IconJusitfySpaceAround from './jusitfy-space-around' +import IconJusitfySpaceBetween from './jusitfy-space-between' +import IconJustitfyFlexStart from './justitfy-flex-start' +import IconLanguage from './language' +import IconLeave from './leave' +import IconLeftFrozen from './left-frozen' +import IconLeftO from './left-o' +import IconLeftWard from './left-ward' +import IconLeft from './left' +import IconLineChart from './line-chart' +import IconLineHeight from './line-height' +import IconLineThrought from './line-throught' +import IconLink from './link' +import IconLoading from './loading' +import IconLock from './lock' +import IconMailContent from './mail-content' +import IconMail from './mail' +import IconMale from './male' +import IconMarkOn from './mark-on' +import IconMeh from './meh' +import IconMessageCircle from './message-circle' +import IconMinscreen from './minscreen' +import IconMinscreenLeft from './minscreen-left' +import IconMinusCircle from './minus-circle' +import IconMinusSquare from './minus-square' +import IconMinus from './minus' +import IconMobileView from './mobile-view' +import IconMobile from './mobile' +import IconMore from './more' +import IconNew from './new' +import IconNoPremission from './no-premission' +import IconNodeOpen from './node-open' +import IconNode from './node' +import IconNodejs from './nodejs' +import IconNone from './none' +import IconOffLine from './off-line' +import IconOnLine from './on-line' +import IconOperationfaildL from './operationfaild-l' +import IconOperationfaild from './operationfaild' +import IconOuterLink from './outer-link' +import IconPagelink from './pagelink' +import IconPagerFirst from './pager-first' +import IconPagerLast from './pager-last' +import IconPagerNext from './pager-next' +import IconPagerPrev from './pager-prev' +import IconPanelMax from './panel-max' +import IconPanelMini from './panel-mini' +import IconPanelNormal from './panel-normal' +import IconPauseCircle from './pause-circle' +import IconPause from './pause' +import IconPicture from './picture' +import IconPieChart from './pie-chart' +import IconPlusCircle from './plus-circle' +import IconPlusSquare from './plus-square' +import IconPlus from './plus' +import IconPopup from './popup' +import IconPreChecked from './pre-checked' +import IconPrintPreview from './print-preview' +import IconPushpin from './pushpin' +import IconRadio from './radio' +import IconRadioselected from './radioselected' +import IconReactjs from './reactjs' +import IconRedo from './redo' +import IconRefres from './refres' +import IconRenew from './renew' +import IconRepeat from './repeat' +import IconReplace from './replace' +import IconReplies from './replies' +import IconRightFrozen from './right-frozen' +import IconRightO from './right-o' +import IconRight from './right' +import IconRightward from './rightward' +import IconRowReverse from './row-reverse' +import IconSandwichCollapse from './sandwich-collapse' +import IconSandwichExpand from './sandwich-expand' +import IconSave from './save' +import IconScissor from './scissor' +import IconSearch from './search' +import IconSelect from './select' +import IconSent from './sent' +import IconSeparate from './separate' +import IconSetting from './setting' +import IconShare from './share' +import IconShareArrow from './share-arrow' +import IconShoppingCard from './shopping-card' +import IconSmileO from './smile-o' +import IconSmile from './smile' +import IconSortDefault from './sort-default' +import IconSort from './sort' +import IconStarActive from './star-active' +import IconStarDisable from './star-disable' +import IconStarO from './star-o' +import IconStartCircle from './start-circle' +import IconStart from './start' +import IconStatistics from './statistics' +import IconStop from './stop' +import IconStreamSolid from './stream-solid' +import IconSuccess from './success' +import IconSuccessful from './successful' +import IconTabletView from './tablet-view' +import IconTaskCooperation from './task-cooperation' +import IconTelephoneCircle from './telephone-circle' +import IconTelephone from './telephone' +import IconTextAlign from './text-align' +import IconTextDecoration from './text-decoration' +import IconTextTab from './text-tab' +import IconText from './text' +import IconTime from './time' +import IconTotal from './total' +import IconTriangleDown from './triangle-down' +import IconUndelete from './undelete' +import IconUnderline from './underline' +import IconUndo from './undo' +import IconUnfilter from './unfilter' +import IconUnfreeze from './unfreeze' +import IconUnknow from './unknow' +import IconUnknown from './unknown' +import IconUnlock from './unlock' +import IconUnsent from './unsent' +import IconUpO from './up-o' +import IconUp from './up' +import IconUpload from './upload' +import IconUser from './user' +import IconVersiontree from './versiontree' +import IconView from './view' +import IconVuejs from './vuejs' +import IconWarningTriangle from './warning-triangle' +import IconWarning from './warning' +import IconWebPlus from './web-plus' +import IconWriting from './writing' +import IconYes from './yes' +import IconZoomIn from './zoom-in' +import IconZoomOut from './zoom-out' +export * from './lowercase' +export { + IconAdd, + IconAdministrator, + IconAlignBaseline, + IconAlignCenter, + IconAlignFlexCenter, + IconAlignFlexEnd, + IconAlignFlexStart, + IconAlignJustify, + IconAlignLeft, + IconAlignRight, + IconAlignStretch, + IconAngularjs, + IconApp, + IconApplication, + IconAreaChart, + IconArrowDown, + IconArrowLeft, + IconArrowRight, + IconArrowUp, + IconAscending, + IconAssociation, + IconAttachment, + IconBarChart, + IconBefilter, + IconBoat, + IconBoxSolid, + IconBusy, + IconCalculator, + IconCalendar, + IconCheckOut, + IconCheck, + IconCheckedLinear, + IconCheckedSur, + IconCheckedTrue, + IconChevronDown, + IconChevronLeft, + IconChevronRight, + IconChevronUp, + IconClearFilter, + IconClockWork, + IconCloseCircle, + IconCloseSquare, + IconClose, + IconCloudDownload, + IconCloudUpload, + IconCode, + IconCoin, + IconColReverse, + IconCommission, + IconConmentRefresh, + IconCopySolid, + IconCopy, + IconCrop, + IconCourse, + IconCueL, + IconCustom, + IconCustomerService, + IconDataSource, + IconDefault, + IconDefinedFiltration, + IconDel, + IconDeletePage, + IconDeleted, + IconDeltaDownO, + IconDeltaDown, + IconDeltaLeftO, + IconDeltaLeft, + IconDeltaRightO, + IconDeltaRight, + IconDeltaUpO, + IconDeltaUp, + IconDerive, + IconDescending, + IconDesktopView, + IconDialog, + IconDialog2, + IconDirectionCol, + IconDirectionRow, + IconDotChart, + IconDotDownload, + IconDotIpv4, + IconDoubleLeft, + IconDoubleRight, + IconDownO, + IconDown, + IconDownloadCloud, + IconDownloadLink, + IconDownload, + IconDraft, + IconEdit, + IconEditorTab, + IconEllipsis, + IconEmailAdd, + IconEmailCircle, + IconEnd, + IconError, + IconEspaceAuto, + IconEspace, + IconExcel, + IconException, + IconExclamation, + IconExport, + IconExpressSearch, + IconEyeclose, + IconEyeopen, + IconEditorAlignCenter, + IconEditorAlignLeft, + IconEditorAlignRight, + IconEditorBackground, + IconEditorBold, + IconEditorCode, + IconEditorDeleteline, + IconEditorEraser, + IconEditorItalic, + IconEditorLeftBorder, + IconEditorList, + IconEditorListDot, + IconEditorListNum, + IconEditorMenuLeft, + IconEditorMenuRight, + IconEditorQuote, + IconEditorRedo, + IconEditorRightBorder, + IconEditorSub, + IconEditorSubtitle, + IconEditorSuper, + IconEditorTable, + IconEditorTextcolor, + IconEditorTitle, + IconEditorUnderline, + IconEditorUndo, + IconEditorVideo, + IconFileCloudupload, + IconFileExcel, + IconFile, + IconFilesCircle, + IconFiles, + IconFiletext, + IconFileupload, + IconFiltered, + IconFlag, + IconFolderClosed, + IconFolderOpened, + IconFontColor, + IconFontFamily, + IconFontSize, + IconFontStyle, + IconFontWeight, + IconFreezeLeft, + IconFreezeRight, + IconFrownO, + IconFrown, + IconFullscreen, + IconFullscreenLeft, + IconMinscreenLeft, + IconGrade, + IconGroupTransfer, + IconGroup, + IconHalfchecked, + IconHalfselect, + IconHeartempty, + IconHelpCircle, + IconHelpQuery, + IconHelpSolid, + IconHelp, + IconHelpful, + IconHideLeft, + IconHideRight, + IconHideTopleft, + IconImport, + IconInfoCircle, + IconInfoSolid, + IconInfo, + IconInformation, + IconJs, + IconJusitfyCenter, + IconJusitfyFlexEnd, + IconJusitfySpaceAround, + IconJusitfySpaceBetween, + IconJustitfyFlexStart, + IconLanguage, + IconLeave, + IconLeftFrozen, + IconLeftO, + IconLeftWard, + IconLeft, + IconLineChart, + IconLineHeight, + IconLineThrought, + IconLink, + IconLoading, + IconLock, + IconMailContent, + IconMail, + IconMale, + IconMarkOn, + IconMeh, + IconMessageCircle, + IconMinscreen, + IconMinusCircle, + IconMinusSquare, + IconMinus, + IconMobileView, + IconMobile, + IconMore, + IconNew, + IconNoPremission, + IconNodeOpen, + IconNode, + IconNodejs, + IconNone, + IconOffLine, + IconOnLine, + IconOperationfaildL, + IconOperationfaild, + IconOuterLink, + IconPagelink, + IconPagerFirst, + IconPagerLast, + IconPagerNext, + IconPagerPrev, + IconPanelMax, + IconPanelMini, + IconPanelNormal, + IconPauseCircle, + IconPause, + IconPicture, + IconPieChart, + IconPlusCircle, + IconPlusSquare, + IconPlus, + IconPopup, + IconPreChecked, + IconPrintPreview, + IconPushpin, + IconRadio, + IconRadioselected, + IconReactjs, + IconRedo, + IconRefres, + IconRenew, + IconRepeat, + IconReplace, + IconReplies, + IconRightFrozen, + IconRightO, + IconRight, + IconRightward, + IconRowReverse, + IconSandwichCollapse, + IconSandwichExpand, + IconSave, + IconScissor, + IconSearch, + IconSelect, + IconSent, + IconSeparate, + IconSetting, + IconShare, + IconShareArrow, + IconShoppingCard, + IconSmileO, + IconSmile, + IconSortDefault, + IconSort, + IconStarActive, + IconStarDisable, + IconStarO, + IconStartCircle, + IconStart, + IconStatistics, + IconStop, + IconStreamSolid, + IconSuccess, + IconSuccessful, + IconTabletView, + IconTaskCooperation, + IconTelephoneCircle, + IconTelephone, + IconTextAlign, + IconTextDecoration, + IconTextTab, + IconText, + IconTime, + IconTotal, + IconTriangleDown, + IconUndelete, + IconUnderline, + IconUndo, + IconUnfilter, + IconUnfreeze, + IconUnknow, + IconUnknown, + IconUnlock, + IconUnsent, + IconUpO, + IconUp, + IconUpload, + IconUser, + IconVersiontree, + IconView, + IconVuejs, + IconWarningTriangle, + IconWarning, + IconWebPlus, + IconWriting, + IconYes, + IconZoomIn, + IconZoomOut +} + +export default { + IconAdd, + IconAdministrator, + IconAlignBaseline, + IconAlignCenter, + IconAlignFlexCenter, + IconAlignFlexEnd, + IconAlignFlexStart, + IconAlignJustify, + IconAlignLeft, + IconAlignRight, + IconAlignStretch, + IconAngularjs, + IconApp, + IconApplication, + IconAreaChart, + IconArrowDown, + IconArrowLeft, + IconArrowRight, + IconArrowUp, + IconAscending, + IconAssociation, + IconAttachment, + IconBarChart, + IconBefilter, + IconBoat, + IconBoxSolid, + IconBusy, + IconCalculator, + IconCalendar, + IconCheckOut, + IconCheck, + IconCheckedLinear, + IconCheckedSur, + IconCheckedTrue, + IconChevronDown, + IconChevronLeft, + IconChevronRight, + IconChevronUp, + IconClearFilter, + IconClockWork, + IconCloseCircle, + IconCloseSquare, + IconClose, + IconCloudDownload, + IconCloudUpload, + IconCode, + IconCoin, + IconColReverse, + IconCommission, + IconConmentRefresh, + IconCopySolid, + IconCopy, + IconCourse, + IconCueL, + IconCustom, + IconCustomerService, + IconCrop, + IconDataSource, + IconDefault, + IconDefinedFiltration, + IconDel, + IconDeletePage, + IconDeleted, + IconDeltaDownO, + IconDeltaDown, + IconDeltaLeftO, + IconDeltaLeft, + IconDeltaRightO, + IconDeltaRight, + IconDeltaUpO, + IconDeltaUp, + IconDerive, + IconDescending, + IconDesktopView, + IconDialog, + IconDialog2, + IconDirectionCol, + IconDirectionRow, + IconDotChart, + IconDotDownload, + IconDotIpv4, + IconDoubleLeft, + IconDoubleRight, + IconDownO, + IconDown, + IconDownloadCloud, + IconDownloadLink, + IconDownload, + IconDraft, + IconEdit, + IconEditorTab, + IconEllipsis, + IconEmailAdd, + IconEmailCircle, + IconEnd, + IconError, + IconEspaceAuto, + IconEspace, + IconExcel, + IconException, + IconExclamation, + IconExport, + IconExpressSearch, + IconEyeclose, + IconEyeopen, + IconEditorAlignCenter, + IconEditorAlignLeft, + IconEditorAlignRight, + IconEditorBackground, + IconEditorBold, + IconEditorCode, + IconEditorDeleteline, + IconEditorEraser, + IconEditorItalic, + IconEditorLeftBorder, + IconEditorList, + IconEditorListDot, + IconEditorListNum, + IconEditorMenuLeft, + IconEditorMenuRight, + IconEditorQuote, + IconEditorRedo, + IconEditorRightBorder, + IconEditorSub, + IconEditorSubtitle, + IconEditorSuper, + IconEditorTable, + IconEditorTextcolor, + IconEditorTitle, + IconEditorUnderline, + IconEditorUndo, + IconEditorVideo, + IconFileCloudupload, + IconFileExcel, + IconFile, + IconFilesCircle, + IconFiles, + IconFiletext, + IconFileupload, + IconFiltered, + IconFlag, + IconFolderClosed, + IconFolderOpened, + IconFontColor, + IconFontFamily, + IconFontSize, + IconFontStyle, + IconFontWeight, + IconFreezeLeft, + IconFreezeRight, + IconFrownO, + IconFrown, + IconFullscreen, + IconFullscreenLeft, + IconGrade, + IconGroupTransfer, + IconGroup, + IconHalfchecked, + IconHalfselect, + IconHeartempty, + IconHelpCircle, + IconHelpQuery, + IconHelpSolid, + IconHelp, + IconHelpful, + IconHideLeft, + IconHideRight, + IconHideTopleft, + IconImport, + IconInfoCircle, + IconInfoSolid, + IconInfo, + IconInformation, + IconJs, + IconJusitfyCenter, + IconJusitfyFlexEnd, + IconJusitfySpaceAround, + IconJusitfySpaceBetween, + IconJustitfyFlexStart, + IconLanguage, + IconLeave, + IconLeftFrozen, + IconLeftO, + IconLeftWard, + IconLeft, + IconLineChart, + IconLineHeight, + IconLineThrought, + IconLink, + IconLoading, + IconLock, + IconMailContent, + IconMail, + IconMale, + IconMarkOn, + IconMeh, + IconMessageCircle, + IconMinscreenLeft, + IconMinscreen, + IconMinusCircle, + IconMinusSquare, + IconMinus, + IconMobileView, + IconMobile, + IconMore, + IconNew, + IconNoPremission, + IconNodeOpen, + IconNode, + IconNodejs, + IconNone, + IconOffLine, + IconOnLine, + IconOperationfaildL, + IconOperationfaild, + IconOuterLink, + IconPagelink, + IconPagerFirst, + IconPagerLast, + IconPagerNext, + IconPagerPrev, + IconPanelMax, + IconPanelMini, + IconPanelNormal, + IconPauseCircle, + IconPause, + IconPicture, + IconPieChart, + IconPlusCircle, + IconPlusSquare, + IconPlus, + IconPopup, + IconPreChecked, + IconPrintPreview, + IconPushpin, + IconRadio, + IconRadioselected, + IconReactjs, + IconRedo, + IconRefres, + IconRenew, + IconRepeat, + IconReplace, + IconReplies, + IconRightFrozen, + IconRightO, + IconRight, + IconRightward, + IconRowReverse, + IconSandwichCollapse, + IconSandwichExpand, + IconSave, + IconScissor, + IconSearch, + IconSelect, + IconSent, + IconSeparate, + IconSetting, + IconShare, + IconShareArrow, + IconShoppingCard, + IconSmileO, + IconSmile, + IconSortDefault, + IconSort, + IconStarActive, + IconStarDisable, + IconStarO, + IconStartCircle, + IconStart, + IconStatistics, + IconStop, + IconStreamSolid, + IconSuccess, + IconSuccessful, + IconTabletView, + IconTaskCooperation, + IconTelephoneCircle, + IconTelephone, + IconTextAlign, + IconTextDecoration, + IconTextTab, + IconText, + IconTime, + IconTotal, + IconTriangleDown, + IconUndelete, + IconUnderline, + IconUndo, + IconUnfilter, + IconUnfreeze, + IconUnknow, + IconUnknown, + IconUnlock, + IconUnsent, + IconUpO, + IconUp, + IconUpload, + IconUser, + IconVersiontree, + IconView, + IconVuejs, + IconWarningTriangle, + IconWarning, + IconWebPlus, + IconWriting, + IconYes, + IconZoomIn, + IconZoomOut +} diff --git a/packages/icon/info-circle/index.js b/packages/icon/info-circle/index.js new file mode 100644 index 000000000..ba1c721da --- /dev/null +++ b/packages/icon/info-circle/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import InfoCircle from '@opentiny/vue-theme/svgs/info-circle.svg' + +export default svg({ name: 'IconInfoCircle', component: InfoCircle }) diff --git a/packages/icon/info-solid/index.js b/packages/icon/info-solid/index.js new file mode 100644 index 000000000..bf3d0527c --- /dev/null +++ b/packages/icon/info-solid/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import InfoSolid from '@opentiny/vue-theme/svgs/info-solid.svg' + +export default svg({ name: 'IconInfoSolid', component: InfoSolid }) diff --git a/packages/icon/info/index.js b/packages/icon/info/index.js new file mode 100644 index 000000000..8cbcce1e8 --- /dev/null +++ b/packages/icon/info/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Info from '@opentiny/vue-theme/svgs/info.svg' + +export default svg({ name: 'IconInfo', component: Info }) diff --git a/packages/icon/information/index.js b/packages/icon/information/index.js new file mode 100644 index 000000000..8fcc6112c --- /dev/null +++ b/packages/icon/information/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Information from '@opentiny/vue-theme/svgs/information.svg' + +export default svg({ name: 'IconInformation', component: Information }) diff --git a/packages/icon/js/index.js b/packages/icon/js/index.js new file mode 100644 index 000000000..350a6e971 --- /dev/null +++ b/packages/icon/js/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Js from '@opentiny/vue-theme/svgs/js.svg' + +export default svg({ name: 'IconJs', component: Js }) diff --git a/packages/icon/jusitfy-center/index.js b/packages/icon/jusitfy-center/index.js new file mode 100644 index 000000000..02205d9f0 --- /dev/null +++ b/packages/icon/jusitfy-center/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import JusitfyCenter from '@opentiny/vue-theme/svgs/jusitfy-center.svg' + +export default svg({ name: 'IconJusitfyCenter', component: JusitfyCenter }) diff --git a/packages/icon/jusitfy-flex-end/index.js b/packages/icon/jusitfy-flex-end/index.js new file mode 100644 index 000000000..95ce65be0 --- /dev/null +++ b/packages/icon/jusitfy-flex-end/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import JusitfyFlexEnd from '@opentiny/vue-theme/svgs/jusitfy-flex-end.svg' + +export default svg({ name: 'IconJusitfyFlexEnd', component: JusitfyFlexEnd }) diff --git a/packages/icon/jusitfy-space-around/index.js b/packages/icon/jusitfy-space-around/index.js new file mode 100644 index 000000000..0b21fe08f --- /dev/null +++ b/packages/icon/jusitfy-space-around/index.js @@ -0,0 +1,18 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import JusitfySpaceAround from '@opentiny/vue-theme/svgs/jusitfy-space-around.svg' + +export default svg({ + name: 'IconJusitfySpaceAround', + component: JusitfySpaceAround +}) diff --git a/packages/icon/jusitfy-space-between/index.js b/packages/icon/jusitfy-space-between/index.js new file mode 100644 index 000000000..74e0b5b97 --- /dev/null +++ b/packages/icon/jusitfy-space-between/index.js @@ -0,0 +1,18 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import JusitfySpaceBetween from '@opentiny/vue-theme/svgs/jusitfy-space-between.svg' + +export default svg({ + name: 'IconJusitfySpaceBetween', + component: JusitfySpaceBetween +}) diff --git a/packages/icon/justitfy-flex-start/index.js b/packages/icon/justitfy-flex-start/index.js new file mode 100644 index 000000000..e100448dd --- /dev/null +++ b/packages/icon/justitfy-flex-start/index.js @@ -0,0 +1,18 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import JustitfyFlexStart from '@opentiny/vue-theme/svgs/justitfy-flex-start.svg' + +export default svg({ + name: 'IconJustitfyFlexStart', + component: JustitfyFlexStart +}) diff --git a/packages/icon/language/index.js b/packages/icon/language/index.js new file mode 100644 index 000000000..e203f5046 --- /dev/null +++ b/packages/icon/language/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Language from '@opentiny/vue-theme/svgs/language.svg' + +export default svg({ name: 'IconLanguage', component: Language }) diff --git a/packages/icon/leave/index.js b/packages/icon/leave/index.js new file mode 100644 index 000000000..909cd4213 --- /dev/null +++ b/packages/icon/leave/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Leave from '@opentiny/vue-theme/svgs/leave.svg' + +export default svg({ name: 'IconLeave', component: Leave }) diff --git a/packages/icon/left-frozen/index.js b/packages/icon/left-frozen/index.js new file mode 100644 index 000000000..29c09e0f6 --- /dev/null +++ b/packages/icon/left-frozen/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import LeftFrozen from '@opentiny/vue-theme/svgs/left-frozen.svg' + +export default svg({ name: 'IconLeftFrozen', component: LeftFrozen }) diff --git a/packages/icon/left-o/index.js b/packages/icon/left-o/index.js new file mode 100644 index 000000000..c69c191e4 --- /dev/null +++ b/packages/icon/left-o/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import LeftO from '@opentiny/vue-theme/svgs/left-o.svg' + +export default svg({ name: 'IconLeftO', component: LeftO }) diff --git a/packages/icon/left-ward/index.js b/packages/icon/left-ward/index.js new file mode 100644 index 000000000..fd84c0ae4 --- /dev/null +++ b/packages/icon/left-ward/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import LeftWard from '@opentiny/vue-theme/svgs/left-ward.svg' + +export default svg({ name: 'IconLeftWard', component: LeftWard }) diff --git a/packages/icon/left/index.js b/packages/icon/left/index.js new file mode 100644 index 000000000..1cc1d8750 --- /dev/null +++ b/packages/icon/left/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Left from '@opentiny/vue-theme/svgs/left.svg' + +export default svg({ name: 'IconLeft', component: Left }) diff --git a/packages/icon/line-chart/index.js b/packages/icon/line-chart/index.js new file mode 100644 index 000000000..a7c9701d5 --- /dev/null +++ b/packages/icon/line-chart/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import LineChart from '@opentiny/vue-theme/svgs/line-chart.svg' + +export default svg({ name: 'IconLineChart', component: LineChart }) diff --git a/packages/icon/line-height/index.js b/packages/icon/line-height/index.js new file mode 100644 index 000000000..95de90969 --- /dev/null +++ b/packages/icon/line-height/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import LineHeight from '@opentiny/vue-theme/svgs/line-height.svg' + +export default svg({ name: 'IconLineHeight', component: LineHeight }) diff --git a/packages/icon/line-throught/index.js b/packages/icon/line-throught/index.js new file mode 100644 index 000000000..1458afb55 --- /dev/null +++ b/packages/icon/line-throught/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import LineThrought from '@opentiny/vue-theme/svgs/line-throught.svg' + +export default svg({ name: 'IconLineThrought', component: LineThrought }) diff --git a/packages/icon/link/index.js b/packages/icon/link/index.js new file mode 100644 index 000000000..b1a6ae81a --- /dev/null +++ b/packages/icon/link/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Link from '@opentiny/vue-theme/svgs/link.svg' + +export default svg({ name: 'IconLink', component: Link }) diff --git a/packages/icon/loading/index.js b/packages/icon/loading/index.js new file mode 100644 index 000000000..fc095d91e --- /dev/null +++ b/packages/icon/loading/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Loading from '@opentiny/vue-theme/svgs/loading.svg' + +export default svg({ name: 'IconLoading', component: Loading }) diff --git a/packages/icon/lock/index.js b/packages/icon/lock/index.js new file mode 100644 index 000000000..d2fb95a87 --- /dev/null +++ b/packages/icon/lock/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Lock from '@opentiny/vue-theme/svgs/lock.svg' + +export default svg({ name: 'IconLock', component: Lock }) diff --git a/packages/icon/lowercase.js b/packages/icon/lowercase.js new file mode 100644 index 000000000..a12434794 --- /dev/null +++ b/packages/icon/lowercase.js @@ -0,0 +1,944 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import iconAdd from './add' +import iconAdministrator from './administrator' +import iconAlignBaseline from './align-baseline' +import iconAlignCenter from './align-center' +import iconAlignFlexCenter from './align-flex-center' +import iconAlignFlexEnd from './align-flex-end' +import iconAlignFlexStart from './align-flex-start' +import iconAlignJustify from './align-justify' +import iconAlignLeft from './align-left' +import iconAlignRight from './align-right' +import iconAlignStretch from './align-stretch' +import iconAngularjs from './angularjs' +import iconApp from './app' +import iconApplication from './application' +import iconAreaChart from './area-chart' +import iconArrowDown from './arrow-down' +import iconArrowLeft from './arrow-left' +import iconArrowRight from './arrow-right' +import iconArrowUp from './arrow-up' +import iconAscending from './ascending' +import iconAssociation from './association' +import iconAttachment from './attachment' +import iconBarChart from './bar-chart' +import iconBefilter from './befilter' +import iconBoat from './boat' +import iconBoxSolid from './box-solid' +import iconBusy from './busy' +import iconCalculator from './calculator' +import iconCalendar from './calendar' +import iconCheckOut from './check-out' +import iconCheck from './check' +import iconCheckedLinear from './checked-linear' +import iconCheckedSur from './checked-sur' +import iconCheckedTrue from './checked-true' +import iconChevronDown from './chevron-down' +import iconChevronLeft from './chevron-left' +import iconChevronRight from './chevron-right' +import iconChevronUp from './chevron-up' +import iconClearFilter from './clear-filter' +import iconClockWork from './clock-work' +import iconCloseCircle from './close-circle' +import iconCloseSquare from './close-square' +import iconClose from './close' +import iconCloudDownload from './cloud-download' +import iconCloudUpload from './cloud-upload' +import iconCode from './code' +import iconCoin from './coin' +import iconColReverse from './col-reverse' +import iconCommission from './commission' +import iconConmentRefresh from './conment-refresh' +import iconCopySolid from './copy-solid' +import iconCopy from './copy' +import iconCourse from './course' +import iconCueL from './cue-l' +import iconCustom from './custom' +import iconCustomerService from './customer-service' +import iconCrop from './crop' +import iconDataSource from './data-source' +import iconDefault from './default' +import iconDefinedFiltration from './defined-filtration' +import iconDel from './del' +import iconDeletePage from './delete-page' +import iconDeleted from './deleted' +import iconDeltaDownO from './delta-down-o' +import iconDeltaDown from './delta-down' +import iconDeltaLeftO from './delta-left-o' +import iconDeltaLeft from './delta-left' +import iconDeltaRightO from './delta-right-o' +import iconDeltaRight from './delta-right' +import iconDeltaUpO from './delta-up-o' +import iconDeltaUp from './delta-up' +import iconDerive from './derive' +import iconDescending from './descending' +import iconDesktopView from './desktop-view' +import iconDialog from './dialog' +import iconDialog2 from './dialog2' +import iconDirectionCol from './direction-col' +import iconDirectionRow from './direction-row' +import iconDotChart from './dot-chart' +import iconDotDownload from './dot-download' +import iconDotIpv4 from './dot-ipv4' +import iconDoubleLeft from './double-left' +import iconDoubleRight from './double-right' +import iconDownO from './down-o' +import iconDown from './down' +import iconDownloadCloud from './download-cloud' +import iconDownloadLink from './download-link' +import iconDownload from './download' +import iconDraft from './draft' +import iconEdit from './edit' +import iconEditorTab from './editor-tab' +import iconEllipsis from './ellipsis' +import iconEmailAdd from './email-add' +import iconEmailCircle from './email-circle' +import iconEnd from './end' +import iconError from './error' +import iconEspaceAuto from './espace-auto' +import iconEspace from './espace' +import iconExcel from './excel' +import iconException from './exception' +import iconExclamation from './exclamation' +import iconExport from './export' +import iconExpressSearch from './express-search' +import iconEyeclose from './eyeclose' +import iconEyeopen from './eyeopen' + +import iconEditorAlignCenter from './editor-align-center' +import iconEditorAlignLeft from './editor-align-left' +import iconEditorAlignRight from './editor-align-right' +import iconEditorBackground from './editor-background' +import iconEditorBold from './editor-bold' +import iconEditorCode from './editor-code' +import iconEditorDeleteline from './editor-deleteline' +import iconEditorEraser from './editor-eraser' +import iconEditorItalic from './editor-italic' +import iconEditorLeftBorder from './editor-left-border' +import iconEditorList from './editor-list' +import iconEditorListDot from './editor-list-dot' +import iconEditorListNum from './editor-list-num' +import iconEditorMenuLeft from './editor-menu-left' +import iconEditorMenuRight from './editor-menu-right' +import iconEditorQuote from './editor-quote' +import iconEditorRedo from './editor-redo' +import iconEditorRightBorder from './editor-right-border' +import iconEditorSub from './editor-sub' +import iconEditorSubtitle from './editor-subtitle' +import iconEditorSuper from './editor-super' +import iconEditorTable from './editor-table' +import iconEditorTextcolor from './editor-textcolor' +import iconEditorTitle from './editor-title' +import iconEditorUnderline from './editor-underline' +import iconEditorUndo from './editor-undo' +import iconEditorVideo from './editor-video' +import iconFileCloudupload from './file-cloudupload' +import iconFileExcel from './file-excel' +import iconFile from './file' +import iconFilesCircle from './files-circle' +import iconFiles from './files' +import iconFiletext from './filetext' +import iconFileupload from './fileupload' +import iconFiltered from './filtered' +import iconFlag from './flag' +import iconFolderClosed from './folder-closed' +import iconFolderOpened from './folder-opened' +import iconFontColor from './font-color' +import iconFontFamily from './font-family' +import iconFontSize from './font-size' +import iconFontStyle from './font-style' +import iconFontWeight from './font-weight' +import iconFreezeLeft from './freeze-left' +import iconFreezeRight from './freeze-right' +import iconFrownO from './frown-o' +import iconFrown from './frown' +import iconFullscreen from './fullscreen' +import iconFullscreenLeft from './fullscreen-left' +import iconGrade from './grade' +import iconGroupTransfer from './group-transfer' +import iconGroup from './group' +import iconHalfchecked from './halfchecked' +import iconHalfselect from './halfselect' +import iconHeartempty from './heartempty' +import iconHelpCircle from './help-circle' +import iconHelpQuery from './help-query' +import iconHelpSolid from './help-solid' +import iconHelp from './help' +import iconHelpful from './helpful' +import iconHideLeft from './hide-left' +import iconHideRight from './hide-right' +import iconHideTopleft from './hide-topleft' +import iconImport from './import' +import iconInfoCircle from './info-circle' +import iconInfoSolid from './info-solid' +import iconInfo from './info' +import iconInformation from './information' +import iconJs from './js' +import iconJusitfyCenter from './jusitfy-center' +import iconJusitfyFlexEnd from './jusitfy-flex-end' +import iconJusitfySpaceAround from './jusitfy-space-around' +import iconJusitfySpaceBetween from './jusitfy-space-between' +import iconJustitfyFlexStart from './justitfy-flex-start' +import iconLanguage from './language' +import iconLeave from './leave' +import iconLeftFrozen from './left-frozen' +import iconLeftO from './left-o' +import iconLeftWard from './left-ward' +import iconLeft from './left' +import iconLineChart from './line-chart' +import iconLineHeight from './line-height' +import iconLineThrought from './line-throught' +import iconLink from './link' +import iconLoading from './loading' +import iconLock from './lock' +import iconMailContent from './mail-content' +import iconMail from './mail' +import iconMale from './male' +import iconMarkOn from './mark-on' +import iconMeh from './meh' +import iconMessageCircle from './message-circle' +import iconMinscreen from './minscreen' +import iconMinscreenLeft from './minscreen-left' +import iconMinusCircle from './minus-circle' +import iconMinusSquare from './minus-square' +import iconMinus from './minus' +import iconMobileView from './mobile-view' +import iconMobile from './mobile' +import iconMore from './more' +import iconNew from './new' +import iconNoPremission from './no-premission' +import iconNodeOpen from './node-open' +import iconNode from './node' +import iconNodejs from './nodejs' +import iconNone from './none' +import iconOffLine from './off-line' +import iconOnLine from './on-line' +import iconOperationfaildL from './operationfaild-l' +import iconOperationfaild from './operationfaild' +import iconOuterLink from './outer-link' +import iconPagelink from './pagelink' +import iconPagerFirst from './pager-first' +import iconPagerLast from './pager-last' +import iconPagerNext from './pager-next' +import iconPagerPrev from './pager-prev' +import iconPanelMax from './panel-max' +import iconPanelMini from './panel-mini' +import iconPanelNormal from './panel-normal' +import iconPauseCircle from './pause-circle' +import iconPause from './pause' +import iconPicture from './picture' +import iconPieChart from './pie-chart' +import iconPlusCircle from './plus-circle' +import iconPlusSquare from './plus-square' +import iconPlus from './plus' +import iconPopup from './popup' +import iconPreChecked from './pre-checked' +import iconPrintPreview from './print-preview' +import iconPushpin from './pushpin' +import iconRadio from './radio' +import iconRadioselected from './radioselected' +import iconReactjs from './reactjs' +import iconRedo from './redo' +import iconRefres from './refres' +import iconRenew from './renew' +import iconRepeat from './repeat' +import iconReplace from './replace' +import iconReplies from './replies' +import iconRightFrozen from './right-frozen' +import iconRightO from './right-o' +import iconRight from './right' +import iconRightward from './rightward' +import iconRowReverse from './row-reverse' +import iconSandwichCollapse from './sandwich-collapse' +import iconSandwichExpand from './sandwich-expand' +import iconSave from './save' +import iconScissor from './scissor' +import iconSearch from './search' +import iconSelect from './select' +import iconSent from './sent' +import iconSeparate from './separate' +import iconSetting from './setting' +import iconShare from './share' +import iconShareArrow from './share-arrow' +import iconShoppingCard from './shopping-card' +import iconSmileO from './smile-o' +import iconSmile from './smile' +import iconSortDefault from './sort-default' +import iconSort from './sort' +import iconStarActive from './star-active' +import iconStarDisable from './star-disable' +import iconStarO from './star-o' +import iconStartCircle from './start-circle' +import iconStart from './start' +import iconStatistics from './statistics' +import iconStop from './stop' +import iconStreamSolid from './stream-solid' +import iconSuccess from './success' +import iconSuccessful from './successful' +import iconTabletView from './tablet-view' +import iconTaskCooperation from './task-cooperation' +import iconTelephoneCircle from './telephone-circle' +import iconTelephone from './telephone' +import iconTextAlign from './text-align' +import iconTextDecoration from './text-decoration' +import iconTextTab from './text-tab' +import iconText from './text' +import iconTime from './time' +import iconTotal from './total' +import iconTriangleDown from './triangle-down' +import iconUndelete from './undelete' +import iconUnderline from './underline' +import iconUndo from './undo' +import iconUnfilter from './unfilter' +import iconUnfreeze from './unfreeze' +import iconUnknow from './unknow' +import iconUnknown from './unknown' +import iconUnlock from './unlock' +import iconUnsent from './unsent' +import iconUpO from './up-o' +import iconUp from './up' +import iconUpload from './upload' +import iconUser from './user' +import iconVersiontree from './versiontree' +import iconView from './view' +import iconVuejs from './vuejs' +import iconWarningTriangle from './warning-triangle' +import iconWarning from './warning' +import iconWebPlus from './web-plus' +import iconWriting from './writing' +import iconYes from './yes' +import iconZoomIn from './zoom-in' +import iconZoomOut from './zoom-out' +export { + iconAdd, + iconAdministrator, + iconAlignBaseline, + iconAlignCenter, + iconAlignFlexCenter, + iconAlignFlexEnd, + iconAlignFlexStart, + iconAlignJustify, + iconAlignLeft, + iconAlignRight, + iconAlignStretch, + iconAngularjs, + iconApp, + iconApplication, + iconAreaChart, + iconArrowDown, + iconArrowLeft, + iconArrowRight, + iconArrowUp, + iconAscending, + iconAssociation, + iconAttachment, + iconBarChart, + iconBefilter, + iconBoat, + iconBoxSolid, + iconBusy, + iconCalculator, + iconCalendar, + iconCheckOut, + iconCheck, + iconCheckedLinear, + iconCheckedSur, + iconCheckedTrue, + iconChevronDown, + iconChevronLeft, + iconChevronRight, + iconChevronUp, + iconClearFilter, + iconClockWork, + iconCloseCircle, + iconCloseSquare, + iconClose, + iconCloudDownload, + iconCloudUpload, + iconCode, + iconCoin, + iconColReverse, + iconCommission, + iconConmentRefresh, + iconCopySolid, + iconCopy, + iconCrop, + iconCourse, + iconCueL, + iconCustom, + iconCustomerService, + iconDataSource, + iconDefault, + iconDefinedFiltration, + iconDel, + iconDeletePage, + iconDeleted, + iconDeltaDownO, + iconDeltaDown, + iconDeltaLeftO, + iconDeltaLeft, + iconDeltaRightO, + iconDeltaRight, + iconDeltaUpO, + iconDeltaUp, + iconDerive, + iconDescending, + iconDesktopView, + iconDialog, + iconDialog2, + iconDirectionCol, + iconDirectionRow, + iconDotChart, + iconDotDownload, + iconDotIpv4, + iconDoubleLeft, + iconDoubleRight, + iconDownO, + iconDown, + iconDownloadCloud, + iconDownloadLink, + iconDownload, + iconDraft, + iconEdit, + iconEditorTab, + iconEllipsis, + iconEmailAdd, + iconEmailCircle, + iconEnd, + iconError, + iconEspaceAuto, + iconEspace, + iconExcel, + iconException, + iconExclamation, + iconExport, + iconExpressSearch, + iconEyeclose, + iconEyeopen, + iconEditorAlignCenter, + iconEditorAlignLeft, + iconEditorAlignRight, + iconEditorBackground, + iconEditorBold, + iconEditorCode, + iconEditorDeleteline, + iconEditorEraser, + iconEditorItalic, + iconEditorLeftBorder, + iconEditorList, + iconEditorListDot, + iconEditorListNum, + iconEditorMenuLeft, + iconEditorMenuRight, + iconEditorQuote, + iconEditorRedo, + iconEditorRightBorder, + iconEditorSub, + iconEditorSubtitle, + iconEditorSuper, + iconEditorTable, + iconEditorTextcolor, + iconEditorTitle, + iconEditorUnderline, + iconEditorUndo, + iconEditorVideo, + iconFileCloudupload, + iconFileExcel, + iconFile, + iconFilesCircle, + iconFiles, + iconFiletext, + iconFileupload, + iconFiltered, + iconFlag, + iconFolderClosed, + iconFolderOpened, + iconFontColor, + iconFontFamily, + iconFontSize, + iconFontStyle, + iconFontWeight, + iconFreezeLeft, + iconFreezeRight, + iconFrownO, + iconFrown, + iconFullscreen, + iconFullscreenLeft, + iconMinscreenLeft, + iconGrade, + iconGroupTransfer, + iconGroup, + iconHalfchecked, + iconHalfselect, + iconHeartempty, + iconHelpCircle, + iconHelpQuery, + iconHelpSolid, + iconHelp, + iconHelpful, + iconHideLeft, + iconHideRight, + iconHideTopleft, + iconImport, + iconInfoCircle, + iconInfoSolid, + iconInfo, + iconInformation, + iconJs, + iconJusitfyCenter, + iconJusitfyFlexEnd, + iconJusitfySpaceAround, + iconJusitfySpaceBetween, + iconJustitfyFlexStart, + iconLanguage, + iconLeave, + iconLeftFrozen, + iconLeftO, + iconLeftWard, + iconLeft, + iconLineChart, + iconLineHeight, + iconLineThrought, + iconLink, + iconLoading, + iconLock, + iconMailContent, + iconMail, + iconMale, + iconMarkOn, + iconMeh, + iconMessageCircle, + iconMinscreen, + iconMinusCircle, + iconMinusSquare, + iconMinus, + iconMobileView, + iconMobile, + iconMore, + iconNew, + iconNoPremission, + iconNodeOpen, + iconNode, + iconNodejs, + iconNone, + iconOffLine, + iconOnLine, + iconOperationfaildL, + iconOperationfaild, + iconOuterLink, + iconPagelink, + iconPagerFirst, + iconPagerLast, + iconPagerNext, + iconPagerPrev, + iconPanelMax, + iconPanelMini, + iconPanelNormal, + iconPauseCircle, + iconPause, + iconPicture, + iconPieChart, + iconPlusCircle, + iconPlusSquare, + iconPlus, + iconPopup, + iconPreChecked, + iconPrintPreview, + iconPushpin, + iconRadio, + iconRadioselected, + iconReactjs, + iconRedo, + iconRefres, + iconRenew, + iconRepeat, + iconReplace, + iconReplies, + iconRightFrozen, + iconRightO, + iconRight, + iconRightward, + iconRowReverse, + iconSandwichCollapse, + iconSandwichExpand, + iconSave, + iconScissor, + iconSearch, + iconSelect, + iconSent, + iconSeparate, + iconSetting, + iconShare, + iconShareArrow, + iconShoppingCard, + iconSmileO, + iconSmile, + iconSortDefault, + iconSort, + iconStarActive, + iconStarDisable, + iconStarO, + iconStartCircle, + iconStart, + iconStatistics, + iconStop, + iconStreamSolid, + iconSuccess, + iconSuccessful, + iconTabletView, + iconTaskCooperation, + iconTelephoneCircle, + iconTelephone, + iconTextAlign, + iconTextDecoration, + iconTextTab, + iconText, + iconTime, + iconTotal, + iconTriangleDown, + iconUndelete, + iconUnderline, + iconUndo, + iconUnfilter, + iconUnfreeze, + iconUnknow, + iconUnknown, + iconUnlock, + iconUnsent, + iconUpO, + iconUp, + iconUpload, + iconUser, + iconVersiontree, + iconView, + iconVuejs, + iconWarningTriangle, + iconWarning, + iconWebPlus, + iconWriting, + iconYes, + iconZoomIn, + iconZoomOut +} + +export default { + iconAdd, + iconAdministrator, + iconAlignBaseline, + iconAlignCenter, + iconAlignFlexCenter, + iconAlignFlexEnd, + iconAlignFlexStart, + iconAlignJustify, + iconAlignLeft, + iconAlignRight, + iconAlignStretch, + iconAngularjs, + iconApp, + iconApplication, + iconAreaChart, + iconArrowDown, + iconArrowLeft, + iconArrowRight, + iconArrowUp, + iconAscending, + iconAssociation, + iconAttachment, + iconBarChart, + iconBefilter, + iconBoat, + iconBoxSolid, + iconBusy, + iconCalculator, + iconCalendar, + iconCheckOut, + iconCheck, + iconCheckedLinear, + iconCheckedSur, + iconCheckedTrue, + iconChevronDown, + iconChevronLeft, + iconChevronRight, + iconChevronUp, + iconClearFilter, + iconClockWork, + iconCloseCircle, + iconCloseSquare, + iconClose, + iconCloudDownload, + iconCloudUpload, + iconCode, + iconCoin, + iconColReverse, + iconCommission, + iconConmentRefresh, + iconCopySolid, + iconCopy, + iconCourse, + iconCueL, + iconCustom, + iconCustomerService, + iconCrop, + iconDataSource, + iconDefault, + iconDefinedFiltration, + iconDel, + iconDeletePage, + iconDeleted, + iconDeltaDownO, + iconDeltaDown, + iconDeltaLeftO, + iconDeltaLeft, + iconDeltaRightO, + iconDeltaRight, + iconDeltaUpO, + iconDeltaUp, + iconDerive, + iconDescending, + iconDesktopView, + iconDialog, + iconDialog2, + iconDirectionCol, + iconDirectionRow, + iconDotChart, + iconDotDownload, + iconDotIpv4, + iconDoubleLeft, + iconDoubleRight, + iconDownO, + iconDown, + iconDownloadCloud, + iconDownloadLink, + iconDownload, + iconDraft, + iconEdit, + iconEditorTab, + iconEllipsis, + iconEmailAdd, + iconEmailCircle, + iconEnd, + iconError, + iconEspaceAuto, + iconEspace, + iconExcel, + iconException, + iconExclamation, + iconExport, + iconExpressSearch, + iconEyeclose, + iconEyeopen, + iconEditorAlignCenter, + iconEditorAlignLeft, + iconEditorAlignRight, + iconEditorBackground, + iconEditorBold, + iconEditorCode, + iconEditorDeleteline, + iconEditorEraser, + iconEditorItalic, + iconEditorLeftBorder, + iconEditorList, + iconEditorListDot, + iconEditorListNum, + iconEditorMenuLeft, + iconEditorMenuRight, + iconEditorQuote, + iconEditorRedo, + iconEditorRightBorder, + iconEditorSub, + iconEditorSubtitle, + iconEditorSuper, + iconEditorTable, + iconEditorTextcolor, + iconEditorTitle, + iconEditorUnderline, + iconEditorUndo, + iconEditorVideo, + iconFileCloudupload, + iconFileExcel, + iconFile, + iconFilesCircle, + iconFiles, + iconFiletext, + iconFileupload, + iconFiltered, + iconFlag, + iconFolderClosed, + iconFolderOpened, + iconFontColor, + iconFontFamily, + iconFontSize, + iconFontStyle, + iconFontWeight, + iconFreezeLeft, + iconFreezeRight, + iconFrownO, + iconFrown, + iconFullscreen, + iconFullscreenLeft, + iconGrade, + iconGroupTransfer, + iconGroup, + iconHalfchecked, + iconHalfselect, + iconHeartempty, + iconHelpCircle, + iconHelpQuery, + iconHelpSolid, + iconHelp, + iconHelpful, + iconHideLeft, + iconHideRight, + iconHideTopleft, + iconImport, + iconInfoCircle, + iconInfoSolid, + iconInfo, + iconInformation, + iconJs, + iconJusitfyCenter, + iconJusitfyFlexEnd, + iconJusitfySpaceAround, + iconJusitfySpaceBetween, + iconJustitfyFlexStart, + iconLanguage, + iconLeave, + iconLeftFrozen, + iconLeftO, + iconLeftWard, + iconLeft, + iconLineChart, + iconLineHeight, + iconLineThrought, + iconLink, + iconLoading, + iconLock, + iconMailContent, + iconMail, + iconMale, + iconMarkOn, + iconMeh, + iconMessageCircle, + iconMinscreenLeft, + iconMinscreen, + iconMinusCircle, + iconMinusSquare, + iconMinus, + iconMobileView, + iconMobile, + iconMore, + iconNew, + iconNoPremission, + iconNodeOpen, + iconNode, + iconNodejs, + iconNone, + iconOffLine, + iconOnLine, + iconOperationfaildL, + iconOperationfaild, + iconOuterLink, + iconPagelink, + iconPagerFirst, + iconPagerLast, + iconPagerNext, + iconPagerPrev, + iconPanelMax, + iconPanelMini, + iconPanelNormal, + iconPauseCircle, + iconPause, + iconPicture, + iconPieChart, + iconPlusCircle, + iconPlusSquare, + iconPlus, + iconPopup, + iconPreChecked, + iconPrintPreview, + iconPushpin, + iconRadio, + iconRadioselected, + iconReactjs, + iconRedo, + iconRefres, + iconRenew, + iconRepeat, + iconReplace, + iconReplies, + iconRightFrozen, + iconRightO, + iconRight, + iconRightward, + iconRowReverse, + iconSandwichCollapse, + iconSandwichExpand, + iconSave, + iconScissor, + iconSearch, + iconSelect, + iconSent, + iconSeparate, + iconSetting, + iconShare, + iconShareArrow, + iconShoppingCard, + iconSmileO, + iconSmile, + iconSortDefault, + iconSort, + iconStarActive, + iconStarDisable, + iconStarO, + iconStartCircle, + iconStart, + iconStatistics, + iconStop, + iconStreamSolid, + iconSuccess, + iconSuccessful, + iconTabletView, + iconTaskCooperation, + iconTelephoneCircle, + iconTelephone, + iconTextAlign, + iconTextDecoration, + iconTextTab, + iconText, + iconTime, + iconTotal, + iconTriangleDown, + iconUndelete, + iconUnderline, + iconUndo, + iconUnfilter, + iconUnfreeze, + iconUnknow, + iconUnknown, + iconUnlock, + iconUnsent, + iconUpO, + iconUp, + iconUpload, + iconUser, + iconVersiontree, + iconView, + iconVuejs, + iconWarningTriangle, + iconWarning, + iconWebPlus, + iconWriting, + iconYes, + iconZoomIn, + iconZoomOut +} diff --git a/packages/icon/mail-content/index.js b/packages/icon/mail-content/index.js new file mode 100644 index 000000000..f13ccaba5 --- /dev/null +++ b/packages/icon/mail-content/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import MailContent from '@opentiny/vue-theme/svgs/mail-content.svg' + +export default svg({ name: 'IconMailContent', component: MailContent }) diff --git a/packages/icon/mail/index.js b/packages/icon/mail/index.js new file mode 100644 index 000000000..740a86f4c --- /dev/null +++ b/packages/icon/mail/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Mail from '@opentiny/vue-theme/svgs/mail.svg' + +export default svg({ name: 'IconMail', component: Mail }) diff --git a/packages/icon/male/index.js b/packages/icon/male/index.js new file mode 100644 index 000000000..c3ca983d3 --- /dev/null +++ b/packages/icon/male/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Male from '@opentiny/vue-theme/svgs/male.svg' + +export default svg({ name: 'IconMale', component: Male }) diff --git a/packages/icon/mark-on/index.js b/packages/icon/mark-on/index.js new file mode 100644 index 000000000..e6c56b91e --- /dev/null +++ b/packages/icon/mark-on/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import MarkOn from '@opentiny/vue-theme/svgs/mark-on.svg' + +export default svg({ name: 'IconMarkOn', component: MarkOn }) diff --git a/packages/icon/meh/index.js b/packages/icon/meh/index.js new file mode 100644 index 000000000..d7d083908 --- /dev/null +++ b/packages/icon/meh/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Meh from '@opentiny/vue-theme/svgs/meh.svg' + +export default svg({ name: 'IconMeh', component: Meh }) diff --git a/packages/icon/message-circle/index.js b/packages/icon/message-circle/index.js new file mode 100644 index 000000000..34d1f2822 --- /dev/null +++ b/packages/icon/message-circle/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import MessageCircle from '@opentiny/vue-theme/svgs/message-circle.svg' + +export default svg({ name: 'IconMessageCircle', component: MessageCircle }) diff --git a/packages/icon/minscreen-left/index.js b/packages/icon/minscreen-left/index.js new file mode 100644 index 000000000..4e29aed7e --- /dev/null +++ b/packages/icon/minscreen-left/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import MinscreenLeft from '@opentiny/vue-theme/svgs/minscreen-left.svg' + +export default svg({ name: 'IconMinscreenLeft', component: MinscreenLeft }) diff --git a/packages/icon/minscreen/index.js b/packages/icon/minscreen/index.js new file mode 100644 index 000000000..a58cd2d30 --- /dev/null +++ b/packages/icon/minscreen/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Minscreen from '@opentiny/vue-theme/svgs/minscreen.svg' + +export default svg({ name: 'IconMinscreen', component: Minscreen }) diff --git a/packages/icon/minus-circle/index.js b/packages/icon/minus-circle/index.js new file mode 100644 index 000000000..7a3479cf2 --- /dev/null +++ b/packages/icon/minus-circle/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import MinusCircle from '@opentiny/vue-theme/svgs/minus-circle.svg' + +export default svg({ name: 'IconMinusCircle', component: MinusCircle }) diff --git a/packages/icon/minus-square/index.js b/packages/icon/minus-square/index.js new file mode 100644 index 000000000..0e0493dba --- /dev/null +++ b/packages/icon/minus-square/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import MinusSquare from '@opentiny/vue-theme/svgs/minus-square.svg' + +export default svg({ name: 'IconMinusSquare', component: MinusSquare }) diff --git a/packages/icon/minus/index.js b/packages/icon/minus/index.js new file mode 100644 index 000000000..478992d7a --- /dev/null +++ b/packages/icon/minus/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Minus from '@opentiny/vue-theme/svgs/minus.svg' + +export default svg({ name: 'IconMinus', component: Minus }) diff --git a/packages/icon/mobile-view/index.js b/packages/icon/mobile-view/index.js new file mode 100644 index 000000000..8fd94f403 --- /dev/null +++ b/packages/icon/mobile-view/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import MobileView from '@opentiny/vue-theme/svgs/mobile-view.svg' + +export default svg({ name: 'IconMobileView', component: MobileView }) diff --git a/packages/icon/mobile/index.js b/packages/icon/mobile/index.js new file mode 100644 index 000000000..bb1369044 --- /dev/null +++ b/packages/icon/mobile/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Mobile from '@opentiny/vue-theme/svgs/mobile.svg' + +export default svg({ name: 'IconMobile', component: Mobile }) diff --git a/packages/icon/more/index.js b/packages/icon/more/index.js new file mode 100644 index 000000000..9ab727ff3 --- /dev/null +++ b/packages/icon/more/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import More from '@opentiny/vue-theme/svgs/more.svg' + +export default svg({ name: 'IconMore', component: More }) diff --git a/packages/icon/new/index.js b/packages/icon/new/index.js new file mode 100644 index 000000000..d1832c5c9 --- /dev/null +++ b/packages/icon/new/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import New from '@opentiny/vue-theme/svgs/new.svg' + +export default svg({ name: 'IconNew', component: New }) diff --git a/packages/icon/no-premission/index.js b/packages/icon/no-premission/index.js new file mode 100644 index 000000000..a7b60ee44 --- /dev/null +++ b/packages/icon/no-premission/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import NoPremission from '@opentiny/vue-theme/svgs/no-premission.svg' + +export default svg({ name: 'IconNoPremission', component: NoPremission }) diff --git a/packages/icon/node-open/index.js b/packages/icon/node-open/index.js new file mode 100644 index 000000000..a39230f2e --- /dev/null +++ b/packages/icon/node-open/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import NodeOpen from '@opentiny/vue-theme/svgs/node-open.svg' + +export default svg({ name: 'IconNodeOpen', component: NodeOpen }) diff --git a/packages/icon/node/index.js b/packages/icon/node/index.js new file mode 100644 index 000000000..485cfa55a --- /dev/null +++ b/packages/icon/node/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Node from '@opentiny/vue-theme/svgs/node.svg' + +export default svg({ name: 'IconNode', component: Node }) diff --git a/packages/icon/nodejs/index.js b/packages/icon/nodejs/index.js new file mode 100644 index 000000000..10f6320f8 --- /dev/null +++ b/packages/icon/nodejs/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Nodejs from '@opentiny/vue-theme/svgs/nodejs.svg' + +export default svg({ name: 'IconNodejs', component: Nodejs }) diff --git a/packages/icon/none/index.js b/packages/icon/none/index.js new file mode 100644 index 000000000..96efd4c25 --- /dev/null +++ b/packages/icon/none/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import None from '@opentiny/vue-theme/svgs/none.svg' + +export default svg({ name: 'IconNone', component: None }) diff --git a/packages/icon/off-line/index.js b/packages/icon/off-line/index.js new file mode 100644 index 000000000..796acba3b --- /dev/null +++ b/packages/icon/off-line/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import OffLine from '@opentiny/vue-theme/svgs/off-line.svg' + +export default svg({ name: 'IconOffLine', component: OffLine }) diff --git a/packages/icon/on-line/index.js b/packages/icon/on-line/index.js new file mode 100644 index 000000000..70ed2df57 --- /dev/null +++ b/packages/icon/on-line/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import OnLine from '@opentiny/vue-theme/svgs/on-line.svg' + +export default svg({ name: 'IconOnLine', component: OnLine }) diff --git a/packages/icon/operationfaild-l/index.js b/packages/icon/operationfaild-l/index.js new file mode 100644 index 000000000..95008a643 --- /dev/null +++ b/packages/icon/operationfaild-l/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import OperationfaildL from '@opentiny/vue-theme/svgs/operationfaild-l.svg' + +export default svg({ name: 'IconOperationfaildL', component: OperationfaildL }) diff --git a/packages/icon/operationfaild/index.js b/packages/icon/operationfaild/index.js new file mode 100644 index 000000000..5ff44603e --- /dev/null +++ b/packages/icon/operationfaild/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Operationfaild from '@opentiny/vue-theme/svgs/operationfaild.svg' + +export default svg({ name: 'IconOperationfaild', component: Operationfaild }) diff --git a/packages/icon/outer-link/index.js b/packages/icon/outer-link/index.js new file mode 100644 index 000000000..c92c66ceb --- /dev/null +++ b/packages/icon/outer-link/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import OuterLink from '@opentiny/vue-theme/svgs/outer-link.svg' + +export default svg({ name: 'IconOuterLink', component: OuterLink }) diff --git a/packages/icon/package.json b/packages/icon/package.json new file mode 100644 index 000000000..8ace4c8b2 --- /dev/null +++ b/packages/icon/package.json @@ -0,0 +1,11 @@ +{ + "name": "@opentiny/vue-icon", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "sideEffects": false, + "dependencies": { + "@opentiny/vue-common": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/icon/pagelink/index.js b/packages/icon/pagelink/index.js new file mode 100644 index 000000000..1252a306e --- /dev/null +++ b/packages/icon/pagelink/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Pagelink from '@opentiny/vue-theme/svgs/pagelink.svg' + +export default svg({ name: 'IconPagelink', component: Pagelink }) diff --git a/packages/icon/pager-first/index.js b/packages/icon/pager-first/index.js new file mode 100644 index 000000000..c56fb4743 --- /dev/null +++ b/packages/icon/pager-first/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import PagerFirst from '@opentiny/vue-theme/svgs/pager-first.svg' + +export default svg({ name: 'IconPagerFirst', component: PagerFirst }) diff --git a/packages/icon/pager-last/index.js b/packages/icon/pager-last/index.js new file mode 100644 index 000000000..1a8f48697 --- /dev/null +++ b/packages/icon/pager-last/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import PagerLast from '@opentiny/vue-theme/svgs/pager-last.svg' + +export default svg({ name: 'IconPagerLast', component: PagerLast }) diff --git a/packages/icon/pager-next/index.js b/packages/icon/pager-next/index.js new file mode 100644 index 000000000..41a2355c9 --- /dev/null +++ b/packages/icon/pager-next/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import PagerNext from '@opentiny/vue-theme/svgs/pager-next.svg' + +export default svg({ name: 'IconPagerNext', component: PagerNext }) diff --git a/packages/icon/pager-prev/index.js b/packages/icon/pager-prev/index.js new file mode 100644 index 000000000..9497ef098 --- /dev/null +++ b/packages/icon/pager-prev/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import PagerPrev from '@opentiny/vue-theme/svgs/pager-prev.svg' + +export default svg({ name: 'IconPagerPrev', component: PagerPrev }) diff --git a/packages/icon/panel-max/index.js b/packages/icon/panel-max/index.js new file mode 100644 index 000000000..2aa6d84f9 --- /dev/null +++ b/packages/icon/panel-max/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import PanelMax from '@opentiny/vue-theme/svgs/panel-max.svg' + +export default svg({ name: 'IconPanelMax', component: PanelMax }) diff --git a/packages/icon/panel-mini/index.js b/packages/icon/panel-mini/index.js new file mode 100644 index 000000000..824377d7f --- /dev/null +++ b/packages/icon/panel-mini/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import PanelMini from '@opentiny/vue-theme/svgs/panel-mini.svg' + +export default svg({ name: 'IconPanelMini', component: PanelMini }) diff --git a/packages/icon/panel-normal/index.js b/packages/icon/panel-normal/index.js new file mode 100644 index 000000000..5238df222 --- /dev/null +++ b/packages/icon/panel-normal/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import PanelNormal from '@opentiny/vue-theme/svgs/panel-normal.svg' + +export default svg({ name: 'IconPanelNormal', component: PanelNormal }) diff --git a/packages/icon/pause-circle/index.js b/packages/icon/pause-circle/index.js new file mode 100644 index 000000000..4e95b9dfc --- /dev/null +++ b/packages/icon/pause-circle/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import PauseCircle from '@opentiny/vue-theme/svgs/pause-circle.svg' + +export default svg({ name: 'IconPauseCircle', component: PauseCircle }) diff --git a/packages/icon/pause/index.js b/packages/icon/pause/index.js new file mode 100644 index 000000000..f836d8952 --- /dev/null +++ b/packages/icon/pause/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Pause from '@opentiny/vue-theme/svgs/pause.svg' + +export default svg({ name: 'IconPause', component: Pause }) diff --git a/packages/icon/picture/index.js b/packages/icon/picture/index.js new file mode 100644 index 000000000..5a8c26610 --- /dev/null +++ b/packages/icon/picture/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Picture from '@opentiny/vue-theme/svgs/picture.svg' + +export default svg({ name: 'IconPicture', component: Picture }) diff --git a/packages/icon/pie-chart/index.js b/packages/icon/pie-chart/index.js new file mode 100644 index 000000000..26c18cd62 --- /dev/null +++ b/packages/icon/pie-chart/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import PieChart from '@opentiny/vue-theme/svgs/pie-chart.svg' + +export default svg({ name: 'IconPieChart', component: PieChart }) diff --git a/packages/icon/plus-circle/index.js b/packages/icon/plus-circle/index.js new file mode 100644 index 000000000..a125241e0 --- /dev/null +++ b/packages/icon/plus-circle/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import PlusCircle from '@opentiny/vue-theme/svgs/plus-circle.svg' + +export default svg({ name: 'IconPlusCircle', component: PlusCircle }) diff --git a/packages/icon/plus-square/index.js b/packages/icon/plus-square/index.js new file mode 100644 index 000000000..06a2ae6bb --- /dev/null +++ b/packages/icon/plus-square/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import PlusSquare from '@opentiny/vue-theme/svgs/plus-square.svg' + +export default svg({ name: 'IconPlusSquare', component: PlusSquare }) diff --git a/packages/icon/plus/index.js b/packages/icon/plus/index.js new file mode 100644 index 000000000..52558bc00 --- /dev/null +++ b/packages/icon/plus/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Plus from '@opentiny/vue-theme/svgs/plus.svg' + +export default svg({ name: 'IconPlus', component: Plus }) diff --git a/packages/icon/popup/index.js b/packages/icon/popup/index.js new file mode 100644 index 000000000..99d0f6a01 --- /dev/null +++ b/packages/icon/popup/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Popup from '@opentiny/vue-theme/svgs/popup.svg' + +export default svg({ name: 'IconPopup', component: Popup }) diff --git a/packages/icon/pre-checked/index.js b/packages/icon/pre-checked/index.js new file mode 100644 index 000000000..24efed738 --- /dev/null +++ b/packages/icon/pre-checked/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import PreChecked from '@opentiny/vue-theme/svgs/pre-checked.svg' + +export default svg({ name: 'IconPreChecked', component: PreChecked }) diff --git a/packages/icon/print-preview/index.js b/packages/icon/print-preview/index.js new file mode 100644 index 000000000..1fdf1847d --- /dev/null +++ b/packages/icon/print-preview/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import PrintPreview from '@opentiny/vue-theme/svgs/print-preview.svg' + +export default svg({ name: 'IconPrintPreview', component: PrintPreview }) diff --git a/packages/icon/pushpin/index.js b/packages/icon/pushpin/index.js new file mode 100644 index 000000000..ada70e6fc --- /dev/null +++ b/packages/icon/pushpin/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Pushpin from '@opentiny/vue-theme/svgs/pushpin.svg' + +export default svg({ name: 'IconPushpin', component: Pushpin }) diff --git a/packages/icon/radio/index.js b/packages/icon/radio/index.js new file mode 100644 index 000000000..380fb9757 --- /dev/null +++ b/packages/icon/radio/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Radio from '@opentiny/vue-theme/svgs/radio.svg' + +export default svg({ name: 'IconRadio', component: Radio }) diff --git a/packages/icon/radioselected/index.js b/packages/icon/radioselected/index.js new file mode 100644 index 000000000..acbf0ac6c --- /dev/null +++ b/packages/icon/radioselected/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Radioselected from '@opentiny/vue-theme/svgs/radioselected.svg' + +export default svg({ name: 'IconRadioselected', component: Radioselected }) diff --git a/packages/icon/reactjs/index.js b/packages/icon/reactjs/index.js new file mode 100644 index 000000000..9458c57f4 --- /dev/null +++ b/packages/icon/reactjs/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Reactjs from '@opentiny/vue-theme/svgs/reactjs.svg' + +export default svg({ name: 'IconReactjs', component: Reactjs }) diff --git a/packages/icon/redo/index.js b/packages/icon/redo/index.js new file mode 100644 index 000000000..dfd555d8c --- /dev/null +++ b/packages/icon/redo/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Redo from '@opentiny/vue-theme/svgs/redo.svg' + +export default svg({ name: 'IconRedo', component: Redo }) diff --git a/packages/icon/refres/index.js b/packages/icon/refres/index.js new file mode 100644 index 000000000..91f988415 --- /dev/null +++ b/packages/icon/refres/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Refres from '@opentiny/vue-theme/svgs/refres.svg' + +export default svg({ name: 'IconRefres', component: Refres }) diff --git a/packages/icon/renew/index.js b/packages/icon/renew/index.js new file mode 100644 index 000000000..df27077a4 --- /dev/null +++ b/packages/icon/renew/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Renew from '@opentiny/vue-theme/svgs/renew.svg' + +export default svg({ name: 'IconRenew', component: Renew }) diff --git a/packages/icon/repeat/index.js b/packages/icon/repeat/index.js new file mode 100644 index 000000000..07b53e984 --- /dev/null +++ b/packages/icon/repeat/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Repeat from '@opentiny/vue-theme/svgs/repeat.svg' + +export default svg({ name: 'IconRepeat', component: Repeat }) diff --git a/packages/icon/replace/index.js b/packages/icon/replace/index.js new file mode 100644 index 000000000..bb0d20775 --- /dev/null +++ b/packages/icon/replace/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Replace from '@opentiny/vue-theme/svgs/replace.svg' + +export default svg({ name: 'IconReplace', component: Replace }) diff --git a/packages/icon/replies/index.js b/packages/icon/replies/index.js new file mode 100644 index 000000000..ef17777b8 --- /dev/null +++ b/packages/icon/replies/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Replies from '@opentiny/vue-theme/svgs/replies.svg' + +export default svg({ name: 'IconReplies', component: Replies }) diff --git a/packages/icon/right-frozen/index.js b/packages/icon/right-frozen/index.js new file mode 100644 index 000000000..e07199778 --- /dev/null +++ b/packages/icon/right-frozen/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import RightFrozen from '@opentiny/vue-theme/svgs/right-frozen.svg' + +export default svg({ name: 'IconRightFrozen', component: RightFrozen }) diff --git a/packages/icon/right-o/index.js b/packages/icon/right-o/index.js new file mode 100644 index 000000000..51b63d606 --- /dev/null +++ b/packages/icon/right-o/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import RightO from '@opentiny/vue-theme/svgs/right-o.svg' + +export default svg({ name: 'IconRightO', component: RightO }) diff --git a/packages/icon/right/index.js b/packages/icon/right/index.js new file mode 100644 index 000000000..096a62f9d --- /dev/null +++ b/packages/icon/right/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Right from '@opentiny/vue-theme/svgs/right.svg' + +export default svg({ name: 'IconRight', component: Right }) diff --git a/packages/icon/rightward/index.js b/packages/icon/rightward/index.js new file mode 100644 index 000000000..5080f414d --- /dev/null +++ b/packages/icon/rightward/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Rightward from '@opentiny/vue-theme/svgs/rightward.svg' + +export default svg({ name: 'IconRightward', component: Rightward }) diff --git a/packages/icon/row-reverse/index.js b/packages/icon/row-reverse/index.js new file mode 100644 index 000000000..a6adc274d --- /dev/null +++ b/packages/icon/row-reverse/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import RowReverse from '@opentiny/vue-theme/svgs/row-reverse.svg' + +export default svg({ name: 'IconRowReverse', component: RowReverse }) diff --git a/packages/icon/sandwich-collapse/index.js b/packages/icon/sandwich-collapse/index.js new file mode 100644 index 000000000..35a432ba4 --- /dev/null +++ b/packages/icon/sandwich-collapse/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import SandwichCollapse from '@opentiny/vue-theme/svgs/sandwich-collapse.svg' + +export default svg({ name: 'IconSandwichCollapse', component: SandwichCollapse }) diff --git a/packages/icon/sandwich-expand/index.js b/packages/icon/sandwich-expand/index.js new file mode 100644 index 000000000..31f868021 --- /dev/null +++ b/packages/icon/sandwich-expand/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import SandwichExpand from '@opentiny/vue-theme/svgs/sandwich-expand.svg' + +export default svg({ name: 'IconSandwichExpand', component: SandwichExpand }) diff --git a/packages/icon/save/index.js b/packages/icon/save/index.js new file mode 100644 index 000000000..e38f678ea --- /dev/null +++ b/packages/icon/save/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Save from '@opentiny/vue-theme/svgs/save.svg' + +export default svg({ name: 'IconSave', component: Save }) diff --git a/packages/icon/scissor/index.js b/packages/icon/scissor/index.js new file mode 100644 index 000000000..9f0fb4332 --- /dev/null +++ b/packages/icon/scissor/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Scissor from '@opentiny/vue-theme/svgs/scissor.svg' + +export default svg({ name: 'IconScissor', component: Scissor }) diff --git a/packages/icon/search/index.js b/packages/icon/search/index.js new file mode 100644 index 000000000..fff6952aa --- /dev/null +++ b/packages/icon/search/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Search from '@opentiny/vue-theme/svgs/search.svg' + +export default svg({ name: 'IconSearch', component: Search }) diff --git a/packages/icon/select/index.js b/packages/icon/select/index.js new file mode 100644 index 000000000..90b558211 --- /dev/null +++ b/packages/icon/select/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Select from '@opentiny/vue-theme/svgs/select.svg' + +export default svg({ name: 'IconSelect', component: Select }) diff --git a/packages/icon/sent/index.js b/packages/icon/sent/index.js new file mode 100644 index 000000000..13f6c5e8a --- /dev/null +++ b/packages/icon/sent/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Sent from '@opentiny/vue-theme/svgs/sent.svg' + +export default svg({ name: 'IconSent', component: Sent }) diff --git a/packages/icon/separate/index.js b/packages/icon/separate/index.js new file mode 100644 index 000000000..b5345a273 --- /dev/null +++ b/packages/icon/separate/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Separate from '@opentiny/vue-theme/svgs/separate.svg' + +export default svg({ name: 'IconSeparate', component: Separate }) diff --git a/packages/icon/setting/index.js b/packages/icon/setting/index.js new file mode 100644 index 000000000..f8f5d9a97 --- /dev/null +++ b/packages/icon/setting/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Setting from '@opentiny/vue-theme/svgs/setting.svg' + +export default svg({ name: 'IconSetting', component: Setting }) diff --git a/packages/icon/share-arrow/index.js b/packages/icon/share-arrow/index.js new file mode 100644 index 000000000..70f30f820 --- /dev/null +++ b/packages/icon/share-arrow/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import ShareArrow from '@opentiny/vue-theme/svgs/share-arrow.svg' + +export default svg({ name: 'IconShareArrow', component: ShareArrow }) diff --git a/packages/icon/share/index.js b/packages/icon/share/index.js new file mode 100644 index 000000000..cb0382b48 --- /dev/null +++ b/packages/icon/share/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Share from '@opentiny/vue-theme/svgs/share.svg' + +export default svg({ name: 'IconShare', component: Share }) diff --git a/packages/icon/shopping-card/index.js b/packages/icon/shopping-card/index.js new file mode 100644 index 000000000..8fae6193d --- /dev/null +++ b/packages/icon/shopping-card/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import ShoppingCard from '@opentiny/vue-theme/svgs/shopping-card.svg' + +export default svg({ name: 'IconShoppingCard', component: ShoppingCard }) diff --git a/packages/icon/smile-o/index.js b/packages/icon/smile-o/index.js new file mode 100644 index 000000000..b6482ac7e --- /dev/null +++ b/packages/icon/smile-o/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import SmileO from '@opentiny/vue-theme/svgs/smile-o.svg' + +export default svg({ name: 'IconSmileO', component: SmileO }) diff --git a/packages/icon/smile/index.js b/packages/icon/smile/index.js new file mode 100644 index 000000000..d2b148f1c --- /dev/null +++ b/packages/icon/smile/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Smile from '@opentiny/vue-theme/svgs/smile.svg' + +export default svg({ name: 'IconSmile', component: Smile }) diff --git a/packages/icon/sort-default/index.js b/packages/icon/sort-default/index.js new file mode 100644 index 000000000..2394189d1 --- /dev/null +++ b/packages/icon/sort-default/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import SortDefault from '@opentiny/vue-theme/svgs/sort-default.svg' + +export default svg({ name: 'IconSortDefault', component: SortDefault }) diff --git a/packages/icon/sort/index.js b/packages/icon/sort/index.js new file mode 100644 index 000000000..6898fb9c4 --- /dev/null +++ b/packages/icon/sort/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Sort from '@opentiny/vue-theme/svgs/sort.svg' + +export default svg({ name: 'IconSort', component: Sort }) diff --git a/packages/icon/star-active/index.js b/packages/icon/star-active/index.js new file mode 100644 index 000000000..56d58b356 --- /dev/null +++ b/packages/icon/star-active/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import StarActive from '@opentiny/vue-theme/svgs/star-active.svg' + +export default svg({ name: 'IconStarActive', component: StarActive }) diff --git a/packages/icon/star-disable/index.js b/packages/icon/star-disable/index.js new file mode 100644 index 000000000..c3beaa84c --- /dev/null +++ b/packages/icon/star-disable/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import StarDisable from '@opentiny/vue-theme/svgs/star-disable.svg' + +export default svg({ name: 'IconStarDisable', component: StarDisable }) diff --git a/packages/icon/star-o/index.js b/packages/icon/star-o/index.js new file mode 100644 index 000000000..d445f168c --- /dev/null +++ b/packages/icon/star-o/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import StarO from '@opentiny/vue-theme/svgs/star-o.svg' + +export default svg({ name: 'IconStarO', component: StarO }) diff --git a/packages/icon/start-circle/index.js b/packages/icon/start-circle/index.js new file mode 100644 index 000000000..5ec3b9e58 --- /dev/null +++ b/packages/icon/start-circle/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import StartCircle from '@opentiny/vue-theme/svgs/start-circle.svg' + +export default svg({ name: 'IconStartCircle', component: StartCircle }) diff --git a/packages/icon/start/index.js b/packages/icon/start/index.js new file mode 100644 index 000000000..f0b1fa28c --- /dev/null +++ b/packages/icon/start/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Start from '@opentiny/vue-theme/svgs/start.svg' + +export default svg({ name: 'IconStart', component: Start }) diff --git a/packages/icon/statistics/index.js b/packages/icon/statistics/index.js new file mode 100644 index 000000000..59316e9ae --- /dev/null +++ b/packages/icon/statistics/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Statistics from '@opentiny/vue-theme/svgs/statistics.svg' + +export default svg({ name: 'IconStatistics', component: Statistics }) diff --git a/packages/icon/stop/index.js b/packages/icon/stop/index.js new file mode 100644 index 000000000..107f3a002 --- /dev/null +++ b/packages/icon/stop/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Stop from '@opentiny/vue-theme/svgs/stop.svg' + +export default svg({ name: 'IconStop', component: Stop }) diff --git a/packages/icon/stream-solid/index.js b/packages/icon/stream-solid/index.js new file mode 100644 index 000000000..bdecb854c --- /dev/null +++ b/packages/icon/stream-solid/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import StreamSolid from '@opentiny/vue-theme/svgs/stream-solid.svg' + +export default svg({ name: 'IconStreamSolid', component: StreamSolid }) diff --git a/packages/icon/success/index.js b/packages/icon/success/index.js new file mode 100644 index 000000000..1811bade2 --- /dev/null +++ b/packages/icon/success/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Success from '@opentiny/vue-theme/svgs/success.svg' + +export default svg({ name: 'IconSuccess', component: Success }) diff --git a/packages/icon/successful/index.js b/packages/icon/successful/index.js new file mode 100644 index 000000000..e9bec16a5 --- /dev/null +++ b/packages/icon/successful/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Successful from '@opentiny/vue-theme/svgs/successful.svg' + +export default svg({ name: 'IconSuccessful', component: Successful }) diff --git a/packages/icon/tablet-view/index.js b/packages/icon/tablet-view/index.js new file mode 100644 index 000000000..4b358205d --- /dev/null +++ b/packages/icon/tablet-view/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import TabletView from '@opentiny/vue-theme/svgs/tablet-view.svg' + +export default svg({ name: 'IconTabletView', component: TabletView }) diff --git a/packages/icon/task-cooperation/index.js b/packages/icon/task-cooperation/index.js new file mode 100644 index 000000000..a7ca0d8b6 --- /dev/null +++ b/packages/icon/task-cooperation/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import TaskCooperation from '@opentiny/vue-theme/svgs/task-cooperation.svg' + +export default svg({ name: 'IconTaskCooperation', component: TaskCooperation }) diff --git a/packages/icon/telephone-circle/index.js b/packages/icon/telephone-circle/index.js new file mode 100644 index 000000000..9b39674ca --- /dev/null +++ b/packages/icon/telephone-circle/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import TelephoneCircle from '@opentiny/vue-theme/svgs/telephone-circle.svg' + +export default svg({ name: 'IconTelephoneCircle', component: TelephoneCircle }) diff --git a/packages/icon/telephone/index.js b/packages/icon/telephone/index.js new file mode 100644 index 000000000..9d5c58d73 --- /dev/null +++ b/packages/icon/telephone/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Telephone from '@opentiny/vue-theme/svgs/telephone.svg' + +export default svg({ name: 'IconTelephone', component: Telephone }) diff --git a/packages/icon/text-align/index.js b/packages/icon/text-align/index.js new file mode 100644 index 000000000..51d7ce259 --- /dev/null +++ b/packages/icon/text-align/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import TextAlign from '@opentiny/vue-theme/svgs/text-align.svg' + +export default svg({ name: 'IconTextAlign', component: TextAlign }) diff --git a/packages/icon/text-decoration/index.js b/packages/icon/text-decoration/index.js new file mode 100644 index 000000000..60962687a --- /dev/null +++ b/packages/icon/text-decoration/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import TextDecoration from '@opentiny/vue-theme/svgs/text-decoration.svg' + +export default svg({ name: 'IconTextDecoration', component: TextDecoration }) diff --git a/packages/icon/text-tab/index.js b/packages/icon/text-tab/index.js new file mode 100644 index 000000000..8c8fad74e --- /dev/null +++ b/packages/icon/text-tab/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import TextTab from '@opentiny/vue-theme/svgs/text-tab.svg' + +export default svg({ name: 'IconTextTab', component: TextTab }) diff --git a/packages/icon/text/index.js b/packages/icon/text/index.js new file mode 100644 index 000000000..68fc90224 --- /dev/null +++ b/packages/icon/text/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Text from '@opentiny/vue-theme/svgs/text.svg' + +export default svg({ name: 'IconText', component: Text }) diff --git a/packages/icon/time/index.js b/packages/icon/time/index.js new file mode 100644 index 000000000..5d6278d3b --- /dev/null +++ b/packages/icon/time/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Time from '@opentiny/vue-theme/svgs/time.svg' + +export default svg({ name: 'IconTime', component: Time }) diff --git a/packages/icon/total/index.js b/packages/icon/total/index.js new file mode 100644 index 000000000..dc5c00800 --- /dev/null +++ b/packages/icon/total/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Total from '@opentiny/vue-theme/svgs/total.svg' + +export default svg({ name: 'IconTotal', component: Total }) diff --git a/packages/icon/triangle-down/index.js b/packages/icon/triangle-down/index.js new file mode 100644 index 000000000..bc432b03f --- /dev/null +++ b/packages/icon/triangle-down/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import TriangleDown from '@opentiny/vue-theme/svgs/triangle-down.svg' + +export default svg({ name: 'IconTriangleDown', component: TriangleDown }) diff --git a/packages/icon/undelete/index.js b/packages/icon/undelete/index.js new file mode 100644 index 000000000..a4b4aabd1 --- /dev/null +++ b/packages/icon/undelete/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Undelete from '@opentiny/vue-theme/svgs/undelete.svg' + +export default svg({ name: 'IconUndelete', component: Undelete }) diff --git a/packages/icon/underline/index.js b/packages/icon/underline/index.js new file mode 100644 index 000000000..cefc99c0f --- /dev/null +++ b/packages/icon/underline/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Underline from '@opentiny/vue-theme/svgs/underline.svg' + +export default svg({ name: 'IconUnderline', component: Underline }) diff --git a/packages/icon/undo/index.js b/packages/icon/undo/index.js new file mode 100644 index 000000000..6b654ef13 --- /dev/null +++ b/packages/icon/undo/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Undo from '@opentiny/vue-theme/svgs/undo.svg' + +export default svg({ name: 'IconUndo', component: Undo }) diff --git a/packages/icon/unfilter/index.js b/packages/icon/unfilter/index.js new file mode 100644 index 000000000..84e031285 --- /dev/null +++ b/packages/icon/unfilter/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Unfilter from '@opentiny/vue-theme/svgs/unfilter.svg' + +export default svg({ name: 'IconUnfilter', component: Unfilter }) diff --git a/packages/icon/unfreeze/index.js b/packages/icon/unfreeze/index.js new file mode 100644 index 000000000..bebde14c8 --- /dev/null +++ b/packages/icon/unfreeze/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Unfreeze from '@opentiny/vue-theme/svgs/unfreeze.svg' + +export default svg({ name: 'IconUnfreeze', component: Unfreeze }) diff --git a/packages/icon/unknow/index.js b/packages/icon/unknow/index.js new file mode 100644 index 000000000..8fb276776 --- /dev/null +++ b/packages/icon/unknow/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Unknow from '@opentiny/vue-theme/svgs/unknow.svg' + +export default svg({ name: 'IconUnknow', component: Unknow }) diff --git a/packages/icon/unknown/index.js b/packages/icon/unknown/index.js new file mode 100644 index 000000000..1558af2dc --- /dev/null +++ b/packages/icon/unknown/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Unknown from '@opentiny/vue-theme/svgs/unknown.svg' + +export default svg({ name: 'IconUnknown', component: Unknown }) diff --git a/packages/icon/unlock/index.js b/packages/icon/unlock/index.js new file mode 100644 index 000000000..0f7bbf90c --- /dev/null +++ b/packages/icon/unlock/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Unlock from '@opentiny/vue-theme/svgs/unlock.svg' + +export default svg({ name: 'IconUnlock', component: Unlock }) diff --git a/packages/icon/unsent/index.js b/packages/icon/unsent/index.js new file mode 100644 index 000000000..312b3cafc --- /dev/null +++ b/packages/icon/unsent/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Unsent from '@opentiny/vue-theme/svgs/unsent.svg' + +export default svg({ name: 'IconUnsent', component: Unsent }) diff --git a/packages/icon/up-o/index.js b/packages/icon/up-o/index.js new file mode 100644 index 000000000..6215096d4 --- /dev/null +++ b/packages/icon/up-o/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import UpO from '@opentiny/vue-theme/svgs/up-o.svg' + +export default svg({ name: 'IconUpO', component: UpO }) diff --git a/packages/icon/up/index.js b/packages/icon/up/index.js new file mode 100644 index 000000000..bd91041c1 --- /dev/null +++ b/packages/icon/up/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Up from '@opentiny/vue-theme/svgs/up.svg' + +export default svg({ name: 'IconUp', component: Up }) diff --git a/packages/icon/upload/index.js b/packages/icon/upload/index.js new file mode 100644 index 000000000..9007df14b --- /dev/null +++ b/packages/icon/upload/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Upload from '@opentiny/vue-theme/svgs/upload.svg' + +export default svg({ name: 'IconUpload', component: Upload }) diff --git a/packages/icon/user/index.js b/packages/icon/user/index.js new file mode 100644 index 000000000..13ba04349 --- /dev/null +++ b/packages/icon/user/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import User from '@opentiny/vue-theme/svgs/user.svg' + +export default svg({ name: 'IconUser', component: User }) diff --git a/packages/icon/versiontree/index.js b/packages/icon/versiontree/index.js new file mode 100644 index 000000000..fe463a3d9 --- /dev/null +++ b/packages/icon/versiontree/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Versiontree from '@opentiny/vue-theme/svgs/versiontree.svg' + +export default svg({ name: 'IconVersiontree', component: Versiontree }) diff --git a/packages/icon/view/index.js b/packages/icon/view/index.js new file mode 100644 index 000000000..cb78800ee --- /dev/null +++ b/packages/icon/view/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import View from '@opentiny/vue-theme/svgs/view.svg' + +export default svg({ name: 'IconView', component: View }) diff --git a/packages/icon/vuejs/index.js b/packages/icon/vuejs/index.js new file mode 100644 index 000000000..485ec61ee --- /dev/null +++ b/packages/icon/vuejs/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Vuejs from '@opentiny/vue-theme/svgs/vuejs.svg' + +export default svg({ name: 'IconVuejs', component: Vuejs }) diff --git a/packages/icon/warning-triangle/index.js b/packages/icon/warning-triangle/index.js new file mode 100644 index 000000000..c9c0087fe --- /dev/null +++ b/packages/icon/warning-triangle/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import WarningTriangle from '@opentiny/vue-theme/svgs/warning-triangle.svg' + +export default svg({ name: 'IconWarningTriangle', component: WarningTriangle }) diff --git a/packages/icon/warning/index.js b/packages/icon/warning/index.js new file mode 100644 index 000000000..7d8b45477 --- /dev/null +++ b/packages/icon/warning/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Warning from '@opentiny/vue-theme/svgs/warning.svg' + +export default svg({ name: 'IconWarning', component: Warning }) diff --git a/packages/icon/web-plus/index.js b/packages/icon/web-plus/index.js new file mode 100644 index 000000000..d80befeb6 --- /dev/null +++ b/packages/icon/web-plus/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import WebPlus from '@opentiny/vue-theme/svgs/web-plus.svg' + +export default svg({ name: 'IconWebPlus', component: WebPlus }) diff --git a/packages/icon/writing/index.js b/packages/icon/writing/index.js new file mode 100644 index 000000000..c6f52e846 --- /dev/null +++ b/packages/icon/writing/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Writing from '@opentiny/vue-theme/svgs/writing.svg' + +export default svg({ name: 'IconWriting', component: Writing }) diff --git a/packages/icon/yes/index.js b/packages/icon/yes/index.js new file mode 100644 index 000000000..14dd76b82 --- /dev/null +++ b/packages/icon/yes/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import Yes from '@opentiny/vue-theme/svgs/yes.svg' + +export default svg({ name: 'IconYes', component: Yes }) diff --git a/packages/icon/zoom-in/index.js b/packages/icon/zoom-in/index.js new file mode 100644 index 000000000..4c5a41648 --- /dev/null +++ b/packages/icon/zoom-in/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import ZoomIn from '@opentiny/vue-theme/svgs/zoom-in.svg' + +export default svg({ name: 'IconZoomIn', component: ZoomIn }) diff --git a/packages/icon/zoom-out/index.js b/packages/icon/zoom-out/index.js new file mode 100644 index 000000000..3956fa141 --- /dev/null +++ b/packages/icon/zoom-out/index.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { svg } from '@opentiny/vue-common' +import ZoomOut from '@opentiny/vue-theme/svgs/zoom-out.svg' + +export default svg({ name: 'IconZoomOut', component: ZoomOut }) diff --git a/packages/image-viewer/index.js b/packages/image-viewer/index.js new file mode 100644 index 000000000..2d3ac7f93 --- /dev/null +++ b/packages/image-viewer/index.js @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import ImageViewer from './src/index' + +/* istanbul ignore next */ +ImageViewer.install = function (Vue) { + Vue.component(ImageViewer.name, ImageViewer) +} + +ImageViewer.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + ImageViewer.install(window.Vue) + } +} + +export default ImageViewer diff --git a/packages/image-viewer/package.json b/packages/image-viewer/package.json new file mode 100644 index 000000000..fe8744b85 --- /dev/null +++ b/packages/image-viewer/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-image-viewer", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/image-viewer/src/index.js b/packages/image-viewer/src/index.js new file mode 100644 index 000000000..ee8017b18 --- /dev/null +++ b/packages/image-viewer/src/index.js @@ -0,0 +1,104 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' +import MobileTemplate from './mobile' + +const $constants = { + MODE: { + CONTAIN: { + name: 'contain', + icon: 'icon-fullscreen' + }, + ORIGINAL: { + name: 'original', + icon: 'icon-minscreen' + } + }, + DEFAULT_POPPER_ZINDEX: Number.POSITIVE_INFINITY +} + +const template = (mode) => { + if (process.env.TINY_MODE === 'pc') return PCTemplate + else if (process.env.TINY_MODE === 'mobile') return MobileTemplate + else return mode === 'mobile' ? MobileTemplate : PCTemplate +} + +export default { + name: $prefix + 'ImageViewer', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + urlList: { + type: Array, + default: () => [] + }, + zIndex: { + type: Number, + default: $constants.DEFAULT_POPPER_ZINDEX + }, + previewVisible: { + type: Boolean, + default: false + }, + closeShow: { + type: Boolean, + default: false + }, + arrowShow: { + type: Boolean, + default: false + }, + toolShow: { + type: Boolean, + default: false + }, + showIndex: { + type: Boolean, + default: false + }, + imageFullCurrent: { + type: Boolean, + default: false + }, + startPosition: { + type: Number, + default: 0 + }, + asyncClose: { + type: Boolean, + default: false + }, + deleteButton: { + type: Boolean, + default: false + }, + onSwitch: { + type: Function, + default: () => { + // do nothing + } + }, + onClose: { + type: Function, + default: () => { + // do nothing + } + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/image-viewer/src/mobile.vue b/packages/image-viewer/src/mobile.vue new file mode 100644 index 000000000..1fa9583a8 --- /dev/null +++ b/packages/image-viewer/src/mobile.vue @@ -0,0 +1,148 @@ + + + + diff --git a/packages/image-viewer/src/mobileTouch.js b/packages/image-viewer/src/mobileTouch.js new file mode 100644 index 000000000..12e3da413 --- /dev/null +++ b/packages/image-viewer/src/mobileTouch.js @@ -0,0 +1,115 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { directive } from '@opentiny/vue-common' +import { isObject } from '@opentiny/vue-renderless/common/type' + +class TinyTouch { + constructor(element, tinyBinding, type) { + const that = this + that.element = element + that.tinyBinding = tinyBinding + that.touchType = type + that.tinyVueTouches = { x: 0, y: 0 } + that.tinyVueMoves = true + that.tinyVueLeave = true + that.tinyLongTouch = true + that.tinyVueCallBack = isObject(tinyBinding.value) ? tinyBinding.value.fn : tinyBinding.value + that.element.addEventListener('touchstart', (e) => { + that.start(e) + }) + that.element.addEventListener('touchend', (e) => { + that.end(e) + }) + that.element.addEventListener('touchmove', (e) => { + that.move(e) + }) + } + start(e) { + if (e.touches >= 2) { + return + } + + this.tinyVueMoves = true + this.tinyVueLeave = true + this.tinyLongTouch = true + this.tinyVueTouches = { + x: e.changedTouches[0].pageX, + y: e.changedTouches[0].pageY + } + + this.time = setTimeout(() => { + if (this.tinyVueLeave && this.tinyVueMoves) { + this.touchType == 'longtap' && this.tinyVueCallBack(this.tinyBinding.value, e) + this.tinyLongTouch = false + } + }, 1000) + } + end(e) { + if (e.touches >= 2) { + return + } + + let disX = e.changedTouches[0].pageX - this.tinyVueTouches.x + let disY = e.changedTouches[0].pageY - this.tinyVueTouches.y + + clearTimeout(this.time) + + if (Math.abs(disX) > 10 || Math.abs(disY) > 100) { + this.touchType == 'swipe' && this.tinyVueCallBack(this.tinyBinding.value, e) + + if (Math.abs(disX) > Math.abs(disY)) { + if (disX > 10) { + this.touchType == 'swiperight' && this.tinyVueCallBack(this.tinyBinding.value, e) + } + + if (disX < -10) { + this.touchType == 'swipeleft' && this.tinyVueCallBack(this.tinyBinding.value, e) + } + } else { + if (disY > 10) { + this.touchType == 'swipedown' && this.tinyVueCallBack(this.tinyBinding.value, e) + } + + if (disY < -10) { + this.touchType == 'swipeup' && this.tinyVueCallBack(this.tinyBinding.value, e) + } + } + } else { + if (this.tinyLongTouch && this.tinyVueMoves) { + this.touchType == 'tap' && this.tinyVueCallBack(this.tinyBinding.value, e) + this.tinyVueLeave = false + } + } + } + move() { + this.tinyVueMoves = false + } +} + +const mapDirective = () => { + const deactives = {} + const names = ['tap', 'swipe', 'swipeleft', 'swiperight', 'swipedown', 'swipeup', 'longtap'] + + names.forEach((name) => { + deactives[name] = directive({ + vTouch: { + bind(el, tinyBinding) { + new TinyTouch(el, tinyBinding, name) + } + } + }).vTouch + }) + + return deactives +} + +export default mapDirective() diff --git a/packages/image-viewer/src/pc.vue b/packages/image-viewer/src/pc.vue new file mode 100644 index 000000000..c513aafc6 --- /dev/null +++ b/packages/image-viewer/src/pc.vue @@ -0,0 +1,94 @@ + + + + diff --git a/packages/image/index.js b/packages/image/index.js new file mode 100644 index 000000000..8f649e544 --- /dev/null +++ b/packages/image/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Image from './src/index' +import '@opentiny/vue-theme/image/index.css' + +/* istanbul ignore next */ +Image.install = function (Vue) { + Vue.component(Image.name, Image) +} + +Image.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Image.install(window.Vue) + } +} + +export default Image diff --git a/packages/image/package.json b/packages/image/package.json new file mode 100644 index 000000000..66279586b --- /dev/null +++ b/packages/image/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-image", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-image-viewer": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/image/src/index.js b/packages/image/src/index.js new file mode 100644 index 000000000..bfa498c2a --- /dev/null +++ b/packages/image/src/index.js @@ -0,0 +1,50 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const $constants = { + NONE: 'none', + CONTAIN: 'contain', + COVER: 'cover', + FILL: 'fill', + SCALE_DOWN: 'scale-down', + DEFAULT_POPPER_ZINDEX: Number.POSITIVE_INFINITY +} + +const template = () => PCTemplate + +export default { + name: $prefix + 'Image', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + fit: String, + lazy: Boolean, + previewSrcList: { + type: Array, + default: () => [] + }, + scrollContainer: {}, + src: String, + zIndex: { + type: Number, + default: $constants.DEFAULT_POPPER_ZINDEX + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/image/src/pc.vue b/packages/image/src/pc.vue new file mode 100644 index 000000000..18132d5cb --- /dev/null +++ b/packages/image/src/pc.vue @@ -0,0 +1,51 @@ + + + + diff --git a/packages/input/index.js b/packages/input/index.js new file mode 100644 index 000000000..64b9a008a --- /dev/null +++ b/packages/input/index.js @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Input from './src/index' + +Input.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +Input.install = function (Vue) { + Vue.component(Input.name, Input) +} + +Input.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Input.install(window.Vue) + } +} + +export default Input diff --git a/packages/input/package.json b/packages/input/package.json new file mode 100644 index 000000000..dbf7d9336 --- /dev/null +++ b/packages/input/package.json @@ -0,0 +1,18 @@ +{ + "name": "@opentiny/vue-input", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-action-sheet": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/input/src/index.js b/packages/input/src/index.js new file mode 100644 index 000000000..1dcbaa560 --- /dev/null +++ b/packages/input/src/index.js @@ -0,0 +1,123 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' +import MobileTemplate from './mobile' + +const $constants = { + INPUT_PC: 'tiny-input__', + INPUTGROUP_PC: 'tiny-input-group__', + INPUT_MOBILE: 'tiny-mobile-input__', + INPUTGROUP_MOBILE: 'tiny-mobile-input-group__', + Mode: 'pc', + inputMode(mode) { + return mode === this.Mode ? this.INPUT_PC : this.INPUT_MOBILE + }, + inputGroupMode(mode) { + return mode === this.Mode ? this.INPUTGROUP_PC : this.INPUTGROUP_MOBILE + }, + VALIDATE_ICON: { + Validating: 'tiny-icon-loading', + Success: 'tiny-icon-circle-check', + Error: 'tiny-icon-circle-close' + }, + COMPONENT_NAME: { + FormItem: 'FormItem' + } +} + +const template = (mode) => { + if (process.env.TINY_MODE === 'pc') return PCTemplate + else if (process.env.TINY_MODE === 'mobile') return MobileTemplate + else return mode === 'mobile' ? MobileTemplate : PCTemplate +} + +export default { + name: $prefix + 'Input', + inheritAttrs: false, + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + name: String, + size: String, + form: String, + label: String, + height: Number, + resize: String, + tabindex: { type: String, default: '1' }, + disabled: Boolean, + readonly: Boolean, + suffixIcon: [Object, String], + prefixIcon: [Object, String], + modelValue: [String, Number], + type: { + type: String, + default: 'text' + }, + vertical: { + type: Boolean, + default: false + }, + selectMenu: { + type: Array, + default: () => [] + }, + isSelect: { + type: Boolean, + default: false + }, + mobileTips: String, + counter: { + type: Boolean, + default: false + }, + autosize: { + type: [Boolean, Object], + default: false + }, + clearable: { + type: Boolean, + default: false + }, + autocomplete: { + type: String, + default: 'off' + }, + showPassword: { + type: Boolean, + default: false + }, + showWordLimit: { + type: Boolean, + default: false + }, + showTitle: { + type: Boolean, + default: false + }, + validateEvent: { + type: Boolean, + default: true + }, + // mobile特有属性 + textareaTitle: { + type: String, + default: '标题' + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/input/src/mobile.vue b/packages/input/src/mobile.vue new file mode 100644 index 000000000..9e7641092 --- /dev/null +++ b/packages/input/src/mobile.vue @@ -0,0 +1,238 @@ + + + + diff --git a/packages/input/src/pc.vue b/packages/input/src/pc.vue new file mode 100644 index 000000000..48a4f8412 --- /dev/null +++ b/packages/input/src/pc.vue @@ -0,0 +1,187 @@ + + + + diff --git a/packages/input/src/tall-storage.vue b/packages/input/src/tall-storage.vue new file mode 100644 index 000000000..70dd64462 --- /dev/null +++ b/packages/input/src/tall-storage.vue @@ -0,0 +1,46 @@ + + + + diff --git a/packages/ip-address/index.js b/packages/ip-address/index.js new file mode 100644 index 000000000..371385a23 --- /dev/null +++ b/packages/ip-address/index.js @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import IpAddress from './src/index' +import '@opentiny/vue-theme/ip-address/index.css' + +IpAddress.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +IpAddress.install = function (Vue) { + Vue.component(IpAddress.name, IpAddress) +} + +IpAddress.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + IpAddress.install(window.Vue) + } +} + +export default IpAddress diff --git a/packages/ip-address/package.json b/packages/ip-address/package.json new file mode 100644 index 000000000..0e43d910a --- /dev/null +++ b/packages/ip-address/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-ip-address", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/ip-address/src/index.js b/packages/ip-address/src/index.js new file mode 100644 index 000000000..6df916de7 --- /dev/null +++ b/packages/ip-address/src/index.js @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const template = () => PCTemplate + +export default { + name: $prefix + 'IpAddress', + props: { + ...$props, + size: String, + + /** + * @property {String} value - 显示值 + */ + modelValue: String, + + /** + * @property {String} [type = IPv4] - IP地址输入组件类型('IPv4', 'IPv6',)可选择 + */ + type: { + type: String, + default: 'IPv4', + validator: (value) => ~['IPv4', 'IPv6'].indexOf(value) + }, + + /** + * @property {Boolean} readonly - 只读 + */ + readonly: Boolean, + + /** + * @property {Boolean} disabled - 禁用 + */ + disabled: Boolean, + + /** + * @property {String, Object} [delimiter = .] - 组件IP段显示的分隔符改为图标 + */ + delimiter: { + type: [String, Object], + default: 'icon-dot-ipv4' + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/ip-address/src/pc.vue b/packages/ip-address/src/pc.vue new file mode 100644 index 000000000..5c284fd91 --- /dev/null +++ b/packages/ip-address/src/pc.vue @@ -0,0 +1,64 @@ + + + + diff --git a/packages/layout/index.js b/packages/layout/index.js new file mode 100644 index 000000000..875281dda --- /dev/null +++ b/packages/layout/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Layout from './src/index' +import '@opentiny/vue-theme/layout/index.css' + +/* istanbul ignore next */ +Layout.install = function (Vue) { + Vue.component(Layout.name, Layout) +} + +Layout.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Layout.install(window.Vue) + } +} + +export default Layout diff --git a/packages/layout/package.json b/packages/layout/package.json new file mode 100644 index 000000000..04f31aaa4 --- /dev/null +++ b/packages/layout/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-layout", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/layout/src/index.js b/packages/layout/src/index.js new file mode 100644 index 000000000..1e72fa395 --- /dev/null +++ b/packages/layout/src/index.js @@ -0,0 +1,39 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const template = () => PCTemplate + +export default { + name: $prefix + 'Layout', + provide() { + return { + layout: this + } + }, + props: { + ...$props, + tag: { + type: String, + default: 'div' + }, + size: { + type: String, + default: 'medium', + validator: (value) => ~['medium', 'small', 'mini'].indexOf(value) + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/layout/src/pc.vue b/packages/layout/src/pc.vue new file mode 100644 index 000000000..099faee1f --- /dev/null +++ b/packages/layout/src/pc.vue @@ -0,0 +1,28 @@ + + + + diff --git a/packages/link-menu/index.js b/packages/link-menu/index.js new file mode 100644 index 000000000..a0829d49b --- /dev/null +++ b/packages/link-menu/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import LinkMenu from './src/index' +import '@opentiny/vue-theme/link-menu/index.css' + +/* istanbul ignore next */ +LinkMenu.install = function (Vue) { + Vue.component(LinkMenu.name, LinkMenu) +} + +LinkMenu.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + LinkMenu.install(window.Vue) + } +} + +export default LinkMenu diff --git a/packages/link-menu/package.json b/packages/link-menu/package.json new file mode 100644 index 000000000..4880f0751 --- /dev/null +++ b/packages/link-menu/package.json @@ -0,0 +1,21 @@ +{ + "name": "@opentiny/vue-link-menu", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0", + "@opentiny/vue-input": "~0.1.0", + "@opentiny/vue-tree": "~0.1.0", + "@opentiny/vue-button": "~0.1.0", + "@opentiny/vue-dialog-box": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/link-menu/src/index.js b/packages/link-menu/src/index.js new file mode 100644 index 000000000..d1b093d57 --- /dev/null +++ b/packages/link-menu/src/index.js @@ -0,0 +1,70 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import { iconSearch } from '@opentiny/vue-icon' +import PCTemplate from './pc' + +const $constants = { + DIALOG_TITLE: 'ui.linkMenu.title' +} + +const template = () => PCTemplate + +export default { + name: $prefix + 'LinkMenu', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + icon: Object, + searchIcon: { + type: Object, + default: () => iconSearch() + }, + data: { + type: Array + }, + maxItem: { + type: Number, + validator: (value) => value >= 0 + }, + title: { + type: String, + default: '' + }, + defaultExpandAll: { + type: Boolean, + default: false + }, + ellipsis: { + type: Boolean, + default: true + }, + wrap: { + type: Boolean, + default: false + }, + props: { + default: () => ({ children: 'children', disabled: 'disabled', label: 'label' }) + }, + getMenuDataSync: Function, + keepSelectedNodes: { + type: Boolean, + default: true + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/link-menu/src/pc.vue b/packages/link-menu/src/pc.vue new file mode 100644 index 000000000..8d041a938 --- /dev/null +++ b/packages/link-menu/src/pc.vue @@ -0,0 +1,100 @@ + + + + diff --git a/packages/link/index.js b/packages/link/index.js new file mode 100644 index 000000000..f09685805 --- /dev/null +++ b/packages/link/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Link from './src/index' +import '@opentiny/vue-theme/link/index.css' + +/* istanbul ignore next */ +Link.install = function (Vue) { + Vue.component(Link.name, Link) +} + +Link.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Link.install(window.Vue) + } +} + +export default Link diff --git a/packages/link/package.json b/packages/link/package.json new file mode 100644 index 000000000..4ec68d550 --- /dev/null +++ b/packages/link/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-link", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/link/src/index.js b/packages/link/src/index.js new file mode 100644 index 000000000..ebbcc8db7 --- /dev/null +++ b/packages/link/src/index.js @@ -0,0 +1,36 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $prefix, $props, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const template = () => PCTemplate + +export default { + name: $prefix + 'Link', + props: { + ...$props, + type: { + type: String, + default: 'default' + }, + underline: { + type: Boolean, + default: true + }, + href: String, + icon: [Object, String], + disabled: Boolean + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/link/src/pc.vue b/packages/link/src/pc.vue new file mode 100644 index 000000000..11b938f78 --- /dev/null +++ b/packages/link/src/pc.vue @@ -0,0 +1,40 @@ + + + + diff --git a/packages/list/index.js b/packages/list/index.js new file mode 100644 index 000000000..198e7c0da --- /dev/null +++ b/packages/list/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import List from './src/index.vue' +import '@opentiny/vue-theme-mobile/list/index.css' + +/* istanbul ignore next */ +List.install = function (Vue) { + Vue.component(List.name, List) +} + +List.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + List.install(window.Vue) + } +} + +export default List diff --git a/packages/list/package.json b/packages/list/package.json new file mode 100644 index 000000000..57a0ff9a9 --- /dev/null +++ b/packages/list/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-list", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/list/src/index.vue b/packages/list/src/index.vue new file mode 100644 index 000000000..7f1fa942d --- /dev/null +++ b/packages/list/src/index.vue @@ -0,0 +1,69 @@ + + + + diff --git a/packages/loading/index.js b/packages/loading/index.js new file mode 100644 index 000000000..cd7d47d09 --- /dev/null +++ b/packages/loading/index.js @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import service from './src/service.js' +import directive from './src/directive.js' +import '@opentiny/vue-theme/loading/index.css' +import { setupComponent } from '@opentiny/vue-common' + +let Loadings = {} + +/* istanbul ignore next */ +Loadings.install = function (app) { + app.directive('loading', directive) +} + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Loadings.install(window.Vue) + } +} + +setupComponent.TINYLoading = { + init(root) { + root.$loading = service + } +} + +Loadings.service = service +Loadings.directive = directive +Loadings.version = process.env.COMPONENT_VERSION + +export default Loadings diff --git a/packages/loading/package.json b/packages/loading/package.json new file mode 100644 index 000000000..e154f679d --- /dev/null +++ b/packages/loading/package.json @@ -0,0 +1,18 @@ +{ + "name": "@opentiny/vue-loading", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-locale": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/loading/src/directive.js b/packages/loading/src/directive.js new file mode 100644 index 000000000..b88ca4b2e --- /dev/null +++ b/packages/loading/src/directive.js @@ -0,0 +1,170 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import afterLeave from '@opentiny/vue-renderless/common/deps/after-leave' +import PopupManager from '@opentiny/vue-renderless/common/deps/popup-manager' +import { addClass, getStyle, removeClass } from '@opentiny/vue-renderless/common/deps/dom' +import Loading from './index' +import { hooks, directive, createComponent } from '@opentiny/vue-common' +import { constants } from './service' + +const insertDom = (parent, el, binding) => { + if (!el.domVisible && getStyle(el, 'display') !== 'none' && getStyle(el, 'visibility') !== 'hidden') { + Object.keys(el.maskStyle).forEach((property) => { + el.mask.style[property] = el.maskStyle[property] + }) + + if (el.originalPosition !== 'absolute' && el.originalPosition !== 'fixed') { + addClass(parent, constants.PARENT_RELATIVE_CLS) + } + + if (binding.modifiers.fullscreen && binding.modifiers.lock) { + addClass(parent, constants.PARENT_HIDDEN_CLS) + } + + el.domVisible = true + + parent.appendChild(el.mask) + + hooks.nextTick(() => { + if (el.instance.hiding) { + el.instance.$emit('after-leave') + } else { + el.instance.state.visible = true + } + }) + + el.domInserted = true + } else if (el.domVisible && el.instance.hiding === true) { + el.instance.state.visible = true + el.instance.hiding = false + } +} + +const appendLoadingToBody = (el, binding) => { + const clientRect = el.getBoundingClientRect() + el.originalPosition = getStyle(document.body, 'position') + const direction = ['top', 'left'] + + direction.forEach((property) => { + const scroll = property === 'top' ? 'scrollTop' : 'scrollLeft' + el.maskStyle[property] = + clientRect[property] + document.body[scroll] + document.documentElement[scroll] - parseInt(getStyle(document.body, `margin-${property}`), 10) + 'px' + }) + const size = ['height', 'width'] + + size.forEach((property) => { + el.maskStyle[property] = clientRect[property] + 'px' + }) + + insertDom(document.body, el, binding) +} + +const toggleLoading = (el, binding) => { + if (binding.value) { + hooks.nextTick(() => { + if (binding.modifiers.fullscreen) { + el.originalPosition = getStyle(document.body, 'position') + el.originalOverflow = getStyle(document.body, 'overflow') + el.maskStyle.zIndex = PopupManager.nextZIndex() + + addClass(el.mask, constants.IS_FULLSCREEN_CLS) + insertDom(document.body, el, binding) + } else { + removeClass(el.mask, constants.IS_FULLSCREEN_CLS) + + if (binding.modifiers.body) { + appendLoadingToBody(el, binding) + } else { + el.originalPosition = getStyle(el, 'position') + + insertDom(el, el, binding) + } + } + }) + } else { + afterLeave( + el.instance, + () => { + if (!el.instance.hiding) { + return + } + + const target = binding.modifiers.fullscreen || binding.modifiers.body ? document.body : el + + el.domVisible = false + + removeClass(target, constants.PARENT_RELATIVE_CLS) + removeClass(target, constants.PARENT_HIDDEN_CLS) + + el.instance.hiding = false + }, + 300, + true + ) + + el.instance.state.visible = false + el.instance.hiding = true + } +} + +const vLoading = { + bind(el, binding, vnode) { + const vm = vnode.context + const textExr = el.getAttribute(constants.TEXT_ATTR) + const spinnerExr = el.getAttribute(constants.TEXT_SPINNER) + const backgroundExr = el.getAttribute(constants.TEXT_BACKGROUND) + const customClassExr = el.getAttribute(constants.TEXT_CUSTOM_CLS) + + const mask = createComponent({ + component: Loading, + propsData: { + _constants: constants + }, + el: document.createElement('div') + }) + + const config = { + text: (vm && vm[textExr]) || textExr, + spinner: (vm && vm[spinnerExr]) || spinnerExr, + background: (vm && vm[backgroundExr]) || backgroundExr, + customClass: (vm && vm[customClassExr]) || customClassExr, + fullscreen: !!binding.modifiers.fullscreen + } + + for (const key in config) { + if (Object.prototype.hasOwnProperty.call(config, key)) { + mask.state[key] = config[key] + } + } + + el.instance = mask + el.mask = mask.$el + el.maskStyle = {} + + binding.value && toggleLoading(el, binding) + }, + update(el, binding) { + el.instance.setText(el.getAttribute(constants.TEXT_ATTR)) + + if (binding.oldValue !== binding.value) { + toggleLoading(el, binding) + } + }, + unbind(el, binding) { + if (el.domInserted) { + el.mask && el.mask.parentNode && el.mask.parentNode.removeChild(el.mask) + toggleLoading(el, { value: false, modifiers: binding.modifiers }) + } + } +} + +export default directive({ vLoading }).vLoading diff --git a/packages/loading/src/index.js b/packages/loading/src/index.js new file mode 100644 index 000000000..e04a39c3f --- /dev/null +++ b/packages/loading/src/index.js @@ -0,0 +1,44 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import { constants, tinyMode } from './service' +import PCTemplate from './pc' +import MobileTemplate from './mobile' + +const template = () => { + if (process.env.TINY_MODE === 'pc') { + return PCTemplate + } else if (process.env.TINY_MODE === 'mobile') { + return MobileTemplate + } else { + return tinyMode === 'mobile' ? MobileTemplate : PCTemplate + } +} + +export default { + name: $prefix + 'Loading', + emits: [], + props: { + ...$props, + type: { + type: String, + validator: (value) => ~['primary', 'simple'].indexOf(value) + }, + loadtext: { + type: String, + default: () => constants.LOAD_ICON_TEXT + }, + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} \ No newline at end of file diff --git a/packages/loading/src/index.vue b/packages/loading/src/index.vue new file mode 100644 index 000000000..9bee12a7f --- /dev/null +++ b/packages/loading/src/index.vue @@ -0,0 +1,45 @@ + + + + diff --git a/packages/loading/src/mobile.vue b/packages/loading/src/mobile.vue new file mode 100644 index 000000000..ab3228ebc --- /dev/null +++ b/packages/loading/src/mobile.vue @@ -0,0 +1,31 @@ + + + + \ No newline at end of file diff --git a/packages/loading/src/pc.vue b/packages/loading/src/pc.vue new file mode 100644 index 000000000..341e69e94 --- /dev/null +++ b/packages/loading/src/pc.vue @@ -0,0 +1,32 @@ + + + \ No newline at end of file diff --git a/packages/loading/src/service.js b/packages/loading/src/service.js new file mode 100644 index 000000000..0e6162907 --- /dev/null +++ b/packages/loading/src/service.js @@ -0,0 +1,130 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import PopupManager from '@opentiny/vue-renderless/common/deps/popup-manager' +import { getStyle, addClass } from '@opentiny/vue-renderless/common/deps/dom' +import { createComponent, hooks } from '@opentiny/vue-common' +import Loading from './index' + +const defaults = { + text: null, + body: false, + lock: false, + customClass: '', + fullscreen: true, + type: 'primary', + tiny_mode: 'pc', +} + +let fullscreenLoading = null + +export let tinyMode = null + +export const constants = { + TEXT_ATTR: 'tiny-loading__text', + IS_FULLSCREEN_CLS: 'is-fullscreen', + TEXT_SPINNER: 'tiny-loading__spinner', + TEXT_BACKGROUND: 'tiny-loading__background', + TEXT_CUSTOM_CLS: 'tiny-loading__custom-class', + PARENT_HIDDEN_CLS: 'tiny-loading__parent-hidden', + PARENT_RELATIVE_CLS: 'tiny-loading__parent-relative', + LOAD_ICON_TEXT: 'ui.load.dot' +} +const addStyle = (options, parent, instance) => { + let maskStyle = {} + + if (options.fullscreen) { + instance.originalPosition = getStyle(document.body, 'position') + instance.originalOverflow = getStyle(document.body, 'overflow') + maskStyle.zIndex = PopupManager.nextZIndex() + } else if (options.body) { + const clientRect = options.target.getBoundingClientRect() + + instance.originalPosition = getStyle(document.body, 'position') + + const direction = ['top', 'left'] + + direction.forEach((property) => { + let scroll = property === 'top' ? 'scrollTop' : 'scrollLeft' + + maskStyle[property] = clientRect[property] + document.body[scroll] + document.documentElement[scroll] + 'px' + }) + + const size = ['height', 'width'] + + size.forEach((property) => { + maskStyle[property] = clientRect[property] + 'px' + }) + } else { + instance.originalPosition = getStyle(parent, 'position') + } + + Object.keys(maskStyle).forEach((property) => { + instance.$el.style[property] = maskStyle[property] + }) +} + +export default (configs = {}) => { + configs = { ...defaults, ...configs } + tinyMode = configs.tiny_mode; + if (typeof configs.target === 'string') { + configs.target = document.querySelector(configs.target) + } + + configs.target = configs.target || document.body + + if (configs.target !== document.body) { + configs.fullscreen = false + } else { + configs.body = true + } + + if (configs.fullscreen && fullscreenLoading && !fullscreenLoading.state.closed) { + return fullscreenLoading + } + + let parent = configs.body ? document.body : configs.target + let instance = createComponent({ + component: Loading, + propsData: { + _constants: constants + }, + el: document.createElement('div') + }) + + for (const key in configs) { + if (Object.prototype.hasOwnProperty.call(configs, key)) { + instance.state[key] = configs[key] + } + } + + addStyle(configs, parent, instance) + + if (instance.originalPosition !== 'absolute' && instance.originalPosition !== 'fixed') { + addClass(parent, constants.PARENT_RELATIVE_CLS) + } + + if (configs.fullscreen && configs.lock) { + addClass(parent, constants.PARENT_HIDDEN_CLS) + } + + parent.appendChild(instance.$el) + + hooks.nextTick(() => { + instance.state.visible = true + }) + + if (configs.fullscreen) { + fullscreenLoading = instance + } + + return instance +} diff --git a/packages/locale/format.js b/packages/locale/format.js new file mode 100644 index 000000000..7d6740503 --- /dev/null +++ b/packages/locale/format.js @@ -0,0 +1,38 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +const RE_NARGS = /(%|)\{([0-9a-zA-Z_]+)\}/g + +export default function (string, ...args) { + if (args.length === 1 && typeof args[0] === 'object') { + args = args[0] + } + + if (!args || !args.hasOwnProperty) { + args = {} + } + + return string.replace(RE_NARGS, (match, prefix, i, index) => { + let result + + if (string[index - 1] === '{' && string[index + match.length] === '}') { + return i + } else { + result = Object.prototype.hasOwnProperty.call(args, i) ? args[i] : null + + if (result === null || result === undefined) { + return '' + } + + return result + } + }) +} diff --git a/packages/locale/glob.js b/packages/locale/glob.js new file mode 100644 index 000000000..3610cf35a --- /dev/null +++ b/packages/locale/glob.js @@ -0,0 +1,161 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { formatNumber, recoverNumber } from '@opentiny/vue-renderless/common/decimal' +import { toDate, getDateWithNewTimezone } from '@opentiny/vue-renderless/common/date' +import { isPlainObject, isDate, isNull } from '@opentiny/vue-renderless/common/type' +import { formatDate } from '@opentiny/vue-renderless/common/deps/date-util' +import { isNumber } from '@opentiny/vue-renderless/common/type' + +export const getNumberFormat = (config) => { + const groupSize = 3 + let groupSeparator = ',' + let decimalSeparator = '.' + + if (isPlainObject(config)) { + return config + } + + if (typeof config === 'string') { + const match = config.match(/\d{2}([^\d]?)\d{3}([^\d]?)\d{2}/) + + if (match && match.length === 3) { + groupSeparator = match[1] + decimalSeparator = match[2] + } + } + + return { + groupSeparator, + groupSize, + decimalSeparator + } +} + +export const getDateFormat = (config) => { + const { DateFormat = 'yyyy-MM-dd', TimeFormat = 'HH:mm:ss' } = config + + return { + DateFormat, + DateTimeFormat: `${DateFormat} ${TimeFormat}`, + TimeFormat + } +} + +const TZRE = /(-|\+)(\d{2}):?(\d{2})$/ + +export const getStrTimezone = (value) => { + const localTimeZone = 0 - new Date().getTimezoneOffset() / 60 + const match = typeof value === 'string' && value.match(TZRE) + + if (match) { + const minoffset = Number(match[2]) + Number(match[3]) / 60 + value = minoffset * `${match[1]}1` + } + + if (isNumber(value) && value >= -12 && value <= 12) { + return value + } + + return localTimeZone +} + +const getOptionFormatConfig = (opt) => () => opt + +const setOptionFormatConfig = (opt) => (obj) => Object.assign(opt, obj) + +const getOptionNumberFormat = (opt) => () => opt.NumberFormat + +const getOptionDateFormat = (opt) => () => ({ + DateTimeFormat: opt.DateTimeFormat, + TimeFormat: opt.TimeFormat, + Timezone: opt.Timezone, + DateFormat: opt.DateFormat, + DbTimezone: opt.DbTimezone +}) + +/** + * + * @param {Date|String} value 日期或日期字符串 + * @param {String} format 格式化模式 + * @returns {String} + */ +const formatOptionDate = (opt, t) => (value, format, convert) => { + if (isNull(value)) { + return value + } + + let date = isDate(value) ? value : toDate(value) + let dbtimezone = opt.DbTimezone + let includeTz = value.match && value.match(TZRE) + const convers = format === false || convert === false + + if (includeTz) { + dbtimezone = getStrTimezone(value) + date = toDate(value.replace('T', ' ').slice(0, -5)) + } + + if (!convers) { + date = this.getDateWithNewTimezone(date, dbtimezone, opt.Timezone) + } + + return isDate(date) ? formatDate(date, format || opt.DateFormat, t) : null +} + +/** + * + * @param {Number} value 数字 + * @param {Object} format 格式化选项 + * @returns {String} + */ +const formatOptionNumber = (opt) => (value, format) => formatNumber(value, { ...opt.NumberFormat, ...format }) + +/** + * + * @param {String} value 格式化后的字符串 + * @param {Object} format 格式化选项 + * @returns {Number} + */ +const recoverOptionNumber = (opt) => (value, format) => recoverNumber(value, { ...opt.NumberFormat, ...format }) + +/** + * + * @param {Date} value Date + * @param {Number} from + * @param {Number} to + * @returns {String} + */ +const getOptionDateWithNewTimezone = (opt) => (value, from, to) => { + from = from === 0 ? from : from || opt.DbTimezone + to = to === 0 ? to : to || opt.Timezone + + return getDateWithNewTimezone(value, from, to) +} + +export default (t) => (config) => { + const opt = { + ...getDateFormat(config), + NumberFormat: getNumberFormat(config.NumberFormat), + DbTimezone: getStrTimezone(config.DbTimezone), + Timezone: getStrTimezone(config.Timezone) + } + + return { + getFormatConfig: getOptionFormatConfig(opt), + setFormatConfig: setOptionFormatConfig(opt), + getNumberFormat: getOptionNumberFormat(opt), + getDateFormat: getOptionDateFormat(opt), + formatDate: formatOptionDate(opt, t), + formatNumber: formatOptionNumber(opt), + recoverNumber: recoverOptionNumber(opt), + getDateWithNewTimezone: getOptionDateWithNewTimezone(opt) + } +} diff --git a/packages/locale/index.js b/packages/locale/index.js new file mode 100644 index 000000000..90346a9b3 --- /dev/null +++ b/packages/locale/index.js @@ -0,0 +1,36 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import * as all from 'vue' +import * as vue2 from '@opentiny/vue-locale/vue2' +import * as vue3 from '@opentiny/vue-locale/vue3' +import glob from './glob' + +const vue = Object.keys(all).length > 1 ? vue3 : vue2 + +export const { use, t, i18n, initI18n, extend, zhCN, enUS, language } = vue + +export const globalization = glob(t) + +export const version = process.env.COMPONENT_VERSION + +export default { + use, + t, + i18n, + initI18n, + extend, + zhCN, + enUS, + language, + ...vue.default, + globalization +} diff --git a/packages/locale/lang/en.js b/packages/locale/lang/en.js new file mode 100644 index 000000000..f02e2c613 --- /dev/null +++ b/packages/locale/lang/en.js @@ -0,0 +1,564 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +export default { + 'en-US': 'English', + 'zh-CN': '中文', + 'zh-TW': '中国台湾', + hello: 'Hello {name}', + code: 'en-US', + ui: { + wizard: { + previousStep: 'LastStep', + nextStep: 'NextStep', + save: 'Save', + submit: 'Submit' + }, + linkMenu: { + title: 'news', + placeholder: 'Please enter keywords to filter...', + sure: 'Determine', + cancel: 'cancel' + }, + todoList: { + add: 'Add', + placeholder: 'please input your todo things' + }, + alert: { + error: 'Error', + info: 'Info', + success: 'Success', + title: 'Message notification', + warning: 'Warning' + }, + amount: { + currency: 'Currency', + amount: 'Amount', + date: 'Date' + }, + actionMenu: { + moreText: 'more' + }, + base: { + all: 'All', + cancel: 'Cancel', + confirm: 'OK', + more: 'More', + reset: 'Reset' + }, + button: { + cancel: 'Cancel', + confirm: 'OK' + }, + cascader: { + noMatch: 'No matching data', + loading: 'Loading', + placeholder: 'Select', + noData: 'No data' + }, + chart: { + auxiliary: 'Auxiliary', + emptyText: 'No Data', + kName: 'Day K', + other: 'Other', + summation: 'Summation', + total: 'Total', + value: 'Value' + }, + creditCardForm: { + submit: 'Submit' + }, + crop: { + cropImage: 'crop image', + croppedImage: 'Post-Crop Image' + }, + datepicker: { + clear: 'Clear', + cancel: 'Cancel', + endDate: 'End Date', + confirm: 'OK', + month: 'month', + endTime: 'End Time', + month2: 'February', + month1: 'January', + month4: 'April', + month3: 'March', + month6: 'June', + month5: 'May', + month8: 'August', + month7: 'July', + month10: 'October', + month9: 'September', + month12: 'December', + month11: 'November', + months: { + feb: 'Feb', + jan: 'Jan', + apr: 'Apr', + mar: 'Mar', + jun: 'Jun', + may: 'May', + aug: 'Aug', + jul: 'Jul', + oct: 'Oct', + sep: 'Sep', + dec: 'Dec', + nov: 'Nov' + }, + nextYear: 'Next Year', + nextMonth: 'Next Month', + prevMonth: 'Previous Month', + now: 'Now', + selectDate: 'Select date', + prevYear: 'Previous Year', + startDate: 'Start Date', + selectTime: 'Select time', + today: 'Today', + currentMonth: 'Current Month', + startTime: 'Start Time', + week: 'week', + weeks: { + mon: 'Mon', + sun: 'Sun', + wed: 'Wed', + tue: 'Tue', + thu: 'Thu', + sat: 'Sat', + fri: 'Fri' + }, + timezone: 'selecting a timezone', + year: '' + }, + calendar: { + showType: { + year: 'year' + } + }, + dept: { + code: 'Code', + company: 'Company', + dept1: 'First Level Department', + dept2: 'Second Level Department', + dept3: 'Third Level Department', + dept4: 'Fourth Level Department', + dept5: 'Fifth Level Department', + dept6: 'Sixth Level Department', + dept7: 'Seventh Level Department', + dept8: 'Eighth Level Department', + input: 'Input Dept Code or Name is available', + name: 'Name', + search: 'Quick Search', + selected: 'Selected' + }, + detailpage: { + saveButtonText: 'Confirm', + cancelButtonText: 'Cancel', + localTips: 'Cannot hide all', + localTitle: 'Data', + valueTitle: 'Click to hide', + labelTitle: 'Title', + dialogTitle: 'Personalized title' + }, + dialogBox: { + confirm: 'confirm', + cancel: 'cancel' + }, + load: { + dot: 'Loading', + }, + exception: { + build: 'Building', + busy: 'The network is busy. Please wait', + noperm: 'Not find the page', + weaknet: 'Poor network performance', + pcview: 'View the file on the PC', + nodata: 'Get some rest', + create: 'Create', + provide: 'Provided by the TINY Team DEV' + }, + fileUpload: { + largefile: ' is too large and will be uploaded in segments. Please wait.', + folder: ' has more than five layers of folders. The file will not be uploaded', + init: 'Service error. Please try again.', + token: 'Perform EDM authentication first and obtain the token', + exceed: 'size exceeds the limit, max size config is', + largeFile: 'The file size exceeds the upper limit by 2 GB !!', + fileSize: 'The file size of {name} cannot be less than ', + deleteTip: 'Press delete to remove', + downloadFile: 'DownLoad file', + previewFile: 'Preview file', + updateFile: 'Update file', + deleteFile: 'Delete file', + empty: 'is empty!' + }, + grid: { + dataUnchanged: 'Data unchanged!', + deleteSelectRecord: 'Are you sure you want to delete the selected record?', + emptyText: 'No Data', + error: { + cellEditRender: 'The renderer cell-render and edit-render cannot be used together.', + delGetAllRecords: 'The function getAllRecords is deprecated, please use getRecordset.', + delGetRecords: 'The function getRecords is deprecated, please use getData.', + delLabel: 'The property label is deprecated, please use title.', + delProp: 'The property prop is deprecated, please use field.', + delRevert: 'The function revert is deprecated, please use revertData.', + groupFixed: 'If grouping headers are used, fixed columns must be on the left and right sides.', + notDelete: 'delete method not exist.', + notMouse: 'Horizontal virtual scrolling does not support mouse-config.', + notQuery: 'query method not exist.', + notResizable: 'Horizontal virtual scrolling does not support resizable.', + notSave: 'save method not exist.', + reqModule: 'require {{name}} module.', + rowIdEmpty: 'The property row-id is not allowed to be empty.', + scrollOriginal: 'Virtual scrolling can only export source data, please set original=true.', + scrollYHeight: 'You must set the height or max-height to enable virtual scrolling.', + toolbarId: 'Toolbar must have a unique id', + treeFixedExpand: 'The fixed columns of the tree structure conflict with the expanded row.', + treeInsert: 'The tree structure does not support insert operations.', + treeRemove: 'The tree structure does not support remove operations.', + unableInsert: 'Unable to insert to the specified location.', + dargSelf: 'Self dragging is not allowed.', + dargFixed: 'Fixed columns cannot be dragged.', + remoteMethod: '"remoteMethod" needs to be set for remote storage for personalized template management.', + remoteSelectedMethod: '"remoteSelectedMethod" needs to be set for remote storage for personalized template management.' + }, + filter: { + allFilter: 'All', + clear: 'Clear Current Filter', + clearAll: 'Clear All Filters', + confirmFilter: 'OK', + empty: 'Is Empty', + emptyText: 'No Data', + equal: 'Equal', + include: 'Include', + prefix: 'Starts With', + resetFilter: 'Reset', + unempty: 'Is not Empty' + }, + individuation: { + cancelBtn: 'Cancel', + colConfigs: { + asc: 'Ascending', + desc: 'Descending', + frozenLeft: 'Frozen on the left', + frozenRight: 'Frozen on the right', + invisible: 'Invisible', + unsorted: 'No sortting', + unfrozen: 'Unfrozen', + visible: 'Visible' + }, + hideMsg: 'Leave one column to show at least.', + resetBtn: 'Reset', + saveBtn: 'OK', + tabs: { + base: { + title: 'Base Setting', + tips: 'Click the icon to set personalized.' + }, + other: { + allDataSort: 'Remote Data Sorting', + currPageSort: 'Current Page Data Sorting', + pageSize: 'Page Size', + title: 'Other Setting', + tips: 'Settings for Sorting and Pagesize.', + sortType: 'Sorting Type' + } + }, + title: 'Personalized Settings', + switchtitle: 'Template Management', + switchsave: 'Save configuration', + switchlabel: 'List:', + switchapply: 'Apply', + switchedit: 'Edit', + switchdel: 'Delete', + switchconfirm: 'Confirm', + switchonlytemp: 'Save as template only', + switchtempapply: 'Save as template and use', + switchtempoverwrite: 'Overwrite template and use', + switchdelcon: 'Are you sure to delete this template?', + switchdelyes: 'Yes', + switchdelno: 'No', + switchapplycon: 'Are you sure to use this template?' + }, + removeSelectRecord: 'Are you sure you want to remove the selected record?', + saveSuccess: 'Save successfully.', + selectOneRecord: 'Please choose at least one piece of record!', + isSaveMsg: 'There are change records, do you want to save them?' + }, + hrapprover: { + approver: 'Approver', + noapprover: 'There is no approver', + noselected: 'Select one record!', + remark: 'Remarks' + }, + imageViewer: { + loadErrorAlt: 'Load Error' + }, + navMenu: { + moreText: 'more' + }, + logout: { + in: 'Login', + out: 'Logout' + }, + page: { + goto: 'Go to', + item: '', + next: 'Next', + page: 'Records/Page', + pageClassifier: '', + pagesize: 'Records/Page', + prev: 'Prev', + total: 'Total ' + }, + popeditor: { + cancel: 'Cancel', + confirm: 'OK', + historyLists: 'History options', + reset: 'Reset', + search: 'Search', + selectionLists: 'Selected Items', + sourceLists: 'Available Items', + title: 'Select', + filterNode: 'input text to filter node' + }, + popupload: { + fileName: 'File Name', + fileSize: 'File Size', + fileStatus: 'File Status', + dialogTitle: 'File Upload', + cancelButtonText: 'Cancel', + tipsFileText: 'upload hints', + uploadError: 'Upload failure!', + uploadButtonText: 'select file', + uploadSuccess: 'Upload Success!', + saveButtonText: 'Click To Upload', + uploadsButtonText: 'select files', + errorTypeTips: 'Upload file type mismatch', + errorSizeTips: 'Upload file size exceeds limit', + limitUploadFileType: 'Upload file type is limited to', + limitUploadFileNumber: 'Limit the number of uploaded files to', + limitUploadFileSize: 'The size of the uploaded file does not exceed', + errorNumTips: 'The number of uploaded files exceeds the limit. The operation has been cancelled' + }, + rate: { + level: { + average: 'Average', + excellent: 'Excellent', + fair: 'Fair', + good: 'Good', + poor: 'Poor' + } + }, + select: { + loading: 'Loading', + noData: 'No data', + noMatch: 'No matching data', + placeholder: 'Select' + }, + search: { + placeholder: 'search' + }, + tabs: { + moreItem: 'more' + }, + tag: { + add: 'Add' + }, + toggleMenu: { + placeholder: 'please input filter content' + }, + treeMenu: { + placeholder: 'please input filter content' + }, + transfer: { + filterPlaceholder: 'Enter keyword', + hasCheckedFormat: '{checked}/{total} checked', + noData: 'No data', + noMatch: 'No matching data', + noCheckedFormat: '{total} items', + titles: ['List 1', 'List 2'] + }, + tree: { + emptyText: 'No data' + }, + upload: { + limitUploadFileNumber: 'The maximum number of files to be uploaded has been reached.' + }, + usercard: { + address: 'Address', + collapse: 'Collapse', + department: 'Department', + email: 'email', + employeeId: 'Employee ID', + empno: 'Employee Number', + expand: 'Expand', + fax: 'Fax', + internal: 'Internal', + manager: 'Manager', + mobile: 'Mobile', + other: 'Other', + phone: 'Telephone', + timezone: 'Time zone', + title: 'User information: {0}', + travelcode: 'Travel code', + viop: 'VIOP', + zipcode: 'Postal Code' + }, + richText: { + bold: 'Bold', + italic: 'Tilt', + underline: 'Underline', + header: 'Paragraph Format', + strike: 'Delete Line', + blockquote: 'Block Reference', + codeBlock: 'Insert Code Segment', + size: 'Font Size', + listOrdered: 'No. List', + listBullet: 'Project List', + header1: 'H1', + header2: 'H2', + align: 'Alignment Mode', + color: 'Font Color', + background: 'Background Color', + image: 'Image', + video: 'Video', + link: 'Add Link', + formula: 'Insert Function', + clean: 'Clear Format', + indent1: 'Indent To The Left', + indent2: 'Indent To The Right', + pickerLabel: 'Title Size', + headerPicker1: 'Title 1', + headerPicker2: 'Title 2', + headerPicker3: 'Title 3', + headerPicker4: 'Title 4', + headerPicker5: 'Title 5', + headerPicker6: 'Title 6', + normal: 'Normal', + sizeSmall: 'Small', + sizeLarge: 'Large', + sizeHuge: 'Super Large Size', + alignPicker1: 'Align To The Left', + alignPicker2: 'Align In The Center', + alignPicker3: 'Align To The Right', + alignPicker4: 'Align The Two Ends', + subScript: 'Subscript', + superScript: 'Superscript', + directionRTL: 'Right To Left', + font: 'Font', + file: 'File', + betterTable: 'Table', + insertColumnRight: 'Insert Column Right', + insertColumnLeft: 'Insert Column Left', + insertRowUp: 'Insert Row Up', + insertRowDown: 'Insert Row Down', + mergeCells: 'Merge Cells', + unmergeCells: 'Split Cells', + deleteColumn: 'Delete Current Column', + deleteRow: 'Delete Current Row', + deleteTable: 'Delete Table', + colorPicker: 'Background Color', + placeholder: 'Insert text here...' + }, + steps: { + done: 'Completed', + doing: 'Ongoing', + wait: 'Waiting' + }, + actionSheet: { + cancel: 'Cancel' + }, + image: { + loadFail: 'Loading failed' + }, + miniPicker: { + cancel: 'Cancel', + confirm: 'Confirm' + }, + pullRefresh: { + pulling: 'Pull down to refresh', + loosing: 'Release to refresh' + } + }, + validation: { + array: { + len: '%s must be exactly %s in length', + min: '%s cannot be less than %s in length', + max: '%s cannot be greater than %s in length', + range: '%s must be between %s and %s in length' + }, + date: { + format: '%s date %s is invalid for format %s', + invalid: '%s date %s is invalid', + parse: '%s date could not be parsed, %s is invalid ' + }, + default: 'Validation error on field %s', + enum: '%s must be one of %s', + number: { + len: '%s must equal %s', + min: '%s cannot be less than %s', + max: '%s cannot be greater than %s', + range: '%s must be between %s and %s' + }, + pattern: { + mismatch: '%s value %s does not match pattern %s' + }, + required: '%s is required', + string: { + len: '%s must be exactly %s characters', + min: '%s must be at least %s characters', + max: '%s cannot be longer than %s characters', + range: '%s must be between %s and %s characters' + }, + types: { + acceptFile: '%s is not a valid %s', + acceptImg: '%s is not a valid %s', + array: '%s is not an %s', + boolean: '%s is not a %s', + date: '%s is not a %s', + dateTime: '%s is not a valid %s', + dateYM: '%s is not a valid %s', + dateYMD: '%s is not a valid %s', + digits: '%s is not a valid %s', + email: '%s is not a valid %s', + fileSize: '%s is not a valid %s', + float: '%s is not a %s', + hex: '%s is not a valid %s', + integer: '%s is not an %s', + longDateTime: '%s is not a valid %s', + method: '%s is not a %s (function)', + number: '%s is not a %s', + object: '%s is not an %s', + regexp: '%s is not a valid %s', + specialch: '%s is not a valid %s', + specialch2: '%s is not a valid %s', + speczh: '%s is not a valid %s', + string: '%s is not a %s', + time: '%s is not a valid %s', + url: '%s is not a valid %s', + version: '%s is not a valid %s' + }, + whitespace: '%s cannot be empty' + }, + vueplus: { + beingMaintained: { + label: 'The selected service is in maintenance state in {city}.', + maintainedTime: 'Maintenance time:', + description: 'Maintenance time cannot manage resources, which brings inconvenience to you. ', + changeTo: 'Please switch to' + }, + beta: { + moreText: 'Learn More', + applyText: 'Apply Now' + } + } +} diff --git a/packages/locale/lang/zh-CN.js b/packages/locale/lang/zh-CN.js new file mode 100644 index 000000000..7e4396276 --- /dev/null +++ b/packages/locale/lang/zh-CN.js @@ -0,0 +1,562 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +export default { + 'en-US': 'English', + 'zh-CN': '中文', + 'zh-TW': '中国台湾', + hello: '你好 {name}', + code: 'zh-CN', + ui: { + wizard: { + previousStep: '上一步', + nextStep: '下一步', + save: '保存', + submit: '提交' + }, + linkMenu: { + title: '消息', + placeholder: '请输入关键字过滤...', + sure: '确定', + cancel: '取消' + }, + todoList: { + add: '提交', + placeholder: '请输入内容...' + }, + alert: { + error: '错误', + info: '消息', + success: '成功', + title: '消息提示', + warning: '警告' + }, + amount: { + currency: '币种', + amount: '金额', + date: '日期' + }, + actionMenu: { + moreText: '更多' + }, + base: { + all: '全部', + cancel: '取消', + confirm: '确定', + more: '更多', + reset: '重置' + }, + button: { + cancel: '取消', + confirm: '确认' + }, + cascader: { + noMatch: '无匹配数据', + loading: '加载中', + placeholder: '请选择', + noData: '暂无数据' + }, + chart: { + auxiliary: '辅助', + emptyText: '暂无数据', + kName: '日K', + other: '其他', + summation: '总量', + total: '总计', + value: '数值' + }, + creditCardForm: { + submit: '提交' + }, + crop: { + cropImage: '图片裁剪', + croppedImage: '裁剪后图像' + }, + datepicker: { + clear: '清空', + cancel: '取消', + endDate: '结束日期', + confirm: '确定', + month: '月', + endTime: '结束时间', + month2: '2 月', + month1: '1 月', + month4: '4 月', + month3: '3 月', + month6: '6 月', + month5: '5 月', + month8: '8 月', + month7: '7 月', + month10: '10 月', + month9: '9 月', + month12: '12 月', + month11: '11 月', + months: { + feb: '二月', + jan: '一月', + apr: '四月', + mar: '三月', + jun: '六月', + may: '五月', + aug: '八月', + jul: '七月', + oct: '十月', + sep: '九月', + dec: '十二月', + nov: '十一月' + }, + nextYear: '后一年', + nextMonth: '下个月', + prevMonth: '上个月', + now: '此刻', + selectDate: '选择日期', + prevYear: '前一年', + startDate: '开始日期', + selectTime: '选择时间', + today: '今天', + currentMonth: '本月', + startTime: '开始时间', + week: '周次', + weeks: { + mon: '一', + sun: '日', + wed: '三', + tue: '二', + fri: '五', + thu: '四', + sat: '六' + }, + timezone: '选择时区', + year: '年' + }, + calendar: { + showType: { + year: '年' + } + }, + dept: { + code: '编码', + company: '公司', + dept1: '一级部门', + dept2: '二级部门', + dept3: '三级部门', + dept4: '四级部门', + dept5: '五级部门', + dept6: '六级部门', + dept7: '七级部门', + dept8: '八级部门', + input: '可输入部门编码或名称', + name: '名称', + search: '辅助查询', + selected: '已选' + }, + detailpage: { + saveButtonText: '确认', + cancelButtonText: '取消', + localTips: '不能全部隐藏', + localTitle: '数据', + valueTitle: '勾选隐藏', + labelTitle: '文本字段', + dialogTitle: '个性化标题' + }, + dialogBox: { + confirm: '确定', + cancel: '取消' + }, + load: { + dot: '加载中', + }, + exception: { + build: '模块正在建设中', + busy: '系统繁忙,请稍等一下', + noperm: '茫茫大海,找不到页面', + weaknet: '网络不给力', + pcview: '请到PC上查看文件', + nodata: '休息一下', + create: '创建', + provide: 'TINY 开发团队提供' + }, + fileUpload: { + largefile: '文件过大,将会分片上传,请耐心等待!', + folder: '文件所在文件夹层数已超过 5 层,将不会上传该文件', + init: '服务报错,请重试', + exceed: '文件超过最大限制', + largeFile: '文件大小超出限制 2G !', + fileSize: '{name}大小不能小于 ', + deleteTip: '按 delete 键可删除', + downloadFile: '下载文件', + previewFile: '预览文件', + updateFile: '更新文件', + deleteFile: '删除文件', + empty: '是空文件!' + }, + grid: { + dataUnchanged: '数据未改动!', + deleteSelectRecord: '您确定要删除所选记录吗?', + emptyText: '暂无数据', + error: { + cellEditRender: '渲染器 cell-render 和 edit-render 不能同时使用', + delGetAllRecords: '方法 getAllRecords 已废弃,请使用 getRecordset', + delGetRecords: '方法 getRecords 已废弃,请使用 getData', + delLabel: '参数 label 已废弃,请使用 title', + delProp: '参数 prop 已废弃,请使用 field', + delRevert: '方法 revert 已废弃,请使用 revertData', + groupFixed: '如果使用分组表头,固定列必须在左右两侧', + notDelete: 'Delete 方法不存在', + notMouse: '虚拟滚动不支持 mouse-config', + notQuery: 'query 方法不存在', + notResizable: '横向虚拟滚动不支持 resizable', + notSave: 'save 方法不存在', + reqModule: '缺少 {{name}} 模块', + rowIdEmpty: '参数 row-id 不允许为空', + scrollOriginal: '虚拟滚动启用后只能导出源数据,请将设置 original=true', + scrollYHeight: '启用虚拟滚动必须要设置 height 或 max-height', + toolbarId: '工具栏需要设置唯一 id', + treeFixedExpand: '树结构的固定列与展开行功能有冲突', + treeInsert: '树结构不支持 insert 操作', + treeRemove: '树结构不支持 remove 操作', + unableInsert: '无法插入到指定位置', + dargSelf: '不允许自己给自己拖动', + dargFixed: '固定列不允许拖动', + remoteMethod: '个性化模板管理远端存储需要设置 multipleHistory.remoteMethod', + remoteSelectedMethod: '个性化模板管理远端存储需要设置 multipleHistory.remoteSelectedMethod' + }, + filter: { + allFilter: '全部', + clear: '清除当前列筛选', + clearAll: '清除所有列筛选', + confirmFilter: '筛选', + empty: '为空', + emptyText: '暂无数据', + equal: '等于', + include: '包含', + prefix: '开头是', + resetFilter: '重置', + unempty: '不为空' + }, + individuation: { + cancelBtn: '取消', + colConfigs: { + visible: '显示', + invisible: '隐藏', + asc: '正序', + desc: '倒序', + unsorted: '未排序', + frozenLeft: '左冻结', + frozenRight: '右冻结', + unfrozen: '未冻结' + }, + hideMsg: '至少保留一列显示', + resetBtn: '重置', + saveBtn: '确定', + tabs: { + base: { + title: '基础设置', + tips: '点击图标按钮设置个性化' + }, + other: { + title: '其他设置', + tips: '设置服务器排序或客户端排序、每页条数大小。', + sortType: '排序类型', + currPageSort: '当前页数据排序', + allDataSort: '所有数据排序', + pageSize: '每页条数' + } + }, + title: '个性化设置', + switchtitle: '模板管理', + switchsave: '保存配置', + switchlabel: '配置列表:', + switchapply: '使用', + switchedit: '编辑', + switchdel: '删除', + switchconfirm: '确认', + switchonlytemp: '保存模板', + switchtempapply: '保存并使用模板', + switchtempoverwrite: '覆盖并使用模板', + switchdelcon: '确定要删除这个模板?', + switchdelyes: '确定', + switchdelno: '取消', + switchapplycon: '确定要使用这个模板?' + }, + removeSelectRecord: '您确定要移除所选记录吗?', + saveSuccess: '保存成功', + selectOneRecord: '请至少选择一条记录!', + isSaveMsg: '有修改的数据,是否要保存?' + }, + hrapprover: { + approver: '权签人', + noselected: '没有选择权签人', + noapprover: '没有权签人', + remark: '备注' + }, + imageViewer: { + loadErrorAlt: '加载失败' + }, + navMenu: { + moreText: '更多' + }, + logout: { + in: '登录', + out: '注销' + }, + page: { + goto: '前往', + item: '条', + next: '下一页', + page: '条/页', + pageClassifier: '页', + pagesize: '条/页', + prev: '上一页', + total: '总条数' + }, + popeditor: { + cancel: '取 消', + confirm: '确 认', + historyLists: '历史数据列表', + reset: '重 置', + search: '查 询', + selectionLists: '选择数据列表', + sourceLists: '所有数据列表', + title: '选择', + filterNode: '输入内容进行筛选' + }, + popupload: { + fileName: '文件名', + fileSize: '文件大小', + fileStatus: '文件状态', + uploadError: '上传失败', + dialogTitle: '文件上传', + cancelButtonText: '取消', + tipsFileText: '上传提示', + saveButtonText: '开始上传', + uploadSuccess: '上传成功!', + uploadButtonText: '选择文件', + uploadsButtonText: '选择批量文件', + errorTypeTips: '上传文件类型不匹配', + errorNumTips: '上传文件数量超出限制,已取消该操作', + errorSizeTips: '上传文件大小超出限制', + limitUploadFileNumber: '上传文件数限制为', + limitUploadFileType: '上传文件类型限制为', + limitUploadFileSize: '上传文件大小不超过' + }, + rate: { + level: { + average: '一般', + excellent: '很好', + fair: '差', + good: '好', + poor: '很差' + } + }, + select: { + loading: '加载中', + noMatch: '无匹配数据', + noData: '无数据', + placeholder: '请选择' + }, + search: { + placeholder: '搜索' + }, + tabs: { + moreItem: '更多' + }, + tag: { + add: '添加' + }, + toggleMenu: { + placeholder: '请输入内容进行筛选' + }, + treeMenu: { + placeholder: '请输入内容进行筛选' + }, + transfer: { + filterPlaceholder: '请输入搜索内容', + hasCheckedFormat: '已选 {checked}/{total} 项', + noCheckedFormat: '共 {total} 项', + noData: '无数据', + noMatch: '无匹配数据', + titles: ['列表 1', '列表 2'] + }, + tree: { + emptyText: '暂无数据' + }, + upload: { + limitUploadFileNumber: '已达到最大上传文件数' + }, + usercard: { + address: '地址', + collapse: '收起', + department: '部门', + email: '邮箱', + employeeId: '员工 ID', + expand: '展开', + fax: '传真', + internal: '内线', + manager: '主管', + mobile: '手机', + other: '其他', + phone: '固定电话', + timezone: '时区', + title: '用户信息: {0}', + travelcode: '出差联系信息', + viop: 'VIOP', + zipcode: '邮编' + }, + richText: { + bold: '加粗', + italic: '倾斜', + underline: '下划线', + header: '段落格式', + strike: '删除线', + blockquote: '块引用', + codeBlock: '插入代码段', + size: '字体大小', + listOrdered: '编号列表', + listBullet: '项目列表', + header1: 'h1', + header2: 'h2', + align: '对齐方式', + color: '字体颜色', + background: '背景颜色', + image: '图像', + video: '视频', + link: '添加链接', + formula: '插入公式', + clean: '清除格式', + indent1: '向左缩进', + indent2: '向右缩进', + pickerLabel: '标题大小', + headerPicker1: '标题一', + headerPicker2: '标题二', + headerPicker3: '标题三', + headerPicker4: '标题四', + headerPicker5: '标题五', + headerPicker6: '标题六', + normal: '标准', + sizeSmall: '小号', + sizeLarge: '大号', + sizeHuge: '超大号', + alignPicker1: '居左对齐', + alignPicker2: '居中对齐', + alignPicker3: '居右对齐', + alignPicker4: '两端对齐', + subScript: '下标', + superScript: '上标', + directionRTL: '从右到左', + font: '字体', + file: '文件', + betterTable: '表格', + insertColumnRight: '右插入列', + insertColumnLeft: '左插入列', + insertRowUp: '上插入行', + insertRowDown: '下插入行', + mergeCells: '合并单元格', + unmergeCells: '拆分单元格', + deleteColumn: '删除当前列', + deleteRow: '删除当前行', + deleteTable: '删除表格', + colorPicker: '背景颜色', + placeholder: '在此处插入文本...' + }, + steps: { + done: '已完成', + doing: '进行中', + wait: '等待中' + }, + actionSheet: { + cancel: '取消' + }, + image: { + loadFail: '加载失败' + }, + miniPicker: { + cancel: '取消', + confirm: '确定' + }, + pullRefresh: { + pulling: '下拉即可刷新', + loosing: '释放即可刷新' + } + }, + validation: { + array: { + len: '%s 的长度必须为 %s', + min: '%s 长度不能小于 %s', + max: '%s 的长度不能大于 %s', + range: '%s 的长度必须介于 %s 和 %s 之间' + }, + date: { + format: '%s 日期 %s 对于格式 %s 无效', + invalid: '%s 日期 %s 无效', + parse: '无法分析 %s 日期, %s 无效' + }, + default: '%s 字段校验错误', + enum: '%s 必须是 %s 中的一个', + number: { + len: '%s 必须等于 %s', + min: '%s 不能小于 %s', + max: '%s 不能大于 %s', + range: '%s 必须介于 %s 和 %s 之间' + }, + pattern: { + mismatch: '%s 值%s 与模式 %s 不匹配' + }, + required: '必填', + string: { + len: '%s 必须是 %s 个字符', + min: '%s 必须至少为 %s 个字符', + max: '%s不 能大于 %s 个字符', + range: '%s 必须介于 %s 和 %s 个字符之间' + }, + types: { + acceptFile: '只接受文件', + acceptImg: '只接受图片格式', + array: '非法数组', + boolean: '非法布尔值', + date: '不符合规则的日期格式', + dateTime: '不符合规则的日期时间格式', + dateYM: '不符合规则的日期格式(yyyy-mm)', + dateYMD: '不符合规则的日期格式(yyyy-MM-dd)', + digits: '非法纯数字', + email: '非法邮件地址', + fileSize: '文件大小的格式不正确,应如 3kb', + float: '非法浮点数', + hex: '非法十六进制', + integer: '非法整数', + longDateTime: '不符合规则的长日期格式', + method: '必须是函数(Function)', + number: '非法数字', + object: '非法对象', + regexp: '非法正则表达式', + specialch: '只能包含数字、字母、下划线、横杠、点号', + specialch2: '只能包含数字、字母、下划线、横杠', + speczh: '只能包含数字、字母、下划线、汉', + string: '非法字符串', + time: '不符合规则的时间格式', + url: '非法 URL 地址', + version: '非法版本格式' + }, + whitespace: '%s 不能为空' + }, + vueplus: { + beingMaintained: { + label: '所选服务在{city}处于维护状态。', + maintainedTime: '维护时间:', + description: '维护时间无法管理资源,给你带来不便,还请谅解!', + changeTo: '请切换至' + }, + beta: { + moreText: '了解更多', + applyText: '立即申请' + } + } +} diff --git a/packages/locale/package.json b/packages/locale/package.json new file mode 100644 index 000000000..e4b8784b1 --- /dev/null +++ b/packages/locale/package.json @@ -0,0 +1,10 @@ +{ + "name": "@opentiny/vue-locale", + "version": "0.1.0", + "description": "", + "main": "index.js", + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/locale/vue2.js b/packages/locale/vue2.js new file mode 100644 index 000000000..0bc1a6f27 --- /dev/null +++ b/packages/locale/vue2.js @@ -0,0 +1,105 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Vue from 'vue' +import zhCN from '@opentiny/vue-locale/lang/zh-CN' +import enUS from '@opentiny/vue-locale/lang/en' +import format from '@opentiny/vue-locale/format' +import { extend } from '@opentiny/vue-renderless/common/object' + +let lang = zhCN + +let i18nHandler = null + +const translate = (message, options, path) => { + let paths = path.split('.') + let current = lang + for (let pos = 0, len = paths.length; pos < len; pos++) { + const property = paths[pos] + message = current[property] || '' + if (pos === len - 1) { + return format(message, options) + } + if (!message) { + return '' + } + current = message + } + + return '' +} + +export function t(path, options) { + let message = i18nHandler && i18nHandler.apply(this, arguments) + if (message === null || message === undefined || message === path) { + return translate(message, options, path) + } else { + return message + } +} + +export const use = (language) => { + lang = language || lang + return lang +} + +export const language = () => lang.code + +export const i18n = (func) => { + i18nHandler = + func || + function () { + const vuei18n = Object.getPrototypeOf(this || Vue).$t + + if (typeof vuei18n === 'function' && vuei18n !== t) { + return vuei18n.apply(this, arguments) + } + } + + return i18nHandler +} + +export const initI18n = ({ VueI18n, messages = {}, i18n = {}, merge }) => { + if (typeof merge !== 'function') { + merge = ({ lang, i18n, messages }) => extend(true, lang, i18n.messages, messages) + } + + const lang = { zhCN, enUS } + + if (typeof VueI18n === 'function') { + const vueI18n = new VueI18n({ + locale: i18n.locale || 'zhCN', + messages: merge({ lang, i18n, messages }) + }) + + i18nHandler = (key, value) => vueI18n.t(key, value) + + return vueI18n + } + + if (Vue && typeof Vue.prototype.$t !== 'function') { + Vue.prototype.$t = t + } + + return merge({ lang, i18n, messages }) +} + +export { zhCN, enUS } + +export default { + extend, + i18n, + initI18n, + t, + use, + enUS, + zhCN +} diff --git a/packages/locale/vue3.js b/packages/locale/vue3.js new file mode 100644 index 000000000..07ade6345 --- /dev/null +++ b/packages/locale/vue3.js @@ -0,0 +1,95 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import zhCN from '@opentiny/vue-locale/lang/zh-CN' +import enUS from '@opentiny/vue-locale/lang/en' +import format from '@opentiny/vue-locale/format' +import { extend } from '@opentiny/vue-renderless/common/object' + +let lang = zhCN +let i18nHandler = null + +const translate = (options, path) => { + const array = path.split('.') + let value = null + let current = lang + for (let i = 0, j = array.length; i < j; i++) { + const property = array[i] + value = current[property] || '' + if (i === j - 1) { + return format(value, options) + } + if (!value) { + return '' + } + current = value + } + return '' +} + +export function t(path, options) { + if (i18nHandler) { + return i18nHandler.apply(this, arguments) + } + return translate(options, path) +} + +export const use = (l) => { + lang = l || lang + return lang +} + +export const language = () => lang.code + +export const i18n = (fn) => { + i18nHandler = fn || t + return i18nHandler +} + +export const initI18n = ({ app, createI18n, messages = {}, i18n = {}, merge }) => { + if (typeof merge !== 'function') { + merge = ({ lang, i18n, messages }) => extend(true, lang, i18n.messages, messages) + } + + const lang = { + zhCN, + enUS + } + + if (typeof createI18n === 'function') { + const vueI18n = createI18n({ + locale: i18n.locale || 'zhCN', + messages: merge({ lang, i18n, messages }) + }) + + i18nHandler = (key, value) => vueI18n.global.t(key, value) + + return vueI18n + } + + if (app && app.config && app.config.globalProperties) { + app.config.globalProperties.$t = t + } + + return merge({ lang, i18n, messages }) +} + +export { zhCN, enUS } + +export default { + use, + t, + i18n, + initI18n, + extend, + zhCN, + enUS +} diff --git a/packages/milestone/index.js b/packages/milestone/index.js new file mode 100644 index 000000000..d8beb1146 --- /dev/null +++ b/packages/milestone/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Milestone from './src/index' +import '@opentiny/vue-theme/milestone/index.css' + +/* istanbul ignore next */ +Milestone.install = function (Vue) { + Vue.component(Milestone.name, Milestone) +} + +Milestone.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Milestone.install(window.Vue) + } +} + +export default Milestone diff --git a/packages/milestone/package.json b/packages/milestone/package.json new file mode 100644 index 000000000..97d369c52 --- /dev/null +++ b/packages/milestone/package.json @@ -0,0 +1,18 @@ +{ + "name": "@opentiny/vue-milestone", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0", + "@opentiny/vue-tooltip": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/milestone/src/index.js b/packages/milestone/src/index.js new file mode 100644 index 000000000..c27ca1b09 --- /dev/null +++ b/packages/milestone/src/index.js @@ -0,0 +1,96 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const $constants = { + DEFAULT_COLOR: '#1890FF', + DEFAULT_BACK_COLOR: '#FFFFFF', + BOX_SHADOW_PX: '0px 0px 0px 4px', + FLAG_CONTENT_CLS: '.content' +} + +const template = function () { + return PCTemplate +} + +export default { + name: $prefix + 'Milestone', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + showNumber: { + type: Boolean, + default: true + }, + solid: { + type: Boolean, + default: false + }, + lineStyle: { + type: [String, Number], + default: 1 + }, + flagBefore: { + type: Boolean, + default: false + }, + completedField: { + type: String, + default: 'completed' + }, + milestonesStatus: { + type: Object, + default: () => ({}) + }, + statusField: { + type: String, + default: 'status' + }, + nameField: { + type: String, + default: 'name' + }, + flagField: { + type: String, + default: 'flags' + }, + flagNameField: { + type: String, + default: 'name' + }, + flagContentField: { + type: String, + default: 'content' + }, + flagStatusField: { + type: String, + default: 'status' + }, + timeField: { + type: String, + default: 'time' + }, + data: [Object, Array], + space: Number, + start: { + type: Number, + default: -1 + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/milestone/src/pc.vue b/packages/milestone/src/pc.vue new file mode 100644 index 000000000..efe79e518 --- /dev/null +++ b/packages/milestone/src/pc.vue @@ -0,0 +1,129 @@ + + + + diff --git a/packages/mini-picker/index.js b/packages/mini-picker/index.js new file mode 100644 index 000000000..f913e6d94 --- /dev/null +++ b/packages/mini-picker/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import MiniPicker from './src/index.vue' +import '@opentiny/vue-theme-mobile/mini-picker/index.css' + +/* istanbul ignore next */ +MiniPicker.install = function (Vue) { + Vue.component(MiniPicker.name, MiniPicker) +} + +MiniPicker.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + MiniPicker.install(window.Vue) + } +} + +export default MiniPicker diff --git a/packages/mini-picker/package.json b/packages/mini-picker/package.json new file mode 100644 index 000000000..1fbcab699 --- /dev/null +++ b/packages/mini-picker/package.json @@ -0,0 +1,18 @@ +{ + "name": "@opentiny/vue-mini-picker", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-locale": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-picker-column": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/mini-picker/src/index.vue b/packages/mini-picker/src/index.vue new file mode 100644 index 000000000..63996701c --- /dev/null +++ b/packages/mini-picker/src/index.vue @@ -0,0 +1,110 @@ + + + + diff --git a/packages/modal/index.js b/packages/modal/index.js new file mode 100644 index 000000000..74d38febb --- /dev/null +++ b/packages/modal/index.js @@ -0,0 +1,121 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { createComponent, setupComponent } from '@opentiny/vue-common' +import { MsgQueue } from '@opentiny/vue-renderless/modal' +import TINYModal from './src/index.vue' +import '@opentiny/vue-theme/modal/index.css' + +TINYModal.version = process.env.COMPONENT_VERSION + +TINYModal.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +export function Modal(options) { + return new Promise((resolve) => { + if (options && options.id && MsgQueue.some((comp) => comp.id === options.id)) { + resolve('exist') + } else { + let events = options.events || {} + let $modal + + options.events = { + ...events, + hide(params) { + events.hide && events.hide.call(this, params) + + $modal.beforeUnmouted() + resolve(params.type) + } + } + + $modal = createComponent({ + el: document.createElement('div'), + propsData: options, + component: TINYModal + }) + + $modal.open() + } + }) +} + +const modal = Modal + +const types = ['alert', 'confirm', 'message'] + +types.forEach((type, index) => { + let defOpts = { showFooter: true } + + if (index === 2) { + defOpts = { + mask: false, + lockView: false, + showHeader: false + } + } + + defOpts.type = type + + if (index === 1) { + defOpts.status = 'question' + } + + TINYModal[type] = Modal[type] = function (message, title, options) { + let opts + + if (typeof message === 'object' && message !== null) { + opts = message + } else if (title) { + opts = { title } + } + + if (message === undefined || message === null) { + message = '' + } + + return modal({ + message: message.toString(), + type, + ...defOpts, + ...opts, + ...options + }) + } +}) + +export let alert = Modal.alert +export let message = Modal.message +export let confirm = Modal.confirm + +TINYModal.installed = false +setupComponent.TINYModal = { + install(Vue) { + if (TINYModal.installed) return + + Vue.component(TINYModal.name, TINYModal) + + TINYModal.installed = true + }, + init(root) { + root.$alert = Modal.alert + root.$message = Modal.message + root.$confirm = Modal.confirm + } +} + +TINYModal.install = function (Vue) { + setupComponent.TINYModal.install(Vue) +} + +export default TINYModal diff --git a/packages/modal/package.json b/packages/modal/package.json new file mode 100644 index 000000000..9a773939d --- /dev/null +++ b/packages/modal/package.json @@ -0,0 +1,18 @@ +{ + "name": "@opentiny/vue-modal", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-button": "~0.1.0", + "@opentiny/vue-locale": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/modal/src/index.vue b/packages/modal/src/index.vue new file mode 100644 index 000000000..ba344ade1 --- /dev/null +++ b/packages/modal/src/index.vue @@ -0,0 +1,293 @@ + + diff --git a/packages/month-range/index.js b/packages/month-range/index.js new file mode 100644 index 000000000..1d6f40669 --- /dev/null +++ b/packages/month-range/index.js @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import MonthRange from './src/index.vue' + +/* istanbul ignore next */ +MonthRange.install = function (Vue) { + Vue.component(MonthRange.name, MonthRange) +} + +MonthRange.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + MonthRange.install(window.Vue) + } +} + +export default MonthRange diff --git a/packages/month-range/package.json b/packages/month-range/package.json new file mode 100644 index 000000000..432c6b27f --- /dev/null +++ b/packages/month-range/package.json @@ -0,0 +1,18 @@ +{ + "name": "@opentiny/vue-month-range", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-locale": "~0.1.0", + "@opentiny/vue-month-table": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/month-range/src/index.vue b/packages/month-range/src/index.vue new file mode 100644 index 000000000..15bedb79d --- /dev/null +++ b/packages/month-range/src/index.vue @@ -0,0 +1,127 @@ + + + + diff --git a/packages/month-table/index.js b/packages/month-table/index.js new file mode 100644 index 000000000..4dfe72540 --- /dev/null +++ b/packages/month-table/index.js @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import MonthTable from './src/index.vue' + +/* istanbul ignore next */ +MonthTable.install = function (Vue) { + Vue.component(MonthTable.name, MonthTable) +} + +MonthTable.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + MonthTable.install(window.Vue) + } +} + +export default MonthTable diff --git a/packages/month-table/package.json b/packages/month-table/package.json new file mode 100644 index 000000000..a546113a0 --- /dev/null +++ b/packages/month-table/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-month-table", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-locale": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/month-table/src/index.vue b/packages/month-table/src/index.vue new file mode 100644 index 000000000..3a46a07d4 --- /dev/null +++ b/packages/month-table/src/index.vue @@ -0,0 +1,55 @@ + + + + diff --git a/packages/nav-bar/index.js b/packages/nav-bar/index.js new file mode 100644 index 000000000..2128d9d6e --- /dev/null +++ b/packages/nav-bar/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import NavBar from './src/index.vue' +import '@opentiny/vue-theme-mobile/nav-bar/index.css' + +/* istanbul ignore next */ +NavBar.install = function (Vue) { + Vue.component(NavBar.name, NavBar) +} + +NavBar.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + NavBar.install(window.Vue) + } +} + +export default NavBar diff --git a/packages/nav-bar/package.json b/packages/nav-bar/package.json new file mode 100644 index 000000000..43d73513b --- /dev/null +++ b/packages/nav-bar/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-nav-bar", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/nav-bar/src/index.vue b/packages/nav-bar/src/index.vue new file mode 100644 index 000000000..c9bedcdba --- /dev/null +++ b/packages/nav-bar/src/index.vue @@ -0,0 +1,90 @@ + + diff --git a/packages/nav-menu/index.js b/packages/nav-menu/index.js new file mode 100644 index 000000000..0c6d4bd75 --- /dev/null +++ b/packages/nav-menu/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import NavMenu from './src/index' +import '@opentiny/vue-theme/nav-menu/index.css' + +/* istanbul ignore next */ +NavMenu.install = function (Vue) { + Vue.component(NavMenu.name, NavMenu) +} + +NavMenu.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + NavMenu.install(window.Vue) + } +} + +export default NavMenu diff --git a/packages/nav-menu/package.json b/packages/nav-menu/package.json new file mode 100644 index 000000000..07bcfc14e --- /dev/null +++ b/packages/nav-menu/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-nav-menu", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-locale": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/nav-menu/src/index.js b/packages/nav-menu/src/index.js new file mode 100644 index 000000000..ccd61af1d --- /dev/null +++ b/packages/nav-menu/src/index.js @@ -0,0 +1,45 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const template = () => PCTemplate + +export default { + name: $prefix + 'NavMenu', + props: { + ...$props, + data: Array, + overflow: { + type: String, + default: 'auto', + validator(value) { + return /^(auto|retract|fixed|hidden)$/.test(value) + } + }, + parentKey: String, + beforeSkip: Function, + fetchMenuData: Function, + fields: Object, + prevent: { + type: Boolean, + default: false + }, + allowFullUrl: { + type: Boolean, + default: false + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/nav-menu/src/pc.vue b/packages/nav-menu/src/pc.vue new file mode 100644 index 000000000..8ec09869b --- /dev/null +++ b/packages/nav-menu/src/pc.vue @@ -0,0 +1,124 @@ + + + + diff --git a/packages/notify/index.js b/packages/notify/index.js new file mode 100644 index 000000000..bc75899dd --- /dev/null +++ b/packages/notify/index.js @@ -0,0 +1,151 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ + +import { createComponent } from '@opentiny/vue-common' +import NotifyConstructor from './src/index.vue' +import '@opentiny/vue-theme/notify/index.css' +import { iconSuccessful, iconError, iconInfoSolid, iconWarning } from '@opentiny/vue-icon' + +let seed = 1 +let instances = [] + +const IconMap = { + warning: iconWarning(), + error: iconError(), + info: iconInfoSolid(), + success: iconSuccessful() +} + +const positionList = ['top-right', 'bottom-right'] + +const debounce = (fn, debounceDelay) => { + let timer = null + + return async function () { + if (timer) { + clearTimeout(timer) + } + + let instance = null + + await new Promise((resolve) => { + timer = setTimeout(() => { + instance = fn.apply(this, arguments) + timer = null + + resolve() + }, debounceDelay) + }) + + return instance + } +} + +const notify = (options) => { + if (!~Object.keys(IconMap).indexOf(options.type)) { + options.type = 'info' + } + + options.position = !~positionList.indexOf(options.position) ? 'bottom-right' : options.position + !options.statusIcon && options.type && (options.statusIcon = IconMap[options.type]) + + const id = 'notify_' + seed++ + const userOnClose = options.onClose + const position = options.position + + options.onClose = function () { + Notify.close(id, userOnClose) + } + + const instance = createComponent({ + el: document.createElement('div'), + propsData: options, + component: NotifyConstructor + }) + instance.id = id + document.body.appendChild(instance.$el) + + let verticalOffset = options.offset || 0 + + instances + .filter((item) => item.state.position === position) + .forEach((item) => { + verticalOffset += item.$el.offsetHeight + 16 + }) + + verticalOffset += options.verticalOffset ? Number(options.verticalOffset) : 16 + instances.push(instance) + + instance.dom = instance.$el + instance.dom.style.zIndex = instance.getZindex() + instance.state.verticalOffset = verticalOffset + instance.state.visible = true + + return instance +} + +const Notify = (options) => { + let { debounceDelay } = options + + if (debounceDelay) { + return debounce(() => notify(options), debounceDelay) + } else { + return notify(options) + } +} +Notify.close = function (id, userOnClose) { + let index = -1 + let len = instances.length + let instance + + for (let i = 0; i < len; i++) { + let tmp = instances[i] + if (tmp.id === id) { + index = i + instance = tmp + break + } + } + + if (!instance) { + return + } + + typeof userOnClose === 'function' && userOnClose(instance) + instance.$el.parentNode.removeChild(instance.$el) + instances.splice(index, 1) + + if (len <= 1) { + return + } + + let removedPosition = instance.position + let copys = instances.slice(index) + + copys.forEach((copy) => { + if (copy.position === removedPosition) { + let height = parseInt(copy.dom.style[instance.state.verticalProperty], 10) - copy.$el.offsetHeight - 16 + copy.dom.style[instance.state.verticalProperty] = height + 'px' + } + }) +} + +Notify.closeAll = function () { + let copys = instances.slice(0) + + copys = copys.reverse() + copys.forEach((instance) => { + instance.close() + }) +} + +export default Notify diff --git a/packages/notify/package.json b/packages/notify/package.json new file mode 100644 index 000000000..e2444509b --- /dev/null +++ b/packages/notify/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-notify", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/notify/src/index.vue b/packages/notify/src/index.vue new file mode 100644 index 000000000..a6aebcbc9 --- /dev/null +++ b/packages/notify/src/index.vue @@ -0,0 +1,119 @@ + + diff --git a/packages/numeric/index.js b/packages/numeric/index.js new file mode 100644 index 000000000..f7b93e2c3 --- /dev/null +++ b/packages/numeric/index.js @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Numeric from './src/index' + +Numeric.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +Numeric.install = function (Vue) { + Vue.component(Numeric.name, Numeric) +} + +Numeric.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Numeric.install(window.Vue) + } +} + +export default Numeric diff --git a/packages/numeric/package.json b/packages/numeric/package.json new file mode 100644 index 000000000..57b7e239a --- /dev/null +++ b/packages/numeric/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-numeric", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/numeric/src/index.js b/packages/numeric/src/index.js new file mode 100644 index 000000000..4caae7f75 --- /dev/null +++ b/packages/numeric/src/index.js @@ -0,0 +1,126 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' +import MobileTemplate from './mobile' + +const $constants = { + MAX: 'aria-valuemax', + MIN: 'aria-valuemin', + VALUENOW: 'aria-valuenow', + DISABLED: 'aria-disabled', + KEY: 'role', + VALUE: 'spinbutton', + EVENT_NAME: { + blur: 'form.blur', + change: 'form.change' + }, + COMPONENT_NAME: 'FormItem' +} + +const template = (mode) => { + if (process.env.TINY_MODE === 'pc') return PCTemplate + else if (process.env.TINY_MODE === 'mobile') return MobileTemplate + else return mode === 'mobile' ? MobileTemplate : PCTemplate +} + +export default { + name: $prefix + 'Numeric', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + allowEmpty: { + type: Boolean, + default: false + }, + circulate: Boolean, + controls: { + type: Boolean, + default: true + }, + controlsPosition: { + type: String, + default: '' + }, + disabled: Boolean, + format: [Object, String], + hideUnit: { + type: Boolean, + default: false + }, + holdZero: { + type: Boolean, + default: true + }, + label: String, + max: { + type: [Number, String], + default: Infinity + }, + min: { + type: [Number, String], + default: -Infinity + }, + modelTruncation: { + type: Boolean, + default: true + }, + modelValue: {}, + mouseWheel: Boolean, + name: String, + placeholder: String, + plugin: Function, + precision: { + type: Number, + validator(val) { + return val >= 0 && val === parseInt(val, 10) + } + }, + size: String, + step: { + type: [Number, String], + default: 1 + }, + stepStrictly: { + type: Boolean, + default: false + }, + strictInput: { + type: Boolean, + default: false + }, + stringMode: Boolean, + tabindex: { + type: String, + default: '1' + }, + theme: { + type: String, + default: '' + }, + unit: String, + unitCenter: { + type: Boolean, + default: false + }, + validateEvent: { + type: Boolean, + default: true + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/numeric/src/mobile.vue b/packages/numeric/src/mobile.vue new file mode 100644 index 000000000..59217fec7 --- /dev/null +++ b/packages/numeric/src/mobile.vue @@ -0,0 +1,106 @@ + + + + diff --git a/packages/numeric/src/pc.vue b/packages/numeric/src/pc.vue new file mode 100644 index 000000000..5ce7b0f99 --- /dev/null +++ b/packages/numeric/src/pc.vue @@ -0,0 +1,129 @@ + + + + diff --git a/packages/option-group/index.js b/packages/option-group/index.js new file mode 100644 index 000000000..976d63266 --- /dev/null +++ b/packages/option-group/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import OptionGroup from './src/index.vue' +import '@opentiny/vue-theme/option-group/index.css' + +/* istanbul ignore next */ +OptionGroup.install = function (Vue) { + Vue.component(OptionGroup.name, OptionGroup) +} + +OptionGroup.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + OptionGroup.install(window.Vue) + } +} + +export default OptionGroup diff --git a/packages/option-group/package.json b/packages/option-group/package.json new file mode 100644 index 000000000..d5d71f732 --- /dev/null +++ b/packages/option-group/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-option-group", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/option-group/src/index.vue b/packages/option-group/src/index.vue new file mode 100644 index 000000000..4bc7362d3 --- /dev/null +++ b/packages/option-group/src/index.vue @@ -0,0 +1,41 @@ + + + + diff --git a/packages/option/index.js b/packages/option/index.js new file mode 100644 index 000000000..6a91783bf --- /dev/null +++ b/packages/option/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Option from './src/index.vue' +import '@opentiny/vue-theme/option/index.css' + +/* istanbul ignore next */ +Option.install = function (Vue) { + Vue.component(Option.name, Option) +} + +Option.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Option.install(window.Vue) + } +} + +export default Option diff --git a/packages/option/package.json b/packages/option/package.json new file mode 100644 index 000000000..878975005 --- /dev/null +++ b/packages/option/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-option", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/option/src/index.vue b/packages/option/src/index.vue new file mode 100644 index 000000000..3bac2e2e5 --- /dev/null +++ b/packages/option/src/index.vue @@ -0,0 +1,74 @@ + + + + diff --git a/packages/pager-item/index.js b/packages/pager-item/index.js new file mode 100644 index 000000000..fe150cfc9 --- /dev/null +++ b/packages/pager-item/index.js @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import PagerItem from './src/index.vue' + +/* istanbul ignore next */ +PagerItem.install = function (Vue) { + Vue.component(PagerItem.name, PagerItem) +} + +PagerItem.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + PagerItem.install(window.Vue) + } +} + +export default PagerItem diff --git a/packages/pager-item/package.json b/packages/pager-item/package.json new file mode 100644 index 000000000..c812b03fd --- /dev/null +++ b/packages/pager-item/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-pager-item", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0", + "@opentiny/vue-locale": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/pager-item/src/index.vue b/packages/pager-item/src/index.vue new file mode 100644 index 000000000..784ed975d --- /dev/null +++ b/packages/pager-item/src/index.vue @@ -0,0 +1,66 @@ + + + + diff --git a/packages/pager/index.js b/packages/pager/index.js new file mode 100644 index 000000000..14d8a71b8 --- /dev/null +++ b/packages/pager/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Pager from './src/index.vue' +import '@opentiny/vue-theme/pager/index.css' + +/* istanbul ignore next */ +Pager.install = function (Vue) { + Vue.component(Pager.name, Pager) +} + +Pager.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Pager.install(window.Vue) + } +} + +export default Pager diff --git a/packages/pager/package.json b/packages/pager/package.json new file mode 100644 index 000000000..c97442b30 --- /dev/null +++ b/packages/pager/package.json @@ -0,0 +1,19 @@ +{ + "name": "@opentiny/vue-pager", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0", + "@opentiny/vue-popover": "~0.1.0", + "@opentiny/vue-locale": "~0.1.0", + "@opentiny/vue-pager-item": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/pager/src/index.vue b/packages/pager/src/index.vue new file mode 100644 index 000000000..af56ef743 --- /dev/null +++ b/packages/pager/src/index.vue @@ -0,0 +1,649 @@ + + diff --git a/packages/panel/index.js b/packages/panel/index.js new file mode 100644 index 000000000..a26382426 --- /dev/null +++ b/packages/panel/index.js @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Panel from './src/index' + +/* istanbul ignore next */ +Panel.install = function (Vue) { + Vue.component(Panel.name, Panel) +} + +Panel.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Panel.install(window.Vue) + } +} + +export default Panel diff --git a/packages/panel/package.json b/packages/panel/package.json new file mode 100644 index 000000000..262260e3c --- /dev/null +++ b/packages/panel/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-panel", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/panel/src/index.js b/packages/panel/src/index.js new file mode 100644 index 000000000..87c046075 --- /dev/null +++ b/packages/panel/src/index.js @@ -0,0 +1,51 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $prefix, $props, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const template = () => PCTemplate + +export default { + name: $prefix + 'Panel', + props: { + ...$props, + expand: { + type: Boolean, + default: true + }, + foot: { + type: String + }, + head: { + type: String + }, + iconOpen: { + type: String, + default: 'icon-chevron-down' + }, + iconClose: { + type: String, + default: 'icon-chevron-right' + }, + isToggle: { + type: Boolean, + default: false + }, + transition: { + type: String, + default: 'panel' + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/panel/src/pc.vue b/packages/panel/src/pc.vue new file mode 100644 index 000000000..1e1c6b6a3 --- /dev/null +++ b/packages/panel/src/pc.vue @@ -0,0 +1,57 @@ + + + + diff --git a/packages/picker-column/index.js b/packages/picker-column/index.js new file mode 100644 index 000000000..5ee4da01c --- /dev/null +++ b/packages/picker-column/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import PickerColumn from './src/index.vue' +import '@opentiny/vue-theme-mobile/picker-column/index.css' + +/* istanbul ignore next */ +PickerColumn.install = function (Vue) { + Vue.component(PickerColumn.name, PickerColumn) +} + +PickerColumn.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + PickerColumn.install(window.Vue) + } +} + +export default PickerColumn diff --git a/packages/picker-column/package.json b/packages/picker-column/package.json new file mode 100644 index 000000000..cd3779fd4 --- /dev/null +++ b/packages/picker-column/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-picker-column", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/picker-column/src/index.vue b/packages/picker-column/src/index.vue new file mode 100644 index 000000000..0850537b5 --- /dev/null +++ b/packages/picker-column/src/index.vue @@ -0,0 +1,56 @@ + + + + diff --git a/packages/picker/index.js b/packages/picker/index.js new file mode 100644 index 000000000..817613b64 --- /dev/null +++ b/packages/picker/index.js @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Picker from './src/index.vue' +import '@opentiny/vue-theme/picker/index.css' +import '@opentiny/vue-theme/input/index.css' + +Picker.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +Picker.install = function (Vue) { + Vue.component(Picker.name, Picker) +} + +Picker.version = process.env.COMPONENT_VERSION + +export default Picker diff --git a/packages/picker/package.json b/packages/picker/package.json new file mode 100644 index 000000000..cb464a144 --- /dev/null +++ b/packages/picker/package.json @@ -0,0 +1,24 @@ +{ + "name": "@opentiny/vue-picker", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-input": "~0.1.0", + "@opentiny/vue-locale": "~0.1.0", + "@opentiny/vue-date-panel": "~0.1.0", + "@opentiny/vue-date-range": "~0.1.0", + "@opentiny/vue-month-range": "~0.1.0", + "@opentiny/vue-time": "~0.1.0", + "@opentiny/vue-time-range": "~0.1.0", + "@opentiny/vue-time-panel": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/picker/src/index.vue b/packages/picker/src/index.vue new file mode 100644 index 000000000..077a7b9e1 --- /dev/null +++ b/packages/picker/src/index.vue @@ -0,0 +1,257 @@ + + + + diff --git a/packages/pop-upload/index.js b/packages/pop-upload/index.js new file mode 100644 index 000000000..e6061091c --- /dev/null +++ b/packages/pop-upload/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import PopUpload from './src/index' +import '@opentiny/vue-theme/pop-upload/index.css' + +/* istanbul ignore next */ +PopUpload.install = function (Vue) { + Vue.component(PopUpload.name, PopUpload) +} + +PopUpload.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + PopUpload.install(window.Vue) + } +} + +export default PopUpload diff --git a/packages/pop-upload/package.json b/packages/pop-upload/package.json new file mode 100644 index 000000000..d903d44a8 --- /dev/null +++ b/packages/pop-upload/package.json @@ -0,0 +1,21 @@ +{ + "name": "@opentiny/vue-pop-upload", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-alert": "~0.1.0", + "@opentiny/vue-button": "~0.1.0", + "@opentiny/vue-modal": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0", + "@opentiny/vue-file-upload": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/pop-upload/src/index.js b/packages/pop-upload/src/index.js new file mode 100644 index 000000000..1dd778a00 --- /dev/null +++ b/packages/pop-upload/src/index.js @@ -0,0 +1,99 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const $constants = { + KB: 'KB', + FILE_NAME: 'ui.popupload.fileName', + FILE_SIZE: 'ui.popupload.fileSize', + FILE_STATUS: 'ui.popupload.fileStatus', + DIALOG_TITLE: 'ui.popupload.dialogTitle', + UPLOAD_ERROR: 'ui.popupload.uploadError', + ERROR_NUM_TIPS: 'ui.popupload.errorNumTips', + UPLOAD_SUCCESS: 'ui.popupload.uploadSuccess', + TIPS_TITLE_TEXT: 'ui.popupload.tipsFileText', + ERROR_TYPE_TIPS: 'ui.popupload.errorTypeTips', + ERROR_SIZE_TIPS: 'ui.popupload.errorSizeTips', + SAVE_BUTTON_TEXT: 'ui.popupload.saveButtonText', + UPLOAD_BUTTON_TEXT: 'ui.popupload.uploadButtonText', + CANCEL_BUTTTON_TEXT: 'ui.popupload.cancelButtonText', + UPLOADS_BUTTON_TEXT: 'ui.popupload.uploadsButtonText', + LIMIT_UPLOAD_FILE_TYPE: 'ui.popupload.limitUploadFileType', + LIMIT_UPLOAD_FILE_SIZE: 'ui.popupload.limitUploadFileSize', + LIMIT_UPLOAD_FILE_NUMBER: 'ui.popupload.limitUploadFileNumber' +} + +const template = function () { + return PCTemplate +} + +export default { + name: $prefix + 'PopUpload', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + size: String, + data: Object, + uploadName: String, + dialogTitle: { + type: String, + default: '' + }, + action: { + type: String, + default: '' + }, + uploadButtonText: { + type: String, + default: '' + }, + headers: { + type: Object, + default: () => ({}) + }, + withCredentials: { + type: Boolean, + default: false + }, + limit: Number, + multiple: Boolean, + disabled: { + type: Boolean, + default: false + }, + filters: { + type: Object, + default: () => ({}) + }, + accept: String, + submitButtonText: { + typee: String, + default: '' + }, + cancelButtonText: { + typee: String, + default: '' + }, + uploadFileType: Array, + beforeUpload: Function, + beforeRemove: Function, + maxUploadFileSize: Number, + httpRequest: Function + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/pop-upload/src/pc.vue b/packages/pop-upload/src/pc.vue new file mode 100644 index 000000000..8cae3faae --- /dev/null +++ b/packages/pop-upload/src/pc.vue @@ -0,0 +1,148 @@ + + + + diff --git a/packages/popeditor/index.js b/packages/popeditor/index.js new file mode 100644 index 000000000..136170145 --- /dev/null +++ b/packages/popeditor/index.js @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Popeditor from './src/index' +import '@opentiny/vue-theme/popeditor/index.css' + +Popeditor.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +Popeditor.install = function (Vue) { + Vue.component(Popeditor.name, Popeditor) +} + +Popeditor.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Popeditor.install(window.Vue) + } +} + +export default Popeditor diff --git a/packages/popeditor/package.json b/packages/popeditor/package.json new file mode 100644 index 000000000..494f5357e --- /dev/null +++ b/packages/popeditor/package.json @@ -0,0 +1,21 @@ +{ + "name": "@opentiny/vue-popeditor", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-input": "~0.1.0", + "@opentiny/vue-grid": "~0.1.0", + "@opentiny/vue-pager": "~0.1.0", + "@opentiny/vue-dialog-box": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/popeditor/src/index.js b/packages/popeditor/src/index.js new file mode 100644 index 000000000..0e47fe7ce --- /dev/null +++ b/packages/popeditor/src/index.js @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import { iconPopup, iconSearch } from '@opentiny/vue-icon' +import PCTemplate from './pc' + +const $constants = { + TITLE: 'ui.popeditor.title', + COLUMNS_TYPE: { + selection: 'selection', + radio: 'radio', + index: 'index', + width: 40 + }, + GRID_REF: { + history: 'historyGrid', + source: 'sourceGrid' + }, + TAG_NAME: 'INPUT', + MODAL_WIDTH: { + multi: 900, + radio: 600 + }, + ACTIVE_NAME: { + history: 'history', + source: 'source' + }, + TYPE_GRID: 'grid', + TYPE_TREE: 'tree', + ID: 'id', + LABEL: 'label' +} + +const template = function () { + return PCTemplate +} + +export default { + name: $prefix + 'Popeditor', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + modelValue: { + type: [String, Number, Array], + default: '' + }, + tabindex: { + type: String, + default: '1' + }, + placeholder: { + type: String, + default: '' + }, + size: String, + trigger: { + type: String, + default: 'default' + }, + icon: { + type: Object, + default() { + return iconPopup() + } + }, + iconSearch: { + type: Object, + default() { + return iconSearch() + } + }, + title: { + type: String, + default: '' + }, + textField: { + type: String, + default: 'label' + }, + textSplit: { + type: String, + default: '/' + }, + valueField: { + type: String, + default: 'id' + }, + valueSplit: { + type: String, + default: ';' + }, + popseletor: { + type: String, + default: 'grid', + validator(value) { + return ['grid', 'tree'].indexOf(value) !== -1 + } + }, + conditions: { + type: Array, + default() { + return [] + } + }, + width: { + type: [String, Number], + default: '' + }, + gridOp: { + type: Object, + default() { + return { + columns: [], + data: [] + } + } + }, + remoteSearch: Function, + dataset: Object, + alwaysLoad: { + type: Boolean, + default: false + }, + treeOp: { + type: Object, + default() { + return { + data: [] + } + } + }, + pagerOp: { + type: Object, + default() { + return {} + } + }, + disabled: { + type: Boolean, + default: false + }, + readonly: { + type: Boolean, + default: true + }, + multi: { + type: Boolean, + default: false + }, + showClearBtn: { + type: Boolean, + default: true + }, + showPager: { + type: Boolean, + default: false + }, + showHistory: { + type: Boolean, + default: false + }, + autoLookup: { + type: Boolean, + default: true + }, + beforeReset: Function, + resize: { + type: Boolean, + default: false + }, + dialogClass: { + type: String, + default: '' + }, + textRenderSource: Function, + draggable: { + type: Boolean, + default: true + }, + placement: { + type: String, + default: 'bottom-start' + }, + popperAppendToBody: { + type: Boolean, + default: true + }, + suggest: Boolean, + beforeClose: { + type: Function, + default: () => () => true + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/popeditor/src/pc.vue b/packages/popeditor/src/pc.vue new file mode 100644 index 000000000..d39b61f07 --- /dev/null +++ b/packages/popeditor/src/pc.vue @@ -0,0 +1,314 @@ + + + + diff --git a/packages/popover/index.js b/packages/popover/index.js new file mode 100644 index 000000000..5bfa0c06a --- /dev/null +++ b/packages/popover/index.js @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Popover from './src/index' +import '@opentiny/vue-theme/popover/index.css' + +/* istanbul ignore next */ +Popover.install = function (Vue) { + Vue.component(Popover.name, Popover) +} + +Popover.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +Popover.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Popover.install(window.Vue) + } +} + +export default Popover diff --git a/packages/popover/package.json b/packages/popover/package.json new file mode 100644 index 000000000..be54560d3 --- /dev/null +++ b/packages/popover/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-popover", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/popover/src/index.js b/packages/popover/src/index.js new file mode 100644 index 000000000..1676e5f4f --- /dev/null +++ b/packages/popover/src/index.js @@ -0,0 +1,99 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' +import MobileTemplate from './mobile' + +const template = (mode) => { + if (process.env.TINY_MODE === 'pc') return PCTemplate + else if (process.env.TINY_MODE === 'mobile') return MobileTemplate + else return mode === 'mobile' ? MobileTemplate : PCTemplate +} + +export default { + inheritAttrs: true, + name: $prefix + 'Popover', + props: { + ...$props, + appendToBody: { + type: Boolean, + default: true + }, + arrowOffset: { + type: Number, + default: 0 + }, + boundariesPadding: { + type: Number, + default: 5 + }, + closeDelay: { + type: Number, + default: 200 + }, + content: String, + disabled: Boolean, + modelValue: Boolean, + offset: { + default: 0 + }, + openDelay: { + type: Number, + default: 0 + }, + placement: { + type: String, + default: 'bottom' + }, + popper: {}, + popperClass: String, + popperOptions: { + type: Object, + default: () => ({ gpuAcceleration: false }) + }, + reference: {}, + tabindex: { + type: Number, + default: 0 + }, + title: String, + transformOrigin: { + type: [Boolean, String], + default: true + }, + transition: { + type: String, + default: 'fade-in-linear' + }, + trigger: { + type: String, + default: 'click', + validator: (value) => ~['click', 'focus', 'hover', 'manual'].indexOf(value) + }, + visibleArrow: { + default: true + }, + width: { + type: [String, Number] + }, + height: { + type: [String, Number] + }, + maxHeight: { + type: [String, Number] + }, + listData: [Object, Array] + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/popover/src/index.vue b/packages/popover/src/index.vue new file mode 100644 index 000000000..64b019560 --- /dev/null +++ b/packages/popover/src/index.vue @@ -0,0 +1,113 @@ + + + + diff --git a/packages/popover/src/mobile.vue b/packages/popover/src/mobile.vue new file mode 100644 index 000000000..246029c06 --- /dev/null +++ b/packages/popover/src/mobile.vue @@ -0,0 +1,54 @@ + + + + diff --git a/packages/popover/src/pc.vue b/packages/popover/src/pc.vue new file mode 100644 index 000000000..bc7f20471 --- /dev/null +++ b/packages/popover/src/pc.vue @@ -0,0 +1,42 @@ + + + + diff --git a/packages/popup/index.js b/packages/popup/index.js new file mode 100644 index 000000000..1e7115104 --- /dev/null +++ b/packages/popup/index.js @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Popup from './src/index.vue' +import '@opentiny/vue-theme-mobile/popup/index.css' + +Popup.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +Popup.install = function (Vue) { + Vue.component(Popup.name, Popup) +} + +Popup.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Popup.install(window.Vue) + } +} + +export default Popup diff --git a/packages/popup/package.json b/packages/popup/package.json new file mode 100644 index 000000000..b01a0bded --- /dev/null +++ b/packages/popup/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-popup", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/popup/src/index.vue b/packages/popup/src/index.vue new file mode 100644 index 000000000..d4533d5fc --- /dev/null +++ b/packages/popup/src/index.vue @@ -0,0 +1,102 @@ + + + + diff --git a/packages/progress/index.js b/packages/progress/index.js new file mode 100644 index 000000000..2d7bc1cc8 --- /dev/null +++ b/packages/progress/index.js @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Progress from './src/index' + +/* istanbul ignore next */ +Progress.install = function (Vue) { + Vue.component(Progress.name, Progress) +} + +Progress.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Progress.install(window.Vue) + } +} + +export default Progress diff --git a/packages/progress/package.json b/packages/progress/package.json new file mode 100644 index 000000000..57c13bb94 --- /dev/null +++ b/packages/progress/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-progress", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/progress/src/index.js b/packages/progress/src/index.js new file mode 100644 index 000000000..c8d46f374 --- /dev/null +++ b/packages/progress/src/index.js @@ -0,0 +1,95 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' +import MobileTemplate from './mobile' + +const $constants = { + PROGRESS_TYPE: { + LINE: 'line', + CIRCLE: 'circle', + DASHBOARD: 'dashboard' + }, + PROGRESS_STATUS: { + SUCCESS: 'success', + EXCEPTION: 'exception', + WARNING: 'warning' + }, + STATUS_TO_COLOR: { + success: '#13ce66', + exception: '#ff4949', + warning: '#e6a23c' + }, + STATUS_DEFAULT_COLOR: '#20a0ff', + ICON_CIRCLE_WARNING: 'icon-warning', + ICON_CIRCLE_SUCCESS: 'icon-successful', + ICON_CIRCLE_EXCEPTION: 'icon-error', + ICON_SUCCESS: 'icon-yes', + ICON_EXCEPTION: 'icon-close', + ICON_WARNING: 'icon-warning' +} + +const template = (mode) => { + if (process.env.TINY_MODE === 'pc') return PCTemplate + else if (process.env.TINY_MODE === 'mobile') return MobileTemplate + else return mode === 'mobile' ? MobileTemplate : PCTemplate +} + +export default { + name: $prefix + 'Progress', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + color: { + type: [String, Array, Function], + default: '' + }, + format: Function, + percentage: { + type: Number, + default: 0, + required: true, + validator: (val) => val >= 0 && val <= 100 + }, + showText: { + type: Boolean, + default: true + }, + status: { + type: String, + validator: (value) => !!$constants.PROGRESS_STATUS[value.toUpperCase()] + }, + strokeWidth: { + type: Number, + default: 6 + }, + textInside: { + type: Boolean, + default: false + }, + type: { + type: String, + default: $constants.PROGRESS_TYPE.LINE, + validator: (value) => !!$constants.PROGRESS_TYPE[value.toUpperCase()] + }, + width: { + type: Number, + default: 126 + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/progress/src/mobile.vue b/packages/progress/src/mobile.vue new file mode 100644 index 000000000..82cc86c8f --- /dev/null +++ b/packages/progress/src/mobile.vue @@ -0,0 +1,84 @@ + + + + diff --git a/packages/progress/src/pc.vue b/packages/progress/src/pc.vue new file mode 100644 index 000000000..0670da8f0 --- /dev/null +++ b/packages/progress/src/pc.vue @@ -0,0 +1,100 @@ + + + + diff --git a/packages/pull-refresh/index.js b/packages/pull-refresh/index.js new file mode 100644 index 000000000..d9b0160ba --- /dev/null +++ b/packages/pull-refresh/index.js @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import PullRefresh from './src/index.vue' + +PullRefresh.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +PullRefresh.install = function (Vue) { + Vue.component(PullRefresh.name, PullRefresh) +} + +PullRefresh.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + PullRefresh.install(window.Vue) + } +} + +export default PullRefresh diff --git a/packages/pull-refresh/package.json b/packages/pull-refresh/package.json new file mode 100644 index 000000000..d2050f6d4 --- /dev/null +++ b/packages/pull-refresh/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-pull-refresh", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-locale": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/pull-refresh/src/index.vue b/packages/pull-refresh/src/index.vue new file mode 100644 index 000000000..d727c2b0f --- /dev/null +++ b/packages/pull-refresh/src/index.vue @@ -0,0 +1,74 @@ + + + + diff --git a/packages/radio-button/index.js b/packages/radio-button/index.js new file mode 100644 index 000000000..0c5859b2e --- /dev/null +++ b/packages/radio-button/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import RadioButton from './src/index' +import '@opentiny/vue-theme/radio-button/index.css' + +/* istanbul ignore next */ +RadioButton.install = function (Vue) { + Vue.component(RadioButton.name, RadioButton) +} + +RadioButton.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + RadioButton.install(window.Vue) + } +} + +export default RadioButton diff --git a/packages/radio-button/package.json b/packages/radio-button/package.json new file mode 100644 index 000000000..48ca6b5e4 --- /dev/null +++ b/packages/radio-button/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-radio-button", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/radio-button/src/index.js b/packages/radio-button/src/index.js new file mode 100644 index 000000000..2a08b0a3e --- /dev/null +++ b/packages/radio-button/src/index.js @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const $constants = { + RADIO_GROUP: 'RadioGroup' +} + +const template = () => PCTemplate + +export default { + name: $prefix + 'RadioButton', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + name: String, + text: String, + events: { + type: Object, + default: () => ({}) + }, + label: {}, + disabled: Boolean + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/radio-button/src/pc.vue b/packages/radio-button/src/pc.vue new file mode 100644 index 000000000..90eed2efa --- /dev/null +++ b/packages/radio-button/src/pc.vue @@ -0,0 +1,59 @@ + + + + diff --git a/packages/radio-group/index.js b/packages/radio-group/index.js new file mode 100644 index 000000000..2b1050875 --- /dev/null +++ b/packages/radio-group/index.js @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import RadioGroup from './src/index' +import '@opentiny/vue-theme/radio-group/index.css' + +RadioGroup.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +RadioGroup.install = function (Vue) { + Vue.component(RadioGroup.name, RadioGroup) +} + +RadioGroup.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + RadioGroup.install(window.Vue) + } +} + +export default RadioGroup diff --git a/packages/radio-group/package.json b/packages/radio-group/package.json new file mode 100644 index 000000000..f602adebf --- /dev/null +++ b/packages/radio-group/package.json @@ -0,0 +1,18 @@ +{ + "name": "@opentiny/vue-radio-group", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-radio": "~0.1.0", + "@opentiny/vue-radio-button": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/radio-group/src/index.js b/packages/radio-group/src/index.js new file mode 100644 index 000000000..86495ba3e --- /dev/null +++ b/packages/radio-group/src/index.js @@ -0,0 +1,40 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const template = () => PCTemplate + +export default { + name: $prefix + 'RadioGroup', + componentName: 'RadioGroup', + props: { + ...$props, + modelValue: {}, + size: String, + fill: String, + textColor: String, + disabled: Boolean, + vertical: Boolean, + options: { + type: Array, + default: () => [] + }, + type: { + type: String, + default: 'radio' + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/radio-group/src/pc.vue b/packages/radio-group/src/pc.vue new file mode 100644 index 000000000..4b13cd5ae --- /dev/null +++ b/packages/radio-group/src/pc.vue @@ -0,0 +1,42 @@ + + + + diff --git a/packages/radio/index.js b/packages/radio/index.js new file mode 100644 index 000000000..1daca433a --- /dev/null +++ b/packages/radio/index.js @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Radio from './src/index' + +Radio.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +Radio.install = function (Vue) { + Vue.component(Radio.name, Radio) +} + +Radio.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Radio.install(window.Vue) + } +} + +export default Radio diff --git a/packages/radio/package.json b/packages/radio/package.json new file mode 100644 index 000000000..3640252ef --- /dev/null +++ b/packages/radio/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-radio", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/radio/src/index.js b/packages/radio/src/index.js new file mode 100644 index 000000000..b09310752 --- /dev/null +++ b/packages/radio/src/index.js @@ -0,0 +1,53 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' +import MobileTemplate from './mobile' + +const $constants = { + RADIO_GROUP: 'RadioGroup' +} + +const template = (mode) => { + if (process.env.TINY_MODE === 'pc') return PCTemplate + else if (process.env.TINY_MODE === 'mobile') return MobileTemplate + else return mode === 'mobile' ? MobileTemplate : PCTemplate +} + +export default { + name: $prefix + 'Radio', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + modelValue: {}, + label: {}, + disabled: Boolean, + name: String, + border: Boolean, + size: String, + text: String, + events: { + type: Object, + default: () => ({}) + }, + tabindex: { + type: String, + default: '1' + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/radio/src/mobile.vue b/packages/radio/src/mobile.vue new file mode 100644 index 000000000..2dd33178c --- /dev/null +++ b/packages/radio/src/mobile.vue @@ -0,0 +1,58 @@ + + + + diff --git a/packages/radio/src/pc.vue b/packages/radio/src/pc.vue new file mode 100644 index 000000000..3629014de --- /dev/null +++ b/packages/radio/src/pc.vue @@ -0,0 +1,70 @@ + + + + diff --git a/packages/rate/index.js b/packages/rate/index.js new file mode 100644 index 000000000..a30aef345 --- /dev/null +++ b/packages/rate/index.js @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Rate from './src/index' +import '@opentiny/vue-theme/rate/index.css' + +Rate.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +Rate.install = function (Vue) { + Vue.component(Rate.name, Rate) +} + +Rate.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Rate.install(window.Vue) + } +} + +export default Rate diff --git a/packages/rate/package.json b/packages/rate/package.json new file mode 100644 index 000000000..e086a6867 --- /dev/null +++ b/packages/rate/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-rate", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/rate/src/index.js b/packages/rate/src/index.js new file mode 100644 index 000000000..e87c34b88 --- /dev/null +++ b/packages/rate/src/index.js @@ -0,0 +1,123 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import { t } from '@opentiny/vue-locale' +import PCTemplate from './pc' + +const $constants = { + RATENODECLS: 'tiny-rate__star', + ICON_PREFIXCLS: '.tiny-rate__icon', + DECIMALCLS: 'tiny-rate__decimal' +} + +const template = function () { + return PCTemplate +} + +export default { + name: $prefix + 'Rate', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + allowHalf: { + type: Boolean, + default: false + }, + colors: { + type: Array, + default: () => ['#FFBB33', '#FFBB33', '#FFBB33'] + }, + disabled: { + type: Boolean, + default: false + }, + disabledVoidColor: { + type: String, + default: 'rgba(25,25,25,0.05)' + }, + disabledVoidIconClass: { + type: String, + default: 'icon-star-active' + }, + highThreshold: { + type: Number, + default: 4 + }, + iconClasses: { + type: Array, + default: () => ['icon-star-active', 'icon-star-active', 'icon-star-active'] + }, + lowThreshold: { + type: Number, + default: 2 + }, + max: { + type: Number, + default: 5 + }, + modelValue: { + type: Number, + default: 0 + }, + radio: { + // 是否单选其他形态 + type: Boolean, + default: false + }, + scoreTemplate: { + type: String, + default: '{value}' + }, + showScore: { + type: Boolean, + default: false + }, + showText: { + type: Boolean, + default: false + }, + size: { + type: String, + default: '16px' + }, + space: { + type: String, + default: '24px' + }, + textColor: { + type: String, + default: '#191919' + }, + textOnBottom: { + type: Boolean, + default: false + }, + texts: { + type: Array, + default: () => [t('ui.rate.level.poor'), t('ui.rate.level.fair'), t('ui.rate.level.average'), t('ui.rate.level.good'), t('ui.rate.level.excellent')] + }, + voidColor: { + type: String, + default: 'rgba(25,25,25,0.05)' + }, + voidIconClass: { + type: String, + default: 'icon-star-active' + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/rate/src/pc.vue b/packages/rate/src/pc.vue new file mode 100644 index 000000000..eede859d2 --- /dev/null +++ b/packages/rate/src/pc.vue @@ -0,0 +1,82 @@ + + + + diff --git a/packages/row/index.js b/packages/row/index.js new file mode 100644 index 000000000..19827c691 --- /dev/null +++ b/packages/row/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Row from './src/index' +import '@opentiny/vue-theme/row/index.css' + +/* istanbul ignore next */ +Row.install = function (Vue) { + Vue.component(Row.name, Row) +} + +Row.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Row.install(window.Vue) + } +} + +export default Row diff --git a/packages/row/package.json b/packages/row/package.json new file mode 100644 index 000000000..9dab2ae37 --- /dev/null +++ b/packages/row/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-row", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/row/src/index.js b/packages/row/src/index.js new file mode 100644 index 000000000..3a2b97fce --- /dev/null +++ b/packages/row/src/index.js @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const template = () => PCTemplate + +export default { + name: $prefix + 'Row', + componentName: 'Row', + props: { + ...$props, + flex: Boolean, + gutter: { + type: Number, + default: 0, + validator(value) { + return value >= 0 + } + }, + justify: { + type: String, + default: 'start', + validator: (value) => ~['start', 'center', 'end', 'space-between', 'space-around'].indexOf(value) + }, + align: { + type: String, + default: 'top', + validator: (value) => ~['top', 'middle', 'bottom'].indexOf(value) + }, + order: { + type: String, + validator: (value) => ~['asc', 'des'].indexOf(value) + }, + tag: { + type: String, + default: 'div' + }, + noSpace: { + type: Boolean, + default: false + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/row/src/pc.vue b/packages/row/src/pc.vue new file mode 100644 index 000000000..f79c7f04c --- /dev/null +++ b/packages/row/src/pc.vue @@ -0,0 +1,28 @@ + + + + diff --git a/packages/scroll-text/index.js b/packages/scroll-text/index.js new file mode 100644 index 000000000..87e5ec54a --- /dev/null +++ b/packages/scroll-text/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import ScrollText from './src/index' +import '@opentiny/vue-theme/scroll-text/index.css' + +/* istanbul ignore next */ +ScrollText.install = function (Vue) { + Vue.component(ScrollText.name, ScrollText) +} + +ScrollText.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + ScrollText.install(window.Vue) + } +} + +export default ScrollText diff --git a/packages/scroll-text/package.json b/packages/scroll-text/package.json new file mode 100644 index 000000000..21345d83c --- /dev/null +++ b/packages/scroll-text/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-scroll-text", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/scroll-text/src/index.js b/packages/scroll-text/src/index.js new file mode 100644 index 000000000..51b42c6a8 --- /dev/null +++ b/packages/scroll-text/src/index.js @@ -0,0 +1,54 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const $constants = { + ANIMATION_DURATION: 'animation-duration' +} + +const template = () => PCTemplate + +export default { + name: $prefix + 'ScrollText', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + text: { + type: String, + default: 'ScrollText' + }, + time: { + type: Number, + default: 5 + }, + styles: { + type: String, + default: '' + }, + direction: { + type: String, + default: 'left', + validator: (value) => ~['up', 'left', 'down', 'right'].indexOf(value) + }, + hoverStop: { + type: Boolean, + default: true + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/scroll-text/src/pc.vue b/packages/scroll-text/src/pc.vue new file mode 100644 index 000000000..3262c13ab --- /dev/null +++ b/packages/scroll-text/src/pc.vue @@ -0,0 +1,34 @@ + + + + diff --git a/packages/scrollbar/index.js b/packages/scrollbar/index.js new file mode 100644 index 000000000..b78616d89 --- /dev/null +++ b/packages/scrollbar/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Scrollbar from './src/index.vue' +import '@opentiny/vue-theme/scrollbar/index.css' + +/* istanbul ignore next */ +Scrollbar.install = function (Vue) { + Vue.component(Scrollbar.name, Scrollbar) +} + +Scrollbar.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Scrollbar.install(window.Vue) + } +} + +export default Scrollbar diff --git a/packages/scrollbar/package.json b/packages/scrollbar/package.json new file mode 100644 index 000000000..e10e330ff --- /dev/null +++ b/packages/scrollbar/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-scrollbar", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/scrollbar/src/bar.vue b/packages/scrollbar/src/bar.vue new file mode 100644 index 000000000..d21f1f369 --- /dev/null +++ b/packages/scrollbar/src/bar.vue @@ -0,0 +1,43 @@ + + diff --git a/packages/scrollbar/src/index.vue b/packages/scrollbar/src/index.vue new file mode 100644 index 000000000..657944e1a --- /dev/null +++ b/packages/scrollbar/src/index.vue @@ -0,0 +1,120 @@ + + diff --git a/packages/search/index.js b/packages/search/index.js new file mode 100644 index 000000000..5ba17bee0 --- /dev/null +++ b/packages/search/index.js @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Search from './src/index' + +Search.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +Search.install = function (Vue) { + Vue.component(Search.name, Search) +} + +Search.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Search.install(window.Vue) + } +} + +export default Search diff --git a/packages/search/package.json b/packages/search/package.json new file mode 100644 index 000000000..278ada1f4 --- /dev/null +++ b/packages/search/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-search", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/search/src/index.js b/packages/search/src/index.js new file mode 100644 index 000000000..7a40dde8f --- /dev/null +++ b/packages/search/src/index.js @@ -0,0 +1,80 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $prefix, $props, $setup } from '@opentiny/vue-common' +import { t } from '@opentiny/vue-locale' +import PCTemplate from './pc' +import MobileTemplate from './mobile' + +const template = (mode) => { + if (process.env.TINY_MODE === 'pc') return PCTemplate + else if (process.env.TINY_MODE === 'mobile') return MobileTemplate + else return mode === 'mobile' ? MobileTemplate : PCTemplate +} + +export default { + name: $prefix + 'Search', + props: { + ...$props, + mini: { + type: Boolean, + default: false + }, + buttonText: { + type: String, + default: () => t('ui.search.placeholder') + }, + + /** + * 设置为透明模式,配置为true时,边框变为透明且收缩后半透明显示,一般用在带有背景的场景 + */ + transparent: { + type: Boolean, + default: false + }, + + /** + * 搜索的类型选项,格式为[{text:'文档',value:1},...],不配置时类型选择固定显示为All + */ + searchTypes: { + type: Array, + default: () => [] + }, + + /** + * 设置搜索输入框内的提示占位文本 + */ + placeholder: { + type: String, + default: '' + }, + modelValue: String, + clearable: { + type: Boolean, + default: false + }, + tabindex: { + type: String, + default: '1' + }, + + /** + * 配置搜索输入框enter键,enter按下触发搜索 + */ + isEnterSearch: { + type: Boolean, + default: false + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/search/src/mobile.vue b/packages/search/src/mobile.vue new file mode 100644 index 000000000..ed92015be --- /dev/null +++ b/packages/search/src/mobile.vue @@ -0,0 +1,73 @@ + + + + diff --git a/packages/search/src/pc.vue b/packages/search/src/pc.vue new file mode 100644 index 000000000..b140ae498 --- /dev/null +++ b/packages/search/src/pc.vue @@ -0,0 +1,92 @@ + + + + diff --git a/packages/select-dropdown/index.js b/packages/select-dropdown/index.js new file mode 100644 index 000000000..e685609f3 --- /dev/null +++ b/packages/select-dropdown/index.js @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import SelectDropdown from './src/index' +import '@opentiny/vue-theme/select-dropdown/index.css' + +SelectDropdown.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +SelectDropdown.install = function (Vue) { + Vue.component(SelectDropdown.name, SelectDropdown) +} + +SelectDropdown.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + SelectDropdown.install(window.Vue) + } +} + +export default SelectDropdown diff --git a/packages/select-dropdown/package.json b/packages/select-dropdown/package.json new file mode 100644 index 000000000..63b1a272d --- /dev/null +++ b/packages/select-dropdown/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-select-dropdown", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/select-dropdown/src/index.js b/packages/select-dropdown/src/index.js new file mode 100644 index 000000000..4a8d70b8b --- /dev/null +++ b/packages/select-dropdown/src/index.js @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const template = () => PCTemplate + +export default { + name: $prefix + 'SelectDropdown', + componentName: 'SelectDropdown', + inject: ['select'], + props: { + ...$props, + appendToBody: { + type: Boolean, + default: () => true + }, + arrowOffset: { + type: Number, + default: () => 35 + }, + boundariesPadding: { + default: () => 0 + }, + isDropInheritWidth: Boolean, + modelValue: Boolean, + offset: { + default: () => 0 + }, + placement: { + default: () => 'bottom-start' + }, + popper: {}, + popperOptions: { + default: () => ({ gpuAcceleration: false }) + }, + reference: {}, + transformOrigin: { + type: [Boolean, String], + default: () => true + }, + visibleArrow: { + default: () => false + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/select-dropdown/src/pc.vue b/packages/select-dropdown/src/pc.vue new file mode 100644 index 000000000..a4361662f --- /dev/null +++ b/packages/select-dropdown/src/pc.vue @@ -0,0 +1,50 @@ + + + + diff --git a/packages/select/index.js b/packages/select/index.js new file mode 100644 index 000000000..82fcd6e05 --- /dev/null +++ b/packages/select/index.js @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Select from './src/index' +import '@opentiny/vue-theme/select/index.css' + +Select.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +Select.install = function (Vue) { + Vue.component(Select.name, Select) +} + +Select.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Select.install(window.Vue) + } +} + +export default Select diff --git a/packages/select/package.json b/packages/select/package.json new file mode 100644 index 000000000..c1beeea0f --- /dev/null +++ b/packages/select/package.json @@ -0,0 +1,26 @@ +{ + "name": "@opentiny/vue-select", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-locale": "~0.1.0", + "@opentiny/vue-tag": "~0.1.0", + "@opentiny/vue-input": "~0.1.0", + "@opentiny/vue-option": "~0.1.0", + "@opentiny/vue-scrollbar": "~0.1.0", + "@opentiny/vue-popover": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0", + "@opentiny/vue-select-dropdown": "~0.1.0", + "@opentiny/vue-grid": "~0.1.0", + "@opentiny/vue-tree": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/select/src/index.js b/packages/select/src/index.js new file mode 100644 index 000000000..0332a65f5 --- /dev/null +++ b/packages/select/src/index.js @@ -0,0 +1,232 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import { t } from '@opentiny/vue-locale' +import PCTemplate from './pc' + +const $constants = { + CLASS: { + SelectDropdownWrap: '.tiny-select-dropdown__wrap', + IsReverse: 'is-reverse' + }, + I18N: { + noData: 'ui.select.noData', + noMatch: 'ui.select.noMatch', + loading: 'ui.select.loading' + }, + COMPONENT_NAME: { + Form: 'Form', + Select: 'Select', + Option: 'Option', + FormItem: 'FormItem', + OptionGroup: 'OptionGroup', + SelectDropdown: 'SelectDropdown' + }, + EVENT_NAME: { + removeTag: 'remove-tag', + formChange: 'form.change', + formBlur: 'form.blur', + queryChange: 'queryChange', + setSelected: 'setSelected', + updatePopper: 'updatePopper', + destroyPopper: 'destroyPopper', + visibleChange: 'visible-change', + handleOptionClick: 'handleOptionClick', + handleGroupDisabled: 'handleGroupDisabled' + }, + TYPE: { + Grid: 'grid', + Tree: 'tree' + } +} + +const template = () => { + if (PCTemplate) { + return PCTemplate + } +} + +export default { + name: $prefix + 'Select', + componentName: 'Select', + inject: { + form: { + default: '' + }, + formItem: { + default: '' + } + }, + provide() { + return { + select: this + } + }, + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + id: [Number, String], + name: String, + size: String, + remote: Boolean, + remoteConfig: { + type: Object, + default() { + return { + showIcon: false, + clearData: false, + autoSearch: false + } + } + }, + loading: Boolean, + disabled: Boolean, + options: Array, + dataset: Object, + textField: { + type: String, + default: 'label' + }, + tabindex: { + type: String, + default: '1' + }, + valueField: { + type: String, + default: 'value' + }, + placement: { + type: String, + default: 'bottom-start' + }, + showCheck: { + type: Boolean, + default: true + }, + showAlloption: { + type: Boolean, + default: true + }, + multiple: Boolean, + clearable: Boolean, + noDataText: String, + filterable: Boolean, + loadingText: String, + noMatchText: String, + popperClass: String, + allowCreate: Boolean, + collapseTags: Boolean, + remoteMethod: Function, + filterMethod: Function, + reserveKeyword: Boolean, + automaticDropdown: Boolean, + defaultFirstOption: Boolean, + modelValue: {}, + valueKey: { + type: String, + default: 'value' + }, + placeholder: { + type: String, + default: () => t('ui.select.placeholder') + }, + autocomplete: { + type: String, + default: 'off' + }, + multipleLimit: { + type: Number, + default: 0 + }, + popperAppendToBody: { + type: Boolean, + default: true + }, + hideDrop: { + type: Boolean, + default: false + }, + copyable: { + type: Boolean, + default: false + }, + renderType: String, + gridOp: { + type: Object, + default: () => ({}) + }, + treeOp: { + type: Object, + default: () => ({}) + }, + delay: { + type: Number, + default: 0 + }, + readonly: Boolean, + dropStyle: { + type: Object, + default: () => ({}) + }, + cacheOp: Object, + isDropInheritWidth: Boolean, + tagSelectable: { + type: Boolean, + default: false + }, + selectConfig: { + type: Object, + default() { + return { + checkMethod() { + return true + } + } + } + }, + radioConfig: { + type: Object, + default() { + return { + checkMethod() { + return true + } + } + } + }, + allowCopy: { + type: Boolean, + default: false + }, + textSplit: { + type: String, + default: ',' + }, + autoClose: Boolean, + queryDebounce: Number, + ignoreEnter: { + type: Boolean, + default: false + }, + optimization: [Boolean, Object], + searchable: { + type: Boolean, + default: false + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/select/src/pc.vue b/packages/select/src/pc.vue new file mode 100644 index 000000000..8354570e0 --- /dev/null +++ b/packages/select/src/pc.vue @@ -0,0 +1,397 @@ + + + + diff --git a/packages/slide-bar/index.js b/packages/slide-bar/index.js new file mode 100644 index 000000000..3957cd34a --- /dev/null +++ b/packages/slide-bar/index.js @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import SlideBar from './src/index' +import '@opentiny/vue-theme/slide-bar/index.css' + +SlideBar.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +SlideBar.install = function (Vue) { + Vue.component(SlideBar.name, SlideBar) +} + +SlideBar.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + SlideBar.install(window.Vue) + } +} + +export default SlideBar diff --git a/packages/slide-bar/package.json b/packages/slide-bar/package.json new file mode 100644 index 000000000..fc663d6e5 --- /dev/null +++ b/packages/slide-bar/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-slide-bar", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/slide-bar/src/index.js b/packages/slide-bar/src/index.js new file mode 100644 index 000000000..62086c850 --- /dev/null +++ b/packages/slide-bar/src/index.js @@ -0,0 +1,39 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const template = () => PCTemplate + +export default { + name: $prefix + 'SlideBar', + props: { + ...$props, + initBlocks: Number, + wheelBlocks: { + type: Number, + default: 1 + }, + modelValue: Array, + tag: { + type: String, + default: 'ul' + }, + subTag: { + type: String, + default: 'li' + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/slide-bar/src/pc.vue b/packages/slide-bar/src/pc.vue new file mode 100644 index 000000000..abd1edd9a --- /dev/null +++ b/packages/slide-bar/src/pc.vue @@ -0,0 +1,66 @@ + + + + diff --git a/packages/slider/index.js b/packages/slider/index.js new file mode 100644 index 000000000..c10b45ab8 --- /dev/null +++ b/packages/slider/index.js @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Slider from './src/index' + +/* istanbul ignore next */ +Slider.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +Slider.install = function (Vue) { + Vue.component(Slider.name, Slider) +} + +Slider.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Slider.install(window.Vue) + } +} + +export default Slider diff --git a/packages/slider/package.json b/packages/slider/package.json new file mode 100644 index 000000000..e0acb22d3 --- /dev/null +++ b/packages/slider/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-slider", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/slider/src/index.js b/packages/slider/src/index.js new file mode 100644 index 000000000..dd4f57a83 --- /dev/null +++ b/packages/slider/src/index.js @@ -0,0 +1,116 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' +import MobileTemplate from './mobile' + +const $constants = { + TIP_HEIGHT: 22, + BUTTON_SIZE: 28, + HALF_BAR_HEIGHT: 2, + PC_TIP_CLS: 'tiny-slider__tips', + PC_SLIDER_CLS: 'tiny-slider', + PC_RANGE_CLS: 'tiny-slider__range', + PC_BUTTON_CLS: 'tiny-slider__handle', + PC_LEFT_SVG_CLS: 'tiny-slider-left-svg', + PC_RIGHT_SVG_CLS: 'tiny-slider-right-svg', + MOBILE_TIP_CLS: 'tiny-mobile-slider__tips', + MOBILE_SLIDER_CLS: 'tiny-mobile-slider', + MOBILE_RANGE_CLS: 'tiny-mobile-slider__range', + MOBILE_BUTTON_CLS: 'tiny-mobile-slider__handle', + MOBILE_LEFT_SVG_CLS: 'tiny-mobile-slider-left-svg', + MOBILE_RIGHT_SVG_CLS: 'tiny-mobile-slider-right-svg', + Mode: 'pc', + tipCls(mode) { + return mode === this.Mode ? this.PC_TIP_CLS : this.MOBILE_TIP_CLS + }, + sliderCls(mode) { + return mode === this.Mode ? this.PC_SLIDER_CLS : this.MOBILE_SLIDER_CLS + }, + rangeCls(mode) { + return mode === this.Mode ? this.PC_RANGE_CLS : this.MOBILE_RANGE_CLS + }, + buttonCls(mode) { + return mode === this.Mode ? this.PC_BUTTON_CLS : this.MOBILE_BUTTON_CLS + }, + leftSvgCls(mode) { + return mode === this.Mode ? this.PC_LEFT_SVG_CLS : this.MOBILE_LEFT_SVG_CLS + }, + rightSvgCls(mode) { + return mode === this.Mode ? this.PC_RIGHT_SVG_CLS : this.MOBILE_RIGHT_SVG_CLS + } +} + +const template = (mode) => { + if (process.env.TINY_MODE === 'pc') return PCTemplate + else if (process.env.TINY_MODE === 'mobile') return MobileTemplate + else return mode === 'mobile' ? MobileTemplate : PCTemplate +} + +export default { + name: $prefix + 'Slider', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + formatTooltip: Function, + disabled: { + type: Boolean, + default: false + }, + height: { + type: String, + default: '300px' + }, + max: { + type: Number, + default: 100 + }, + min: { + type: Number, + default: 0 + }, + modelValue: { + type: [Number, Array], + default: 0 + }, + numPages: { + type: Number, + default: 1 + }, + range: { + type: Boolean, + default: false + }, + showInput: { + type: Boolean, + default: false + }, + showTip: { + type: Boolean, + default: true + }, + step: { + type: Number, + default: 1 + }, + vertical: { + type: Boolean, + default: false + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/slider/src/mobile.vue b/packages/slider/src/mobile.vue new file mode 100644 index 000000000..094727757 --- /dev/null +++ b/packages/slider/src/mobile.vue @@ -0,0 +1,67 @@ + + + + diff --git a/packages/slider/src/pc.vue b/packages/slider/src/pc.vue new file mode 100644 index 000000000..67dd5ee71 --- /dev/null +++ b/packages/slider/src/pc.vue @@ -0,0 +1,80 @@ + + + + diff --git a/packages/split/index.js b/packages/split/index.js new file mode 100644 index 000000000..0836307d6 --- /dev/null +++ b/packages/split/index.js @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Split from './src/index.js' +import '@opentiny/vue-theme/split/index.css' + +Split.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +Split.install = function (Vue) { + Vue.component(Split.name, Split) +} + +Split.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Split.install(window.Vue) + } +} + +export default Split diff --git a/packages/split/package.json b/packages/split/package.json new file mode 100644 index 000000000..e4d41e945 --- /dev/null +++ b/packages/split/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-split", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/split/src/index.js b/packages/split/src/index.js new file mode 100644 index 000000000..1b77c6c12 --- /dev/null +++ b/packages/split/src/index.js @@ -0,0 +1,61 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const $constants = { + PREFIX: 'tiny-split', + HORIZONTAL: 'horizontal', + VERTICAL: 'vertical' +} + +const template = () => PCTemplate + +export default { + name: $prefix + 'Split', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + modelValue: { + type: [Number, String], + default: 0.5 + }, + mode: { + validator(value) { + const arr = [$constants.HORIZONTAL, $constants.VERTICAL] + + for (let i = 0; i < arr.length; i++) { + if (value === arr[i]) { + return true + } + } + + return false + }, + default: $constants.HORIZONTAL + }, + leftTopMin: { + type: [Number, String], + default: '40px' + }, + rightBottomMin: { + type: [Number, String], + default: '40px' + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/split/src/pc.vue b/packages/split/src/pc.vue new file mode 100644 index 000000000..d560b0eb5 --- /dev/null +++ b/packages/split/src/pc.vue @@ -0,0 +1,62 @@ + + + + diff --git a/packages/steps/index.js b/packages/steps/index.js new file mode 100644 index 000000000..4d622e0fc --- /dev/null +++ b/packages/steps/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Steps from './src/index' +import '@opentiny/vue-theme/steps/index.css' + +/* istanbul ignore next */ +Steps.install = function (Vue) { + Vue.component(Steps.name, Steps) +} + +Steps.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Steps.install(window.Vue) + } +} + +export default Steps diff --git a/packages/steps/package.json b/packages/steps/package.json new file mode 100644 index 000000000..408c7b817 --- /dev/null +++ b/packages/steps/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-steps", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/steps/src/index.js b/packages/steps/src/index.js new file mode 100644 index 000000000..2e967ffbe --- /dev/null +++ b/packages/steps/src/index.js @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const template = () => PCTemplate + +export default { + name: $prefix + 'Steps', + props: { + ...$props, + nameField: { + type: String, + default: 'name' + }, + countField: { + type: String, + default: 'count' + }, + statusField: { + type: String, + default: 'status' + }, + data: [Object, Array], + space: Number, + active: { + type: Number, + default: -1 + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/steps/src/pc.vue b/packages/steps/src/pc.vue new file mode 100644 index 000000000..a091cd332 --- /dev/null +++ b/packages/steps/src/pc.vue @@ -0,0 +1,58 @@ + + + + diff --git a/packages/svg-icon/index.js b/packages/svg-icon/index.js new file mode 100644 index 000000000..77d36ed5a --- /dev/null +++ b/packages/svg-icon/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import SvgIcon from './src/index.vue' +import '@opentiny/vue-theme/svg/index.css' + +/* istanbul ignore next */ +SvgIcon.install = function (Vue) { + Vue.component(SvgIcon.name, SvgIcon) +} + +SvgIcon.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + SvgIcon.install(window.Vue) + } +} + +export default SvgIcon diff --git a/packages/svg-icon/package.json b/packages/svg-icon/package.json new file mode 100644 index 000000000..d4c2cc770 --- /dev/null +++ b/packages/svg-icon/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-svg-icon", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/svg-icon/src/index.vue b/packages/svg-icon/src/index.vue new file mode 100644 index 000000000..4a8473b26 --- /dev/null +++ b/packages/svg-icon/src/index.vue @@ -0,0 +1,45 @@ + + + + diff --git a/packages/switch/index.js b/packages/switch/index.js new file mode 100644 index 000000000..de0fa0648 --- /dev/null +++ b/packages/switch/index.js @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Switch from './src/index' + +Switch.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +Switch.install = function (Vue) { + Vue.component(Switch.name, Switch) +} + +Switch.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Switch.install(window.Vue) + } +} + +export default Switch diff --git a/packages/switch/package.json b/packages/switch/package.json new file mode 100644 index 000000000..a8fc528d9 --- /dev/null +++ b/packages/switch/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-switch", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/switch/src/index.js b/packages/switch/src/index.js new file mode 100644 index 000000000..17f500e9f --- /dev/null +++ b/packages/switch/src/index.js @@ -0,0 +1,70 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' +import MobileTemplate from './mobile' + +const $constants = { + PC_PREFIXCLS: 'tiny-switch', + MOBILE_PREFIXCLS: 'tiny-mobile-switch', + Mode: 'pc', + prefixcls(mode) { + return mode === this.Mode ? this.PC_PREFIXCLS : this.MOBILE_PREFIXCLS + } +} + +const template = (mode) => { + if (process.env.TINY_MODE === 'pc') return PCTemplate + else if (process.env.TINY_MODE === 'mobile') return MobileTemplate + else return mode === 'mobile' ? MobileTemplate : PCTemplate +} + +export default { + name: $prefix + 'Switch', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + disabled: { + type: Boolean, + default: false + }, + falseColor: String, + falseValue: { + type: [String, Number, Boolean], + default: false + }, + mini: { + type: Boolean, + default: false + }, + modelValue: { + type: [String, Number, Boolean], + default: false + }, + size: [Number, String], + tabindex: { + type: String, + default: '1' + }, + trueColor: String, + trueValue: { + type: [String, Number, Boolean], + default: true + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/switch/src/mobile.vue b/packages/switch/src/mobile.vue new file mode 100644 index 000000000..34785045f --- /dev/null +++ b/packages/switch/src/mobile.vue @@ -0,0 +1,27 @@ + + + + diff --git a/packages/switch/src/pc.vue b/packages/switch/src/pc.vue new file mode 100644 index 000000000..b124c2124 --- /dev/null +++ b/packages/switch/src/pc.vue @@ -0,0 +1,35 @@ + + + + diff --git a/packages/tab-item/index.js b/packages/tab-item/index.js new file mode 100644 index 000000000..e9d8af830 --- /dev/null +++ b/packages/tab-item/index.js @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import TabItem from './src/index.vue' + +/* istanbul ignore next */ +TabItem.install = function (Vue) { + Vue.component(TabItem.name, TabItem) +} + +TabItem.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + TabItem.install(window.Vue) + } +} + +export default TabItem diff --git a/packages/tab-item/package.json b/packages/tab-item/package.json new file mode 100644 index 000000000..3b72fbc0e --- /dev/null +++ b/packages/tab-item/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-tab-item", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/tab-item/src/index.vue b/packages/tab-item/src/index.vue new file mode 100644 index 000000000..1c88169b1 --- /dev/null +++ b/packages/tab-item/src/index.vue @@ -0,0 +1,45 @@ + + + + diff --git a/packages/tabbar-item/index.js b/packages/tabbar-item/index.js new file mode 100644 index 000000000..45dd6c8a7 --- /dev/null +++ b/packages/tabbar-item/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import TabbarItem from './src/index.vue' +import '@opentiny/vue-theme-mobile/tabbar-item/index.css' + +/* istanbul ignore next */ +TabbarItem.install = function (Vue) { + Vue.component(TabbarItem.name, TabbarItem) +} + +TabbarItem.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + TabbarItem.install(window.Vue) + } +} + +export default TabbarItem diff --git a/packages/tabbar-item/package.json b/packages/tabbar-item/package.json new file mode 100644 index 000000000..7c9f48931 --- /dev/null +++ b/packages/tabbar-item/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-tabbar-item", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/tabbar-item/src/index.vue b/packages/tabbar-item/src/index.vue new file mode 100644 index 000000000..12d22c370 --- /dev/null +++ b/packages/tabbar-item/src/index.vue @@ -0,0 +1,47 @@ + + + + diff --git a/packages/tabbar-item/src/mobile.vue b/packages/tabbar-item/src/mobile.vue new file mode 100644 index 000000000..13db5cfc5 --- /dev/null +++ b/packages/tabbar-item/src/mobile.vue @@ -0,0 +1,38 @@ + + + + diff --git a/packages/tabbar/index.js b/packages/tabbar/index.js new file mode 100644 index 000000000..585c89b0e --- /dev/null +++ b/packages/tabbar/index.js @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Tabbar from './src/index.vue' +import '@opentiny/vue-theme-mobile/tabbar/index.css' + +Tabbar.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +Tabbar.install = function (Vue) { + Vue.component(Tabbar.name, Tabbar) +} + +Tabbar.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Tabbar.install(window.Vue) + } +} + +export default Tabbar diff --git a/packages/tabbar/package.json b/packages/tabbar/package.json new file mode 100644 index 000000000..b92f12fd1 --- /dev/null +++ b/packages/tabbar/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-tabbar", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-tabbar-item": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/tabbar/src/index.vue b/packages/tabbar/src/index.vue new file mode 100644 index 000000000..8f1dc4eee --- /dev/null +++ b/packages/tabbar/src/index.vue @@ -0,0 +1,53 @@ + + + + diff --git a/packages/table/index.js b/packages/table/index.js new file mode 100644 index 000000000..5380034e3 --- /dev/null +++ b/packages/table/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Table from './src/index.vue' +import '@opentiny/vue-theme/table/index.css' + +/* istanbul ignore next */ +Table.install = function (Vue) { + Vue.component(Table.name, Table) +} + +Table.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Table.install(window.Vue) + } +} + +export default Table diff --git a/packages/table/package.json b/packages/table/package.json new file mode 100644 index 000000000..f2ac192e3 --- /dev/null +++ b/packages/table/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-table", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/table/src/index.vue b/packages/table/src/index.vue new file mode 100644 index 000000000..d5d8577cc --- /dev/null +++ b/packages/table/src/index.vue @@ -0,0 +1,94 @@ + + + + diff --git a/packages/tabs/index.js b/packages/tabs/index.js new file mode 100644 index 000000000..2b3e8d2f2 --- /dev/null +++ b/packages/tabs/index.js @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Tabs from './src/index' + +Tabs.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +Tabs.install = function (Vue) { + Vue.component(Tabs.name, Tabs) +} + +Tabs.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Tabs.install(window.Vue) + } +} + +export default Tabs diff --git a/packages/tabs/package.json b/packages/tabs/package.json new file mode 100644 index 000000000..c7c4e62ab --- /dev/null +++ b/packages/tabs/package.json @@ -0,0 +1,18 @@ +{ + "name": "@opentiny/vue-tabs", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-popover": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/tabs/src/index.js b/packages/tabs/src/index.js new file mode 100644 index 000000000..559276b18 --- /dev/null +++ b/packages/tabs/src/index.js @@ -0,0 +1,69 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' +import MobileTemplate from './mobile' + +const $constants = { + TAB_ITEM: 'TabItem' +} + +const template = (mode) => { + if (process.env.TINY_MODE === 'pc') return PCTemplate + else if (process.env.TINY_MODE === 'mobile') return MobileTemplate + else return mode === 'mobile' ? MobileTemplate : PCTemplate +} + +export default { + name: $prefix + 'Tabs', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + tabStyle: String, + activeName: String, + withClose: Boolean, + withAdd: Boolean, + size: String, + activeColor: { + type: String, + default: '' + }, + modelValue: {}, + editable: Boolean, + position: { + type: String, + default: 'top' + }, + beforeLeave: Function, + stretch: Boolean, + showMoreTabs: Boolean, + swipeable: { + type: Boolean, + default: true + }, + popperClass: String, + popperAppendToBody: { + type: Boolean, + default: true + }, + dropConfig: { + type: Object, + default: () => null + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/tabs/src/mobile.vue b/packages/tabs/src/mobile.vue new file mode 100644 index 000000000..62e1b1672 --- /dev/null +++ b/packages/tabs/src/mobile.vue @@ -0,0 +1,141 @@ + + diff --git a/packages/tabs/src/pc.vue b/packages/tabs/src/pc.vue new file mode 100644 index 000000000..3cedb457c --- /dev/null +++ b/packages/tabs/src/pc.vue @@ -0,0 +1,136 @@ + + diff --git a/packages/tabs/src/tab-nav/index.vue b/packages/tabs/src/tab-nav/index.vue new file mode 100644 index 000000000..7854a36d1 --- /dev/null +++ b/packages/tabs/src/tab-nav/index.vue @@ -0,0 +1,264 @@ + + diff --git a/packages/tabs/src/tab-nav/mb.vue b/packages/tabs/src/tab-nav/mb.vue new file mode 100644 index 000000000..4f09f0d53 --- /dev/null +++ b/packages/tabs/src/tab-nav/mb.vue @@ -0,0 +1,155 @@ + + diff --git a/packages/tabs/src/tab-nav/tab-bar.vue b/packages/tabs/src/tab-nav/tab-bar.vue new file mode 100644 index 000000000..8da38be60 --- /dev/null +++ b/packages/tabs/src/tab-nav/tab-bar.vue @@ -0,0 +1,29 @@ + + + + diff --git a/packages/tag/index.js b/packages/tag/index.js new file mode 100644 index 000000000..2da0b3c3b --- /dev/null +++ b/packages/tag/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Tag from './src/index' +import '@opentiny/vue-theme/tag/index.css' + +/* istanbul ignore next */ +Tag.install = function (Vue) { + Vue.component(Tag.name, Tag) +} + +Tag.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Tag.install(window.Vue) + } +} + +export default Tag diff --git a/packages/tag/package.json b/packages/tag/package.json new file mode 100644 index 000000000..72a1ad3c2 --- /dev/null +++ b/packages/tag/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-tag", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/tag/src/index.js b/packages/tag/src/index.js new file mode 100644 index 000000000..be99578c5 --- /dev/null +++ b/packages/tag/src/index.js @@ -0,0 +1,36 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const template = () => PCTemplate + +export default { + name: $prefix + 'Tag', + props: { + ...$props, + hit: Boolean, + text: String, + type: String, + size: String, + color: String, + closable: Boolean, + effect: { + type: String, + default: 'light', + validator: (value) => ~['dark', 'light', 'plain'].indexOf(value) + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/tag/src/pc.vue b/packages/tag/src/pc.vue new file mode 100644 index 000000000..3dcc70000 --- /dev/null +++ b/packages/tag/src/pc.vue @@ -0,0 +1,41 @@ + + diff --git a/packages/text-popup/index.js b/packages/text-popup/index.js new file mode 100644 index 000000000..a8567dae8 --- /dev/null +++ b/packages/text-popup/index.js @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import TextPopup from './src/index' +import '@opentiny/vue-theme/text-popup/index.css' + +TextPopup.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +TextPopup.install = function (Vue) { + Vue.component(TextPopup.name, TextPopup) +} + +TextPopup.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + TextPopup.install(window.Vue) + } +} + +export default TextPopup diff --git a/packages/text-popup/package.json b/packages/text-popup/package.json new file mode 100644 index 000000000..b7feea0eb --- /dev/null +++ b/packages/text-popup/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-text-popup", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/text-popup/src/index.js b/packages/text-popup/src/index.js new file mode 100644 index 000000000..9ae5641bd --- /dev/null +++ b/packages/text-popup/src/index.js @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const template = () => PCTemplate + +export default { + name: $prefix + 'TextPopup', + props: { + ...$props, + modelValue: { + default: '' + }, + placeholder: { + type: String, + required: false + }, + readonly: { + type: Boolean, + default: false + }, + width: { + type: [Number, String], + default: 150, + validator(value) { + return parseInt(value) >= 0 + } + }, + separtor: { + type: String, + default: ',' + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/text-popup/src/pc.vue b/packages/text-popup/src/pc.vue new file mode 100644 index 000000000..e51e1fe92 --- /dev/null +++ b/packages/text-popup/src/pc.vue @@ -0,0 +1,39 @@ + + + + diff --git a/packages/time-line/index.js b/packages/time-line/index.js new file mode 100644 index 000000000..22725f61f --- /dev/null +++ b/packages/time-line/index.js @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import TimeLine from './src/index' + +/* istanbul ignore next */ +TimeLine.install = function (Vue) { + Vue.component(TimeLine.name, TimeLine) +} + +TimeLine.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + TimeLine.install(window.Vue) + } +} + +export default TimeLine diff --git a/packages/time-line/package.json b/packages/time-line/package.json new file mode 100644 index 000000000..0043b7efa --- /dev/null +++ b/packages/time-line/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-time-line", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/time-line/src/index.js b/packages/time-line/src/index.js new file mode 100644 index 000000000..d2d3bd5f1 --- /dev/null +++ b/packages/time-line/src/index.js @@ -0,0 +1,78 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $prefix, $props, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' +import MobileTemplate from './mobile' + +const $constants = { + PROCESS_DONE_CLS: 'process-done', + PROCESS_CUR_CLS: 'process-current', + PROCESS_WAIT_CLS: 'process-wait' +} + +const template = (mode) => { + if (process.env.TINY_MODE === 'pc') return PCTemplate + else if (process.env.TINY_MODE === 'mobile') return MobileTemplate + else return mode === 'mobile' ? MobileTemplate : PCTemplate +} + +export default { + name: $prefix + 'TimeLine', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + vertical: { + type: Boolean, + default: false + }, + horizontal: { + type: Boolean, + default: false + }, + showNumber: { + type: Boolean, + default: true + }, + nameField: { + type: String, + default: 'name' + }, + timeField: { + type: String, + default: 'time' + }, + start: { + type: Number, + default: 1 + }, + data: Array, + space: Number, + active: { + type: Number, + default: -1 + }, + reverse: { + type: Boolean, + default: false + }, + showStatus: { + type: Boolean, + default: false + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/time-line/src/mobile.vue b/packages/time-line/src/mobile.vue new file mode 100644 index 000000000..b035a10f8 --- /dev/null +++ b/packages/time-line/src/mobile.vue @@ -0,0 +1,65 @@ + + + + diff --git a/packages/time-line/src/pc.vue b/packages/time-line/src/pc.vue new file mode 100644 index 000000000..5f5a4f024 --- /dev/null +++ b/packages/time-line/src/pc.vue @@ -0,0 +1,105 @@ + + + + diff --git a/packages/time-panel/index.js b/packages/time-panel/index.js new file mode 100644 index 000000000..6f9b6880f --- /dev/null +++ b/packages/time-panel/index.js @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import TimePanel from './src/index.vue' + +/* istanbul ignore next */ +TimePanel.install = function (Vue) { + Vue.component(TimePanel.name, TimePanel) +} + +TimePanel.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + TimePanel.install(window.Vue) + } +} + +export default TimePanel diff --git a/packages/time-panel/package.json b/packages/time-panel/package.json new file mode 100644 index 000000000..1e33d9fb4 --- /dev/null +++ b/packages/time-panel/package.json @@ -0,0 +1,18 @@ +{ + "name": "@opentiny/vue-time-panel", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-scrollbar": "~0.1.0", + "@opentiny/vue-numeric": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/time-panel/src/index.vue b/packages/time-panel/src/index.vue new file mode 100644 index 000000000..9f8a3ff96 --- /dev/null +++ b/packages/time-panel/src/index.vue @@ -0,0 +1,59 @@ + + + + diff --git a/packages/time-picker/index.js b/packages/time-picker/index.js new file mode 100644 index 000000000..a74729c54 --- /dev/null +++ b/packages/time-picker/index.js @@ -0,0 +1,40 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Picker from '@opentiny/vue-picker' +import { extend } from '@opentiny/vue-renderless/common/object' +import { $prefix } from '@opentiny/vue-common' + +const TimePicker = extend(true, { props: { componentName: { type: String, default: 'TimePicker' } } }, Picker, { + props: { + type: { + type: String, + default: 'time' + } + }, + name: $prefix + 'TimePicker' +}) + +/* istanbul ignore next */ +TimePicker.install = function (Vue) { + Vue.component(TimePicker.name, TimePicker) +} + +TimePicker.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + TimePicker.install(window.Vue) + } +} + +export default TimePicker diff --git a/packages/time-picker/package.json b/packages/time-picker/package.json new file mode 100644 index 000000000..82340a87d --- /dev/null +++ b/packages/time-picker/package.json @@ -0,0 +1,15 @@ +{ + "name": "@opentiny/vue-time-picker", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/time-picker/src/index.vue b/packages/time-picker/src/index.vue new file mode 100644 index 000000000..8f26d791a --- /dev/null +++ b/packages/time-picker/src/index.vue @@ -0,0 +1,11 @@ + diff --git a/packages/time-range/index.js b/packages/time-range/index.js new file mode 100644 index 000000000..64ba5197e --- /dev/null +++ b/packages/time-range/index.js @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import TimeRange from './src/index.vue' + +/* istanbul ignore next */ +TimeRange.install = function (Vue) { + Vue.component(TimeRange.name, TimeRange) +} + +TimeRange.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + TimeRange.install(window.Vue) + } +} + +export default TimeRange diff --git a/packages/time-range/package.json b/packages/time-range/package.json new file mode 100644 index 000000000..a193374f1 --- /dev/null +++ b/packages/time-range/package.json @@ -0,0 +1,18 @@ +{ + "name": "@opentiny/vue-time-range", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-locale": "~0.1.0", + "@opentiny/vue-time-spinner": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/time-range/src/index.vue b/packages/time-range/src/index.vue new file mode 100644 index 000000000..138fc36e9 --- /dev/null +++ b/packages/time-range/src/index.vue @@ -0,0 +1,92 @@ + + + + + diff --git a/packages/time-select/index.js b/packages/time-select/index.js new file mode 100644 index 000000000..d0872efd5 --- /dev/null +++ b/packages/time-select/index.js @@ -0,0 +1,40 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Picker from '@opentiny/vue-picker' +import { extend } from '@opentiny/vue-renderless/common/object' +import { $prefix } from '@opentiny/vue-common' + +const TimeSelect = extend(true, { props: { componentName: { type: String, default: 'TimeSelect' } } }, Picker, { + props: { + type: { + type: String, + default: 'time' + } + }, + name: $prefix + 'TimeSelect' +}) + +/* istanbul ignore next */ +TimeSelect.install = function (Vue) { + Vue.component(TimeSelect.name, TimeSelect) +} + +TimeSelect.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + TimeSelect.install(window.Vue) + } +} + +export default TimeSelect diff --git a/packages/time-select/package.json b/packages/time-select/package.json new file mode 100644 index 000000000..ff404f24e --- /dev/null +++ b/packages/time-select/package.json @@ -0,0 +1,15 @@ +{ + "name": "@opentiny/vue-time-select", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/time-select/src/index.vue b/packages/time-select/src/index.vue new file mode 100644 index 000000000..8f26d791a --- /dev/null +++ b/packages/time-select/src/index.vue @@ -0,0 +1,11 @@ + diff --git a/packages/time-spinner/index.js b/packages/time-spinner/index.js new file mode 100644 index 000000000..e787213cb --- /dev/null +++ b/packages/time-spinner/index.js @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import TimeSpinner from './src/index.vue' + +/* istanbul ignore next */ +TimeSpinner.install = function (Vue) { + Vue.component(TimeSpinner.name, TimeSpinner) +} + +TimeSpinner.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + TimeSpinner.install(window.Vue) + } +} + +export default TimeSpinner diff --git a/packages/time-spinner/package.json b/packages/time-spinner/package.json new file mode 100644 index 000000000..98699af1c --- /dev/null +++ b/packages/time-spinner/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-time-spinner", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-scrollbar": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/time-spinner/src/index.vue b/packages/time-spinner/src/index.vue new file mode 100644 index 000000000..466cee594 --- /dev/null +++ b/packages/time-spinner/src/index.vue @@ -0,0 +1,177 @@ + + + + + diff --git a/packages/time/index.js b/packages/time/index.js new file mode 100644 index 000000000..ef5d7d434 --- /dev/null +++ b/packages/time/index.js @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Time from './src/index.vue' + +/* istanbul ignore next */ +Time.install = function (Vue) { + Vue.component(Time.name, Time) +} + +Time.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Time.install(window.Vue) + } +} + +export default Time diff --git a/packages/time/package.json b/packages/time/package.json new file mode 100644 index 000000000..4a7b79669 --- /dev/null +++ b/packages/time/package.json @@ -0,0 +1,18 @@ +{ + "name": "@opentiny/vue-time", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-locale": "~0.1.0", + "@opentiny/vue-time-spinner": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/time/src/index.vue b/packages/time/src/index.vue new file mode 100644 index 000000000..77225a050 --- /dev/null +++ b/packages/time/src/index.vue @@ -0,0 +1,60 @@ + + + + diff --git a/packages/toggle-menu/index.js b/packages/toggle-menu/index.js new file mode 100644 index 000000000..e7827aad5 --- /dev/null +++ b/packages/toggle-menu/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import ToggleMenu from './src/index.js' +import '@opentiny/vue-theme/toggle-menu/index.css' + +/* istanbul ignore next */ +ToggleMenu.install = function (Vue) { + Vue.component(ToggleMenu.name, ToggleMenu) +} + +ToggleMenu.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + ToggleMenu.install(window.Vue) + } +} + +export default ToggleMenu diff --git a/packages/toggle-menu/package.json b/packages/toggle-menu/package.json new file mode 100644 index 000000000..e90c6570a --- /dev/null +++ b/packages/toggle-menu/package.json @@ -0,0 +1,19 @@ +{ + "name": "@opentiny/vue-toggle-menu", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0", + "@opentiny/vue-input": "~0.1.0", + "@opentiny/vue-tree": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/toggle-menu/src/index.js b/packages/toggle-menu/src/index.js new file mode 100644 index 000000000..9352200c0 --- /dev/null +++ b/packages/toggle-menu/src/index.js @@ -0,0 +1,75 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const $constants = { + LOCALE_PLACEHOLDER: 'ui.toggleMenu.placeholder' +} + +const template = () => PCTemplate + +export default { + name: $prefix + 'ToggleMenu', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + data: Array, + placeholder: { + type: String, + default: '' + }, + icon: Object, + defaultExpandAll: { + type: Boolean, + default: false + }, + draggable: { + type: Boolean, + default: false + }, + expandOnClickNode: { + type: Boolean, + default: true + }, + ellipsis: { + type: Boolean, + default: false + }, + wrap: { + type: Boolean, + default: false + }, + showFilter: { + type: Boolean, + default: true + }, + automaticFiltering: { + type: Boolean, + default: true + }, + props: { + default: () => ({ children: 'children', disabled: 'disabled', label: 'label' }) + }, + getMenuDataSync: Function, // deprecated v3.4.0废弃, v3.16.0移除;移除原因:如果是同步数据则和:data功能重复 + getMenuDataAsync: Function, + accordion: Boolean, + defaultCheckedKeys: Array, + showCheckbox: Boolean + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/toggle-menu/src/pc.vue b/packages/toggle-menu/src/pc.vue new file mode 100644 index 000000000..e062b9a95 --- /dev/null +++ b/packages/toggle-menu/src/pc.vue @@ -0,0 +1,119 @@ + + + + + diff --git a/packages/tooltip/index.js b/packages/tooltip/index.js new file mode 100644 index 000000000..4b9d50cfd --- /dev/null +++ b/packages/tooltip/index.js @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Tooltip from './src/index.vue' +import '@opentiny/vue-theme/tooltip/index.css' + +Tooltip.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +Tooltip.install = function (Vue) { + Vue.component(Tooltip.name, Tooltip) +} + +Tooltip.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Tooltip.install(window.Vue) + } +} + +export default Tooltip diff --git a/packages/tooltip/package.json b/packages/tooltip/package.json new file mode 100644 index 000000000..336693f4e --- /dev/null +++ b/packages/tooltip/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-tooltip", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/tooltip/src/index.vue b/packages/tooltip/src/index.vue new file mode 100644 index 000000000..9b02b6494 --- /dev/null +++ b/packages/tooltip/src/index.vue @@ -0,0 +1,227 @@ + + + diff --git a/packages/top-box/index.js b/packages/top-box/index.js new file mode 100644 index 000000000..ab1f2491a --- /dev/null +++ b/packages/top-box/index.js @@ -0,0 +1,166 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { createComponent, emitter } from '@opentiny/vue-common' +import TopBoxConstructor from './src/index.js' +import '@opentiny/vue-theme/top-box/index.css' + +let instances = [] +let seed = 1 + +const handleTopBoxMounted = ({ instance, options }) => { + instance.$el.style.zIndex = instance.getZindex() + + let { state } = instance + + for (let key in options) { + if (Object.prototype.hasOwnProperty.call(state, key)) { + state[key] = options[key] + } + } + + let verticalOffset = options.offset || 20 + + instances.forEach((item) => { + verticalOffset += item.$el.offsetHeight + 16 + }) + + state.verticalOffset = verticalOffset + state.visible = true + + if (state.buttons && state.buttons.length) { + state.buttons.map((button, key) => { + if (key === 0) { + !button.type && (button.type = 'primary') + !button.onClick && + (button.onClick = () => { + instance.close() + }) + } else { + !button.onClick && + (button.onClick = () => { + // do nothing + }) + } + + return button + }) + } + + instance.startTimer() +} + +const TopBox = function (options) { + const _emitter = emitter() + options = options || {} + + if (typeof options === 'string') { + options = { + message: options + } + } + + let id = 'message_' + seed++ + let userOnClose = options.onClose + + options.onClose = function () { + TopBox.close(id, userOnClose) + } + + options.emitter = _emitter + + let instance = createComponent({ + el: document.createElement('div'), + propsData: options, + component: TopBoxConstructor + }) + + instance.id = id + + document.body.appendChild(instance.$el) + instances.push(instance) + + _emitter.on('TopBoxMounted', () => { + handleTopBoxMounted({ instance, options }) + }) + + return instance +} + +const topBox = TopBox + +const types = ['success', 'warning', 'info', 'error', 'help'] + +types.forEach((type) => { + TopBox[type] = (options) => { + if (typeof options === 'string') { + options = { + message: options + } + } + + options.type = type + + return topBox(options) + } +}) + +const findRemove = ({ id, len, userOnClose }) => { + let index = -1 + let removedHeight = 0 + let instance + + for (let i = 0; i < len; i++) { + let tmp = instances[i] + if (tmp.id === id) { + index = i + removedHeight = tmp.$el.offsetHeight + instance = tmp + break + } + } + + if (instance) { + typeof userOnClose === 'function' && userOnClose(instance) + instances.splice(index, 1) + } + + return { index, removedHeight } +} + +const adjustTopOther = ({ index, len, removedHeight }) => { + for (let i = index; i < len - 1; i++) { + let dom = instances[i].$el + dom.style.top = parseInt(dom.style.top, 10) - removedHeight - 16 + 'px' + } +} + +TopBox.close = function (id, userOnClose) { + let len = instances.length + let { index, removedHeight } = findRemove({ id, len, userOnClose }) + + if (len <= 1 || index === -1 || index > instances.length - 1) return + // removedHeight = instances[index].$el.offsetHeight + adjustTopOther({ index, len, removedHeight }) +} + +TopBox.closeAll = function () { + let copys = instances.slice(0) + + copys = copys.reverse() + copys.forEach((instance) => { + instance.close() + }) +} + +TopBox.version = process.env.COMPONENT_VERSION + +export default TopBox diff --git a/packages/top-box/package.json b/packages/top-box/package.json new file mode 100644 index 000000000..e99e4b86f --- /dev/null +++ b/packages/top-box/package.json @@ -0,0 +1,18 @@ +{ + "name": "@opentiny/vue-top-box", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-button": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/top-box/src/index.js b/packages/top-box/src/index.js new file mode 100644 index 000000000..295411281 --- /dev/null +++ b/packages/top-box/src/index.js @@ -0,0 +1,38 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const $constants = { + SUCCESS: 'icon-success', + INFO: 'icon-info', + WARNING: 'icon-warning', + ERROR: 'icon-error', + HELP: 'icon-help' +} + +const template = () => PCTemplate + +export default { + name: $prefix + 'TopBox', + props: { + ...$props, + emitter: Object, + _constants: { + type: Object, + default: () => $constants + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/top-box/src/pc.vue b/packages/top-box/src/pc.vue new file mode 100644 index 000000000..bf1759f86 --- /dev/null +++ b/packages/top-box/src/pc.vue @@ -0,0 +1,66 @@ + + + + + diff --git a/packages/transfer-panel/index.js b/packages/transfer-panel/index.js new file mode 100644 index 000000000..a46632152 --- /dev/null +++ b/packages/transfer-panel/index.js @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import TransferPanel from './src/index.vue' + +/* istanbul ignore next */ +TransferPanel.install = function (Vue) { + Vue.component(TransferPanel.name, TransferPanel) +} + +TransferPanel.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + TransferPanel.install(window.Vue) + } +} + +export default TransferPanel diff --git a/packages/transfer-panel/package.json b/packages/transfer-panel/package.json new file mode 100644 index 000000000..e404ab733 --- /dev/null +++ b/packages/transfer-panel/package.json @@ -0,0 +1,20 @@ +{ + "name": "@opentiny/vue-transfer-panel", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-locale": "~0.1.0", + "@opentiny/vue-checkbox": "~0.1.0", + "@opentiny/vue-input": "~0.1.0", + "@opentiny/vue-pager": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/transfer-panel/src/index.vue b/packages/transfer-panel/src/index.vue new file mode 100644 index 000000000..4f4c45cd7 --- /dev/null +++ b/packages/transfer-panel/src/index.vue @@ -0,0 +1,173 @@ + + + + + diff --git a/packages/transfer/index.js b/packages/transfer/index.js new file mode 100644 index 000000000..7fb1d14c0 --- /dev/null +++ b/packages/transfer/index.js @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Transfer from './src/index.js' +import '@opentiny/vue-theme/transfer/index.css' + +Transfer.model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +Transfer.install = function (Vue) { + Vue.component(Transfer.name, Transfer) +} + +Transfer.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Transfer.install(window.Vue) + } +} + +export default Transfer diff --git a/packages/transfer/package.json b/packages/transfer/package.json new file mode 100644 index 000000000..cef4efda2 --- /dev/null +++ b/packages/transfer/package.json @@ -0,0 +1,20 @@ +{ + "name": "@opentiny/vue-transfer", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-button": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0", + "@opentiny/vue-checkbox": "~0.1.0", + "@opentiny/vue-transfer-panel": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/transfer/src/index.js b/packages/transfer/src/index.js new file mode 100644 index 000000000..c874b0eb4 --- /dev/null +++ b/packages/transfer/src/index.js @@ -0,0 +1,101 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const $constants = { + TARGETORDER: 'original', + ISCHECKED: 'is-checked', + DROPPANEL: '.tiny-transfer-panel__list', + TRANSFERPANEL: '.tiny-transfer-panel__item' +} + +const template = () => PCTemplate + +export default { + name: $prefix + 'Transfer', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + buttonTexts: { + type: Array, + default: () => [] + }, + columns: Array, + data: { + type: Array, + default: () => [] + }, + dropConfig: Object, + filterMethod: Function, + filterPlaceholder: { + type: String, + default: '' + }, + filterable: Boolean, + format: { + type: Object, + default: () => ({}) + }, + leftDefaultChecked: { + type: Array, + default: () => [] + }, + modelValue: { + type: Array, + default: () => [] + }, + pagerOp: { + type: Object, + default: () => ({ mode: 'fixed', pageVO: { currentPage: 1, pageSize: 10 } }) + }, + props: { + type: Object, + default: () => ({ label: 'label', key: 'key', disabled: 'disabled' }) + }, + render: Object, + renderContent: Function, + renderType: String, + rightDefaultChecked: { + type: Array, + default: () => [] + }, + showAllBtn: Boolean, + showPager: { + type: Boolean, + default: false + }, + targetOrder: { + type: String, + default: 'original' + }, + titles: { + type: Array, + default: () => [] + }, + toLeftDisable: { + type: Boolean, + default: true + }, + toRightDisable: { + type: Boolean, + default: true + }, + treeOp: Object + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/transfer/src/pc.vue b/packages/transfer/src/pc.vue new file mode 100644 index 000000000..3d970cd7e --- /dev/null +++ b/packages/transfer/src/pc.vue @@ -0,0 +1,146 @@ + + + + + diff --git a/packages/tree-menu/index.js b/packages/tree-menu/index.js new file mode 100644 index 000000000..fb40d7805 --- /dev/null +++ b/packages/tree-menu/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import TreeMenu from './src/index.vue' +import '@opentiny/vue-theme/tree-menu/index.css' + +/* istanbul ignore next */ +TreeMenu.install = function (Vue) { + Vue.component(TreeMenu.name, TreeMenu) +} + +TreeMenu.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + TreeMenu.install(window.Vue) + } +} + +export default TreeMenu diff --git a/packages/tree-menu/package.json b/packages/tree-menu/package.json new file mode 100644 index 000000000..7b94e5221 --- /dev/null +++ b/packages/tree-menu/package.json @@ -0,0 +1,19 @@ +{ + "name": "@opentiny/vue-tree-menu", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-input": "~0.1.0", + "@opentiny/vue-tree": "~0.1.0", + "@opentiny/vue-locale": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/tree-menu/src/index.vue b/packages/tree-menu/src/index.vue new file mode 100644 index 000000000..1c32628ba --- /dev/null +++ b/packages/tree-menu/src/index.vue @@ -0,0 +1,148 @@ + + + + + diff --git a/packages/tree/index.js b/packages/tree/index.js new file mode 100644 index 000000000..162f9bef0 --- /dev/null +++ b/packages/tree/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Tree from './src/index.js' +import '@opentiny/vue-theme/tree/index.css' + +/* istanbul ignore next */ +Tree.install = function (Vue) { + Vue.component(Tree.name, Tree) +} + +Tree.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Tree.install(window.Vue) + } +} + +export default Tree diff --git a/packages/tree/package.json b/packages/tree/package.json new file mode 100644 index 000000000..e481eba2b --- /dev/null +++ b/packages/tree/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-tree", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/tree/src/index.js b/packages/tree/src/index.js new file mode 100644 index 000000000..db7fad6b6 --- /dev/null +++ b/packages/tree/src/index.js @@ -0,0 +1,110 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const $constants = { + EMPTY_TEXT_LOCAL: 'ui.tree.emptyText' +} + +const template = () => PCTemplate + +export default { + name: $prefix + 'Tree', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + accordion: Boolean, + allowDrag: Function, + allowDrop: Function, + autoExpandParent: { + type: Boolean, + default: true + }, + checkDescendants: { + type: Boolean, + default: false + }, + checkOnClickNode: Boolean, + checkStrictly: Boolean, + currentNodeKey: [String, Number], + data: { + type: Array + }, + dataset: Object, + defaultCheckedKeys: Array, + defaultExpandAll: Boolean, + defaultExpandedKeys: Array, + defaultExpandedKeysHighlight: [Number, String], + draggable: { + type: Boolean, + default: false + }, + emptyText: String, + expandIcon: Object, + expandOnClickNode: { + type: Boolean, + default: true + }, + filterNodeMethod: Function, + highlightCurrent: Boolean, + icon: Object, + iconTriggerClickNode: { + type: Boolean, + default: true + }, + indent: { + type: Number, + default: 16 + }, + lazy: { + type: Boolean, + default: false + }, + load: Function, + nodeKey: String, + parentKey: String, + props: { + default() { + return { + children: 'children', + label: 'label', + disabled: 'disabled' + } + } + }, + renderAfterExpand: { + type: Boolean, + default: true + }, + renderContent: Function, + showCheckbox: { + type: Boolean, + default: false + }, + showContextmenu: { + type: Boolean, + default: false + }, + showRadio: { + type: Boolean, + default: false + }, + shrinkIcon: Object + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/tree/src/pc.vue b/packages/tree/src/pc.vue new file mode 100644 index 000000000..38fa1db5a --- /dev/null +++ b/packages/tree/src/pc.vue @@ -0,0 +1,118 @@ + + + + + diff --git a/packages/tree/src/tree-node.vue b/packages/tree/src/tree-node.vue new file mode 100644 index 000000000..1bf51e487 --- /dev/null +++ b/packages/tree/src/tree-node.vue @@ -0,0 +1,217 @@ + + + + + diff --git a/packages/upload-dragger/index.js b/packages/upload-dragger/index.js new file mode 100644 index 000000000..710fc80bf --- /dev/null +++ b/packages/upload-dragger/index.js @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import UploadDragger from './src/index.vue' + +/* istanbul ignore next */ +UploadDragger.install = function (Vue) { + Vue.component(UploadDragger.name, UploadDragger) +} + +UploadDragger.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + UploadDragger.install(window.Vue) + } +} + +export default UploadDragger diff --git a/packages/upload-dragger/package.json b/packages/upload-dragger/package.json new file mode 100644 index 000000000..dbf0e706b --- /dev/null +++ b/packages/upload-dragger/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-upload-dragger", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/upload-dragger/src/index.vue b/packages/upload-dragger/src/index.vue new file mode 100644 index 000000000..e133eb3cc --- /dev/null +++ b/packages/upload-dragger/src/index.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/packages/upload-list/index.js b/packages/upload-list/index.js new file mode 100644 index 000000000..7823bbf91 --- /dev/null +++ b/packages/upload-list/index.js @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import UploadList from './src/index.vue' + +/* istanbul ignore next */ +UploadList.install = function (Vue) { + Vue.component(UploadList.name, UploadList) +} + +UploadList.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + UploadList.install(window.Vue) + } +} + +export default UploadList diff --git a/packages/upload-list/package.json b/packages/upload-list/package.json new file mode 100644 index 000000000..624e2c0a4 --- /dev/null +++ b/packages/upload-list/package.json @@ -0,0 +1,19 @@ +{ + "name": "@opentiny/vue-upload-list", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-locale": "~0.1.0", + "@opentiny/vue-progress": "~0.1.0", + "@opentiny/vue-image-viewer": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/upload-list/src/index.vue b/packages/upload-list/src/index.vue new file mode 100644 index 000000000..d12e02778 --- /dev/null +++ b/packages/upload-list/src/index.vue @@ -0,0 +1,236 @@ + + + + + diff --git a/packages/upload/index.js b/packages/upload/index.js new file mode 100644 index 000000000..6868f8000 --- /dev/null +++ b/packages/upload/index.js @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Upload from './src/index.vue' + +/* istanbul ignore next */ +Upload.install = function (Vue) { + Vue.component(Upload.name, Upload) +} + +Upload.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Upload.install(window.Vue) + } +} + +export default Upload diff --git a/packages/upload/package.json b/packages/upload/package.json new file mode 100644 index 000000000..f470f2803 --- /dev/null +++ b/packages/upload/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-upload", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-upload-dragger": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/upload/src/index.vue b/packages/upload/src/index.vue new file mode 100644 index 000000000..c9b08514d --- /dev/null +++ b/packages/upload/src/index.vue @@ -0,0 +1,132 @@ + + + diff --git a/packages/user-contact/index.js b/packages/user-contact/index.js new file mode 100644 index 000000000..d3b270455 --- /dev/null +++ b/packages/user-contact/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import UserContact from './src/index' +import '@opentiny/vue-theme/user-contact/index.css' + +/* istanbul ignore next */ +UserContact.install = function (Vue) { + Vue.component(UserContact.name, UserContact) +} + +UserContact.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + UserContact.install(window.Vue) + } +} + +export default UserContact diff --git a/packages/user-contact/package.json b/packages/user-contact/package.json new file mode 100644 index 000000000..4bd8d5de4 --- /dev/null +++ b/packages/user-contact/package.json @@ -0,0 +1,20 @@ +{ + "name": "@opentiny/vue-user-contact", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-user-head": "~0.1.0", + "@opentiny/vue-card-template": "~0.1.0", + "@opentiny/vue-popover": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/user-contact/src/index.js b/packages/user-contact/src/index.js new file mode 100644 index 000000000..60d3ad546 --- /dev/null +++ b/packages/user-contact/src/index.js @@ -0,0 +1,71 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $setup, $prefix } from '@opentiny/vue-common' +import PCTemplate from './pc' + +export default { + name: $prefix + 'UserContact', + props: { + ...$props, + showName: { + type: Boolean, + default: true + }, + showArrow: { + type: Boolean, + default: false + }, + + /** + * 是否显示 userDescription, colType 为 false 时生效 + */ + showDescription: { + type: Boolean, + default: true + }, + + /** + * 是否显示 头像 + */ + showImg: { + type: Boolean, + default: true + }, + + /** + * 数据 + */ + data: { + type: Object, + validator: (value) => + typeof value.userName === 'string' && value.imgUrl + ? typeof value.imgUrl === 'string' + : true && typeof value.userDescription === 'string' && (!value.values || Array.isArray(value.values)) + }, + popperClass: String, + popperAppendToBody: { + type: Boolean, + default: true + }, + isNewImMode: { + type: Boolean, + default: true + } + }, + setup(props, context) { + return $setup({ + context, + props, + template: () => PCTemplate + }) + } +} diff --git a/packages/user-contact/src/pc.vue b/packages/user-contact/src/pc.vue new file mode 100644 index 000000000..3e8d23784 --- /dev/null +++ b/packages/user-contact/src/pc.vue @@ -0,0 +1,84 @@ + + + + + diff --git a/packages/user-head/index.js b/packages/user-head/index.js new file mode 100644 index 000000000..49f263cc9 --- /dev/null +++ b/packages/user-head/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import UserHead from './src/index' +import '@opentiny/vue-theme/user-head/index.css' + +/* istanbul ignore next */ +UserHead.install = function (Vue) { + Vue.component(UserHead.name, UserHead) +} + +UserHead.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + UserHead.install(window.Vue) + } +} + +export default UserHead diff --git a/packages/user-head/package.json b/packages/user-head/package.json new file mode 100644 index 000000000..ede396d63 --- /dev/null +++ b/packages/user-head/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opentiny/vue-user-head", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/user-head/src/index.js b/packages/user-head/src/index.js new file mode 100644 index 000000000..48c19c2a8 --- /dev/null +++ b/packages/user-head/src/index.js @@ -0,0 +1,91 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const template = () => PCTemplate + +export default { + name: $prefix + 'UserHead', + props: { + ...$props, + + /** + * @property {Boolean} [min=false] - 小尺寸模式 + */ + min: Boolean, + + /** + * @property {Boolean} [round=true] - 圆形模式 + */ + round: Boolean, + + /** + * @property {String} [color=#ffffff] - 文字颜色 + */ + color: { + type: String, + default: '#ffffff' + }, + + /** + * @property {String} [backgroundColor=#BBBBBB] - 背景色 + */ + backgroundColor: { + type: String, + default: '#BBBBBB' + }, + + /** + * @property {String} [type=label] - 头像类型,icon|image|label 可选 + */ + type: { + type: String, + default: 'label', + validator: (value) => ~['icon', 'image', 'label'].indexOf(value) + }, + + /** + * @property {String} - 头像资源 + * type=icon 时为图标类名,type=label时为字体串,type=image时为资源路径 + */ + value: { + type: [Object, String], + default: null + }, + + /** + * @property {Number} - 消息计数 + */ + messageTotal: Number, + + /** + * @property {String} [messageType=details] - 消息类型 details|basic 可选 + */ + messageType: { + type: String, + default: 'details', + validator: (value) => ~['details', 'basic'].indexOf(value) + }, + + /** + * @property {Number} [messageUpperLimit=0] - 消息显示上限 + */ + messageUpperLimit: { + type: Number, + default: 0 + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/user-head/src/pc.vue b/packages/user-head/src/pc.vue new file mode 100644 index 000000000..054ac5206 --- /dev/null +++ b/packages/user-head/src/pc.vue @@ -0,0 +1,41 @@ + + + + + diff --git a/packages/wizard/index.js b/packages/wizard/index.js new file mode 100644 index 000000000..e4f69b5a7 --- /dev/null +++ b/packages/wizard/index.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import Wizard from './src/index' +import '@opentiny/vue-theme/wizard/index.css' + +/* istanbul ignore next */ +Wizard.install = function (Vue) { + Vue.component(Wizard.name, Wizard) +} + +Wizard.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + Wizard.install(window.Vue) + } +} + +export default Wizard diff --git a/packages/wizard/package.json b/packages/wizard/package.json new file mode 100644 index 000000000..e2f1fcb2a --- /dev/null +++ b/packages/wizard/package.json @@ -0,0 +1,19 @@ +{ + "name": "@opentiny/vue-wizard", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0", + "@opentiny/vue-button": "~0.1.0", + "@opentiny/vue-user-contact": "~0.1.0", + "@opentiny/vue-icon": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/wizard/src/index.js b/packages/wizard/src/index.js new file mode 100644 index 000000000..89213ea0d --- /dev/null +++ b/packages/wizard/src/index.js @@ -0,0 +1,51 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import { $props, $prefix, $setup } from '@opentiny/vue-common' +import PCTemplate from './pc' + +const $constants = { + DOING_STATUS: 'doing', + READY_STATUS: 'ready', + WAIT_STATUS: 'wait' +} + +const template = () => PCTemplate + +export default { + name: $prefix + 'Wizard', + props: { + ...$props, + _constants: { + type: Object, + default: () => $constants + }, + data: { + type: Array, + default: () => [] + }, + pageGuide: { + type: Boolean, + default: false + }, + vertical: { + type: Boolean, + default: false + }, + timeLineFlow: { + type: Boolean, + default: false + } + }, + setup(props, context) { + return $setup({ props, context, template }) + } +} diff --git a/packages/wizard/src/pc.vue b/packages/wizard/src/pc.vue new file mode 100644 index 000000000..9235d45b3 --- /dev/null +++ b/packages/wizard/src/pc.vue @@ -0,0 +1,142 @@ + + + + + diff --git a/packages/year-table/index.js b/packages/year-table/index.js new file mode 100644 index 000000000..dc56ee607 --- /dev/null +++ b/packages/year-table/index.js @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2022 - present TinyVue Authors. + * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ +import YearTable from './src/index.vue' + +/* istanbul ignore next */ +YearTable.install = function (Vue) { + Vue.component(YearTable.name, YearTable) +} + +YearTable.version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + YearTable.install(window.Vue) + } +} + +export default YearTable diff --git a/packages/year-table/package.json b/packages/year-table/package.json new file mode 100644 index 000000000..7fe866915 --- /dev/null +++ b/packages/year-table/package.json @@ -0,0 +1,16 @@ +{ + "name": "@opentiny/vue-year-table", + "version": "0.1.0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet", + "build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", + "build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-common": "~0.1.0" + }, + "license": "MIT" +} diff --git a/packages/year-table/src/index.vue b/packages/year-table/src/index.vue new file mode 100644 index 000000000..d5072f386 --- /dev/null +++ b/packages/year-table/src/index.vue @@ -0,0 +1,81 @@ + + + + + diff --git a/template/common/vue2.js b/template/common/vue2.js new file mode 100644 index 000000000..8cd6324b6 --- /dev/null +++ b/template/common/vue2.js @@ -0,0 +1,20 @@ +import * as vue from '@opentiny/vue-common/adapter/vue2' + +export default vue.default + +export const { + defineAsyncComponent, + markRaw, + renderComponent, + rootConfig, + appContext, + appProperties, + tools, + directive, + h, + createComponent, + parseVnode, + bindFilter, + useRouter, + emitter +} = vue diff --git a/template/common/vue3.js b/template/common/vue3.js new file mode 100644 index 000000000..5036c3258 --- /dev/null +++ b/template/common/vue3.js @@ -0,0 +1,20 @@ +import * as vue from '@opentiny/vue-common/adapter/vue3' + +export default vue.default + +export const { + defineAsyncComponent, + markRaw, + renderComponent, + rootConfig, + appContext, + appProperties, + tools, + directive, + h, + createComponent, + parseVnode, + bindFilter, + useRouter, + emitter +} = vue diff --git a/template/component/index.js b/template/component/index.js new file mode 100644 index 000000000..8a3f0e989 --- /dev/null +++ b/template/component/index.js @@ -0,0 +1,23 @@ +import [[UNAME]] from './src/index[[SUFFIX]]' +// import '@opentiny/[[THEME]]/[[NAME]]/index.css' + +[[UNAME]].model = { + prop: 'modelValue', + event: 'update:modelValue' +} + +/* istanbul ignore next */ +[[UNAME]].install = function (Vue) { + Vue.component([[UNAME]].name, [[UNAME]]) +} + +[[UNAME]].version = process.env.COMPONENT_VERSION + +/* istanbul ignore next */ +if (process.env.BUILD_TARGET === 'runtime') { + if (typeof window !== 'undefined' && window.Vue) { + [[UNAME]].install(window.Vue) + } +} + +export default [[UNAME]] diff --git a/template/component/package.json b/template/component/package.json new file mode 100644 index 000000000..df4f63d65 --- /dev/null +++ b/template/component/package.json @@ -0,0 +1,15 @@ +{ + "name": "@opentiny/vue-[[NAME]]", + "version": "0.[[MINOR]].0", + "description": "", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src/**/*{.js,.html,.vue} --quiet" + }, + "dependencies": { + "@opentiny/vue-renderless": "~0.1.0", + "@opentiny/vue-theme": "~0.1.0", + "@opentiny/vue-common": "~0.1.0" + }, + "license": "MIT" +} diff --git a/template/component/src/index.js b/template/component/src/index.js new file mode 100644 index 000000000..3d4367f29 --- /dev/null +++ b/template/component/src/index.js @@ -0,0 +1,34 @@ +import { $props, $setup, $prefix } from '@opentiny/vue-common' + +const _constants = {} + +export default { + name: $prefix + '[[UNAME]]', + props: { + ...$props, + _constants: { + type: Object, + default: () => _constants + }, + modelValue: String + }, + setup(props, context) { + return $setup({ + props, + context, + template: (mode) => { + /* istanbul ignore next */ + if (process.env.NODE_ENV === 'test') { + return require(`./${mode}`).default + } else if (process.env.TINY_MODE) { + return require('./' + process.env.TINY_MODE).default + } else { + return () => + import( + /* webpackChunkName: "[[NAME]]-[request]" */ /* webpackExclude: /index|dist/ */ `./${mode}` + ) + } + } + }) + } +} diff --git a/template/component/src/mobile.vue b/template/component/src/mobile.vue new file mode 100644 index 000000000..65064c2cb --- /dev/null +++ b/template/component/src/mobile.vue @@ -0,0 +1,16 @@ + + + diff --git a/template/component/src/pc.vue b/template/component/src/pc.vue new file mode 100644 index 000000000..65064c2cb --- /dev/null +++ b/template/component/src/pc.vue @@ -0,0 +1,16 @@ + + + diff --git a/template/component/src/single.vue b/template/component/src/single.vue new file mode 100644 index 000000000..cd23fcb24 --- /dev/null +++ b/template/component/src/single.vue @@ -0,0 +1,24 @@ + + + diff --git a/template/icon/index.js b/template/icon/index.js new file mode 100644 index 000000000..17032e6f5 --- /dev/null +++ b/template/icon/index.js @@ -0,0 +1,4 @@ +import { svg } from '@opentiny/vue-common' +import [[CNAME]] from '@opentiny/vue-theme/svgs/[[SNAME]]' + +export default svg({ name: 'Icon[[CNAME]]', component: [[CNAME]] }) diff --git a/template/locale/vue2.js b/template/locale/vue2.js new file mode 100644 index 000000000..8c517625f --- /dev/null +++ b/template/locale/vue2.js @@ -0,0 +1,21 @@ +import * as vue from '@opentiny/vue-locale/vue2' +import glob from './glob' + +export const { use, t, i18n, initI18n, extend, zhCN, enUS, language } = vue + +export const globalization = glob(t) + +export const version = process.env.COMPONENT_VERSION + +export default { + use, + t, + i18n, + initI18n, + extend, + zhCN, + enUS, + language, + ...vue.default, + globalization +} diff --git a/template/locale/vue3.js b/template/locale/vue3.js new file mode 100644 index 000000000..7ec7bf5c9 --- /dev/null +++ b/template/locale/vue3.js @@ -0,0 +1,21 @@ +import * as vue from '@opentiny/vue-locale/vue3' +import glob from './glob' + +export const { use, t, i18n, initI18n, extend, zhCN, enUS, language } = vue + +export const globalization = glob(t) + +export const version = process.env.COMPONENT_VERSION + +export default { + use, + t, + i18n, + initI18n, + extend, + zhCN, + enUS, + language, + ...vue.default, + globalization +} diff --git a/template/runtime/demo.html b/template/runtime/demo.html new file mode 100644 index 000000000..ae94e6606 --- /dev/null +++ b/template/runtime/demo.html @@ -0,0 +1,284 @@ +
    +

    Tag 标签组件

    + 标签一 + 标签二 + 标签三 + 标签四 + 标签五 +
    +
    +

    Alert 警告组件

    + + + + +
    +
    +

    FallMenu 瀑布菜单组件

    + +
    +
    +

    Layout 布局组件

    + + + +
    span 12
    +
    +
    + + +
    span 3
    +
    + +
    span 6
    +
    + +
    span 3
    +
    +
    + + +
    span 2
    +
    + +
    span 3
    +
    + +
    span 2
    +
    + +
    span 3
    +
    + +
    span 2
    +
    +
    +
    +
    +
    +

    Button 组件

    + 默认按钮 + 主要按钮 + 成功按钮 + 信息按钮 + 警告按钮 + 危险按钮 +
    +
    +

    Input 组件

    + +
    +
    + +
    +
    +

    Select 组件

    + + + + +
    +
    +

    DropTimes 组件

    + +
    +
    +

    DatePiker 组件

    + +
    +
    +

    Form 表单

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 立即创建 + 取消 + + +
    +
    +

    Grid 组件

    + + + + + + + + + +
    +
    +

    Pager 组件

    + +
    +
    +

    Transfer 组件

    + +
    +
    +

    Tree 组件

    + +
    +
    +

    Loading 组件

    +
    测试
    +
    测试
    +
    +
    +

    Modal 组件

    + 确认提示框 +
    +
    +

    Icon 组件

    + + + + + +

    组件图标

    + + + + + + +
    +
    +

    bar

    + +
    +
    +

    candle

    + +
    +
    +

    funnel

    + +
    +
    +

    gauge

    + +
    +
    +

    graph

    + +
    +
    +

    heatmap

    + +
    +
    +

    histogram

    + +
    +
    +

    line

    + +
    +
    +

    pie

    + +
    +
    +

    radar

    + +
    +
    +

    ring

    + +
    +
    +

    sankey

    + +
    +
    +

    scatter

    + +
    +
    +

    sunburst

    + +
    +
    +

    tree

    + +
    diff --git a/vite.config.js b/vite.config.js new file mode 100644 index 000000000..55b922eee --- /dev/null +++ b/vite.config.js @@ -0,0 +1,54 @@ +import { defineConfig } from 'vite' +import { createVuePlugin } from 'vite-plugin-vue2' +import path from 'path' +import vueJsx from '@vitejs/plugin-vue2-jsx' +import { createSvgPlugin } from 'vite-plugin-vue2-svg' +import md2Vue2Plugin from 'vite-plugin-md2vue2' +const { getAllModules } = require('./build/module-utils') + +const pathJoin = (...args) => path.join(__dirname, ...args) +const components = getAllModules(false) + +const doComponents = (alias = {}) => { + components.forEach((item) => { + alias[item.libName] = pathJoin(item.path) + alias[item.importName] = pathJoin(item.path) + + if (item.type === 'component') { + alias[`@opentiny/vue-theme/${item.LowerName}/index.css`] = pathJoin(`../tiny-vue-theme/src/${item.LowerName}/index.less`) + alias[`@opentiny/vue-theme-mobile/${item.LowerName}/index.css`] = pathJoin(`../tiny-vue-theme-mobile/src/${item.LowerName}/index.less`) + } + }) + return alias +} +const config = { + server: { + host: '127.0.0.1', + open: true + }, + plugins: [md2Vue2Plugin(), createVuePlugin(), vueJsx(), createSvgPlugin()], + resolve: { + extensions: ['.js', '.jsx', '.vue'], + alias: { + '@': pathJoin('example/src'), + '@opentiny/vue': pathJoin('packages'), + vue: pathJoin('./node_modules/vue/dist/vue.esm.js'), + 'vue-i18n': pathJoin('./node_modules/vue-i18n/dist/vue-i18n.esm.js'), + 'vue-router': pathJoin('./node_modules/vue-router/dist/vue-router.esm.js'), + '@opentiny/vue-locale': pathJoin('packages/locale'), + '@opentiny/vue-common': pathJoin('packages/common'), + '@opentiny/vue-renderless': pathJoin('../tiny-vue-renderless/src'), + '@opentiny/vue-icon': pathJoin('packages/icon/index.js'), + '@opentiny/vue-theme/base/index.css': pathJoin('../tiny-vue-theme/src/base/index.less'), + '@opentiny/vue-theme/theme-tool.js': pathJoin('../tiny-vue-theme/src/theme-tool.js'), + '@opentiny/vue-theme/theme': pathJoin('../tiny-vue-theme/src/theme/index.js'), + '@opentiny/vue-theme-mobile/base/index.css': pathJoin('../tiny-vue-theme-mobile/src/base/index.less'), + ...doComponents() + } + }, + define: { + 'process.env': process.env + } +} + +export default defineConfig(() => config)