Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

D2M #10451

Merged
merged 57 commits into from
Nov 6, 2022
Merged

D2M #10451

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
ceef0a5
chore: rm error doc (#10180)
iamkun Oct 21, 2022
6890afc
chore: add missing docs (#10185)
iamkun Oct 21, 2022
6d624f1
docs(components): [Autocomplete] add h1 to autocomplete docs and litt…
jasonren0403 Oct 22, 2022
d3a32cd
refactor(components): [calendar] (#10163)
jw-foss Oct 22, 2022
99fe8b2
fix(components): [select-v2] empty value should be undefined (#10189)
holazz Oct 22, 2022
dec859a
fix(components): [popover] abnormal style when effect is dark (#10190)
holazz Oct 22, 2022
9285109
fix(components): [table] fixed column supported in grouped header (#1…
tinyfind Oct 23, 2022
9046055
refactor(components): [carousel] (#10188)
jw-foss Oct 24, 2022
15d75fa
chore: remove duplicate code (#10223)
Lionad-Morotar Oct 25, 2022
66e2a41
Revert "fix(components): [loading] prevent click through, closes #564…
holazz Oct 25, 2022
a7df718
fix(components): [popper] enable the adaptive configuration (#10104)
tolking Oct 26, 2022
bfb8e26
refactor(components): [carousel-item] (#10219)
jw-foss Oct 26, 2022
af874ea
refactor(components): [tabs] simplify logic with hooks (#10224)
holazz Oct 26, 2022
6d839ae
fix(components): [select] blur trigger remote event should pass strin…
btea Oct 26, 2022
4a26aa4
fix(components): [form] throw non-validation error (#10255)
holazz Oct 26, 2022
b3be81d
fix(components): [checkbox] circular reference (#10278)
btea Oct 27, 2022
a8c6df5
fix(components): [input-number] increase and decrease error (#10067)
gjfei Oct 27, 2022
1f22916
fix(components): [tooltip] remove deprecated api (#10264)
chenxch Oct 27, 2022
5aa8d67
ci: use env files to replace the deprecated set-output command (#10268)
HeftyKoo Oct 27, 2022
edd8b3c
feat(components): [dropdown] add props for teleported API (#10012)
consultation-applio Oct 27, 2022
c5aa563
fix(components): [cascader] consistent component height (#10214)
holazz Oct 27, 2022
874aa0a
refactor(components): [select] use util function (#10286)
btea Oct 27, 2022
43b5ea1
fix(components): [date-picker] monthRange mode switching month sync (…
chenxch Oct 28, 2022
48f837b
fix(components): [upload] add uid for file handleStart (#9876)
init-qy Oct 28, 2022
93f2a1d
fix(components): [carousel] missing root ref (#10312)
holazz Oct 30, 2022
5ef175f
style(components): [slider] fix text line feed (#10306)
charles-lpd Oct 30, 2022
deccb07
docs: update tooltip.md (#10325)
voyagerFeng Oct 31, 2022
b45346c
fix(utils): [vnode] flattedChildren support subTree (#10298)
chenxch Oct 31, 2022
4ff8f28
refactor(components): [collapse] (#10289)
jw-foss Oct 31, 2022
1753e1d
fix(components): [tree-v2] add missing icon (#10340)
init-qy Nov 1, 2022
d8ee83d
fix(components): [tree-v2] default icon render test (#10342)
init-qy Nov 1, 2022
44b04fc
docs(components): [button] api complement (#10334)
chenxch Nov 1, 2022
3c9eac1
feat(docs): vite-press new component (#10346)
jw-foss Nov 1, 2022
a8f06fb
style(theme-chalk): fix input-number style (#10349)
kooriookami Nov 1, 2022
231709b
feat(docs): api typing shortcuts (#10353)
jw-foss Nov 1, 2022
dd65c73
docs(components): [affix] (#10345)
jw-foss Nov 1, 2022
364d1a2
docs(components): [api-typing] (#10355)
jw-foss Nov 1, 2022
42fb53a
perf(utils): addUnit support string number (#10362)
kooriookami Nov 2, 2022
751d187
docs(components): [api-external] (#10356)
chenxch Nov 2, 2022
e7843c0
refactor(components): [input] export instance type (#10368)
chenxch Nov 2, 2022
a329ed6
feat(docs): [components] additions (#10374)
jw-foss Nov 3, 2022
f77716f
style(theme-chalk): fix select style (#10381)
xiaoxian521 Nov 3, 2022
5830d07
style(theme-chalk): fix input style (#10390)
xiaoxian521 Nov 3, 2022
9c85ac7
style(theme-chalk): fix date-picker style (#10392)
xiaoxian521 Nov 3, 2022
6524a2d
chore(play): update unplugin-vue-components (#10393)
btea Nov 3, 2022
8ccb7df
docs(components): [alert] (#10373)
jw-foss Nov 3, 2022
98e171e
chore(build): optimize the conversion of type in documents (#10419)
tolking Nov 4, 2022
71e6365
docs(components): [autocomplete] (#10405)
jw-foss Nov 4, 2022
d3329cc
fix(docs): [autocomplete] (#10426)
jw-foss Nov 4, 2022
7b77d75
docs(build): add a plugin to display the type details (#10435)
tolking Nov 5, 2022
ad9f92b
chore(build): optimize the type conversion of tooltip plugin in docs …
tolking Nov 5, 2022
fe66c08
fix(components): [cascader] remove extra space in the search text (#1…
holazz Nov 5, 2022
36c5aed
refactor(docs): tooltip plugin (#10440)
tolking Nov 5, 2022
39faf4b
fix(docs): [autocomplete] [affix] (#10443)
jw-foss Nov 5, 2022
d2fb4ff
fix(component): [table] can't select row children (#10221)
faga295 Nov 5, 2022
44c6ac7
chore(docs): [autocomplete] remove extra quotes (#10444)
btea Nov 5, 2022
1688a6e
chore: Update changelog 2.2.20 (#10452)
element-bot Nov 6, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/lint-commit-message-post.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:

- name: Assert result
id: assert
run: echo "::set-output name=succeeded::$(<lint-result.txt)"
run: echo "succeeded=$(<lint-result.txt)" >> $GITHUB_OUTPUT
- name: Get PR number
id: pr
run: echo "::set-output name=pr::$(<pr.txt)"
run: echo "pr=$(<pr.txt)" >> $GITHUB_OUTPUT

on-success:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-commit-message.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
name: Setup pnpm cache
Expand All @@ -42,7 +42,7 @@ jobs:

- name: Lint commit
id: lint_commit
run: pnpm lint:commit || echo "::set-output name=failed::true"
run: pnpm lint:commit || echo "failed=true" >> $GITHUB_OUTPUT

- name: Set success result
if: ${{ steps.lint_commit.outputs.failed != 'true' }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pr-docs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ jobs:
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
echo "pnpm_cache_dir=$(pnpm store path)" >> $env:GITHUB_OUTPUT

- uses: actions/cache@v3
name: Setup pnpm cache
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-docs-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- name: Output pr number
id: pr
run: echo "::set-output name=id::$(<pr.txt)"
run: echo "id=$(<pr.txt)" >> $GITHUB_OUTPUT

- name: Download artifact
uses: dawidd6/action-download-artifact@v2
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:

- name: Output pr number
id: pr
run: echo "::set-output name=id::$(<pr.txt)"
run: echo "id=$(<pr.txt)" >> $GITHUB_OUTPUT

- name: Deploy has failed
uses: actions-cool/maintain-one-comment@v3.0.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-build-product.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
name: Setup pnpm cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-docs-deploy-manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
name: Setup pnpm cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-docs-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
name: Setup pnpm cache
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-npm-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
name: Setup pnpm cache
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:

- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d')"
run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT

- name: Get git head
run: echo "GIT_HEAD=${GITHUB_SHA}" >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
name: Setup pnpm cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-size-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
name: Setup pnpm cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/staging-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
name: Setup pnpm cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
name: Setup pnpm cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-ssr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
name: Setup pnpm cache
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
name: Setup pnpm cache
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
name: Setup pnpm cache
Expand Down
45 changes: 45 additions & 0 deletions CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,50 @@
## Changelog

### 2.2.20

_2022-11-06_

#### Features

- Components [dropdown] add props for teleported API (#10012 by @consultation-applio)
- Docs vite-press new component (#10346 by @jw-foss)
- Docs api typing shortcuts (#10353 by @jw-foss)
- Docs [components] additions (#10374 by @jw-foss)

#### Bug fixes

- Components [select-v2] empty value should be undefined (#10189 by @holazz)
- Components [popover] abnormal style when effect is dark (#10190 by @holazz)
- Components [table] fixed column supported in grouped header (#10096 by @tinyfind)
- Components [popper] enable the adaptive configuration (#10104 by @tolking)
- Components [select] blur trigger remote event should pass string (#10218 by @btea)
- Components [form] throw non-validation error (#10255 by @holazz)
- Components [checkbox] circular reference (#10278 by @btea)
- Components [input-number] increase and decrease error (#10067 by @gjfei)
- Components [tooltip] remove deprecated api (#10264 by @chenxch)
- Components [cascader] consistent component height (#10214 by @holazz)
- Components [date-picker] monthRange mode switching month sync (#10292 by @chenxch)
- Components [upload] add uid for file handleStart (#9876 by @init-qy)
- Components [carousel] missing root ref (#10312 by @holazz)
- Utils [vnode] flattedChildren support subTree (#10298 by @chenxch)
- Components [tree-v2] add missing icon (#10340 by @init-qy)
- Components [tree-v2] default icon render test (#10342 by @init-qy)
- Docs [autocomplete] (#10426 by @jw-foss)
- Components [cascader] remove extra space in the search text (#10439 by @holazz)
- Docs [autocomplete] [affix] (#10443 by @jw-foss)
- Component [table] can't select row children (#10221 by @faga295)

#### Refactors

- Components [calendar] (#10163 by @jw-foss)
- Components [carousel] (#10188 by @jw-foss)
- Components [carousel-item] (#10219 by @jw-foss)
- Components [tabs] simplify logic with hooks (#10224 by @holazz)
- Components [select] use util function (#10286 by @btea)
- Components [collapse] (#10289 by @jw-foss)
- Components [input] export instance type (#10368 by @chenxch)
- Docs tooltip plugin (#10440 by @tolking)

### 2.2.19

_2022-10-21_
Expand Down
5 changes: 5 additions & 0 deletions docs/.vitepress/config/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import mdContainer from 'markdown-it-container'
import { docRoot } from '@element-plus/build-utils'
import externalLinkIcon from '../plugins/external-link-icon'
import tableWrapper from '../plugins/table-wrapper'
import tooltip from '../plugins/tooltip'
import { ApiTableContainer } from '../plugins/api-table'
import { highlight } from '../utils/highlight'
import type Token from 'markdown-it/lib/token'
import type Renderer from 'markdown-it/lib/renderer'
Expand All @@ -26,6 +28,7 @@ interface ContainerOpts {
export const mdPlugin = (md: MarkdownIt) => {
md.use(externalLinkIcon)
md.use(tableWrapper)
md.use(tooltip)
md.use(mdContainer, 'demo', {
validate(params) {
return !!params.trim().match(/^demo\s*(.*)$/)
Expand Down Expand Up @@ -57,4 +60,6 @@ export const mdPlugin = (md: MarkdownIt) => {
}
},
} as ContainerOpts)

md.use(ApiTableContainer)
}
40 changes: 40 additions & 0 deletions docs/.vitepress/plugins/api-table.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import markdown from 'markdown-it'

import type MarkdownIt from 'markdown-it'

const ApiMd = new markdown()

export const ApiTableContainer = (md: MarkdownIt) => {
const fence = md.renderer.rules.fence!

ApiMd.renderer.rules = md.renderer.rules
md.renderer.rules.fence = (...args) => {
const [tokens, idx, ...rest] = args
const [options, env] = rest
const token = tokens[idx]
if (token.info === 'api') {
const newTokens = md.parse(token.content, env)

let result = ''
const { rules } = md.renderer
newTokens.forEach((newToken, idx) => {
const { type } = newToken
if (type === 'inline') {
result += md.renderer.renderInline(newToken.children!, options, env)
} else if (typeof rules[type] !== 'undefined') {
result += rules[newToken.type]!(
newTokens,
idx,
options,
env,
md.renderer
)
} else {
result += md.renderer.renderToken(newTokens, idx, options)
}
})
return result
}
return fence.call(md, ...args)
}
}
29 changes: 29 additions & 0 deletions docs/.vitepress/plugins/tooltip.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import type MarkdownIt from 'markdown-it'

export default (md: MarkdownIt): void => {
md.renderer.rules.tooltip = (tokens, idx) => {
const token = tokens[idx]

return `<api-typing type="${token.content}" details="${token.info}" />`
}

md.inline.ruler.before('emphasis', 'tooltip', (state, silent) => {
const tooltipRegExp = /^\^\[([^\]]*)\](`[^`]*`)?/
const str = state.src.slice(state.pos, state.posMax)

if (!tooltipRegExp.test(str)) return false
if (silent) return true

const result = str.match(tooltipRegExp)

if (!result) return false

const token = state.push('tooltip', 'tooltip', 0)
token.content = result[1].replace(/\\\|/g, '|')
token.info = (result[2] || '').replace(/^`(.*)`$/, '$1')
token.level = state.level
state.pos += result[0].length

return true
})
}
7 changes: 7 additions & 0 deletions docs/.vitepress/vitepress/components/globals/vp-api-bool.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<script setup lang="ts">
import Primitive from './vp-api-primitive.vue'
</script>

<template>
<Primitive type="boolean" />
</template>
20 changes: 20 additions & 0 deletions docs/.vitepress/vitepress/components/globals/vp-api-enum.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<script setup lang="ts">
import { computed } from 'vue'
import { isString } from '@vue/shared'
import ApiTyping from './vp-api-typing.vue'

const props = defineProps({
values: {
type: Array,
required: true,
},
})

const processString = (s: unknown) => (isString(s) ? `'${s}'` : s)

const details = computed(() => props.values.map(processString).join(' | '))
</script>

<template>
<api-typing type="enum" :details="details" />
</template>
33 changes: 33 additions & 0 deletions docs/.vitepress/vitepress/components/globals/vp-api-external.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<script setup lang="ts">
import VpLink from '../common/vp-link.vue'

defineProps({
text: {
type: String,
required: true,
},
url: {
type: String,
required: true,
},
prefix: {
type: String,
default: '',
},
})
</script>

<template>
<slot>
<span v-if="prefix" class="mr-1">{{ prefix }}</span>
<VpLink :href="url">
{{ text }}
</VpLink>
</slot>
</template>

<style scoped>
:deep(.el-icon) {
font-size: 18px;
}
</style>
Loading