docs: 删除smb配置以及相关依赖 (#2332)
This commit is contained in:
parent
455332c8bd
commit
71bbf49a36
|
@ -157,7 +157,6 @@ import {
|
||||||
} from '@opentiny/vue'
|
} from '@opentiny/vue'
|
||||||
import { iconStarActive, iconSelect } from '@opentiny/vue-icon'
|
import { iconStarActive, iconSelect } from '@opentiny/vue-icon'
|
||||||
import Loading from '@opentiny/vue-loading'
|
import Loading from '@opentiny/vue-loading'
|
||||||
import designSmbConfig from '@opentiny/vue-design-smb'
|
|
||||||
import designSaasConfig from '@opentiny/vue-design-saas'
|
import designSaasConfig from '@opentiny/vue-design-saas'
|
||||||
import { menuData, demoStr, demoVue, mds, demos } from './resourcePc.js'
|
import { menuData, demoStr, demoVue, mds, demos } from './resourcePc.js'
|
||||||
import { useTheme, useModeCtx } from './uses'
|
import { useTheme, useModeCtx } from './uses'
|
||||||
|
@ -263,10 +262,9 @@ export default {
|
||||||
modeFn.pushToUrl()
|
modeFn.pushToUrl()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 默认全部使用designSmbConfig,后续验收完毕再调整
|
|
||||||
const designConfigMap = {
|
const designConfigMap = {
|
||||||
'tiny-smb-theme': designSmbConfig,
|
'tiny-smb-theme': {},
|
||||||
'tiny-aurora-theme': designSmbConfig
|
'tiny-aurora-theme': {}
|
||||||
}
|
}
|
||||||
|
|
||||||
const lastThemeKey = localStorage.getItem('tinyThemeToolkey')
|
const lastThemeKey = localStorage.getItem('tinyThemeToolkey')
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
"@opentiny/vue-common": "workspace:~",
|
"@opentiny/vue-common": "workspace:~",
|
||||||
"@opentiny/vue-design-aurora": "workspace:~",
|
"@opentiny/vue-design-aurora": "workspace:~",
|
||||||
"@opentiny/vue-design-saas": "workspace:~",
|
"@opentiny/vue-design-saas": "workspace:~",
|
||||||
"@opentiny/vue-design-smb": "workspace:~",
|
|
||||||
"@opentiny/vue-icon": "workspace:~",
|
"@opentiny/vue-icon": "workspace:~",
|
||||||
"@opentiny/vue-theme-mobile": "workspace:~",
|
"@opentiny/vue-theme-mobile": "workspace:~",
|
||||||
"@opentiny/vue-theme-saas": "workspace:~",
|
"@opentiny/vue-theme-saas": "workspace:~",
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
"@opentiny/vue-common": "workspace:~",
|
"@opentiny/vue-common": "workspace:~",
|
||||||
"@opentiny/vue-design-aurora": "workspace:~",
|
"@opentiny/vue-design-aurora": "workspace:~",
|
||||||
"@opentiny/vue-design-saas": "workspace:~",
|
"@opentiny/vue-design-saas": "workspace:~",
|
||||||
"@opentiny/vue-design-smb": "workspace:~",
|
|
||||||
"@opentiny/vue-directive": "workspace:~",
|
"@opentiny/vue-directive": "workspace:~",
|
||||||
"@opentiny/vue-hooks": "workspace:~",
|
"@opentiny/vue-hooks": "workspace:~",
|
||||||
"@opentiny/vue-icon": "workspace:~",
|
"@opentiny/vue-icon": "workspace:~",
|
||||||
|
|
|
@ -71,9 +71,10 @@ const createImportMap = (version) => {
|
||||||
'@opentiny/vue-renderless/': `${cdnHost}/@opentiny/vue-renderless${versionDelimiter}${version}/${fileDelimiter}`,
|
'@opentiny/vue-renderless/': `${cdnHost}/@opentiny/vue-renderless${versionDelimiter}${version}/${fileDelimiter}`,
|
||||||
'sortablejs': `${cdnHost}/sortablejs${versionDelimiter}1.15.0/${fileDelimiter}modular/sortable.esm.js`
|
'sortablejs': `${cdnHost}/sortablejs${versionDelimiter}1.15.0/${fileDelimiter}modular/sortable.esm.js`
|
||||||
}
|
}
|
||||||
if (['aurora', 'smb', 'saas'].includes(tinyTheme)) {
|
if (['aurora', 'saas'].includes(tinyTheme)) {
|
||||||
imports[`@opentiny/vue-design-${tinyTheme}`] =
|
imports[
|
||||||
`${cdnHost}/@opentiny/vue-design-${tinyTheme}${versionDelimiter}${version}/${fileDelimiter}index.js`
|
`@opentiny/vue-design-${tinyTheme}`
|
||||||
|
] = `${cdnHost}/@opentiny/vue-design-${tinyTheme}${versionDelimiter}${version}/${fileDelimiter}index.js`
|
||||||
}
|
}
|
||||||
if (isSaas) {
|
if (isSaas) {
|
||||||
imports['@opentiny/vue-icon'] = `${getRuntime(version)}tiny-vue-icon-saas.mjs`
|
imports['@opentiny/vue-icon'] = `${getRuntime(version)}tiny-vue-icon-saas.mjs`
|
||||||
|
@ -88,12 +89,11 @@ const getTinyTheme = (version) => {
|
||||||
return `${getRuntime(version)}tailwind.css`
|
return `${getRuntime(version)}tailwind.css`
|
||||||
}
|
}
|
||||||
let theme = tinyTheme
|
let theme = tinyTheme
|
||||||
if (!['smb', 'default', 'aurora', 'saas'].includes(theme)) {
|
if (!['aurora', 'saas'].includes(theme)) {
|
||||||
theme = 'default'
|
theme = 'default'
|
||||||
}
|
}
|
||||||
const tinyThemeMap = {
|
const tinyThemeMap = {
|
||||||
default: `${cdnHost}/@opentiny/vue-theme${versionDelimiter}${version}/${fileDelimiter}index.css`,
|
default: `${cdnHost}/@opentiny/vue-theme${versionDelimiter}${version}/${fileDelimiter}index.css`,
|
||||||
smb: `${cdnHost}/@opentiny/vue-theme${versionDelimiter}${version}/${fileDelimiter}index.css`,
|
|
||||||
aurora: `${cdnHost}/@opentiny/vue-theme${versionDelimiter}${version}/${fileDelimiter}index.css`,
|
aurora: `${cdnHost}/@opentiny/vue-theme${versionDelimiter}${version}/${fileDelimiter}index.css`,
|
||||||
saas: `${cdnHost}/@opentiny/vue-theme-saas${versionDelimiter}${version}/${fileDelimiter}index.css`
|
saas: `${cdnHost}/@opentiny/vue-theme-saas${versionDelimiter}${version}/${fileDelimiter}index.css`
|
||||||
}
|
}
|
||||||
|
@ -132,8 +132,7 @@ const state = reactive({
|
||||||
|
|
||||||
const designThemeMap = {
|
const designThemeMap = {
|
||||||
aurora: 'tinyAuroraTheme',
|
aurora: 'tinyAuroraTheme',
|
||||||
infinity: 'tinyInfinityTheme',
|
infinity: 'tinyInfinityTheme'
|
||||||
smb: 'tinySmbTheme'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setTinyDesign() {
|
function setTinyDesign() {
|
||||||
|
@ -144,13 +143,13 @@ function setTinyDesign() {
|
||||||
useCode += 'app.provide("TinyMode", "mobile-first");\n'
|
useCode += 'app.provide("TinyMode", "mobile-first");\n'
|
||||||
}
|
}
|
||||||
|
|
||||||
if (['aurora', 'smb', 'saas'].includes(tinyTheme)) {
|
if (['aurora', 'saas'].includes(tinyTheme)) {
|
||||||
importCode += `import designConfig from '@opentiny/vue-design-${tinyTheme}';
|
importCode += `import designConfig from '@opentiny/vue-design-${tinyTheme}';
|
||||||
import { design } from '@opentiny/vue-common';\n`
|
import { design } from '@opentiny/vue-common';\n`
|
||||||
useCode += 'app.provide(design.configKey, designConfig);\n'
|
useCode += 'app.provide(design.configKey, designConfig);\n'
|
||||||
}
|
}
|
||||||
|
|
||||||
if (['aurora', 'infinity', 'smb'].includes(tinyTheme)) {
|
if (['aurora', 'infinity'].includes(tinyTheme)) {
|
||||||
const designTheme = designThemeMap[tinyTheme]
|
const designTheme = designThemeMap[tinyTheme]
|
||||||
importCode += `import TinyThemeTool from '@opentiny/vue-theme/theme-tool';
|
importCode += `import TinyThemeTool from '@opentiny/vue-theme/theme-tool';
|
||||||
import { ${designTheme} } from '@opentiny/vue-theme/theme';\n`
|
import { ${designTheme} } from '@opentiny/vue-theme/theme';\n`
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import { watch, computed } from 'vue'
|
import { watch, computed } from 'vue'
|
||||||
import TinyThemeTool from '@opentiny/vue-theme/theme-tool'
|
import TinyThemeTool from '@opentiny/vue-theme/theme-tool'
|
||||||
import { hooks } from '@opentiny/vue-common'
|
import { hooks } from '@opentiny/vue-common'
|
||||||
import designSmbConfig from '@opentiny/vue-design-smb'
|
|
||||||
import designSaasConfig from '@opentiny/vue-design-saas'
|
import designSaasConfig from '@opentiny/vue-design-saas'
|
||||||
import { router } from '@/router'
|
import { router } from '@/router'
|
||||||
import { appData } from './appData'
|
import { appData } from './appData'
|
||||||
|
@ -67,10 +66,10 @@ const themeData = [
|
||||||
]
|
]
|
||||||
|
|
||||||
const designConfigMap = {
|
const designConfigMap = {
|
||||||
[DEFAULT_THEME]: designSmbConfig,
|
[DEFAULT_THEME]: {},
|
||||||
[INFINITY_THEME]: designSmbConfig,
|
[INFINITY_THEME]: {},
|
||||||
[AURORA_THEME]: designSmbConfig,
|
[AURORA_THEME]: {},
|
||||||
[SMB_THEME]: designSmbConfig
|
[SMB_THEME]: {}
|
||||||
}
|
}
|
||||||
|
|
||||||
const theme = new TinyThemeTool()
|
const theme = new TinyThemeTool()
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
"name": "vue2-example",
|
"name": "vue2-example",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"private": true,
|
|
||||||
"version": "0.1.6-mf.0",
|
"version": "0.1.6-mf.0",
|
||||||
|
"private": true,
|
||||||
"files": [
|
"files": [
|
||||||
"*"
|
"*"
|
||||||
],
|
],
|
||||||
|
@ -23,21 +23,27 @@
|
||||||
"@opentiny/vue-locale": "workspace:~",
|
"@opentiny/vue-locale": "workspace:~",
|
||||||
"@opentiny/vue-renderless": "workspace:~",
|
"@opentiny/vue-renderless": "workspace:~",
|
||||||
"@opentiny/vue-theme": "workspace:~",
|
"@opentiny/vue-theme": "workspace:~",
|
||||||
"@opentiny/vue-theme-saas": "workspace:~",
|
|
||||||
"@opentiny/vue-theme-mobile": "workspace:~",
|
"@opentiny/vue-theme-mobile": "workspace:~",
|
||||||
|
"@opentiny/vue-theme-saas": "workspace:~",
|
||||||
"@opentiny/vue-vite-import": "workspace:~",
|
"@opentiny/vue-vite-import": "workspace:~",
|
||||||
"@opentiny/vue-design-smb": "workspace:~",
|
|
||||||
"@playwright/test": "~1.42.0",
|
"@playwright/test": "~1.42.0",
|
||||||
|
"@tiptap/vue-2": "^2.1.0",
|
||||||
|
"@unocss/core": "^0.48.0",
|
||||||
|
"@unocss/preset-icons": "^0.61.9",
|
||||||
|
"@unocss/transformer-directives": "^0.48.0",
|
||||||
"@vitest/ui": "^0.31.0",
|
"@vitest/ui": "^0.31.0",
|
||||||
"@vue/babel-helper-vue-jsx-merge-props": "^1.4.0",
|
"@vue/babel-helper-vue-jsx-merge-props": "^1.4.0",
|
||||||
"@vue/composition-api": "1.7.2",
|
"@vue/composition-api": "1.7.2",
|
||||||
"@vue/runtime-dom": "^3.2.31",
|
"@vue/runtime-dom": "^3.2.31",
|
||||||
"@vue/test-utils": "^1.3.3",
|
"@vue/test-utils": "^1.3.3",
|
||||||
|
"js-sha256": "^0.9.0",
|
||||||
"jsdom": "^21.0.0",
|
"jsdom": "^21.0.0",
|
||||||
|
"onigasm": "^2.2.5",
|
||||||
"postcss": "^8.4.16",
|
"postcss": "^8.4.16",
|
||||||
"tailwindcss": "^3.2.4",
|
"tailwindcss": "^3.2.4",
|
||||||
"tailwindcss-vite-plugin": "^0.0.3",
|
"tailwindcss-vite-plugin": "^0.0.3",
|
||||||
"typescript": "^5.0.0",
|
"typescript": "^5.0.0",
|
||||||
|
"unocss": "^0.61.9",
|
||||||
"unplugin-vue2-script-setup": "^0.11.3",
|
"unplugin-vue2-script-setup": "^0.11.3",
|
||||||
"vite": "^4.3.8",
|
"vite": "^4.3.8",
|
||||||
"vite-plugin-checker": "^0.5.2",
|
"vite-plugin-checker": "^0.5.2",
|
||||||
|
@ -51,13 +57,6 @@
|
||||||
"vue": "2.6.14",
|
"vue": "2.6.14",
|
||||||
"vue-i18n": "^8.9.0",
|
"vue-i18n": "^8.9.0",
|
||||||
"vue-template-compiler": "2.6.14",
|
"vue-template-compiler": "2.6.14",
|
||||||
"vue-tsc": "^1.0.16",
|
"vue-tsc": "^1.0.16"
|
||||||
"js-sha256": "^0.9.0",
|
|
||||||
"onigasm": "^2.2.5",
|
|
||||||
"@tiptap/vue-2": "^2.1.0",
|
|
||||||
"unocss": "^0.61.9",
|
|
||||||
"@unocss/core": "^0.48.0",
|
|
||||||
"@unocss/preset-icons": "^0.61.9",
|
|
||||||
"@unocss/transformer-directives": "^0.48.0"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -22,7 +22,6 @@
|
||||||
"@opentiny/vue": "workspace:~",
|
"@opentiny/vue": "workspace:~",
|
||||||
"@opentiny/vue-common": "workspace:~",
|
"@opentiny/vue-common": "workspace:~",
|
||||||
"@opentiny/vue-design-aurora": "workspace:~",
|
"@opentiny/vue-design-aurora": "workspace:~",
|
||||||
"@opentiny/vue-design-smb": "workspace:~",
|
|
||||||
"@opentiny/vue-icon": "workspace:~",
|
"@opentiny/vue-icon": "workspace:~",
|
||||||
"@opentiny/vue-locale": "workspace:~",
|
"@opentiny/vue-locale": "workspace:~",
|
||||||
"@opentiny/vue-renderless": "workspace:~",
|
"@opentiny/vue-renderless": "workspace:~",
|
||||||
|
|
|
@ -200,15 +200,7 @@ export const getBaseConfig = ({ vueVersion, dtsInclude, dts, buildTarget, isRunt
|
||||||
dependencies['@vue/composition-api'] = '1.7.2'
|
dependencies['@vue/composition-api'] = '1.7.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
const matchList = [
|
const matchList = ['vue-icon', 'vue-icon-saas', 'vue', 'design/aurora', 'design/saas', 'vue-directive']
|
||||||
'vue-icon',
|
|
||||||
'vue-icon-saas',
|
|
||||||
'vue',
|
|
||||||
'design/smb',
|
|
||||||
'design/aurora',
|
|
||||||
'design/saas',
|
|
||||||
'vue-directive'
|
|
||||||
]
|
|
||||||
|
|
||||||
// 如果是主入口、svg图标或者主题规范包则直接指向相同路径
|
// 如果是主入口、svg图标或者主题规范包则直接指向相同路径
|
||||||
if (matchList.includes(filePath)) {
|
if (matchList.includes(filePath)) {
|
||||||
|
@ -334,7 +326,7 @@ async function batchBuildAll({ vueVersion, tasks, formats, message, emptyOutDir,
|
||||||
}
|
}
|
||||||
|
|
||||||
// design包不排除png文件
|
// design包不排除png文件
|
||||||
if (/design\/(saas|aurora|smb|)/.test(importer) && /\.png/.test(source)) {
|
if (/design\/(saas|aurora|)/.test(importer) && /\.png/.test(source)) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,11 +24,6 @@
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"exclude": false
|
"exclude": false
|
||||||
},
|
},
|
||||||
"DesignSmb": {
|
|
||||||
"path": "design/smb/index.ts",
|
|
||||||
"type": "module",
|
|
||||||
"exclude": false
|
|
||||||
},
|
|
||||||
"DesignAurora": {
|
"DesignAurora": {
|
||||||
"path": "design/aurora/index.ts",
|
"path": "design/aurora/index.ts",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
import { version } from './package.json'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'smb',
|
|
||||||
version,
|
|
||||||
components: {}
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"name": "@opentiny/vue-design-smb",
|
|
||||||
"version": "3.18.0",
|
|
||||||
"sideEffects": false,
|
|
||||||
"type": "module",
|
|
||||||
"main": "index.ts",
|
|
||||||
"dependencies": {
|
|
||||||
"@opentiny/vue-icon": "workspace:~"
|
|
||||||
},
|
|
||||||
"license": "MIT"
|
|
||||||
}
|
|
Loading…
Reference in New Issue