Skip to content

feat: replace menu icons to @opentiny/icons (#19) #36

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

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
1 change: 1 addition & 0 deletions template/tinyvue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"@babel/core": "^7.25.2",
"@gaonengwww/mock-server": "^1.0.5",
"@opentiny/hwc-client": "^0.0.14",
"@opentiny/icons": "^0.1.3",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

New dependency added without updating lockfile

You've added @opentiny/icons as a dependency, but haven't updated the lockfile, causing CI failures.

Please run the following command to update the lockfile:

pnpm install

The pipeline failure shows: "pnpm install failed due to outdated lockfile. The pnpm-lock.yaml is not up to date with package.json."

🤖 Prompt for AI Agents (early access)
In template/tinyvue/package.json at line 41, you added the dependency "@opentiny/icons" but did not update the pnpm lockfile. To fix this, run "pnpm install" in the project root to update pnpm-lock.yaml so it matches package.json, then commit the updated lockfile to avoid CI failures.

"@opentiny/vue": "^3.21.0",
"@opentiny/vue-icon": "^3.21.0",
"@opentiny/vue-locale": "^3.20.0",
Expand Down
8 changes: 8 additions & 0 deletions template/tinyvue/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions template/tinyvue/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import config from '../hwc-exports.json';
import chinaMap from './assets/china.json';
import '@opentiny/vue-search-box/index.css';
import 'virtual:uno.css';
import "@opentiny/icons/style/all.css";

registerMap('china', chinaMap as any);
const app = createApp(App);
Expand Down
13 changes: 10 additions & 3 deletions template/tinyvue/src/views/menu/info/components/add-menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,15 @@
:placeholder="$t('baseForm.form.label.placeholder')"
filterable
no-match-text="No Match"
:options="iconDatas"
optimization
>
<tiny-option
v-for="item in iconDatas"
:key="item.value"
:label="item.label"
:value="item.value"
>
<i :class="`ci-${item.value}`"></i>&nbsp;{{ item.label }}
</tiny-option>
</tiny-select>
</tiny-form-item>
<tiny-form-item :label="$t('menuInfo.table.component')" prop="component">
Expand Down Expand Up @@ -63,8 +69,9 @@
FormItem as TinyFormItem,
Input as TinyInput,
Select as TinySelect,
Option as TinyOption,
} from '@opentiny/vue';
import * as icons from '@opentiny/vue-icon';
import { icons} from '@opentiny/icons/json/icons.json';
import { reactive, ref, toRefs, computed, unref } from 'vue';

const props = defineProps<{
Expand Down
Loading