From e1d3c542b38c49c93c2dadbf48d1efb83f01c8f5 Mon Sep 17 00:00:00 2001 From: ajaxzheng <894103554@qq.com> Date: Tue, 5 Dec 2023 15:17:48 +0800 Subject: [PATCH] feat(sites): add attribute api is sorted by dictionary (#1028) * feat(sites): [button] add attribute api is sorted by dictionary * feat(sites): [button] add attribute api is sorted by dictionary * feat(sites): [button] add attribute api is sorted by dictionary --- examples/sites/src/views/components/components.vue | 8 ++++++-- examples/sites/src/views/layout/layout.vue | 10 +++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/sites/src/views/components/components.vue b/examples/sites/src/views/components/components.vue index 188b26398..59c6acb6e 100644 --- a/examples/sites/src/views/components/components.vue +++ b/examples/sites/src/views/components/components.vue @@ -41,7 +41,7 @@

API

-
+
{{ oneGroup.name }}
{{ oneGroup.type }}
@@ -68,7 +68,7 @@ - + {{ row.name }} {{ row.name }} @@ -219,6 +219,7 @@ export default defineComponent({ // 用户打开官网有时候会带一些特殊字符的hash,try catch一下防止js报错 scrollTarget = document.querySelector(`#${hash}`) } catch (err) { + // eslint-disable-next-line no-console console.log('querySelector has special character:', err) } if (scrollTarget) { @@ -287,6 +288,7 @@ export default defineComponent({ } // 3、加载cmpId.js 文件 + // eslint-disable-next-line no-eval const json = eval('(' + jsData.slice(15) + ')') state.currJson = { ...json, @@ -295,12 +297,14 @@ export default defineComponent({ } if (state.cmpId?.startsWith('grid-')) { fetchDemosFile(`${staticDemoPath}/grid/webdoc/grid.js`).then((data) => { + // eslint-disable-next-line no-eval const gridJson = eval('(' + data.slice(15) + ')') state.currJson.apis = gridJson.apis state.currJson.types = gridJson.types }) } else if (state.cmpId?.startsWith('chart-')) { fetchDemosFile(`${staticDemoPath}/chart/webdoc/chart.js`).then((data) => { + // eslint-disable-next-line no-eval const chartJson = eval('(' + data.slice(15) + ')') state.currJson.apis = chartJson.apis }) diff --git a/examples/sites/src/views/layout/layout.vue b/examples/sites/src/views/layout/layout.vue index e3ed62778..6f0e29cd5 100644 --- a/examples/sites/src/views/layout/layout.vue +++ b/examples/sites/src/views/layout/layout.vue @@ -83,12 +83,8 @@
多端 {{ data.label }} - - {{ data.mark.text}} + + {{ data.mark.text }}
@@ -113,7 +109,7 @@ import { Switch, TreeMenu, Dropdown, DropdownMenu, DropdownItem, Tooltip, Tag } import { iconHelpCircle } from '@opentiny/vue-icon' import { genMenus } from '@/menus.jsx' import { router } from '@/router.js' -import { $t2, $t, appData, appFn, useApiMode, useTemplateMode } from '@/tools' +import { $t2, appData, appFn, useApiMode, useTemplateMode } from '@/tools' import themeSvg from '@/assets/images/theme.svg?url' import useTheme from '@/tools/useTheme'