diff --git a/demo/documentation/components/drawer/enUS/index.md b/demo/documentation/components/drawer/enUS/index.md index f91cf0815..f74938df5 100644 --- a/demo/documentation/components/drawer/enUS/index.md +++ b/demo/documentation/components/drawer/enUS/index.md @@ -13,12 +13,15 @@ multiple ## Props |Name|Parameters|Default|Description| |-|-|-|-| +|theme|`'light' \| 'dark'`|`null`|| +|themed-style|`{ [themeName: string]: object }`|`null`|| |show|`boolean`|`false`|| |placement|`'top' \| 'right' \| 'bottom' \| 'left'`|`'right'`|| |width|`number \| string`|`251`|| |height|`number \| string`|`251`|Works when placement is `top` and `bottom`.| |mask-closable|`boolean`|`true`|Whether to emit `hide` event when click mask.| |drawer-style|`object`|`null`|| +|drawer-class|`string`|`null`|| ## Slots |Name|Parameters|Description| diff --git a/demo/documentation/components/drawer/zhCN/index.md b/demo/documentation/components/drawer/zhCN/index.md index 97ee5194f..318c8e32b 100644 --- a/demo/documentation/components/drawer/zhCN/index.md +++ b/demo/documentation/components/drawer/zhCN/index.md @@ -17,12 +17,15 @@ dark-4-debug ## Props |名称|类型|默认值|说明| |-|-|-|-| +|theme|`'light' \| 'dark'`|`null`|| +|themed-style|`{ [themeName: string]: object }`|`null`|| |show|`boolean`|`false`|| |placement|`'top' \| 'right' \| 'bottom' \| 'left'`|`'right'`|| |width|`number \| string`|`251`|| |height|`number \| string`|`251`|在位置是 `top` 和 `bottom` 时生效| |mask-closable|`boolean`|`true`|点击遮罩时是否发出 `hide` 事件| |drawer-style|`object`|`null`|| +|drawer-class|`string`|`null`|| ## Slots |名称|参数|说明| diff --git a/package.json b/package.json index 17a813b67..86fadaf02 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "naive-ui", - "version": "0.7.24", + "version": "0.7.25", "description": "", "main": "lib/index.js", "module": "es/index.js", diff --git a/src/Drawer/src/main.vue b/src/Drawer/src/main.vue index 43287e957..6fcac7e11 100644 --- a/src/Drawer/src/main.vue +++ b/src/Drawer/src/main.vue @@ -20,12 +20,15 @@ class="n-drawer" :style="{ ...drawerStyle, + ...themedStyle, width: styleWidth, height: styleHeight }" :class="{ [`n-drawer--${placement}-placement`]: true, - [`n-${syntheticTheme}-theme`]: syntheticTheme + [`n-${syntheticTheme}-theme`]: syntheticTheme, + [drawerClass]: drawerClass, + [namespace]: namespace }" > @@ -82,6 +85,10 @@ export default { type: Object, default: null }, + drawerClass: { + type: String, + default: null + }, /** Todo */ target: { type: Function, diff --git a/src/components.js b/src/components.js index 4b24baa36..f04f47e0d 100644 --- a/src/components.js +++ b/src/components.js @@ -464,7 +464,7 @@ function createScriptImportStatements (componentNames = [], format = 'esm') { } function createScriptImportStatement (componentName, format = 'esm') { - return `import N${componentName} from ${scriptPrefix[format]}${componentName}` + return `import N${componentName} from '${scriptPrefix[format]}${componentName}'` } function createStyleImportStatements (componentNames = [], format = 'esm') { @@ -484,11 +484,12 @@ function createStyleImportStatements (componentNames = [], format = 'esm') { function createStyleImportStatement (styleFile, format) { if (styleFile.startsWith('~')) { return ( - 'import ' + - styleFile.slice(1, styleFile.length) + 'import \'' + + styleFile.slice(1, styleFile.length) + + '\'' ) } - return `import ${stylePrefix[format]}${styleFile}${styleExtension[format]}` + return `import '${stylePrefix[format]}${styleFile}${styleExtension[format]}'` } function createImportStatements (componentNames = [], format = 'esm') { @@ -499,12 +500,12 @@ function createImportStatements (componentNames = [], format = 'esm') { } function createLocaleImportStatements (locales = ['zhCN', 'enUS'], format = 'ems') { - return locales.map(locale => `import ${locale} from ${scriptPrefix[format]}locale/${locale}`).join('\n') + '\n\n' + return locales.map(locale => `import ${locale} from '${scriptPrefix[format]}locale/${locale}'`).join('\n') + '\n\n' } function createInitializeStatements (components = [], locales = ['zhCN', 'enUS'], format = 'esm') { return ( - `import create from ${scriptPrefix[format]}create\n\n` + + `import create from '${scriptPrefix[format]}create'\n\n` + createLocaleImportStatements(locales, format) + `const naive = create({\n` + ` components: [\n` + diff --git a/think.md b/think.md index 65308d38a..2e7ac4ccd 100644 --- a/think.md +++ b/think.md @@ -125,6 +125,9 @@ const devtoolIsOpened = e.target === document.activeElement ## 2020.3.8 zindex 有点问题 +## 2020.3.11 +zindex 的问题解决了,虽然很简单,在 static 元素上设定 zindex 没用,😅 + ## TODO 排序不分先后 1. Focus Detector on Time Selector