sard 1.2.2 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -184,22 +184,18 @@ var ellipsis_default = /*@__PURE__*/ defineComponent({
184
184
  return openBlock(), createElementBlock("div", {
185
185
  ref: "root",
186
186
  class: normalizeClass(unref(bem).b())
187
- }, [
188
- createElementVNode("div", {
189
- class: normalizeClass(contentClass.value),
190
- style: normalizeStyle(contentStyle.value)
191
- }, [createTextVNode(toDisplayString(displayContent.value) + " ", 1), showAction.value ? (openBlock(), createElementBlock("span", {
192
- key: 0,
193
- class: normalizeClass(unref(actionClass)),
194
- onClick: onToggle
195
- }, toDisplayString(actionText.value), 3)) : createCommentVNode("v-if", true)], 6),
196
- createCommentVNode(" 唯一的测量层:整段高度、单行高度、二分候选都在这一块里量。\n 内容是空的,两个 span(正文 + 展开按钮)由 JS 建、由 JS 直接改 textContent,\n 每轮探测只有「一次写入 + 一次读取」,不触发组件重渲染。\n 绝对定位 + contain,测量引起的布局失效既不会撑开可见布局,也不会传到祖先链。 "),
197
- createElementVNode("div", {
198
- ref: "measure",
199
- class: normalizeClass(unref(measureClass)),
200
- "aria-hidden": "true"
201
- }, null, 2)
202
- ], 2);
187
+ }, [createElementVNode("div", {
188
+ class: normalizeClass(contentClass.value),
189
+ style: normalizeStyle(contentStyle.value)
190
+ }, [createTextVNode(toDisplayString(displayContent.value) + " ", 1), showAction.value ? (openBlock(), createElementBlock("span", {
191
+ key: 0,
192
+ class: normalizeClass(unref(actionClass)),
193
+ onClick: onToggle
194
+ }, toDisplayString(actionText.value), 3)) : createCommentVNode("v-if", true)], 6), createElementVNode("div", {
195
+ ref: "measure",
196
+ class: normalizeClass(unref(measureClass)),
197
+ "aria-hidden": "true"
198
+ }, null, 2)], 2);
203
199
  };
204
200
  }
205
201
  });
@@ -1,6 +1,6 @@
1
1
  import { createBem } from "../../utils/bem.js";
2
2
  import { defaultTextShrinkProps } from "./common.js";
3
- import { computed, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, mergeDefaults, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, openBlock, ref, toDisplayString, unref, useTemplateRef, watch } from "vue";
3
+ import { computed, createElementBlock, createElementVNode, createTextVNode, defineComponent, mergeDefaults, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, openBlock, ref, toDisplayString, unref, useTemplateRef, watch } from "vue";
4
4
  //#region packages/sard/components/text-shrink/text-shrink.vue
5
5
  const _hoisted_1 = ["textContent"];
6
6
  const MIN_FONT_SIZE = 1;
@@ -235,7 +235,7 @@ var text_shrink_default = /*@__PURE__*/ defineComponent({
235
235
  return openBlock(), createElementBlock("div", {
236
236
  ref: "root",
237
237
  class: normalizeClass(rootClass.value)
238
- }, [createCommentVNode(" 文本层:可见文本 + 隐藏测量层。\n 测量层之所以放在文本层内部,是为了让所有可继承的排版属性(font-*、letter-spacing、\n word-spacing、white-space、word-break、text-transform…)由继承自动对齐:\n 兄弟节点之间不会互相继承,那种结构只能在 JS 里逐个搬运属性,搬漏一个就量不准。\n 测量层绝对定位、脱离文档流,不影响可见文本的布局与固有宽度。\n 用 v-text 而不是插值,保证它的内容永远是一个文本节点,Range 才能直接选它来数行。 "), createElementVNode("div", {
238
+ }, [createElementVNode("div", {
239
239
  ref: "text",
240
240
  class: normalizeClass(textClass.value),
241
241
  style: normalizeStyle(textStyle.value)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sard",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "sard 是基于 Vue3 的 Web 移动端 UI 组件库",
5
5
  "keywords": [
6
6
  "UI",