-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
58 changed files
with
40,895 additions
and
804 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Generate Commit on Comment with Pull Request | ||
|
||
on: | ||
issue_comment: | ||
types: [created] | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
issues: write | ||
|
||
jobs: | ||
generate-commit: | ||
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/generate-commit') | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# - name: Get branch name | ||
# id: branch_name | ||
# run: | | ||
# branch_name=$(curl -s -H "Authorization: token ${{ github.token }}" ${{github.event.issue.pull_request.url}} | jq -r '.head.ref') | ||
# echo $branch_name | ||
- name: Checkout | ||
uses: actions/checkout/@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Add comment with workflow run link | ||
run: | | ||
COMMENT_BODY="The workflow run can be found at $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" | ||
curl -d '{"body":"'"$COMMENT_BODY"'"}' -H "Content-Type: application/json" -H "Authorization: Bearer ${{github.token}}" -X POST "https://api.github.com/repos/$GITHUB_REPOSITORY/issues/${{ github.event.issue.number }}/comments" | ||
env: | ||
GITHUB_SERVER_URL: ${{ github.server_url }} | ||
GITHUB_REPOSITORY: ${{ github.repository }} | ||
GITHUB_RUN_ID: ${{ github.run_id }} | ||
|
||
- name: Git Identity | ||
run: | | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/$GITHUB_REPOSITORY | ||
branch_name=$(curl -s -H "Authorization: token ${{ github.token }}" ${{github.event.issue.pull_request.url}} | jq -r '.head.ref') | ||
git checkout -b $branch_name origin/$branch_name | ||
env: | ||
GITHUB_TOKEN: ${{ github.token}} | ||
|
||
- name: Setup Nodejs | ||
uses: actions/setup-node@v3 | ||
with: | ||
cache: 'yarn' | ||
node-version: 16 | ||
|
||
- name: Install yarn | ||
run: npm install -g yarn@v1 | ||
|
||
- name: Install Dep | ||
run: | | ||
yarn install --frozen-lockfile | ||
- name: Update Pull Request | ||
run: | | ||
yarn changelog:comment | ||
env: | ||
GITHUB_TOKEN: ${{ github.token}} | ||
PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Update Pull Request Body | ||
|
||
on: | ||
pull_request: | ||
branches: main | ||
|
||
permissions: | ||
pull-requests: write | ||
|
||
jobs: | ||
update-pr: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check if commit is from CI | ||
run: | | ||
if [[ "${{ github.event.head_commit.committer.username }}" == "github-actions[bot]" ]]; then | ||
echo "Commit is from CI, skipping the build..." | ||
exit 78 | ||
else | ||
echo "Commit is not from CI, continuing with the build..." | ||
fi | ||
- name: Checkout | ||
uses: actions/checkout/@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Git Identity | ||
run: | | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/$GITHUB_REPOSITORY | ||
git checkout -b main origin/main | ||
git checkout '${{github.event.pull_request.head.ref}}' | ||
env: | ||
GITHUB_TOKEN: ${{ github.token}} | ||
|
||
- name: Setup Nodejs | ||
uses: actions/setup-node@v3 | ||
with: | ||
cache: 'yarn' | ||
node-version: 16 | ||
|
||
- name: Install yarn | ||
run: npm install -g yarn@v1 | ||
|
||
- name: Install Dep | ||
run: | | ||
yarn install --frozen-lockfile | ||
- name: Update Pull Request | ||
run: | | ||
yarn changelog:ci | ||
env: | ||
GITHUB_TOKEN: ${{ github.token}} | ||
PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,8 @@ yarn-error.log* | |
|
||
# Locks | ||
# package-lock.json | ||
yarn.lock | ||
*/**/yarn.lock | ||
*/yarn.lock | ||
|
||
# Cache | ||
.DS_Store | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "cloud-ui-materials", | ||
"private": "true", | ||
"scripts": { | ||
"changelog": "node scripts/changelog.js", | ||
"changelog:ci": "node scripts/changelog.js from-ci", | ||
"changelog:comment": "node scripts/changelog.js from-comment" | ||
}, | ||
"dependencies": { | ||
"lodash.mergewith": "^4.6.2", | ||
"node-fetch": "2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
## 1.0.3 | ||
|
||
Associated Task: [#281455](https://projectmanage.netease-official.lcap.163yun.com/dashboard/TaskDetail?id=2814552607417856) | ||
|
||
### ✨Features | ||
|
||
- [36a85cb](https://github.com/vusion/cloud-ui-materials/commit/36a85cb81dcdae782038830ad10d1bfb98e5ded5) Thanks [ncqwer](https://github.com/ncqwer) ! - 新增类型:带遮罩层的图片,对应的schema为:localImg://imageURL-mask_background_image | ||
|
||
### 🚨BREAKING CHANGES | ||
|
||
- [36a85cb](https://github.com/vusion/cloud-ui-materials/commit/36a85cb81dcdae782038830ad10d1bfb98e5ded5) Thanks [ncqwer](https://github.com/ncqwer) ! - 当前组件的内部使用的u-image默认的图片默认使用图片为fit为fill | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
...s/cust/cust_community_icon_image/components/cust-community-icon-image/image-with-mask.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<template> | ||
<div :class="$style.root"> | ||
<u-image :src="img" fit="fill"></u-image> | ||
<div v-if="maskStyle" :class="$style.mask" :style="maskStyle"></div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'custom-community-icon-with-mask', | ||
props: { | ||
img: { | ||
type: String, | ||
default: undefined, | ||
}, | ||
mask: { | ||
type: String, | ||
default: '', | ||
}, | ||
}, | ||
computed: { | ||
maskStyle() { | ||
console.log(this.$attrs); | ||
if (!this.mask) return null; | ||
return { | ||
'background-image': this.mask, | ||
}; | ||
}, | ||
}, | ||
}; | ||
</script> | ||
|
||
<style module> | ||
.root { | ||
position: relative; | ||
display: inline-block; | ||
overflow: hidden; | ||
width: var(--image-width); | ||
height: var(--image-height); | ||
color: #fff; | ||
} | ||
.root [class^='u-image__'] { | ||
width: 100%; | ||
height: 100%; | ||
} | ||
.mask { | ||
position: absolute; | ||
pointer-events: none; | ||
top: 0; | ||
left: 0; | ||
right: 0; | ||
bottom: 0; | ||
} | ||
</style> |
76 changes: 38 additions & 38 deletions
76
packages/cust/cust_community_icon_image/components/cust-community-icon-image/index.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,50 @@ | ||
<template> | ||
<div :class="$style.root" :style="rootStyle"> | ||
<svg aria-hidden="true" :class="$style.icon"><use :xlink:href="iconName"></use></svg> | ||
</div> | ||
<div :class="$style.root" :style="rootStyle"> | ||
<svg aria-hidden="true" :class="$style.icon"> | ||
<use :xlink:href="iconName"></use> | ||
</svg> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'custom-community-icon', | ||
props: { | ||
backgroundImg: { | ||
type: String, | ||
default: undefined, | ||
}, | ||
icon: { | ||
type: String, | ||
default: 'youjian', | ||
} | ||
}, | ||
computed: { | ||
iconName(){ | ||
return `#others-${this.icon}`; | ||
}, | ||
rootStyle(){ | ||
return { | ||
'background-image': this.backgroundImg, | ||
}; | ||
} | ||
} | ||
name: 'custom-community-icon', | ||
props: { | ||
backgroundImg: { | ||
type: String, | ||
default: undefined, | ||
}, | ||
icon: { | ||
type: String, | ||
default: 'youjian', | ||
}, | ||
}, | ||
computed: { | ||
iconName() { | ||
return `#others-${this.icon}`; | ||
}, | ||
rootStyle() { | ||
return { | ||
'background-image': this.backgroundImg, | ||
}; | ||
}, | ||
}, | ||
}; | ||
</script> | ||
|
||
<style module> | ||
.root{ | ||
position: relative; | ||
display: inline-block; | ||
overflow: hidden; | ||
width: var(--image-width); | ||
height: var(--image-height); | ||
color: #fff; | ||
.root { | ||
position: relative; | ||
display: inline-block; | ||
overflow: hidden; | ||
width: var(--image-width); | ||
height: var(--image-height); | ||
color: #fff; | ||
} | ||
.icon{ | ||
width: 100%; | ||
height: 100%; | ||
fill: currentColor; | ||
.icon { | ||
width: 100%; | ||
height: 100%; | ||
fill: currentColor; | ||
} | ||
</style> | ||
</style> |
Oops, something went wrong.